import { HttpRequest as __HttpRequest , HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http" ; import { expectNonNull as __expectNonNull , expectString as __expectString , extendedEncodeURIComponent as __extendedEncodeURIComponent , getArrayIfSingleItem as __getArrayIfSingleItem , getValueFromTextNode as __getValueFromTextNode , parseBoolean as __parseBoolean , parseRfc3339DateTime as __parseRfc3339DateTime , strictParseFloat as __strictParseFloat , strictParseInt32 as __strictParseInt32 , strictParseLong as __strictParseLong , } from "@aws-sdk/smithy-client" ; import { Endpoint as __Endpoint , HeaderBag as __HeaderBag , MetadataBearer as __MetadataBearer , ResponseMetadata as __ResponseMetadata , SerdeContext as __SerdeContext , SmithyException as __SmithyException , } from "@aws-sdk/types" ; import { decodeHTML } from "entities" ; import { parse as xmlParse } from "fast-xml-parser" ; import { AddRoleToDBClusterCommandInput , AddRoleToDBClusterCommandOutput } from "../commands/AddRoleToDBClusterCommand" ; import { AddRoleToDBInstanceCommandInput , AddRoleToDBInstanceCommandOutput , } from "../commands/AddRoleToDBInstanceCommand" ; import { AddSourceIdentifierToSubscriptionCommandInput , AddSourceIdentifierToSubscriptionCommandOutput , } from "../commands/AddSourceIdentifierToSubscriptionCommand" ; import { AddTagsToResourceCommandInput , AddTagsToResourceCommandOutput } from "../commands/AddTagsToResourceCommand" ; import { ApplyPendingMaintenanceActionCommandInput , ApplyPendingMaintenanceActionCommandOutput , } from "../commands/ApplyPendingMaintenanceActionCommand" ; import { AuthorizeDBSecurityGroupIngressCommandInput , AuthorizeDBSecurityGroupIngressCommandOutput , } from "../commands/AuthorizeDBSecurityGroupIngressCommand" ; import { BacktrackDBClusterCommandInput , BacktrackDBClusterCommandOutput } from "../commands/BacktrackDBClusterCommand" ; import { CancelExportTaskCommandInput , CancelExportTaskCommandOutput } from "../commands/CancelExportTaskCommand" ; import { CopyDBClusterParameterGroupCommandInput , CopyDBClusterParameterGroupCommandOutput , } from "../commands/CopyDBClusterParameterGroupCommand" ; import { CopyDBClusterSnapshotCommandInput , CopyDBClusterSnapshotCommandOutput , } from "../commands/CopyDBClusterSnapshotCommand" ; import { CopyDBParameterGroupCommandInput , CopyDBParameterGroupCommandOutput , } from "../commands/CopyDBParameterGroupCommand" ; import { CopyDBSnapshotCommandInput , CopyDBSnapshotCommandOutput } from "../commands/CopyDBSnapshotCommand" ; import { CopyOptionGroupCommandInput , CopyOptionGroupCommandOutput } from "../commands/CopyOptionGroupCommand" ; import { CreateCustomAvailabilityZoneCommandInput , CreateCustomAvailabilityZoneCommandOutput , } from "../commands/CreateCustomAvailabilityZoneCommand" ; import { CreateCustomDBEngineVersionCommandInput , CreateCustomDBEngineVersionCommandOutput , } from "../commands/CreateCustomDBEngineVersionCommand" ; import { CreateDBClusterCommandInput , CreateDBClusterCommandOutput } from "../commands/CreateDBClusterCommand" ; import { CreateDBClusterEndpointCommandInput , CreateDBClusterEndpointCommandOutput , } from "../commands/CreateDBClusterEndpointCommand" ; import { CreateDBClusterParameterGroupCommandInput , CreateDBClusterParameterGroupCommandOutput , } from "../commands/CreateDBClusterParameterGroupCommand" ; import { CreateDBClusterSnapshotCommandInput , CreateDBClusterSnapshotCommandOutput , } from "../commands/CreateDBClusterSnapshotCommand" ; import { CreateDBInstanceCommandInput , CreateDBInstanceCommandOutput } from "../commands/CreateDBInstanceCommand" ; import { CreateDBInstanceReadReplicaCommandInput , CreateDBInstanceReadReplicaCommandOutput , } from "../commands/CreateDBInstanceReadReplicaCommand" ; import { CreateDBParameterGroupCommandInput , CreateDBParameterGroupCommandOutput , } from "../commands/CreateDBParameterGroupCommand" ; import { CreateDBProxyCommandInput , CreateDBProxyCommandOutput } from "../commands/CreateDBProxyCommand" ; import { CreateDBProxyEndpointCommandInput , CreateDBProxyEndpointCommandOutput , } from "../commands/CreateDBProxyEndpointCommand" ; import { CreateDBSecurityGroupCommandInput , CreateDBSecurityGroupCommandOutput , } from "../commands/CreateDBSecurityGroupCommand" ; import { CreateDBSnapshotCommandInput , CreateDBSnapshotCommandOutput } from "../commands/CreateDBSnapshotCommand" ; import { CreateDBSubnetGroupCommandInput , CreateDBSubnetGroupCommandOutput , } from "../commands/CreateDBSubnetGroupCommand" ; import { CreateEventSubscriptionCommandInput , CreateEventSubscriptionCommandOutput , } from "../commands/CreateEventSubscriptionCommand" ; import { CreateGlobalClusterCommandInput , CreateGlobalClusterCommandOutput , } from "../commands/CreateGlobalClusterCommand" ; import { CreateOptionGroupCommandInput , CreateOptionGroupCommandOutput } from "../commands/CreateOptionGroupCommand" ; import { DeleteCustomAvailabilityZoneCommandInput , DeleteCustomAvailabilityZoneCommandOutput , } from "../commands/DeleteCustomAvailabilityZoneCommand" ; import { DeleteCustomDBEngineVersionCommandInput , DeleteCustomDBEngineVersionCommandOutput , } from "../commands/DeleteCustomDBEngineVersionCommand" ; import { DeleteDBClusterCommandInput , DeleteDBClusterCommandOutput } from "../commands/DeleteDBClusterCommand" ; import { DeleteDBClusterEndpointCommandInput , DeleteDBClusterEndpointCommandOutput , } from "../commands/DeleteDBClusterEndpointCommand" ; import { DeleteDBClusterParameterGroupCommandInput , DeleteDBClusterParameterGroupCommandOutput , } from "../commands/DeleteDBClusterParameterGroupCommand" ; import { DeleteDBClusterSnapshotCommandInput , DeleteDBClusterSnapshotCommandOutput , } from "../commands/DeleteDBClusterSnapshotCommand" ; import { DeleteDBInstanceAutomatedBackupCommandInput , DeleteDBInstanceAutomatedBackupCommandOutput , } from "../commands/DeleteDBInstanceAutomatedBackupCommand" ; import { DeleteDBInstanceCommandInput , DeleteDBInstanceCommandOutput } from "../commands/DeleteDBInstanceCommand" ; import { DeleteDBParameterGroupCommandInput , DeleteDBParameterGroupCommandOutput , } from "../commands/DeleteDBParameterGroupCommand" ; import { DeleteDBProxyCommandInput , DeleteDBProxyCommandOutput } from "../commands/DeleteDBProxyCommand" ; import { DeleteDBProxyEndpointCommandInput , DeleteDBProxyEndpointCommandOutput , } from "../commands/DeleteDBProxyEndpointCommand" ; import { DeleteDBSecurityGroupCommandInput , DeleteDBSecurityGroupCommandOutput , } from "../commands/DeleteDBSecurityGroupCommand" ; import { DeleteDBSnapshotCommandInput , DeleteDBSnapshotCommandOutput } from "../commands/DeleteDBSnapshotCommand" ; import { DeleteDBSubnetGroupCommandInput , DeleteDBSubnetGroupCommandOutput , } from "../commands/DeleteDBSubnetGroupCommand" ; import { DeleteEventSubscriptionCommandInput , DeleteEventSubscriptionCommandOutput , } from "../commands/DeleteEventSubscriptionCommand" ; import { DeleteGlobalClusterCommandInput , DeleteGlobalClusterCommandOutput , } from "../commands/DeleteGlobalClusterCommand" ; import { DeleteInstallationMediaCommandInput , DeleteInstallationMediaCommandOutput , } from "../commands/DeleteInstallationMediaCommand" ; import { DeleteOptionGroupCommandInput , DeleteOptionGroupCommandOutput } from "../commands/DeleteOptionGroupCommand" ; import { DeregisterDBProxyTargetsCommandInput , DeregisterDBProxyTargetsCommandOutput , } from "../commands/DeregisterDBProxyTargetsCommand" ; import { DescribeAccountAttributesCommandInput , DescribeAccountAttributesCommandOutput , } from "../commands/DescribeAccountAttributesCommand" ; import { DescribeCertificatesCommandInput , DescribeCertificatesCommandOutput , } from "../commands/DescribeCertificatesCommand" ; import { DescribeCustomAvailabilityZonesCommandInput , DescribeCustomAvailabilityZonesCommandOutput , } from "../commands/DescribeCustomAvailabilityZonesCommand" ; import { DescribeDBClusterBacktracksCommandInput , DescribeDBClusterBacktracksCommandOutput , } from "../commands/DescribeDBClusterBacktracksCommand" ; import { DescribeDBClusterEndpointsCommandInput , DescribeDBClusterEndpointsCommandOutput , } from "../commands/DescribeDBClusterEndpointsCommand" ; import { DescribeDBClusterParameterGroupsCommandInput , DescribeDBClusterParameterGroupsCommandOutput , } from "../commands/DescribeDBClusterParameterGroupsCommand" ; import { DescribeDBClusterParametersCommandInput , DescribeDBClusterParametersCommandOutput , } from "../commands/DescribeDBClusterParametersCommand" ; import { DescribeDBClustersCommandInput , DescribeDBClustersCommandOutput } from "../commands/DescribeDBClustersCommand" ; import { DescribeDBClusterSnapshotAttributesCommandInput , DescribeDBClusterSnapshotAttributesCommandOutput , } from "../commands/DescribeDBClusterSnapshotAttributesCommand" ; import { DescribeDBClusterSnapshotsCommandInput , DescribeDBClusterSnapshotsCommandOutput , } from "../commands/DescribeDBClusterSnapshotsCommand" ; import { DescribeDBEngineVersionsCommandInput , DescribeDBEngineVersionsCommandOutput , } from "../commands/DescribeDBEngineVersionsCommand" ; import { DescribeDBInstanceAutomatedBackupsCommandInput , DescribeDBInstanceAutomatedBackupsCommandOutput , } from "../commands/DescribeDBInstanceAutomatedBackupsCommand" ; import { DescribeDBInstancesCommandInput , DescribeDBInstancesCommandOutput , } from "../commands/DescribeDBInstancesCommand" ; import { DescribeDBLogFilesCommandInput , DescribeDBLogFilesCommandOutput } from "../commands/DescribeDBLogFilesCommand" ; import { DescribeDBParameterGroupsCommandInput , DescribeDBParameterGroupsCommandOutput , } from "../commands/DescribeDBParameterGroupsCommand" ; import { DescribeDBParametersCommandInput , DescribeDBParametersCommandOutput , } from "../commands/DescribeDBParametersCommand" ; import { DescribeDBProxiesCommandInput , DescribeDBProxiesCommandOutput } from "../commands/DescribeDBProxiesCommand" ; import { DescribeDBProxyEndpointsCommandInput , DescribeDBProxyEndpointsCommandOutput , } from "../commands/DescribeDBProxyEndpointsCommand" ; import { DescribeDBProxyTargetGroupsCommandInput , DescribeDBProxyTargetGroupsCommandOutput , } from "../commands/DescribeDBProxyTargetGroupsCommand" ; import { DescribeDBProxyTargetsCommandInput , DescribeDBProxyTargetsCommandOutput , } from "../commands/DescribeDBProxyTargetsCommand" ; import { DescribeDBSecurityGroupsCommandInput , DescribeDBSecurityGroupsCommandOutput , } from "../commands/DescribeDBSecurityGroupsCommand" ; import { DescribeDBSnapshotAttributesCommandInput , DescribeDBSnapshotAttributesCommandOutput , } from "../commands/DescribeDBSnapshotAttributesCommand" ; import { DescribeDBSnapshotsCommandInput , DescribeDBSnapshotsCommandOutput , } from "../commands/DescribeDBSnapshotsCommand" ; import { DescribeDBSubnetGroupsCommandInput , DescribeDBSubnetGroupsCommandOutput , } from "../commands/DescribeDBSubnetGroupsCommand" ; import { DescribeEngineDefaultClusterParametersCommandInput , DescribeEngineDefaultClusterParametersCommandOutput , } from "../commands/DescribeEngineDefaultClusterParametersCommand" ; import { DescribeEngineDefaultParametersCommandInput , DescribeEngineDefaultParametersCommandOutput , } from "../commands/DescribeEngineDefaultParametersCommand" ; import { DescribeEventCategoriesCommandInput , DescribeEventCategoriesCommandOutput , } from "../commands/DescribeEventCategoriesCommand" ; import { DescribeEventsCommandInput , DescribeEventsCommandOutput } from "../commands/DescribeEventsCommand" ; import { DescribeEventSubscriptionsCommandInput , DescribeEventSubscriptionsCommandOutput , } from "../commands/DescribeEventSubscriptionsCommand" ; import { DescribeExportTasksCommandInput , DescribeExportTasksCommandOutput , } from "../commands/DescribeExportTasksCommand" ; import { DescribeGlobalClustersCommandInput , DescribeGlobalClustersCommandOutput , } from "../commands/DescribeGlobalClustersCommand" ; import { DescribeInstallationMediaCommandInput , DescribeInstallationMediaCommandOutput , } from "../commands/DescribeInstallationMediaCommand" ; import { DescribeOptionGroupOptionsCommandInput , DescribeOptionGroupOptionsCommandOutput , } from "../commands/DescribeOptionGroupOptionsCommand" ; import { DescribeOptionGroupsCommandInput , DescribeOptionGroupsCommandOutput , } from "../commands/DescribeOptionGroupsCommand" ; import { DescribeOrderableDBInstanceOptionsCommandInput , DescribeOrderableDBInstanceOptionsCommandOutput , } from "../commands/DescribeOrderableDBInstanceOptionsCommand" ; import { DescribePendingMaintenanceActionsCommandInput , DescribePendingMaintenanceActionsCommandOutput , } from "../commands/DescribePendingMaintenanceActionsCommand" ; import { DescribeReservedDBInstancesCommandInput , DescribeReservedDBInstancesCommandOutput , } from "../commands/DescribeReservedDBInstancesCommand" ; import { DescribeReservedDBInstancesOfferingsCommandInput , DescribeReservedDBInstancesOfferingsCommandOutput , } from "../commands/DescribeReservedDBInstancesOfferingsCommand" ; import { DescribeSourceRegionsCommandInput , DescribeSourceRegionsCommandOutput , } from "../commands/DescribeSourceRegionsCommand" ; import { DescribeValidDBInstanceModificationsCommandInput , DescribeValidDBInstanceModificationsCommandOutput , } from "../commands/DescribeValidDBInstanceModificationsCommand" ; import { DownloadDBLogFilePortionCommandInput , DownloadDBLogFilePortionCommandOutput , } from "../commands/DownloadDBLogFilePortionCommand" ; import { FailoverDBClusterCommandInput , FailoverDBClusterCommandOutput } from "../commands/FailoverDBClusterCommand" ; import { FailoverGlobalClusterCommandInput , FailoverGlobalClusterCommandOutput , } from "../commands/FailoverGlobalClusterCommand" ; import { ImportInstallationMediaCommandInput , ImportInstallationMediaCommandOutput , } from "../commands/ImportInstallationMediaCommand" ; import { ListTagsForResourceCommandInput , ListTagsForResourceCommandOutput , } from "../commands/ListTagsForResourceCommand" ; import { ModifyCertificatesCommandInput , ModifyCertificatesCommandOutput } from "../commands/ModifyCertificatesCommand" ; import { ModifyCurrentDBClusterCapacityCommandInput , ModifyCurrentDBClusterCapacityCommandOutput , } from "../commands/ModifyCurrentDBClusterCapacityCommand" ; import { ModifyCustomDBEngineVersionCommandInput , ModifyCustomDBEngineVersionCommandOutput , } from "../commands/ModifyCustomDBEngineVersionCommand" ; import { ModifyDBClusterCommandInput , ModifyDBClusterCommandOutput } from "../commands/ModifyDBClusterCommand" ; import { ModifyDBClusterEndpointCommandInput , ModifyDBClusterEndpointCommandOutput , } from "../commands/ModifyDBClusterEndpointCommand" ; import { ModifyDBClusterParameterGroupCommandInput , ModifyDBClusterParameterGroupCommandOutput , } from "../commands/ModifyDBClusterParameterGroupCommand" ; import { ModifyDBClusterSnapshotAttributeCommandInput , ModifyDBClusterSnapshotAttributeCommandOutput , } from "../commands/ModifyDBClusterSnapshotAttributeCommand" ; import { ModifyDBInstanceCommandInput , ModifyDBInstanceCommandOutput } from "../commands/ModifyDBInstanceCommand" ; import { ModifyDBParameterGroupCommandInput , ModifyDBParameterGroupCommandOutput , } from "../commands/ModifyDBParameterGroupCommand" ; import { ModifyDBProxyCommandInput , ModifyDBProxyCommandOutput } from "../commands/ModifyDBProxyCommand" ; import { ModifyDBProxyEndpointCommandInput , ModifyDBProxyEndpointCommandOutput , } from "../commands/ModifyDBProxyEndpointCommand" ; import { ModifyDBProxyTargetGroupCommandInput , ModifyDBProxyTargetGroupCommandOutput , } from "../commands/ModifyDBProxyTargetGroupCommand" ; import { ModifyDBSnapshotAttributeCommandInput , ModifyDBSnapshotAttributeCommandOutput , } from "../commands/ModifyDBSnapshotAttributeCommand" ; import { ModifyDBSnapshotCommandInput , ModifyDBSnapshotCommandOutput } from "../commands/ModifyDBSnapshotCommand" ; import { ModifyDBSubnetGroupCommandInput , ModifyDBSubnetGroupCommandOutput , } from "../commands/ModifyDBSubnetGroupCommand" ; import { ModifyEventSubscriptionCommandInput , ModifyEventSubscriptionCommandOutput , } from "../commands/ModifyEventSubscriptionCommand" ; import { ModifyGlobalClusterCommandInput , ModifyGlobalClusterCommandOutput , } from "../commands/ModifyGlobalClusterCommand" ; import { ModifyOptionGroupCommandInput , ModifyOptionGroupCommandOutput } from "../commands/ModifyOptionGroupCommand" ; import { PromoteReadReplicaCommandInput , PromoteReadReplicaCommandOutput } from "../commands/PromoteReadReplicaCommand" ; import { PromoteReadReplicaDBClusterCommandInput , PromoteReadReplicaDBClusterCommandOutput , } from "../commands/PromoteReadReplicaDBClusterCommand" ; import { PurchaseReservedDBInstancesOfferingCommandInput , PurchaseReservedDBInstancesOfferingCommandOutput , } from "../commands/PurchaseReservedDBInstancesOfferingCommand" ; import { RebootDBClusterCommandInput , RebootDBClusterCommandOutput } from "../commands/RebootDBClusterCommand" ; import { RebootDBInstanceCommandInput , RebootDBInstanceCommandOutput } from "../commands/RebootDBInstanceCommand" ; import { RegisterDBProxyTargetsCommandInput , RegisterDBProxyTargetsCommandOutput , } from "../commands/RegisterDBProxyTargetsCommand" ; import { RemoveFromGlobalClusterCommandInput , RemoveFromGlobalClusterCommandOutput , } from "../commands/RemoveFromGlobalClusterCommand" ; import { RemoveRoleFromDBClusterCommandInput , RemoveRoleFromDBClusterCommandOutput , } from "../commands/RemoveRoleFromDBClusterCommand" ; import { RemoveRoleFromDBInstanceCommandInput , RemoveRoleFromDBInstanceCommandOutput , } from "../commands/RemoveRoleFromDBInstanceCommand" ; import { RemoveSourceIdentifierFromSubscriptionCommandInput , RemoveSourceIdentifierFromSubscriptionCommandOutput , } from "../commands/RemoveSourceIdentifierFromSubscriptionCommand" ; import { RemoveTagsFromResourceCommandInput , RemoveTagsFromResourceCommandOutput , } from "../commands/RemoveTagsFromResourceCommand" ; import { ResetDBClusterParameterGroupCommandInput , ResetDBClusterParameterGroupCommandOutput , } from "../commands/ResetDBClusterParameterGroupCommand" ; import { ResetDBParameterGroupCommandInput , ResetDBParameterGroupCommandOutput , } from "../commands/ResetDBParameterGroupCommand" ; import { RestoreDBClusterFromS3CommandInput , RestoreDBClusterFromS3CommandOutput , } from "../commands/RestoreDBClusterFromS3Command" ; import { RestoreDBClusterFromSnapshotCommandInput , RestoreDBClusterFromSnapshotCommandOutput , } from "../commands/RestoreDBClusterFromSnapshotCommand" ; import { RestoreDBClusterToPointInTimeCommandInput , RestoreDBClusterToPointInTimeCommandOutput , } from "../commands/RestoreDBClusterToPointInTimeCommand" ; import { RestoreDBInstanceFromDBSnapshotCommandInput , RestoreDBInstanceFromDBSnapshotCommandOutput , } from "../commands/RestoreDBInstanceFromDBSnapshotCommand" ; import { RestoreDBInstanceFromS3CommandInput , RestoreDBInstanceFromS3CommandOutput , } from "../commands/RestoreDBInstanceFromS3Command" ; import { RestoreDBInstanceToPointInTimeCommandInput , RestoreDBInstanceToPointInTimeCommandOutput , } from "../commands/RestoreDBInstanceToPointInTimeCommand" ; import { RevokeDBSecurityGroupIngressCommandInput , RevokeDBSecurityGroupIngressCommandOutput , } from "../commands/RevokeDBSecurityGroupIngressCommand" ; import { StartActivityStreamCommandInput , StartActivityStreamCommandOutput , } from "../commands/StartActivityStreamCommand" ; import { StartDBClusterCommandInput , StartDBClusterCommandOutput } from "../commands/StartDBClusterCommand" ; import { StartDBInstanceAutomatedBackupsReplicationCommandInput , StartDBInstanceAutomatedBackupsReplicationCommandOutput , } from "../commands/StartDBInstanceAutomatedBackupsReplicationCommand" ; import { StartDBInstanceCommandInput , StartDBInstanceCommandOutput } from "../commands/StartDBInstanceCommand" ; import { StartExportTaskCommandInput , StartExportTaskCommandOutput } from "../commands/StartExportTaskCommand" ; import { StopActivityStreamCommandInput , StopActivityStreamCommandOutput } from "../commands/StopActivityStreamCommand" ; import { StopDBClusterCommandInput , StopDBClusterCommandOutput } from "../commands/StopDBClusterCommand" ; import { StopDBInstanceAutomatedBackupsReplicationCommandInput , StopDBInstanceAutomatedBackupsReplicationCommandOutput , } from "../commands/StopDBInstanceAutomatedBackupsReplicationCommand" ; import { StopDBInstanceCommandInput , StopDBInstanceCommandOutput } from "../commands/StopDBInstanceCommand" ; import { AccountAttributesMessage , AccountQuota , AddRoleToDBClusterMessage , AddRoleToDBInstanceMessage , AddSourceIdentifierToSubscriptionMessage , AddSourceIdentifierToSubscriptionResult , AddTagsToResourceMessage , ApplyPendingMaintenanceActionMessage , ApplyPendingMaintenanceActionResult , AuthorizationAlreadyExistsFault , AuthorizationNotFoundFault , AuthorizationQuotaExceededFault , AuthorizeDBSecurityGroupIngressMessage , AuthorizeDBSecurityGroupIngressResult , AvailabilityZone , BacktrackDBClusterMessage , BackupPolicyNotFoundFault , CancelExportTaskMessage , Certificate , CertificateMessage , CertificateNotFoundFault , CharacterSet , ClusterPendingModifiedValues , ConnectionPoolConfigurationInfo , CopyDBClusterParameterGroupMessage , CopyDBClusterParameterGroupResult , CopyDBClusterSnapshotMessage , CopyDBClusterSnapshotResult , CopyDBParameterGroupMessage , CopyDBParameterGroupResult , CopyDBSnapshotMessage , CopyDBSnapshotResult , CopyOptionGroupMessage , CopyOptionGroupResult , CreateCustomAvailabilityZoneMessage , CreateCustomAvailabilityZoneResult , CreateCustomDBEngineVersionMessage , CreateDBClusterEndpointMessage , CreateDBClusterMessage , CreateDBClusterParameterGroupMessage , CreateDBClusterParameterGroupResult , CreateDBClusterResult , CreateDBClusterSnapshotMessage , CreateDBClusterSnapshotResult , CreateDBInstanceMessage , CreateDBInstanceReadReplicaMessage , CreateDBInstanceReadReplicaResult , CreateDBInstanceResult , CreateDBParameterGroupMessage , CreateDBParameterGroupResult , CreateDBProxyEndpointRequest , CreateDBProxyEndpointResponse , CreateDBProxyRequest , CreateDBProxyResponse , CreateDBSecurityGroupMessage , CreateDBSecurityGroupResult , CreateDBSnapshotMessage , CreateDBSnapshotResult , CreateDBSubnetGroupMessage , CreateDBSubnetGroupResult , CreateEventSubscriptionMessage , CreateEventSubscriptionResult , CreateGlobalClusterMessage , CreateGlobalClusterResult , CreateOptionGroupMessage , CreateOptionGroupResult , CustomAvailabilityZone , CustomAvailabilityZoneAlreadyExistsFault , CustomAvailabilityZoneMessage , CustomAvailabilityZoneNotFoundFault , CustomAvailabilityZoneQuotaExceededFault , CustomDBEngineVersionAlreadyExistsFault , CustomDBEngineVersionNotFoundFault , CustomDBEngineVersionQuotaExceededFault , DBCluster , DBClusterAlreadyExistsFault , DBClusterBacktrack , DBClusterBacktrackMessage , DBClusterBacktrackNotFoundFault , DBClusterEndpoint , DBClusterEndpointAlreadyExistsFault , DBClusterEndpointMessage , DBClusterEndpointNotFoundFault , DBClusterEndpointQuotaExceededFault , DBClusterMember , DBClusterMessage , DBClusterNotFoundFault , DBClusterOptionGroupStatus , DBClusterParameterGroup , DBClusterParameterGroupDetails , DBClusterParameterGroupNotFoundFault , DBClusterParameterGroupsMessage , DBClusterQuotaExceededFault , DBClusterRole , DBClusterRoleAlreadyExistsFault , DBClusterRoleQuotaExceededFault , DBClusterSnapshot , DBClusterSnapshotAlreadyExistsFault , DBClusterSnapshotAttribute , DBClusterSnapshotAttributesResult , DBClusterSnapshotMessage , DBClusterSnapshotNotFoundFault , DBEngineVersion , DBEngineVersionMessage , DBInstance , DBInstanceAlreadyExistsFault , DBInstanceAutomatedBackup , DBInstanceAutomatedBackupMessage , DBInstanceAutomatedBackupNotFoundFault , DBInstanceAutomatedBackupQuotaExceededFault , DBInstanceAutomatedBackupsReplication , DBInstanceMessage , DBInstanceNotFoundFault , DBInstanceRole , DBInstanceRoleAlreadyExistsFault , DBInstanceRoleQuotaExceededFault , DBInstanceStatusInfo , DBParameterGroup , DBParameterGroupAlreadyExistsFault , DBParameterGroupDetails , DBParameterGroupNotFoundFault , DBParameterGroupQuotaExceededFault , DBParameterGroupsMessage , DBParameterGroupStatus , DBProxy , DBProxyAlreadyExistsFault , DBProxyEndpoint , DBProxyEndpointAlreadyExistsFault , DBProxyEndpointNotFoundFault , DBProxyEndpointQuotaExceededFault , DBProxyNotFoundFault , DBProxyQuotaExceededFault , DBProxyTargetGroup , DBProxyTargetGroupNotFoundFault , DBProxyTargetNotFoundFault , DBSecurityGroup , DBSecurityGroupAlreadyExistsFault , DBSecurityGroupMembership , DBSecurityGroupNotFoundFault , DBSecurityGroupNotSupportedFault , DBSecurityGroupQuotaExceededFault , DBSnapshot , DBSnapshotAlreadyExistsFault , DBSnapshotNotFoundFault , DBSubnetGroup , DBSubnetGroupAlreadyExistsFault , DBSubnetGroupDoesNotCoverEnoughAZs , DBSubnetGroupNotAllowedFault , DBSubnetGroupNotFoundFault , DBSubnetGroupQuotaExceededFault , DBSubnetQuotaExceededFault , DeleteCustomAvailabilityZoneMessage , DeleteCustomAvailabilityZoneResult , DeleteCustomDBEngineVersionMessage , DeleteDBClusterEndpointMessage , DeleteDBClusterMessage , DeleteDBClusterParameterGroupMessage , DeleteDBClusterResult , DeleteDBClusterSnapshotMessage , DeleteDBClusterSnapshotResult , DeleteDBInstanceAutomatedBackupMessage , DeleteDBInstanceAutomatedBackupResult , DeleteDBInstanceMessage , DeleteDBInstanceResult , DeleteDBParameterGroupMessage , DeleteDBProxyEndpointRequest , DeleteDBProxyEndpointResponse , DeleteDBProxyRequest , DeleteDBProxyResponse , DeleteDBSecurityGroupMessage , DeleteDBSnapshotMessage , DeleteDBSnapshotResult , DeleteDBSubnetGroupMessage , DeleteEventSubscriptionMessage , DeleteEventSubscriptionResult , DeleteGlobalClusterMessage , DeleteGlobalClusterResult , DeleteInstallationMediaMessage , DeleteOptionGroupMessage , DeregisterDBProxyTargetsRequest , DeregisterDBProxyTargetsResponse , DescribeAccountAttributesMessage , DescribeCertificatesMessage , DescribeCustomAvailabilityZonesMessage , DescribeDBClusterBacktracksMessage , DescribeDBClusterEndpointsMessage , DescribeDBClusterParameterGroupsMessage , DescribeDBClusterParametersMessage , DescribeDBClustersMessage , DescribeDBClusterSnapshotAttributesMessage , DescribeDBClusterSnapshotAttributesResult , DescribeDBClusterSnapshotsMessage , DescribeDBEngineVersionsMessage , DescribeDBInstanceAutomatedBackupsMessage , DescribeDBInstancesMessage , DescribeDBLogFilesDetails , DescribeDBLogFilesMessage , DescribeDBLogFilesResponse , DescribeDBParameterGroupsMessage , DescribeDBParametersMessage , DescribeDBProxiesRequest , DescribeDBProxiesResponse , DescribeDBProxyEndpointsRequest , DescribeDBProxyEndpointsResponse , DescribeDBProxyTargetGroupsRequest , DescribeDBProxyTargetGroupsResponse , DescribeDBProxyTargetsRequest , DomainMembership , DomainNotFoundFault , EC2SecurityGroup , Endpoint , EventSubscription , EventSubscriptionQuotaExceededFault , ExportTask , ExportTaskNotFoundFault , FailoverState , Filter , GlobalCluster , GlobalClusterAlreadyExistsFault , GlobalClusterMember , GlobalClusterNotFoundFault , GlobalClusterQuotaExceededFault , InstallationMedia , InstallationMediaFailureCause , InstallationMediaNotFoundFault , InstanceQuotaExceededFault , InsufficientDBInstanceCapacityFault , InsufficientStorageClusterCapacityFault , InvalidCustomDBEngineVersionStateFault , InvalidDBClusterEndpointStateFault , InvalidDBClusterSnapshotStateFault , InvalidDBClusterStateFault , InvalidDBInstanceAutomatedBackupStateFault , InvalidDBInstanceStateFault , InvalidDBParameterGroupStateFault , InvalidDBProxyEndpointStateFault , InvalidDBProxyStateFault , InvalidDBSecurityGroupStateFault , InvalidDBSnapshotStateFault , InvalidDBSubnetGroupFault , InvalidDBSubnetGroupStateFault , InvalidDBSubnetStateFault , InvalidEventSubscriptionStateFault , InvalidExportTaskStateFault , InvalidGlobalClusterStateFault , InvalidOptionGroupStateFault , InvalidSubnet , InvalidVPCNetworkStateFault , IPRange , KMSKeyNotAccessibleFault , Option , OptionGroup , OptionGroupAlreadyExistsFault , OptionGroupMembership , OptionGroupNotFoundFault , OptionGroupQuotaExceededFault , OptionSetting , Outpost , Parameter , PendingCloudwatchLogsExports , PendingMaintenanceAction , PendingModifiedValues , ProcessorFeature , ProvisionedIopsNotAvailableInAZFault , ResourceNotFoundFault , ResourcePendingMaintenanceActions , RestoreWindow , ScalingConfiguration , ScalingConfigurationInfo , SnapshotQuotaExceededFault , SNSInvalidTopicFault , SNSNoAuthorizationFault , SNSTopicArnNotFoundFault , SourceNotFoundFault , StorageQuotaExceededFault , StorageTypeNotSupportedFault , Subnet , SubscriptionAlreadyExistFault , SubscriptionCategoryNotFoundFault , SubscriptionNotFoundFault , Tag , Timezone , UpgradeTarget , UserAuthConfig , UserAuthConfigInfo , VpcSecurityGroupMembership , VpnDetails , } from "../models/models_0" ; import { AvailableProcessorFeature , CloudwatchLogsExportConfiguration , ConnectionPoolConfiguration , DBClusterCapacityInfo , DBClusterParameterGroupNameMessage , DBClusterRoleNotFoundFault , DBInstanceRoleNotFoundFault , DBLogFileNotFoundFault , DBParameterGroupNameMessage , DBProxyTarget , DBProxyTargetAlreadyRegisteredFault , DBSecurityGroupMessage , DBSnapshotAttribute , DBSnapshotAttributesResult , DBSnapshotMessage , DBSubnetGroupMessage , DBUpgradeDependencyFailureFault , DescribeDBProxyTargetsResponse , DescribeDBSecurityGroupsMessage , DescribeDBSnapshotAttributesMessage , DescribeDBSnapshotAttributesResult , DescribeDBSnapshotsMessage , DescribeDBSubnetGroupsMessage , DescribeEngineDefaultClusterParametersMessage , DescribeEngineDefaultClusterParametersResult , DescribeEngineDefaultParametersMessage , DescribeEngineDefaultParametersResult , DescribeEventCategoriesMessage , DescribeEventsMessage , DescribeEventSubscriptionsMessage , DescribeExportTasksMessage , DescribeGlobalClustersMessage , DescribeInstallationMediaMessage , DescribeOptionGroupOptionsMessage , DescribeOptionGroupsMessage , DescribeOrderableDBInstanceOptionsMessage , DescribePendingMaintenanceActionsMessage , DescribeReservedDBInstancesMessage , DescribeReservedDBInstancesOfferingsMessage , DescribeSourceRegionsMessage , DescribeValidDBInstanceModificationsMessage , DescribeValidDBInstanceModificationsResult , DoubleRange , DownloadDBLogFilePortionDetails , DownloadDBLogFilePortionMessage , EngineDefaults , Event , EventCategoriesMap , EventCategoriesMessage , EventsMessage , EventSubscriptionsMessage , ExportTaskAlreadyExistsFault , ExportTasksMessage , FailoverDBClusterMessage , FailoverDBClusterResult , FailoverGlobalClusterMessage , FailoverGlobalClusterResult , GlobalClustersMessage , IamRoleMissingPermissionsFault , IamRoleNotFoundFault , ImportInstallationMediaMessage , InstallationMediaAlreadyExistsFault , InstallationMediaMessage , InsufficientAvailableIPsInSubnetFault , InsufficientDBClusterCapacityFault , InvalidDBClusterCapacityFault , InvalidExportOnlyFault , InvalidExportSourceStateFault , InvalidRestoreFault , InvalidS3BucketFault , ListTagsForResourceMessage , MinimumEngineVersionPerAllowedValue , ModifyCertificatesMessage , ModifyCertificatesResult , ModifyCurrentDBClusterCapacityMessage , ModifyCustomDBEngineVersionMessage , ModifyDBClusterEndpointMessage , ModifyDBClusterMessage , ModifyDBClusterParameterGroupMessage , ModifyDBClusterResult , ModifyDBClusterSnapshotAttributeMessage , ModifyDBClusterSnapshotAttributeResult , ModifyDBInstanceMessage , ModifyDBInstanceResult , ModifyDBParameterGroupMessage , ModifyDBProxyEndpointRequest , ModifyDBProxyEndpointResponse , ModifyDBProxyRequest , ModifyDBProxyResponse , ModifyDBProxyTargetGroupRequest , ModifyDBProxyTargetGroupResponse , ModifyDBSnapshotAttributeMessage , ModifyDBSnapshotAttributeResult , ModifyDBSnapshotMessage , ModifyDBSnapshotResult , ModifyDBSubnetGroupMessage , ModifyDBSubnetGroupResult , ModifyEventSubscriptionMessage , ModifyEventSubscriptionResult , ModifyGlobalClusterMessage , ModifyGlobalClusterResult , ModifyOptionGroupMessage , ModifyOptionGroupResult , OptionConfiguration , OptionGroupOption , OptionGroupOptionSetting , OptionGroupOptionsMessage , OptionGroups , OptionVersion , OrderableDBInstanceOption , OrderableDBInstanceOptionsMessage , PendingMaintenanceActionsMessage , PointInTimeRestoreNotEnabledFault , PromoteReadReplicaDBClusterMessage , PromoteReadReplicaDBClusterResult , PromoteReadReplicaMessage , PromoteReadReplicaResult , PurchaseReservedDBInstancesOfferingMessage , PurchaseReservedDBInstancesOfferingResult , Range , RebootDBClusterMessage , RebootDBClusterResult , RebootDBInstanceMessage , RebootDBInstanceResult , RecurringCharge , RegisterDBProxyTargetsRequest , RegisterDBProxyTargetsResponse , RemoveFromGlobalClusterMessage , RemoveFromGlobalClusterResult , RemoveRoleFromDBClusterMessage , RemoveRoleFromDBInstanceMessage , RemoveSourceIdentifierFromSubscriptionMessage , RemoveSourceIdentifierFromSubscriptionResult , RemoveTagsFromResourceMessage , ReservedDBInstance , ReservedDBInstanceAlreadyExistsFault , ReservedDBInstanceMessage , ReservedDBInstanceNotFoundFault , ReservedDBInstanceQuotaExceededFault , ReservedDBInstancesOffering , ReservedDBInstancesOfferingMessage , ReservedDBInstancesOfferingNotFoundFault , ResetDBClusterParameterGroupMessage , ResetDBParameterGroupMessage , RestoreDBClusterFromS3Message , RestoreDBClusterFromS3Result , RestoreDBClusterFromSnapshotMessage , RestoreDBClusterFromSnapshotResult , RestoreDBClusterToPointInTimeMessage , RestoreDBClusterToPointInTimeResult , RestoreDBInstanceFromDBSnapshotMessage , RestoreDBInstanceFromDBSnapshotResult , RestoreDBInstanceFromS3Message , RestoreDBInstanceFromS3Result , RestoreDBInstanceToPointInTimeMessage , RestoreDBInstanceToPointInTimeResult , RevokeDBSecurityGroupIngressMessage , RevokeDBSecurityGroupIngressResult , SharedSnapshotQuotaExceededFault , SourceRegion , SourceRegionMessage , StartActivityStreamRequest , StartActivityStreamResponse , StartDBClusterMessage , StartDBClusterResult , StartDBInstanceAutomatedBackupsReplicationMessage , StartDBInstanceAutomatedBackupsReplicationResult , StartDBInstanceMessage , StartDBInstanceResult , StartExportTaskMessage , StopActivityStreamRequest , StopActivityStreamResponse , StopDBClusterMessage , StopDBClusterResult , StopDBInstanceAutomatedBackupsReplicationMessage , StopDBInstanceAutomatedBackupsReplicationResult , StopDBInstanceMessage , StopDBInstanceResult , SubnetAlreadyInUse , TagListMessage , TargetHealth , ValidDBInstanceModificationsMessage , ValidStorageOptions , } from "../models/models_1" ; export const serializeAws_queryAddRoleToDBClusterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryAddRoleToDBClusterMessage ( input , context ) , Action : "AddRoleToDBCluster" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryAddRoleToDBInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryAddRoleToDBInstanceMessage ( input , context ) , Action : "AddRoleToDBInstance" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryAddSourceIdentifierToSubscriptionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryAddSourceIdentifierToSubscriptionMessage ( input , context ) , Action : "AddSourceIdentifierToSubscription" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryAddTagsToResourceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryAddTagsToResourceMessage ( input , context ) , Action : "AddTagsToResource" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryApplyPendingMaintenanceActionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryApplyPendingMaintenanceActionMessage ( input , context ) , Action : "ApplyPendingMaintenanceAction" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryAuthorizeDBSecurityGroupIngressCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryAuthorizeDBSecurityGroupIngressMessage ( input , context ) , Action : "AuthorizeDBSecurityGroupIngress" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryBacktrackDBClusterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryBacktrackDBClusterMessage ( input , context ) , Action : "BacktrackDBCluster" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCancelExportTaskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCancelExportTaskMessage ( input , context ) , Action : "CancelExportTask" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCopyDBClusterParameterGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCopyDBClusterParameterGroupMessage ( input , context ) , Action : "CopyDBClusterParameterGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCopyDBClusterSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCopyDBClusterSnapshotMessage ( input , context ) , Action : "CopyDBClusterSnapshot" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCopyDBParameterGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCopyDBParameterGroupMessage ( input , context ) , Action : "CopyDBParameterGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCopyDBSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCopyDBSnapshotMessage ( input , context ) , Action : "CopyDBSnapshot" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCopyOptionGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCopyOptionGroupMessage ( input , context ) , Action : "CopyOptionGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateCustomAvailabilityZoneCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateCustomAvailabilityZoneMessage ( input , context ) , Action : "CreateCustomAvailabilityZone" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateCustomDBEngineVersionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateCustomDBEngineVersionMessage ( input , context ) , Action : "CreateCustomDBEngineVersion" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateDBClusterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateDBClusterMessage ( input , context ) , Action : "CreateDBCluster" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateDBClusterEndpointCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateDBClusterEndpointMessage ( input , context ) , Action : "CreateDBClusterEndpoint" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateDBClusterParameterGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateDBClusterParameterGroupMessage ( input , context ) , Action : "CreateDBClusterParameterGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateDBClusterSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateDBClusterSnapshotMessage ( input , context ) , Action : "CreateDBClusterSnapshot" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateDBInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateDBInstanceMessage ( input , context ) , Action : "CreateDBInstance" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateDBInstanceReadReplicaCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateDBInstanceReadReplicaMessage ( input , context ) , Action : "CreateDBInstanceReadReplica" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateDBParameterGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateDBParameterGroupMessage ( input , context ) , Action : "CreateDBParameterGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateDBProxyCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateDBProxyRequest ( input , context ) , Action : "CreateDBProxy" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateDBProxyEndpointCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateDBProxyEndpointRequest ( input , context ) , Action : "CreateDBProxyEndpoint" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateDBSecurityGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateDBSecurityGroupMessage ( input , context ) , Action : "CreateDBSecurityGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateDBSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateDBSnapshotMessage ( input , context ) , Action : "CreateDBSnapshot" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateDBSubnetGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateDBSubnetGroupMessage ( input , context ) , Action : "CreateDBSubnetGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateEventSubscriptionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateEventSubscriptionMessage ( input , context ) , Action : "CreateEventSubscription" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateGlobalClusterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateGlobalClusterMessage ( input , context ) , Action : "CreateGlobalCluster" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryCreateOptionGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryCreateOptionGroupMessage ( input , context ) , Action : "CreateOptionGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteCustomAvailabilityZoneCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteCustomAvailabilityZoneMessage ( input , context ) , Action : "DeleteCustomAvailabilityZone" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteCustomDBEngineVersionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteCustomDBEngineVersionMessage ( input , context ) , Action : "DeleteCustomDBEngineVersion" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteDBClusterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteDBClusterMessage ( input , context ) , Action : "DeleteDBCluster" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteDBClusterEndpointCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteDBClusterEndpointMessage ( input , context ) , Action : "DeleteDBClusterEndpoint" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteDBClusterParameterGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteDBClusterParameterGroupMessage ( input , context ) , Action : "DeleteDBClusterParameterGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteDBClusterSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteDBClusterSnapshotMessage ( input , context ) , Action : "DeleteDBClusterSnapshot" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteDBInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteDBInstanceMessage ( input , context ) , Action : "DeleteDBInstance" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteDBInstanceAutomatedBackupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteDBInstanceAutomatedBackupMessage ( input , context ) , Action : "DeleteDBInstanceAutomatedBackup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteDBParameterGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteDBParameterGroupMessage ( input , context ) , Action : "DeleteDBParameterGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteDBProxyCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteDBProxyRequest ( input , context ) , Action : "DeleteDBProxy" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteDBProxyEndpointCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteDBProxyEndpointRequest ( input , context ) , Action : "DeleteDBProxyEndpoint" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteDBSecurityGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteDBSecurityGroupMessage ( input , context ) , Action : "DeleteDBSecurityGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteDBSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteDBSnapshotMessage ( input , context ) , Action : "DeleteDBSnapshot" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteDBSubnetGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteDBSubnetGroupMessage ( input , context ) , Action : "DeleteDBSubnetGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteEventSubscriptionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteEventSubscriptionMessage ( input , context ) , Action : "DeleteEventSubscription" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteGlobalClusterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteGlobalClusterMessage ( input , context ) , Action : "DeleteGlobalCluster" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteInstallationMediaCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteInstallationMediaMessage ( input , context ) , Action : "DeleteInstallationMedia" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeleteOptionGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeleteOptionGroupMessage ( input , context ) , Action : "DeleteOptionGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDeregisterDBProxyTargetsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDeregisterDBProxyTargetsRequest ( input , context ) , Action : "DeregisterDBProxyTargets" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeAccountAttributesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeAccountAttributesMessage ( input , context ) , Action : "DescribeAccountAttributes" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeCertificatesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeCertificatesMessage ( input , context ) , Action : "DescribeCertificates" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeCustomAvailabilityZonesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeCustomAvailabilityZonesMessage ( input , context ) , Action : "DescribeCustomAvailabilityZones" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBClusterBacktracksCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBClusterBacktracksMessage ( input , context ) , Action : "DescribeDBClusterBacktracks" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBClusterEndpointsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBClusterEndpointsMessage ( input , context ) , Action : "DescribeDBClusterEndpoints" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBClusterParameterGroupsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBClusterParameterGroupsMessage ( input , context ) , Action : "DescribeDBClusterParameterGroups" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBClusterParametersCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBClusterParametersMessage ( input , context ) , Action : "DescribeDBClusterParameters" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBClustersCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBClustersMessage ( input , context ) , Action : "DescribeDBClusters" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBClusterSnapshotAttributesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBClusterSnapshotAttributesMessage ( input , context ) , Action : "DescribeDBClusterSnapshotAttributes" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBClusterSnapshotsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBClusterSnapshotsMessage ( input , context ) , Action : "DescribeDBClusterSnapshots" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBEngineVersionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBEngineVersionsMessage ( input , context ) , Action : "DescribeDBEngineVersions" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBInstanceAutomatedBackupsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBInstanceAutomatedBackupsMessage ( input , context ) , Action : "DescribeDBInstanceAutomatedBackups" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBInstancesMessage ( input , context ) , Action : "DescribeDBInstances" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBLogFilesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBLogFilesMessage ( input , context ) , Action : "DescribeDBLogFiles" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBParameterGroupsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBParameterGroupsMessage ( input , context ) , Action : "DescribeDBParameterGroups" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBParametersCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBParametersMessage ( input , context ) , Action : "DescribeDBParameters" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBProxiesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBProxiesRequest ( input , context ) , Action : "DescribeDBProxies" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBProxyEndpointsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBProxyEndpointsRequest ( input , context ) , Action : "DescribeDBProxyEndpoints" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBProxyTargetGroupsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBProxyTargetGroupsRequest ( input , context ) , Action : "DescribeDBProxyTargetGroups" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBProxyTargetsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBProxyTargetsRequest ( input , context ) , Action : "DescribeDBProxyTargets" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBSecurityGroupsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBSecurityGroupsMessage ( input , context ) , Action : "DescribeDBSecurityGroups" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBSnapshotAttributesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBSnapshotAttributesMessage ( input , context ) , Action : "DescribeDBSnapshotAttributes" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBSnapshotsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBSnapshotsMessage ( input , context ) , Action : "DescribeDBSnapshots" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeDBSubnetGroupsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeDBSubnetGroupsMessage ( input , context ) , Action : "DescribeDBSubnetGroups" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeEngineDefaultClusterParametersCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeEngineDefaultClusterParametersMessage ( input , context ) , Action : "DescribeEngineDefaultClusterParameters" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeEngineDefaultParametersCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeEngineDefaultParametersMessage ( input , context ) , Action : "DescribeEngineDefaultParameters" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeEventCategoriesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeEventCategoriesMessage ( input , context ) , Action : "DescribeEventCategories" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeEventsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeEventsMessage ( input , context ) , Action : "DescribeEvents" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeEventSubscriptionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeEventSubscriptionsMessage ( input , context ) , Action : "DescribeEventSubscriptions" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeExportTasksCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeExportTasksMessage ( input , context ) , Action : "DescribeExportTasks" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeGlobalClustersCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeGlobalClustersMessage ( input , context ) , Action : "DescribeGlobalClusters" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeInstallationMediaCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeInstallationMediaMessage ( input , context ) , Action : "DescribeInstallationMedia" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeOptionGroupOptionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeOptionGroupOptionsMessage ( input , context ) , Action : "DescribeOptionGroupOptions" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeOptionGroupsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeOptionGroupsMessage ( input , context ) , Action : "DescribeOptionGroups" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeOrderableDBInstanceOptionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeOrderableDBInstanceOptionsMessage ( input , context ) , Action : "DescribeOrderableDBInstanceOptions" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribePendingMaintenanceActionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribePendingMaintenanceActionsMessage ( input , context ) , Action : "DescribePendingMaintenanceActions" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeReservedDBInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeReservedDBInstancesMessage ( input , context ) , Action : "DescribeReservedDBInstances" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeReservedDBInstancesOfferingsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeReservedDBInstancesOfferingsMessage ( input , context ) , Action : "DescribeReservedDBInstancesOfferings" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeSourceRegionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeSourceRegionsMessage ( input , context ) , Action : "DescribeSourceRegions" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDescribeValidDBInstanceModificationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDescribeValidDBInstanceModificationsMessage ( input , context ) , Action : "DescribeValidDBInstanceModifications" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryDownloadDBLogFilePortionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryDownloadDBLogFilePortionMessage ( input , context ) , Action : "DownloadDBLogFilePortion" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryFailoverDBClusterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryFailoverDBClusterMessage ( input , context ) , Action : "FailoverDBCluster" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryFailoverGlobalClusterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryFailoverGlobalClusterMessage ( input , context ) , Action : "FailoverGlobalCluster" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryImportInstallationMediaCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryImportInstallationMediaMessage ( input , context ) , Action : "ImportInstallationMedia" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryListTagsForResourceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryListTagsForResourceMessage ( input , context ) , Action : "ListTagsForResource" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyCertificatesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyCertificatesMessage ( input , context ) , Action : "ModifyCertificates" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyCurrentDBClusterCapacityCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyCurrentDBClusterCapacityMessage ( input , context ) , Action : "ModifyCurrentDBClusterCapacity" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyCustomDBEngineVersionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyCustomDBEngineVersionMessage ( input , context ) , Action : "ModifyCustomDBEngineVersion" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyDBClusterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyDBClusterMessage ( input , context ) , Action : "ModifyDBCluster" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyDBClusterEndpointCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyDBClusterEndpointMessage ( input , context ) , Action : "ModifyDBClusterEndpoint" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyDBClusterParameterGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyDBClusterParameterGroupMessage ( input , context ) , Action : "ModifyDBClusterParameterGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyDBClusterSnapshotAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyDBClusterSnapshotAttributeMessage ( input , context ) , Action : "ModifyDBClusterSnapshotAttribute" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyDBInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyDBInstanceMessage ( input , context ) , Action : "ModifyDBInstance" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyDBParameterGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyDBParameterGroupMessage ( input , context ) , Action : "ModifyDBParameterGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyDBProxyCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyDBProxyRequest ( input , context ) , Action : "ModifyDBProxy" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyDBProxyEndpointCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyDBProxyEndpointRequest ( input , context ) , Action : "ModifyDBProxyEndpoint" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyDBProxyTargetGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyDBProxyTargetGroupRequest ( input , context ) , Action : "ModifyDBProxyTargetGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyDBSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyDBSnapshotMessage ( input , context ) , Action : "ModifyDBSnapshot" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyDBSnapshotAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyDBSnapshotAttributeMessage ( input , context ) , Action : "ModifyDBSnapshotAttribute" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyDBSubnetGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyDBSubnetGroupMessage ( input , context ) , Action : "ModifyDBSubnetGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyEventSubscriptionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyEventSubscriptionMessage ( input , context ) , Action : "ModifyEventSubscription" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyGlobalClusterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyGlobalClusterMessage ( input , context ) , Action : "ModifyGlobalCluster" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryModifyOptionGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryModifyOptionGroupMessage ( input , context ) , Action : "ModifyOptionGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryPromoteReadReplicaCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryPromoteReadReplicaMessage ( input , context ) , Action : "PromoteReadReplica" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryPromoteReadReplicaDBClusterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryPromoteReadReplicaDBClusterMessage ( input , context ) , Action : "PromoteReadReplicaDBCluster" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryPurchaseReservedDBInstancesOfferingCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryPurchaseReservedDBInstancesOfferingMessage ( input , context ) , Action : "PurchaseReservedDBInstancesOffering" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryRebootDBClusterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryRebootDBClusterMessage ( input , context ) , Action : "RebootDBCluster" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryRebootDBInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryRebootDBInstanceMessage ( input , context ) , Action : "RebootDBInstance" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryRegisterDBProxyTargetsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryRegisterDBProxyTargetsRequest ( input , context ) , Action : "RegisterDBProxyTargets" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryRemoveFromGlobalClusterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryRemoveFromGlobalClusterMessage ( input , context ) , Action : "RemoveFromGlobalCluster" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryRemoveRoleFromDBClusterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryRemoveRoleFromDBClusterMessage ( input , context ) , Action : "RemoveRoleFromDBCluster" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryRemoveRoleFromDBInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryRemoveRoleFromDBInstanceMessage ( input , context ) , Action : "RemoveRoleFromDBInstance" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryRemoveSourceIdentifierFromSubscriptionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryRemoveSourceIdentifierFromSubscriptionMessage ( input , context ) , Action : "RemoveSourceIdentifierFromSubscription" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryRemoveTagsFromResourceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryRemoveTagsFromResourceMessage ( input , context ) , Action : "RemoveTagsFromResource" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryResetDBClusterParameterGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryResetDBClusterParameterGroupMessage ( input , context ) , Action : "ResetDBClusterParameterGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryResetDBParameterGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryResetDBParameterGroupMessage ( input , context ) , Action : "ResetDBParameterGroup" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryRestoreDBClusterFromS3Command = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryRestoreDBClusterFromS3Message ( input , context ) , Action : "RestoreDBClusterFromS3" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryRestoreDBClusterFromSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryRestoreDBClusterFromSnapshotMessage ( input , context ) , Action : "RestoreDBClusterFromSnapshot" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryRestoreDBClusterToPointInTimeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryRestoreDBClusterToPointInTimeMessage ( input , context ) , Action : "RestoreDBClusterToPointInTime" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryRestoreDBInstanceFromDBSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryRestoreDBInstanceFromDBSnapshotMessage ( input , context ) , Action : "RestoreDBInstanceFromDBSnapshot" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryRestoreDBInstanceFromS3Command = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryRestoreDBInstanceFromS3Message ( input , context ) , Action : "RestoreDBInstanceFromS3" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryRestoreDBInstanceToPointInTimeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryRestoreDBInstanceToPointInTimeMessage ( input , context ) , Action : "RestoreDBInstanceToPointInTime" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryRevokeDBSecurityGroupIngressCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryRevokeDBSecurityGroupIngressMessage ( input , context ) , Action : "RevokeDBSecurityGroupIngress" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryStartActivityStreamCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryStartActivityStreamRequest ( input , context ) , Action : "StartActivityStream" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryStartDBClusterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryStartDBClusterMessage ( input , context ) , Action : "StartDBCluster" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryStartDBInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryStartDBInstanceMessage ( input , context ) , Action : "StartDBInstance" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryStartDBInstanceAutomatedBackupsReplicationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryStartDBInstanceAutomatedBackupsReplicationMessage ( input , context ) , Action : "StartDBInstanceAutomatedBackupsReplication" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryStartExportTaskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryStartExportTaskMessage ( input , context ) , Action : "StartExportTask" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryStopActivityStreamCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryStopActivityStreamRequest ( input , context ) , Action : "StopActivityStream" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryStopDBClusterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryStopDBClusterMessage ( input , context ) , Action : "StopDBCluster" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryStopDBInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryStopDBInstanceMessage ( input , context ) , Action : "StopDBInstance" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_queryStopDBInstanceAutomatedBackupsReplicationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_queryStopDBInstanceAutomatedBackupsReplicationMessage ( input , context ) , Action : "StopDBInstanceAutomatedBackupsReplication" , Version : "2014-10-31" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const deserializeAws_queryAddRoleToDBClusterCommand = async ( output , context ) : Promise < AddRoleToDBClusterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryAddRoleToDBClusterCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryAddRoleToDBClusterCommandError = async ( output , context ) : Promise < AddRoleToDBClusterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterRoleAlreadyExistsFault" : case "com.amazonaws.rds#DBClusterRoleAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBClusterRoleAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterRoleQuotaExceededFault" : case "com.amazonaws.rds#DBClusterRoleQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBClusterRoleQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryAddRoleToDBInstanceCommand = async ( output , context ) : Promise < AddRoleToDBInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryAddRoleToDBInstanceCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryAddRoleToDBInstanceCommandError = async ( output , context ) : Promise < AddRoleToDBInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceRoleAlreadyExistsFault" : case "com.amazonaws.rds#DBInstanceRoleAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBInstanceRoleAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceRoleQuotaExceededFault" : case "com.amazonaws.rds#DBInstanceRoleQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBInstanceRoleQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryAddSourceIdentifierToSubscriptionCommand = async ( output , context ) : Promise < AddSourceIdentifierToSubscriptionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryAddSourceIdentifierToSubscriptionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryAddSourceIdentifierToSubscriptionResult ( data . AddSourceIdentifierToSubscriptionResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryAddSourceIdentifierToSubscriptionCommandError = async ( output , context ) : Promise < AddSourceIdentifierToSubscriptionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "SourceNotFoundFault" : case "com.amazonaws.rds#SourceNotFoundFault" : response = { ... ( await deserializeAws_querySourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SubscriptionNotFoundFault" : case "com.amazonaws.rds#SubscriptionNotFoundFault" : response = { ... ( await deserializeAws_querySubscriptionNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryAddTagsToResourceCommand = async ( output , context ) : Promise < AddTagsToResourceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryAddTagsToResourceCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryAddTagsToResourceCommandError = async ( output , context ) : Promise < AddTagsToResourceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyNotFoundFault" : case "com.amazonaws.rds#DBProxyNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyTargetGroupNotFoundFault" : case "com.amazonaws.rds#DBProxyTargetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyTargetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSnapshotNotFoundFault" : case "com.amazonaws.rds#DBSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryApplyPendingMaintenanceActionCommand = async ( output , context ) : Promise < ApplyPendingMaintenanceActionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryApplyPendingMaintenanceActionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryApplyPendingMaintenanceActionResult ( data . ApplyPendingMaintenanceActionResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryApplyPendingMaintenanceActionCommandError = async ( output , context ) : Promise < ApplyPendingMaintenanceActionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.rds#ResourceNotFoundFault" : response = { ... ( await deserializeAws_queryResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryAuthorizeDBSecurityGroupIngressCommand = async ( output , context ) : Promise < AuthorizeDBSecurityGroupIngressCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryAuthorizeDBSecurityGroupIngressCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryAuthorizeDBSecurityGroupIngressResult ( data . AuthorizeDBSecurityGroupIngressResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryAuthorizeDBSecurityGroupIngressCommandError = async ( output , context ) : Promise < AuthorizeDBSecurityGroupIngressCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AuthorizationAlreadyExistsFault" : case "com.amazonaws.rds#AuthorizationAlreadyExistsFault" : response = { ... ( await deserializeAws_queryAuthorizationAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AuthorizationQuotaExceededFault" : case "com.amazonaws.rds#AuthorizationQuotaExceededFault" : response = { ... ( await deserializeAws_queryAuthorizationQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSecurityGroupNotFoundFault" : case "com.amazonaws.rds#DBSecurityGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSecurityGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSecurityGroupStateFault" : case "com.amazonaws.rds#InvalidDBSecurityGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidDBSecurityGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryBacktrackDBClusterCommand = async ( output , context ) : Promise < BacktrackDBClusterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryBacktrackDBClusterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBClusterBacktrack ( data . BacktrackDBClusterResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryBacktrackDBClusterCommandError = async ( output , context ) : Promise < BacktrackDBClusterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCancelExportTaskCommand = async ( output , context ) : Promise < CancelExportTaskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCancelExportTaskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryExportTask ( data . CancelExportTaskResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCancelExportTaskCommandError = async ( output , context ) : Promise < CancelExportTaskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ExportTaskNotFoundFault" : case "com.amazonaws.rds#ExportTaskNotFoundFault" : response = { ... ( await deserializeAws_queryExportTaskNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidExportTaskStateFault" : case "com.amazonaws.rds#InvalidExportTaskStateFault" : response = { ... ( await deserializeAws_queryInvalidExportTaskStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCopyDBClusterParameterGroupCommand = async ( output , context ) : Promise < CopyDBClusterParameterGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCopyDBClusterParameterGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCopyDBClusterParameterGroupResult ( data . CopyDBClusterParameterGroupResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCopyDBClusterParameterGroupCommandError = async ( output , context ) : Promise < CopyDBClusterParameterGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBParameterGroupAlreadyExistsFault" : case "com.amazonaws.rds#DBParameterGroupAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBParameterGroupAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBParameterGroupQuotaExceededFault" : case "com.amazonaws.rds#DBParameterGroupQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBParameterGroupQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCopyDBClusterSnapshotCommand = async ( output , context ) : Promise < CopyDBClusterSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCopyDBClusterSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCopyDBClusterSnapshotResult ( data . CopyDBClusterSnapshotResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCopyDBClusterSnapshotCommandError = async ( output , context ) : Promise < CopyDBClusterSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterSnapshotAlreadyExistsFault" : case "com.amazonaws.rds#DBClusterSnapshotAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBClusterSnapshotAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterSnapshotNotFoundFault" : case "com.amazonaws.rds#DBClusterSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterSnapshotStateFault" : case "com.amazonaws.rds#InvalidDBClusterSnapshotStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterSnapshotStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SnapshotQuotaExceededFault" : case "com.amazonaws.rds#SnapshotQuotaExceededFault" : response = { ... ( await deserializeAws_querySnapshotQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCopyDBParameterGroupCommand = async ( output , context ) : Promise < CopyDBParameterGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCopyDBParameterGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCopyDBParameterGroupResult ( data . CopyDBParameterGroupResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCopyDBParameterGroupCommandError = async ( output , context ) : Promise < CopyDBParameterGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBParameterGroupAlreadyExistsFault" : case "com.amazonaws.rds#DBParameterGroupAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBParameterGroupAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBParameterGroupQuotaExceededFault" : case "com.amazonaws.rds#DBParameterGroupQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBParameterGroupQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCopyDBSnapshotCommand = async ( output , context ) : Promise < CopyDBSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCopyDBSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCopyDBSnapshotResult ( data . CopyDBSnapshotResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCopyDBSnapshotCommandError = async ( output , context ) : Promise < CopyDBSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "CustomAvailabilityZoneNotFoundFault" : case "com.amazonaws.rds#CustomAvailabilityZoneNotFoundFault" : response = { ... ( await deserializeAws_queryCustomAvailabilityZoneNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSnapshotAlreadyExistsFault" : case "com.amazonaws.rds#DBSnapshotAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBSnapshotAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSnapshotNotFoundFault" : case "com.amazonaws.rds#DBSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSnapshotStateFault" : case "com.amazonaws.rds#InvalidDBSnapshotStateFault" : response = { ... ( await deserializeAws_queryInvalidDBSnapshotStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SnapshotQuotaExceededFault" : case "com.amazonaws.rds#SnapshotQuotaExceededFault" : response = { ... ( await deserializeAws_querySnapshotQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCopyOptionGroupCommand = async ( output , context ) : Promise < CopyOptionGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCopyOptionGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCopyOptionGroupResult ( data . CopyOptionGroupResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCopyOptionGroupCommandError = async ( output , context ) : Promise < CopyOptionGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "OptionGroupAlreadyExistsFault" : case "com.amazonaws.rds#OptionGroupAlreadyExistsFault" : response = { ... ( await deserializeAws_queryOptionGroupAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OptionGroupNotFoundFault" : case "com.amazonaws.rds#OptionGroupNotFoundFault" : response = { ... ( await deserializeAws_queryOptionGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OptionGroupQuotaExceededFault" : case "com.amazonaws.rds#OptionGroupQuotaExceededFault" : response = { ... ( await deserializeAws_queryOptionGroupQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateCustomAvailabilityZoneCommand = async ( output , context ) : Promise < CreateCustomAvailabilityZoneCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateCustomAvailabilityZoneCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCreateCustomAvailabilityZoneResult ( data . CreateCustomAvailabilityZoneResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateCustomAvailabilityZoneCommandError = async ( output , context ) : Promise < CreateCustomAvailabilityZoneCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "CustomAvailabilityZoneAlreadyExistsFault" : case "com.amazonaws.rds#CustomAvailabilityZoneAlreadyExistsFault" : response = { ... ( await deserializeAws_queryCustomAvailabilityZoneAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "CustomAvailabilityZoneQuotaExceededFault" : case "com.amazonaws.rds#CustomAvailabilityZoneQuotaExceededFault" : response = { ... ( await deserializeAws_queryCustomAvailabilityZoneQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateCustomDBEngineVersionCommand = async ( output , context ) : Promise < CreateCustomDBEngineVersionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateCustomDBEngineVersionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBEngineVersion ( data . CreateCustomDBEngineVersionResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateCustomDBEngineVersionCommandError = async ( output , context ) : Promise < CreateCustomDBEngineVersionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "CustomDBEngineVersionAlreadyExistsFault" : case "com.amazonaws.rds#CustomDBEngineVersionAlreadyExistsFault" : response = { ... ( await deserializeAws_queryCustomDBEngineVersionAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "CustomDBEngineVersionQuotaExceededFault" : case "com.amazonaws.rds#CustomDBEngineVersionQuotaExceededFault" : response = { ... ( await deserializeAws_queryCustomDBEngineVersionQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateDBClusterCommand = async ( output , context ) : Promise < CreateDBClusterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateDBClusterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCreateDBClusterResult ( data . CreateDBClusterResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateDBClusterCommandError = async ( output , context ) : Promise < CreateDBClusterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterAlreadyExistsFault" : case "com.amazonaws.rds#DBClusterAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBClusterAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBClusterParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterQuotaExceededFault" : case "com.amazonaws.rds#DBClusterQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBClusterQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupDoesNotCoverEnoughAZs" : case "com.amazonaws.rds#DBSubnetGroupDoesNotCoverEnoughAZs" : response = { ... ( await deserializeAws_queryDBSubnetGroupDoesNotCoverEnoughAZsResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupNotFoundFault" : case "com.amazonaws.rds#DBSubnetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DomainNotFoundFault" : case "com.amazonaws.rds#DomainNotFoundFault" : response = { ... ( await deserializeAws_queryDomainNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "GlobalClusterNotFoundFault" : case "com.amazonaws.rds#GlobalClusterNotFoundFault" : response = { ... ( await deserializeAws_queryGlobalClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientStorageClusterCapacityFault" : case "com.amazonaws.rds#InsufficientStorageClusterCapacityFault" : response = { ... ( await deserializeAws_queryInsufficientStorageClusterCapacityFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSubnetGroupStateFault" : case "com.amazonaws.rds#InvalidDBSubnetGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidDBSubnetGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidGlobalClusterStateFault" : case "com.amazonaws.rds#InvalidGlobalClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidGlobalClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.rds#InvalidSubnet" : response = { ... ( await deserializeAws_queryInvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidVPCNetworkStateFault" : case "com.amazonaws.rds#InvalidVPCNetworkStateFault" : response = { ... ( await deserializeAws_queryInvalidVPCNetworkStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageQuotaExceededFault" : case "com.amazonaws.rds#StorageQuotaExceededFault" : response = { ... ( await deserializeAws_queryStorageQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateDBClusterEndpointCommand = async ( output , context ) : Promise < CreateDBClusterEndpointCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateDBClusterEndpointCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBClusterEndpoint ( data . CreateDBClusterEndpointResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateDBClusterEndpointCommandError = async ( output , context ) : Promise < CreateDBClusterEndpointCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterEndpointAlreadyExistsFault" : case "com.amazonaws.rds#DBClusterEndpointAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBClusterEndpointAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterEndpointQuotaExceededFault" : case "com.amazonaws.rds#DBClusterEndpointQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBClusterEndpointQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateDBClusterParameterGroupCommand = async ( output , context ) : Promise < CreateDBClusterParameterGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateDBClusterParameterGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCreateDBClusterParameterGroupResult ( data . CreateDBClusterParameterGroupResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateDBClusterParameterGroupCommandError = async ( output , context ) : Promise < CreateDBClusterParameterGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBParameterGroupAlreadyExistsFault" : case "com.amazonaws.rds#DBParameterGroupAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBParameterGroupAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBParameterGroupQuotaExceededFault" : case "com.amazonaws.rds#DBParameterGroupQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBParameterGroupQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateDBClusterSnapshotCommand = async ( output , context ) : Promise < CreateDBClusterSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateDBClusterSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCreateDBClusterSnapshotResult ( data . CreateDBClusterSnapshotResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateDBClusterSnapshotCommandError = async ( output , context ) : Promise < CreateDBClusterSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterSnapshotAlreadyExistsFault" : case "com.amazonaws.rds#DBClusterSnapshotAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBClusterSnapshotAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterSnapshotStateFault" : case "com.amazonaws.rds#InvalidDBClusterSnapshotStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterSnapshotStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SnapshotQuotaExceededFault" : case "com.amazonaws.rds#SnapshotQuotaExceededFault" : response = { ... ( await deserializeAws_querySnapshotQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateDBInstanceCommand = async ( output , context ) : Promise < CreateDBInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateDBInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCreateDBInstanceResult ( data . CreateDBInstanceResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateDBInstanceCommandError = async ( output , context ) : Promise < CreateDBInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AuthorizationNotFoundFault" : case "com.amazonaws.rds#AuthorizationNotFoundFault" : response = { ... ( await deserializeAws_queryAuthorizationNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "BackupPolicyNotFoundFault" : case "com.amazonaws.rds#BackupPolicyNotFoundFault" : response = { ... ( await deserializeAws_queryBackupPolicyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceAlreadyExistsFault" : case "com.amazonaws.rds#DBInstanceAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBInstanceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSecurityGroupNotFoundFault" : case "com.amazonaws.rds#DBSecurityGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSecurityGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupDoesNotCoverEnoughAZs" : case "com.amazonaws.rds#DBSubnetGroupDoesNotCoverEnoughAZs" : response = { ... ( await deserializeAws_queryDBSubnetGroupDoesNotCoverEnoughAZsResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupNotFoundFault" : case "com.amazonaws.rds#DBSubnetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DomainNotFoundFault" : case "com.amazonaws.rds#DomainNotFoundFault" : response = { ... ( await deserializeAws_queryDomainNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InstanceQuotaExceededFault" : case "com.amazonaws.rds#InstanceQuotaExceededFault" : response = { ... ( await deserializeAws_queryInstanceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientDBInstanceCapacityFault" : case "com.amazonaws.rds#InsufficientDBInstanceCapacityFault" : response = { ... ( await deserializeAws_queryInsufficientDBInstanceCapacityFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.rds#InvalidSubnet" : response = { ... ( await deserializeAws_queryInvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidVPCNetworkStateFault" : case "com.amazonaws.rds#InvalidVPCNetworkStateFault" : response = { ... ( await deserializeAws_queryInvalidVPCNetworkStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OptionGroupNotFoundFault" : case "com.amazonaws.rds#OptionGroupNotFoundFault" : response = { ... ( await deserializeAws_queryOptionGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ProvisionedIopsNotAvailableInAZFault" : case "com.amazonaws.rds#ProvisionedIopsNotAvailableInAZFault" : response = { ... ( await deserializeAws_queryProvisionedIopsNotAvailableInAZFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageQuotaExceededFault" : case "com.amazonaws.rds#StorageQuotaExceededFault" : response = { ... ( await deserializeAws_queryStorageQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageTypeNotSupportedFault" : case "com.amazonaws.rds#StorageTypeNotSupportedFault" : response = { ... ( await deserializeAws_queryStorageTypeNotSupportedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateDBInstanceReadReplicaCommand = async ( output , context ) : Promise < CreateDBInstanceReadReplicaCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateDBInstanceReadReplicaCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCreateDBInstanceReadReplicaResult ( data . CreateDBInstanceReadReplicaResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateDBInstanceReadReplicaCommandError = async ( output , context ) : Promise < CreateDBInstanceReadReplicaCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBInstanceAlreadyExistsFault" : case "com.amazonaws.rds#DBInstanceAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBInstanceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSecurityGroupNotFoundFault" : case "com.amazonaws.rds#DBSecurityGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSecurityGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupDoesNotCoverEnoughAZs" : case "com.amazonaws.rds#DBSubnetGroupDoesNotCoverEnoughAZs" : response = { ... ( await deserializeAws_queryDBSubnetGroupDoesNotCoverEnoughAZsResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupNotAllowedFault" : case "com.amazonaws.rds#DBSubnetGroupNotAllowedFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupNotAllowedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupNotFoundFault" : case "com.amazonaws.rds#DBSubnetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DomainNotFoundFault" : case "com.amazonaws.rds#DomainNotFoundFault" : response = { ... ( await deserializeAws_queryDomainNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InstanceQuotaExceededFault" : case "com.amazonaws.rds#InstanceQuotaExceededFault" : response = { ... ( await deserializeAws_queryInstanceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientDBInstanceCapacityFault" : case "com.amazonaws.rds#InsufficientDBInstanceCapacityFault" : response = { ... ( await deserializeAws_queryInsufficientDBInstanceCapacityFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSubnetGroupFault" : case "com.amazonaws.rds#InvalidDBSubnetGroupFault" : response = { ... ( await deserializeAws_queryInvalidDBSubnetGroupFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.rds#InvalidSubnet" : response = { ... ( await deserializeAws_queryInvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidVPCNetworkStateFault" : case "com.amazonaws.rds#InvalidVPCNetworkStateFault" : response = { ... ( await deserializeAws_queryInvalidVPCNetworkStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OptionGroupNotFoundFault" : case "com.amazonaws.rds#OptionGroupNotFoundFault" : response = { ... ( await deserializeAws_queryOptionGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ProvisionedIopsNotAvailableInAZFault" : case "com.amazonaws.rds#ProvisionedIopsNotAvailableInAZFault" : response = { ... ( await deserializeAws_queryProvisionedIopsNotAvailableInAZFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageQuotaExceededFault" : case "com.amazonaws.rds#StorageQuotaExceededFault" : response = { ... ( await deserializeAws_queryStorageQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageTypeNotSupportedFault" : case "com.amazonaws.rds#StorageTypeNotSupportedFault" : response = { ... ( await deserializeAws_queryStorageTypeNotSupportedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateDBParameterGroupCommand = async ( output , context ) : Promise < CreateDBParameterGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateDBParameterGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCreateDBParameterGroupResult ( data . CreateDBParameterGroupResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateDBParameterGroupCommandError = async ( output , context ) : Promise < CreateDBParameterGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBParameterGroupAlreadyExistsFault" : case "com.amazonaws.rds#DBParameterGroupAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBParameterGroupAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBParameterGroupQuotaExceededFault" : case "com.amazonaws.rds#DBParameterGroupQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBParameterGroupQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateDBProxyCommand = async ( output , context ) : Promise < CreateDBProxyCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateDBProxyCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCreateDBProxyResponse ( data . CreateDBProxyResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateDBProxyCommandError = async ( output , context ) : Promise < CreateDBProxyCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBProxyAlreadyExistsFault" : case "com.amazonaws.rds#DBProxyAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBProxyAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyQuotaExceededFault" : case "com.amazonaws.rds#DBProxyQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBProxyQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.rds#InvalidSubnet" : response = { ... ( await deserializeAws_queryInvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateDBProxyEndpointCommand = async ( output , context ) : Promise < CreateDBProxyEndpointCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateDBProxyEndpointCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCreateDBProxyEndpointResponse ( data . CreateDBProxyEndpointResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateDBProxyEndpointCommandError = async ( output , context ) : Promise < CreateDBProxyEndpointCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBProxyEndpointAlreadyExistsFault" : case "com.amazonaws.rds#DBProxyEndpointAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBProxyEndpointAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyEndpointQuotaExceededFault" : case "com.amazonaws.rds#DBProxyEndpointQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBProxyEndpointQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyNotFoundFault" : case "com.amazonaws.rds#DBProxyNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBProxyStateFault" : case "com.amazonaws.rds#InvalidDBProxyStateFault" : response = { ... ( await deserializeAws_queryInvalidDBProxyStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.rds#InvalidSubnet" : response = { ... ( await deserializeAws_queryInvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateDBSecurityGroupCommand = async ( output , context ) : Promise < CreateDBSecurityGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateDBSecurityGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCreateDBSecurityGroupResult ( data . CreateDBSecurityGroupResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateDBSecurityGroupCommandError = async ( output , context ) : Promise < CreateDBSecurityGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBSecurityGroupAlreadyExistsFault" : case "com.amazonaws.rds#DBSecurityGroupAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBSecurityGroupAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSecurityGroupNotSupportedFault" : case "com.amazonaws.rds#DBSecurityGroupNotSupportedFault" : response = { ... ( await deserializeAws_queryDBSecurityGroupNotSupportedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSecurityGroupQuotaExceededFault" : case "com.amazonaws.rds#DBSecurityGroupQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBSecurityGroupQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateDBSnapshotCommand = async ( output , context ) : Promise < CreateDBSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateDBSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCreateDBSnapshotResult ( data . CreateDBSnapshotResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateDBSnapshotCommandError = async ( output , context ) : Promise < CreateDBSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSnapshotAlreadyExistsFault" : case "com.amazonaws.rds#DBSnapshotAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBSnapshotAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SnapshotQuotaExceededFault" : case "com.amazonaws.rds#SnapshotQuotaExceededFault" : response = { ... ( await deserializeAws_querySnapshotQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateDBSubnetGroupCommand = async ( output , context ) : Promise < CreateDBSubnetGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateDBSubnetGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCreateDBSubnetGroupResult ( data . CreateDBSubnetGroupResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateDBSubnetGroupCommandError = async ( output , context ) : Promise < CreateDBSubnetGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBSubnetGroupAlreadyExistsFault" : case "com.amazonaws.rds#DBSubnetGroupAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupDoesNotCoverEnoughAZs" : case "com.amazonaws.rds#DBSubnetGroupDoesNotCoverEnoughAZs" : response = { ... ( await deserializeAws_queryDBSubnetGroupDoesNotCoverEnoughAZsResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupQuotaExceededFault" : case "com.amazonaws.rds#DBSubnetGroupQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetQuotaExceededFault" : case "com.amazonaws.rds#DBSubnetQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBSubnetQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.rds#InvalidSubnet" : response = { ... ( await deserializeAws_queryInvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateEventSubscriptionCommand = async ( output , context ) : Promise < CreateEventSubscriptionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateEventSubscriptionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCreateEventSubscriptionResult ( data . CreateEventSubscriptionResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateEventSubscriptionCommandError = async ( output , context ) : Promise < CreateEventSubscriptionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "EventSubscriptionQuotaExceededFault" : case "com.amazonaws.rds#EventSubscriptionQuotaExceededFault" : response = { ... ( await deserializeAws_queryEventSubscriptionQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SNSInvalidTopicFault" : case "com.amazonaws.rds#SNSInvalidTopicFault" : response = { ... ( await deserializeAws_querySNSInvalidTopicFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SNSNoAuthorizationFault" : case "com.amazonaws.rds#SNSNoAuthorizationFault" : response = { ... ( await deserializeAws_querySNSNoAuthorizationFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SNSTopicArnNotFoundFault" : case "com.amazonaws.rds#SNSTopicArnNotFoundFault" : response = { ... ( await deserializeAws_querySNSTopicArnNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SourceNotFoundFault" : case "com.amazonaws.rds#SourceNotFoundFault" : response = { ... ( await deserializeAws_querySourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SubscriptionAlreadyExistFault" : case "com.amazonaws.rds#SubscriptionAlreadyExistFault" : response = { ... ( await deserializeAws_querySubscriptionAlreadyExistFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SubscriptionCategoryNotFoundFault" : case "com.amazonaws.rds#SubscriptionCategoryNotFoundFault" : response = { ... ( await deserializeAws_querySubscriptionCategoryNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateGlobalClusterCommand = async ( output , context ) : Promise < CreateGlobalClusterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateGlobalClusterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCreateGlobalClusterResult ( data . CreateGlobalClusterResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateGlobalClusterCommandError = async ( output , context ) : Promise < CreateGlobalClusterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "GlobalClusterAlreadyExistsFault" : case "com.amazonaws.rds#GlobalClusterAlreadyExistsFault" : response = { ... ( await deserializeAws_queryGlobalClusterAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "GlobalClusterQuotaExceededFault" : case "com.amazonaws.rds#GlobalClusterQuotaExceededFault" : response = { ... ( await deserializeAws_queryGlobalClusterQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryCreateOptionGroupCommand = async ( output , context ) : Promise < CreateOptionGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryCreateOptionGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCreateOptionGroupResult ( data . CreateOptionGroupResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryCreateOptionGroupCommandError = async ( output , context ) : Promise < CreateOptionGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "OptionGroupAlreadyExistsFault" : case "com.amazonaws.rds#OptionGroupAlreadyExistsFault" : response = { ... ( await deserializeAws_queryOptionGroupAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OptionGroupQuotaExceededFault" : case "com.amazonaws.rds#OptionGroupQuotaExceededFault" : response = { ... ( await deserializeAws_queryOptionGroupQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteCustomAvailabilityZoneCommand = async ( output , context ) : Promise < DeleteCustomAvailabilityZoneCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteCustomAvailabilityZoneCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDeleteCustomAvailabilityZoneResult ( data . DeleteCustomAvailabilityZoneResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteCustomAvailabilityZoneCommandError = async ( output , context ) : Promise < DeleteCustomAvailabilityZoneCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "CustomAvailabilityZoneNotFoundFault" : case "com.amazonaws.rds#CustomAvailabilityZoneNotFoundFault" : response = { ... ( await deserializeAws_queryCustomAvailabilityZoneNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteCustomDBEngineVersionCommand = async ( output , context ) : Promise < DeleteCustomDBEngineVersionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteCustomDBEngineVersionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBEngineVersion ( data . DeleteCustomDBEngineVersionResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteCustomDBEngineVersionCommandError = async ( output , context ) : Promise < DeleteCustomDBEngineVersionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "CustomDBEngineVersionNotFoundFault" : case "com.amazonaws.rds#CustomDBEngineVersionNotFoundFault" : response = { ... ( await deserializeAws_queryCustomDBEngineVersionNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidCustomDBEngineVersionStateFault" : case "com.amazonaws.rds#InvalidCustomDBEngineVersionStateFault" : response = { ... ( await deserializeAws_queryInvalidCustomDBEngineVersionStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteDBClusterCommand = async ( output , context ) : Promise < DeleteDBClusterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteDBClusterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDeleteDBClusterResult ( data . DeleteDBClusterResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteDBClusterCommandError = async ( output , context ) : Promise < DeleteDBClusterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterSnapshotAlreadyExistsFault" : case "com.amazonaws.rds#DBClusterSnapshotAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBClusterSnapshotAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterSnapshotStateFault" : case "com.amazonaws.rds#InvalidDBClusterSnapshotStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterSnapshotStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SnapshotQuotaExceededFault" : case "com.amazonaws.rds#SnapshotQuotaExceededFault" : response = { ... ( await deserializeAws_querySnapshotQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteDBClusterEndpointCommand = async ( output , context ) : Promise < DeleteDBClusterEndpointCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteDBClusterEndpointCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBClusterEndpoint ( data . DeleteDBClusterEndpointResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteDBClusterEndpointCommandError = async ( output , context ) : Promise < DeleteDBClusterEndpointCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterEndpointNotFoundFault" : case "com.amazonaws.rds#DBClusterEndpointNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterEndpointNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterEndpointStateFault" : case "com.amazonaws.rds#InvalidDBClusterEndpointStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterEndpointStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteDBClusterParameterGroupCommand = async ( output , context ) : Promise < DeleteDBClusterParameterGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteDBClusterParameterGroupCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteDBClusterParameterGroupCommandError = async ( output , context ) : Promise < DeleteDBClusterParameterGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBParameterGroupStateFault" : case "com.amazonaws.rds#InvalidDBParameterGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidDBParameterGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteDBClusterSnapshotCommand = async ( output , context ) : Promise < DeleteDBClusterSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteDBClusterSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDeleteDBClusterSnapshotResult ( data . DeleteDBClusterSnapshotResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteDBClusterSnapshotCommandError = async ( output , context ) : Promise < DeleteDBClusterSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterSnapshotNotFoundFault" : case "com.amazonaws.rds#DBClusterSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterSnapshotStateFault" : case "com.amazonaws.rds#InvalidDBClusterSnapshotStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterSnapshotStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteDBInstanceCommand = async ( output , context ) : Promise < DeleteDBInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteDBInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDeleteDBInstanceResult ( data . DeleteDBInstanceResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteDBInstanceCommandError = async ( output , context ) : Promise < DeleteDBInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBInstanceAutomatedBackupQuotaExceededFault" : case "com.amazonaws.rds#DBInstanceAutomatedBackupQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBInstanceAutomatedBackupQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSnapshotAlreadyExistsFault" : case "com.amazonaws.rds#DBSnapshotAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBSnapshotAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SnapshotQuotaExceededFault" : case "com.amazonaws.rds#SnapshotQuotaExceededFault" : response = { ... ( await deserializeAws_querySnapshotQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteDBInstanceAutomatedBackupCommand = async ( output , context ) : Promise < DeleteDBInstanceAutomatedBackupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteDBInstanceAutomatedBackupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDeleteDBInstanceAutomatedBackupResult ( data . DeleteDBInstanceAutomatedBackupResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteDBInstanceAutomatedBackupCommandError = async ( output , context ) : Promise < DeleteDBInstanceAutomatedBackupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBInstanceAutomatedBackupNotFoundFault" : case "com.amazonaws.rds#DBInstanceAutomatedBackupNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceAutomatedBackupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceAutomatedBackupStateFault" : case "com.amazonaws.rds#InvalidDBInstanceAutomatedBackupStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceAutomatedBackupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteDBParameterGroupCommand = async ( output , context ) : Promise < DeleteDBParameterGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteDBParameterGroupCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteDBParameterGroupCommandError = async ( output , context ) : Promise < DeleteDBParameterGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBParameterGroupStateFault" : case "com.amazonaws.rds#InvalidDBParameterGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidDBParameterGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteDBProxyCommand = async ( output , context ) : Promise < DeleteDBProxyCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteDBProxyCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDeleteDBProxyResponse ( data . DeleteDBProxyResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteDBProxyCommandError = async ( output , context ) : Promise < DeleteDBProxyCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBProxyNotFoundFault" : case "com.amazonaws.rds#DBProxyNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBProxyStateFault" : case "com.amazonaws.rds#InvalidDBProxyStateFault" : response = { ... ( await deserializeAws_queryInvalidDBProxyStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteDBProxyEndpointCommand = async ( output , context ) : Promise < DeleteDBProxyEndpointCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteDBProxyEndpointCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDeleteDBProxyEndpointResponse ( data . DeleteDBProxyEndpointResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteDBProxyEndpointCommandError = async ( output , context ) : Promise < DeleteDBProxyEndpointCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBProxyEndpointNotFoundFault" : case "com.amazonaws.rds#DBProxyEndpointNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyEndpointNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBProxyEndpointStateFault" : case "com.amazonaws.rds#InvalidDBProxyEndpointStateFault" : response = { ... ( await deserializeAws_queryInvalidDBProxyEndpointStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteDBSecurityGroupCommand = async ( output , context ) : Promise < DeleteDBSecurityGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteDBSecurityGroupCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteDBSecurityGroupCommandError = async ( output , context ) : Promise < DeleteDBSecurityGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBSecurityGroupNotFoundFault" : case "com.amazonaws.rds#DBSecurityGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSecurityGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSecurityGroupStateFault" : case "com.amazonaws.rds#InvalidDBSecurityGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidDBSecurityGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteDBSnapshotCommand = async ( output , context ) : Promise < DeleteDBSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteDBSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDeleteDBSnapshotResult ( data . DeleteDBSnapshotResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteDBSnapshotCommandError = async ( output , context ) : Promise < DeleteDBSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBSnapshotNotFoundFault" : case "com.amazonaws.rds#DBSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSnapshotStateFault" : case "com.amazonaws.rds#InvalidDBSnapshotStateFault" : response = { ... ( await deserializeAws_queryInvalidDBSnapshotStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteDBSubnetGroupCommand = async ( output , context ) : Promise < DeleteDBSubnetGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteDBSubnetGroupCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteDBSubnetGroupCommandError = async ( output , context ) : Promise < DeleteDBSubnetGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBSubnetGroupNotFoundFault" : case "com.amazonaws.rds#DBSubnetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSubnetGroupStateFault" : case "com.amazonaws.rds#InvalidDBSubnetGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidDBSubnetGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSubnetStateFault" : case "com.amazonaws.rds#InvalidDBSubnetStateFault" : response = { ... ( await deserializeAws_queryInvalidDBSubnetStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteEventSubscriptionCommand = async ( output , context ) : Promise < DeleteEventSubscriptionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteEventSubscriptionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDeleteEventSubscriptionResult ( data . DeleteEventSubscriptionResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteEventSubscriptionCommandError = async ( output , context ) : Promise < DeleteEventSubscriptionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidEventSubscriptionStateFault" : case "com.amazonaws.rds#InvalidEventSubscriptionStateFault" : response = { ... ( await deserializeAws_queryInvalidEventSubscriptionStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SubscriptionNotFoundFault" : case "com.amazonaws.rds#SubscriptionNotFoundFault" : response = { ... ( await deserializeAws_querySubscriptionNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteGlobalClusterCommand = async ( output , context ) : Promise < DeleteGlobalClusterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteGlobalClusterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDeleteGlobalClusterResult ( data . DeleteGlobalClusterResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteGlobalClusterCommandError = async ( output , context ) : Promise < DeleteGlobalClusterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "GlobalClusterNotFoundFault" : case "com.amazonaws.rds#GlobalClusterNotFoundFault" : response = { ... ( await deserializeAws_queryGlobalClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidGlobalClusterStateFault" : case "com.amazonaws.rds#InvalidGlobalClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidGlobalClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteInstallationMediaCommand = async ( output , context ) : Promise < DeleteInstallationMediaCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteInstallationMediaCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryInstallationMedia ( data . DeleteInstallationMediaResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteInstallationMediaCommandError = async ( output , context ) : Promise < DeleteInstallationMediaCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InstallationMediaNotFoundFault" : case "com.amazonaws.rds#InstallationMediaNotFoundFault" : response = { ... ( await deserializeAws_queryInstallationMediaNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeleteOptionGroupCommand = async ( output , context ) : Promise < DeleteOptionGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeleteOptionGroupCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeleteOptionGroupCommandError = async ( output , context ) : Promise < DeleteOptionGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidOptionGroupStateFault" : case "com.amazonaws.rds#InvalidOptionGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidOptionGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OptionGroupNotFoundFault" : case "com.amazonaws.rds#OptionGroupNotFoundFault" : response = { ... ( await deserializeAws_queryOptionGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDeregisterDBProxyTargetsCommand = async ( output , context ) : Promise < DeregisterDBProxyTargetsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDeregisterDBProxyTargetsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDeregisterDBProxyTargetsResponse ( data . DeregisterDBProxyTargetsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDeregisterDBProxyTargetsCommandError = async ( output , context ) : Promise < DeregisterDBProxyTargetsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBProxyNotFoundFault" : case "com.amazonaws.rds#DBProxyNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyTargetGroupNotFoundFault" : case "com.amazonaws.rds#DBProxyTargetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyTargetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyTargetNotFoundFault" : case "com.amazonaws.rds#DBProxyTargetNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyTargetNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBProxyStateFault" : case "com.amazonaws.rds#InvalidDBProxyStateFault" : response = { ... ( await deserializeAws_queryInvalidDBProxyStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeAccountAttributesCommand = async ( output , context ) : Promise < DescribeAccountAttributesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeAccountAttributesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryAccountAttributesMessage ( data . DescribeAccountAttributesResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeAccountAttributesCommandError = async ( output , context ) : Promise < DescribeAccountAttributesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeCertificatesCommand = async ( output , context ) : Promise < DescribeCertificatesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeCertificatesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCertificateMessage ( data . DescribeCertificatesResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeCertificatesCommandError = async ( output , context ) : Promise < DescribeCertificatesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "CertificateNotFoundFault" : case "com.amazonaws.rds#CertificateNotFoundFault" : response = { ... ( await deserializeAws_queryCertificateNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeCustomAvailabilityZonesCommand = async ( output , context ) : Promise < DescribeCustomAvailabilityZonesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeCustomAvailabilityZonesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryCustomAvailabilityZoneMessage ( data . DescribeCustomAvailabilityZonesResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeCustomAvailabilityZonesCommandError = async ( output , context ) : Promise < DescribeCustomAvailabilityZonesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "CustomAvailabilityZoneNotFoundFault" : case "com.amazonaws.rds#CustomAvailabilityZoneNotFoundFault" : response = { ... ( await deserializeAws_queryCustomAvailabilityZoneNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBClusterBacktracksCommand = async ( output , context ) : Promise < DescribeDBClusterBacktracksCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBClusterBacktracksCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBClusterBacktrackMessage ( data . DescribeDBClusterBacktracksResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBClusterBacktracksCommandError = async ( output , context ) : Promise < DescribeDBClusterBacktracksCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterBacktrackNotFoundFault" : case "com.amazonaws.rds#DBClusterBacktrackNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterBacktrackNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBClusterEndpointsCommand = async ( output , context ) : Promise < DescribeDBClusterEndpointsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBClusterEndpointsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBClusterEndpointMessage ( data . DescribeDBClusterEndpointsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBClusterEndpointsCommandError = async ( output , context ) : Promise < DescribeDBClusterEndpointsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBClusterParameterGroupsCommand = async ( output , context ) : Promise < DescribeDBClusterParameterGroupsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBClusterParameterGroupsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBClusterParameterGroupsMessage ( data . DescribeDBClusterParameterGroupsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBClusterParameterGroupsCommandError = async ( output , context ) : Promise < DescribeDBClusterParameterGroupsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBClusterParametersCommand = async ( output , context ) : Promise < DescribeDBClusterParametersCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBClusterParametersCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBClusterParameterGroupDetails ( data . DescribeDBClusterParametersResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBClusterParametersCommandError = async ( output , context ) : Promise < DescribeDBClusterParametersCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBClustersCommand = async ( output , context ) : Promise < DescribeDBClustersCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBClustersCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBClusterMessage ( data . DescribeDBClustersResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBClustersCommandError = async ( output , context ) : Promise < DescribeDBClustersCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBClusterSnapshotAttributesCommand = async ( output , context ) : Promise < DescribeDBClusterSnapshotAttributesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBClusterSnapshotAttributesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDescribeDBClusterSnapshotAttributesResult ( data . DescribeDBClusterSnapshotAttributesResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBClusterSnapshotAttributesCommandError = async ( output , context ) : Promise < DescribeDBClusterSnapshotAttributesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterSnapshotNotFoundFault" : case "com.amazonaws.rds#DBClusterSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBClusterSnapshotsCommand = async ( output , context ) : Promise < DescribeDBClusterSnapshotsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBClusterSnapshotsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBClusterSnapshotMessage ( data . DescribeDBClusterSnapshotsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBClusterSnapshotsCommandError = async ( output , context ) : Promise < DescribeDBClusterSnapshotsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterSnapshotNotFoundFault" : case "com.amazonaws.rds#DBClusterSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBEngineVersionsCommand = async ( output , context ) : Promise < DescribeDBEngineVersionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBEngineVersionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBEngineVersionMessage ( data . DescribeDBEngineVersionsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBEngineVersionsCommandError = async ( output , context ) : Promise < DescribeDBEngineVersionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBInstanceAutomatedBackupsCommand = async ( output , context ) : Promise < DescribeDBInstanceAutomatedBackupsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBInstanceAutomatedBackupsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBInstanceAutomatedBackupMessage ( data . DescribeDBInstanceAutomatedBackupsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBInstanceAutomatedBackupsCommandError = async ( output , context ) : Promise < DescribeDBInstanceAutomatedBackupsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBInstanceAutomatedBackupNotFoundFault" : case "com.amazonaws.rds#DBInstanceAutomatedBackupNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceAutomatedBackupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBInstancesCommand = async ( output , context ) : Promise < DescribeDBInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBInstanceMessage ( data . DescribeDBInstancesResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBInstancesCommandError = async ( output , context ) : Promise < DescribeDBInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBLogFilesCommand = async ( output , context ) : Promise < DescribeDBLogFilesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBLogFilesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDescribeDBLogFilesResponse ( data . DescribeDBLogFilesResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBLogFilesCommandError = async ( output , context ) : Promise < DescribeDBLogFilesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBParameterGroupsCommand = async ( output , context ) : Promise < DescribeDBParameterGroupsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBParameterGroupsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBParameterGroupsMessage ( data . DescribeDBParameterGroupsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBParameterGroupsCommandError = async ( output , context ) : Promise < DescribeDBParameterGroupsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBParametersCommand = async ( output , context ) : Promise < DescribeDBParametersCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBParametersCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBParameterGroupDetails ( data . DescribeDBParametersResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBParametersCommandError = async ( output , context ) : Promise < DescribeDBParametersCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBProxiesCommand = async ( output , context ) : Promise < DescribeDBProxiesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBProxiesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDescribeDBProxiesResponse ( data . DescribeDBProxiesResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBProxiesCommandError = async ( output , context ) : Promise < DescribeDBProxiesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBProxyNotFoundFault" : case "com.amazonaws.rds#DBProxyNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBProxyEndpointsCommand = async ( output , context ) : Promise < DescribeDBProxyEndpointsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBProxyEndpointsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDescribeDBProxyEndpointsResponse ( data . DescribeDBProxyEndpointsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBProxyEndpointsCommandError = async ( output , context ) : Promise < DescribeDBProxyEndpointsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBProxyEndpointNotFoundFault" : case "com.amazonaws.rds#DBProxyEndpointNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyEndpointNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyNotFoundFault" : case "com.amazonaws.rds#DBProxyNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBProxyTargetGroupsCommand = async ( output , context ) : Promise < DescribeDBProxyTargetGroupsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBProxyTargetGroupsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDescribeDBProxyTargetGroupsResponse ( data . DescribeDBProxyTargetGroupsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBProxyTargetGroupsCommandError = async ( output , context ) : Promise < DescribeDBProxyTargetGroupsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBProxyNotFoundFault" : case "com.amazonaws.rds#DBProxyNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyTargetGroupNotFoundFault" : case "com.amazonaws.rds#DBProxyTargetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyTargetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBProxyStateFault" : case "com.amazonaws.rds#InvalidDBProxyStateFault" : response = { ... ( await deserializeAws_queryInvalidDBProxyStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBProxyTargetsCommand = async ( output , context ) : Promise < DescribeDBProxyTargetsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBProxyTargetsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDescribeDBProxyTargetsResponse ( data . DescribeDBProxyTargetsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBProxyTargetsCommandError = async ( output , context ) : Promise < DescribeDBProxyTargetsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBProxyNotFoundFault" : case "com.amazonaws.rds#DBProxyNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyTargetGroupNotFoundFault" : case "com.amazonaws.rds#DBProxyTargetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyTargetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyTargetNotFoundFault" : case "com.amazonaws.rds#DBProxyTargetNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyTargetNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBProxyStateFault" : case "com.amazonaws.rds#InvalidDBProxyStateFault" : response = { ... ( await deserializeAws_queryInvalidDBProxyStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBSecurityGroupsCommand = async ( output , context ) : Promise < DescribeDBSecurityGroupsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBSecurityGroupsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBSecurityGroupMessage ( data . DescribeDBSecurityGroupsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBSecurityGroupsCommandError = async ( output , context ) : Promise < DescribeDBSecurityGroupsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBSecurityGroupNotFoundFault" : case "com.amazonaws.rds#DBSecurityGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSecurityGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBSnapshotAttributesCommand = async ( output , context ) : Promise < DescribeDBSnapshotAttributesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBSnapshotAttributesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDescribeDBSnapshotAttributesResult ( data . DescribeDBSnapshotAttributesResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBSnapshotAttributesCommandError = async ( output , context ) : Promise < DescribeDBSnapshotAttributesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBSnapshotNotFoundFault" : case "com.amazonaws.rds#DBSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBSnapshotsCommand = async ( output , context ) : Promise < DescribeDBSnapshotsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBSnapshotsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBSnapshotMessage ( data . DescribeDBSnapshotsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBSnapshotsCommandError = async ( output , context ) : Promise < DescribeDBSnapshotsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBSnapshotNotFoundFault" : case "com.amazonaws.rds#DBSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeDBSubnetGroupsCommand = async ( output , context ) : Promise < DescribeDBSubnetGroupsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeDBSubnetGroupsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBSubnetGroupMessage ( data . DescribeDBSubnetGroupsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeDBSubnetGroupsCommandError = async ( output , context ) : Promise < DescribeDBSubnetGroupsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBSubnetGroupNotFoundFault" : case "com.amazonaws.rds#DBSubnetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeEngineDefaultClusterParametersCommand = async ( output , context ) : Promise < DescribeEngineDefaultClusterParametersCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeEngineDefaultClusterParametersCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDescribeEngineDefaultClusterParametersResult ( data . DescribeEngineDefaultClusterParametersResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeEngineDefaultClusterParametersCommandError = async ( output , context ) : Promise < DescribeEngineDefaultClusterParametersCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeEngineDefaultParametersCommand = async ( output , context ) : Promise < DescribeEngineDefaultParametersCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeEngineDefaultParametersCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDescribeEngineDefaultParametersResult ( data . DescribeEngineDefaultParametersResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeEngineDefaultParametersCommandError = async ( output , context ) : Promise < DescribeEngineDefaultParametersCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeEventCategoriesCommand = async ( output , context ) : Promise < DescribeEventCategoriesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeEventCategoriesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryEventCategoriesMessage ( data . DescribeEventCategoriesResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeEventCategoriesCommandError = async ( output , context ) : Promise < DescribeEventCategoriesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeEventsCommand = async ( output , context ) : Promise < DescribeEventsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeEventsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryEventsMessage ( data . DescribeEventsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeEventsCommandError = async ( output , context ) : Promise < DescribeEventsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeEventSubscriptionsCommand = async ( output , context ) : Promise < DescribeEventSubscriptionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeEventSubscriptionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryEventSubscriptionsMessage ( data . DescribeEventSubscriptionsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeEventSubscriptionsCommandError = async ( output , context ) : Promise < DescribeEventSubscriptionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "SubscriptionNotFoundFault" : case "com.amazonaws.rds#SubscriptionNotFoundFault" : response = { ... ( await deserializeAws_querySubscriptionNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeExportTasksCommand = async ( output , context ) : Promise < DescribeExportTasksCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeExportTasksCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryExportTasksMessage ( data . DescribeExportTasksResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeExportTasksCommandError = async ( output , context ) : Promise < DescribeExportTasksCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ExportTaskNotFoundFault" : case "com.amazonaws.rds#ExportTaskNotFoundFault" : response = { ... ( await deserializeAws_queryExportTaskNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeGlobalClustersCommand = async ( output , context ) : Promise < DescribeGlobalClustersCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeGlobalClustersCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryGlobalClustersMessage ( data . DescribeGlobalClustersResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeGlobalClustersCommandError = async ( output , context ) : Promise < DescribeGlobalClustersCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "GlobalClusterNotFoundFault" : case "com.amazonaws.rds#GlobalClusterNotFoundFault" : response = { ... ( await deserializeAws_queryGlobalClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeInstallationMediaCommand = async ( output , context ) : Promise < DescribeInstallationMediaCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeInstallationMediaCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryInstallationMediaMessage ( data . DescribeInstallationMediaResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeInstallationMediaCommandError = async ( output , context ) : Promise < DescribeInstallationMediaCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InstallationMediaNotFoundFault" : case "com.amazonaws.rds#InstallationMediaNotFoundFault" : response = { ... ( await deserializeAws_queryInstallationMediaNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeOptionGroupOptionsCommand = async ( output , context ) : Promise < DescribeOptionGroupOptionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeOptionGroupOptionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryOptionGroupOptionsMessage ( data . DescribeOptionGroupOptionsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeOptionGroupOptionsCommandError = async ( output , context ) : Promise < DescribeOptionGroupOptionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeOptionGroupsCommand = async ( output , context ) : Promise < DescribeOptionGroupsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeOptionGroupsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryOptionGroups ( data . DescribeOptionGroupsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeOptionGroupsCommandError = async ( output , context ) : Promise < DescribeOptionGroupsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "OptionGroupNotFoundFault" : case "com.amazonaws.rds#OptionGroupNotFoundFault" : response = { ... ( await deserializeAws_queryOptionGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeOrderableDBInstanceOptionsCommand = async ( output , context ) : Promise < DescribeOrderableDBInstanceOptionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeOrderableDBInstanceOptionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryOrderableDBInstanceOptionsMessage ( data . DescribeOrderableDBInstanceOptionsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeOrderableDBInstanceOptionsCommandError = async ( output , context ) : Promise < DescribeOrderableDBInstanceOptionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribePendingMaintenanceActionsCommand = async ( output , context ) : Promise < DescribePendingMaintenanceActionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribePendingMaintenanceActionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryPendingMaintenanceActionsMessage ( data . DescribePendingMaintenanceActionsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribePendingMaintenanceActionsCommandError = async ( output , context ) : Promise < DescribePendingMaintenanceActionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundFault" : case "com.amazonaws.rds#ResourceNotFoundFault" : response = { ... ( await deserializeAws_queryResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeReservedDBInstancesCommand = async ( output , context ) : Promise < DescribeReservedDBInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeReservedDBInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryReservedDBInstanceMessage ( data . DescribeReservedDBInstancesResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeReservedDBInstancesCommandError = async ( output , context ) : Promise < DescribeReservedDBInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ReservedDBInstanceNotFoundFault" : case "com.amazonaws.rds#ReservedDBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryReservedDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeReservedDBInstancesOfferingsCommand = async ( output , context ) : Promise < DescribeReservedDBInstancesOfferingsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeReservedDBInstancesOfferingsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryReservedDBInstancesOfferingMessage ( data . DescribeReservedDBInstancesOfferingsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeReservedDBInstancesOfferingsCommandError = async ( output , context ) : Promise < DescribeReservedDBInstancesOfferingsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ReservedDBInstancesOfferingNotFoundFault" : case "com.amazonaws.rds#ReservedDBInstancesOfferingNotFoundFault" : response = { ... ( await deserializeAws_queryReservedDBInstancesOfferingNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeSourceRegionsCommand = async ( output , context ) : Promise < DescribeSourceRegionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeSourceRegionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_querySourceRegionMessage ( data . DescribeSourceRegionsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeSourceRegionsCommandError = async ( output , context ) : Promise < DescribeSourceRegionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDescribeValidDBInstanceModificationsCommand = async ( output , context ) : Promise < DescribeValidDBInstanceModificationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDescribeValidDBInstanceModificationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDescribeValidDBInstanceModificationsResult ( data . DescribeValidDBInstanceModificationsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDescribeValidDBInstanceModificationsCommandError = async ( output , context ) : Promise < DescribeValidDBInstanceModificationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryDownloadDBLogFilePortionCommand = async ( output , context ) : Promise < DownloadDBLogFilePortionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryDownloadDBLogFilePortionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDownloadDBLogFilePortionDetails ( data . DownloadDBLogFilePortionResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryDownloadDBLogFilePortionCommandError = async ( output , context ) : Promise < DownloadDBLogFilePortionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBLogFileNotFoundFault" : case "com.amazonaws.rds#DBLogFileNotFoundFault" : response = { ... ( await deserializeAws_queryDBLogFileNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryFailoverDBClusterCommand = async ( output , context ) : Promise < FailoverDBClusterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryFailoverDBClusterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryFailoverDBClusterResult ( data . FailoverDBClusterResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryFailoverDBClusterCommandError = async ( output , context ) : Promise < FailoverDBClusterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryFailoverGlobalClusterCommand = async ( output , context ) : Promise < FailoverGlobalClusterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryFailoverGlobalClusterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryFailoverGlobalClusterResult ( data . FailoverGlobalClusterResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryFailoverGlobalClusterCommandError = async ( output , context ) : Promise < FailoverGlobalClusterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "GlobalClusterNotFoundFault" : case "com.amazonaws.rds#GlobalClusterNotFoundFault" : response = { ... ( await deserializeAws_queryGlobalClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidGlobalClusterStateFault" : case "com.amazonaws.rds#InvalidGlobalClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidGlobalClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryImportInstallationMediaCommand = async ( output , context ) : Promise < ImportInstallationMediaCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryImportInstallationMediaCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryInstallationMedia ( data . ImportInstallationMediaResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryImportInstallationMediaCommandError = async ( output , context ) : Promise < ImportInstallationMediaCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "CustomAvailabilityZoneNotFoundFault" : case "com.amazonaws.rds#CustomAvailabilityZoneNotFoundFault" : response = { ... ( await deserializeAws_queryCustomAvailabilityZoneNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InstallationMediaAlreadyExistsFault" : case "com.amazonaws.rds#InstallationMediaAlreadyExistsFault" : response = { ... ( await deserializeAws_queryInstallationMediaAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryListTagsForResourceCommand = async ( output , context ) : Promise < ListTagsForResourceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryListTagsForResourceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryTagListMessage ( data . ListTagsForResourceResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryListTagsForResourceCommandError = async ( output , context ) : Promise < ListTagsForResourceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyNotFoundFault" : case "com.amazonaws.rds#DBProxyNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyTargetGroupNotFoundFault" : case "com.amazonaws.rds#DBProxyTargetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyTargetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSnapshotNotFoundFault" : case "com.amazonaws.rds#DBSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyCertificatesCommand = async ( output , context ) : Promise < ModifyCertificatesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyCertificatesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryModifyCertificatesResult ( data . ModifyCertificatesResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyCertificatesCommandError = async ( output , context ) : Promise < ModifyCertificatesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "CertificateNotFoundFault" : case "com.amazonaws.rds#CertificateNotFoundFault" : response = { ... ( await deserializeAws_queryCertificateNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyCurrentDBClusterCapacityCommand = async ( output , context ) : Promise < ModifyCurrentDBClusterCapacityCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyCurrentDBClusterCapacityCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBClusterCapacityInfo ( data . ModifyCurrentDBClusterCapacityResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyCurrentDBClusterCapacityCommandError = async ( output , context ) : Promise < ModifyCurrentDBClusterCapacityCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterCapacityFault" : case "com.amazonaws.rds#InvalidDBClusterCapacityFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterCapacityFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyCustomDBEngineVersionCommand = async ( output , context ) : Promise < ModifyCustomDBEngineVersionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyCustomDBEngineVersionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBEngineVersion ( data . ModifyCustomDBEngineVersionResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyCustomDBEngineVersionCommandError = async ( output , context ) : Promise < ModifyCustomDBEngineVersionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "CustomDBEngineVersionNotFoundFault" : case "com.amazonaws.rds#CustomDBEngineVersionNotFoundFault" : response = { ... ( await deserializeAws_queryCustomDBEngineVersionNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidCustomDBEngineVersionStateFault" : case "com.amazonaws.rds#InvalidCustomDBEngineVersionStateFault" : response = { ... ( await deserializeAws_queryInvalidCustomDBEngineVersionStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyDBClusterCommand = async ( output , context ) : Promise < ModifyDBClusterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyDBClusterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryModifyDBClusterResult ( data . ModifyDBClusterResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyDBClusterCommandError = async ( output , context ) : Promise < ModifyDBClusterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterAlreadyExistsFault" : case "com.amazonaws.rds#DBClusterAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBClusterAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBClusterParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupNotFoundFault" : case "com.amazonaws.rds#DBSubnetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DomainNotFoundFault" : case "com.amazonaws.rds#DomainNotFoundFault" : response = { ... ( await deserializeAws_queryDomainNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSecurityGroupStateFault" : case "com.amazonaws.rds#InvalidDBSecurityGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidDBSecurityGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSubnetGroupStateFault" : case "com.amazonaws.rds#InvalidDBSubnetGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidDBSubnetGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.rds#InvalidSubnet" : response = { ... ( await deserializeAws_queryInvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidVPCNetworkStateFault" : case "com.amazonaws.rds#InvalidVPCNetworkStateFault" : response = { ... ( await deserializeAws_queryInvalidVPCNetworkStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageQuotaExceededFault" : case "com.amazonaws.rds#StorageQuotaExceededFault" : response = { ... ( await deserializeAws_queryStorageQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyDBClusterEndpointCommand = async ( output , context ) : Promise < ModifyDBClusterEndpointCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyDBClusterEndpointCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBClusterEndpoint ( data . ModifyDBClusterEndpointResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyDBClusterEndpointCommandError = async ( output , context ) : Promise < ModifyDBClusterEndpointCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterEndpointNotFoundFault" : case "com.amazonaws.rds#DBClusterEndpointNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterEndpointNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterEndpointStateFault" : case "com.amazonaws.rds#InvalidDBClusterEndpointStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterEndpointStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyDBClusterParameterGroupCommand = async ( output , context ) : Promise < ModifyDBClusterParameterGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyDBClusterParameterGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBClusterParameterGroupNameMessage ( data . ModifyDBClusterParameterGroupResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyDBClusterParameterGroupCommandError = async ( output , context ) : Promise < ModifyDBClusterParameterGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBParameterGroupStateFault" : case "com.amazonaws.rds#InvalidDBParameterGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidDBParameterGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyDBClusterSnapshotAttributeCommand = async ( output , context ) : Promise < ModifyDBClusterSnapshotAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyDBClusterSnapshotAttributeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryModifyDBClusterSnapshotAttributeResult ( data . ModifyDBClusterSnapshotAttributeResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyDBClusterSnapshotAttributeCommandError = async ( output , context ) : Promise < ModifyDBClusterSnapshotAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterSnapshotNotFoundFault" : case "com.amazonaws.rds#DBClusterSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterSnapshotStateFault" : case "com.amazonaws.rds#InvalidDBClusterSnapshotStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterSnapshotStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SharedSnapshotQuotaExceededFault" : case "com.amazonaws.rds#SharedSnapshotQuotaExceededFault" : response = { ... ( await deserializeAws_querySharedSnapshotQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyDBInstanceCommand = async ( output , context ) : Promise < ModifyDBInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyDBInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryModifyDBInstanceResult ( data . ModifyDBInstanceResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyDBInstanceCommandError = async ( output , context ) : Promise < ModifyDBInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AuthorizationNotFoundFault" : case "com.amazonaws.rds#AuthorizationNotFoundFault" : response = { ... ( await deserializeAws_queryAuthorizationNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "BackupPolicyNotFoundFault" : case "com.amazonaws.rds#BackupPolicyNotFoundFault" : response = { ... ( await deserializeAws_queryBackupPolicyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "CertificateNotFoundFault" : case "com.amazonaws.rds#CertificateNotFoundFault" : response = { ... ( await deserializeAws_queryCertificateNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceAlreadyExistsFault" : case "com.amazonaws.rds#DBInstanceAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBInstanceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSecurityGroupNotFoundFault" : case "com.amazonaws.rds#DBSecurityGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSecurityGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBUpgradeDependencyFailureFault" : case "com.amazonaws.rds#DBUpgradeDependencyFailureFault" : response = { ... ( await deserializeAws_queryDBUpgradeDependencyFailureFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DomainNotFoundFault" : case "com.amazonaws.rds#DomainNotFoundFault" : response = { ... ( await deserializeAws_queryDomainNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientDBInstanceCapacityFault" : case "com.amazonaws.rds#InsufficientDBInstanceCapacityFault" : response = { ... ( await deserializeAws_queryInsufficientDBInstanceCapacityFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSecurityGroupStateFault" : case "com.amazonaws.rds#InvalidDBSecurityGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidDBSecurityGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidVPCNetworkStateFault" : case "com.amazonaws.rds#InvalidVPCNetworkStateFault" : response = { ... ( await deserializeAws_queryInvalidVPCNetworkStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OptionGroupNotFoundFault" : case "com.amazonaws.rds#OptionGroupNotFoundFault" : response = { ... ( await deserializeAws_queryOptionGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ProvisionedIopsNotAvailableInAZFault" : case "com.amazonaws.rds#ProvisionedIopsNotAvailableInAZFault" : response = { ... ( await deserializeAws_queryProvisionedIopsNotAvailableInAZFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageQuotaExceededFault" : case "com.amazonaws.rds#StorageQuotaExceededFault" : response = { ... ( await deserializeAws_queryStorageQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageTypeNotSupportedFault" : case "com.amazonaws.rds#StorageTypeNotSupportedFault" : response = { ... ( await deserializeAws_queryStorageTypeNotSupportedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyDBParameterGroupCommand = async ( output , context ) : Promise < ModifyDBParameterGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyDBParameterGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBParameterGroupNameMessage ( data . ModifyDBParameterGroupResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyDBParameterGroupCommandError = async ( output , context ) : Promise < ModifyDBParameterGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBParameterGroupStateFault" : case "com.amazonaws.rds#InvalidDBParameterGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidDBParameterGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyDBProxyCommand = async ( output , context ) : Promise < ModifyDBProxyCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyDBProxyCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryModifyDBProxyResponse ( data . ModifyDBProxyResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyDBProxyCommandError = async ( output , context ) : Promise < ModifyDBProxyCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBProxyAlreadyExistsFault" : case "com.amazonaws.rds#DBProxyAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBProxyAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyNotFoundFault" : case "com.amazonaws.rds#DBProxyNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBProxyStateFault" : case "com.amazonaws.rds#InvalidDBProxyStateFault" : response = { ... ( await deserializeAws_queryInvalidDBProxyStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyDBProxyEndpointCommand = async ( output , context ) : Promise < ModifyDBProxyEndpointCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyDBProxyEndpointCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryModifyDBProxyEndpointResponse ( data . ModifyDBProxyEndpointResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyDBProxyEndpointCommandError = async ( output , context ) : Promise < ModifyDBProxyEndpointCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBProxyEndpointAlreadyExistsFault" : case "com.amazonaws.rds#DBProxyEndpointAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBProxyEndpointAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyEndpointNotFoundFault" : case "com.amazonaws.rds#DBProxyEndpointNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyEndpointNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBProxyEndpointStateFault" : case "com.amazonaws.rds#InvalidDBProxyEndpointStateFault" : response = { ... ( await deserializeAws_queryInvalidDBProxyEndpointStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBProxyStateFault" : case "com.amazonaws.rds#InvalidDBProxyStateFault" : response = { ... ( await deserializeAws_queryInvalidDBProxyStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyDBProxyTargetGroupCommand = async ( output , context ) : Promise < ModifyDBProxyTargetGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyDBProxyTargetGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryModifyDBProxyTargetGroupResponse ( data . ModifyDBProxyTargetGroupResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyDBProxyTargetGroupCommandError = async ( output , context ) : Promise < ModifyDBProxyTargetGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBProxyNotFoundFault" : case "com.amazonaws.rds#DBProxyNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyTargetGroupNotFoundFault" : case "com.amazonaws.rds#DBProxyTargetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyTargetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBProxyStateFault" : case "com.amazonaws.rds#InvalidDBProxyStateFault" : response = { ... ( await deserializeAws_queryInvalidDBProxyStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyDBSnapshotCommand = async ( output , context ) : Promise < ModifyDBSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyDBSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryModifyDBSnapshotResult ( data . ModifyDBSnapshotResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyDBSnapshotCommandError = async ( output , context ) : Promise < ModifyDBSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBSnapshotNotFoundFault" : case "com.amazonaws.rds#DBSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyDBSnapshotAttributeCommand = async ( output , context ) : Promise < ModifyDBSnapshotAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyDBSnapshotAttributeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryModifyDBSnapshotAttributeResult ( data . ModifyDBSnapshotAttributeResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyDBSnapshotAttributeCommandError = async ( output , context ) : Promise < ModifyDBSnapshotAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBSnapshotNotFoundFault" : case "com.amazonaws.rds#DBSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSnapshotStateFault" : case "com.amazonaws.rds#InvalidDBSnapshotStateFault" : response = { ... ( await deserializeAws_queryInvalidDBSnapshotStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SharedSnapshotQuotaExceededFault" : case "com.amazonaws.rds#SharedSnapshotQuotaExceededFault" : response = { ... ( await deserializeAws_querySharedSnapshotQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyDBSubnetGroupCommand = async ( output , context ) : Promise < ModifyDBSubnetGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyDBSubnetGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryModifyDBSubnetGroupResult ( data . ModifyDBSubnetGroupResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyDBSubnetGroupCommandError = async ( output , context ) : Promise < ModifyDBSubnetGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBSubnetGroupDoesNotCoverEnoughAZs" : case "com.amazonaws.rds#DBSubnetGroupDoesNotCoverEnoughAZs" : response = { ... ( await deserializeAws_queryDBSubnetGroupDoesNotCoverEnoughAZsResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupNotFoundFault" : case "com.amazonaws.rds#DBSubnetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetQuotaExceededFault" : case "com.amazonaws.rds#DBSubnetQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBSubnetQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.rds#InvalidSubnet" : response = { ... ( await deserializeAws_queryInvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SubnetAlreadyInUse" : case "com.amazonaws.rds#SubnetAlreadyInUse" : response = { ... ( await deserializeAws_querySubnetAlreadyInUseResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyEventSubscriptionCommand = async ( output , context ) : Promise < ModifyEventSubscriptionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyEventSubscriptionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryModifyEventSubscriptionResult ( data . ModifyEventSubscriptionResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyEventSubscriptionCommandError = async ( output , context ) : Promise < ModifyEventSubscriptionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "EventSubscriptionQuotaExceededFault" : case "com.amazonaws.rds#EventSubscriptionQuotaExceededFault" : response = { ... ( await deserializeAws_queryEventSubscriptionQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SNSInvalidTopicFault" : case "com.amazonaws.rds#SNSInvalidTopicFault" : response = { ... ( await deserializeAws_querySNSInvalidTopicFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SNSNoAuthorizationFault" : case "com.amazonaws.rds#SNSNoAuthorizationFault" : response = { ... ( await deserializeAws_querySNSNoAuthorizationFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SNSTopicArnNotFoundFault" : case "com.amazonaws.rds#SNSTopicArnNotFoundFault" : response = { ... ( await deserializeAws_querySNSTopicArnNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SubscriptionCategoryNotFoundFault" : case "com.amazonaws.rds#SubscriptionCategoryNotFoundFault" : response = { ... ( await deserializeAws_querySubscriptionCategoryNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SubscriptionNotFoundFault" : case "com.amazonaws.rds#SubscriptionNotFoundFault" : response = { ... ( await deserializeAws_querySubscriptionNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyGlobalClusterCommand = async ( output , context ) : Promise < ModifyGlobalClusterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyGlobalClusterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryModifyGlobalClusterResult ( data . ModifyGlobalClusterResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyGlobalClusterCommandError = async ( output , context ) : Promise < ModifyGlobalClusterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "GlobalClusterNotFoundFault" : case "com.amazonaws.rds#GlobalClusterNotFoundFault" : response = { ... ( await deserializeAws_queryGlobalClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidGlobalClusterStateFault" : case "com.amazonaws.rds#InvalidGlobalClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidGlobalClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryModifyOptionGroupCommand = async ( output , context ) : Promise < ModifyOptionGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryModifyOptionGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryModifyOptionGroupResult ( data . ModifyOptionGroupResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryModifyOptionGroupCommandError = async ( output , context ) : Promise < ModifyOptionGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidOptionGroupStateFault" : case "com.amazonaws.rds#InvalidOptionGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidOptionGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OptionGroupNotFoundFault" : case "com.amazonaws.rds#OptionGroupNotFoundFault" : response = { ... ( await deserializeAws_queryOptionGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryPromoteReadReplicaCommand = async ( output , context ) : Promise < PromoteReadReplicaCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryPromoteReadReplicaCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryPromoteReadReplicaResult ( data . PromoteReadReplicaResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryPromoteReadReplicaCommandError = async ( output , context ) : Promise < PromoteReadReplicaCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryPromoteReadReplicaDBClusterCommand = async ( output , context ) : Promise < PromoteReadReplicaDBClusterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryPromoteReadReplicaDBClusterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryPromoteReadReplicaDBClusterResult ( data . PromoteReadReplicaDBClusterResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryPromoteReadReplicaDBClusterCommandError = async ( output , context ) : Promise < PromoteReadReplicaDBClusterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryPurchaseReservedDBInstancesOfferingCommand = async ( output , context ) : Promise < PurchaseReservedDBInstancesOfferingCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryPurchaseReservedDBInstancesOfferingCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryPurchaseReservedDBInstancesOfferingResult ( data . PurchaseReservedDBInstancesOfferingResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryPurchaseReservedDBInstancesOfferingCommandError = async ( output , context ) : Promise < PurchaseReservedDBInstancesOfferingCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ReservedDBInstanceAlreadyExistsFault" : case "com.amazonaws.rds#ReservedDBInstanceAlreadyExistsFault" : response = { ... ( await deserializeAws_queryReservedDBInstanceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ReservedDBInstanceQuotaExceededFault" : case "com.amazonaws.rds#ReservedDBInstanceQuotaExceededFault" : response = { ... ( await deserializeAws_queryReservedDBInstanceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ReservedDBInstancesOfferingNotFoundFault" : case "com.amazonaws.rds#ReservedDBInstancesOfferingNotFoundFault" : response = { ... ( await deserializeAws_queryReservedDBInstancesOfferingNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryRebootDBClusterCommand = async ( output , context ) : Promise < RebootDBClusterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryRebootDBClusterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryRebootDBClusterResult ( data . RebootDBClusterResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryRebootDBClusterCommandError = async ( output , context ) : Promise < RebootDBClusterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryRebootDBInstanceCommand = async ( output , context ) : Promise < RebootDBInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryRebootDBInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryRebootDBInstanceResult ( data . RebootDBInstanceResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryRebootDBInstanceCommandError = async ( output , context ) : Promise < RebootDBInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryRegisterDBProxyTargetsCommand = async ( output , context ) : Promise < RegisterDBProxyTargetsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryRegisterDBProxyTargetsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryRegisterDBProxyTargetsResponse ( data . RegisterDBProxyTargetsResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryRegisterDBProxyTargetsCommandError = async ( output , context ) : Promise < RegisterDBProxyTargetsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyNotFoundFault" : case "com.amazonaws.rds#DBProxyNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyTargetAlreadyRegisteredFault" : case "com.amazonaws.rds#DBProxyTargetAlreadyRegisteredFault" : response = { ... ( await deserializeAws_queryDBProxyTargetAlreadyRegisteredFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyTargetGroupNotFoundFault" : case "com.amazonaws.rds#DBProxyTargetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyTargetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientAvailableIPsInSubnetFault" : case "com.amazonaws.rds#InsufficientAvailableIPsInSubnetFault" : response = { ... ( await deserializeAws_queryInsufficientAvailableIPsInSubnetFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBProxyStateFault" : case "com.amazonaws.rds#InvalidDBProxyStateFault" : response = { ... ( await deserializeAws_queryInvalidDBProxyStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryRemoveFromGlobalClusterCommand = async ( output , context ) : Promise < RemoveFromGlobalClusterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryRemoveFromGlobalClusterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryRemoveFromGlobalClusterResult ( data . RemoveFromGlobalClusterResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryRemoveFromGlobalClusterCommandError = async ( output , context ) : Promise < RemoveFromGlobalClusterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "GlobalClusterNotFoundFault" : case "com.amazonaws.rds#GlobalClusterNotFoundFault" : response = { ... ( await deserializeAws_queryGlobalClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidGlobalClusterStateFault" : case "com.amazonaws.rds#InvalidGlobalClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidGlobalClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryRemoveRoleFromDBClusterCommand = async ( output , context ) : Promise < RemoveRoleFromDBClusterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryRemoveRoleFromDBClusterCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryRemoveRoleFromDBClusterCommandError = async ( output , context ) : Promise < RemoveRoleFromDBClusterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterRoleNotFoundFault" : case "com.amazonaws.rds#DBClusterRoleNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterRoleNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryRemoveRoleFromDBInstanceCommand = async ( output , context ) : Promise < RemoveRoleFromDBInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryRemoveRoleFromDBInstanceCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryRemoveRoleFromDBInstanceCommandError = async ( output , context ) : Promise < RemoveRoleFromDBInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceRoleNotFoundFault" : case "com.amazonaws.rds#DBInstanceRoleNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceRoleNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryRemoveSourceIdentifierFromSubscriptionCommand = async ( output , context ) : Promise < RemoveSourceIdentifierFromSubscriptionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryRemoveSourceIdentifierFromSubscriptionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryRemoveSourceIdentifierFromSubscriptionResult ( data . RemoveSourceIdentifierFromSubscriptionResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryRemoveSourceIdentifierFromSubscriptionCommandError = async ( output , context ) : Promise < RemoveSourceIdentifierFromSubscriptionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "SourceNotFoundFault" : case "com.amazonaws.rds#SourceNotFoundFault" : response = { ... ( await deserializeAws_querySourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SubscriptionNotFoundFault" : case "com.amazonaws.rds#SubscriptionNotFoundFault" : response = { ... ( await deserializeAws_querySubscriptionNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryRemoveTagsFromResourceCommand = async ( output , context ) : Promise < RemoveTagsFromResourceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryRemoveTagsFromResourceCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryRemoveTagsFromResourceCommandError = async ( output , context ) : Promise < RemoveTagsFromResourceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyNotFoundFault" : case "com.amazonaws.rds#DBProxyNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBProxyTargetGroupNotFoundFault" : case "com.amazonaws.rds#DBProxyTargetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBProxyTargetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSnapshotNotFoundFault" : case "com.amazonaws.rds#DBSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryResetDBClusterParameterGroupCommand = async ( output , context ) : Promise < ResetDBClusterParameterGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryResetDBClusterParameterGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBClusterParameterGroupNameMessage ( data . ResetDBClusterParameterGroupResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryResetDBClusterParameterGroupCommandError = async ( output , context ) : Promise < ResetDBClusterParameterGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBParameterGroupStateFault" : case "com.amazonaws.rds#InvalidDBParameterGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidDBParameterGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryResetDBParameterGroupCommand = async ( output , context ) : Promise < ResetDBParameterGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryResetDBParameterGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryDBParameterGroupNameMessage ( data . ResetDBParameterGroupResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryResetDBParameterGroupCommandError = async ( output , context ) : Promise < ResetDBParameterGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBParameterGroupStateFault" : case "com.amazonaws.rds#InvalidDBParameterGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidDBParameterGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryRestoreDBClusterFromS3Command = async ( output , context ) : Promise < RestoreDBClusterFromS3CommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryRestoreDBClusterFromS3CommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryRestoreDBClusterFromS3Result ( data . RestoreDBClusterFromS3Result , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryRestoreDBClusterFromS3CommandError = async ( output , context ) : Promise < RestoreDBClusterFromS3CommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterAlreadyExistsFault" : case "com.amazonaws.rds#DBClusterAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBClusterAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBClusterParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterQuotaExceededFault" : case "com.amazonaws.rds#DBClusterQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBClusterQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupNotFoundFault" : case "com.amazonaws.rds#DBSubnetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DomainNotFoundFault" : case "com.amazonaws.rds#DomainNotFoundFault" : response = { ... ( await deserializeAws_queryDomainNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientStorageClusterCapacityFault" : case "com.amazonaws.rds#InsufficientStorageClusterCapacityFault" : response = { ... ( await deserializeAws_queryInsufficientStorageClusterCapacityFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSubnetGroupStateFault" : case "com.amazonaws.rds#InvalidDBSubnetGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidDBSubnetGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidS3BucketFault" : case "com.amazonaws.rds#InvalidS3BucketFault" : response = { ... ( await deserializeAws_queryInvalidS3BucketFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.rds#InvalidSubnet" : response = { ... ( await deserializeAws_queryInvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidVPCNetworkStateFault" : case "com.amazonaws.rds#InvalidVPCNetworkStateFault" : response = { ... ( await deserializeAws_queryInvalidVPCNetworkStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageQuotaExceededFault" : case "com.amazonaws.rds#StorageQuotaExceededFault" : response = { ... ( await deserializeAws_queryStorageQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryRestoreDBClusterFromSnapshotCommand = async ( output , context ) : Promise < RestoreDBClusterFromSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryRestoreDBClusterFromSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryRestoreDBClusterFromSnapshotResult ( data . RestoreDBClusterFromSnapshotResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryRestoreDBClusterFromSnapshotCommandError = async ( output , context ) : Promise < RestoreDBClusterFromSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterAlreadyExistsFault" : case "com.amazonaws.rds#DBClusterAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBClusterAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBClusterParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterQuotaExceededFault" : case "com.amazonaws.rds#DBClusterQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBClusterQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterSnapshotNotFoundFault" : case "com.amazonaws.rds#DBClusterSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSnapshotNotFoundFault" : case "com.amazonaws.rds#DBSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupNotFoundFault" : case "com.amazonaws.rds#DBSubnetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DomainNotFoundFault" : case "com.amazonaws.rds#DomainNotFoundFault" : response = { ... ( await deserializeAws_queryDomainNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientDBClusterCapacityFault" : case "com.amazonaws.rds#InsufficientDBClusterCapacityFault" : response = { ... ( await deserializeAws_queryInsufficientDBClusterCapacityFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientStorageClusterCapacityFault" : case "com.amazonaws.rds#InsufficientStorageClusterCapacityFault" : response = { ... ( await deserializeAws_queryInsufficientStorageClusterCapacityFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterSnapshotStateFault" : case "com.amazonaws.rds#InvalidDBClusterSnapshotStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterSnapshotStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSnapshotStateFault" : case "com.amazonaws.rds#InvalidDBSnapshotStateFault" : response = { ... ( await deserializeAws_queryInvalidDBSnapshotStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidRestoreFault" : case "com.amazonaws.rds#InvalidRestoreFault" : response = { ... ( await deserializeAws_queryInvalidRestoreFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.rds#InvalidSubnet" : response = { ... ( await deserializeAws_queryInvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidVPCNetworkStateFault" : case "com.amazonaws.rds#InvalidVPCNetworkStateFault" : response = { ... ( await deserializeAws_queryInvalidVPCNetworkStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OptionGroupNotFoundFault" : case "com.amazonaws.rds#OptionGroupNotFoundFault" : response = { ... ( await deserializeAws_queryOptionGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageQuotaExceededFault" : case "com.amazonaws.rds#StorageQuotaExceededFault" : response = { ... ( await deserializeAws_queryStorageQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryRestoreDBClusterToPointInTimeCommand = async ( output , context ) : Promise < RestoreDBClusterToPointInTimeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryRestoreDBClusterToPointInTimeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryRestoreDBClusterToPointInTimeResult ( data . RestoreDBClusterToPointInTimeResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryRestoreDBClusterToPointInTimeCommandError = async ( output , context ) : Promise < RestoreDBClusterToPointInTimeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterAlreadyExistsFault" : case "com.amazonaws.rds#DBClusterAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBClusterAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBClusterParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterQuotaExceededFault" : case "com.amazonaws.rds#DBClusterQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBClusterQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterSnapshotNotFoundFault" : case "com.amazonaws.rds#DBClusterSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupNotFoundFault" : case "com.amazonaws.rds#DBSubnetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DomainNotFoundFault" : case "com.amazonaws.rds#DomainNotFoundFault" : response = { ... ( await deserializeAws_queryDomainNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientDBClusterCapacityFault" : case "com.amazonaws.rds#InsufficientDBClusterCapacityFault" : response = { ... ( await deserializeAws_queryInsufficientDBClusterCapacityFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientStorageClusterCapacityFault" : case "com.amazonaws.rds#InsufficientStorageClusterCapacityFault" : response = { ... ( await deserializeAws_queryInsufficientStorageClusterCapacityFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterSnapshotStateFault" : case "com.amazonaws.rds#InvalidDBClusterSnapshotStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterSnapshotStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSnapshotStateFault" : case "com.amazonaws.rds#InvalidDBSnapshotStateFault" : response = { ... ( await deserializeAws_queryInvalidDBSnapshotStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidRestoreFault" : case "com.amazonaws.rds#InvalidRestoreFault" : response = { ... ( await deserializeAws_queryInvalidRestoreFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.rds#InvalidSubnet" : response = { ... ( await deserializeAws_queryInvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidVPCNetworkStateFault" : case "com.amazonaws.rds#InvalidVPCNetworkStateFault" : response = { ... ( await deserializeAws_queryInvalidVPCNetworkStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OptionGroupNotFoundFault" : case "com.amazonaws.rds#OptionGroupNotFoundFault" : response = { ... ( await deserializeAws_queryOptionGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageQuotaExceededFault" : case "com.amazonaws.rds#StorageQuotaExceededFault" : response = { ... ( await deserializeAws_queryStorageQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryRestoreDBInstanceFromDBSnapshotCommand = async ( output , context ) : Promise < RestoreDBInstanceFromDBSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryRestoreDBInstanceFromDBSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryRestoreDBInstanceFromDBSnapshotResult ( data . RestoreDBInstanceFromDBSnapshotResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryRestoreDBInstanceFromDBSnapshotCommandError = async ( output , context ) : Promise < RestoreDBInstanceFromDBSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AuthorizationNotFoundFault" : case "com.amazonaws.rds#AuthorizationNotFoundFault" : response = { ... ( await deserializeAws_queryAuthorizationNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "BackupPolicyNotFoundFault" : case "com.amazonaws.rds#BackupPolicyNotFoundFault" : response = { ... ( await deserializeAws_queryBackupPolicyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceAlreadyExistsFault" : case "com.amazonaws.rds#DBInstanceAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBInstanceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSecurityGroupNotFoundFault" : case "com.amazonaws.rds#DBSecurityGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSecurityGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSnapshotNotFoundFault" : case "com.amazonaws.rds#DBSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupDoesNotCoverEnoughAZs" : case "com.amazonaws.rds#DBSubnetGroupDoesNotCoverEnoughAZs" : response = { ... ( await deserializeAws_queryDBSubnetGroupDoesNotCoverEnoughAZsResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupNotFoundFault" : case "com.amazonaws.rds#DBSubnetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DomainNotFoundFault" : case "com.amazonaws.rds#DomainNotFoundFault" : response = { ... ( await deserializeAws_queryDomainNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InstanceQuotaExceededFault" : case "com.amazonaws.rds#InstanceQuotaExceededFault" : response = { ... ( await deserializeAws_queryInstanceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientDBInstanceCapacityFault" : case "com.amazonaws.rds#InsufficientDBInstanceCapacityFault" : response = { ... ( await deserializeAws_queryInsufficientDBInstanceCapacityFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSnapshotStateFault" : case "com.amazonaws.rds#InvalidDBSnapshotStateFault" : response = { ... ( await deserializeAws_queryInvalidDBSnapshotStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidRestoreFault" : case "com.amazonaws.rds#InvalidRestoreFault" : response = { ... ( await deserializeAws_queryInvalidRestoreFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.rds#InvalidSubnet" : response = { ... ( await deserializeAws_queryInvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidVPCNetworkStateFault" : case "com.amazonaws.rds#InvalidVPCNetworkStateFault" : response = { ... ( await deserializeAws_queryInvalidVPCNetworkStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OptionGroupNotFoundFault" : case "com.amazonaws.rds#OptionGroupNotFoundFault" : response = { ... ( await deserializeAws_queryOptionGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ProvisionedIopsNotAvailableInAZFault" : case "com.amazonaws.rds#ProvisionedIopsNotAvailableInAZFault" : response = { ... ( await deserializeAws_queryProvisionedIopsNotAvailableInAZFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageQuotaExceededFault" : case "com.amazonaws.rds#StorageQuotaExceededFault" : response = { ... ( await deserializeAws_queryStorageQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageTypeNotSupportedFault" : case "com.amazonaws.rds#StorageTypeNotSupportedFault" : response = { ... ( await deserializeAws_queryStorageTypeNotSupportedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryRestoreDBInstanceFromS3Command = async ( output , context ) : Promise < RestoreDBInstanceFromS3CommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryRestoreDBInstanceFromS3CommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryRestoreDBInstanceFromS3Result ( data . RestoreDBInstanceFromS3Result , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryRestoreDBInstanceFromS3CommandError = async ( output , context ) : Promise < RestoreDBInstanceFromS3CommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AuthorizationNotFoundFault" : case "com.amazonaws.rds#AuthorizationNotFoundFault" : response = { ... ( await deserializeAws_queryAuthorizationNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "BackupPolicyNotFoundFault" : case "com.amazonaws.rds#BackupPolicyNotFoundFault" : response = { ... ( await deserializeAws_queryBackupPolicyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceAlreadyExistsFault" : case "com.amazonaws.rds#DBInstanceAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBInstanceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSecurityGroupNotFoundFault" : case "com.amazonaws.rds#DBSecurityGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSecurityGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupDoesNotCoverEnoughAZs" : case "com.amazonaws.rds#DBSubnetGroupDoesNotCoverEnoughAZs" : response = { ... ( await deserializeAws_queryDBSubnetGroupDoesNotCoverEnoughAZsResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupNotFoundFault" : case "com.amazonaws.rds#DBSubnetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InstanceQuotaExceededFault" : case "com.amazonaws.rds#InstanceQuotaExceededFault" : response = { ... ( await deserializeAws_queryInstanceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientDBInstanceCapacityFault" : case "com.amazonaws.rds#InsufficientDBInstanceCapacityFault" : response = { ... ( await deserializeAws_queryInsufficientDBInstanceCapacityFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidS3BucketFault" : case "com.amazonaws.rds#InvalidS3BucketFault" : response = { ... ( await deserializeAws_queryInvalidS3BucketFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.rds#InvalidSubnet" : response = { ... ( await deserializeAws_queryInvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidVPCNetworkStateFault" : case "com.amazonaws.rds#InvalidVPCNetworkStateFault" : response = { ... ( await deserializeAws_queryInvalidVPCNetworkStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OptionGroupNotFoundFault" : case "com.amazonaws.rds#OptionGroupNotFoundFault" : response = { ... ( await deserializeAws_queryOptionGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ProvisionedIopsNotAvailableInAZFault" : case "com.amazonaws.rds#ProvisionedIopsNotAvailableInAZFault" : response = { ... ( await deserializeAws_queryProvisionedIopsNotAvailableInAZFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageQuotaExceededFault" : case "com.amazonaws.rds#StorageQuotaExceededFault" : response = { ... ( await deserializeAws_queryStorageQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageTypeNotSupportedFault" : case "com.amazonaws.rds#StorageTypeNotSupportedFault" : response = { ... ( await deserializeAws_queryStorageTypeNotSupportedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryRestoreDBInstanceToPointInTimeCommand = async ( output , context ) : Promise < RestoreDBInstanceToPointInTimeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryRestoreDBInstanceToPointInTimeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryRestoreDBInstanceToPointInTimeResult ( data . RestoreDBInstanceToPointInTimeResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryRestoreDBInstanceToPointInTimeCommandError = async ( output , context ) : Promise < RestoreDBInstanceToPointInTimeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AuthorizationNotFoundFault" : case "com.amazonaws.rds#AuthorizationNotFoundFault" : response = { ... ( await deserializeAws_queryAuthorizationNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "BackupPolicyNotFoundFault" : case "com.amazonaws.rds#BackupPolicyNotFoundFault" : response = { ... ( await deserializeAws_queryBackupPolicyNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceAlreadyExistsFault" : case "com.amazonaws.rds#DBInstanceAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBInstanceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceAutomatedBackupNotFoundFault" : case "com.amazonaws.rds#DBInstanceAutomatedBackupNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceAutomatedBackupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBParameterGroupNotFoundFault" : case "com.amazonaws.rds#DBParameterGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBParameterGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSecurityGroupNotFoundFault" : case "com.amazonaws.rds#DBSecurityGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSecurityGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupDoesNotCoverEnoughAZs" : case "com.amazonaws.rds#DBSubnetGroupDoesNotCoverEnoughAZs" : response = { ... ( await deserializeAws_queryDBSubnetGroupDoesNotCoverEnoughAZsResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupNotFoundFault" : case "com.amazonaws.rds#DBSubnetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DomainNotFoundFault" : case "com.amazonaws.rds#DomainNotFoundFault" : response = { ... ( await deserializeAws_queryDomainNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InstanceQuotaExceededFault" : case "com.amazonaws.rds#InstanceQuotaExceededFault" : response = { ... ( await deserializeAws_queryInstanceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientDBInstanceCapacityFault" : case "com.amazonaws.rds#InsufficientDBInstanceCapacityFault" : response = { ... ( await deserializeAws_queryInsufficientDBInstanceCapacityFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidRestoreFault" : case "com.amazonaws.rds#InvalidRestoreFault" : response = { ... ( await deserializeAws_queryInvalidRestoreFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.rds#InvalidSubnet" : response = { ... ( await deserializeAws_queryInvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidVPCNetworkStateFault" : case "com.amazonaws.rds#InvalidVPCNetworkStateFault" : response = { ... ( await deserializeAws_queryInvalidVPCNetworkStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OptionGroupNotFoundFault" : case "com.amazonaws.rds#OptionGroupNotFoundFault" : response = { ... ( await deserializeAws_queryOptionGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "PointInTimeRestoreNotEnabledFault" : case "com.amazonaws.rds#PointInTimeRestoreNotEnabledFault" : response = { ... ( await deserializeAws_queryPointInTimeRestoreNotEnabledFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ProvisionedIopsNotAvailableInAZFault" : case "com.amazonaws.rds#ProvisionedIopsNotAvailableInAZFault" : response = { ... ( await deserializeAws_queryProvisionedIopsNotAvailableInAZFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageQuotaExceededFault" : case "com.amazonaws.rds#StorageQuotaExceededFault" : response = { ... ( await deserializeAws_queryStorageQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageTypeNotSupportedFault" : case "com.amazonaws.rds#StorageTypeNotSupportedFault" : response = { ... ( await deserializeAws_queryStorageTypeNotSupportedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryRevokeDBSecurityGroupIngressCommand = async ( output , context ) : Promise < RevokeDBSecurityGroupIngressCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryRevokeDBSecurityGroupIngressCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryRevokeDBSecurityGroupIngressResult ( data . RevokeDBSecurityGroupIngressResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryRevokeDBSecurityGroupIngressCommandError = async ( output , context ) : Promise < RevokeDBSecurityGroupIngressCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AuthorizationNotFoundFault" : case "com.amazonaws.rds#AuthorizationNotFoundFault" : response = { ... ( await deserializeAws_queryAuthorizationNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSecurityGroupNotFoundFault" : case "com.amazonaws.rds#DBSecurityGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSecurityGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBSecurityGroupStateFault" : case "com.amazonaws.rds#InvalidDBSecurityGroupStateFault" : response = { ... ( await deserializeAws_queryInvalidDBSecurityGroupStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryStartActivityStreamCommand = async ( output , context ) : Promise < StartActivityStreamCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryStartActivityStreamCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryStartActivityStreamResponse ( data . StartActivityStreamResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryStartActivityStreamCommandError = async ( output , context ) : Promise < StartActivityStreamCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.rds#ResourceNotFoundFault" : response = { ... ( await deserializeAws_queryResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryStartDBClusterCommand = async ( output , context ) : Promise < StartDBClusterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryStartDBClusterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryStartDBClusterResult ( data . StartDBClusterResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryStartDBClusterCommandError = async ( output , context ) : Promise < StartDBClusterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryStartDBInstanceCommand = async ( output , context ) : Promise < StartDBInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryStartDBInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryStartDBInstanceResult ( data . StartDBInstanceResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryStartDBInstanceCommandError = async ( output , context ) : Promise < StartDBInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AuthorizationNotFoundFault" : case "com.amazonaws.rds#AuthorizationNotFoundFault" : response = { ... ( await deserializeAws_queryAuthorizationNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupDoesNotCoverEnoughAZs" : case "com.amazonaws.rds#DBSubnetGroupDoesNotCoverEnoughAZs" : response = { ... ( await deserializeAws_queryDBSubnetGroupDoesNotCoverEnoughAZsResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSubnetGroupNotFoundFault" : case "com.amazonaws.rds#DBSubnetGroupNotFoundFault" : response = { ... ( await deserializeAws_queryDBSubnetGroupNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientDBInstanceCapacityFault" : case "com.amazonaws.rds#InsufficientDBInstanceCapacityFault" : response = { ... ( await deserializeAws_queryInsufficientDBInstanceCapacityFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.rds#InvalidSubnet" : response = { ... ( await deserializeAws_queryInvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidVPCNetworkStateFault" : case "com.amazonaws.rds#InvalidVPCNetworkStateFault" : response = { ... ( await deserializeAws_queryInvalidVPCNetworkStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryStartDBInstanceAutomatedBackupsReplicationCommand = async ( output , context ) : Promise < StartDBInstanceAutomatedBackupsReplicationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryStartDBInstanceAutomatedBackupsReplicationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryStartDBInstanceAutomatedBackupsReplicationResult ( data . StartDBInstanceAutomatedBackupsReplicationResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryStartDBInstanceAutomatedBackupsReplicationCommandError = async ( output , context ) : Promise < StartDBInstanceAutomatedBackupsReplicationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBInstanceAutomatedBackupQuotaExceededFault" : case "com.amazonaws.rds#DBInstanceAutomatedBackupQuotaExceededFault" : response = { ... ( await deserializeAws_queryDBInstanceAutomatedBackupQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageTypeNotSupportedFault" : case "com.amazonaws.rds#StorageTypeNotSupportedFault" : response = { ... ( await deserializeAws_queryStorageTypeNotSupportedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryStartExportTaskCommand = async ( output , context ) : Promise < StartExportTaskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryStartExportTaskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryExportTask ( data . StartExportTaskResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryStartExportTaskCommandError = async ( output , context ) : Promise < StartExportTaskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterSnapshotNotFoundFault" : case "com.amazonaws.rds#DBClusterSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSnapshotNotFoundFault" : case "com.amazonaws.rds#DBSnapshotNotFoundFault" : response = { ... ( await deserializeAws_queryDBSnapshotNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ExportTaskAlreadyExistsFault" : case "com.amazonaws.rds#ExportTaskAlreadyExistsFault" : response = { ... ( await deserializeAws_queryExportTaskAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "IamRoleMissingPermissionsFault" : case "com.amazonaws.rds#IamRoleMissingPermissionsFault" : response = { ... ( await deserializeAws_queryIamRoleMissingPermissionsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "IamRoleNotFoundFault" : case "com.amazonaws.rds#IamRoleNotFoundFault" : response = { ... ( await deserializeAws_queryIamRoleNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidExportOnlyFault" : case "com.amazonaws.rds#InvalidExportOnlyFault" : response = { ... ( await deserializeAws_queryInvalidExportOnlyFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidExportSourceStateFault" : case "com.amazonaws.rds#InvalidExportSourceStateFault" : response = { ... ( await deserializeAws_queryInvalidExportSourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidS3BucketFault" : case "com.amazonaws.rds#InvalidS3BucketFault" : response = { ... ( await deserializeAws_queryInvalidS3BucketFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.rds#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_queryKMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryStopActivityStreamCommand = async ( output , context ) : Promise < StopActivityStreamCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryStopActivityStreamCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryStopActivityStreamResponse ( data . StopActivityStreamResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryStopActivityStreamCommandError = async ( output , context ) : Promise < StopActivityStreamCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.rds#ResourceNotFoundFault" : response = { ... ( await deserializeAws_queryResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryStopDBClusterCommand = async ( output , context ) : Promise < StopDBClusterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryStopDBClusterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryStopDBClusterResult ( data . StopDBClusterResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryStopDBClusterCommandError = async ( output , context ) : Promise < StopDBClusterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBClusterNotFoundFault" : case "com.amazonaws.rds#DBClusterNotFoundFault" : response = { ... ( await deserializeAws_queryDBClusterNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryStopDBInstanceCommand = async ( output , context ) : Promise < StopDBInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryStopDBInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryStopDBInstanceResult ( data . StopDBInstanceResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryStopDBInstanceCommandError = async ( output , context ) : Promise < StopDBInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "DBSnapshotAlreadyExistsFault" : case "com.amazonaws.rds#DBSnapshotAlreadyExistsFault" : response = { ... ( await deserializeAws_queryDBSnapshotAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBClusterStateFault" : case "com.amazonaws.rds#InvalidDBClusterStateFault" : response = { ... ( await deserializeAws_queryInvalidDBClusterStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SnapshotQuotaExceededFault" : case "com.amazonaws.rds#SnapshotQuotaExceededFault" : response = { ... ( await deserializeAws_querySnapshotQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_queryStopDBInstanceAutomatedBackupsReplicationCommand = async ( output , context ) : Promise < StopDBInstanceAutomatedBackupsReplicationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_queryStopDBInstanceAutomatedBackupsReplicationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_queryStopDBInstanceAutomatedBackupsReplicationResult ( data . StopDBInstanceAutomatedBackupsReplicationResult , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_queryStopDBInstanceAutomatedBackupsReplicationCommandError = async ( output , context ) : Promise < StopDBInstanceAutomatedBackupsReplicationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadQueryErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "DBInstanceNotFoundFault" : case "com.amazonaws.rds#DBInstanceNotFoundFault" : response = { ... ( await deserializeAws_queryDBInstanceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDBInstanceStateFault" : case "com.amazonaws.rds#InvalidDBInstanceStateFault" : response = { ... ( await deserializeAws_queryInvalidDBInstanceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Error . code || parsedBody . Error . Code || errorCode ; response = { ... parsedBody . Error , name : `${ errorCode }` , message : parsedBody . Error . message || parsedBody . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; const deserializeAws_queryAuthorizationAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < AuthorizationAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryAuthorizationAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "AuthorizationAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryAuthorizationNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < AuthorizationNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryAuthorizationNotFoundFault ( body . Error , context ) ; const contents = { name : "AuthorizationNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryAuthorizationQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < AuthorizationQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryAuthorizationQuotaExceededFault ( body . Error , context ) ; const contents = { name : "AuthorizationQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryBackupPolicyNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < BackupPolicyNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryBackupPolicyNotFoundFault ( body . Error , context ) ; const contents = { name : "BackupPolicyNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryCertificateNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < CertificateNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryCertificateNotFoundFault ( body . Error , context ) ; const contents = { name : "CertificateNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryCustomAvailabilityZoneAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < CustomAvailabilityZoneAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryCustomAvailabilityZoneAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "CustomAvailabilityZoneAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryCustomAvailabilityZoneNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < CustomAvailabilityZoneNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryCustomAvailabilityZoneNotFoundFault ( body . Error , context ) ; const contents = { name : "CustomAvailabilityZoneNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryCustomAvailabilityZoneQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < CustomAvailabilityZoneQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryCustomAvailabilityZoneQuotaExceededFault ( body . Error , context ) ; const contents = { name : "CustomAvailabilityZoneQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryCustomDBEngineVersionAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < CustomDBEngineVersionAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryCustomDBEngineVersionAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "CustomDBEngineVersionAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryCustomDBEngineVersionNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < CustomDBEngineVersionNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryCustomDBEngineVersionNotFoundFault ( body . Error , context ) ; const contents = { name : "CustomDBEngineVersionNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryCustomDBEngineVersionQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < CustomDBEngineVersionQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryCustomDBEngineVersionQuotaExceededFault ( body . Error , context ) ; const contents = { name : "CustomDBEngineVersionQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBClusterAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < DBClusterAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBClusterAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "DBClusterAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBClusterBacktrackNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBClusterBacktrackNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBClusterBacktrackNotFoundFault ( body . Error , context ) ; const contents = { name : "DBClusterBacktrackNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBClusterEndpointAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < DBClusterEndpointAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBClusterEndpointAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "DBClusterEndpointAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBClusterEndpointNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBClusterEndpointNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBClusterEndpointNotFoundFault ( body . Error , context ) ; const contents = { name : "DBClusterEndpointNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBClusterEndpointQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < DBClusterEndpointQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBClusterEndpointQuotaExceededFault ( body . Error , context ) ; const contents = { name : "DBClusterEndpointQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBClusterNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBClusterNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBClusterNotFoundFault ( body . Error , context ) ; const contents = { name : "DBClusterNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBClusterParameterGroupNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBClusterParameterGroupNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBClusterParameterGroupNotFoundFault ( body . Error , context ) ; const contents = { name : "DBClusterParameterGroupNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBClusterQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < DBClusterQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBClusterQuotaExceededFault ( body . Error , context ) ; const contents = { name : "DBClusterQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBClusterRoleAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < DBClusterRoleAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBClusterRoleAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "DBClusterRoleAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBClusterRoleNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBClusterRoleNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBClusterRoleNotFoundFault ( body . Error , context ) ; const contents = { name : "DBClusterRoleNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBClusterRoleQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < DBClusterRoleQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBClusterRoleQuotaExceededFault ( body . Error , context ) ; const contents = { name : "DBClusterRoleQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBClusterSnapshotAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < DBClusterSnapshotAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBClusterSnapshotAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "DBClusterSnapshotAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBClusterSnapshotNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBClusterSnapshotNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBClusterSnapshotNotFoundFault ( body . Error , context ) ; const contents = { name : "DBClusterSnapshotNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBInstanceAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < DBInstanceAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBInstanceAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "DBInstanceAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBInstanceAutomatedBackupNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBInstanceAutomatedBackupNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBInstanceAutomatedBackupNotFoundFault ( body . Error , context ) ; const contents = { name : "DBInstanceAutomatedBackupNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBInstanceAutomatedBackupQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < DBInstanceAutomatedBackupQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBInstanceAutomatedBackupQuotaExceededFault ( body . Error , context ) ; const contents = { name : "DBInstanceAutomatedBackupQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBInstanceNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBInstanceNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBInstanceNotFoundFault ( body . Error , context ) ; const contents = { name : "DBInstanceNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBInstanceRoleAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < DBInstanceRoleAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBInstanceRoleAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "DBInstanceRoleAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBInstanceRoleNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBInstanceRoleNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBInstanceRoleNotFoundFault ( body . Error , context ) ; const contents = { name : "DBInstanceRoleNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBInstanceRoleQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < DBInstanceRoleQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBInstanceRoleQuotaExceededFault ( body . Error , context ) ; const contents = { name : "DBInstanceRoleQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBLogFileNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBLogFileNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBLogFileNotFoundFault ( body . Error , context ) ; const contents = { name : "DBLogFileNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBParameterGroupAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < DBParameterGroupAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBParameterGroupAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "DBParameterGroupAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBParameterGroupNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBParameterGroupNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBParameterGroupNotFoundFault ( body . Error , context ) ; const contents = { name : "DBParameterGroupNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBParameterGroupQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < DBParameterGroupQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBParameterGroupQuotaExceededFault ( body . Error , context ) ; const contents = { name : "DBParameterGroupQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBProxyAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < DBProxyAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBProxyAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "DBProxyAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBProxyEndpointAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < DBProxyEndpointAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBProxyEndpointAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "DBProxyEndpointAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBProxyEndpointNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBProxyEndpointNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBProxyEndpointNotFoundFault ( body . Error , context ) ; const contents = { name : "DBProxyEndpointNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBProxyEndpointQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < DBProxyEndpointQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBProxyEndpointQuotaExceededFault ( body . Error , context ) ; const contents = { name : "DBProxyEndpointQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBProxyNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBProxyNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBProxyNotFoundFault ( body . Error , context ) ; const contents = { name : "DBProxyNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBProxyQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < DBProxyQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBProxyQuotaExceededFault ( body . Error , context ) ; const contents = { name : "DBProxyQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBProxyTargetAlreadyRegisteredFaultResponse = async ( parsedOutput , context ) : Promise < DBProxyTargetAlreadyRegisteredFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBProxyTargetAlreadyRegisteredFault ( body . Error , context ) ; const contents = { name : "DBProxyTargetAlreadyRegisteredFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBProxyTargetGroupNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBProxyTargetGroupNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBProxyTargetGroupNotFoundFault ( body . Error , context ) ; const contents = { name : "DBProxyTargetGroupNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBProxyTargetNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBProxyTargetNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBProxyTargetNotFoundFault ( body . Error , context ) ; const contents = { name : "DBProxyTargetNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBSecurityGroupAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < DBSecurityGroupAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBSecurityGroupAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "DBSecurityGroupAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBSecurityGroupNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBSecurityGroupNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBSecurityGroupNotFoundFault ( body . Error , context ) ; const contents = { name : "DBSecurityGroupNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBSecurityGroupNotSupportedFaultResponse = async ( parsedOutput , context ) : Promise < DBSecurityGroupNotSupportedFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBSecurityGroupNotSupportedFault ( body . Error , context ) ; const contents = { name : "DBSecurityGroupNotSupportedFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBSecurityGroupQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < DBSecurityGroupQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBSecurityGroupQuotaExceededFault ( body . Error , context ) ; const contents = { name : "DBSecurityGroupQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBSnapshotAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < DBSnapshotAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBSnapshotAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "DBSnapshotAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBSnapshotNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBSnapshotNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBSnapshotNotFoundFault ( body . Error , context ) ; const contents = { name : "DBSnapshotNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBSubnetGroupAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < DBSubnetGroupAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBSubnetGroupAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "DBSubnetGroupAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBSubnetGroupDoesNotCoverEnoughAZsResponse = async ( parsedOutput , context ) : Promise < DBSubnetGroupDoesNotCoverEnoughAZs > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBSubnetGroupDoesNotCoverEnoughAZs ( body . Error , context ) ; const contents = { name : "DBSubnetGroupDoesNotCoverEnoughAZs" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBSubnetGroupNotAllowedFaultResponse = async ( parsedOutput , context ) : Promise < DBSubnetGroupNotAllowedFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBSubnetGroupNotAllowedFault ( body . Error , context ) ; const contents = { name : "DBSubnetGroupNotAllowedFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBSubnetGroupNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DBSubnetGroupNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBSubnetGroupNotFoundFault ( body . Error , context ) ; const contents = { name : "DBSubnetGroupNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBSubnetGroupQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < DBSubnetGroupQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBSubnetGroupQuotaExceededFault ( body . Error , context ) ; const contents = { name : "DBSubnetGroupQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBSubnetQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < DBSubnetQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBSubnetQuotaExceededFault ( body . Error , context ) ; const contents = { name : "DBSubnetQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDBUpgradeDependencyFailureFaultResponse = async ( parsedOutput , context ) : Promise < DBUpgradeDependencyFailureFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDBUpgradeDependencyFailureFault ( body . Error , context ) ; const contents = { name : "DBUpgradeDependencyFailureFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryDomainNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < DomainNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryDomainNotFoundFault ( body . Error , context ) ; const contents = { name : "DomainNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryEventSubscriptionQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < EventSubscriptionQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryEventSubscriptionQuotaExceededFault ( body . Error , context ) ; const contents = { name : "EventSubscriptionQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryExportTaskAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < ExportTaskAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryExportTaskAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "ExportTaskAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryExportTaskNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < ExportTaskNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryExportTaskNotFoundFault ( body . Error , context ) ; const contents = { name : "ExportTaskNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryGlobalClusterAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < GlobalClusterAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryGlobalClusterAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "GlobalClusterAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryGlobalClusterNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < GlobalClusterNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryGlobalClusterNotFoundFault ( body . Error , context ) ; const contents = { name : "GlobalClusterNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryGlobalClusterQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < GlobalClusterQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryGlobalClusterQuotaExceededFault ( body . Error , context ) ; const contents = { name : "GlobalClusterQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryIamRoleMissingPermissionsFaultResponse = async ( parsedOutput , context ) : Promise < IamRoleMissingPermissionsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryIamRoleMissingPermissionsFault ( body . Error , context ) ; const contents = { name : "IamRoleMissingPermissionsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryIamRoleNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < IamRoleNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryIamRoleNotFoundFault ( body . Error , context ) ; const contents = { name : "IamRoleNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInstallationMediaAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < InstallationMediaAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInstallationMediaAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "InstallationMediaAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInstallationMediaNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < InstallationMediaNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInstallationMediaNotFoundFault ( body . Error , context ) ; const contents = { name : "InstallationMediaNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInstanceQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < InstanceQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInstanceQuotaExceededFault ( body . Error , context ) ; const contents = { name : "InstanceQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInsufficientAvailableIPsInSubnetFaultResponse = async ( parsedOutput , context ) : Promise < InsufficientAvailableIPsInSubnetFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInsufficientAvailableIPsInSubnetFault ( body . Error , context ) ; const contents = { name : "InsufficientAvailableIPsInSubnetFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInsufficientDBClusterCapacityFaultResponse = async ( parsedOutput , context ) : Promise < InsufficientDBClusterCapacityFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInsufficientDBClusterCapacityFault ( body . Error , context ) ; const contents = { name : "InsufficientDBClusterCapacityFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInsufficientDBInstanceCapacityFaultResponse = async ( parsedOutput , context ) : Promise < InsufficientDBInstanceCapacityFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInsufficientDBInstanceCapacityFault ( body . Error , context ) ; const contents = { name : "InsufficientDBInstanceCapacityFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInsufficientStorageClusterCapacityFaultResponse = async ( parsedOutput , context ) : Promise < InsufficientStorageClusterCapacityFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInsufficientStorageClusterCapacityFault ( body . Error , context ) ; const contents = { name : "InsufficientStorageClusterCapacityFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidCustomDBEngineVersionStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidCustomDBEngineVersionStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidCustomDBEngineVersionStateFault ( body . Error , context ) ; const contents = { name : "InvalidCustomDBEngineVersionStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidDBClusterCapacityFaultResponse = async ( parsedOutput , context ) : Promise < InvalidDBClusterCapacityFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidDBClusterCapacityFault ( body . Error , context ) ; const contents = { name : "InvalidDBClusterCapacityFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidDBClusterEndpointStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidDBClusterEndpointStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidDBClusterEndpointStateFault ( body . Error , context ) ; const contents = { name : "InvalidDBClusterEndpointStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidDBClusterSnapshotStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidDBClusterSnapshotStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidDBClusterSnapshotStateFault ( body . Error , context ) ; const contents = { name : "InvalidDBClusterSnapshotStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidDBClusterStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidDBClusterStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidDBClusterStateFault ( body . Error , context ) ; const contents = { name : "InvalidDBClusterStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidDBInstanceAutomatedBackupStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidDBInstanceAutomatedBackupStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidDBInstanceAutomatedBackupStateFault ( body . Error , context ) ; const contents = { name : "InvalidDBInstanceAutomatedBackupStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidDBInstanceStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidDBInstanceStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidDBInstanceStateFault ( body . Error , context ) ; const contents = { name : "InvalidDBInstanceStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidDBParameterGroupStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidDBParameterGroupStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidDBParameterGroupStateFault ( body . Error , context ) ; const contents = { name : "InvalidDBParameterGroupStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidDBProxyEndpointStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidDBProxyEndpointStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidDBProxyEndpointStateFault ( body . Error , context ) ; const contents = { name : "InvalidDBProxyEndpointStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidDBProxyStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidDBProxyStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidDBProxyStateFault ( body . Error , context ) ; const contents = { name : "InvalidDBProxyStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidDBSecurityGroupStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidDBSecurityGroupStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidDBSecurityGroupStateFault ( body . Error , context ) ; const contents = { name : "InvalidDBSecurityGroupStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidDBSnapshotStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidDBSnapshotStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidDBSnapshotStateFault ( body . Error , context ) ; const contents = { name : "InvalidDBSnapshotStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidDBSubnetGroupFaultResponse = async ( parsedOutput , context ) : Promise < InvalidDBSubnetGroupFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidDBSubnetGroupFault ( body . Error , context ) ; const contents = { name : "InvalidDBSubnetGroupFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidDBSubnetGroupStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidDBSubnetGroupStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidDBSubnetGroupStateFault ( body . Error , context ) ; const contents = { name : "InvalidDBSubnetGroupStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidDBSubnetStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidDBSubnetStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidDBSubnetStateFault ( body . Error , context ) ; const contents = { name : "InvalidDBSubnetStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidEventSubscriptionStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidEventSubscriptionStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidEventSubscriptionStateFault ( body . Error , context ) ; const contents = { name : "InvalidEventSubscriptionStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidExportOnlyFaultResponse = async ( parsedOutput , context ) : Promise < InvalidExportOnlyFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidExportOnlyFault ( body . Error , context ) ; const contents = { name : "InvalidExportOnlyFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidExportSourceStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidExportSourceStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidExportSourceStateFault ( body . Error , context ) ; const contents = { name : "InvalidExportSourceStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidExportTaskStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidExportTaskStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidExportTaskStateFault ( body . Error , context ) ; const contents = { name : "InvalidExportTaskStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidGlobalClusterStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidGlobalClusterStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidGlobalClusterStateFault ( body . Error , context ) ; const contents = { name : "InvalidGlobalClusterStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidOptionGroupStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidOptionGroupStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidOptionGroupStateFault ( body . Error , context ) ; const contents = { name : "InvalidOptionGroupStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidRestoreFaultResponse = async ( parsedOutput , context ) : Promise < InvalidRestoreFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidRestoreFault ( body . Error , context ) ; const contents = { name : "InvalidRestoreFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidS3BucketFaultResponse = async ( parsedOutput , context ) : Promise < InvalidS3BucketFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidS3BucketFault ( body . Error , context ) ; const contents = { name : "InvalidS3BucketFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidSubnetResponse = async ( parsedOutput , context ) : Promise < InvalidSubnet > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidSubnet ( body . Error , context ) ; const contents = { name : "InvalidSubnet" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryInvalidVPCNetworkStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidVPCNetworkStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryInvalidVPCNetworkStateFault ( body . Error , context ) ; const contents = { name : "InvalidVPCNetworkStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryKMSKeyNotAccessibleFaultResponse = async ( parsedOutput , context ) : Promise < KMSKeyNotAccessibleFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryKMSKeyNotAccessibleFault ( body . Error , context ) ; const contents = { name : "KMSKeyNotAccessibleFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryOptionGroupAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < OptionGroupAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryOptionGroupAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "OptionGroupAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryOptionGroupNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < OptionGroupNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryOptionGroupNotFoundFault ( body . Error , context ) ; const contents = { name : "OptionGroupNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryOptionGroupQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < OptionGroupQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryOptionGroupQuotaExceededFault ( body . Error , context ) ; const contents = { name : "OptionGroupQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryPointInTimeRestoreNotEnabledFaultResponse = async ( parsedOutput , context ) : Promise < PointInTimeRestoreNotEnabledFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryPointInTimeRestoreNotEnabledFault ( body . Error , context ) ; const contents = { name : "PointInTimeRestoreNotEnabledFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryProvisionedIopsNotAvailableInAZFaultResponse = async ( parsedOutput , context ) : Promise < ProvisionedIopsNotAvailableInAZFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryProvisionedIopsNotAvailableInAZFault ( body . Error , context ) ; const contents = { name : "ProvisionedIopsNotAvailableInAZFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryReservedDBInstanceAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < ReservedDBInstanceAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryReservedDBInstanceAlreadyExistsFault ( body . Error , context ) ; const contents = { name : "ReservedDBInstanceAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryReservedDBInstanceNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < ReservedDBInstanceNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryReservedDBInstanceNotFoundFault ( body . Error , context ) ; const contents = { name : "ReservedDBInstanceNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryReservedDBInstanceQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < ReservedDBInstanceQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryReservedDBInstanceQuotaExceededFault ( body . Error , context ) ; const contents = { name : "ReservedDBInstanceQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryReservedDBInstancesOfferingNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < ReservedDBInstancesOfferingNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryReservedDBInstancesOfferingNotFoundFault ( body . Error , context ) ; const contents = { name : "ReservedDBInstancesOfferingNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryResourceNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < ResourceNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryResourceNotFoundFault ( body . Error , context ) ; const contents = { name : "ResourceNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_querySharedSnapshotQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < SharedSnapshotQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_querySharedSnapshotQuotaExceededFault ( body . Error , context ) ; const contents = { name : "SharedSnapshotQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_querySnapshotQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < SnapshotQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_querySnapshotQuotaExceededFault ( body . Error , context ) ; const contents = { name : "SnapshotQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_querySNSInvalidTopicFaultResponse = async ( parsedOutput , context ) : Promise < SNSInvalidTopicFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_querySNSInvalidTopicFault ( body . Error , context ) ; const contents = { name : "SNSInvalidTopicFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_querySNSNoAuthorizationFaultResponse = async ( parsedOutput , context ) : Promise < SNSNoAuthorizationFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_querySNSNoAuthorizationFault ( body . Error , context ) ; const contents = { name : "SNSNoAuthorizationFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_querySNSTopicArnNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < SNSTopicArnNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_querySNSTopicArnNotFoundFault ( body . Error , context ) ; const contents = { name : "SNSTopicArnNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_querySourceNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < SourceNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_querySourceNotFoundFault ( body . Error , context ) ; const contents = { name : "SourceNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryStorageQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < StorageQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryStorageQuotaExceededFault ( body . Error , context ) ; const contents = { name : "StorageQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_queryStorageTypeNotSupportedFaultResponse = async ( parsedOutput , context ) : Promise < StorageTypeNotSupportedFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_queryStorageTypeNotSupportedFault ( body . Error , context ) ; const contents = { name : "StorageTypeNotSupportedFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_querySubnetAlreadyInUseResponse = async ( parsedOutput , context ) : Promise < SubnetAlreadyInUse > => { const body = parsedOutput . body ; const deserialized = deserializeAws_querySubnetAlreadyInUse ( body . Error , context ) ; const contents = { name : "SubnetAlreadyInUse" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_querySubscriptionAlreadyExistFaultResponse = async ( parsedOutput , context ) : Promise < SubscriptionAlreadyExistFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_querySubscriptionAlreadyExistFault ( body . Error , context ) ; const contents = { name : "SubscriptionAlreadyExistFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_querySubscriptionCategoryNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < SubscriptionCategoryNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_querySubscriptionCategoryNotFoundFault ( body . Error , context ) ; const contents = { name : "SubscriptionCategoryNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_querySubscriptionNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < SubscriptionNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_querySubscriptionNotFoundFault ( body . Error , context ) ; const contents = { name : "SubscriptionNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const serializeAws_queryAddRoleToDBClusterMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . RoleArn !== undefined && input . RoleArn !== null ) { entries [ "RoleArn" ] = input . RoleArn ; } if ( input . FeatureName !== undefined && input . FeatureName !== null ) { entries [ "FeatureName" ] = input . FeatureName ; } return entries ; } ; const serializeAws_queryAddRoleToDBInstanceMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . RoleArn !== undefined && input . RoleArn !== null ) { entries [ "RoleArn" ] = input . RoleArn ; } if ( input . FeatureName !== undefined && input . FeatureName !== null ) { entries [ "FeatureName" ] = input . FeatureName ; } return entries ; } ; const serializeAws_queryAddSourceIdentifierToSubscriptionMessage = ( input , context ) : any => { const entries = { } ; if ( input . SubscriptionName !== undefined && input . SubscriptionName !== null ) { entries [ "SubscriptionName" ] = input . SubscriptionName ; } if ( input . SourceIdentifier !== undefined && input . SourceIdentifier !== null ) { entries [ "SourceIdentifier" ] = input . SourceIdentifier ; } return entries ; } ; const serializeAws_queryAddTagsToResourceMessage = ( input , context ) : any => { const entries = { } ; if ( input . ResourceName !== undefined && input . ResourceName !== null ) { entries [ "ResourceName" ] = input . ResourceName ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryApplyPendingMaintenanceActionMessage = ( input , context ) : any => { const entries = { } ; if ( input . ResourceIdentifier !== undefined && input . ResourceIdentifier !== null ) { entries [ "ResourceIdentifier" ] = input . ResourceIdentifier ; } if ( input . ApplyAction !== undefined && input . ApplyAction !== null ) { entries [ "ApplyAction" ] = input . ApplyAction ; } if ( input . OptInType !== undefined && input . OptInType !== null ) { entries [ "OptInType" ] = input . OptInType ; } return entries ; } ; const serializeAws_queryAttributeValueList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `AttributeValue.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_queryAuthorizeDBSecurityGroupIngressMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBSecurityGroupName !== undefined && input . DBSecurityGroupName !== null ) { entries [ "DBSecurityGroupName" ] = input . DBSecurityGroupName ; } if ( input . CIDRIP !== undefined && input . CIDRIP !== null ) { entries [ "CIDRIP" ] = input . CIDRIP ; } if ( input . EC2SecurityGroupName !== undefined && input . EC2SecurityGroupName !== null ) { entries [ "EC2SecurityGroupName" ] = input . EC2SecurityGroupName ; } if ( input . EC2SecurityGroupId !== undefined && input . EC2SecurityGroupId !== null ) { entries [ "EC2SecurityGroupId" ] = input . EC2SecurityGroupId ; } if ( input . EC2SecurityGroupOwnerId !== undefined && input . EC2SecurityGroupOwnerId !== null ) { entries [ "EC2SecurityGroupOwnerId" ] = input . EC2SecurityGroupOwnerId ; } return entries ; } ; const serializeAws_queryAvailabilityZones = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `AvailabilityZone.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_queryBacktrackDBClusterMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . BacktrackTo !== undefined && input . BacktrackTo !== null ) { entries [ "BacktrackTo" ] = input . BacktrackTo . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . Force !== undefined && input . Force !== null ) { entries [ "Force" ] = input . Force ; } if ( input . UseEarliestTimeOnPointInTimeUnavailable !== undefined && input . UseEarliestTimeOnPointInTimeUnavailable !== null ) { entries [ "UseEarliestTimeOnPointInTimeUnavailable" ] = input . UseEarliestTimeOnPointInTimeUnavailable ; } return entries ; } ; const serializeAws_queryCancelExportTaskMessage = ( input , context ) : any => { const entries = { } ; if ( input . ExportTaskIdentifier !== undefined && input . ExportTaskIdentifier !== null ) { entries [ "ExportTaskIdentifier" ] = input . ExportTaskIdentifier ; } return entries ; } ; const serializeAws_queryCloudwatchLogsExportConfiguration = ( input , context ) : any => { const entries = { } ; if ( input . EnableLogTypes !== undefined && input . EnableLogTypes !== null ) { const memberEntries = serializeAws_queryLogTypeList ( input . EnableLogTypes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnableLogTypes.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DisableLogTypes !== undefined && input . DisableLogTypes !== null ) { const memberEntries = serializeAws_queryLogTypeList ( input . DisableLogTypes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DisableLogTypes.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryConnectionPoolConfiguration = ( input , context ) : any => { const entries = { } ; if ( input . MaxConnectionsPercent !== undefined && input . MaxConnectionsPercent !== null ) { entries [ "MaxConnectionsPercent" ] = input . MaxConnectionsPercent ; } if ( input . MaxIdleConnectionsPercent !== undefined && input . MaxIdleConnectionsPercent !== null ) { entries [ "MaxIdleConnectionsPercent" ] = input . MaxIdleConnectionsPercent ; } if ( input . ConnectionBorrowTimeout !== undefined && input . ConnectionBorrowTimeout !== null ) { entries [ "ConnectionBorrowTimeout" ] = input . ConnectionBorrowTimeout ; } if ( input . SessionPinningFilters !== undefined && input . SessionPinningFilters !== null ) { const memberEntries = serializeAws_queryStringList ( input . SessionPinningFilters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SessionPinningFilters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . InitQuery !== undefined && input . InitQuery !== null ) { entries [ "InitQuery" ] = input . InitQuery ; } return entries ; } ; const serializeAws_queryCopyDBClusterParameterGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . SourceDBClusterParameterGroupIdentifier !== undefined && input . SourceDBClusterParameterGroupIdentifier !== null ) { entries [ "SourceDBClusterParameterGroupIdentifier" ] = input . SourceDBClusterParameterGroupIdentifier ; } if ( input . TargetDBClusterParameterGroupIdentifier !== undefined && input . TargetDBClusterParameterGroupIdentifier !== null ) { entries [ "TargetDBClusterParameterGroupIdentifier" ] = input . TargetDBClusterParameterGroupIdentifier ; } if ( input . TargetDBClusterParameterGroupDescription !== undefined && input . TargetDBClusterParameterGroupDescription !== null ) { entries [ "TargetDBClusterParameterGroupDescription" ] = input . TargetDBClusterParameterGroupDescription ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryCopyDBClusterSnapshotMessage = ( input , context ) : any => { const entries = { } ; if ( input . SourceDBClusterSnapshotIdentifier !== undefined && input . SourceDBClusterSnapshotIdentifier !== null ) { entries [ "SourceDBClusterSnapshotIdentifier" ] = input . SourceDBClusterSnapshotIdentifier ; } if ( input . TargetDBClusterSnapshotIdentifier !== undefined && input . TargetDBClusterSnapshotIdentifier !== null ) { entries [ "TargetDBClusterSnapshotIdentifier" ] = input . TargetDBClusterSnapshotIdentifier ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . PreSignedUrl !== undefined && input . PreSignedUrl !== null ) { entries [ "PreSignedUrl" ] = input . PreSignedUrl ; } if ( input . CopyTags !== undefined && input . CopyTags !== null ) { entries [ "CopyTags" ] = input . CopyTags ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryCopyDBParameterGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . SourceDBParameterGroupIdentifier !== undefined && input . SourceDBParameterGroupIdentifier !== null ) { entries [ "SourceDBParameterGroupIdentifier" ] = input . SourceDBParameterGroupIdentifier ; } if ( input . TargetDBParameterGroupIdentifier !== undefined && input . TargetDBParameterGroupIdentifier !== null ) { entries [ "TargetDBParameterGroupIdentifier" ] = input . TargetDBParameterGroupIdentifier ; } if ( input . TargetDBParameterGroupDescription !== undefined && input . TargetDBParameterGroupDescription !== null ) { entries [ "TargetDBParameterGroupDescription" ] = input . TargetDBParameterGroupDescription ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryCopyDBSnapshotMessage = ( input , context ) : any => { const entries = { } ; if ( input . SourceDBSnapshotIdentifier !== undefined && input . SourceDBSnapshotIdentifier !== null ) { entries [ "SourceDBSnapshotIdentifier" ] = input . SourceDBSnapshotIdentifier ; } if ( input . TargetDBSnapshotIdentifier !== undefined && input . TargetDBSnapshotIdentifier !== null ) { entries [ "TargetDBSnapshotIdentifier" ] = input . TargetDBSnapshotIdentifier ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . CopyTags !== undefined && input . CopyTags !== null ) { entries [ "CopyTags" ] = input . CopyTags ; } if ( input . PreSignedUrl !== undefined && input . PreSignedUrl !== null ) { entries [ "PreSignedUrl" ] = input . PreSignedUrl ; } if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } if ( input . TargetCustomAvailabilityZone !== undefined && input . TargetCustomAvailabilityZone !== null ) { entries [ "TargetCustomAvailabilityZone" ] = input . TargetCustomAvailabilityZone ; } return entries ; } ; const serializeAws_queryCopyOptionGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . SourceOptionGroupIdentifier !== undefined && input . SourceOptionGroupIdentifier !== null ) { entries [ "SourceOptionGroupIdentifier" ] = input . SourceOptionGroupIdentifier ; } if ( input . TargetOptionGroupIdentifier !== undefined && input . TargetOptionGroupIdentifier !== null ) { entries [ "TargetOptionGroupIdentifier" ] = input . TargetOptionGroupIdentifier ; } if ( input . TargetOptionGroupDescription !== undefined && input . TargetOptionGroupDescription !== null ) { entries [ "TargetOptionGroupDescription" ] = input . TargetOptionGroupDescription ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryCreateCustomAvailabilityZoneMessage = ( input , context ) : any => { const entries = { } ; if ( input . CustomAvailabilityZoneName !== undefined && input . CustomAvailabilityZoneName !== null ) { entries [ "CustomAvailabilityZoneName" ] = input . CustomAvailabilityZoneName ; } if ( input . ExistingVpnId !== undefined && input . ExistingVpnId !== null ) { entries [ "ExistingVpnId" ] = input . ExistingVpnId ; } if ( input . NewVpnTunnelName !== undefined && input . NewVpnTunnelName !== null ) { entries [ "NewVpnTunnelName" ] = input . NewVpnTunnelName ; } if ( input . VpnTunnelOriginatorIP !== undefined && input . VpnTunnelOriginatorIP !== null ) { entries [ "VpnTunnelOriginatorIP" ] = input . VpnTunnelOriginatorIP ; } return entries ; } ; const serializeAws_queryCreateCustomDBEngineVersionMessage = ( input , context ) : any => { const entries = { } ; if ( input . Engine !== undefined && input . Engine !== null ) { entries [ "Engine" ] = input . Engine ; } if ( input . EngineVersion !== undefined && input . EngineVersion !== null ) { entries [ "EngineVersion" ] = input . EngineVersion ; } if ( input . DatabaseInstallationFilesS3BucketName !== undefined && input . DatabaseInstallationFilesS3BucketName !== null ) { entries [ "DatabaseInstallationFilesS3BucketName" ] = input . DatabaseInstallationFilesS3BucketName ; } if ( input . DatabaseInstallationFilesS3Prefix !== undefined && input . DatabaseInstallationFilesS3Prefix !== null ) { entries [ "DatabaseInstallationFilesS3Prefix" ] = input . DatabaseInstallationFilesS3Prefix ; } if ( input . KMSKeyId !== undefined && input . KMSKeyId !== null ) { entries [ "KMSKeyId" ] = input . KMSKeyId ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . Manifest !== undefined && input . Manifest !== null ) { entries [ "Manifest" ] = input . Manifest ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryCreateDBClusterEndpointMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . DBClusterEndpointIdentifier !== undefined && input . DBClusterEndpointIdentifier !== null ) { entries [ "DBClusterEndpointIdentifier" ] = input . DBClusterEndpointIdentifier ; } if ( input . EndpointType !== undefined && input . EndpointType !== null ) { entries [ "EndpointType" ] = input . EndpointType ; } if ( input . StaticMembers !== undefined && input . StaticMembers !== null ) { const memberEntries = serializeAws_queryStringList ( input . StaticMembers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `StaticMembers.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ExcludedMembers !== undefined && input . ExcludedMembers !== null ) { const memberEntries = serializeAws_queryStringList ( input . ExcludedMembers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ExcludedMembers.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryCreateDBClusterMessage = ( input , context ) : any => { const entries = { } ; if ( input . AvailabilityZones !== undefined && input . AvailabilityZones !== null ) { const memberEntries = serializeAws_queryAvailabilityZones ( input . AvailabilityZones , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AvailabilityZones.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . BackupRetentionPeriod !== undefined && input . BackupRetentionPeriod !== null ) { entries [ "BackupRetentionPeriod" ] = input . BackupRetentionPeriod ; } if ( input . CharacterSetName !== undefined && input . CharacterSetName !== null ) { entries [ "CharacterSetName" ] = input . CharacterSetName ; } if ( input . DatabaseName !== undefined && input . DatabaseName !== null ) { entries [ "DatabaseName" ] = input . DatabaseName ; } if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . DBClusterParameterGroupName !== undefined && input . DBClusterParameterGroupName !== null ) { entries [ "DBClusterParameterGroupName" ] = input . DBClusterParameterGroupName ; } if ( input . VpcSecurityGroupIds !== undefined && input . VpcSecurityGroupIds !== null ) { const memberEntries = serializeAws_queryVpcSecurityGroupIdList ( input . VpcSecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSecurityGroupIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DBSubnetGroupName !== undefined && input . DBSubnetGroupName !== null ) { entries [ "DBSubnetGroupName" ] = input . DBSubnetGroupName ; } if ( input . Engine !== undefined && input . Engine !== null ) { entries [ "Engine" ] = input . Engine ; } if ( input . EngineVersion !== undefined && input . EngineVersion !== null ) { entries [ "EngineVersion" ] = input . EngineVersion ; } if ( input . Port !== undefined && input . Port !== null ) { entries [ "Port" ] = input . Port ; } if ( input . MasterUsername !== undefined && input . MasterUsername !== null ) { entries [ "MasterUsername" ] = input . MasterUsername ; } if ( input . MasterUserPassword !== undefined && input . MasterUserPassword !== null ) { entries [ "MasterUserPassword" ] = input . MasterUserPassword ; } if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } if ( input . PreferredBackupWindow !== undefined && input . PreferredBackupWindow !== null ) { entries [ "PreferredBackupWindow" ] = input . PreferredBackupWindow ; } if ( input . PreferredMaintenanceWindow !== undefined && input . PreferredMaintenanceWindow !== null ) { entries [ "PreferredMaintenanceWindow" ] = input . PreferredMaintenanceWindow ; } if ( input . ReplicationSourceIdentifier !== undefined && input . ReplicationSourceIdentifier !== null ) { entries [ "ReplicationSourceIdentifier" ] = input . ReplicationSourceIdentifier ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . StorageEncrypted !== undefined && input . StorageEncrypted !== null ) { entries [ "StorageEncrypted" ] = input . StorageEncrypted ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . PreSignedUrl !== undefined && input . PreSignedUrl !== null ) { entries [ "PreSignedUrl" ] = input . PreSignedUrl ; } if ( input . EnableIAMDatabaseAuthentication !== undefined && input . EnableIAMDatabaseAuthentication !== null ) { entries [ "EnableIAMDatabaseAuthentication" ] = input . EnableIAMDatabaseAuthentication ; } if ( input . BacktrackWindow !== undefined && input . BacktrackWindow !== null ) { entries [ "BacktrackWindow" ] = input . BacktrackWindow ; } if ( input . EnableCloudwatchLogsExports !== undefined && input . EnableCloudwatchLogsExports !== null ) { const memberEntries = serializeAws_queryLogTypeList ( input . EnableCloudwatchLogsExports , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnableCloudwatchLogsExports.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . EngineMode !== undefined && input . EngineMode !== null ) { entries [ "EngineMode" ] = input . EngineMode ; } if ( input . ScalingConfiguration !== undefined && input . ScalingConfiguration !== null ) { const memberEntries = serializeAws_queryScalingConfiguration ( input . ScalingConfiguration , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ScalingConfiguration.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DeletionProtection !== undefined && input . DeletionProtection !== null ) { entries [ "DeletionProtection" ] = input . DeletionProtection ; } if ( input . GlobalClusterIdentifier !== undefined && input . GlobalClusterIdentifier !== null ) { entries [ "GlobalClusterIdentifier" ] = input . GlobalClusterIdentifier ; } if ( input . EnableHttpEndpoint !== undefined && input . EnableHttpEndpoint !== null ) { entries [ "EnableHttpEndpoint" ] = input . EnableHttpEndpoint ; } if ( input . CopyTagsToSnapshot !== undefined && input . CopyTagsToSnapshot !== null ) { entries [ "CopyTagsToSnapshot" ] = input . CopyTagsToSnapshot ; } if ( input . Domain !== undefined && input . Domain !== null ) { entries [ "Domain" ] = input . Domain ; } if ( input . DomainIAMRoleName !== undefined && input . DomainIAMRoleName !== null ) { entries [ "DomainIAMRoleName" ] = input . DomainIAMRoleName ; } if ( input . EnableGlobalWriteForwarding !== undefined && input . EnableGlobalWriteForwarding !== null ) { entries [ "EnableGlobalWriteForwarding" ] = input . EnableGlobalWriteForwarding ; } if ( input . DBClusterInstanceClass !== undefined && input . DBClusterInstanceClass !== null ) { entries [ "DBClusterInstanceClass" ] = input . DBClusterInstanceClass ; } if ( input . AllocatedStorage !== undefined && input . AllocatedStorage !== null ) { entries [ "AllocatedStorage" ] = input . AllocatedStorage ; } if ( input . StorageType !== undefined && input . StorageType !== null ) { entries [ "StorageType" ] = input . StorageType ; } if ( input . Iops !== undefined && input . Iops !== null ) { entries [ "Iops" ] = input . Iops ; } if ( input . PubliclyAccessible !== undefined && input . PubliclyAccessible !== null ) { entries [ "PubliclyAccessible" ] = input . PubliclyAccessible ; } if ( input . AutoMinorVersionUpgrade !== undefined && input . AutoMinorVersionUpgrade !== null ) { entries [ "AutoMinorVersionUpgrade" ] = input . AutoMinorVersionUpgrade ; } if ( input . MonitoringInterval !== undefined && input . MonitoringInterval !== null ) { entries [ "MonitoringInterval" ] = input . MonitoringInterval ; } if ( input . MonitoringRoleArn !== undefined && input . MonitoringRoleArn !== null ) { entries [ "MonitoringRoleArn" ] = input . MonitoringRoleArn ; } if ( input . EnablePerformanceInsights !== undefined && input . EnablePerformanceInsights !== null ) { entries [ "EnablePerformanceInsights" ] = input . EnablePerformanceInsights ; } if ( input . PerformanceInsightsKMSKeyId !== undefined && input . PerformanceInsightsKMSKeyId !== null ) { entries [ "PerformanceInsightsKMSKeyId" ] = input . PerformanceInsightsKMSKeyId ; } if ( input . PerformanceInsightsRetentionPeriod !== undefined && input . PerformanceInsightsRetentionPeriod !== null ) { entries [ "PerformanceInsightsRetentionPeriod" ] = input . PerformanceInsightsRetentionPeriod ; } return entries ; } ; const serializeAws_queryCreateDBClusterParameterGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterParameterGroupName !== undefined && input . DBClusterParameterGroupName !== null ) { entries [ "DBClusterParameterGroupName" ] = input . DBClusterParameterGroupName ; } if ( input . DBParameterGroupFamily !== undefined && input . DBParameterGroupFamily !== null ) { entries [ "DBParameterGroupFamily" ] = input . DBParameterGroupFamily ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryCreateDBClusterSnapshotMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterSnapshotIdentifier !== undefined && input . DBClusterSnapshotIdentifier !== null ) { entries [ "DBClusterSnapshotIdentifier" ] = input . DBClusterSnapshotIdentifier ; } if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryCreateDBInstanceMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBName !== undefined && input . DBName !== null ) { entries [ "DBName" ] = input . DBName ; } if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . AllocatedStorage !== undefined && input . AllocatedStorage !== null ) { entries [ "AllocatedStorage" ] = input . AllocatedStorage ; } if ( input . DBInstanceClass !== undefined && input . DBInstanceClass !== null ) { entries [ "DBInstanceClass" ] = input . DBInstanceClass ; } if ( input . Engine !== undefined && input . Engine !== null ) { entries [ "Engine" ] = input . Engine ; } if ( input . MasterUsername !== undefined && input . MasterUsername !== null ) { entries [ "MasterUsername" ] = input . MasterUsername ; } if ( input . MasterUserPassword !== undefined && input . MasterUserPassword !== null ) { entries [ "MasterUserPassword" ] = input . MasterUserPassword ; } if ( input . DBSecurityGroups !== undefined && input . DBSecurityGroups !== null ) { const memberEntries = serializeAws_queryDBSecurityGroupNameList ( input . DBSecurityGroups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DBSecurityGroups.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . VpcSecurityGroupIds !== undefined && input . VpcSecurityGroupIds !== null ) { const memberEntries = serializeAws_queryVpcSecurityGroupIdList ( input . VpcSecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSecurityGroupIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . DBSubnetGroupName !== undefined && input . DBSubnetGroupName !== null ) { entries [ "DBSubnetGroupName" ] = input . DBSubnetGroupName ; } if ( input . PreferredMaintenanceWindow !== undefined && input . PreferredMaintenanceWindow !== null ) { entries [ "PreferredMaintenanceWindow" ] = input . PreferredMaintenanceWindow ; } if ( input . DBParameterGroupName !== undefined && input . DBParameterGroupName !== null ) { entries [ "DBParameterGroupName" ] = input . DBParameterGroupName ; } if ( input . BackupRetentionPeriod !== undefined && input . BackupRetentionPeriod !== null ) { entries [ "BackupRetentionPeriod" ] = input . BackupRetentionPeriod ; } if ( input . PreferredBackupWindow !== undefined && input . PreferredBackupWindow !== null ) { entries [ "PreferredBackupWindow" ] = input . PreferredBackupWindow ; } if ( input . Port !== undefined && input . Port !== null ) { entries [ "Port" ] = input . Port ; } if ( input . MultiAZ !== undefined && input . MultiAZ !== null ) { entries [ "MultiAZ" ] = input . MultiAZ ; } if ( input . EngineVersion !== undefined && input . EngineVersion !== null ) { entries [ "EngineVersion" ] = input . EngineVersion ; } if ( input . AutoMinorVersionUpgrade !== undefined && input . AutoMinorVersionUpgrade !== null ) { entries [ "AutoMinorVersionUpgrade" ] = input . AutoMinorVersionUpgrade ; } if ( input . LicenseModel !== undefined && input . LicenseModel !== null ) { entries [ "LicenseModel" ] = input . LicenseModel ; } if ( input . Iops !== undefined && input . Iops !== null ) { entries [ "Iops" ] = input . Iops ; } if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } if ( input . CharacterSetName !== undefined && input . CharacterSetName !== null ) { entries [ "CharacterSetName" ] = input . CharacterSetName ; } if ( input . NcharCharacterSetName !== undefined && input . NcharCharacterSetName !== null ) { entries [ "NcharCharacterSetName" ] = input . NcharCharacterSetName ; } if ( input . PubliclyAccessible !== undefined && input . PubliclyAccessible !== null ) { entries [ "PubliclyAccessible" ] = input . PubliclyAccessible ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . StorageType !== undefined && input . StorageType !== null ) { entries [ "StorageType" ] = input . StorageType ; } if ( input . TdeCredentialArn !== undefined && input . TdeCredentialArn !== null ) { entries [ "TdeCredentialArn" ] = input . TdeCredentialArn ; } if ( input . TdeCredentialPassword !== undefined && input . TdeCredentialPassword !== null ) { entries [ "TdeCredentialPassword" ] = input . TdeCredentialPassword ; } if ( input . StorageEncrypted !== undefined && input . StorageEncrypted !== null ) { entries [ "StorageEncrypted" ] = input . StorageEncrypted ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . Domain !== undefined && input . Domain !== null ) { entries [ "Domain" ] = input . Domain ; } if ( input . CopyTagsToSnapshot !== undefined && input . CopyTagsToSnapshot !== null ) { entries [ "CopyTagsToSnapshot" ] = input . CopyTagsToSnapshot ; } if ( input . MonitoringInterval !== undefined && input . MonitoringInterval !== null ) { entries [ "MonitoringInterval" ] = input . MonitoringInterval ; } if ( input . MonitoringRoleArn !== undefined && input . MonitoringRoleArn !== null ) { entries [ "MonitoringRoleArn" ] = input . MonitoringRoleArn ; } if ( input . DomainIAMRoleName !== undefined && input . DomainIAMRoleName !== null ) { entries [ "DomainIAMRoleName" ] = input . DomainIAMRoleName ; } if ( input . PromotionTier !== undefined && input . PromotionTier !== null ) { entries [ "PromotionTier" ] = input . PromotionTier ; } if ( input . Timezone !== undefined && input . Timezone !== null ) { entries [ "Timezone" ] = input . Timezone ; } if ( input . EnableIAMDatabaseAuthentication !== undefined && input . EnableIAMDatabaseAuthentication !== null ) { entries [ "EnableIAMDatabaseAuthentication" ] = input . EnableIAMDatabaseAuthentication ; } if ( input . EnablePerformanceInsights !== undefined && input . EnablePerformanceInsights !== null ) { entries [ "EnablePerformanceInsights" ] = input . EnablePerformanceInsights ; } if ( input . PerformanceInsightsKMSKeyId !== undefined && input . PerformanceInsightsKMSKeyId !== null ) { entries [ "PerformanceInsightsKMSKeyId" ] = input . PerformanceInsightsKMSKeyId ; } if ( input . PerformanceInsightsRetentionPeriod !== undefined && input . PerformanceInsightsRetentionPeriod !== null ) { entries [ "PerformanceInsightsRetentionPeriod" ] = input . PerformanceInsightsRetentionPeriod ; } if ( input . EnableCloudwatchLogsExports !== undefined && input . EnableCloudwatchLogsExports !== null ) { const memberEntries = serializeAws_queryLogTypeList ( input . EnableCloudwatchLogsExports , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnableCloudwatchLogsExports.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ProcessorFeatures !== undefined && input . ProcessorFeatures !== null ) { const memberEntries = serializeAws_queryProcessorFeatureList ( input . ProcessorFeatures , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ProcessorFeatures.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DeletionProtection !== undefined && input . DeletionProtection !== null ) { entries [ "DeletionProtection" ] = input . DeletionProtection ; } if ( input . MaxAllocatedStorage !== undefined && input . MaxAllocatedStorage !== null ) { entries [ "MaxAllocatedStorage" ] = input . MaxAllocatedStorage ; } if ( input . EnableCustomerOwnedIp !== undefined && input . EnableCustomerOwnedIp !== null ) { entries [ "EnableCustomerOwnedIp" ] = input . EnableCustomerOwnedIp ; } if ( input . CustomIamInstanceProfile !== undefined && input . CustomIamInstanceProfile !== null ) { entries [ "CustomIamInstanceProfile" ] = input . CustomIamInstanceProfile ; } if ( input . BackupTarget !== undefined && input . BackupTarget !== null ) { entries [ "BackupTarget" ] = input . BackupTarget ; } return entries ; } ; const serializeAws_queryCreateDBInstanceReadReplicaMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . SourceDBInstanceIdentifier !== undefined && input . SourceDBInstanceIdentifier !== null ) { entries [ "SourceDBInstanceIdentifier" ] = input . SourceDBInstanceIdentifier ; } if ( input . DBInstanceClass !== undefined && input . DBInstanceClass !== null ) { entries [ "DBInstanceClass" ] = input . DBInstanceClass ; } if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . Port !== undefined && input . Port !== null ) { entries [ "Port" ] = input . Port ; } if ( input . MultiAZ !== undefined && input . MultiAZ !== null ) { entries [ "MultiAZ" ] = input . MultiAZ ; } if ( input . AutoMinorVersionUpgrade !== undefined && input . AutoMinorVersionUpgrade !== null ) { entries [ "AutoMinorVersionUpgrade" ] = input . AutoMinorVersionUpgrade ; } if ( input . Iops !== undefined && input . Iops !== null ) { entries [ "Iops" ] = input . Iops ; } if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } if ( input . DBParameterGroupName !== undefined && input . DBParameterGroupName !== null ) { entries [ "DBParameterGroupName" ] = input . DBParameterGroupName ; } if ( input . PubliclyAccessible !== undefined && input . PubliclyAccessible !== null ) { entries [ "PubliclyAccessible" ] = input . PubliclyAccessible ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DBSubnetGroupName !== undefined && input . DBSubnetGroupName !== null ) { entries [ "DBSubnetGroupName" ] = input . DBSubnetGroupName ; } if ( input . VpcSecurityGroupIds !== undefined && input . VpcSecurityGroupIds !== null ) { const memberEntries = serializeAws_queryVpcSecurityGroupIdList ( input . VpcSecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSecurityGroupIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . StorageType !== undefined && input . StorageType !== null ) { entries [ "StorageType" ] = input . StorageType ; } if ( input . CopyTagsToSnapshot !== undefined && input . CopyTagsToSnapshot !== null ) { entries [ "CopyTagsToSnapshot" ] = input . CopyTagsToSnapshot ; } if ( input . MonitoringInterval !== undefined && input . MonitoringInterval !== null ) { entries [ "MonitoringInterval" ] = input . MonitoringInterval ; } if ( input . MonitoringRoleArn !== undefined && input . MonitoringRoleArn !== null ) { entries [ "MonitoringRoleArn" ] = input . MonitoringRoleArn ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . PreSignedUrl !== undefined && input . PreSignedUrl !== null ) { entries [ "PreSignedUrl" ] = input . PreSignedUrl ; } if ( input . EnableIAMDatabaseAuthentication !== undefined && input . EnableIAMDatabaseAuthentication !== null ) { entries [ "EnableIAMDatabaseAuthentication" ] = input . EnableIAMDatabaseAuthentication ; } if ( input . EnablePerformanceInsights !== undefined && input . EnablePerformanceInsights !== null ) { entries [ "EnablePerformanceInsights" ] = input . EnablePerformanceInsights ; } if ( input . PerformanceInsightsKMSKeyId !== undefined && input . PerformanceInsightsKMSKeyId !== null ) { entries [ "PerformanceInsightsKMSKeyId" ] = input . PerformanceInsightsKMSKeyId ; } if ( input . PerformanceInsightsRetentionPeriod !== undefined && input . PerformanceInsightsRetentionPeriod !== null ) { entries [ "PerformanceInsightsRetentionPeriod" ] = input . PerformanceInsightsRetentionPeriod ; } if ( input . EnableCloudwatchLogsExports !== undefined && input . EnableCloudwatchLogsExports !== null ) { const memberEntries = serializeAws_queryLogTypeList ( input . EnableCloudwatchLogsExports , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnableCloudwatchLogsExports.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ProcessorFeatures !== undefined && input . ProcessorFeatures !== null ) { const memberEntries = serializeAws_queryProcessorFeatureList ( input . ProcessorFeatures , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ProcessorFeatures.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . UseDefaultProcessorFeatures !== undefined && input . UseDefaultProcessorFeatures !== null ) { entries [ "UseDefaultProcessorFeatures" ] = input . UseDefaultProcessorFeatures ; } if ( input . DeletionProtection !== undefined && input . DeletionProtection !== null ) { entries [ "DeletionProtection" ] = input . DeletionProtection ; } if ( input . Domain !== undefined && input . Domain !== null ) { entries [ "Domain" ] = input . Domain ; } if ( input . DomainIAMRoleName !== undefined && input . DomainIAMRoleName !== null ) { entries [ "DomainIAMRoleName" ] = input . DomainIAMRoleName ; } if ( input . ReplicaMode !== undefined && input . ReplicaMode !== null ) { entries [ "ReplicaMode" ] = input . ReplicaMode ; } if ( input . MaxAllocatedStorage !== undefined && input . MaxAllocatedStorage !== null ) { entries [ "MaxAllocatedStorage" ] = input . MaxAllocatedStorage ; } if ( input . CustomIamInstanceProfile !== undefined && input . CustomIamInstanceProfile !== null ) { entries [ "CustomIamInstanceProfile" ] = input . CustomIamInstanceProfile ; } return entries ; } ; const serializeAws_queryCreateDBParameterGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBParameterGroupName !== undefined && input . DBParameterGroupName !== null ) { entries [ "DBParameterGroupName" ] = input . DBParameterGroupName ; } if ( input . DBParameterGroupFamily !== undefined && input . DBParameterGroupFamily !== null ) { entries [ "DBParameterGroupFamily" ] = input . DBParameterGroupFamily ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryCreateDBProxyEndpointRequest = ( input , context ) : any => { const entries = { } ; if ( input . DBProxyName !== undefined && input . DBProxyName !== null ) { entries [ "DBProxyName" ] = input . DBProxyName ; } if ( input . DBProxyEndpointName !== undefined && input . DBProxyEndpointName !== null ) { entries [ "DBProxyEndpointName" ] = input . DBProxyEndpointName ; } if ( input . VpcSubnetIds !== undefined && input . VpcSubnetIds !== null ) { const memberEntries = serializeAws_queryStringList ( input . VpcSubnetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSubnetIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . VpcSecurityGroupIds !== undefined && input . VpcSecurityGroupIds !== null ) { const memberEntries = serializeAws_queryStringList ( input . VpcSecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSecurityGroupIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . TargetRole !== undefined && input . TargetRole !== null ) { entries [ "TargetRole" ] = input . TargetRole ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryCreateDBProxyRequest = ( input , context ) : any => { const entries = { } ; if ( input . DBProxyName !== undefined && input . DBProxyName !== null ) { entries [ "DBProxyName" ] = input . DBProxyName ; } if ( input . EngineFamily !== undefined && input . EngineFamily !== null ) { entries [ "EngineFamily" ] = input . EngineFamily ; } if ( input . Auth !== undefined && input . Auth !== null ) { const memberEntries = serializeAws_queryUserAuthConfigList ( input . Auth , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Auth.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . RoleArn !== undefined && input . RoleArn !== null ) { entries [ "RoleArn" ] = input . RoleArn ; } if ( input . VpcSubnetIds !== undefined && input . VpcSubnetIds !== null ) { const memberEntries = serializeAws_queryStringList ( input . VpcSubnetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSubnetIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . VpcSecurityGroupIds !== undefined && input . VpcSecurityGroupIds !== null ) { const memberEntries = serializeAws_queryStringList ( input . VpcSecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSecurityGroupIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . RequireTLS !== undefined && input . RequireTLS !== null ) { entries [ "RequireTLS" ] = input . RequireTLS ; } if ( input . IdleClientTimeout !== undefined && input . IdleClientTimeout !== null ) { entries [ "IdleClientTimeout" ] = input . IdleClientTimeout ; } if ( input . DebugLogging !== undefined && input . DebugLogging !== null ) { entries [ "DebugLogging" ] = input . DebugLogging ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryCreateDBSecurityGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBSecurityGroupName !== undefined && input . DBSecurityGroupName !== null ) { entries [ "DBSecurityGroupName" ] = input . DBSecurityGroupName ; } if ( input . DBSecurityGroupDescription !== undefined && input . DBSecurityGroupDescription !== null ) { entries [ "DBSecurityGroupDescription" ] = input . DBSecurityGroupDescription ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryCreateDBSnapshotMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBSnapshotIdentifier !== undefined && input . DBSnapshotIdentifier !== null ) { entries [ "DBSnapshotIdentifier" ] = input . DBSnapshotIdentifier ; } if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryCreateDBSubnetGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBSubnetGroupName !== undefined && input . DBSubnetGroupName !== null ) { entries [ "DBSubnetGroupName" ] = input . DBSubnetGroupName ; } if ( input . DBSubnetGroupDescription !== undefined && input . DBSubnetGroupDescription !== null ) { entries [ "DBSubnetGroupDescription" ] = input . DBSubnetGroupDescription ; } if ( input . SubnetIds !== undefined && input . SubnetIds !== null ) { const memberEntries = serializeAws_querySubnetIdentifierList ( input . SubnetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SubnetIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryCreateEventSubscriptionMessage = ( input , context ) : any => { const entries = { } ; if ( input . SubscriptionName !== undefined && input . SubscriptionName !== null ) { entries [ "SubscriptionName" ] = input . SubscriptionName ; } if ( input . SnsTopicArn !== undefined && input . SnsTopicArn !== null ) { entries [ "SnsTopicArn" ] = input . SnsTopicArn ; } if ( input . SourceType !== undefined && input . SourceType !== null ) { entries [ "SourceType" ] = input . SourceType ; } if ( input . EventCategories !== undefined && input . EventCategories !== null ) { const memberEntries = serializeAws_queryEventCategoriesList ( input . EventCategories , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EventCategories.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . SourceIds !== undefined && input . SourceIds !== null ) { const memberEntries = serializeAws_querySourceIdsList ( input . SourceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SourceIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Enabled !== undefined && input . Enabled !== null ) { entries [ "Enabled" ] = input . Enabled ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryCreateGlobalClusterMessage = ( input , context ) : any => { const entries = { } ; if ( input . GlobalClusterIdentifier !== undefined && input . GlobalClusterIdentifier !== null ) { entries [ "GlobalClusterIdentifier" ] = input . GlobalClusterIdentifier ; } if ( input . SourceDBClusterIdentifier !== undefined && input . SourceDBClusterIdentifier !== null ) { entries [ "SourceDBClusterIdentifier" ] = input . SourceDBClusterIdentifier ; } if ( input . Engine !== undefined && input . Engine !== null ) { entries [ "Engine" ] = input . Engine ; } if ( input . EngineVersion !== undefined && input . EngineVersion !== null ) { entries [ "EngineVersion" ] = input . EngineVersion ; } if ( input . DeletionProtection !== undefined && input . DeletionProtection !== null ) { entries [ "DeletionProtection" ] = input . DeletionProtection ; } if ( input . DatabaseName !== undefined && input . DatabaseName !== null ) { entries [ "DatabaseName" ] = input . DatabaseName ; } if ( input . StorageEncrypted !== undefined && input . StorageEncrypted !== null ) { entries [ "StorageEncrypted" ] = input . StorageEncrypted ; } return entries ; } ; const serializeAws_queryCreateOptionGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } if ( input . EngineName !== undefined && input . EngineName !== null ) { entries [ "EngineName" ] = input . EngineName ; } if ( input . MajorEngineVersion !== undefined && input . MajorEngineVersion !== null ) { entries [ "MajorEngineVersion" ] = input . MajorEngineVersion ; } if ( input . OptionGroupDescription !== undefined && input . OptionGroupDescription !== null ) { entries [ "OptionGroupDescription" ] = input . OptionGroupDescription ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryDBSecurityGroupNameList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `DBSecurityGroupName.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_queryDeleteCustomAvailabilityZoneMessage = ( input , context ) : any => { const entries = { } ; if ( input . CustomAvailabilityZoneId !== undefined && input . CustomAvailabilityZoneId !== null ) { entries [ "CustomAvailabilityZoneId" ] = input . CustomAvailabilityZoneId ; } return entries ; } ; const serializeAws_queryDeleteCustomDBEngineVersionMessage = ( input , context ) : any => { const entries = { } ; if ( input . Engine !== undefined && input . Engine !== null ) { entries [ "Engine" ] = input . Engine ; } if ( input . EngineVersion !== undefined && input . EngineVersion !== null ) { entries [ "EngineVersion" ] = input . EngineVersion ; } return entries ; } ; const serializeAws_queryDeleteDBClusterEndpointMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterEndpointIdentifier !== undefined && input . DBClusterEndpointIdentifier !== null ) { entries [ "DBClusterEndpointIdentifier" ] = input . DBClusterEndpointIdentifier ; } return entries ; } ; const serializeAws_queryDeleteDBClusterMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . SkipFinalSnapshot !== undefined && input . SkipFinalSnapshot !== null ) { entries [ "SkipFinalSnapshot" ] = input . SkipFinalSnapshot ; } if ( input . FinalDBSnapshotIdentifier !== undefined && input . FinalDBSnapshotIdentifier !== null ) { entries [ "FinalDBSnapshotIdentifier" ] = input . FinalDBSnapshotIdentifier ; } return entries ; } ; const serializeAws_queryDeleteDBClusterParameterGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterParameterGroupName !== undefined && input . DBClusterParameterGroupName !== null ) { entries [ "DBClusterParameterGroupName" ] = input . DBClusterParameterGroupName ; } return entries ; } ; const serializeAws_queryDeleteDBClusterSnapshotMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterSnapshotIdentifier !== undefined && input . DBClusterSnapshotIdentifier !== null ) { entries [ "DBClusterSnapshotIdentifier" ] = input . DBClusterSnapshotIdentifier ; } return entries ; } ; const serializeAws_queryDeleteDBInstanceAutomatedBackupMessage = ( input , context ) : any => { const entries = { } ; if ( input . DbiResourceId !== undefined && input . DbiResourceId !== null ) { entries [ "DbiResourceId" ] = input . DbiResourceId ; } if ( input . DBInstanceAutomatedBackupsArn !== undefined && input . DBInstanceAutomatedBackupsArn !== null ) { entries [ "DBInstanceAutomatedBackupsArn" ] = input . DBInstanceAutomatedBackupsArn ; } return entries ; } ; const serializeAws_queryDeleteDBInstanceMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . SkipFinalSnapshot !== undefined && input . SkipFinalSnapshot !== null ) { entries [ "SkipFinalSnapshot" ] = input . SkipFinalSnapshot ; } if ( input . FinalDBSnapshotIdentifier !== undefined && input . FinalDBSnapshotIdentifier !== null ) { entries [ "FinalDBSnapshotIdentifier" ] = input . FinalDBSnapshotIdentifier ; } if ( input . DeleteAutomatedBackups !== undefined && input . DeleteAutomatedBackups !== null ) { entries [ "DeleteAutomatedBackups" ] = input . DeleteAutomatedBackups ; } return entries ; } ; const serializeAws_queryDeleteDBParameterGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBParameterGroupName !== undefined && input . DBParameterGroupName !== null ) { entries [ "DBParameterGroupName" ] = input . DBParameterGroupName ; } return entries ; } ; const serializeAws_queryDeleteDBProxyEndpointRequest = ( input , context ) : any => { const entries = { } ; if ( input . DBProxyEndpointName !== undefined && input . DBProxyEndpointName !== null ) { entries [ "DBProxyEndpointName" ] = input . DBProxyEndpointName ; } return entries ; } ; const serializeAws_queryDeleteDBProxyRequest = ( input , context ) : any => { const entries = { } ; if ( input . DBProxyName !== undefined && input . DBProxyName !== null ) { entries [ "DBProxyName" ] = input . DBProxyName ; } return entries ; } ; const serializeAws_queryDeleteDBSecurityGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBSecurityGroupName !== undefined && input . DBSecurityGroupName !== null ) { entries [ "DBSecurityGroupName" ] = input . DBSecurityGroupName ; } return entries ; } ; const serializeAws_queryDeleteDBSnapshotMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBSnapshotIdentifier !== undefined && input . DBSnapshotIdentifier !== null ) { entries [ "DBSnapshotIdentifier" ] = input . DBSnapshotIdentifier ; } return entries ; } ; const serializeAws_queryDeleteDBSubnetGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBSubnetGroupName !== undefined && input . DBSubnetGroupName !== null ) { entries [ "DBSubnetGroupName" ] = input . DBSubnetGroupName ; } return entries ; } ; const serializeAws_queryDeleteEventSubscriptionMessage = ( input , context ) : any => { const entries = { } ; if ( input . SubscriptionName !== undefined && input . SubscriptionName !== null ) { entries [ "SubscriptionName" ] = input . SubscriptionName ; } return entries ; } ; const serializeAws_queryDeleteGlobalClusterMessage = ( input , context ) : any => { const entries = { } ; if ( input . GlobalClusterIdentifier !== undefined && input . GlobalClusterIdentifier !== null ) { entries [ "GlobalClusterIdentifier" ] = input . GlobalClusterIdentifier ; } return entries ; } ; const serializeAws_queryDeleteInstallationMediaMessage = ( input , context ) : any => { const entries = { } ; if ( input . InstallationMediaId !== undefined && input . InstallationMediaId !== null ) { entries [ "InstallationMediaId" ] = input . InstallationMediaId ; } return entries ; } ; const serializeAws_queryDeleteOptionGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } return entries ; } ; const serializeAws_queryDeregisterDBProxyTargetsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DBProxyName !== undefined && input . DBProxyName !== null ) { entries [ "DBProxyName" ] = input . DBProxyName ; } if ( input . TargetGroupName !== undefined && input . TargetGroupName !== null ) { entries [ "TargetGroupName" ] = input . TargetGroupName ; } if ( input . DBInstanceIdentifiers !== undefined && input . DBInstanceIdentifiers !== null ) { const memberEntries = serializeAws_queryStringList ( input . DBInstanceIdentifiers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DBInstanceIdentifiers.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DBClusterIdentifiers !== undefined && input . DBClusterIdentifiers !== null ) { const memberEntries = serializeAws_queryStringList ( input . DBClusterIdentifiers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DBClusterIdentifiers.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryDescribeAccountAttributesMessage = ( input , context ) : any => { const entries = { } ; return entries ; } ; const serializeAws_queryDescribeCertificatesMessage = ( input , context ) : any => { const entries = { } ; if ( input . CertificateIdentifier !== undefined && input . CertificateIdentifier !== null ) { entries [ "CertificateIdentifier" ] = input . CertificateIdentifier ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeCustomAvailabilityZonesMessage = ( input , context ) : any => { const entries = { } ; if ( input . CustomAvailabilityZoneId !== undefined && input . CustomAvailabilityZoneId !== null ) { entries [ "CustomAvailabilityZoneId" ] = input . CustomAvailabilityZoneId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeDBClusterBacktracksMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . BacktrackIdentifier !== undefined && input . BacktrackIdentifier !== null ) { entries [ "BacktrackIdentifier" ] = input . BacktrackIdentifier ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeDBClusterEndpointsMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . DBClusterEndpointIdentifier !== undefined && input . DBClusterEndpointIdentifier !== null ) { entries [ "DBClusterEndpointIdentifier" ] = input . DBClusterEndpointIdentifier ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeDBClusterParameterGroupsMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterParameterGroupName !== undefined && input . DBClusterParameterGroupName !== null ) { entries [ "DBClusterParameterGroupName" ] = input . DBClusterParameterGroupName ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeDBClusterParametersMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterParameterGroupName !== undefined && input . DBClusterParameterGroupName !== null ) { entries [ "DBClusterParameterGroupName" ] = input . DBClusterParameterGroupName ; } if ( input . Source !== undefined && input . Source !== null ) { entries [ "Source" ] = input . Source ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeDBClustersMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } if ( input . IncludeShared !== undefined && input . IncludeShared !== null ) { entries [ "IncludeShared" ] = input . IncludeShared ; } return entries ; } ; const serializeAws_queryDescribeDBClusterSnapshotAttributesMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterSnapshotIdentifier !== undefined && input . DBClusterSnapshotIdentifier !== null ) { entries [ "DBClusterSnapshotIdentifier" ] = input . DBClusterSnapshotIdentifier ; } return entries ; } ; const serializeAws_queryDescribeDBClusterSnapshotsMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . DBClusterSnapshotIdentifier !== undefined && input . DBClusterSnapshotIdentifier !== null ) { entries [ "DBClusterSnapshotIdentifier" ] = input . DBClusterSnapshotIdentifier ; } if ( input . SnapshotType !== undefined && input . SnapshotType !== null ) { entries [ "SnapshotType" ] = input . SnapshotType ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } if ( input . IncludeShared !== undefined && input . IncludeShared !== null ) { entries [ "IncludeShared" ] = input . IncludeShared ; } if ( input . IncludePublic !== undefined && input . IncludePublic !== null ) { entries [ "IncludePublic" ] = input . IncludePublic ; } return entries ; } ; const serializeAws_queryDescribeDBEngineVersionsMessage = ( input , context ) : any => { const entries = { } ; if ( input . Engine !== undefined && input . Engine !== null ) { entries [ "Engine" ] = input . Engine ; } if ( input . EngineVersion !== undefined && input . EngineVersion !== null ) { entries [ "EngineVersion" ] = input . EngineVersion ; } if ( input . DBParameterGroupFamily !== undefined && input . DBParameterGroupFamily !== null ) { entries [ "DBParameterGroupFamily" ] = input . DBParameterGroupFamily ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } if ( input . DefaultOnly !== undefined && input . DefaultOnly !== null ) { entries [ "DefaultOnly" ] = input . DefaultOnly ; } if ( input . ListSupportedCharacterSets !== undefined && input . ListSupportedCharacterSets !== null ) { entries [ "ListSupportedCharacterSets" ] = input . ListSupportedCharacterSets ; } if ( input . ListSupportedTimezones !== undefined && input . ListSupportedTimezones !== null ) { entries [ "ListSupportedTimezones" ] = input . ListSupportedTimezones ; } if ( input . IncludeAll !== undefined && input . IncludeAll !== null ) { entries [ "IncludeAll" ] = input . IncludeAll ; } return entries ; } ; const serializeAws_queryDescribeDBInstanceAutomatedBackupsMessage = ( input , context ) : any => { const entries = { } ; if ( input . DbiResourceId !== undefined && input . DbiResourceId !== null ) { entries [ "DbiResourceId" ] = input . DbiResourceId ; } if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } if ( input . DBInstanceAutomatedBackupsArn !== undefined && input . DBInstanceAutomatedBackupsArn !== null ) { entries [ "DBInstanceAutomatedBackupsArn" ] = input . DBInstanceAutomatedBackupsArn ; } return entries ; } ; const serializeAws_queryDescribeDBInstancesMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeDBLogFilesMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . FilenameContains !== undefined && input . FilenameContains !== null ) { entries [ "FilenameContains" ] = input . FilenameContains ; } if ( input . FileLastWritten !== undefined && input . FileLastWritten !== null ) { entries [ "FileLastWritten" ] = input . FileLastWritten ; } if ( input . FileSize !== undefined && input . FileSize !== null ) { entries [ "FileSize" ] = input . FileSize ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeDBParameterGroupsMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBParameterGroupName !== undefined && input . DBParameterGroupName !== null ) { entries [ "DBParameterGroupName" ] = input . DBParameterGroupName ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeDBParametersMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBParameterGroupName !== undefined && input . DBParameterGroupName !== null ) { entries [ "DBParameterGroupName" ] = input . DBParameterGroupName ; } if ( input . Source !== undefined && input . Source !== null ) { entries [ "Source" ] = input . Source ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeDBProxiesRequest = ( input , context ) : any => { const entries = { } ; if ( input . DBProxyName !== undefined && input . DBProxyName !== null ) { entries [ "DBProxyName" ] = input . DBProxyName ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } return entries ; } ; const serializeAws_queryDescribeDBProxyEndpointsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DBProxyName !== undefined && input . DBProxyName !== null ) { entries [ "DBProxyName" ] = input . DBProxyName ; } if ( input . DBProxyEndpointName !== undefined && input . DBProxyEndpointName !== null ) { entries [ "DBProxyEndpointName" ] = input . DBProxyEndpointName ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } return entries ; } ; const serializeAws_queryDescribeDBProxyTargetGroupsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DBProxyName !== undefined && input . DBProxyName !== null ) { entries [ "DBProxyName" ] = input . DBProxyName ; } if ( input . TargetGroupName !== undefined && input . TargetGroupName !== null ) { entries [ "TargetGroupName" ] = input . TargetGroupName ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } return entries ; } ; const serializeAws_queryDescribeDBProxyTargetsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DBProxyName !== undefined && input . DBProxyName !== null ) { entries [ "DBProxyName" ] = input . DBProxyName ; } if ( input . TargetGroupName !== undefined && input . TargetGroupName !== null ) { entries [ "TargetGroupName" ] = input . TargetGroupName ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } return entries ; } ; const serializeAws_queryDescribeDBSecurityGroupsMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBSecurityGroupName !== undefined && input . DBSecurityGroupName !== null ) { entries [ "DBSecurityGroupName" ] = input . DBSecurityGroupName ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeDBSnapshotAttributesMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBSnapshotIdentifier !== undefined && input . DBSnapshotIdentifier !== null ) { entries [ "DBSnapshotIdentifier" ] = input . DBSnapshotIdentifier ; } return entries ; } ; const serializeAws_queryDescribeDBSnapshotsMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . DBSnapshotIdentifier !== undefined && input . DBSnapshotIdentifier !== null ) { entries [ "DBSnapshotIdentifier" ] = input . DBSnapshotIdentifier ; } if ( input . SnapshotType !== undefined && input . SnapshotType !== null ) { entries [ "SnapshotType" ] = input . SnapshotType ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } if ( input . IncludeShared !== undefined && input . IncludeShared !== null ) { entries [ "IncludeShared" ] = input . IncludeShared ; } if ( input . IncludePublic !== undefined && input . IncludePublic !== null ) { entries [ "IncludePublic" ] = input . IncludePublic ; } if ( input . DbiResourceId !== undefined && input . DbiResourceId !== null ) { entries [ "DbiResourceId" ] = input . DbiResourceId ; } return entries ; } ; const serializeAws_queryDescribeDBSubnetGroupsMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBSubnetGroupName !== undefined && input . DBSubnetGroupName !== null ) { entries [ "DBSubnetGroupName" ] = input . DBSubnetGroupName ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeEngineDefaultClusterParametersMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBParameterGroupFamily !== undefined && input . DBParameterGroupFamily !== null ) { entries [ "DBParameterGroupFamily" ] = input . DBParameterGroupFamily ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeEngineDefaultParametersMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBParameterGroupFamily !== undefined && input . DBParameterGroupFamily !== null ) { entries [ "DBParameterGroupFamily" ] = input . DBParameterGroupFamily ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeEventCategoriesMessage = ( input , context ) : any => { const entries = { } ; if ( input . SourceType !== undefined && input . SourceType !== null ) { entries [ "SourceType" ] = input . SourceType ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryDescribeEventsMessage = ( input , context ) : any => { const entries = { } ; if ( input . SourceIdentifier !== undefined && input . SourceIdentifier !== null ) { entries [ "SourceIdentifier" ] = input . SourceIdentifier ; } if ( input . SourceType !== undefined && input . SourceType !== null ) { entries [ "SourceType" ] = input . SourceType ; } if ( input . StartTime !== undefined && input . StartTime !== null ) { entries [ "StartTime" ] = input . StartTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . EndTime !== undefined && input . EndTime !== null ) { entries [ "EndTime" ] = input . EndTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . Duration !== undefined && input . Duration !== null ) { entries [ "Duration" ] = input . Duration ; } if ( input . EventCategories !== undefined && input . EventCategories !== null ) { const memberEntries = serializeAws_queryEventCategoriesList ( input . EventCategories , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EventCategories.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeEventSubscriptionsMessage = ( input , context ) : any => { const entries = { } ; if ( input . SubscriptionName !== undefined && input . SubscriptionName !== null ) { entries [ "SubscriptionName" ] = input . SubscriptionName ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeExportTasksMessage = ( input , context ) : any => { const entries = { } ; if ( input . ExportTaskIdentifier !== undefined && input . ExportTaskIdentifier !== null ) { entries [ "ExportTaskIdentifier" ] = input . ExportTaskIdentifier ; } if ( input . SourceArn !== undefined && input . SourceArn !== null ) { entries [ "SourceArn" ] = input . SourceArn ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } return entries ; } ; const serializeAws_queryDescribeGlobalClustersMessage = ( input , context ) : any => { const entries = { } ; if ( input . GlobalClusterIdentifier !== undefined && input . GlobalClusterIdentifier !== null ) { entries [ "GlobalClusterIdentifier" ] = input . GlobalClusterIdentifier ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeInstallationMediaMessage = ( input , context ) : any => { const entries = { } ; if ( input . InstallationMediaId !== undefined && input . InstallationMediaId !== null ) { entries [ "InstallationMediaId" ] = input . InstallationMediaId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeOptionGroupOptionsMessage = ( input , context ) : any => { const entries = { } ; if ( input . EngineName !== undefined && input . EngineName !== null ) { entries [ "EngineName" ] = input . EngineName ; } if ( input . MajorEngineVersion !== undefined && input . MajorEngineVersion !== null ) { entries [ "MajorEngineVersion" ] = input . MajorEngineVersion ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeOptionGroupsMessage = ( input , context ) : any => { const entries = { } ; if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . EngineName !== undefined && input . EngineName !== null ) { entries [ "EngineName" ] = input . EngineName ; } if ( input . MajorEngineVersion !== undefined && input . MajorEngineVersion !== null ) { entries [ "MajorEngineVersion" ] = input . MajorEngineVersion ; } return entries ; } ; const serializeAws_queryDescribeOrderableDBInstanceOptionsMessage = ( input , context ) : any => { const entries = { } ; if ( input . Engine !== undefined && input . Engine !== null ) { entries [ "Engine" ] = input . Engine ; } if ( input . EngineVersion !== undefined && input . EngineVersion !== null ) { entries [ "EngineVersion" ] = input . EngineVersion ; } if ( input . DBInstanceClass !== undefined && input . DBInstanceClass !== null ) { entries [ "DBInstanceClass" ] = input . DBInstanceClass ; } if ( input . LicenseModel !== undefined && input . LicenseModel !== null ) { entries [ "LicenseModel" ] = input . LicenseModel ; } if ( input . AvailabilityZoneGroup !== undefined && input . AvailabilityZoneGroup !== null ) { entries [ "AvailabilityZoneGroup" ] = input . AvailabilityZoneGroup ; } if ( input . Vpc !== undefined && input . Vpc !== null ) { entries [ "Vpc" ] = input . Vpc ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribePendingMaintenanceActionsMessage = ( input , context ) : any => { const entries = { } ; if ( input . ResourceIdentifier !== undefined && input . ResourceIdentifier !== null ) { entries [ "ResourceIdentifier" ] = input . ResourceIdentifier ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } return entries ; } ; const serializeAws_queryDescribeReservedDBInstancesMessage = ( input , context ) : any => { const entries = { } ; if ( input . ReservedDBInstanceId !== undefined && input . ReservedDBInstanceId !== null ) { entries [ "ReservedDBInstanceId" ] = input . ReservedDBInstanceId ; } if ( input . ReservedDBInstancesOfferingId !== undefined && input . ReservedDBInstancesOfferingId !== null ) { entries [ "ReservedDBInstancesOfferingId" ] = input . ReservedDBInstancesOfferingId ; } if ( input . DBInstanceClass !== undefined && input . DBInstanceClass !== null ) { entries [ "DBInstanceClass" ] = input . DBInstanceClass ; } if ( input . Duration !== undefined && input . Duration !== null ) { entries [ "Duration" ] = input . Duration ; } if ( input . ProductDescription !== undefined && input . ProductDescription !== null ) { entries [ "ProductDescription" ] = input . ProductDescription ; } if ( input . OfferingType !== undefined && input . OfferingType !== null ) { entries [ "OfferingType" ] = input . OfferingType ; } if ( input . MultiAZ !== undefined && input . MultiAZ !== null ) { entries [ "MultiAZ" ] = input . MultiAZ ; } if ( input . LeaseId !== undefined && input . LeaseId !== null ) { entries [ "LeaseId" ] = input . LeaseId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeReservedDBInstancesOfferingsMessage = ( input , context ) : any => { const entries = { } ; if ( input . ReservedDBInstancesOfferingId !== undefined && input . ReservedDBInstancesOfferingId !== null ) { entries [ "ReservedDBInstancesOfferingId" ] = input . ReservedDBInstancesOfferingId ; } if ( input . DBInstanceClass !== undefined && input . DBInstanceClass !== null ) { entries [ "DBInstanceClass" ] = input . DBInstanceClass ; } if ( input . Duration !== undefined && input . Duration !== null ) { entries [ "Duration" ] = input . Duration ; } if ( input . ProductDescription !== undefined && input . ProductDescription !== null ) { entries [ "ProductDescription" ] = input . ProductDescription ; } if ( input . OfferingType !== undefined && input . OfferingType !== null ) { entries [ "OfferingType" ] = input . OfferingType ; } if ( input . MultiAZ !== undefined && input . MultiAZ !== null ) { entries [ "MultiAZ" ] = input . MultiAZ ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } return entries ; } ; const serializeAws_queryDescribeSourceRegionsMessage = ( input , context ) : any => { const entries = { } ; if ( input . RegionName !== undefined && input . RegionName !== null ) { entries [ "RegionName" ] = input . RegionName ; } if ( input . MaxRecords !== undefined && input . MaxRecords !== null ) { entries [ "MaxRecords" ] = input . MaxRecords ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryDescribeValidDBInstanceModificationsMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } return entries ; } ; const serializeAws_queryDownloadDBLogFilePortionMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . LogFileName !== undefined && input . LogFileName !== null ) { entries [ "LogFileName" ] = input . LogFileName ; } if ( input . Marker !== undefined && input . Marker !== null ) { entries [ "Marker" ] = input . Marker ; } if ( input . NumberOfLines !== undefined && input . NumberOfLines !== null ) { entries [ "NumberOfLines" ] = input . NumberOfLines ; } return entries ; } ; const serializeAws_queryEngineModeList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_queryEventCategoriesList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `EventCategory.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_queryFailoverDBClusterMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . TargetDBInstanceIdentifier !== undefined && input . TargetDBInstanceIdentifier !== null ) { entries [ "TargetDBInstanceIdentifier" ] = input . TargetDBInstanceIdentifier ; } return entries ; } ; const serializeAws_queryFailoverGlobalClusterMessage = ( input , context ) : any => { const entries = { } ; if ( input . GlobalClusterIdentifier !== undefined && input . GlobalClusterIdentifier !== null ) { entries [ "GlobalClusterIdentifier" ] = input . GlobalClusterIdentifier ; } if ( input . TargetDbClusterIdentifier !== undefined && input . TargetDbClusterIdentifier !== null ) { entries [ "TargetDbClusterIdentifier" ] = input . TargetDbClusterIdentifier ; } return entries ; } ; const serializeAws_queryFilter = ( input , context ) : any => { const entries = { } ; if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } if ( input . Values !== undefined && input . Values !== null ) { const memberEntries = serializeAws_queryFilterValueList ( input . Values , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Values.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryFilterList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_queryFilter ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Filter.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_queryFilterValueList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Value.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_queryImportInstallationMediaMessage = ( input , context ) : any => { const entries = { } ; if ( input . CustomAvailabilityZoneId !== undefined && input . CustomAvailabilityZoneId !== null ) { entries [ "CustomAvailabilityZoneId" ] = input . CustomAvailabilityZoneId ; } if ( input . Engine !== undefined && input . Engine !== null ) { entries [ "Engine" ] = input . Engine ; } if ( input . EngineVersion !== undefined && input . EngineVersion !== null ) { entries [ "EngineVersion" ] = input . EngineVersion ; } if ( input . EngineInstallationMediaPath !== undefined && input . EngineInstallationMediaPath !== null ) { entries [ "EngineInstallationMediaPath" ] = input . EngineInstallationMediaPath ; } if ( input . OSInstallationMediaPath !== undefined && input . OSInstallationMediaPath !== null ) { entries [ "OSInstallationMediaPath" ] = input . OSInstallationMediaPath ; } return entries ; } ; const serializeAws_queryKeyList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_queryListTagsForResourceMessage = ( input , context ) : any => { const entries = { } ; if ( input . ResourceName !== undefined && input . ResourceName !== null ) { entries [ "ResourceName" ] = input . ResourceName ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_queryFilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryLogTypeList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_queryModifyCertificatesMessage = ( input , context ) : any => { const entries = { } ; if ( input . CertificateIdentifier !== undefined && input . CertificateIdentifier !== null ) { entries [ "CertificateIdentifier" ] = input . CertificateIdentifier ; } if ( input . RemoveCustomerOverride !== undefined && input . RemoveCustomerOverride !== null ) { entries [ "RemoveCustomerOverride" ] = input . RemoveCustomerOverride ; } return entries ; } ; const serializeAws_queryModifyCurrentDBClusterCapacityMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . Capacity !== undefined && input . Capacity !== null ) { entries [ "Capacity" ] = input . Capacity ; } if ( input . SecondsBeforeTimeout !== undefined && input . SecondsBeforeTimeout !== null ) { entries [ "SecondsBeforeTimeout" ] = input . SecondsBeforeTimeout ; } if ( input . TimeoutAction !== undefined && input . TimeoutAction !== null ) { entries [ "TimeoutAction" ] = input . TimeoutAction ; } return entries ; } ; const serializeAws_queryModifyCustomDBEngineVersionMessage = ( input , context ) : any => { const entries = { } ; if ( input . Engine !== undefined && input . Engine !== null ) { entries [ "Engine" ] = input . Engine ; } if ( input . EngineVersion !== undefined && input . EngineVersion !== null ) { entries [ "EngineVersion" ] = input . EngineVersion ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . Status !== undefined && input . Status !== null ) { entries [ "Status" ] = input . Status ; } return entries ; } ; const serializeAws_queryModifyDBClusterEndpointMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterEndpointIdentifier !== undefined && input . DBClusterEndpointIdentifier !== null ) { entries [ "DBClusterEndpointIdentifier" ] = input . DBClusterEndpointIdentifier ; } if ( input . EndpointType !== undefined && input . EndpointType !== null ) { entries [ "EndpointType" ] = input . EndpointType ; } if ( input . StaticMembers !== undefined && input . StaticMembers !== null ) { const memberEntries = serializeAws_queryStringList ( input . StaticMembers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `StaticMembers.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ExcludedMembers !== undefined && input . ExcludedMembers !== null ) { const memberEntries = serializeAws_queryStringList ( input . ExcludedMembers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ExcludedMembers.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryModifyDBClusterMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . NewDBClusterIdentifier !== undefined && input . NewDBClusterIdentifier !== null ) { entries [ "NewDBClusterIdentifier" ] = input . NewDBClusterIdentifier ; } if ( input . ApplyImmediately !== undefined && input . ApplyImmediately !== null ) { entries [ "ApplyImmediately" ] = input . ApplyImmediately ; } if ( input . BackupRetentionPeriod !== undefined && input . BackupRetentionPeriod !== null ) { entries [ "BackupRetentionPeriod" ] = input . BackupRetentionPeriod ; } if ( input . DBClusterParameterGroupName !== undefined && input . DBClusterParameterGroupName !== null ) { entries [ "DBClusterParameterGroupName" ] = input . DBClusterParameterGroupName ; } if ( input . VpcSecurityGroupIds !== undefined && input . VpcSecurityGroupIds !== null ) { const memberEntries = serializeAws_queryVpcSecurityGroupIdList ( input . VpcSecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSecurityGroupIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Port !== undefined && input . Port !== null ) { entries [ "Port" ] = input . Port ; } if ( input . MasterUserPassword !== undefined && input . MasterUserPassword !== null ) { entries [ "MasterUserPassword" ] = input . MasterUserPassword ; } if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } if ( input . PreferredBackupWindow !== undefined && input . PreferredBackupWindow !== null ) { entries [ "PreferredBackupWindow" ] = input . PreferredBackupWindow ; } if ( input . PreferredMaintenanceWindow !== undefined && input . PreferredMaintenanceWindow !== null ) { entries [ "PreferredMaintenanceWindow" ] = input . PreferredMaintenanceWindow ; } if ( input . EnableIAMDatabaseAuthentication !== undefined && input . EnableIAMDatabaseAuthentication !== null ) { entries [ "EnableIAMDatabaseAuthentication" ] = input . EnableIAMDatabaseAuthentication ; } if ( input . BacktrackWindow !== undefined && input . BacktrackWindow !== null ) { entries [ "BacktrackWindow" ] = input . BacktrackWindow ; } if ( input . CloudwatchLogsExportConfiguration !== undefined && input . CloudwatchLogsExportConfiguration !== null ) { const memberEntries = serializeAws_queryCloudwatchLogsExportConfiguration ( input . CloudwatchLogsExportConfiguration , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CloudwatchLogsExportConfiguration.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . EngineVersion !== undefined && input . EngineVersion !== null ) { entries [ "EngineVersion" ] = input . EngineVersion ; } if ( input . AllowMajorVersionUpgrade !== undefined && input . AllowMajorVersionUpgrade !== null ) { entries [ "AllowMajorVersionUpgrade" ] = input . AllowMajorVersionUpgrade ; } if ( input . DBInstanceParameterGroupName !== undefined && input . DBInstanceParameterGroupName !== null ) { entries [ "DBInstanceParameterGroupName" ] = input . DBInstanceParameterGroupName ; } if ( input . Domain !== undefined && input . Domain !== null ) { entries [ "Domain" ] = input . Domain ; } if ( input . DomainIAMRoleName !== undefined && input . DomainIAMRoleName !== null ) { entries [ "DomainIAMRoleName" ] = input . DomainIAMRoleName ; } if ( input . ScalingConfiguration !== undefined && input . ScalingConfiguration !== null ) { const memberEntries = serializeAws_queryScalingConfiguration ( input . ScalingConfiguration , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ScalingConfiguration.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DeletionProtection !== undefined && input . DeletionProtection !== null ) { entries [ "DeletionProtection" ] = input . DeletionProtection ; } if ( input . EnableHttpEndpoint !== undefined && input . EnableHttpEndpoint !== null ) { entries [ "EnableHttpEndpoint" ] = input . EnableHttpEndpoint ; } if ( input . CopyTagsToSnapshot !== undefined && input . CopyTagsToSnapshot !== null ) { entries [ "CopyTagsToSnapshot" ] = input . CopyTagsToSnapshot ; } if ( input . EnableGlobalWriteForwarding !== undefined && input . EnableGlobalWriteForwarding !== null ) { entries [ "EnableGlobalWriteForwarding" ] = input . EnableGlobalWriteForwarding ; } if ( input . DBClusterInstanceClass !== undefined && input . DBClusterInstanceClass !== null ) { entries [ "DBClusterInstanceClass" ] = input . DBClusterInstanceClass ; } if ( input . AllocatedStorage !== undefined && input . AllocatedStorage !== null ) { entries [ "AllocatedStorage" ] = input . AllocatedStorage ; } if ( input . StorageType !== undefined && input . StorageType !== null ) { entries [ "StorageType" ] = input . StorageType ; } if ( input . Iops !== undefined && input . Iops !== null ) { entries [ "Iops" ] = input . Iops ; } if ( input . AutoMinorVersionUpgrade !== undefined && input . AutoMinorVersionUpgrade !== null ) { entries [ "AutoMinorVersionUpgrade" ] = input . AutoMinorVersionUpgrade ; } if ( input . MonitoringInterval !== undefined && input . MonitoringInterval !== null ) { entries [ "MonitoringInterval" ] = input . MonitoringInterval ; } if ( input . MonitoringRoleArn !== undefined && input . MonitoringRoleArn !== null ) { entries [ "MonitoringRoleArn" ] = input . MonitoringRoleArn ; } if ( input . EnablePerformanceInsights !== undefined && input . EnablePerformanceInsights !== null ) { entries [ "EnablePerformanceInsights" ] = input . EnablePerformanceInsights ; } if ( input . PerformanceInsightsKMSKeyId !== undefined && input . PerformanceInsightsKMSKeyId !== null ) { entries [ "PerformanceInsightsKMSKeyId" ] = input . PerformanceInsightsKMSKeyId ; } if ( input . PerformanceInsightsRetentionPeriod !== undefined && input . PerformanceInsightsRetentionPeriod !== null ) { entries [ "PerformanceInsightsRetentionPeriod" ] = input . PerformanceInsightsRetentionPeriod ; } return entries ; } ; const serializeAws_queryModifyDBClusterParameterGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterParameterGroupName !== undefined && input . DBClusterParameterGroupName !== null ) { entries [ "DBClusterParameterGroupName" ] = input . DBClusterParameterGroupName ; } if ( input . Parameters !== undefined && input . Parameters !== null ) { const memberEntries = serializeAws_queryParametersList ( input . Parameters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Parameters.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryModifyDBClusterSnapshotAttributeMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterSnapshotIdentifier !== undefined && input . DBClusterSnapshotIdentifier !== null ) { entries [ "DBClusterSnapshotIdentifier" ] = input . DBClusterSnapshotIdentifier ; } if ( input . AttributeName !== undefined && input . AttributeName !== null ) { entries [ "AttributeName" ] = input . AttributeName ; } if ( input . ValuesToAdd !== undefined && input . ValuesToAdd !== null ) { const memberEntries = serializeAws_queryAttributeValueList ( input . ValuesToAdd , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ValuesToAdd.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ValuesToRemove !== undefined && input . ValuesToRemove !== null ) { const memberEntries = serializeAws_queryAttributeValueList ( input . ValuesToRemove , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ValuesToRemove.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryModifyDBInstanceMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . AllocatedStorage !== undefined && input . AllocatedStorage !== null ) { entries [ "AllocatedStorage" ] = input . AllocatedStorage ; } if ( input . DBInstanceClass !== undefined && input . DBInstanceClass !== null ) { entries [ "DBInstanceClass" ] = input . DBInstanceClass ; } if ( input . DBSubnetGroupName !== undefined && input . DBSubnetGroupName !== null ) { entries [ "DBSubnetGroupName" ] = input . DBSubnetGroupName ; } if ( input . DBSecurityGroups !== undefined && input . DBSecurityGroups !== null ) { const memberEntries = serializeAws_queryDBSecurityGroupNameList ( input . DBSecurityGroups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DBSecurityGroups.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . VpcSecurityGroupIds !== undefined && input . VpcSecurityGroupIds !== null ) { const memberEntries = serializeAws_queryVpcSecurityGroupIdList ( input . VpcSecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSecurityGroupIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ApplyImmediately !== undefined && input . ApplyImmediately !== null ) { entries [ "ApplyImmediately" ] = input . ApplyImmediately ; } if ( input . MasterUserPassword !== undefined && input . MasterUserPassword !== null ) { entries [ "MasterUserPassword" ] = input . MasterUserPassword ; } if ( input . DBParameterGroupName !== undefined && input . DBParameterGroupName !== null ) { entries [ "DBParameterGroupName" ] = input . DBParameterGroupName ; } if ( input . BackupRetentionPeriod !== undefined && input . BackupRetentionPeriod !== null ) { entries [ "BackupRetentionPeriod" ] = input . BackupRetentionPeriod ; } if ( input . PreferredBackupWindow !== undefined && input . PreferredBackupWindow !== null ) { entries [ "PreferredBackupWindow" ] = input . PreferredBackupWindow ; } if ( input . PreferredMaintenanceWindow !== undefined && input . PreferredMaintenanceWindow !== null ) { entries [ "PreferredMaintenanceWindow" ] = input . PreferredMaintenanceWindow ; } if ( input . MultiAZ !== undefined && input . MultiAZ !== null ) { entries [ "MultiAZ" ] = input . MultiAZ ; } if ( input . EngineVersion !== undefined && input . EngineVersion !== null ) { entries [ "EngineVersion" ] = input . EngineVersion ; } if ( input . AllowMajorVersionUpgrade !== undefined && input . AllowMajorVersionUpgrade !== null ) { entries [ "AllowMajorVersionUpgrade" ] = input . AllowMajorVersionUpgrade ; } if ( input . AutoMinorVersionUpgrade !== undefined && input . AutoMinorVersionUpgrade !== null ) { entries [ "AutoMinorVersionUpgrade" ] = input . AutoMinorVersionUpgrade ; } if ( input . LicenseModel !== undefined && input . LicenseModel !== null ) { entries [ "LicenseModel" ] = input . LicenseModel ; } if ( input . Iops !== undefined && input . Iops !== null ) { entries [ "Iops" ] = input . Iops ; } if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } if ( input . NewDBInstanceIdentifier !== undefined && input . NewDBInstanceIdentifier !== null ) { entries [ "NewDBInstanceIdentifier" ] = input . NewDBInstanceIdentifier ; } if ( input . StorageType !== undefined && input . StorageType !== null ) { entries [ "StorageType" ] = input . StorageType ; } if ( input . TdeCredentialArn !== undefined && input . TdeCredentialArn !== null ) { entries [ "TdeCredentialArn" ] = input . TdeCredentialArn ; } if ( input . TdeCredentialPassword !== undefined && input . TdeCredentialPassword !== null ) { entries [ "TdeCredentialPassword" ] = input . TdeCredentialPassword ; } if ( input . CACertificateIdentifier !== undefined && input . CACertificateIdentifier !== null ) { entries [ "CACertificateIdentifier" ] = input . CACertificateIdentifier ; } if ( input . Domain !== undefined && input . Domain !== null ) { entries [ "Domain" ] = input . Domain ; } if ( input . CopyTagsToSnapshot !== undefined && input . CopyTagsToSnapshot !== null ) { entries [ "CopyTagsToSnapshot" ] = input . CopyTagsToSnapshot ; } if ( input . MonitoringInterval !== undefined && input . MonitoringInterval !== null ) { entries [ "MonitoringInterval" ] = input . MonitoringInterval ; } if ( input . DBPortNumber !== undefined && input . DBPortNumber !== null ) { entries [ "DBPortNumber" ] = input . DBPortNumber ; } if ( input . PubliclyAccessible !== undefined && input . PubliclyAccessible !== null ) { entries [ "PubliclyAccessible" ] = input . PubliclyAccessible ; } if ( input . MonitoringRoleArn !== undefined && input . MonitoringRoleArn !== null ) { entries [ "MonitoringRoleArn" ] = input . MonitoringRoleArn ; } if ( input . DomainIAMRoleName !== undefined && input . DomainIAMRoleName !== null ) { entries [ "DomainIAMRoleName" ] = input . DomainIAMRoleName ; } if ( input . PromotionTier !== undefined && input . PromotionTier !== null ) { entries [ "PromotionTier" ] = input . PromotionTier ; } if ( input . EnableIAMDatabaseAuthentication !== undefined && input . EnableIAMDatabaseAuthentication !== null ) { entries [ "EnableIAMDatabaseAuthentication" ] = input . EnableIAMDatabaseAuthentication ; } if ( input . EnablePerformanceInsights !== undefined && input . EnablePerformanceInsights !== null ) { entries [ "EnablePerformanceInsights" ] = input . EnablePerformanceInsights ; } if ( input . PerformanceInsightsKMSKeyId !== undefined && input . PerformanceInsightsKMSKeyId !== null ) { entries [ "PerformanceInsightsKMSKeyId" ] = input . PerformanceInsightsKMSKeyId ; } if ( input . PerformanceInsightsRetentionPeriod !== undefined && input . PerformanceInsightsRetentionPeriod !== null ) { entries [ "PerformanceInsightsRetentionPeriod" ] = input . PerformanceInsightsRetentionPeriod ; } if ( input . CloudwatchLogsExportConfiguration !== undefined && input . CloudwatchLogsExportConfiguration !== null ) { const memberEntries = serializeAws_queryCloudwatchLogsExportConfiguration ( input . CloudwatchLogsExportConfiguration , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CloudwatchLogsExportConfiguration.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ProcessorFeatures !== undefined && input . ProcessorFeatures !== null ) { const memberEntries = serializeAws_queryProcessorFeatureList ( input . ProcessorFeatures , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ProcessorFeatures.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . UseDefaultProcessorFeatures !== undefined && input . UseDefaultProcessorFeatures !== null ) { entries [ "UseDefaultProcessorFeatures" ] = input . UseDefaultProcessorFeatures ; } if ( input . DeletionProtection !== undefined && input . DeletionProtection !== null ) { entries [ "DeletionProtection" ] = input . DeletionProtection ; } if ( input . MaxAllocatedStorage !== undefined && input . MaxAllocatedStorage !== null ) { entries [ "MaxAllocatedStorage" ] = input . MaxAllocatedStorage ; } if ( input . CertificateRotationRestart !== undefined && input . CertificateRotationRestart !== null ) { entries [ "CertificateRotationRestart" ] = input . CertificateRotationRestart ; } if ( input . ReplicaMode !== undefined && input . ReplicaMode !== null ) { entries [ "ReplicaMode" ] = input . ReplicaMode ; } if ( input . EnableCustomerOwnedIp !== undefined && input . EnableCustomerOwnedIp !== null ) { entries [ "EnableCustomerOwnedIp" ] = input . EnableCustomerOwnedIp ; } if ( input . AwsBackupRecoveryPointArn !== undefined && input . AwsBackupRecoveryPointArn !== null ) { entries [ "AwsBackupRecoveryPointArn" ] = input . AwsBackupRecoveryPointArn ; } if ( input . AutomationMode !== undefined && input . AutomationMode !== null ) { entries [ "AutomationMode" ] = input . AutomationMode ; } if ( input . ResumeFullAutomationModeMinutes !== undefined && input . ResumeFullAutomationModeMinutes !== null ) { entries [ "ResumeFullAutomationModeMinutes" ] = input . ResumeFullAutomationModeMinutes ; } return entries ; } ; const serializeAws_queryModifyDBParameterGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBParameterGroupName !== undefined && input . DBParameterGroupName !== null ) { entries [ "DBParameterGroupName" ] = input . DBParameterGroupName ; } if ( input . Parameters !== undefined && input . Parameters !== null ) { const memberEntries = serializeAws_queryParametersList ( input . Parameters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Parameters.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryModifyDBProxyEndpointRequest = ( input , context ) : any => { const entries = { } ; if ( input . DBProxyEndpointName !== undefined && input . DBProxyEndpointName !== null ) { entries [ "DBProxyEndpointName" ] = input . DBProxyEndpointName ; } if ( input . NewDBProxyEndpointName !== undefined && input . NewDBProxyEndpointName !== null ) { entries [ "NewDBProxyEndpointName" ] = input . NewDBProxyEndpointName ; } if ( input . VpcSecurityGroupIds !== undefined && input . VpcSecurityGroupIds !== null ) { const memberEntries = serializeAws_queryStringList ( input . VpcSecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSecurityGroupIds.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryModifyDBProxyRequest = ( input , context ) : any => { const entries = { } ; if ( input . DBProxyName !== undefined && input . DBProxyName !== null ) { entries [ "DBProxyName" ] = input . DBProxyName ; } if ( input . NewDBProxyName !== undefined && input . NewDBProxyName !== null ) { entries [ "NewDBProxyName" ] = input . NewDBProxyName ; } if ( input . Auth !== undefined && input . Auth !== null ) { const memberEntries = serializeAws_queryUserAuthConfigList ( input . Auth , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Auth.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . RequireTLS !== undefined && input . RequireTLS !== null ) { entries [ "RequireTLS" ] = input . RequireTLS ; } if ( input . IdleClientTimeout !== undefined && input . IdleClientTimeout !== null ) { entries [ "IdleClientTimeout" ] = input . IdleClientTimeout ; } if ( input . DebugLogging !== undefined && input . DebugLogging !== null ) { entries [ "DebugLogging" ] = input . DebugLogging ; } if ( input . RoleArn !== undefined && input . RoleArn !== null ) { entries [ "RoleArn" ] = input . RoleArn ; } if ( input . SecurityGroups !== undefined && input . SecurityGroups !== null ) { const memberEntries = serializeAws_queryStringList ( input . SecurityGroups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroups.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryModifyDBProxyTargetGroupRequest = ( input , context ) : any => { const entries = { } ; if ( input . TargetGroupName !== undefined && input . TargetGroupName !== null ) { entries [ "TargetGroupName" ] = input . TargetGroupName ; } if ( input . DBProxyName !== undefined && input . DBProxyName !== null ) { entries [ "DBProxyName" ] = input . DBProxyName ; } if ( input . ConnectionPoolConfig !== undefined && input . ConnectionPoolConfig !== null ) { const memberEntries = serializeAws_queryConnectionPoolConfiguration ( input . ConnectionPoolConfig , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ConnectionPoolConfig.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . NewName !== undefined && input . NewName !== null ) { entries [ "NewName" ] = input . NewName ; } return entries ; } ; const serializeAws_queryModifyDBSnapshotAttributeMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBSnapshotIdentifier !== undefined && input . DBSnapshotIdentifier !== null ) { entries [ "DBSnapshotIdentifier" ] = input . DBSnapshotIdentifier ; } if ( input . AttributeName !== undefined && input . AttributeName !== null ) { entries [ "AttributeName" ] = input . AttributeName ; } if ( input . ValuesToAdd !== undefined && input . ValuesToAdd !== null ) { const memberEntries = serializeAws_queryAttributeValueList ( input . ValuesToAdd , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ValuesToAdd.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ValuesToRemove !== undefined && input . ValuesToRemove !== null ) { const memberEntries = serializeAws_queryAttributeValueList ( input . ValuesToRemove , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ValuesToRemove.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryModifyDBSnapshotMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBSnapshotIdentifier !== undefined && input . DBSnapshotIdentifier !== null ) { entries [ "DBSnapshotIdentifier" ] = input . DBSnapshotIdentifier ; } if ( input . EngineVersion !== undefined && input . EngineVersion !== null ) { entries [ "EngineVersion" ] = input . EngineVersion ; } if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } return entries ; } ; const serializeAws_queryModifyDBSubnetGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBSubnetGroupName !== undefined && input . DBSubnetGroupName !== null ) { entries [ "DBSubnetGroupName" ] = input . DBSubnetGroupName ; } if ( input . DBSubnetGroupDescription !== undefined && input . DBSubnetGroupDescription !== null ) { entries [ "DBSubnetGroupDescription" ] = input . DBSubnetGroupDescription ; } if ( input . SubnetIds !== undefined && input . SubnetIds !== null ) { const memberEntries = serializeAws_querySubnetIdentifierList ( input . SubnetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SubnetIds.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryModifyEventSubscriptionMessage = ( input , context ) : any => { const entries = { } ; if ( input . SubscriptionName !== undefined && input . SubscriptionName !== null ) { entries [ "SubscriptionName" ] = input . SubscriptionName ; } if ( input . SnsTopicArn !== undefined && input . SnsTopicArn !== null ) { entries [ "SnsTopicArn" ] = input . SnsTopicArn ; } if ( input . SourceType !== undefined && input . SourceType !== null ) { entries [ "SourceType" ] = input . SourceType ; } if ( input . EventCategories !== undefined && input . EventCategories !== null ) { const memberEntries = serializeAws_queryEventCategoriesList ( input . EventCategories , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EventCategories.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Enabled !== undefined && input . Enabled !== null ) { entries [ "Enabled" ] = input . Enabled ; } return entries ; } ; const serializeAws_queryModifyGlobalClusterMessage = ( input , context ) : any => { const entries = { } ; if ( input . GlobalClusterIdentifier !== undefined && input . GlobalClusterIdentifier !== null ) { entries [ "GlobalClusterIdentifier" ] = input . GlobalClusterIdentifier ; } if ( input . NewGlobalClusterIdentifier !== undefined && input . NewGlobalClusterIdentifier !== null ) { entries [ "NewGlobalClusterIdentifier" ] = input . NewGlobalClusterIdentifier ; } if ( input . DeletionProtection !== undefined && input . DeletionProtection !== null ) { entries [ "DeletionProtection" ] = input . DeletionProtection ; } if ( input . EngineVersion !== undefined && input . EngineVersion !== null ) { entries [ "EngineVersion" ] = input . EngineVersion ; } if ( input . AllowMajorVersionUpgrade !== undefined && input . AllowMajorVersionUpgrade !== null ) { entries [ "AllowMajorVersionUpgrade" ] = input . AllowMajorVersionUpgrade ; } return entries ; } ; const serializeAws_queryModifyOptionGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } if ( input . OptionsToInclude !== undefined && input . OptionsToInclude !== null ) { const memberEntries = serializeAws_queryOptionConfigurationList ( input . OptionsToInclude , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `OptionsToInclude.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . OptionsToRemove !== undefined && input . OptionsToRemove !== null ) { const memberEntries = serializeAws_queryOptionNamesList ( input . OptionsToRemove , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `OptionsToRemove.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ApplyImmediately !== undefined && input . ApplyImmediately !== null ) { entries [ "ApplyImmediately" ] = input . ApplyImmediately ; } return entries ; } ; const serializeAws_queryOptionConfiguration = ( input , context ) : any => { const entries = { } ; if ( input . OptionName !== undefined && input . OptionName !== null ) { entries [ "OptionName" ] = input . OptionName ; } if ( input . Port !== undefined && input . Port !== null ) { entries [ "Port" ] = input . Port ; } if ( input . OptionVersion !== undefined && input . OptionVersion !== null ) { entries [ "OptionVersion" ] = input . OptionVersion ; } if ( input . DBSecurityGroupMemberships !== undefined && input . DBSecurityGroupMemberships !== null ) { const memberEntries = serializeAws_queryDBSecurityGroupNameList ( input . DBSecurityGroupMemberships , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DBSecurityGroupMemberships.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . VpcSecurityGroupMemberships !== undefined && input . VpcSecurityGroupMemberships !== null ) { const memberEntries = serializeAws_queryVpcSecurityGroupIdList ( input . VpcSecurityGroupMemberships , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSecurityGroupMemberships.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . OptionSettings !== undefined && input . OptionSettings !== null ) { const memberEntries = serializeAws_queryOptionSettingsList ( input . OptionSettings , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `OptionSettings.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryOptionConfigurationList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_queryOptionConfiguration ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `OptionConfiguration.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_queryOptionNamesList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_queryOptionSetting = ( input , context ) : any => { const entries = { } ; if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } if ( input . DefaultValue !== undefined && input . DefaultValue !== null ) { entries [ "DefaultValue" ] = input . DefaultValue ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . ApplyType !== undefined && input . ApplyType !== null ) { entries [ "ApplyType" ] = input . ApplyType ; } if ( input . DataType !== undefined && input . DataType !== null ) { entries [ "DataType" ] = input . DataType ; } if ( input . AllowedValues !== undefined && input . AllowedValues !== null ) { entries [ "AllowedValues" ] = input . AllowedValues ; } if ( input . IsModifiable !== undefined && input . IsModifiable !== null ) { entries [ "IsModifiable" ] = input . IsModifiable ; } if ( input . IsCollection !== undefined && input . IsCollection !== null ) { entries [ "IsCollection" ] = input . IsCollection ; } return entries ; } ; const serializeAws_queryOptionSettingsList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_queryOptionSetting ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `OptionSetting.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_queryParameter = ( input , context ) : any => { const entries = { } ; if ( input . ParameterName !== undefined && input . ParameterName !== null ) { entries [ "ParameterName" ] = input . ParameterName ; } if ( input . ParameterValue !== undefined && input . ParameterValue !== null ) { entries [ "ParameterValue" ] = input . ParameterValue ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . Source !== undefined && input . Source !== null ) { entries [ "Source" ] = input . Source ; } if ( input . ApplyType !== undefined && input . ApplyType !== null ) { entries [ "ApplyType" ] = input . ApplyType ; } if ( input . DataType !== undefined && input . DataType !== null ) { entries [ "DataType" ] = input . DataType ; } if ( input . AllowedValues !== undefined && input . AllowedValues !== null ) { entries [ "AllowedValues" ] = input . AllowedValues ; } if ( input . IsModifiable !== undefined && input . IsModifiable !== null ) { entries [ "IsModifiable" ] = input . IsModifiable ; } if ( input . MinimumEngineVersion !== undefined && input . MinimumEngineVersion !== null ) { entries [ "MinimumEngineVersion" ] = input . MinimumEngineVersion ; } if ( input . ApplyMethod !== undefined && input . ApplyMethod !== null ) { entries [ "ApplyMethod" ] = input . ApplyMethod ; } if ( input . SupportedEngineModes !== undefined && input . SupportedEngineModes !== null ) { const memberEntries = serializeAws_queryEngineModeList ( input . SupportedEngineModes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SupportedEngineModes.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryParametersList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_queryParameter ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Parameter.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_queryProcessorFeature = ( input , context ) : any => { const entries = { } ; if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } return entries ; } ; const serializeAws_queryProcessorFeatureList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_queryProcessorFeature ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `ProcessorFeature.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_queryPromoteReadReplicaDBClusterMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } return entries ; } ; const serializeAws_queryPromoteReadReplicaMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . BackupRetentionPeriod !== undefined && input . BackupRetentionPeriod !== null ) { entries [ "BackupRetentionPeriod" ] = input . BackupRetentionPeriod ; } if ( input . PreferredBackupWindow !== undefined && input . PreferredBackupWindow !== null ) { entries [ "PreferredBackupWindow" ] = input . PreferredBackupWindow ; } return entries ; } ; const serializeAws_queryPurchaseReservedDBInstancesOfferingMessage = ( input , context ) : any => { const entries = { } ; if ( input . ReservedDBInstancesOfferingId !== undefined && input . ReservedDBInstancesOfferingId !== null ) { entries [ "ReservedDBInstancesOfferingId" ] = input . ReservedDBInstancesOfferingId ; } if ( input . ReservedDBInstanceId !== undefined && input . ReservedDBInstanceId !== null ) { entries [ "ReservedDBInstanceId" ] = input . ReservedDBInstanceId ; } if ( input . DBInstanceCount !== undefined && input . DBInstanceCount !== null ) { entries [ "DBInstanceCount" ] = input . DBInstanceCount ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryRebootDBClusterMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } return entries ; } ; const serializeAws_queryRebootDBInstanceMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . ForceFailover !== undefined && input . ForceFailover !== null ) { entries [ "ForceFailover" ] = input . ForceFailover ; } return entries ; } ; const serializeAws_queryRegisterDBProxyTargetsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DBProxyName !== undefined && input . DBProxyName !== null ) { entries [ "DBProxyName" ] = input . DBProxyName ; } if ( input . TargetGroupName !== undefined && input . TargetGroupName !== null ) { entries [ "TargetGroupName" ] = input . TargetGroupName ; } if ( input . DBInstanceIdentifiers !== undefined && input . DBInstanceIdentifiers !== null ) { const memberEntries = serializeAws_queryStringList ( input . DBInstanceIdentifiers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DBInstanceIdentifiers.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DBClusterIdentifiers !== undefined && input . DBClusterIdentifiers !== null ) { const memberEntries = serializeAws_queryStringList ( input . DBClusterIdentifiers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DBClusterIdentifiers.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryRemoveFromGlobalClusterMessage = ( input , context ) : any => { const entries = { } ; if ( input . GlobalClusterIdentifier !== undefined && input . GlobalClusterIdentifier !== null ) { entries [ "GlobalClusterIdentifier" ] = input . GlobalClusterIdentifier ; } if ( input . DbClusterIdentifier !== undefined && input . DbClusterIdentifier !== null ) { entries [ "DbClusterIdentifier" ] = input . DbClusterIdentifier ; } return entries ; } ; const serializeAws_queryRemoveRoleFromDBClusterMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . RoleArn !== undefined && input . RoleArn !== null ) { entries [ "RoleArn" ] = input . RoleArn ; } if ( input . FeatureName !== undefined && input . FeatureName !== null ) { entries [ "FeatureName" ] = input . FeatureName ; } return entries ; } ; const serializeAws_queryRemoveRoleFromDBInstanceMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . RoleArn !== undefined && input . RoleArn !== null ) { entries [ "RoleArn" ] = input . RoleArn ; } if ( input . FeatureName !== undefined && input . FeatureName !== null ) { entries [ "FeatureName" ] = input . FeatureName ; } return entries ; } ; const serializeAws_queryRemoveSourceIdentifierFromSubscriptionMessage = ( input , context ) : any => { const entries = { } ; if ( input . SubscriptionName !== undefined && input . SubscriptionName !== null ) { entries [ "SubscriptionName" ] = input . SubscriptionName ; } if ( input . SourceIdentifier !== undefined && input . SourceIdentifier !== null ) { entries [ "SourceIdentifier" ] = input . SourceIdentifier ; } return entries ; } ; const serializeAws_queryRemoveTagsFromResourceMessage = ( input , context ) : any => { const entries = { } ; if ( input . ResourceName !== undefined && input . ResourceName !== null ) { entries [ "ResourceName" ] = input . ResourceName ; } if ( input . TagKeys !== undefined && input . TagKeys !== null ) { const memberEntries = serializeAws_queryKeyList ( input . TagKeys , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagKeys.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryResetDBClusterParameterGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterParameterGroupName !== undefined && input . DBClusterParameterGroupName !== null ) { entries [ "DBClusterParameterGroupName" ] = input . DBClusterParameterGroupName ; } if ( input . ResetAllParameters !== undefined && input . ResetAllParameters !== null ) { entries [ "ResetAllParameters" ] = input . ResetAllParameters ; } if ( input . Parameters !== undefined && input . Parameters !== null ) { const memberEntries = serializeAws_queryParametersList ( input . Parameters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Parameters.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryResetDBParameterGroupMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBParameterGroupName !== undefined && input . DBParameterGroupName !== null ) { entries [ "DBParameterGroupName" ] = input . DBParameterGroupName ; } if ( input . ResetAllParameters !== undefined && input . ResetAllParameters !== null ) { entries [ "ResetAllParameters" ] = input . ResetAllParameters ; } if ( input . Parameters !== undefined && input . Parameters !== null ) { const memberEntries = serializeAws_queryParametersList ( input . Parameters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Parameters.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryRestoreDBClusterFromS3Message = ( input , context ) : any => { const entries = { } ; if ( input . AvailabilityZones !== undefined && input . AvailabilityZones !== null ) { const memberEntries = serializeAws_queryAvailabilityZones ( input . AvailabilityZones , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AvailabilityZones.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . BackupRetentionPeriod !== undefined && input . BackupRetentionPeriod !== null ) { entries [ "BackupRetentionPeriod" ] = input . BackupRetentionPeriod ; } if ( input . CharacterSetName !== undefined && input . CharacterSetName !== null ) { entries [ "CharacterSetName" ] = input . CharacterSetName ; } if ( input . DatabaseName !== undefined && input . DatabaseName !== null ) { entries [ "DatabaseName" ] = input . DatabaseName ; } if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . DBClusterParameterGroupName !== undefined && input . DBClusterParameterGroupName !== null ) { entries [ "DBClusterParameterGroupName" ] = input . DBClusterParameterGroupName ; } if ( input . VpcSecurityGroupIds !== undefined && input . VpcSecurityGroupIds !== null ) { const memberEntries = serializeAws_queryVpcSecurityGroupIdList ( input . VpcSecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSecurityGroupIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DBSubnetGroupName !== undefined && input . DBSubnetGroupName !== null ) { entries [ "DBSubnetGroupName" ] = input . DBSubnetGroupName ; } if ( input . Engine !== undefined && input . Engine !== null ) { entries [ "Engine" ] = input . Engine ; } if ( input . EngineVersion !== undefined && input . EngineVersion !== null ) { entries [ "EngineVersion" ] = input . EngineVersion ; } if ( input . Port !== undefined && input . Port !== null ) { entries [ "Port" ] = input . Port ; } if ( input . MasterUsername !== undefined && input . MasterUsername !== null ) { entries [ "MasterUsername" ] = input . MasterUsername ; } if ( input . MasterUserPassword !== undefined && input . MasterUserPassword !== null ) { entries [ "MasterUserPassword" ] = input . MasterUserPassword ; } if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } if ( input . PreferredBackupWindow !== undefined && input . PreferredBackupWindow !== null ) { entries [ "PreferredBackupWindow" ] = input . PreferredBackupWindow ; } if ( input . PreferredMaintenanceWindow !== undefined && input . PreferredMaintenanceWindow !== null ) { entries [ "PreferredMaintenanceWindow" ] = input . PreferredMaintenanceWindow ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . StorageEncrypted !== undefined && input . StorageEncrypted !== null ) { entries [ "StorageEncrypted" ] = input . StorageEncrypted ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . EnableIAMDatabaseAuthentication !== undefined && input . EnableIAMDatabaseAuthentication !== null ) { entries [ "EnableIAMDatabaseAuthentication" ] = input . EnableIAMDatabaseAuthentication ; } if ( input . SourceEngine !== undefined && input . SourceEngine !== null ) { entries [ "SourceEngine" ] = input . SourceEngine ; } if ( input . SourceEngineVersion !== undefined && input . SourceEngineVersion !== null ) { entries [ "SourceEngineVersion" ] = input . SourceEngineVersion ; } if ( input . S3BucketName !== undefined && input . S3BucketName !== null ) { entries [ "S3BucketName" ] = input . S3BucketName ; } if ( input . S3Prefix !== undefined && input . S3Prefix !== null ) { entries [ "S3Prefix" ] = input . S3Prefix ; } if ( input . S3IngestionRoleArn !== undefined && input . S3IngestionRoleArn !== null ) { entries [ "S3IngestionRoleArn" ] = input . S3IngestionRoleArn ; } if ( input . BacktrackWindow !== undefined && input . BacktrackWindow !== null ) { entries [ "BacktrackWindow" ] = input . BacktrackWindow ; } if ( input . EnableCloudwatchLogsExports !== undefined && input . EnableCloudwatchLogsExports !== null ) { const memberEntries = serializeAws_queryLogTypeList ( input . EnableCloudwatchLogsExports , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnableCloudwatchLogsExports.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DeletionProtection !== undefined && input . DeletionProtection !== null ) { entries [ "DeletionProtection" ] = input . DeletionProtection ; } if ( input . CopyTagsToSnapshot !== undefined && input . CopyTagsToSnapshot !== null ) { entries [ "CopyTagsToSnapshot" ] = input . CopyTagsToSnapshot ; } if ( input . Domain !== undefined && input . Domain !== null ) { entries [ "Domain" ] = input . Domain ; } if ( input . DomainIAMRoleName !== undefined && input . DomainIAMRoleName !== null ) { entries [ "DomainIAMRoleName" ] = input . DomainIAMRoleName ; } return entries ; } ; const serializeAws_queryRestoreDBClusterFromSnapshotMessage = ( input , context ) : any => { const entries = { } ; if ( input . AvailabilityZones !== undefined && input . AvailabilityZones !== null ) { const memberEntries = serializeAws_queryAvailabilityZones ( input . AvailabilityZones , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AvailabilityZones.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . SnapshotIdentifier !== undefined && input . SnapshotIdentifier !== null ) { entries [ "SnapshotIdentifier" ] = input . SnapshotIdentifier ; } if ( input . Engine !== undefined && input . Engine !== null ) { entries [ "Engine" ] = input . Engine ; } if ( input . EngineVersion !== undefined && input . EngineVersion !== null ) { entries [ "EngineVersion" ] = input . EngineVersion ; } if ( input . Port !== undefined && input . Port !== null ) { entries [ "Port" ] = input . Port ; } if ( input . DBSubnetGroupName !== undefined && input . DBSubnetGroupName !== null ) { entries [ "DBSubnetGroupName" ] = input . DBSubnetGroupName ; } if ( input . DatabaseName !== undefined && input . DatabaseName !== null ) { entries [ "DatabaseName" ] = input . DatabaseName ; } if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } if ( input . VpcSecurityGroupIds !== undefined && input . VpcSecurityGroupIds !== null ) { const memberEntries = serializeAws_queryVpcSecurityGroupIdList ( input . VpcSecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSecurityGroupIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . EnableIAMDatabaseAuthentication !== undefined && input . EnableIAMDatabaseAuthentication !== null ) { entries [ "EnableIAMDatabaseAuthentication" ] = input . EnableIAMDatabaseAuthentication ; } if ( input . BacktrackWindow !== undefined && input . BacktrackWindow !== null ) { entries [ "BacktrackWindow" ] = input . BacktrackWindow ; } if ( input . EnableCloudwatchLogsExports !== undefined && input . EnableCloudwatchLogsExports !== null ) { const memberEntries = serializeAws_queryLogTypeList ( input . EnableCloudwatchLogsExports , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnableCloudwatchLogsExports.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . EngineMode !== undefined && input . EngineMode !== null ) { entries [ "EngineMode" ] = input . EngineMode ; } if ( input . ScalingConfiguration !== undefined && input . ScalingConfiguration !== null ) { const memberEntries = serializeAws_queryScalingConfiguration ( input . ScalingConfiguration , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ScalingConfiguration.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DBClusterParameterGroupName !== undefined && input . DBClusterParameterGroupName !== null ) { entries [ "DBClusterParameterGroupName" ] = input . DBClusterParameterGroupName ; } if ( input . DeletionProtection !== undefined && input . DeletionProtection !== null ) { entries [ "DeletionProtection" ] = input . DeletionProtection ; } if ( input . CopyTagsToSnapshot !== undefined && input . CopyTagsToSnapshot !== null ) { entries [ "CopyTagsToSnapshot" ] = input . CopyTagsToSnapshot ; } if ( input . Domain !== undefined && input . Domain !== null ) { entries [ "Domain" ] = input . Domain ; } if ( input . DomainIAMRoleName !== undefined && input . DomainIAMRoleName !== null ) { entries [ "DomainIAMRoleName" ] = input . DomainIAMRoleName ; } if ( input . DBClusterInstanceClass !== undefined && input . DBClusterInstanceClass !== null ) { entries [ "DBClusterInstanceClass" ] = input . DBClusterInstanceClass ; } if ( input . StorageType !== undefined && input . StorageType !== null ) { entries [ "StorageType" ] = input . StorageType ; } if ( input . Iops !== undefined && input . Iops !== null ) { entries [ "Iops" ] = input . Iops ; } if ( input . PubliclyAccessible !== undefined && input . PubliclyAccessible !== null ) { entries [ "PubliclyAccessible" ] = input . PubliclyAccessible ; } return entries ; } ; const serializeAws_queryRestoreDBClusterToPointInTimeMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } if ( input . RestoreType !== undefined && input . RestoreType !== null ) { entries [ "RestoreType" ] = input . RestoreType ; } if ( input . SourceDBClusterIdentifier !== undefined && input . SourceDBClusterIdentifier !== null ) { entries [ "SourceDBClusterIdentifier" ] = input . SourceDBClusterIdentifier ; } if ( input . RestoreToTime !== undefined && input . RestoreToTime !== null ) { entries [ "RestoreToTime" ] = input . RestoreToTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . UseLatestRestorableTime !== undefined && input . UseLatestRestorableTime !== null ) { entries [ "UseLatestRestorableTime" ] = input . UseLatestRestorableTime ; } if ( input . Port !== undefined && input . Port !== null ) { entries [ "Port" ] = input . Port ; } if ( input . DBSubnetGroupName !== undefined && input . DBSubnetGroupName !== null ) { entries [ "DBSubnetGroupName" ] = input . DBSubnetGroupName ; } if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } if ( input . VpcSecurityGroupIds !== undefined && input . VpcSecurityGroupIds !== null ) { const memberEntries = serializeAws_queryVpcSecurityGroupIdList ( input . VpcSecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSecurityGroupIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . EnableIAMDatabaseAuthentication !== undefined && input . EnableIAMDatabaseAuthentication !== null ) { entries [ "EnableIAMDatabaseAuthentication" ] = input . EnableIAMDatabaseAuthentication ; } if ( input . BacktrackWindow !== undefined && input . BacktrackWindow !== null ) { entries [ "BacktrackWindow" ] = input . BacktrackWindow ; } if ( input . EnableCloudwatchLogsExports !== undefined && input . EnableCloudwatchLogsExports !== null ) { const memberEntries = serializeAws_queryLogTypeList ( input . EnableCloudwatchLogsExports , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnableCloudwatchLogsExports.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DBClusterParameterGroupName !== undefined && input . DBClusterParameterGroupName !== null ) { entries [ "DBClusterParameterGroupName" ] = input . DBClusterParameterGroupName ; } if ( input . DeletionProtection !== undefined && input . DeletionProtection !== null ) { entries [ "DeletionProtection" ] = input . DeletionProtection ; } if ( input . CopyTagsToSnapshot !== undefined && input . CopyTagsToSnapshot !== null ) { entries [ "CopyTagsToSnapshot" ] = input . CopyTagsToSnapshot ; } if ( input . Domain !== undefined && input . Domain !== null ) { entries [ "Domain" ] = input . Domain ; } if ( input . DomainIAMRoleName !== undefined && input . DomainIAMRoleName !== null ) { entries [ "DomainIAMRoleName" ] = input . DomainIAMRoleName ; } if ( input . ScalingConfiguration !== undefined && input . ScalingConfiguration !== null ) { const memberEntries = serializeAws_queryScalingConfiguration ( input . ScalingConfiguration , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ScalingConfiguration.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . EngineMode !== undefined && input . EngineMode !== null ) { entries [ "EngineMode" ] = input . EngineMode ; } if ( input . DBClusterInstanceClass !== undefined && input . DBClusterInstanceClass !== null ) { entries [ "DBClusterInstanceClass" ] = input . DBClusterInstanceClass ; } if ( input . StorageType !== undefined && input . StorageType !== null ) { entries [ "StorageType" ] = input . StorageType ; } if ( input . PubliclyAccessible !== undefined && input . PubliclyAccessible !== null ) { entries [ "PubliclyAccessible" ] = input . PubliclyAccessible ; } if ( input . Iops !== undefined && input . Iops !== null ) { entries [ "Iops" ] = input . Iops ; } return entries ; } ; const serializeAws_queryRestoreDBInstanceFromDBSnapshotMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . DBSnapshotIdentifier !== undefined && input . DBSnapshotIdentifier !== null ) { entries [ "DBSnapshotIdentifier" ] = input . DBSnapshotIdentifier ; } if ( input . DBInstanceClass !== undefined && input . DBInstanceClass !== null ) { entries [ "DBInstanceClass" ] = input . DBInstanceClass ; } if ( input . Port !== undefined && input . Port !== null ) { entries [ "Port" ] = input . Port ; } if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . DBSubnetGroupName !== undefined && input . DBSubnetGroupName !== null ) { entries [ "DBSubnetGroupName" ] = input . DBSubnetGroupName ; } if ( input . MultiAZ !== undefined && input . MultiAZ !== null ) { entries [ "MultiAZ" ] = input . MultiAZ ; } if ( input . PubliclyAccessible !== undefined && input . PubliclyAccessible !== null ) { entries [ "PubliclyAccessible" ] = input . PubliclyAccessible ; } if ( input . AutoMinorVersionUpgrade !== undefined && input . AutoMinorVersionUpgrade !== null ) { entries [ "AutoMinorVersionUpgrade" ] = input . AutoMinorVersionUpgrade ; } if ( input . LicenseModel !== undefined && input . LicenseModel !== null ) { entries [ "LicenseModel" ] = input . LicenseModel ; } if ( input . DBName !== undefined && input . DBName !== null ) { entries [ "DBName" ] = input . DBName ; } if ( input . Engine !== undefined && input . Engine !== null ) { entries [ "Engine" ] = input . Engine ; } if ( input . Iops !== undefined && input . Iops !== null ) { entries [ "Iops" ] = input . Iops ; } if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . StorageType !== undefined && input . StorageType !== null ) { entries [ "StorageType" ] = input . StorageType ; } if ( input . TdeCredentialArn !== undefined && input . TdeCredentialArn !== null ) { entries [ "TdeCredentialArn" ] = input . TdeCredentialArn ; } if ( input . TdeCredentialPassword !== undefined && input . TdeCredentialPassword !== null ) { entries [ "TdeCredentialPassword" ] = input . TdeCredentialPassword ; } if ( input . VpcSecurityGroupIds !== undefined && input . VpcSecurityGroupIds !== null ) { const memberEntries = serializeAws_queryVpcSecurityGroupIdList ( input . VpcSecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSecurityGroupIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Domain !== undefined && input . Domain !== null ) { entries [ "Domain" ] = input . Domain ; } if ( input . CopyTagsToSnapshot !== undefined && input . CopyTagsToSnapshot !== null ) { entries [ "CopyTagsToSnapshot" ] = input . CopyTagsToSnapshot ; } if ( input . DomainIAMRoleName !== undefined && input . DomainIAMRoleName !== null ) { entries [ "DomainIAMRoleName" ] = input . DomainIAMRoleName ; } if ( input . EnableIAMDatabaseAuthentication !== undefined && input . EnableIAMDatabaseAuthentication !== null ) { entries [ "EnableIAMDatabaseAuthentication" ] = input . EnableIAMDatabaseAuthentication ; } if ( input . EnableCloudwatchLogsExports !== undefined && input . EnableCloudwatchLogsExports !== null ) { const memberEntries = serializeAws_queryLogTypeList ( input . EnableCloudwatchLogsExports , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnableCloudwatchLogsExports.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ProcessorFeatures !== undefined && input . ProcessorFeatures !== null ) { const memberEntries = serializeAws_queryProcessorFeatureList ( input . ProcessorFeatures , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ProcessorFeatures.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . UseDefaultProcessorFeatures !== undefined && input . UseDefaultProcessorFeatures !== null ) { entries [ "UseDefaultProcessorFeatures" ] = input . UseDefaultProcessorFeatures ; } if ( input . DBParameterGroupName !== undefined && input . DBParameterGroupName !== null ) { entries [ "DBParameterGroupName" ] = input . DBParameterGroupName ; } if ( input . DeletionProtection !== undefined && input . DeletionProtection !== null ) { entries [ "DeletionProtection" ] = input . DeletionProtection ; } if ( input . EnableCustomerOwnedIp !== undefined && input . EnableCustomerOwnedIp !== null ) { entries [ "EnableCustomerOwnedIp" ] = input . EnableCustomerOwnedIp ; } if ( input . CustomIamInstanceProfile !== undefined && input . CustomIamInstanceProfile !== null ) { entries [ "CustomIamInstanceProfile" ] = input . CustomIamInstanceProfile ; } if ( input . BackupTarget !== undefined && input . BackupTarget !== null ) { entries [ "BackupTarget" ] = input . BackupTarget ; } return entries ; } ; const serializeAws_queryRestoreDBInstanceFromS3Message = ( input , context ) : any => { const entries = { } ; if ( input . DBName !== undefined && input . DBName !== null ) { entries [ "DBName" ] = input . DBName ; } if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . AllocatedStorage !== undefined && input . AllocatedStorage !== null ) { entries [ "AllocatedStorage" ] = input . AllocatedStorage ; } if ( input . DBInstanceClass !== undefined && input . DBInstanceClass !== null ) { entries [ "DBInstanceClass" ] = input . DBInstanceClass ; } if ( input . Engine !== undefined && input . Engine !== null ) { entries [ "Engine" ] = input . Engine ; } if ( input . MasterUsername !== undefined && input . MasterUsername !== null ) { entries [ "MasterUsername" ] = input . MasterUsername ; } if ( input . MasterUserPassword !== undefined && input . MasterUserPassword !== null ) { entries [ "MasterUserPassword" ] = input . MasterUserPassword ; } if ( input . DBSecurityGroups !== undefined && input . DBSecurityGroups !== null ) { const memberEntries = serializeAws_queryDBSecurityGroupNameList ( input . DBSecurityGroups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DBSecurityGroups.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . VpcSecurityGroupIds !== undefined && input . VpcSecurityGroupIds !== null ) { const memberEntries = serializeAws_queryVpcSecurityGroupIdList ( input . VpcSecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSecurityGroupIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . DBSubnetGroupName !== undefined && input . DBSubnetGroupName !== null ) { entries [ "DBSubnetGroupName" ] = input . DBSubnetGroupName ; } if ( input . PreferredMaintenanceWindow !== undefined && input . PreferredMaintenanceWindow !== null ) { entries [ "PreferredMaintenanceWindow" ] = input . PreferredMaintenanceWindow ; } if ( input . DBParameterGroupName !== undefined && input . DBParameterGroupName !== null ) { entries [ "DBParameterGroupName" ] = input . DBParameterGroupName ; } if ( input . BackupRetentionPeriod !== undefined && input . BackupRetentionPeriod !== null ) { entries [ "BackupRetentionPeriod" ] = input . BackupRetentionPeriod ; } if ( input . PreferredBackupWindow !== undefined && input . PreferredBackupWindow !== null ) { entries [ "PreferredBackupWindow" ] = input . PreferredBackupWindow ; } if ( input . Port !== undefined && input . Port !== null ) { entries [ "Port" ] = input . Port ; } if ( input . MultiAZ !== undefined && input . MultiAZ !== null ) { entries [ "MultiAZ" ] = input . MultiAZ ; } if ( input . EngineVersion !== undefined && input . EngineVersion !== null ) { entries [ "EngineVersion" ] = input . EngineVersion ; } if ( input . AutoMinorVersionUpgrade !== undefined && input . AutoMinorVersionUpgrade !== null ) { entries [ "AutoMinorVersionUpgrade" ] = input . AutoMinorVersionUpgrade ; } if ( input . LicenseModel !== undefined && input . LicenseModel !== null ) { entries [ "LicenseModel" ] = input . LicenseModel ; } if ( input . Iops !== undefined && input . Iops !== null ) { entries [ "Iops" ] = input . Iops ; } if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } if ( input . PubliclyAccessible !== undefined && input . PubliclyAccessible !== null ) { entries [ "PubliclyAccessible" ] = input . PubliclyAccessible ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . StorageType !== undefined && input . StorageType !== null ) { entries [ "StorageType" ] = input . StorageType ; } if ( input . StorageEncrypted !== undefined && input . StorageEncrypted !== null ) { entries [ "StorageEncrypted" ] = input . StorageEncrypted ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . CopyTagsToSnapshot !== undefined && input . CopyTagsToSnapshot !== null ) { entries [ "CopyTagsToSnapshot" ] = input . CopyTagsToSnapshot ; } if ( input . MonitoringInterval !== undefined && input . MonitoringInterval !== null ) { entries [ "MonitoringInterval" ] = input . MonitoringInterval ; } if ( input . MonitoringRoleArn !== undefined && input . MonitoringRoleArn !== null ) { entries [ "MonitoringRoleArn" ] = input . MonitoringRoleArn ; } if ( input . EnableIAMDatabaseAuthentication !== undefined && input . EnableIAMDatabaseAuthentication !== null ) { entries [ "EnableIAMDatabaseAuthentication" ] = input . EnableIAMDatabaseAuthentication ; } if ( input . SourceEngine !== undefined && input . SourceEngine !== null ) { entries [ "SourceEngine" ] = input . SourceEngine ; } if ( input . SourceEngineVersion !== undefined && input . SourceEngineVersion !== null ) { entries [ "SourceEngineVersion" ] = input . SourceEngineVersion ; } if ( input . S3BucketName !== undefined && input . S3BucketName !== null ) { entries [ "S3BucketName" ] = input . S3BucketName ; } if ( input . S3Prefix !== undefined && input . S3Prefix !== null ) { entries [ "S3Prefix" ] = input . S3Prefix ; } if ( input . S3IngestionRoleArn !== undefined && input . S3IngestionRoleArn !== null ) { entries [ "S3IngestionRoleArn" ] = input . S3IngestionRoleArn ; } if ( input . EnablePerformanceInsights !== undefined && input . EnablePerformanceInsights !== null ) { entries [ "EnablePerformanceInsights" ] = input . EnablePerformanceInsights ; } if ( input . PerformanceInsightsKMSKeyId !== undefined && input . PerformanceInsightsKMSKeyId !== null ) { entries [ "PerformanceInsightsKMSKeyId" ] = input . PerformanceInsightsKMSKeyId ; } if ( input . PerformanceInsightsRetentionPeriod !== undefined && input . PerformanceInsightsRetentionPeriod !== null ) { entries [ "PerformanceInsightsRetentionPeriod" ] = input . PerformanceInsightsRetentionPeriod ; } if ( input . EnableCloudwatchLogsExports !== undefined && input . EnableCloudwatchLogsExports !== null ) { const memberEntries = serializeAws_queryLogTypeList ( input . EnableCloudwatchLogsExports , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnableCloudwatchLogsExports.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ProcessorFeatures !== undefined && input . ProcessorFeatures !== null ) { const memberEntries = serializeAws_queryProcessorFeatureList ( input . ProcessorFeatures , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ProcessorFeatures.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . UseDefaultProcessorFeatures !== undefined && input . UseDefaultProcessorFeatures !== null ) { entries [ "UseDefaultProcessorFeatures" ] = input . UseDefaultProcessorFeatures ; } if ( input . DeletionProtection !== undefined && input . DeletionProtection !== null ) { entries [ "DeletionProtection" ] = input . DeletionProtection ; } if ( input . MaxAllocatedStorage !== undefined && input . MaxAllocatedStorage !== null ) { entries [ "MaxAllocatedStorage" ] = input . MaxAllocatedStorage ; } return entries ; } ; const serializeAws_queryRestoreDBInstanceToPointInTimeMessage = ( input , context ) : any => { const entries = { } ; if ( input . SourceDBInstanceIdentifier !== undefined && input . SourceDBInstanceIdentifier !== null ) { entries [ "SourceDBInstanceIdentifier" ] = input . SourceDBInstanceIdentifier ; } if ( input . TargetDBInstanceIdentifier !== undefined && input . TargetDBInstanceIdentifier !== null ) { entries [ "TargetDBInstanceIdentifier" ] = input . TargetDBInstanceIdentifier ; } if ( input . RestoreTime !== undefined && input . RestoreTime !== null ) { entries [ "RestoreTime" ] = input . RestoreTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . UseLatestRestorableTime !== undefined && input . UseLatestRestorableTime !== null ) { entries [ "UseLatestRestorableTime" ] = input . UseLatestRestorableTime ; } if ( input . DBInstanceClass !== undefined && input . DBInstanceClass !== null ) { entries [ "DBInstanceClass" ] = input . DBInstanceClass ; } if ( input . Port !== undefined && input . Port !== null ) { entries [ "Port" ] = input . Port ; } if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . DBSubnetGroupName !== undefined && input . DBSubnetGroupName !== null ) { entries [ "DBSubnetGroupName" ] = input . DBSubnetGroupName ; } if ( input . MultiAZ !== undefined && input . MultiAZ !== null ) { entries [ "MultiAZ" ] = input . MultiAZ ; } if ( input . PubliclyAccessible !== undefined && input . PubliclyAccessible !== null ) { entries [ "PubliclyAccessible" ] = input . PubliclyAccessible ; } if ( input . AutoMinorVersionUpgrade !== undefined && input . AutoMinorVersionUpgrade !== null ) { entries [ "AutoMinorVersionUpgrade" ] = input . AutoMinorVersionUpgrade ; } if ( input . LicenseModel !== undefined && input . LicenseModel !== null ) { entries [ "LicenseModel" ] = input . LicenseModel ; } if ( input . DBName !== undefined && input . DBName !== null ) { entries [ "DBName" ] = input . DBName ; } if ( input . Engine !== undefined && input . Engine !== null ) { entries [ "Engine" ] = input . Engine ; } if ( input . Iops !== undefined && input . Iops !== null ) { entries [ "Iops" ] = input . Iops ; } if ( input . OptionGroupName !== undefined && input . OptionGroupName !== null ) { entries [ "OptionGroupName" ] = input . OptionGroupName ; } if ( input . CopyTagsToSnapshot !== undefined && input . CopyTagsToSnapshot !== null ) { entries [ "CopyTagsToSnapshot" ] = input . CopyTagsToSnapshot ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_queryTagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tags.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . StorageType !== undefined && input . StorageType !== null ) { entries [ "StorageType" ] = input . StorageType ; } if ( input . TdeCredentialArn !== undefined && input . TdeCredentialArn !== null ) { entries [ "TdeCredentialArn" ] = input . TdeCredentialArn ; } if ( input . TdeCredentialPassword !== undefined && input . TdeCredentialPassword !== null ) { entries [ "TdeCredentialPassword" ] = input . TdeCredentialPassword ; } if ( input . VpcSecurityGroupIds !== undefined && input . VpcSecurityGroupIds !== null ) { const memberEntries = serializeAws_queryVpcSecurityGroupIdList ( input . VpcSecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcSecurityGroupIds.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Domain !== undefined && input . Domain !== null ) { entries [ "Domain" ] = input . Domain ; } if ( input . DomainIAMRoleName !== undefined && input . DomainIAMRoleName !== null ) { entries [ "DomainIAMRoleName" ] = input . DomainIAMRoleName ; } if ( input . EnableIAMDatabaseAuthentication !== undefined && input . EnableIAMDatabaseAuthentication !== null ) { entries [ "EnableIAMDatabaseAuthentication" ] = input . EnableIAMDatabaseAuthentication ; } if ( input . EnableCloudwatchLogsExports !== undefined && input . EnableCloudwatchLogsExports !== null ) { const memberEntries = serializeAws_queryLogTypeList ( input . EnableCloudwatchLogsExports , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnableCloudwatchLogsExports.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ProcessorFeatures !== undefined && input . ProcessorFeatures !== null ) { const memberEntries = serializeAws_queryProcessorFeatureList ( input . ProcessorFeatures , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ProcessorFeatures.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . UseDefaultProcessorFeatures !== undefined && input . UseDefaultProcessorFeatures !== null ) { entries [ "UseDefaultProcessorFeatures" ] = input . UseDefaultProcessorFeatures ; } if ( input . DBParameterGroupName !== undefined && input . DBParameterGroupName !== null ) { entries [ "DBParameterGroupName" ] = input . DBParameterGroupName ; } if ( input . DeletionProtection !== undefined && input . DeletionProtection !== null ) { entries [ "DeletionProtection" ] = input . DeletionProtection ; } if ( input . SourceDbiResourceId !== undefined && input . SourceDbiResourceId !== null ) { entries [ "SourceDbiResourceId" ] = input . SourceDbiResourceId ; } if ( input . MaxAllocatedStorage !== undefined && input . MaxAllocatedStorage !== null ) { entries [ "MaxAllocatedStorage" ] = input . MaxAllocatedStorage ; } if ( input . SourceDBInstanceAutomatedBackupsArn !== undefined && input . SourceDBInstanceAutomatedBackupsArn !== null ) { entries [ "SourceDBInstanceAutomatedBackupsArn" ] = input . SourceDBInstanceAutomatedBackupsArn ; } if ( input . EnableCustomerOwnedIp !== undefined && input . EnableCustomerOwnedIp !== null ) { entries [ "EnableCustomerOwnedIp" ] = input . EnableCustomerOwnedIp ; } if ( input . CustomIamInstanceProfile !== undefined && input . CustomIamInstanceProfile !== null ) { entries [ "CustomIamInstanceProfile" ] = input . CustomIamInstanceProfile ; } if ( input . BackupTarget !== undefined && input . BackupTarget !== null ) { entries [ "BackupTarget" ] = input . BackupTarget ; } return entries ; } ; const serializeAws_queryRevokeDBSecurityGroupIngressMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBSecurityGroupName !== undefined && input . DBSecurityGroupName !== null ) { entries [ "DBSecurityGroupName" ] = input . DBSecurityGroupName ; } if ( input . CIDRIP !== undefined && input . CIDRIP !== null ) { entries [ "CIDRIP" ] = input . CIDRIP ; } if ( input . EC2SecurityGroupName !== undefined && input . EC2SecurityGroupName !== null ) { entries [ "EC2SecurityGroupName" ] = input . EC2SecurityGroupName ; } if ( input . EC2SecurityGroupId !== undefined && input . EC2SecurityGroupId !== null ) { entries [ "EC2SecurityGroupId" ] = input . EC2SecurityGroupId ; } if ( input . EC2SecurityGroupOwnerId !== undefined && input . EC2SecurityGroupOwnerId !== null ) { entries [ "EC2SecurityGroupOwnerId" ] = input . EC2SecurityGroupOwnerId ; } return entries ; } ; const serializeAws_queryScalingConfiguration = ( input , context ) : any => { const entries = { } ; if ( input . MinCapacity !== undefined && input . MinCapacity !== null ) { entries [ "MinCapacity" ] = input . MinCapacity ; } if ( input . MaxCapacity !== undefined && input . MaxCapacity !== null ) { entries [ "MaxCapacity" ] = input . MaxCapacity ; } if ( input . AutoPause !== undefined && input . AutoPause !== null ) { entries [ "AutoPause" ] = input . AutoPause ; } if ( input . SecondsUntilAutoPause !== undefined && input . SecondsUntilAutoPause !== null ) { entries [ "SecondsUntilAutoPause" ] = input . SecondsUntilAutoPause ; } if ( input . TimeoutAction !== undefined && input . TimeoutAction !== null ) { entries [ "TimeoutAction" ] = input . TimeoutAction ; } if ( input . SecondsBeforeTimeout !== undefined && input . SecondsBeforeTimeout !== null ) { entries [ "SecondsBeforeTimeout" ] = input . SecondsBeforeTimeout ; } return entries ; } ; const serializeAws_querySourceIdsList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `SourceId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_queryStartActivityStreamRequest = ( input , context ) : any => { const entries = { } ; if ( input . ResourceArn !== undefined && input . ResourceArn !== null ) { entries [ "ResourceArn" ] = input . ResourceArn ; } if ( input . Mode !== undefined && input . Mode !== null ) { entries [ "Mode" ] = input . Mode ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . ApplyImmediately !== undefined && input . ApplyImmediately !== null ) { entries [ "ApplyImmediately" ] = input . ApplyImmediately ; } if ( input . EngineNativeAuditFieldsIncluded !== undefined && input . EngineNativeAuditFieldsIncluded !== null ) { entries [ "EngineNativeAuditFieldsIncluded" ] = input . EngineNativeAuditFieldsIncluded ; } return entries ; } ; const serializeAws_queryStartDBClusterMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } return entries ; } ; const serializeAws_queryStartDBInstanceAutomatedBackupsReplicationMessage = ( input , context ) : any => { const entries = { } ; if ( input . SourceDBInstanceArn !== undefined && input . SourceDBInstanceArn !== null ) { entries [ "SourceDBInstanceArn" ] = input . SourceDBInstanceArn ; } if ( input . BackupRetentionPeriod !== undefined && input . BackupRetentionPeriod !== null ) { entries [ "BackupRetentionPeriod" ] = input . BackupRetentionPeriod ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . PreSignedUrl !== undefined && input . PreSignedUrl !== null ) { entries [ "PreSignedUrl" ] = input . PreSignedUrl ; } return entries ; } ; const serializeAws_queryStartDBInstanceMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } return entries ; } ; const serializeAws_queryStartExportTaskMessage = ( input , context ) : any => { const entries = { } ; if ( input . ExportTaskIdentifier !== undefined && input . ExportTaskIdentifier !== null ) { entries [ "ExportTaskIdentifier" ] = input . ExportTaskIdentifier ; } if ( input . SourceArn !== undefined && input . SourceArn !== null ) { entries [ "SourceArn" ] = input . SourceArn ; } if ( input . S3BucketName !== undefined && input . S3BucketName !== null ) { entries [ "S3BucketName" ] = input . S3BucketName ; } if ( input . IamRoleArn !== undefined && input . IamRoleArn !== null ) { entries [ "IamRoleArn" ] = input . IamRoleArn ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . S3Prefix !== undefined && input . S3Prefix !== null ) { entries [ "S3Prefix" ] = input . S3Prefix ; } if ( input . ExportOnly !== undefined && input . ExportOnly !== null ) { const memberEntries = serializeAws_queryStringList ( input . ExportOnly , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ExportOnly.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_queryStopActivityStreamRequest = ( input , context ) : any => { const entries = { } ; if ( input . ResourceArn !== undefined && input . ResourceArn !== null ) { entries [ "ResourceArn" ] = input . ResourceArn ; } if ( input . ApplyImmediately !== undefined && input . ApplyImmediately !== null ) { entries [ "ApplyImmediately" ] = input . ApplyImmediately ; } return entries ; } ; const serializeAws_queryStopDBClusterMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBClusterIdentifier !== undefined && input . DBClusterIdentifier !== null ) { entries [ "DBClusterIdentifier" ] = input . DBClusterIdentifier ; } return entries ; } ; const serializeAws_queryStopDBInstanceAutomatedBackupsReplicationMessage = ( input , context ) : any => { const entries = { } ; if ( input . SourceDBInstanceArn !== undefined && input . SourceDBInstanceArn !== null ) { entries [ "SourceDBInstanceArn" ] = input . SourceDBInstanceArn ; } return entries ; } ; const serializeAws_queryStopDBInstanceMessage = ( input , context ) : any => { const entries = { } ; if ( input . DBInstanceIdentifier !== undefined && input . DBInstanceIdentifier !== null ) { entries [ "DBInstanceIdentifier" ] = input . DBInstanceIdentifier ; } if ( input . DBSnapshotIdentifier !== undefined && input . DBSnapshotIdentifier !== null ) { entries [ "DBSnapshotIdentifier" ] = input . DBSnapshotIdentifier ; } return entries ; } ; const serializeAws_queryStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_querySubnetIdentifierList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `SubnetIdentifier.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_queryTag = ( input , context ) : any => { const entries = { } ; if ( input . Key !== undefined && input . Key !== null ) { entries [ "Key" ] = input . Key ; } if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } return entries ; } ; const serializeAws_queryTagList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_queryTag ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Tag.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_queryUserAuthConfig = ( input , context ) : any => { const entries = { } ; if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . UserName !== undefined && input . UserName !== null ) { entries [ "UserName" ] = input . UserName ; } if ( input . AuthScheme !== undefined && input . AuthScheme !== null ) { entries [ "AuthScheme" ] = input . AuthScheme ; } if ( input . SecretArn !== undefined && input . SecretArn !== null ) { entries [ "SecretArn" ] = input . SecretArn ; } if ( input . IAMAuth !== undefined && input . IAMAuth !== null ) { entries [ "IAMAuth" ] = input . IAMAuth ; } return entries ; } ; const serializeAws_queryUserAuthConfigList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_queryUserAuthConfig ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `member.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_queryVpcSecurityGroupIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `VpcSecurityGroupId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const deserializeAws_queryAccountAttributesMessage = ( output , context ) : AccountAttributesMessage => { const contents = { AccountQuotas : undefined , } ; if ( output . AccountQuotas === "" ) { contents . AccountQuotas = [ ] ; } if ( output [ "AccountQuotas" ] !== undefined && output [ "AccountQuotas" ] [ "AccountQuota" ] !== undefined ) { contents . AccountQuotas = deserializeAws_queryAccountQuotaList ( __getArrayIfSingleItem ( output [ "AccountQuotas" ] [ "AccountQuota" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryAccountQuota = ( output , context ) : AccountQuota => { const contents = { AccountQuotaName : undefined , Used : undefined , Max : undefined , } ; if ( output [ "AccountQuotaName" ] !== undefined ) { contents . AccountQuotaName = __expectString ( output [ "AccountQuotaName" ] ) ; } if ( output [ "Used" ] !== undefined ) { contents . Used = __strictParseLong ( output [ "Used" ] ) as number ; } if ( output [ "Max" ] !== undefined ) { contents . Max = __strictParseLong ( output [ "Max" ] ) as number ; } return contents ; } ; const deserializeAws_queryAccountQuotaList = ( output , context ) : AccountQuota [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryAccountQuota ( entry , context ) ; } ) ; } ; const deserializeAws_queryActivityStreamModeList = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_queryAddSourceIdentifierToSubscriptionResult = ( output , context ) : AddSourceIdentifierToSubscriptionResult => { const contents = { EventSubscription : undefined , } ; if ( output [ "EventSubscription" ] !== undefined ) { contents . EventSubscription = deserializeAws_queryEventSubscription ( output [ "EventSubscription" ] , context ) ; } return contents ; } ; const deserializeAws_queryApplyPendingMaintenanceActionResult = ( output , context ) : ApplyPendingMaintenanceActionResult => { const contents = { ResourcePendingMaintenanceActions : undefined , } ; if ( output [ "ResourcePendingMaintenanceActions" ] !== undefined ) { contents . ResourcePendingMaintenanceActions = deserializeAws_queryResourcePendingMaintenanceActions ( output [ "ResourcePendingMaintenanceActions" ] , context ) ; } return contents ; } ; const deserializeAws_queryAttributeValueList = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_queryAuthorizationAlreadyExistsFault = ( output , context ) : AuthorizationAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryAuthorizationNotFoundFault = ( output , context ) : AuthorizationNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryAuthorizationQuotaExceededFault = ( output , context ) : AuthorizationQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryAuthorizeDBSecurityGroupIngressResult = ( output , context ) : AuthorizeDBSecurityGroupIngressResult => { const contents = { DBSecurityGroup : undefined , } ; if ( output [ "DBSecurityGroup" ] !== undefined ) { contents . DBSecurityGroup = deserializeAws_queryDBSecurityGroup ( output [ "DBSecurityGroup" ] , context ) ; } return contents ; } ; const deserializeAws_queryAvailabilityZone = ( output , context ) : AvailabilityZone => { const contents = { Name : undefined , } ; if ( output [ "Name" ] !== undefined ) { contents . Name = __expectString ( output [ "Name" ] ) ; } return contents ; } ; const deserializeAws_queryAvailabilityZoneList = ( output , context ) : AvailabilityZone [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryAvailabilityZone ( entry , context ) ; } ) ; } ; const deserializeAws_queryAvailabilityZones = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_queryAvailableProcessorFeature = ( output , context ) : AvailableProcessorFeature => { const contents = { Name : undefined , DefaultValue : undefined , AllowedValues : undefined , } ; if ( output [ "Name" ] !== undefined ) { contents . Name = __expectString ( output [ "Name" ] ) ; } if ( output [ "DefaultValue" ] !== undefined ) { contents . DefaultValue = __expectString ( output [ "DefaultValue" ] ) ; } if ( output [ "AllowedValues" ] !== undefined ) { contents . AllowedValues = __expectString ( output [ "AllowedValues" ] ) ; } return contents ; } ; const deserializeAws_queryAvailableProcessorFeatureList = ( output , context ) : AvailableProcessorFeature [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryAvailableProcessorFeature ( entry , context ) ; } ) ; } ; const deserializeAws_queryBackupPolicyNotFoundFault = ( output , context ) : BackupPolicyNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryCertificate = ( output , context ) : Certificate => { const contents = { CertificateIdentifier : undefined , CertificateType : undefined , Thumbprint : undefined , ValidFrom : undefined , ValidTill : undefined , CertificateArn : undefined , CustomerOverride : undefined , CustomerOverrideValidTill : undefined , } ; if ( output [ "CertificateIdentifier" ] !== undefined ) { contents . CertificateIdentifier = __expectString ( output [ "CertificateIdentifier" ] ) ; } if ( output [ "CertificateType" ] !== undefined ) { contents . CertificateType = __expectString ( output [ "CertificateType" ] ) ; } if ( output [ "Thumbprint" ] !== undefined ) { contents . Thumbprint = __expectString ( output [ "Thumbprint" ] ) ; } if ( output [ "ValidFrom" ] !== undefined ) { contents . ValidFrom = __expectNonNull ( __parseRfc3339DateTime ( output [ "ValidFrom" ] ) ) ; } if ( output [ "ValidTill" ] !== undefined ) { contents . ValidTill = __expectNonNull ( __parseRfc3339DateTime ( output [ "ValidTill" ] ) ) ; } if ( output [ "CertificateArn" ] !== undefined ) { contents . CertificateArn = __expectString ( output [ "CertificateArn" ] ) ; } if ( output [ "CustomerOverride" ] !== undefined ) { contents . CustomerOverride = __parseBoolean ( output [ "CustomerOverride" ] ) ; } if ( output [ "CustomerOverrideValidTill" ] !== undefined ) { contents . CustomerOverrideValidTill = __expectNonNull ( __parseRfc3339DateTime ( output [ "CustomerOverrideValidTill" ] ) ) ; } return contents ; } ; const deserializeAws_queryCertificateList = ( output , context ) : Certificate [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryCertificate ( entry , context ) ; } ) ; } ; const deserializeAws_queryCertificateMessage = ( output , context ) : CertificateMessage => { const contents = { Certificates : undefined , Marker : undefined , } ; if ( output . Certificates === "" ) { contents . Certificates = [ ] ; } if ( output [ "Certificates" ] !== undefined && output [ "Certificates" ] [ "Certificate" ] !== undefined ) { contents . Certificates = deserializeAws_queryCertificateList ( __getArrayIfSingleItem ( output [ "Certificates" ] [ "Certificate" ] ) , context ) ; } if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } return contents ; } ; const deserializeAws_queryCertificateNotFoundFault = ( output , context ) : CertificateNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryCharacterSet = ( output , context ) : CharacterSet => { const contents = { CharacterSetName : undefined , CharacterSetDescription : undefined , } ; if ( output [ "CharacterSetName" ] !== undefined ) { contents . CharacterSetName = __expectString ( output [ "CharacterSetName" ] ) ; } if ( output [ "CharacterSetDescription" ] !== undefined ) { contents . CharacterSetDescription = __expectString ( output [ "CharacterSetDescription" ] ) ; } return contents ; } ; const deserializeAws_queryClusterPendingModifiedValues = ( output , context ) : ClusterPendingModifiedValues => { const contents = { PendingCloudwatchLogsExports : undefined , DBClusterIdentifier : undefined , MasterUserPassword : undefined , IAMDatabaseAuthenticationEnabled : undefined , EngineVersion : undefined , } ; if ( output [ "PendingCloudwatchLogsExports" ] !== undefined ) { contents . PendingCloudwatchLogsExports = deserializeAws_queryPendingCloudwatchLogsExports ( output [ "PendingCloudwatchLogsExports" ] , context ) ; } if ( output [ "DBClusterIdentifier" ] !== undefined ) { contents . DBClusterIdentifier = __expectString ( output [ "DBClusterIdentifier" ] ) ; } if ( output [ "MasterUserPassword" ] !== undefined ) { contents . MasterUserPassword = __expectString ( output [ "MasterUserPassword" ] ) ; } if ( output [ "IAMDatabaseAuthenticationEnabled" ] !== undefined ) { contents . IAMDatabaseAuthenticationEnabled = __parseBoolean ( output [ "IAMDatabaseAuthenticationEnabled" ] ) ; } if ( output [ "EngineVersion" ] !== undefined ) { contents . EngineVersion = __expectString ( output [ "EngineVersion" ] ) ; } return contents ; } ; const deserializeAws_queryConnectionPoolConfigurationInfo = ( output , context ) : ConnectionPoolConfigurationInfo => { const contents = { MaxConnectionsPercent : undefined , MaxIdleConnectionsPercent : undefined , ConnectionBorrowTimeout : undefined , SessionPinningFilters : undefined , InitQuery : undefined , } ; if ( output [ "MaxConnectionsPercent" ] !== undefined ) { contents . MaxConnectionsPercent = __strictParseInt32 ( output [ "MaxConnectionsPercent" ] ) as number ; } if ( output [ "MaxIdleConnectionsPercent" ] !== undefined ) { contents . MaxIdleConnectionsPercent = __strictParseInt32 ( output [ "MaxIdleConnectionsPercent" ] ) as number ; } if ( output [ "ConnectionBorrowTimeout" ] !== undefined ) { contents . ConnectionBorrowTimeout = __strictParseInt32 ( output [ "ConnectionBorrowTimeout" ] ) as number ; } if ( output . SessionPinningFilters === "" ) { contents . SessionPinningFilters = [ ] ; } if ( output [ "SessionPinningFilters" ] !== undefined && output [ "SessionPinningFilters" ] [ "member" ] !== undefined ) { contents . SessionPinningFilters = deserializeAws_queryStringList ( __getArrayIfSingleItem ( output [ "SessionPinningFilters" ] [ "member" ] ) , context ) ; } if ( output [ "InitQuery" ] !== undefined ) { contents . InitQuery = __expectString ( output [ "InitQuery" ] ) ; } return contents ; } ; const deserializeAws_queryCopyDBClusterParameterGroupResult = ( output , context ) : CopyDBClusterParameterGroupResult => { const contents = { DBClusterParameterGroup : undefined , } ; if ( output [ "DBClusterParameterGroup" ] !== undefined ) { contents . DBClusterParameterGroup = deserializeAws_queryDBClusterParameterGroup ( output [ "DBClusterParameterGroup" ] , context ) ; } return contents ; } ; const deserializeAws_queryCopyDBClusterSnapshotResult = ( output , context ) : CopyDBClusterSnapshotResult => { const contents = { DBClusterSnapshot : undefined , } ; if ( output [ "DBClusterSnapshot" ] !== undefined ) { contents . DBClusterSnapshot = deserializeAws_queryDBClusterSnapshot ( output [ "DBClusterSnapshot" ] , context ) ; } return contents ; } ; const deserializeAws_queryCopyDBParameterGroupResult = ( output , context ) : CopyDBParameterGroupResult => { const contents = { DBParameterGroup : undefined , } ; if ( output [ "DBParameterGroup" ] !== undefined ) { contents . DBParameterGroup = deserializeAws_queryDBParameterGroup ( output [ "DBParameterGroup" ] , context ) ; } return contents ; } ; const deserializeAws_queryCopyDBSnapshotResult = ( output , context ) : CopyDBSnapshotResult => { const contents = { DBSnapshot : undefined , } ; if ( output [ "DBSnapshot" ] !== undefined ) { contents . DBSnapshot = deserializeAws_queryDBSnapshot ( output [ "DBSnapshot" ] , context ) ; } return contents ; } ; const deserializeAws_queryCopyOptionGroupResult = ( output , context ) : CopyOptionGroupResult => { const contents = { OptionGroup : undefined , } ; if ( output [ "OptionGroup" ] !== undefined ) { contents . OptionGroup = deserializeAws_queryOptionGroup ( output [ "OptionGroup" ] , context ) ; } return contents ; } ; const deserializeAws_queryCreateCustomAvailabilityZoneResult = ( output , context ) : CreateCustomAvailabilityZoneResult => { const contents = { CustomAvailabilityZone : undefined , } ; if ( output [ "CustomAvailabilityZone" ] !== undefined ) { contents . CustomAvailabilityZone = deserializeAws_queryCustomAvailabilityZone ( output [ "CustomAvailabilityZone" ] , context ) ; } return contents ; } ; const deserializeAws_queryCreateDBClusterParameterGroupResult = ( output , context ) : CreateDBClusterParameterGroupResult => { const contents = { DBClusterParameterGroup : undefined , } ; if ( output [ "DBClusterParameterGroup" ] !== undefined ) { contents . DBClusterParameterGroup = deserializeAws_queryDBClusterParameterGroup ( output [ "DBClusterParameterGroup" ] , context ) ; } return contents ; } ; const deserializeAws_queryCreateDBClusterResult = ( output , context ) : CreateDBClusterResult => { const contents = { DBCluster : undefined , } ; if ( output [ "DBCluster" ] !== undefined ) { contents . DBCluster = deserializeAws_queryDBCluster ( output [ "DBCluster" ] , context ) ; } return contents ; } ; const deserializeAws_queryCreateDBClusterSnapshotResult = ( output , context ) : CreateDBClusterSnapshotResult => { const contents = { DBClusterSnapshot : undefined , } ; if ( output [ "DBClusterSnapshot" ] !== undefined ) { contents . DBClusterSnapshot = deserializeAws_queryDBClusterSnapshot ( output [ "DBClusterSnapshot" ] , context ) ; } return contents ; } ; const deserializeAws_queryCreateDBInstanceReadReplicaResult = ( output , context ) : CreateDBInstanceReadReplicaResult => { const contents = { DBInstance : undefined , } ; if ( output [ "DBInstance" ] !== undefined ) { contents . DBInstance = deserializeAws_queryDBInstance ( output [ "DBInstance" ] , context ) ; } return contents ; } ; const deserializeAws_queryCreateDBInstanceResult = ( output , context ) : CreateDBInstanceResult => { const contents = { DBInstance : undefined , } ; if ( output [ "DBInstance" ] !== undefined ) { contents . DBInstance = deserializeAws_queryDBInstance ( output [ "DBInstance" ] , context ) ; } return contents ; } ; const deserializeAws_queryCreateDBParameterGroupResult = ( output , context ) : CreateDBParameterGroupResult => { const contents = { DBParameterGroup : undefined , } ; if ( output [ "DBParameterGroup" ] !== undefined ) { contents . DBParameterGroup = deserializeAws_queryDBParameterGroup ( output [ "DBParameterGroup" ] , context ) ; } return contents ; } ; const deserializeAws_queryCreateDBProxyEndpointResponse = ( output , context ) : CreateDBProxyEndpointResponse => { const contents = { DBProxyEndpoint : undefined , } ; if ( output [ "DBProxyEndpoint" ] !== undefined ) { contents . DBProxyEndpoint = deserializeAws_queryDBProxyEndpoint ( output [ "DBProxyEndpoint" ] , context ) ; } return contents ; } ; const deserializeAws_queryCreateDBProxyResponse = ( output , context ) : CreateDBProxyResponse => { const contents = { DBProxy : undefined , } ; if ( output [ "DBProxy" ] !== undefined ) { contents . DBProxy = deserializeAws_queryDBProxy ( output [ "DBProxy" ] , context ) ; } return contents ; } ; const deserializeAws_queryCreateDBSecurityGroupResult = ( output , context ) : CreateDBSecurityGroupResult => { const contents = { DBSecurityGroup : undefined , } ; if ( output [ "DBSecurityGroup" ] !== undefined ) { contents . DBSecurityGroup = deserializeAws_queryDBSecurityGroup ( output [ "DBSecurityGroup" ] , context ) ; } return contents ; } ; const deserializeAws_queryCreateDBSnapshotResult = ( output , context ) : CreateDBSnapshotResult => { const contents = { DBSnapshot : undefined , } ; if ( output [ "DBSnapshot" ] !== undefined ) { contents . DBSnapshot = deserializeAws_queryDBSnapshot ( output [ "DBSnapshot" ] , context ) ; } return contents ; } ; const deserializeAws_queryCreateDBSubnetGroupResult = ( output , context ) : CreateDBSubnetGroupResult => { const contents = { DBSubnetGroup : undefined , } ; if ( output [ "DBSubnetGroup" ] !== undefined ) { contents . DBSubnetGroup = deserializeAws_queryDBSubnetGroup ( output [ "DBSubnetGroup" ] , context ) ; } return contents ; } ; const deserializeAws_queryCreateEventSubscriptionResult = ( output , context ) : CreateEventSubscriptionResult => { const contents = { EventSubscription : undefined , } ; if ( output [ "EventSubscription" ] !== undefined ) { contents . EventSubscription = deserializeAws_queryEventSubscription ( output [ "EventSubscription" ] , context ) ; } return contents ; } ; const deserializeAws_queryCreateGlobalClusterResult = ( output , context ) : CreateGlobalClusterResult => { const contents = { GlobalCluster : undefined , } ; if ( output [ "GlobalCluster" ] !== undefined ) { contents . GlobalCluster = deserializeAws_queryGlobalCluster ( output [ "GlobalCluster" ] , context ) ; } return contents ; } ; const deserializeAws_queryCreateOptionGroupResult = ( output , context ) : CreateOptionGroupResult => { const contents = { OptionGroup : undefined , } ; if ( output [ "OptionGroup" ] !== undefined ) { contents . OptionGroup = deserializeAws_queryOptionGroup ( output [ "OptionGroup" ] , context ) ; } return contents ; } ; const deserializeAws_queryCustomAvailabilityZone = ( output , context ) : CustomAvailabilityZone => { const contents = { CustomAvailabilityZoneId : undefined , CustomAvailabilityZoneName : undefined , CustomAvailabilityZoneStatus : undefined , VpnDetails : undefined , } ; if ( output [ "CustomAvailabilityZoneId" ] !== undefined ) { contents . CustomAvailabilityZoneId = __expectString ( output [ "CustomAvailabilityZoneId" ] ) ; } if ( output [ "CustomAvailabilityZoneName" ] !== undefined ) { contents . CustomAvailabilityZoneName = __expectString ( output [ "CustomAvailabilityZoneName" ] ) ; } if ( output [ "CustomAvailabilityZoneStatus" ] !== undefined ) { contents . CustomAvailabilityZoneStatus = __expectString ( output [ "CustomAvailabilityZoneStatus" ] ) ; } if ( output [ "VpnDetails" ] !== undefined ) { contents . VpnDetails = deserializeAws_queryVpnDetails ( output [ "VpnDetails" ] , context ) ; } return contents ; } ; const deserializeAws_queryCustomAvailabilityZoneAlreadyExistsFault = ( output , context ) : CustomAvailabilityZoneAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryCustomAvailabilityZoneList = ( output , context ) : CustomAvailabilityZone [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryCustomAvailabilityZone ( entry , context ) ; } ) ; } ; const deserializeAws_queryCustomAvailabilityZoneMessage = ( output , context ) : CustomAvailabilityZoneMessage => { const contents = { Marker : undefined , CustomAvailabilityZones : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . CustomAvailabilityZones === "" ) { contents . CustomAvailabilityZones = [ ] ; } if ( output [ "CustomAvailabilityZones" ] !== undefined && output [ "CustomAvailabilityZones" ] [ "CustomAvailabilityZone" ] !== undefined ) { contents . CustomAvailabilityZones = deserializeAws_queryCustomAvailabilityZoneList ( __getArrayIfSingleItem ( output [ "CustomAvailabilityZones" ] [ "CustomAvailabilityZone" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryCustomAvailabilityZoneNotFoundFault = ( output , context ) : CustomAvailabilityZoneNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryCustomAvailabilityZoneQuotaExceededFault = ( output , context ) : CustomAvailabilityZoneQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryCustomDBEngineVersionAlreadyExistsFault = ( output , context ) : CustomDBEngineVersionAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryCustomDBEngineVersionNotFoundFault = ( output , context ) : CustomDBEngineVersionNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryCustomDBEngineVersionQuotaExceededFault = ( output , context ) : CustomDBEngineVersionQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBCluster = ( output , context ) : DBCluster => { const contents = { AllocatedStorage : undefined , AvailabilityZones : undefined , BackupRetentionPeriod : undefined , CharacterSetName : undefined , DatabaseName : undefined , DBClusterIdentifier : undefined , DBClusterParameterGroup : undefined , DBSubnetGroup : undefined , Status : undefined , AutomaticRestartTime : undefined , PercentProgress : undefined , EarliestRestorableTime : undefined , Endpoint : undefined , ReaderEndpoint : undefined , CustomEndpoints : undefined , MultiAZ : undefined , Engine : undefined , EngineVersion : undefined , LatestRestorableTime : undefined , Port : undefined , MasterUsername : undefined , DBClusterOptionGroupMemberships : undefined , PreferredBackupWindow : undefined , PreferredMaintenanceWindow : undefined , ReplicationSourceIdentifier : undefined , ReadReplicaIdentifiers : undefined , DBClusterMembers : undefined , VpcSecurityGroups : undefined , HostedZoneId : undefined , StorageEncrypted : undefined , KmsKeyId : undefined , DbClusterResourceId : undefined , DBClusterArn : undefined , AssociatedRoles : undefined , IAMDatabaseAuthenticationEnabled : undefined , CloneGroupId : undefined , ClusterCreateTime : undefined , EarliestBacktrackTime : undefined , BacktrackWindow : undefined , BacktrackConsumedChangeRecords : undefined , EnabledCloudwatchLogsExports : undefined , Capacity : undefined , EngineMode : undefined , ScalingConfigurationInfo : undefined , DeletionProtection : undefined , HttpEndpointEnabled : undefined , ActivityStreamMode : undefined , ActivityStreamStatus : undefined , ActivityStreamKmsKeyId : undefined , ActivityStreamKinesisStreamName : undefined , CopyTagsToSnapshot : undefined , CrossAccountClone : undefined , DomainMemberships : undefined , TagList : undefined , GlobalWriteForwardingStatus : undefined , GlobalWriteForwardingRequested : undefined , PendingModifiedValues : undefined , DBClusterInstanceClass : undefined , StorageType : undefined , Iops : undefined , PubliclyAccessible : undefined , AutoMinorVersionUpgrade : undefined , MonitoringInterval : undefined , MonitoringRoleArn : undefined , PerformanceInsightsEnabled : undefined , PerformanceInsightsKMSKeyId : undefined , PerformanceInsightsRetentionPeriod : undefined , } ; if ( output [ "AllocatedStorage" ] !== undefined ) { contents . AllocatedStorage = __strictParseInt32 ( output [ "AllocatedStorage" ] ) as number ; } if ( output . AvailabilityZones === "" ) { contents . AvailabilityZones = [ ] ; } if ( output [ "AvailabilityZones" ] !== undefined && output [ "AvailabilityZones" ] [ "AvailabilityZone" ] !== undefined ) { contents . AvailabilityZones = deserializeAws_queryAvailabilityZones ( __getArrayIfSingleItem ( output [ "AvailabilityZones" ] [ "AvailabilityZone" ] ) , context ) ; } if ( output [ "BackupRetentionPeriod" ] !== undefined ) { contents . BackupRetentionPeriod = __strictParseInt32 ( output [ "BackupRetentionPeriod" ] ) as number ; } if ( output [ "CharacterSetName" ] !== undefined ) { contents . CharacterSetName = __expectString ( output [ "CharacterSetName" ] ) ; } if ( output [ "DatabaseName" ] !== undefined ) { contents . DatabaseName = __expectString ( output [ "DatabaseName" ] ) ; } if ( output [ "DBClusterIdentifier" ] !== undefined ) { contents . DBClusterIdentifier = __expectString ( output [ "DBClusterIdentifier" ] ) ; } if ( output [ "DBClusterParameterGroup" ] !== undefined ) { contents . DBClusterParameterGroup = __expectString ( output [ "DBClusterParameterGroup" ] ) ; } if ( output [ "DBSubnetGroup" ] !== undefined ) { contents . DBSubnetGroup = __expectString ( output [ "DBSubnetGroup" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "AutomaticRestartTime" ] !== undefined ) { contents . AutomaticRestartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "AutomaticRestartTime" ] ) ) ; } if ( output [ "PercentProgress" ] !== undefined ) { contents . PercentProgress = __expectString ( output [ "PercentProgress" ] ) ; } if ( output [ "EarliestRestorableTime" ] !== undefined ) { contents . EarliestRestorableTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "EarliestRestorableTime" ] ) ) ; } if ( output [ "Endpoint" ] !== undefined ) { contents . Endpoint = __expectString ( output [ "Endpoint" ] ) ; } if ( output [ "ReaderEndpoint" ] !== undefined ) { contents . ReaderEndpoint = __expectString ( output [ "ReaderEndpoint" ] ) ; } if ( output . CustomEndpoints === "" ) { contents . CustomEndpoints = [ ] ; } if ( output [ "CustomEndpoints" ] !== undefined && output [ "CustomEndpoints" ] [ "member" ] !== undefined ) { contents . CustomEndpoints = deserializeAws_queryStringList ( __getArrayIfSingleItem ( output [ "CustomEndpoints" ] [ "member" ] ) , context ) ; } if ( output [ "MultiAZ" ] !== undefined ) { contents . MultiAZ = __parseBoolean ( output [ "MultiAZ" ] ) ; } if ( output [ "Engine" ] !== undefined ) { contents . Engine = __expectString ( output [ "Engine" ] ) ; } if ( output [ "EngineVersion" ] !== undefined ) { contents . EngineVersion = __expectString ( output [ "EngineVersion" ] ) ; } if ( output [ "LatestRestorableTime" ] !== undefined ) { contents . LatestRestorableTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "LatestRestorableTime" ] ) ) ; } if ( output [ "Port" ] !== undefined ) { contents . Port = __strictParseInt32 ( output [ "Port" ] ) as number ; } if ( output [ "MasterUsername" ] !== undefined ) { contents . MasterUsername = __expectString ( output [ "MasterUsername" ] ) ; } if ( output . DBClusterOptionGroupMemberships === "" ) { contents . DBClusterOptionGroupMemberships = [ ] ; } if ( output [ "DBClusterOptionGroupMemberships" ] !== undefined && output [ "DBClusterOptionGroupMemberships" ] [ "DBClusterOptionGroup" ] !== undefined ) { contents . DBClusterOptionGroupMemberships = deserializeAws_queryDBClusterOptionGroupMemberships ( __getArrayIfSingleItem ( output [ "DBClusterOptionGroupMemberships" ] [ "DBClusterOptionGroup" ] ) , context ) ; } if ( output [ "PreferredBackupWindow" ] !== undefined ) { contents . PreferredBackupWindow = __expectString ( output [ "PreferredBackupWindow" ] ) ; } if ( output [ "PreferredMaintenanceWindow" ] !== undefined ) { contents . PreferredMaintenanceWindow = __expectString ( output [ "PreferredMaintenanceWindow" ] ) ; } if ( output [ "ReplicationSourceIdentifier" ] !== undefined ) { contents . ReplicationSourceIdentifier = __expectString ( output [ "ReplicationSourceIdentifier" ] ) ; } if ( output . ReadReplicaIdentifiers === "" ) { contents . ReadReplicaIdentifiers = [ ] ; } if ( output [ "ReadReplicaIdentifiers" ] !== undefined && output [ "ReadReplicaIdentifiers" ] [ "ReadReplicaIdentifier" ] !== undefined ) { contents . ReadReplicaIdentifiers = deserializeAws_queryReadReplicaIdentifierList ( __getArrayIfSingleItem ( output [ "ReadReplicaIdentifiers" ] [ "ReadReplicaIdentifier" ] ) , context ) ; } if ( output . DBClusterMembers === "" ) { contents . DBClusterMembers = [ ] ; } if ( output [ "DBClusterMembers" ] !== undefined && output [ "DBClusterMembers" ] [ "DBClusterMember" ] !== undefined ) { contents . DBClusterMembers = deserializeAws_queryDBClusterMemberList ( __getArrayIfSingleItem ( output [ "DBClusterMembers" ] [ "DBClusterMember" ] ) , context ) ; } if ( output . VpcSecurityGroups === "" ) { contents . VpcSecurityGroups = [ ] ; } if ( output [ "VpcSecurityGroups" ] !== undefined && output [ "VpcSecurityGroups" ] [ "VpcSecurityGroupMembership" ] !== undefined ) { contents . VpcSecurityGroups = deserializeAws_queryVpcSecurityGroupMembershipList ( __getArrayIfSingleItem ( output [ "VpcSecurityGroups" ] [ "VpcSecurityGroupMembership" ] ) , context ) ; } if ( output [ "HostedZoneId" ] !== undefined ) { contents . HostedZoneId = __expectString ( output [ "HostedZoneId" ] ) ; } if ( output [ "StorageEncrypted" ] !== undefined ) { contents . StorageEncrypted = __parseBoolean ( output [ "StorageEncrypted" ] ) ; } if ( output [ "KmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "KmsKeyId" ] ) ; } if ( output [ "DbClusterResourceId" ] !== undefined ) { contents . DbClusterResourceId = __expectString ( output [ "DbClusterResourceId" ] ) ; } if ( output [ "DBClusterArn" ] !== undefined ) { contents . DBClusterArn = __expectString ( output [ "DBClusterArn" ] ) ; } if ( output . AssociatedRoles === "" ) { contents . AssociatedRoles = [ ] ; } if ( output [ "AssociatedRoles" ] !== undefined && output [ "AssociatedRoles" ] [ "DBClusterRole" ] !== undefined ) { contents . AssociatedRoles = deserializeAws_queryDBClusterRoles ( __getArrayIfSingleItem ( output [ "AssociatedRoles" ] [ "DBClusterRole" ] ) , context ) ; } if ( output [ "IAMDatabaseAuthenticationEnabled" ] !== undefined ) { contents . IAMDatabaseAuthenticationEnabled = __parseBoolean ( output [ "IAMDatabaseAuthenticationEnabled" ] ) ; } if ( output [ "CloneGroupId" ] !== undefined ) { contents . CloneGroupId = __expectString ( output [ "CloneGroupId" ] ) ; } if ( output [ "ClusterCreateTime" ] !== undefined ) { contents . ClusterCreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "ClusterCreateTime" ] ) ) ; } if ( output [ "EarliestBacktrackTime" ] !== undefined ) { contents . EarliestBacktrackTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "EarliestBacktrackTime" ] ) ) ; } if ( output [ "BacktrackWindow" ] !== undefined ) { contents . BacktrackWindow = __strictParseLong ( output [ "BacktrackWindow" ] ) as number ; } if ( output [ "BacktrackConsumedChangeRecords" ] !== undefined ) { contents . BacktrackConsumedChangeRecords = __strictParseLong ( output [ "BacktrackConsumedChangeRecords" ] ) as number ; } if ( output . EnabledCloudwatchLogsExports === "" ) { contents . EnabledCloudwatchLogsExports = [ ] ; } if ( output [ "EnabledCloudwatchLogsExports" ] !== undefined && output [ "EnabledCloudwatchLogsExports" ] [ "member" ] !== undefined ) { contents . EnabledCloudwatchLogsExports = deserializeAws_queryLogTypeList ( __getArrayIfSingleItem ( output [ "EnabledCloudwatchLogsExports" ] [ "member" ] ) , context ) ; } if ( output [ "Capacity" ] !== undefined ) { contents . Capacity = __strictParseInt32 ( output [ "Capacity" ] ) as number ; } if ( output [ "EngineMode" ] !== undefined ) { contents . EngineMode = __expectString ( output [ "EngineMode" ] ) ; } if ( output [ "ScalingConfigurationInfo" ] !== undefined ) { contents . ScalingConfigurationInfo = deserializeAws_queryScalingConfigurationInfo ( output [ "ScalingConfigurationInfo" ] , context ) ; } if ( output [ "DeletionProtection" ] !== undefined ) { contents . DeletionProtection = __parseBoolean ( output [ "DeletionProtection" ] ) ; } if ( output [ "HttpEndpointEnabled" ] !== undefined ) { contents . HttpEndpointEnabled = __parseBoolean ( output [ "HttpEndpointEnabled" ] ) ; } if ( output [ "ActivityStreamMode" ] !== undefined ) { contents . ActivityStreamMode = __expectString ( output [ "ActivityStreamMode" ] ) ; } if ( output [ "ActivityStreamStatus" ] !== undefined ) { contents . ActivityStreamStatus = __expectString ( output [ "ActivityStreamStatus" ] ) ; } if ( output [ "ActivityStreamKmsKeyId" ] !== undefined ) { contents . ActivityStreamKmsKeyId = __expectString ( output [ "ActivityStreamKmsKeyId" ] ) ; } if ( output [ "ActivityStreamKinesisStreamName" ] !== undefined ) { contents . ActivityStreamKinesisStreamName = __expectString ( output [ "ActivityStreamKinesisStreamName" ] ) ; } if ( output [ "CopyTagsToSnapshot" ] !== undefined ) { contents . CopyTagsToSnapshot = __parseBoolean ( output [ "CopyTagsToSnapshot" ] ) ; } if ( output [ "CrossAccountClone" ] !== undefined ) { contents . CrossAccountClone = __parseBoolean ( output [ "CrossAccountClone" ] ) ; } if ( output . DomainMemberships === "" ) { contents . DomainMemberships = [ ] ; } if ( output [ "DomainMemberships" ] !== undefined && output [ "DomainMemberships" ] [ "DomainMembership" ] !== undefined ) { contents . DomainMemberships = deserializeAws_queryDomainMembershipList ( __getArrayIfSingleItem ( output [ "DomainMemberships" ] [ "DomainMembership" ] ) , context ) ; } if ( output . TagList === "" ) { contents . TagList = [ ] ; } if ( output [ "TagList" ] !== undefined && output [ "TagList" ] [ "Tag" ] !== undefined ) { contents . TagList = deserializeAws_queryTagList ( __getArrayIfSingleItem ( output [ "TagList" ] [ "Tag" ] ) , context ) ; } if ( output [ "GlobalWriteForwardingStatus" ] !== undefined ) { contents . GlobalWriteForwardingStatus = __expectString ( output [ "GlobalWriteForwardingStatus" ] ) ; } if ( output [ "GlobalWriteForwardingRequested" ] !== undefined ) { contents . GlobalWriteForwardingRequested = __parseBoolean ( output [ "GlobalWriteForwardingRequested" ] ) ; } if ( output [ "PendingModifiedValues" ] !== undefined ) { contents . PendingModifiedValues = deserializeAws_queryClusterPendingModifiedValues ( output [ "PendingModifiedValues" ] , context ) ; } if ( output [ "DBClusterInstanceClass" ] !== undefined ) { contents . DBClusterInstanceClass = __expectString ( output [ "DBClusterInstanceClass" ] ) ; } if ( output [ "StorageType" ] !== undefined ) { contents . StorageType = __expectString ( output [ "StorageType" ] ) ; } if ( output [ "Iops" ] !== undefined ) { contents . Iops = __strictParseInt32 ( output [ "Iops" ] ) as number ; } if ( output [ "PubliclyAccessible" ] !== undefined ) { contents . PubliclyAccessible = __parseBoolean ( output [ "PubliclyAccessible" ] ) ; } if ( output [ "AutoMinorVersionUpgrade" ] !== undefined ) { contents . AutoMinorVersionUpgrade = __parseBoolean ( output [ "AutoMinorVersionUpgrade" ] ) ; } if ( output [ "MonitoringInterval" ] !== undefined ) { contents . MonitoringInterval = __strictParseInt32 ( output [ "MonitoringInterval" ] ) as number ; } if ( output [ "MonitoringRoleArn" ] !== undefined ) { contents . MonitoringRoleArn = __expectString ( output [ "MonitoringRoleArn" ] ) ; } if ( output [ "PerformanceInsightsEnabled" ] !== undefined ) { contents . PerformanceInsightsEnabled = __parseBoolean ( output [ "PerformanceInsightsEnabled" ] ) ; } if ( output [ "PerformanceInsightsKMSKeyId" ] !== undefined ) { contents . PerformanceInsightsKMSKeyId = __expectString ( output [ "PerformanceInsightsKMSKeyId" ] ) ; } if ( output [ "PerformanceInsightsRetentionPeriod" ] !== undefined ) { contents . PerformanceInsightsRetentionPeriod = __strictParseInt32 ( output [ "PerformanceInsightsRetentionPeriod" ] ) as number ; } return contents ; } ; const deserializeAws_queryDBClusterAlreadyExistsFault = ( output , context ) : DBClusterAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterBacktrack = ( output , context ) : DBClusterBacktrack => { const contents = { DBClusterIdentifier : undefined , BacktrackIdentifier : undefined , BacktrackTo : undefined , BacktrackedFrom : undefined , BacktrackRequestCreationTime : undefined , Status : undefined , } ; if ( output [ "DBClusterIdentifier" ] !== undefined ) { contents . DBClusterIdentifier = __expectString ( output [ "DBClusterIdentifier" ] ) ; } if ( output [ "BacktrackIdentifier" ] !== undefined ) { contents . BacktrackIdentifier = __expectString ( output [ "BacktrackIdentifier" ] ) ; } if ( output [ "BacktrackTo" ] !== undefined ) { contents . BacktrackTo = __expectNonNull ( __parseRfc3339DateTime ( output [ "BacktrackTo" ] ) ) ; } if ( output [ "BacktrackedFrom" ] !== undefined ) { contents . BacktrackedFrom = __expectNonNull ( __parseRfc3339DateTime ( output [ "BacktrackedFrom" ] ) ) ; } if ( output [ "BacktrackRequestCreationTime" ] !== undefined ) { contents . BacktrackRequestCreationTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "BacktrackRequestCreationTime" ] ) ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterBacktrackList = ( output , context ) : DBClusterBacktrack [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBClusterBacktrack ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBClusterBacktrackMessage = ( output , context ) : DBClusterBacktrackMessage => { const contents = { Marker : undefined , DBClusterBacktracks : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . DBClusterBacktracks === "" ) { contents . DBClusterBacktracks = [ ] ; } if ( output [ "DBClusterBacktracks" ] !== undefined && output [ "DBClusterBacktracks" ] [ "DBClusterBacktrack" ] !== undefined ) { contents . DBClusterBacktracks = deserializeAws_queryDBClusterBacktrackList ( __getArrayIfSingleItem ( output [ "DBClusterBacktracks" ] [ "DBClusterBacktrack" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBClusterBacktrackNotFoundFault = ( output , context ) : DBClusterBacktrackNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterCapacityInfo = ( output , context ) : DBClusterCapacityInfo => { const contents = { DBClusterIdentifier : undefined , PendingCapacity : undefined , CurrentCapacity : undefined , SecondsBeforeTimeout : undefined , TimeoutAction : undefined , } ; if ( output [ "DBClusterIdentifier" ] !== undefined ) { contents . DBClusterIdentifier = __expectString ( output [ "DBClusterIdentifier" ] ) ; } if ( output [ "PendingCapacity" ] !== undefined ) { contents . PendingCapacity = __strictParseInt32 ( output [ "PendingCapacity" ] ) as number ; } if ( output [ "CurrentCapacity" ] !== undefined ) { contents . CurrentCapacity = __strictParseInt32 ( output [ "CurrentCapacity" ] ) as number ; } if ( output [ "SecondsBeforeTimeout" ] !== undefined ) { contents . SecondsBeforeTimeout = __strictParseInt32 ( output [ "SecondsBeforeTimeout" ] ) as number ; } if ( output [ "TimeoutAction" ] !== undefined ) { contents . TimeoutAction = __expectString ( output [ "TimeoutAction" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterEndpoint = ( output , context ) : DBClusterEndpoint => { const contents = { DBClusterEndpointIdentifier : undefined , DBClusterIdentifier : undefined , DBClusterEndpointResourceIdentifier : undefined , Endpoint : undefined , Status : undefined , EndpointType : undefined , CustomEndpointType : undefined , StaticMembers : undefined , ExcludedMembers : undefined , DBClusterEndpointArn : undefined , } ; if ( output [ "DBClusterEndpointIdentifier" ] !== undefined ) { contents . DBClusterEndpointIdentifier = __expectString ( output [ "DBClusterEndpointIdentifier" ] ) ; } if ( output [ "DBClusterIdentifier" ] !== undefined ) { contents . DBClusterIdentifier = __expectString ( output [ "DBClusterIdentifier" ] ) ; } if ( output [ "DBClusterEndpointResourceIdentifier" ] !== undefined ) { contents . DBClusterEndpointResourceIdentifier = __expectString ( output [ "DBClusterEndpointResourceIdentifier" ] ) ; } if ( output [ "Endpoint" ] !== undefined ) { contents . Endpoint = __expectString ( output [ "Endpoint" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "EndpointType" ] !== undefined ) { contents . EndpointType = __expectString ( output [ "EndpointType" ] ) ; } if ( output [ "CustomEndpointType" ] !== undefined ) { contents . CustomEndpointType = __expectString ( output [ "CustomEndpointType" ] ) ; } if ( output . StaticMembers === "" ) { contents . StaticMembers = [ ] ; } if ( output [ "StaticMembers" ] !== undefined && output [ "StaticMembers" ] [ "member" ] !== undefined ) { contents . StaticMembers = deserializeAws_queryStringList ( __getArrayIfSingleItem ( output [ "StaticMembers" ] [ "member" ] ) , context ) ; } if ( output . ExcludedMembers === "" ) { contents . ExcludedMembers = [ ] ; } if ( output [ "ExcludedMembers" ] !== undefined && output [ "ExcludedMembers" ] [ "member" ] !== undefined ) { contents . ExcludedMembers = deserializeAws_queryStringList ( __getArrayIfSingleItem ( output [ "ExcludedMembers" ] [ "member" ] ) , context ) ; } if ( output [ "DBClusterEndpointArn" ] !== undefined ) { contents . DBClusterEndpointArn = __expectString ( output [ "DBClusterEndpointArn" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterEndpointAlreadyExistsFault = ( output , context ) : DBClusterEndpointAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterEndpointList = ( output , context ) : DBClusterEndpoint [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBClusterEndpoint ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBClusterEndpointMessage = ( output , context ) : DBClusterEndpointMessage => { const contents = { Marker : undefined , DBClusterEndpoints : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . DBClusterEndpoints === "" ) { contents . DBClusterEndpoints = [ ] ; } if ( output [ "DBClusterEndpoints" ] !== undefined && output [ "DBClusterEndpoints" ] [ "DBClusterEndpointList" ] !== undefined ) { contents . DBClusterEndpoints = deserializeAws_queryDBClusterEndpointList ( __getArrayIfSingleItem ( output [ "DBClusterEndpoints" ] [ "DBClusterEndpointList" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBClusterEndpointNotFoundFault = ( output , context ) : DBClusterEndpointNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterEndpointQuotaExceededFault = ( output , context ) : DBClusterEndpointQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterList = ( output , context ) : DBCluster [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBCluster ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBClusterMember = ( output , context ) : DBClusterMember => { const contents = { DBInstanceIdentifier : undefined , IsClusterWriter : undefined , DBClusterParameterGroupStatus : undefined , PromotionTier : undefined , } ; if ( output [ "DBInstanceIdentifier" ] !== undefined ) { contents . DBInstanceIdentifier = __expectString ( output [ "DBInstanceIdentifier" ] ) ; } if ( output [ "IsClusterWriter" ] !== undefined ) { contents . IsClusterWriter = __parseBoolean ( output [ "IsClusterWriter" ] ) ; } if ( output [ "DBClusterParameterGroupStatus" ] !== undefined ) { contents . DBClusterParameterGroupStatus = __expectString ( output [ "DBClusterParameterGroupStatus" ] ) ; } if ( output [ "PromotionTier" ] !== undefined ) { contents . PromotionTier = __strictParseInt32 ( output [ "PromotionTier" ] ) as number ; } return contents ; } ; const deserializeAws_queryDBClusterMemberList = ( output , context ) : DBClusterMember [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBClusterMember ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBClusterMessage = ( output , context ) : DBClusterMessage => { const contents = { Marker : undefined , DBClusters : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . DBClusters === "" ) { contents . DBClusters = [ ] ; } if ( output [ "DBClusters" ] !== undefined && output [ "DBClusters" ] [ "DBCluster" ] !== undefined ) { contents . DBClusters = deserializeAws_queryDBClusterList ( __getArrayIfSingleItem ( output [ "DBClusters" ] [ "DBCluster" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBClusterNotFoundFault = ( output , context ) : DBClusterNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterOptionGroupMemberships = ( output , context ) : DBClusterOptionGroupStatus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBClusterOptionGroupStatus ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBClusterOptionGroupStatus = ( output , context ) : DBClusterOptionGroupStatus => { const contents = { DBClusterOptionGroupName : undefined , Status : undefined , } ; if ( output [ "DBClusterOptionGroupName" ] !== undefined ) { contents . DBClusterOptionGroupName = __expectString ( output [ "DBClusterOptionGroupName" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterParameterGroup = ( output , context ) : DBClusterParameterGroup => { const contents = { DBClusterParameterGroupName : undefined , DBParameterGroupFamily : undefined , Description : undefined , DBClusterParameterGroupArn : undefined , } ; if ( output [ "DBClusterParameterGroupName" ] !== undefined ) { contents . DBClusterParameterGroupName = __expectString ( output [ "DBClusterParameterGroupName" ] ) ; } if ( output [ "DBParameterGroupFamily" ] !== undefined ) { contents . DBParameterGroupFamily = __expectString ( output [ "DBParameterGroupFamily" ] ) ; } if ( output [ "Description" ] !== undefined ) { contents . Description = __expectString ( output [ "Description" ] ) ; } if ( output [ "DBClusterParameterGroupArn" ] !== undefined ) { contents . DBClusterParameterGroupArn = __expectString ( output [ "DBClusterParameterGroupArn" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterParameterGroupDetails = ( output , context ) : DBClusterParameterGroupDetails => { const contents = { Parameters : undefined , Marker : undefined , } ; if ( output . Parameters === "" ) { contents . Parameters = [ ] ; } if ( output [ "Parameters" ] !== undefined && output [ "Parameters" ] [ "Parameter" ] !== undefined ) { contents . Parameters = deserializeAws_queryParametersList ( __getArrayIfSingleItem ( output [ "Parameters" ] [ "Parameter" ] ) , context ) ; } if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterParameterGroupList = ( output , context ) : DBClusterParameterGroup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBClusterParameterGroup ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBClusterParameterGroupNameMessage = ( output , context ) : DBClusterParameterGroupNameMessage => { const contents = { DBClusterParameterGroupName : undefined , } ; if ( output [ "DBClusterParameterGroupName" ] !== undefined ) { contents . DBClusterParameterGroupName = __expectString ( output [ "DBClusterParameterGroupName" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterParameterGroupNotFoundFault = ( output , context ) : DBClusterParameterGroupNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterParameterGroupsMessage = ( output , context ) : DBClusterParameterGroupsMessage => { const contents = { Marker : undefined , DBClusterParameterGroups : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . DBClusterParameterGroups === "" ) { contents . DBClusterParameterGroups = [ ] ; } if ( output [ "DBClusterParameterGroups" ] !== undefined && output [ "DBClusterParameterGroups" ] [ "DBClusterParameterGroup" ] !== undefined ) { contents . DBClusterParameterGroups = deserializeAws_queryDBClusterParameterGroupList ( __getArrayIfSingleItem ( output [ "DBClusterParameterGroups" ] [ "DBClusterParameterGroup" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBClusterQuotaExceededFault = ( output , context ) : DBClusterQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterRole = ( output , context ) : DBClusterRole => { const contents = { RoleArn : undefined , Status : undefined , FeatureName : undefined , } ; if ( output [ "RoleArn" ] !== undefined ) { contents . RoleArn = __expectString ( output [ "RoleArn" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "FeatureName" ] !== undefined ) { contents . FeatureName = __expectString ( output [ "FeatureName" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterRoleAlreadyExistsFault = ( output , context ) : DBClusterRoleAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterRoleNotFoundFault = ( output , context ) : DBClusterRoleNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterRoleQuotaExceededFault = ( output , context ) : DBClusterRoleQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterRoles = ( output , context ) : DBClusterRole [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBClusterRole ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBClusterSnapshot = ( output , context ) : DBClusterSnapshot => { const contents = { AvailabilityZones : undefined , DBClusterSnapshotIdentifier : undefined , DBClusterIdentifier : undefined , SnapshotCreateTime : undefined , Engine : undefined , EngineMode : undefined , AllocatedStorage : undefined , Status : undefined , Port : undefined , VpcId : undefined , ClusterCreateTime : undefined , MasterUsername : undefined , EngineVersion : undefined , LicenseModel : undefined , SnapshotType : undefined , PercentProgress : undefined , StorageEncrypted : undefined , KmsKeyId : undefined , DBClusterSnapshotArn : undefined , SourceDBClusterSnapshotArn : undefined , IAMDatabaseAuthenticationEnabled : undefined , TagList : undefined , } ; if ( output . AvailabilityZones === "" ) { contents . AvailabilityZones = [ ] ; } if ( output [ "AvailabilityZones" ] !== undefined && output [ "AvailabilityZones" ] [ "AvailabilityZone" ] !== undefined ) { contents . AvailabilityZones = deserializeAws_queryAvailabilityZones ( __getArrayIfSingleItem ( output [ "AvailabilityZones" ] [ "AvailabilityZone" ] ) , context ) ; } if ( output [ "DBClusterSnapshotIdentifier" ] !== undefined ) { contents . DBClusterSnapshotIdentifier = __expectString ( output [ "DBClusterSnapshotIdentifier" ] ) ; } if ( output [ "DBClusterIdentifier" ] !== undefined ) { contents . DBClusterIdentifier = __expectString ( output [ "DBClusterIdentifier" ] ) ; } if ( output [ "SnapshotCreateTime" ] !== undefined ) { contents . SnapshotCreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "SnapshotCreateTime" ] ) ) ; } if ( output [ "Engine" ] !== undefined ) { contents . Engine = __expectString ( output [ "Engine" ] ) ; } if ( output [ "EngineMode" ] !== undefined ) { contents . EngineMode = __expectString ( output [ "EngineMode" ] ) ; } if ( output [ "AllocatedStorage" ] !== undefined ) { contents . AllocatedStorage = __strictParseInt32 ( output [ "AllocatedStorage" ] ) as number ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "Port" ] !== undefined ) { contents . Port = __strictParseInt32 ( output [ "Port" ] ) as number ; } if ( output [ "VpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "VpcId" ] ) ; } if ( output [ "ClusterCreateTime" ] !== undefined ) { contents . ClusterCreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "ClusterCreateTime" ] ) ) ; } if ( output [ "MasterUsername" ] !== undefined ) { contents . MasterUsername = __expectString ( output [ "MasterUsername" ] ) ; } if ( output [ "EngineVersion" ] !== undefined ) { contents . EngineVersion = __expectString ( output [ "EngineVersion" ] ) ; } if ( output [ "LicenseModel" ] !== undefined ) { contents . LicenseModel = __expectString ( output [ "LicenseModel" ] ) ; } if ( output [ "SnapshotType" ] !== undefined ) { contents . SnapshotType = __expectString ( output [ "SnapshotType" ] ) ; } if ( output [ "PercentProgress" ] !== undefined ) { contents . PercentProgress = __strictParseInt32 ( output [ "PercentProgress" ] ) as number ; } if ( output [ "StorageEncrypted" ] !== undefined ) { contents . StorageEncrypted = __parseBoolean ( output [ "StorageEncrypted" ] ) ; } if ( output [ "KmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "KmsKeyId" ] ) ; } if ( output [ "DBClusterSnapshotArn" ] !== undefined ) { contents . DBClusterSnapshotArn = __expectString ( output [ "DBClusterSnapshotArn" ] ) ; } if ( output [ "SourceDBClusterSnapshotArn" ] !== undefined ) { contents . SourceDBClusterSnapshotArn = __expectString ( output [ "SourceDBClusterSnapshotArn" ] ) ; } if ( output [ "IAMDatabaseAuthenticationEnabled" ] !== undefined ) { contents . IAMDatabaseAuthenticationEnabled = __parseBoolean ( output [ "IAMDatabaseAuthenticationEnabled" ] ) ; } if ( output . TagList === "" ) { contents . TagList = [ ] ; } if ( output [ "TagList" ] !== undefined && output [ "TagList" ] [ "Tag" ] !== undefined ) { contents . TagList = deserializeAws_queryTagList ( __getArrayIfSingleItem ( output [ "TagList" ] [ "Tag" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBClusterSnapshotAlreadyExistsFault = ( output , context ) : DBClusterSnapshotAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBClusterSnapshotAttribute = ( output , context ) : DBClusterSnapshotAttribute => { const contents = { AttributeName : undefined , AttributeValues : undefined , } ; if ( output [ "AttributeName" ] !== undefined ) { contents . AttributeName = __expectString ( output [ "AttributeName" ] ) ; } if ( output . AttributeValues === "" ) { contents . AttributeValues = [ ] ; } if ( output [ "AttributeValues" ] !== undefined && output [ "AttributeValues" ] [ "AttributeValue" ] !== undefined ) { contents . AttributeValues = deserializeAws_queryAttributeValueList ( __getArrayIfSingleItem ( output [ "AttributeValues" ] [ "AttributeValue" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBClusterSnapshotAttributeList = ( output , context ) : DBClusterSnapshotAttribute [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBClusterSnapshotAttribute ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBClusterSnapshotAttributesResult = ( output , context ) : DBClusterSnapshotAttributesResult => { const contents = { DBClusterSnapshotIdentifier : undefined , DBClusterSnapshotAttributes : undefined , } ; if ( output [ "DBClusterSnapshotIdentifier" ] !== undefined ) { contents . DBClusterSnapshotIdentifier = __expectString ( output [ "DBClusterSnapshotIdentifier" ] ) ; } if ( output . DBClusterSnapshotAttributes === "" ) { contents . DBClusterSnapshotAttributes = [ ] ; } if ( output [ "DBClusterSnapshotAttributes" ] !== undefined && output [ "DBClusterSnapshotAttributes" ] [ "DBClusterSnapshotAttribute" ] !== undefined ) { contents . DBClusterSnapshotAttributes = deserializeAws_queryDBClusterSnapshotAttributeList ( __getArrayIfSingleItem ( output [ "DBClusterSnapshotAttributes" ] [ "DBClusterSnapshotAttribute" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBClusterSnapshotList = ( output , context ) : DBClusterSnapshot [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBClusterSnapshot ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBClusterSnapshotMessage = ( output , context ) : DBClusterSnapshotMessage => { const contents = { Marker : undefined , DBClusterSnapshots : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . DBClusterSnapshots === "" ) { contents . DBClusterSnapshots = [ ] ; } if ( output [ "DBClusterSnapshots" ] !== undefined && output [ "DBClusterSnapshots" ] [ "DBClusterSnapshot" ] !== undefined ) { contents . DBClusterSnapshots = deserializeAws_queryDBClusterSnapshotList ( __getArrayIfSingleItem ( output [ "DBClusterSnapshots" ] [ "DBClusterSnapshot" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBClusterSnapshotNotFoundFault = ( output , context ) : DBClusterSnapshotNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBEngineVersion = ( output , context ) : DBEngineVersion => { const contents = { Engine : undefined , EngineVersion : undefined , DBParameterGroupFamily : undefined , DBEngineDescription : undefined , DBEngineVersionDescription : undefined , DefaultCharacterSet : undefined , SupportedCharacterSets : undefined , SupportedNcharCharacterSets : undefined , ValidUpgradeTarget : undefined , SupportedTimezones : undefined , ExportableLogTypes : undefined , SupportsLogExportsToCloudwatchLogs : undefined , SupportsReadReplica : undefined , SupportedEngineModes : undefined , SupportedFeatureNames : undefined , Status : undefined , SupportsParallelQuery : undefined , SupportsGlobalDatabases : undefined , MajorEngineVersion : undefined , DatabaseInstallationFilesS3BucketName : undefined , DatabaseInstallationFilesS3Prefix : undefined , DBEngineVersionArn : undefined , KMSKeyId : undefined , CreateTime : undefined , TagList : undefined , } ; if ( output [ "Engine" ] !== undefined ) { contents . Engine = __expectString ( output [ "Engine" ] ) ; } if ( output [ "EngineVersion" ] !== undefined ) { contents . EngineVersion = __expectString ( output [ "EngineVersion" ] ) ; } if ( output [ "DBParameterGroupFamily" ] !== undefined ) { contents . DBParameterGroupFamily = __expectString ( output [ "DBParameterGroupFamily" ] ) ; } if ( output [ "DBEngineDescription" ] !== undefined ) { contents . DBEngineDescription = __expectString ( output [ "DBEngineDescription" ] ) ; } if ( output [ "DBEngineVersionDescription" ] !== undefined ) { contents . DBEngineVersionDescription = __expectString ( output [ "DBEngineVersionDescription" ] ) ; } if ( output [ "DefaultCharacterSet" ] !== undefined ) { contents . DefaultCharacterSet = deserializeAws_queryCharacterSet ( output [ "DefaultCharacterSet" ] , context ) ; } if ( output . SupportedCharacterSets === "" ) { contents . SupportedCharacterSets = [ ] ; } if ( output [ "SupportedCharacterSets" ] !== undefined && output [ "SupportedCharacterSets" ] [ "CharacterSet" ] !== undefined ) { contents . SupportedCharacterSets = deserializeAws_querySupportedCharacterSetsList ( __getArrayIfSingleItem ( output [ "SupportedCharacterSets" ] [ "CharacterSet" ] ) , context ) ; } if ( output . SupportedNcharCharacterSets === "" ) { contents . SupportedNcharCharacterSets = [ ] ; } if ( output [ "SupportedNcharCharacterSets" ] !== undefined && output [ "SupportedNcharCharacterSets" ] [ "CharacterSet" ] !== undefined ) { contents . SupportedNcharCharacterSets = deserializeAws_querySupportedCharacterSetsList ( __getArrayIfSingleItem ( output [ "SupportedNcharCharacterSets" ] [ "CharacterSet" ] ) , context ) ; } if ( output . ValidUpgradeTarget === "" ) { contents . ValidUpgradeTarget = [ ] ; } if ( output [ "ValidUpgradeTarget" ] !== undefined && output [ "ValidUpgradeTarget" ] [ "UpgradeTarget" ] !== undefined ) { contents . ValidUpgradeTarget = deserializeAws_queryValidUpgradeTargetList ( __getArrayIfSingleItem ( output [ "ValidUpgradeTarget" ] [ "UpgradeTarget" ] ) , context ) ; } if ( output . SupportedTimezones === "" ) { contents . SupportedTimezones = [ ] ; } if ( output [ "SupportedTimezones" ] !== undefined && output [ "SupportedTimezones" ] [ "Timezone" ] !== undefined ) { contents . SupportedTimezones = deserializeAws_querySupportedTimezonesList ( __getArrayIfSingleItem ( output [ "SupportedTimezones" ] [ "Timezone" ] ) , context ) ; } if ( output . ExportableLogTypes === "" ) { contents . ExportableLogTypes = [ ] ; } if ( output [ "ExportableLogTypes" ] !== undefined && output [ "ExportableLogTypes" ] [ "member" ] !== undefined ) { contents . ExportableLogTypes = deserializeAws_queryLogTypeList ( __getArrayIfSingleItem ( output [ "ExportableLogTypes" ] [ "member" ] ) , context ) ; } if ( output [ "SupportsLogExportsToCloudwatchLogs" ] !== undefined ) { contents . SupportsLogExportsToCloudwatchLogs = __parseBoolean ( output [ "SupportsLogExportsToCloudwatchLogs" ] ) ; } if ( output [ "SupportsReadReplica" ] !== undefined ) { contents . SupportsReadReplica = __parseBoolean ( output [ "SupportsReadReplica" ] ) ; } if ( output . SupportedEngineModes === "" ) { contents . SupportedEngineModes = [ ] ; } if ( output [ "SupportedEngineModes" ] !== undefined && output [ "SupportedEngineModes" ] [ "member" ] !== undefined ) { contents . SupportedEngineModes = deserializeAws_queryEngineModeList ( __getArrayIfSingleItem ( output [ "SupportedEngineModes" ] [ "member" ] ) , context ) ; } if ( output . SupportedFeatureNames === "" ) { contents . SupportedFeatureNames = [ ] ; } if ( output [ "SupportedFeatureNames" ] !== undefined && output [ "SupportedFeatureNames" ] [ "member" ] !== undefined ) { contents . SupportedFeatureNames = deserializeAws_queryFeatureNameList ( __getArrayIfSingleItem ( output [ "SupportedFeatureNames" ] [ "member" ] ) , context ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "SupportsParallelQuery" ] !== undefined ) { contents . SupportsParallelQuery = __parseBoolean ( output [ "SupportsParallelQuery" ] ) ; } if ( output [ "SupportsGlobalDatabases" ] !== undefined ) { contents . SupportsGlobalDatabases = __parseBoolean ( output [ "SupportsGlobalDatabases" ] ) ; } if ( output [ "MajorEngineVersion" ] !== undefined ) { contents . MajorEngineVersion = __expectString ( output [ "MajorEngineVersion" ] ) ; } if ( output [ "DatabaseInstallationFilesS3BucketName" ] !== undefined ) { contents . DatabaseInstallationFilesS3BucketName = __expectString ( output [ "DatabaseInstallationFilesS3BucketName" ] ) ; } if ( output [ "DatabaseInstallationFilesS3Prefix" ] !== undefined ) { contents . DatabaseInstallationFilesS3Prefix = __expectString ( output [ "DatabaseInstallationFilesS3Prefix" ] ) ; } if ( output [ "DBEngineVersionArn" ] !== undefined ) { contents . DBEngineVersionArn = __expectString ( output [ "DBEngineVersionArn" ] ) ; } if ( output [ "KMSKeyId" ] !== undefined ) { contents . KMSKeyId = __expectString ( output [ "KMSKeyId" ] ) ; } if ( output [ "CreateTime" ] !== undefined ) { contents . CreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "CreateTime" ] ) ) ; } if ( output . TagList === "" ) { contents . TagList = [ ] ; } if ( output [ "TagList" ] !== undefined && output [ "TagList" ] [ "Tag" ] !== undefined ) { contents . TagList = deserializeAws_queryTagList ( __getArrayIfSingleItem ( output [ "TagList" ] [ "Tag" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBEngineVersionList = ( output , context ) : DBEngineVersion [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBEngineVersion ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBEngineVersionMessage = ( output , context ) : DBEngineVersionMessage => { const contents = { Marker : undefined , DBEngineVersions : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . DBEngineVersions === "" ) { contents . DBEngineVersions = [ ] ; } if ( output [ "DBEngineVersions" ] !== undefined && output [ "DBEngineVersions" ] [ "DBEngineVersion" ] !== undefined ) { contents . DBEngineVersions = deserializeAws_queryDBEngineVersionList ( __getArrayIfSingleItem ( output [ "DBEngineVersions" ] [ "DBEngineVersion" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBInstance = ( output , context ) : DBInstance => { const contents = { DBInstanceIdentifier : undefined , DBInstanceClass : undefined , Engine : undefined , DBInstanceStatus : undefined , AutomaticRestartTime : undefined , MasterUsername : undefined , DBName : undefined , Endpoint : undefined , AllocatedStorage : undefined , InstanceCreateTime : undefined , PreferredBackupWindow : undefined , BackupRetentionPeriod : undefined , DBSecurityGroups : undefined , VpcSecurityGroups : undefined , DBParameterGroups : undefined , AvailabilityZone : undefined , DBSubnetGroup : undefined , PreferredMaintenanceWindow : undefined , PendingModifiedValues : undefined , LatestRestorableTime : undefined , MultiAZ : undefined , EngineVersion : undefined , AutoMinorVersionUpgrade : undefined , ReadReplicaSourceDBInstanceIdentifier : undefined , ReadReplicaDBInstanceIdentifiers : undefined , ReadReplicaDBClusterIdentifiers : undefined , ReplicaMode : undefined , LicenseModel : undefined , Iops : undefined , OptionGroupMemberships : undefined , CharacterSetName : undefined , NcharCharacterSetName : undefined , SecondaryAvailabilityZone : undefined , PubliclyAccessible : undefined , StatusInfos : undefined , StorageType : undefined , TdeCredentialArn : undefined , DbInstancePort : undefined , DBClusterIdentifier : undefined , StorageEncrypted : undefined , KmsKeyId : undefined , DbiResourceId : undefined , CACertificateIdentifier : undefined , DomainMemberships : undefined , CopyTagsToSnapshot : undefined , MonitoringInterval : undefined , EnhancedMonitoringResourceArn : undefined , MonitoringRoleArn : undefined , PromotionTier : undefined , DBInstanceArn : undefined , Timezone : undefined , IAMDatabaseAuthenticationEnabled : undefined , PerformanceInsightsEnabled : undefined , PerformanceInsightsKMSKeyId : undefined , PerformanceInsightsRetentionPeriod : undefined , EnabledCloudwatchLogsExports : undefined , ProcessorFeatures : undefined , DeletionProtection : undefined , AssociatedRoles : undefined , ListenerEndpoint : undefined , MaxAllocatedStorage : undefined , TagList : undefined , DBInstanceAutomatedBackupsReplications : undefined , CustomerOwnedIpEnabled : undefined , AwsBackupRecoveryPointArn : undefined , ActivityStreamStatus : undefined , ActivityStreamKmsKeyId : undefined , ActivityStreamKinesisStreamName : undefined , ActivityStreamMode : undefined , ActivityStreamEngineNativeAuditFieldsIncluded : undefined , AutomationMode : undefined , ResumeFullAutomationModeTime : undefined , CustomIamInstanceProfile : undefined , BackupTarget : undefined , } ; if ( output [ "DBInstanceIdentifier" ] !== undefined ) { contents . DBInstanceIdentifier = __expectString ( output [ "DBInstanceIdentifier" ] ) ; } if ( output [ "DBInstanceClass" ] !== undefined ) { contents . DBInstanceClass = __expectString ( output [ "DBInstanceClass" ] ) ; } if ( output [ "Engine" ] !== undefined ) { contents . Engine = __expectString ( output [ "Engine" ] ) ; } if ( output [ "DBInstanceStatus" ] !== undefined ) { contents . DBInstanceStatus = __expectString ( output [ "DBInstanceStatus" ] ) ; } if ( output [ "AutomaticRestartTime" ] !== undefined ) { contents . AutomaticRestartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "AutomaticRestartTime" ] ) ) ; } if ( output [ "MasterUsername" ] !== undefined ) { contents . MasterUsername = __expectString ( output [ "MasterUsername" ] ) ; } if ( output [ "DBName" ] !== undefined ) { contents . DBName = __expectString ( output [ "DBName" ] ) ; } if ( output [ "Endpoint" ] !== undefined ) { contents . Endpoint = deserializeAws_queryEndpoint ( output [ "Endpoint" ] , context ) ; } if ( output [ "AllocatedStorage" ] !== undefined ) { contents . AllocatedStorage = __strictParseInt32 ( output [ "AllocatedStorage" ] ) as number ; } if ( output [ "InstanceCreateTime" ] !== undefined ) { contents . InstanceCreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "InstanceCreateTime" ] ) ) ; } if ( output [ "PreferredBackupWindow" ] !== undefined ) { contents . PreferredBackupWindow = __expectString ( output [ "PreferredBackupWindow" ] ) ; } if ( output [ "BackupRetentionPeriod" ] !== undefined ) { contents . BackupRetentionPeriod = __strictParseInt32 ( output [ "BackupRetentionPeriod" ] ) as number ; } if ( output . DBSecurityGroups === "" ) { contents . DBSecurityGroups = [ ] ; } if ( output [ "DBSecurityGroups" ] !== undefined && output [ "DBSecurityGroups" ] [ "DBSecurityGroup" ] !== undefined ) { contents . DBSecurityGroups = deserializeAws_queryDBSecurityGroupMembershipList ( __getArrayIfSingleItem ( output [ "DBSecurityGroups" ] [ "DBSecurityGroup" ] ) , context ) ; } if ( output . VpcSecurityGroups === "" ) { contents . VpcSecurityGroups = [ ] ; } if ( output [ "VpcSecurityGroups" ] !== undefined && output [ "VpcSecurityGroups" ] [ "VpcSecurityGroupMembership" ] !== undefined ) { contents . VpcSecurityGroups = deserializeAws_queryVpcSecurityGroupMembershipList ( __getArrayIfSingleItem ( output [ "VpcSecurityGroups" ] [ "VpcSecurityGroupMembership" ] ) , context ) ; } if ( output . DBParameterGroups === "" ) { contents . DBParameterGroups = [ ] ; } if ( output [ "DBParameterGroups" ] !== undefined && output [ "DBParameterGroups" ] [ "DBParameterGroup" ] !== undefined ) { contents . DBParameterGroups = deserializeAws_queryDBParameterGroupStatusList ( __getArrayIfSingleItem ( output [ "DBParameterGroups" ] [ "DBParameterGroup" ] ) , context ) ; } if ( output [ "AvailabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "AvailabilityZone" ] ) ; } if ( output [ "DBSubnetGroup" ] !== undefined ) { contents . DBSubnetGroup = deserializeAws_queryDBSubnetGroup ( output [ "DBSubnetGroup" ] , context ) ; } if ( output [ "PreferredMaintenanceWindow" ] !== undefined ) { contents . PreferredMaintenanceWindow = __expectString ( output [ "PreferredMaintenanceWindow" ] ) ; } if ( output [ "PendingModifiedValues" ] !== undefined ) { contents . PendingModifiedValues = deserializeAws_queryPendingModifiedValues ( output [ "PendingModifiedValues" ] , context ) ; } if ( output [ "LatestRestorableTime" ] !== undefined ) { contents . LatestRestorableTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "LatestRestorableTime" ] ) ) ; } if ( output [ "MultiAZ" ] !== undefined ) { contents . MultiAZ = __parseBoolean ( output [ "MultiAZ" ] ) ; } if ( output [ "EngineVersion" ] !== undefined ) { contents . EngineVersion = __expectString ( output [ "EngineVersion" ] ) ; } if ( output [ "AutoMinorVersionUpgrade" ] !== undefined ) { contents . AutoMinorVersionUpgrade = __parseBoolean ( output [ "AutoMinorVersionUpgrade" ] ) ; } if ( output [ "ReadReplicaSourceDBInstanceIdentifier" ] !== undefined ) { contents . ReadReplicaSourceDBInstanceIdentifier = __expectString ( output [ "ReadReplicaSourceDBInstanceIdentifier" ] ) ; } if ( output . ReadReplicaDBInstanceIdentifiers === "" ) { contents . ReadReplicaDBInstanceIdentifiers = [ ] ; } if ( output [ "ReadReplicaDBInstanceIdentifiers" ] !== undefined && output [ "ReadReplicaDBInstanceIdentifiers" ] [ "ReadReplicaDBInstanceIdentifier" ] !== undefined ) { contents . ReadReplicaDBInstanceIdentifiers = deserializeAws_queryReadReplicaDBInstanceIdentifierList ( __getArrayIfSingleItem ( output [ "ReadReplicaDBInstanceIdentifiers" ] [ "ReadReplicaDBInstanceIdentifier" ] ) , context ) ; } if ( output . ReadReplicaDBClusterIdentifiers === "" ) { contents . ReadReplicaDBClusterIdentifiers = [ ] ; } if ( output [ "ReadReplicaDBClusterIdentifiers" ] !== undefined && output [ "ReadReplicaDBClusterIdentifiers" ] [ "ReadReplicaDBClusterIdentifier" ] !== undefined ) { contents . ReadReplicaDBClusterIdentifiers = deserializeAws_queryReadReplicaDBClusterIdentifierList ( __getArrayIfSingleItem ( output [ "ReadReplicaDBClusterIdentifiers" ] [ "ReadReplicaDBClusterIdentifier" ] ) , context ) ; } if ( output [ "ReplicaMode" ] !== undefined ) { contents . ReplicaMode = __expectString ( output [ "ReplicaMode" ] ) ; } if ( output [ "LicenseModel" ] !== undefined ) { contents . LicenseModel = __expectString ( output [ "LicenseModel" ] ) ; } if ( output [ "Iops" ] !== undefined ) { contents . Iops = __strictParseInt32 ( output [ "Iops" ] ) as number ; } if ( output . OptionGroupMemberships === "" ) { contents . OptionGroupMemberships = [ ] ; } if ( output [ "OptionGroupMemberships" ] !== undefined && output [ "OptionGroupMemberships" ] [ "OptionGroupMembership" ] !== undefined ) { contents . OptionGroupMemberships = deserializeAws_queryOptionGroupMembershipList ( __getArrayIfSingleItem ( output [ "OptionGroupMemberships" ] [ "OptionGroupMembership" ] ) , context ) ; } if ( output [ "CharacterSetName" ] !== undefined ) { contents . CharacterSetName = __expectString ( output [ "CharacterSetName" ] ) ; } if ( output [ "NcharCharacterSetName" ] !== undefined ) { contents . NcharCharacterSetName = __expectString ( output [ "NcharCharacterSetName" ] ) ; } if ( output [ "SecondaryAvailabilityZone" ] !== undefined ) { contents . SecondaryAvailabilityZone = __expectString ( output [ "SecondaryAvailabilityZone" ] ) ; } if ( output [ "PubliclyAccessible" ] !== undefined ) { contents . PubliclyAccessible = __parseBoolean ( output [ "PubliclyAccessible" ] ) ; } if ( output . StatusInfos === "" ) { contents . StatusInfos = [ ] ; } if ( output [ "StatusInfos" ] !== undefined && output [ "StatusInfos" ] [ "DBInstanceStatusInfo" ] !== undefined ) { contents . StatusInfos = deserializeAws_queryDBInstanceStatusInfoList ( __getArrayIfSingleItem ( output [ "StatusInfos" ] [ "DBInstanceStatusInfo" ] ) , context ) ; } if ( output [ "StorageType" ] !== undefined ) { contents . StorageType = __expectString ( output [ "StorageType" ] ) ; } if ( output [ "TdeCredentialArn" ] !== undefined ) { contents . TdeCredentialArn = __expectString ( output [ "TdeCredentialArn" ] ) ; } if ( output [ "DbInstancePort" ] !== undefined ) { contents . DbInstancePort = __strictParseInt32 ( output [ "DbInstancePort" ] ) as number ; } if ( output [ "DBClusterIdentifier" ] !== undefined ) { contents . DBClusterIdentifier = __expectString ( output [ "DBClusterIdentifier" ] ) ; } if ( output [ "StorageEncrypted" ] !== undefined ) { contents . StorageEncrypted = __parseBoolean ( output [ "StorageEncrypted" ] ) ; } if ( output [ "KmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "KmsKeyId" ] ) ; } if ( output [ "DbiResourceId" ] !== undefined ) { contents . DbiResourceId = __expectString ( output [ "DbiResourceId" ] ) ; } if ( output [ "CACertificateIdentifier" ] !== undefined ) { contents . CACertificateIdentifier = __expectString ( output [ "CACertificateIdentifier" ] ) ; } if ( output . DomainMemberships === "" ) { contents . DomainMemberships = [ ] ; } if ( output [ "DomainMemberships" ] !== undefined && output [ "DomainMemberships" ] [ "DomainMembership" ] !== undefined ) { contents . DomainMemberships = deserializeAws_queryDomainMembershipList ( __getArrayIfSingleItem ( output [ "DomainMemberships" ] [ "DomainMembership" ] ) , context ) ; } if ( output [ "CopyTagsToSnapshot" ] !== undefined ) { contents . CopyTagsToSnapshot = __parseBoolean ( output [ "CopyTagsToSnapshot" ] ) ; } if ( output [ "MonitoringInterval" ] !== undefined ) { contents . MonitoringInterval = __strictParseInt32 ( output [ "MonitoringInterval" ] ) as number ; } if ( output [ "EnhancedMonitoringResourceArn" ] !== undefined ) { contents . EnhancedMonitoringResourceArn = __expectString ( output [ "EnhancedMonitoringResourceArn" ] ) ; } if ( output [ "MonitoringRoleArn" ] !== undefined ) { contents . MonitoringRoleArn = __expectString ( output [ "MonitoringRoleArn" ] ) ; } if ( output [ "PromotionTier" ] !== undefined ) { contents . PromotionTier = __strictParseInt32 ( output [ "PromotionTier" ] ) as number ; } if ( output [ "DBInstanceArn" ] !== undefined ) { contents . DBInstanceArn = __expectString ( output [ "DBInstanceArn" ] ) ; } if ( output [ "Timezone" ] !== undefined ) { contents . Timezone = __expectString ( output [ "Timezone" ] ) ; } if ( output [ "IAMDatabaseAuthenticationEnabled" ] !== undefined ) { contents . IAMDatabaseAuthenticationEnabled = __parseBoolean ( output [ "IAMDatabaseAuthenticationEnabled" ] ) ; } if ( output [ "PerformanceInsightsEnabled" ] !== undefined ) { contents . PerformanceInsightsEnabled = __parseBoolean ( output [ "PerformanceInsightsEnabled" ] ) ; } if ( output [ "PerformanceInsightsKMSKeyId" ] !== undefined ) { contents . PerformanceInsightsKMSKeyId = __expectString ( output [ "PerformanceInsightsKMSKeyId" ] ) ; } if ( output [ "PerformanceInsightsRetentionPeriod" ] !== undefined ) { contents . PerformanceInsightsRetentionPeriod = __strictParseInt32 ( output [ "PerformanceInsightsRetentionPeriod" ] ) as number ; } if ( output . EnabledCloudwatchLogsExports === "" ) { contents . EnabledCloudwatchLogsExports = [ ] ; } if ( output [ "EnabledCloudwatchLogsExports" ] !== undefined && output [ "EnabledCloudwatchLogsExports" ] [ "member" ] !== undefined ) { contents . EnabledCloudwatchLogsExports = deserializeAws_queryLogTypeList ( __getArrayIfSingleItem ( output [ "EnabledCloudwatchLogsExports" ] [ "member" ] ) , context ) ; } if ( output . ProcessorFeatures === "" ) { contents . ProcessorFeatures = [ ] ; } if ( output [ "ProcessorFeatures" ] !== undefined && output [ "ProcessorFeatures" ] [ "ProcessorFeature" ] !== undefined ) { contents . ProcessorFeatures = deserializeAws_queryProcessorFeatureList ( __getArrayIfSingleItem ( output [ "ProcessorFeatures" ] [ "ProcessorFeature" ] ) , context ) ; } if ( output [ "DeletionProtection" ] !== undefined ) { contents . DeletionProtection = __parseBoolean ( output [ "DeletionProtection" ] ) ; } if ( output . AssociatedRoles === "" ) { contents . AssociatedRoles = [ ] ; } if ( output [ "AssociatedRoles" ] !== undefined && output [ "AssociatedRoles" ] [ "DBInstanceRole" ] !== undefined ) { contents . AssociatedRoles = deserializeAws_queryDBInstanceRoles ( __getArrayIfSingleItem ( output [ "AssociatedRoles" ] [ "DBInstanceRole" ] ) , context ) ; } if ( output [ "ListenerEndpoint" ] !== undefined ) { contents . ListenerEndpoint = deserializeAws_queryEndpoint ( output [ "ListenerEndpoint" ] , context ) ; } if ( output [ "MaxAllocatedStorage" ] !== undefined ) { contents . MaxAllocatedStorage = __strictParseInt32 ( output [ "MaxAllocatedStorage" ] ) as number ; } if ( output . TagList === "" ) { contents . TagList = [ ] ; } if ( output [ "TagList" ] !== undefined && output [ "TagList" ] [ "Tag" ] !== undefined ) { contents . TagList = deserializeAws_queryTagList ( __getArrayIfSingleItem ( output [ "TagList" ] [ "Tag" ] ) , context ) ; } if ( output . DBInstanceAutomatedBackupsReplications === "" ) { contents . DBInstanceAutomatedBackupsReplications = [ ] ; } if ( output [ "DBInstanceAutomatedBackupsReplications" ] !== undefined && output [ "DBInstanceAutomatedBackupsReplications" ] [ "DBInstanceAutomatedBackupsReplication" ] !== undefined ) { contents . DBInstanceAutomatedBackupsReplications = deserializeAws_queryDBInstanceAutomatedBackupsReplicationList ( __getArrayIfSingleItem ( output [ "DBInstanceAutomatedBackupsReplications" ] [ "DBInstanceAutomatedBackupsReplication" ] ) , context ) ; } if ( output [ "CustomerOwnedIpEnabled" ] !== undefined ) { contents . CustomerOwnedIpEnabled = __parseBoolean ( output [ "CustomerOwnedIpEnabled" ] ) ; } if ( output [ "AwsBackupRecoveryPointArn" ] !== undefined ) { contents . AwsBackupRecoveryPointArn = __expectString ( output [ "AwsBackupRecoveryPointArn" ] ) ; } if ( output [ "ActivityStreamStatus" ] !== undefined ) { contents . ActivityStreamStatus = __expectString ( output [ "ActivityStreamStatus" ] ) ; } if ( output [ "ActivityStreamKmsKeyId" ] !== undefined ) { contents . ActivityStreamKmsKeyId = __expectString ( output [ "ActivityStreamKmsKeyId" ] ) ; } if ( output [ "ActivityStreamKinesisStreamName" ] !== undefined ) { contents . ActivityStreamKinesisStreamName = __expectString ( output [ "ActivityStreamKinesisStreamName" ] ) ; } if ( output [ "ActivityStreamMode" ] !== undefined ) { contents . ActivityStreamMode = __expectString ( output [ "ActivityStreamMode" ] ) ; } if ( output [ "ActivityStreamEngineNativeAuditFieldsIncluded" ] !== undefined ) { contents . ActivityStreamEngineNativeAuditFieldsIncluded = __parseBoolean ( output [ "ActivityStreamEngineNativeAuditFieldsIncluded" ] ) ; } if ( output [ "AutomationMode" ] !== undefined ) { contents . AutomationMode = __expectString ( output [ "AutomationMode" ] ) ; } if ( output [ "ResumeFullAutomationModeTime" ] !== undefined ) { contents . ResumeFullAutomationModeTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "ResumeFullAutomationModeTime" ] ) ) ; } if ( output [ "CustomIamInstanceProfile" ] !== undefined ) { contents . CustomIamInstanceProfile = __expectString ( output [ "CustomIamInstanceProfile" ] ) ; } if ( output [ "BackupTarget" ] !== undefined ) { contents . BackupTarget = __expectString ( output [ "BackupTarget" ] ) ; } return contents ; } ; const deserializeAws_queryDBInstanceAlreadyExistsFault = ( output , context ) : DBInstanceAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBInstanceAutomatedBackup = ( output , context ) : DBInstanceAutomatedBackup => { const contents = { DBInstanceArn : undefined , DbiResourceId : undefined , Region : undefined , DBInstanceIdentifier : undefined , RestoreWindow : undefined , AllocatedStorage : undefined , Status : undefined , Port : undefined , AvailabilityZone : undefined , VpcId : undefined , InstanceCreateTime : undefined , MasterUsername : undefined , Engine : undefined , EngineVersion : undefined , LicenseModel : undefined , Iops : undefined , OptionGroupName : undefined , TdeCredentialArn : undefined , Encrypted : undefined , StorageType : undefined , KmsKeyId : undefined , Timezone : undefined , IAMDatabaseAuthenticationEnabled : undefined , BackupRetentionPeriod : undefined , DBInstanceAutomatedBackupsArn : undefined , DBInstanceAutomatedBackupsReplications : undefined , BackupTarget : undefined , } ; if ( output [ "DBInstanceArn" ] !== undefined ) { contents . DBInstanceArn = __expectString ( output [ "DBInstanceArn" ] ) ; } if ( output [ "DbiResourceId" ] !== undefined ) { contents . DbiResourceId = __expectString ( output [ "DbiResourceId" ] ) ; } if ( output [ "Region" ] !== undefined ) { contents . Region = __expectString ( output [ "Region" ] ) ; } if ( output [ "DBInstanceIdentifier" ] !== undefined ) { contents . DBInstanceIdentifier = __expectString ( output [ "DBInstanceIdentifier" ] ) ; } if ( output [ "RestoreWindow" ] !== undefined ) { contents . RestoreWindow = deserializeAws_queryRestoreWindow ( output [ "RestoreWindow" ] , context ) ; } if ( output [ "AllocatedStorage" ] !== undefined ) { contents . AllocatedStorage = __strictParseInt32 ( output [ "AllocatedStorage" ] ) as number ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "Port" ] !== undefined ) { contents . Port = __strictParseInt32 ( output [ "Port" ] ) as number ; } if ( output [ "AvailabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "AvailabilityZone" ] ) ; } if ( output [ "VpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "VpcId" ] ) ; } if ( output [ "InstanceCreateTime" ] !== undefined ) { contents . InstanceCreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "InstanceCreateTime" ] ) ) ; } if ( output [ "MasterUsername" ] !== undefined ) { contents . MasterUsername = __expectString ( output [ "MasterUsername" ] ) ; } if ( output [ "Engine" ] !== undefined ) { contents . Engine = __expectString ( output [ "Engine" ] ) ; } if ( output [ "EngineVersion" ] !== undefined ) { contents . EngineVersion = __expectString ( output [ "EngineVersion" ] ) ; } if ( output [ "LicenseModel" ] !== undefined ) { contents . LicenseModel = __expectString ( output [ "LicenseModel" ] ) ; } if ( output [ "Iops" ] !== undefined ) { contents . Iops = __strictParseInt32 ( output [ "Iops" ] ) as number ; } if ( output [ "OptionGroupName" ] !== undefined ) { contents . OptionGroupName = __expectString ( output [ "OptionGroupName" ] ) ; } if ( output [ "TdeCredentialArn" ] !== undefined ) { contents . TdeCredentialArn = __expectString ( output [ "TdeCredentialArn" ] ) ; } if ( output [ "Encrypted" ] !== undefined ) { contents . Encrypted = __parseBoolean ( output [ "Encrypted" ] ) ; } if ( output [ "StorageType" ] !== undefined ) { contents . StorageType = __expectString ( output [ "StorageType" ] ) ; } if ( output [ "KmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "KmsKeyId" ] ) ; } if ( output [ "Timezone" ] !== undefined ) { contents . Timezone = __expectString ( output [ "Timezone" ] ) ; } if ( output [ "IAMDatabaseAuthenticationEnabled" ] !== undefined ) { contents . IAMDatabaseAuthenticationEnabled = __parseBoolean ( output [ "IAMDatabaseAuthenticationEnabled" ] ) ; } if ( output [ "BackupRetentionPeriod" ] !== undefined ) { contents . BackupRetentionPeriod = __strictParseInt32 ( output [ "BackupRetentionPeriod" ] ) as number ; } if ( output [ "DBInstanceAutomatedBackupsArn" ] !== undefined ) { contents . DBInstanceAutomatedBackupsArn = __expectString ( output [ "DBInstanceAutomatedBackupsArn" ] ) ; } if ( output . DBInstanceAutomatedBackupsReplications === "" ) { contents . DBInstanceAutomatedBackupsReplications = [ ] ; } if ( output [ "DBInstanceAutomatedBackupsReplications" ] !== undefined && output [ "DBInstanceAutomatedBackupsReplications" ] [ "DBInstanceAutomatedBackupsReplication" ] !== undefined ) { contents . DBInstanceAutomatedBackupsReplications = deserializeAws_queryDBInstanceAutomatedBackupsReplicationList ( __getArrayIfSingleItem ( output [ "DBInstanceAutomatedBackupsReplications" ] [ "DBInstanceAutomatedBackupsReplication" ] ) , context ) ; } if ( output [ "BackupTarget" ] !== undefined ) { contents . BackupTarget = __expectString ( output [ "BackupTarget" ] ) ; } return contents ; } ; const deserializeAws_queryDBInstanceAutomatedBackupList = ( output , context ) : DBInstanceAutomatedBackup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBInstanceAutomatedBackup ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBInstanceAutomatedBackupMessage = ( output , context ) : DBInstanceAutomatedBackupMessage => { const contents = { Marker : undefined , DBInstanceAutomatedBackups : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . DBInstanceAutomatedBackups === "" ) { contents . DBInstanceAutomatedBackups = [ ] ; } if ( output [ "DBInstanceAutomatedBackups" ] !== undefined && output [ "DBInstanceAutomatedBackups" ] [ "DBInstanceAutomatedBackup" ] !== undefined ) { contents . DBInstanceAutomatedBackups = deserializeAws_queryDBInstanceAutomatedBackupList ( __getArrayIfSingleItem ( output [ "DBInstanceAutomatedBackups" ] [ "DBInstanceAutomatedBackup" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBInstanceAutomatedBackupNotFoundFault = ( output , context ) : DBInstanceAutomatedBackupNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBInstanceAutomatedBackupQuotaExceededFault = ( output , context ) : DBInstanceAutomatedBackupQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBInstanceAutomatedBackupsReplication = ( output , context ) : DBInstanceAutomatedBackupsReplication => { const contents = { DBInstanceAutomatedBackupsArn : undefined , } ; if ( output [ "DBInstanceAutomatedBackupsArn" ] !== undefined ) { contents . DBInstanceAutomatedBackupsArn = __expectString ( output [ "DBInstanceAutomatedBackupsArn" ] ) ; } return contents ; } ; const deserializeAws_queryDBInstanceAutomatedBackupsReplicationList = ( output , context ) : DBInstanceAutomatedBackupsReplication [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBInstanceAutomatedBackupsReplication ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBInstanceList = ( output , context ) : DBInstance [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBInstance ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBInstanceMessage = ( output , context ) : DBInstanceMessage => { const contents = { Marker : undefined , DBInstances : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . DBInstances === "" ) { contents . DBInstances = [ ] ; } if ( output [ "DBInstances" ] !== undefined && output [ "DBInstances" ] [ "DBInstance" ] !== undefined ) { contents . DBInstances = deserializeAws_queryDBInstanceList ( __getArrayIfSingleItem ( output [ "DBInstances" ] [ "DBInstance" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBInstanceNotFoundFault = ( output , context ) : DBInstanceNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBInstanceRole = ( output , context ) : DBInstanceRole => { const contents = { RoleArn : undefined , FeatureName : undefined , Status : undefined , } ; if ( output [ "RoleArn" ] !== undefined ) { contents . RoleArn = __expectString ( output [ "RoleArn" ] ) ; } if ( output [ "FeatureName" ] !== undefined ) { contents . FeatureName = __expectString ( output [ "FeatureName" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } return contents ; } ; const deserializeAws_queryDBInstanceRoleAlreadyExistsFault = ( output , context ) : DBInstanceRoleAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBInstanceRoleNotFoundFault = ( output , context ) : DBInstanceRoleNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBInstanceRoleQuotaExceededFault = ( output , context ) : DBInstanceRoleQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBInstanceRoles = ( output , context ) : DBInstanceRole [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBInstanceRole ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBInstanceStatusInfo = ( output , context ) : DBInstanceStatusInfo => { const contents = { StatusType : undefined , Normal : undefined , Status : undefined , Message : undefined , } ; if ( output [ "StatusType" ] !== undefined ) { contents . StatusType = __expectString ( output [ "StatusType" ] ) ; } if ( output [ "Normal" ] !== undefined ) { contents . Normal = __parseBoolean ( output [ "Normal" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "Message" ] !== undefined ) { contents . Message = __expectString ( output [ "Message" ] ) ; } return contents ; } ; const deserializeAws_queryDBInstanceStatusInfoList = ( output , context ) : DBInstanceStatusInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBInstanceStatusInfo ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBLogFileNotFoundFault = ( output , context ) : DBLogFileNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBParameterGroup = ( output , context ) : DBParameterGroup => { const contents = { DBParameterGroupName : undefined , DBParameterGroupFamily : undefined , Description : undefined , DBParameterGroupArn : undefined , } ; if ( output [ "DBParameterGroupName" ] !== undefined ) { contents . DBParameterGroupName = __expectString ( output [ "DBParameterGroupName" ] ) ; } if ( output [ "DBParameterGroupFamily" ] !== undefined ) { contents . DBParameterGroupFamily = __expectString ( output [ "DBParameterGroupFamily" ] ) ; } if ( output [ "Description" ] !== undefined ) { contents . Description = __expectString ( output [ "Description" ] ) ; } if ( output [ "DBParameterGroupArn" ] !== undefined ) { contents . DBParameterGroupArn = __expectString ( output [ "DBParameterGroupArn" ] ) ; } return contents ; } ; const deserializeAws_queryDBParameterGroupAlreadyExistsFault = ( output , context ) : DBParameterGroupAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBParameterGroupDetails = ( output , context ) : DBParameterGroupDetails => { const contents = { Parameters : undefined , Marker : undefined , } ; if ( output . Parameters === "" ) { contents . Parameters = [ ] ; } if ( output [ "Parameters" ] !== undefined && output [ "Parameters" ] [ "Parameter" ] !== undefined ) { contents . Parameters = deserializeAws_queryParametersList ( __getArrayIfSingleItem ( output [ "Parameters" ] [ "Parameter" ] ) , context ) ; } if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } return contents ; } ; const deserializeAws_queryDBParameterGroupList = ( output , context ) : DBParameterGroup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBParameterGroup ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBParameterGroupNameMessage = ( output , context ) : DBParameterGroupNameMessage => { const contents = { DBParameterGroupName : undefined , } ; if ( output [ "DBParameterGroupName" ] !== undefined ) { contents . DBParameterGroupName = __expectString ( output [ "DBParameterGroupName" ] ) ; } return contents ; } ; const deserializeAws_queryDBParameterGroupNotFoundFault = ( output , context ) : DBParameterGroupNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBParameterGroupQuotaExceededFault = ( output , context ) : DBParameterGroupQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBParameterGroupsMessage = ( output , context ) : DBParameterGroupsMessage => { const contents = { Marker : undefined , DBParameterGroups : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . DBParameterGroups === "" ) { contents . DBParameterGroups = [ ] ; } if ( output [ "DBParameterGroups" ] !== undefined && output [ "DBParameterGroups" ] [ "DBParameterGroup" ] !== undefined ) { contents . DBParameterGroups = deserializeAws_queryDBParameterGroupList ( __getArrayIfSingleItem ( output [ "DBParameterGroups" ] [ "DBParameterGroup" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBParameterGroupStatus = ( output , context ) : DBParameterGroupStatus => { const contents = { DBParameterGroupName : undefined , ParameterApplyStatus : undefined , } ; if ( output [ "DBParameterGroupName" ] !== undefined ) { contents . DBParameterGroupName = __expectString ( output [ "DBParameterGroupName" ] ) ; } if ( output [ "ParameterApplyStatus" ] !== undefined ) { contents . ParameterApplyStatus = __expectString ( output [ "ParameterApplyStatus" ] ) ; } return contents ; } ; const deserializeAws_queryDBParameterGroupStatusList = ( output , context ) : DBParameterGroupStatus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBParameterGroupStatus ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBProxy = ( output , context ) : DBProxy => { const contents = { DBProxyName : undefined , DBProxyArn : undefined , Status : undefined , EngineFamily : undefined , VpcId : undefined , VpcSecurityGroupIds : undefined , VpcSubnetIds : undefined , Auth : undefined , RoleArn : undefined , Endpoint : undefined , RequireTLS : undefined , IdleClientTimeout : undefined , DebugLogging : undefined , CreatedDate : undefined , UpdatedDate : undefined , } ; if ( output [ "DBProxyName" ] !== undefined ) { contents . DBProxyName = __expectString ( output [ "DBProxyName" ] ) ; } if ( output [ "DBProxyArn" ] !== undefined ) { contents . DBProxyArn = __expectString ( output [ "DBProxyArn" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "EngineFamily" ] !== undefined ) { contents . EngineFamily = __expectString ( output [ "EngineFamily" ] ) ; } if ( output [ "VpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "VpcId" ] ) ; } if ( output . VpcSecurityGroupIds === "" ) { contents . VpcSecurityGroupIds = [ ] ; } if ( output [ "VpcSecurityGroupIds" ] !== undefined && output [ "VpcSecurityGroupIds" ] [ "member" ] !== undefined ) { contents . VpcSecurityGroupIds = deserializeAws_queryStringList ( __getArrayIfSingleItem ( output [ "VpcSecurityGroupIds" ] [ "member" ] ) , context ) ; } if ( output . VpcSubnetIds === "" ) { contents . VpcSubnetIds = [ ] ; } if ( output [ "VpcSubnetIds" ] !== undefined && output [ "VpcSubnetIds" ] [ "member" ] !== undefined ) { contents . VpcSubnetIds = deserializeAws_queryStringList ( __getArrayIfSingleItem ( output [ "VpcSubnetIds" ] [ "member" ] ) , context ) ; } if ( output . Auth === "" ) { contents . Auth = [ ] ; } if ( output [ "Auth" ] !== undefined && output [ "Auth" ] [ "member" ] !== undefined ) { contents . Auth = deserializeAws_queryUserAuthConfigInfoList ( __getArrayIfSingleItem ( output [ "Auth" ] [ "member" ] ) , context ) ; } if ( output [ "RoleArn" ] !== undefined ) { contents . RoleArn = __expectString ( output [ "RoleArn" ] ) ; } if ( output [ "Endpoint" ] !== undefined ) { contents . Endpoint = __expectString ( output [ "Endpoint" ] ) ; } if ( output [ "RequireTLS" ] !== undefined ) { contents . RequireTLS = __parseBoolean ( output [ "RequireTLS" ] ) ; } if ( output [ "IdleClientTimeout" ] !== undefined ) { contents . IdleClientTimeout = __strictParseInt32 ( output [ "IdleClientTimeout" ] ) as number ; } if ( output [ "DebugLogging" ] !== undefined ) { contents . DebugLogging = __parseBoolean ( output [ "DebugLogging" ] ) ; } if ( output [ "CreatedDate" ] !== undefined ) { contents . CreatedDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "CreatedDate" ] ) ) ; } if ( output [ "UpdatedDate" ] !== undefined ) { contents . UpdatedDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "UpdatedDate" ] ) ) ; } return contents ; } ; const deserializeAws_queryDBProxyAlreadyExistsFault = ( output , context ) : DBProxyAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBProxyEndpoint = ( output , context ) : DBProxyEndpoint => { const contents = { DBProxyEndpointName : undefined , DBProxyEndpointArn : undefined , DBProxyName : undefined , Status : undefined , VpcId : undefined , VpcSecurityGroupIds : undefined , VpcSubnetIds : undefined , Endpoint : undefined , CreatedDate : undefined , TargetRole : undefined , IsDefault : undefined , } ; if ( output [ "DBProxyEndpointName" ] !== undefined ) { contents . DBProxyEndpointName = __expectString ( output [ "DBProxyEndpointName" ] ) ; } if ( output [ "DBProxyEndpointArn" ] !== undefined ) { contents . DBProxyEndpointArn = __expectString ( output [ "DBProxyEndpointArn" ] ) ; } if ( output [ "DBProxyName" ] !== undefined ) { contents . DBProxyName = __expectString ( output [ "DBProxyName" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "VpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "VpcId" ] ) ; } if ( output . VpcSecurityGroupIds === "" ) { contents . VpcSecurityGroupIds = [ ] ; } if ( output [ "VpcSecurityGroupIds" ] !== undefined && output [ "VpcSecurityGroupIds" ] [ "member" ] !== undefined ) { contents . VpcSecurityGroupIds = deserializeAws_queryStringList ( __getArrayIfSingleItem ( output [ "VpcSecurityGroupIds" ] [ "member" ] ) , context ) ; } if ( output . VpcSubnetIds === "" ) { contents . VpcSubnetIds = [ ] ; } if ( output [ "VpcSubnetIds" ] !== undefined && output [ "VpcSubnetIds" ] [ "member" ] !== undefined ) { contents . VpcSubnetIds = deserializeAws_queryStringList ( __getArrayIfSingleItem ( output [ "VpcSubnetIds" ] [ "member" ] ) , context ) ; } if ( output [ "Endpoint" ] !== undefined ) { contents . Endpoint = __expectString ( output [ "Endpoint" ] ) ; } if ( output [ "CreatedDate" ] !== undefined ) { contents . CreatedDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "CreatedDate" ] ) ) ; } if ( output [ "TargetRole" ] !== undefined ) { contents . TargetRole = __expectString ( output [ "TargetRole" ] ) ; } if ( output [ "IsDefault" ] !== undefined ) { contents . IsDefault = __parseBoolean ( output [ "IsDefault" ] ) ; } return contents ; } ; const deserializeAws_queryDBProxyEndpointAlreadyExistsFault = ( output , context ) : DBProxyEndpointAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBProxyEndpointList = ( output , context ) : DBProxyEndpoint [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBProxyEndpoint ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBProxyEndpointNotFoundFault = ( output , context ) : DBProxyEndpointNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBProxyEndpointQuotaExceededFault = ( output , context ) : DBProxyEndpointQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBProxyList = ( output , context ) : DBProxy [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBProxy ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBProxyNotFoundFault = ( output , context ) : DBProxyNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBProxyQuotaExceededFault = ( output , context ) : DBProxyQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBProxyTarget = ( output , context ) : DBProxyTarget => { const contents = { TargetArn : undefined , Endpoint : undefined , TrackedClusterId : undefined , RdsResourceId : undefined , Port : undefined , Type : undefined , Role : undefined , TargetHealth : undefined , } ; if ( output [ "TargetArn" ] !== undefined ) { contents . TargetArn = __expectString ( output [ "TargetArn" ] ) ; } if ( output [ "Endpoint" ] !== undefined ) { contents . Endpoint = __expectString ( output [ "Endpoint" ] ) ; } if ( output [ "TrackedClusterId" ] !== undefined ) { contents . TrackedClusterId = __expectString ( output [ "TrackedClusterId" ] ) ; } if ( output [ "RdsResourceId" ] !== undefined ) { contents . RdsResourceId = __expectString ( output [ "RdsResourceId" ] ) ; } if ( output [ "Port" ] !== undefined ) { contents . Port = __strictParseInt32 ( output [ "Port" ] ) as number ; } if ( output [ "Type" ] !== undefined ) { contents . Type = __expectString ( output [ "Type" ] ) ; } if ( output [ "Role" ] !== undefined ) { contents . Role = __expectString ( output [ "Role" ] ) ; } if ( output [ "TargetHealth" ] !== undefined ) { contents . TargetHealth = deserializeAws_queryTargetHealth ( output [ "TargetHealth" ] , context ) ; } return contents ; } ; const deserializeAws_queryDBProxyTargetAlreadyRegisteredFault = ( output , context ) : DBProxyTargetAlreadyRegisteredFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBProxyTargetGroup = ( output , context ) : DBProxyTargetGroup => { const contents = { DBProxyName : undefined , TargetGroupName : undefined , TargetGroupArn : undefined , IsDefault : undefined , Status : undefined , ConnectionPoolConfig : undefined , CreatedDate : undefined , UpdatedDate : undefined , } ; if ( output [ "DBProxyName" ] !== undefined ) { contents . DBProxyName = __expectString ( output [ "DBProxyName" ] ) ; } if ( output [ "TargetGroupName" ] !== undefined ) { contents . TargetGroupName = __expectString ( output [ "TargetGroupName" ] ) ; } if ( output [ "TargetGroupArn" ] !== undefined ) { contents . TargetGroupArn = __expectString ( output [ "TargetGroupArn" ] ) ; } if ( output [ "IsDefault" ] !== undefined ) { contents . IsDefault = __parseBoolean ( output [ "IsDefault" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "ConnectionPoolConfig" ] !== undefined ) { contents . ConnectionPoolConfig = deserializeAws_queryConnectionPoolConfigurationInfo ( output [ "ConnectionPoolConfig" ] , context ) ; } if ( output [ "CreatedDate" ] !== undefined ) { contents . CreatedDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "CreatedDate" ] ) ) ; } if ( output [ "UpdatedDate" ] !== undefined ) { contents . UpdatedDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "UpdatedDate" ] ) ) ; } return contents ; } ; const deserializeAws_queryDBProxyTargetGroupNotFoundFault = ( output , context ) : DBProxyTargetGroupNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBProxyTargetNotFoundFault = ( output , context ) : DBProxyTargetNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBSecurityGroup = ( output , context ) : DBSecurityGroup => { const contents = { OwnerId : undefined , DBSecurityGroupName : undefined , DBSecurityGroupDescription : undefined , VpcId : undefined , EC2SecurityGroups : undefined , IPRanges : undefined , DBSecurityGroupArn : undefined , } ; if ( output [ "OwnerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "OwnerId" ] ) ; } if ( output [ "DBSecurityGroupName" ] !== undefined ) { contents . DBSecurityGroupName = __expectString ( output [ "DBSecurityGroupName" ] ) ; } if ( output [ "DBSecurityGroupDescription" ] !== undefined ) { contents . DBSecurityGroupDescription = __expectString ( output [ "DBSecurityGroupDescription" ] ) ; } if ( output [ "VpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "VpcId" ] ) ; } if ( output . EC2SecurityGroups === "" ) { contents . EC2SecurityGroups = [ ] ; } if ( output [ "EC2SecurityGroups" ] !== undefined && output [ "EC2SecurityGroups" ] [ "EC2SecurityGroup" ] !== undefined ) { contents . EC2SecurityGroups = deserializeAws_queryEC2SecurityGroupList ( __getArrayIfSingleItem ( output [ "EC2SecurityGroups" ] [ "EC2SecurityGroup" ] ) , context ) ; } if ( output . IPRanges === "" ) { contents . IPRanges = [ ] ; } if ( output [ "IPRanges" ] !== undefined && output [ "IPRanges" ] [ "IPRange" ] !== undefined ) { contents . IPRanges = deserializeAws_queryIPRangeList ( __getArrayIfSingleItem ( output [ "IPRanges" ] [ "IPRange" ] ) , context ) ; } if ( output [ "DBSecurityGroupArn" ] !== undefined ) { contents . DBSecurityGroupArn = __expectString ( output [ "DBSecurityGroupArn" ] ) ; } return contents ; } ; const deserializeAws_queryDBSecurityGroupAlreadyExistsFault = ( output , context ) : DBSecurityGroupAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBSecurityGroupMembership = ( output , context ) : DBSecurityGroupMembership => { const contents = { DBSecurityGroupName : undefined , Status : undefined , } ; if ( output [ "DBSecurityGroupName" ] !== undefined ) { contents . DBSecurityGroupName = __expectString ( output [ "DBSecurityGroupName" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } return contents ; } ; const deserializeAws_queryDBSecurityGroupMembershipList = ( output , context ) : DBSecurityGroupMembership [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBSecurityGroupMembership ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBSecurityGroupMessage = ( output , context ) : DBSecurityGroupMessage => { const contents = { Marker : undefined , DBSecurityGroups : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . DBSecurityGroups === "" ) { contents . DBSecurityGroups = [ ] ; } if ( output [ "DBSecurityGroups" ] !== undefined && output [ "DBSecurityGroups" ] [ "DBSecurityGroup" ] !== undefined ) { contents . DBSecurityGroups = deserializeAws_queryDBSecurityGroups ( __getArrayIfSingleItem ( output [ "DBSecurityGroups" ] [ "DBSecurityGroup" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBSecurityGroupNotFoundFault = ( output , context ) : DBSecurityGroupNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBSecurityGroupNotSupportedFault = ( output , context ) : DBSecurityGroupNotSupportedFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBSecurityGroupQuotaExceededFault = ( output , context ) : DBSecurityGroupQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBSecurityGroups = ( output , context ) : DBSecurityGroup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBSecurityGroup ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBSnapshot = ( output , context ) : DBSnapshot => { const contents = { DBSnapshotIdentifier : undefined , DBInstanceIdentifier : undefined , SnapshotCreateTime : undefined , Engine : undefined , AllocatedStorage : undefined , Status : undefined , Port : undefined , AvailabilityZone : undefined , VpcId : undefined , InstanceCreateTime : undefined , MasterUsername : undefined , EngineVersion : undefined , LicenseModel : undefined , SnapshotType : undefined , Iops : undefined , OptionGroupName : undefined , PercentProgress : undefined , SourceRegion : undefined , SourceDBSnapshotIdentifier : undefined , StorageType : undefined , TdeCredentialArn : undefined , Encrypted : undefined , KmsKeyId : undefined , DBSnapshotArn : undefined , Timezone : undefined , IAMDatabaseAuthenticationEnabled : undefined , ProcessorFeatures : undefined , DbiResourceId : undefined , TagList : undefined , OriginalSnapshotCreateTime : undefined , SnapshotTarget : undefined , } ; if ( output [ "DBSnapshotIdentifier" ] !== undefined ) { contents . DBSnapshotIdentifier = __expectString ( output [ "DBSnapshotIdentifier" ] ) ; } if ( output [ "DBInstanceIdentifier" ] !== undefined ) { contents . DBInstanceIdentifier = __expectString ( output [ "DBInstanceIdentifier" ] ) ; } if ( output [ "SnapshotCreateTime" ] !== undefined ) { contents . SnapshotCreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "SnapshotCreateTime" ] ) ) ; } if ( output [ "Engine" ] !== undefined ) { contents . Engine = __expectString ( output [ "Engine" ] ) ; } if ( output [ "AllocatedStorage" ] !== undefined ) { contents . AllocatedStorage = __strictParseInt32 ( output [ "AllocatedStorage" ] ) as number ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "Port" ] !== undefined ) { contents . Port = __strictParseInt32 ( output [ "Port" ] ) as number ; } if ( output [ "AvailabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "AvailabilityZone" ] ) ; } if ( output [ "VpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "VpcId" ] ) ; } if ( output [ "InstanceCreateTime" ] !== undefined ) { contents . InstanceCreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "InstanceCreateTime" ] ) ) ; } if ( output [ "MasterUsername" ] !== undefined ) { contents . MasterUsername = __expectString ( output [ "MasterUsername" ] ) ; } if ( output [ "EngineVersion" ] !== undefined ) { contents . EngineVersion = __expectString ( output [ "EngineVersion" ] ) ; } if ( output [ "LicenseModel" ] !== undefined ) { contents . LicenseModel = __expectString ( output [ "LicenseModel" ] ) ; } if ( output [ "SnapshotType" ] !== undefined ) { contents . SnapshotType = __expectString ( output [ "SnapshotType" ] ) ; } if ( output [ "Iops" ] !== undefined ) { contents . Iops = __strictParseInt32 ( output [ "Iops" ] ) as number ; } if ( output [ "OptionGroupName" ] !== undefined ) { contents . OptionGroupName = __expectString ( output [ "OptionGroupName" ] ) ; } if ( output [ "PercentProgress" ] !== undefined ) { contents . PercentProgress = __strictParseInt32 ( output [ "PercentProgress" ] ) as number ; } if ( output [ "SourceRegion" ] !== undefined ) { contents . SourceRegion = __expectString ( output [ "SourceRegion" ] ) ; } if ( output [ "SourceDBSnapshotIdentifier" ] !== undefined ) { contents . SourceDBSnapshotIdentifier = __expectString ( output [ "SourceDBSnapshotIdentifier" ] ) ; } if ( output [ "StorageType" ] !== undefined ) { contents . StorageType = __expectString ( output [ "StorageType" ] ) ; } if ( output [ "TdeCredentialArn" ] !== undefined ) { contents . TdeCredentialArn = __expectString ( output [ "TdeCredentialArn" ] ) ; } if ( output [ "Encrypted" ] !== undefined ) { contents . Encrypted = __parseBoolean ( output [ "Encrypted" ] ) ; } if ( output [ "KmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "KmsKeyId" ] ) ; } if ( output [ "DBSnapshotArn" ] !== undefined ) { contents . DBSnapshotArn = __expectString ( output [ "DBSnapshotArn" ] ) ; } if ( output [ "Timezone" ] !== undefined ) { contents . Timezone = __expectString ( output [ "Timezone" ] ) ; } if ( output [ "IAMDatabaseAuthenticationEnabled" ] !== undefined ) { contents . IAMDatabaseAuthenticationEnabled = __parseBoolean ( output [ "IAMDatabaseAuthenticationEnabled" ] ) ; } if ( output . ProcessorFeatures === "" ) { contents . ProcessorFeatures = [ ] ; } if ( output [ "ProcessorFeatures" ] !== undefined && output [ "ProcessorFeatures" ] [ "ProcessorFeature" ] !== undefined ) { contents . ProcessorFeatures = deserializeAws_queryProcessorFeatureList ( __getArrayIfSingleItem ( output [ "ProcessorFeatures" ] [ "ProcessorFeature" ] ) , context ) ; } if ( output [ "DbiResourceId" ] !== undefined ) { contents . DbiResourceId = __expectString ( output [ "DbiResourceId" ] ) ; } if ( output . TagList === "" ) { contents . TagList = [ ] ; } if ( output [ "TagList" ] !== undefined && output [ "TagList" ] [ "Tag" ] !== undefined ) { contents . TagList = deserializeAws_queryTagList ( __getArrayIfSingleItem ( output [ "TagList" ] [ "Tag" ] ) , context ) ; } if ( output [ "OriginalSnapshotCreateTime" ] !== undefined ) { contents . OriginalSnapshotCreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "OriginalSnapshotCreateTime" ] ) ) ; } if ( output [ "SnapshotTarget" ] !== undefined ) { contents . SnapshotTarget = __expectString ( output [ "SnapshotTarget" ] ) ; } return contents ; } ; const deserializeAws_queryDBSnapshotAlreadyExistsFault = ( output , context ) : DBSnapshotAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBSnapshotAttribute = ( output , context ) : DBSnapshotAttribute => { const contents = { AttributeName : undefined , AttributeValues : undefined , } ; if ( output [ "AttributeName" ] !== undefined ) { contents . AttributeName = __expectString ( output [ "AttributeName" ] ) ; } if ( output . AttributeValues === "" ) { contents . AttributeValues = [ ] ; } if ( output [ "AttributeValues" ] !== undefined && output [ "AttributeValues" ] [ "AttributeValue" ] !== undefined ) { contents . AttributeValues = deserializeAws_queryAttributeValueList ( __getArrayIfSingleItem ( output [ "AttributeValues" ] [ "AttributeValue" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBSnapshotAttributeList = ( output , context ) : DBSnapshotAttribute [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBSnapshotAttribute ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBSnapshotAttributesResult = ( output , context ) : DBSnapshotAttributesResult => { const contents = { DBSnapshotIdentifier : undefined , DBSnapshotAttributes : undefined , } ; if ( output [ "DBSnapshotIdentifier" ] !== undefined ) { contents . DBSnapshotIdentifier = __expectString ( output [ "DBSnapshotIdentifier" ] ) ; } if ( output . DBSnapshotAttributes === "" ) { contents . DBSnapshotAttributes = [ ] ; } if ( output [ "DBSnapshotAttributes" ] !== undefined && output [ "DBSnapshotAttributes" ] [ "DBSnapshotAttribute" ] !== undefined ) { contents . DBSnapshotAttributes = deserializeAws_queryDBSnapshotAttributeList ( __getArrayIfSingleItem ( output [ "DBSnapshotAttributes" ] [ "DBSnapshotAttribute" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBSnapshotList = ( output , context ) : DBSnapshot [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBSnapshot ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBSnapshotMessage = ( output , context ) : DBSnapshotMessage => { const contents = { Marker : undefined , DBSnapshots : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . DBSnapshots === "" ) { contents . DBSnapshots = [ ] ; } if ( output [ "DBSnapshots" ] !== undefined && output [ "DBSnapshots" ] [ "DBSnapshot" ] !== undefined ) { contents . DBSnapshots = deserializeAws_queryDBSnapshotList ( __getArrayIfSingleItem ( output [ "DBSnapshots" ] [ "DBSnapshot" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBSnapshotNotFoundFault = ( output , context ) : DBSnapshotNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBSubnetGroup = ( output , context ) : DBSubnetGroup => { const contents = { DBSubnetGroupName : undefined , DBSubnetGroupDescription : undefined , VpcId : undefined , SubnetGroupStatus : undefined , Subnets : undefined , DBSubnetGroupArn : undefined , } ; if ( output [ "DBSubnetGroupName" ] !== undefined ) { contents . DBSubnetGroupName = __expectString ( output [ "DBSubnetGroupName" ] ) ; } if ( output [ "DBSubnetGroupDescription" ] !== undefined ) { contents . DBSubnetGroupDescription = __expectString ( output [ "DBSubnetGroupDescription" ] ) ; } if ( output [ "VpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "VpcId" ] ) ; } if ( output [ "SubnetGroupStatus" ] !== undefined ) { contents . SubnetGroupStatus = __expectString ( output [ "SubnetGroupStatus" ] ) ; } if ( output . Subnets === "" ) { contents . Subnets = [ ] ; } if ( output [ "Subnets" ] !== undefined && output [ "Subnets" ] [ "Subnet" ] !== undefined ) { contents . Subnets = deserializeAws_querySubnetList ( __getArrayIfSingleItem ( output [ "Subnets" ] [ "Subnet" ] ) , context ) ; } if ( output [ "DBSubnetGroupArn" ] !== undefined ) { contents . DBSubnetGroupArn = __expectString ( output [ "DBSubnetGroupArn" ] ) ; } return contents ; } ; const deserializeAws_queryDBSubnetGroupAlreadyExistsFault = ( output , context ) : DBSubnetGroupAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBSubnetGroupDoesNotCoverEnoughAZs = ( output , context ) : DBSubnetGroupDoesNotCoverEnoughAZs => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBSubnetGroupMessage = ( output , context ) : DBSubnetGroupMessage => { const contents = { Marker : undefined , DBSubnetGroups : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . DBSubnetGroups === "" ) { contents . DBSubnetGroups = [ ] ; } if ( output [ "DBSubnetGroups" ] !== undefined && output [ "DBSubnetGroups" ] [ "DBSubnetGroup" ] !== undefined ) { contents . DBSubnetGroups = deserializeAws_queryDBSubnetGroups ( __getArrayIfSingleItem ( output [ "DBSubnetGroups" ] [ "DBSubnetGroup" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryDBSubnetGroupNotAllowedFault = ( output , context ) : DBSubnetGroupNotAllowedFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBSubnetGroupNotFoundFault = ( output , context ) : DBSubnetGroupNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBSubnetGroupQuotaExceededFault = ( output , context ) : DBSubnetGroupQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBSubnetGroups = ( output , context ) : DBSubnetGroup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBSubnetGroup ( entry , context ) ; } ) ; } ; const deserializeAws_queryDBSubnetQuotaExceededFault = ( output , context ) : DBSubnetQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDBUpgradeDependencyFailureFault = ( output , context ) : DBUpgradeDependencyFailureFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDeleteCustomAvailabilityZoneResult = ( output , context ) : DeleteCustomAvailabilityZoneResult => { const contents = { CustomAvailabilityZone : undefined , } ; if ( output [ "CustomAvailabilityZone" ] !== undefined ) { contents . CustomAvailabilityZone = deserializeAws_queryCustomAvailabilityZone ( output [ "CustomAvailabilityZone" ] , context ) ; } return contents ; } ; const deserializeAws_queryDeleteDBClusterResult = ( output , context ) : DeleteDBClusterResult => { const contents = { DBCluster : undefined , } ; if ( output [ "DBCluster" ] !== undefined ) { contents . DBCluster = deserializeAws_queryDBCluster ( output [ "DBCluster" ] , context ) ; } return contents ; } ; const deserializeAws_queryDeleteDBClusterSnapshotResult = ( output , context ) : DeleteDBClusterSnapshotResult => { const contents = { DBClusterSnapshot : undefined , } ; if ( output [ "DBClusterSnapshot" ] !== undefined ) { contents . DBClusterSnapshot = deserializeAws_queryDBClusterSnapshot ( output [ "DBClusterSnapshot" ] , context ) ; } return contents ; } ; const deserializeAws_queryDeleteDBInstanceAutomatedBackupResult = ( output , context ) : DeleteDBInstanceAutomatedBackupResult => { const contents = { DBInstanceAutomatedBackup : undefined , } ; if ( output [ "DBInstanceAutomatedBackup" ] !== undefined ) { contents . DBInstanceAutomatedBackup = deserializeAws_queryDBInstanceAutomatedBackup ( output [ "DBInstanceAutomatedBackup" ] , context ) ; } return contents ; } ; const deserializeAws_queryDeleteDBInstanceResult = ( output , context ) : DeleteDBInstanceResult => { const contents = { DBInstance : undefined , } ; if ( output [ "DBInstance" ] !== undefined ) { contents . DBInstance = deserializeAws_queryDBInstance ( output [ "DBInstance" ] , context ) ; } return contents ; } ; const deserializeAws_queryDeleteDBProxyEndpointResponse = ( output , context ) : DeleteDBProxyEndpointResponse => { const contents = { DBProxyEndpoint : undefined , } ; if ( output [ "DBProxyEndpoint" ] !== undefined ) { contents . DBProxyEndpoint = deserializeAws_queryDBProxyEndpoint ( output [ "DBProxyEndpoint" ] , context ) ; } return contents ; } ; const deserializeAws_queryDeleteDBProxyResponse = ( output , context ) : DeleteDBProxyResponse => { const contents = { DBProxy : undefined , } ; if ( output [ "DBProxy" ] !== undefined ) { contents . DBProxy = deserializeAws_queryDBProxy ( output [ "DBProxy" ] , context ) ; } return contents ; } ; const deserializeAws_queryDeleteDBSnapshotResult = ( output , context ) : DeleteDBSnapshotResult => { const contents = { DBSnapshot : undefined , } ; if ( output [ "DBSnapshot" ] !== undefined ) { contents . DBSnapshot = deserializeAws_queryDBSnapshot ( output [ "DBSnapshot" ] , context ) ; } return contents ; } ; const deserializeAws_queryDeleteEventSubscriptionResult = ( output , context ) : DeleteEventSubscriptionResult => { const contents = { EventSubscription : undefined , } ; if ( output [ "EventSubscription" ] !== undefined ) { contents . EventSubscription = deserializeAws_queryEventSubscription ( output [ "EventSubscription" ] , context ) ; } return contents ; } ; const deserializeAws_queryDeleteGlobalClusterResult = ( output , context ) : DeleteGlobalClusterResult => { const contents = { GlobalCluster : undefined , } ; if ( output [ "GlobalCluster" ] !== undefined ) { contents . GlobalCluster = deserializeAws_queryGlobalCluster ( output [ "GlobalCluster" ] , context ) ; } return contents ; } ; const deserializeAws_queryDeregisterDBProxyTargetsResponse = ( output , context ) : DeregisterDBProxyTargetsResponse => { const contents = { } ; return contents ; } ; const deserializeAws_queryDescribeDBClusterSnapshotAttributesResult = ( output , context ) : DescribeDBClusterSnapshotAttributesResult => { const contents = { DBClusterSnapshotAttributesResult : undefined , } ; if ( output [ "DBClusterSnapshotAttributesResult" ] !== undefined ) { contents . DBClusterSnapshotAttributesResult = deserializeAws_queryDBClusterSnapshotAttributesResult ( output [ "DBClusterSnapshotAttributesResult" ] , context ) ; } return contents ; } ; const deserializeAws_queryDescribeDBLogFilesDetails = ( output , context ) : DescribeDBLogFilesDetails => { const contents = { LogFileName : undefined , LastWritten : undefined , Size : undefined , } ; if ( output [ "LogFileName" ] !== undefined ) { contents . LogFileName = __expectString ( output [ "LogFileName" ] ) ; } if ( output [ "LastWritten" ] !== undefined ) { contents . LastWritten = __strictParseLong ( output [ "LastWritten" ] ) as number ; } if ( output [ "Size" ] !== undefined ) { contents . Size = __strictParseLong ( output [ "Size" ] ) as number ; } return contents ; } ; const deserializeAws_queryDescribeDBLogFilesList = ( output , context ) : DescribeDBLogFilesDetails [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDescribeDBLogFilesDetails ( entry , context ) ; } ) ; } ; const deserializeAws_queryDescribeDBLogFilesResponse = ( output , context ) : DescribeDBLogFilesResponse => { const contents = { DescribeDBLogFiles : undefined , Marker : undefined , } ; if ( output . DescribeDBLogFiles === "" ) { contents . DescribeDBLogFiles = [ ] ; } if ( output [ "DescribeDBLogFiles" ] !== undefined && output [ "DescribeDBLogFiles" ] [ "DescribeDBLogFilesDetails" ] !== undefined ) { contents . DescribeDBLogFiles = deserializeAws_queryDescribeDBLogFilesList ( __getArrayIfSingleItem ( output [ "DescribeDBLogFiles" ] [ "DescribeDBLogFilesDetails" ] ) , context ) ; } if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } return contents ; } ; const deserializeAws_queryDescribeDBProxiesResponse = ( output , context ) : DescribeDBProxiesResponse => { const contents = { DBProxies : undefined , Marker : undefined , } ; if ( output . DBProxies === "" ) { contents . DBProxies = [ ] ; } if ( output [ "DBProxies" ] !== undefined && output [ "DBProxies" ] [ "member" ] !== undefined ) { contents . DBProxies = deserializeAws_queryDBProxyList ( __getArrayIfSingleItem ( output [ "DBProxies" ] [ "member" ] ) , context ) ; } if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } return contents ; } ; const deserializeAws_queryDescribeDBProxyEndpointsResponse = ( output , context ) : DescribeDBProxyEndpointsResponse => { const contents = { DBProxyEndpoints : undefined , Marker : undefined , } ; if ( output . DBProxyEndpoints === "" ) { contents . DBProxyEndpoints = [ ] ; } if ( output [ "DBProxyEndpoints" ] !== undefined && output [ "DBProxyEndpoints" ] [ "member" ] !== undefined ) { contents . DBProxyEndpoints = deserializeAws_queryDBProxyEndpointList ( __getArrayIfSingleItem ( output [ "DBProxyEndpoints" ] [ "member" ] ) , context ) ; } if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } return contents ; } ; const deserializeAws_queryDescribeDBProxyTargetGroupsResponse = ( output , context ) : DescribeDBProxyTargetGroupsResponse => { const contents = { TargetGroups : undefined , Marker : undefined , } ; if ( output . TargetGroups === "" ) { contents . TargetGroups = [ ] ; } if ( output [ "TargetGroups" ] !== undefined && output [ "TargetGroups" ] [ "member" ] !== undefined ) { contents . TargetGroups = deserializeAws_queryTargetGroupList ( __getArrayIfSingleItem ( output [ "TargetGroups" ] [ "member" ] ) , context ) ; } if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } return contents ; } ; const deserializeAws_queryDescribeDBProxyTargetsResponse = ( output , context ) : DescribeDBProxyTargetsResponse => { const contents = { Targets : undefined , Marker : undefined , } ; if ( output . Targets === "" ) { contents . Targets = [ ] ; } if ( output [ "Targets" ] !== undefined && output [ "Targets" ] [ "member" ] !== undefined ) { contents . Targets = deserializeAws_queryTargetList ( __getArrayIfSingleItem ( output [ "Targets" ] [ "member" ] ) , context ) ; } if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } return contents ; } ; const deserializeAws_queryDescribeDBSnapshotAttributesResult = ( output , context ) : DescribeDBSnapshotAttributesResult => { const contents = { DBSnapshotAttributesResult : undefined , } ; if ( output [ "DBSnapshotAttributesResult" ] !== undefined ) { contents . DBSnapshotAttributesResult = deserializeAws_queryDBSnapshotAttributesResult ( output [ "DBSnapshotAttributesResult" ] , context ) ; } return contents ; } ; const deserializeAws_queryDescribeEngineDefaultClusterParametersResult = ( output , context ) : DescribeEngineDefaultClusterParametersResult => { const contents = { EngineDefaults : undefined , } ; if ( output [ "EngineDefaults" ] !== undefined ) { contents . EngineDefaults = deserializeAws_queryEngineDefaults ( output [ "EngineDefaults" ] , context ) ; } return contents ; } ; const deserializeAws_queryDescribeEngineDefaultParametersResult = ( output , context ) : DescribeEngineDefaultParametersResult => { const contents = { EngineDefaults : undefined , } ; if ( output [ "EngineDefaults" ] !== undefined ) { contents . EngineDefaults = deserializeAws_queryEngineDefaults ( output [ "EngineDefaults" ] , context ) ; } return contents ; } ; const deserializeAws_queryDescribeValidDBInstanceModificationsResult = ( output , context ) : DescribeValidDBInstanceModificationsResult => { const contents = { ValidDBInstanceModificationsMessage : undefined , } ; if ( output [ "ValidDBInstanceModificationsMessage" ] !== undefined ) { contents . ValidDBInstanceModificationsMessage = deserializeAws_queryValidDBInstanceModificationsMessage ( output [ "ValidDBInstanceModificationsMessage" ] , context ) ; } return contents ; } ; const deserializeAws_queryDomainMembership = ( output , context ) : DomainMembership => { const contents = { Domain : undefined , Status : undefined , FQDN : undefined , IAMRoleName : undefined , } ; if ( output [ "Domain" ] !== undefined ) { contents . Domain = __expectString ( output [ "Domain" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "FQDN" ] !== undefined ) { contents . FQDN = __expectString ( output [ "FQDN" ] ) ; } if ( output [ "IAMRoleName" ] !== undefined ) { contents . IAMRoleName = __expectString ( output [ "IAMRoleName" ] ) ; } return contents ; } ; const deserializeAws_queryDomainMembershipList = ( output , context ) : DomainMembership [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDomainMembership ( entry , context ) ; } ) ; } ; const deserializeAws_queryDomainNotFoundFault = ( output , context ) : DomainNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryDoubleRange = ( output , context ) : DoubleRange => { const contents = { From : undefined , To : undefined , } ; if ( output [ "From" ] !== undefined ) { contents . From = __strictParseFloat ( output [ "From" ] ) as number ; } if ( output [ "To" ] !== undefined ) { contents . To = __strictParseFloat ( output [ "To" ] ) as number ; } return contents ; } ; const deserializeAws_queryDoubleRangeList = ( output , context ) : DoubleRange [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDoubleRange ( entry , context ) ; } ) ; } ; const deserializeAws_queryDownloadDBLogFilePortionDetails = ( output , context ) : DownloadDBLogFilePortionDetails => { const contents = { LogFileData : undefined , Marker : undefined , AdditionalDataPending : undefined , } ; if ( output [ "LogFileData" ] !== undefined ) { contents . LogFileData = __expectString ( output [ "LogFileData" ] ) ; } if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output [ "AdditionalDataPending" ] !== undefined ) { contents . AdditionalDataPending = __parseBoolean ( output [ "AdditionalDataPending" ] ) ; } return contents ; } ; const deserializeAws_queryEC2SecurityGroup = ( output , context ) : EC2SecurityGroup => { const contents = { Status : undefined , EC2SecurityGroupName : undefined , EC2SecurityGroupId : undefined , EC2SecurityGroupOwnerId : undefined , } ; if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "EC2SecurityGroupName" ] !== undefined ) { contents . EC2SecurityGroupName = __expectString ( output [ "EC2SecurityGroupName" ] ) ; } if ( output [ "EC2SecurityGroupId" ] !== undefined ) { contents . EC2SecurityGroupId = __expectString ( output [ "EC2SecurityGroupId" ] ) ; } if ( output [ "EC2SecurityGroupOwnerId" ] !== undefined ) { contents . EC2SecurityGroupOwnerId = __expectString ( output [ "EC2SecurityGroupOwnerId" ] ) ; } return contents ; } ; const deserializeAws_queryEC2SecurityGroupList = ( output , context ) : EC2SecurityGroup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryEC2SecurityGroup ( entry , context ) ; } ) ; } ; const deserializeAws_queryEndpoint = ( output , context ) : Endpoint => { const contents = { Address : undefined , Port : undefined , HostedZoneId : undefined , } ; if ( output [ "Address" ] !== undefined ) { contents . Address = __expectString ( output [ "Address" ] ) ; } if ( output [ "Port" ] !== undefined ) { contents . Port = __strictParseInt32 ( output [ "Port" ] ) as number ; } if ( output [ "HostedZoneId" ] !== undefined ) { contents . HostedZoneId = __expectString ( output [ "HostedZoneId" ] ) ; } return contents ; } ; const deserializeAws_queryEngineDefaults = ( output , context ) : EngineDefaults => { const contents = { DBParameterGroupFamily : undefined , Marker : undefined , Parameters : undefined , } ; if ( output [ "DBParameterGroupFamily" ] !== undefined ) { contents . DBParameterGroupFamily = __expectString ( output [ "DBParameterGroupFamily" ] ) ; } if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . Parameters === "" ) { contents . Parameters = [ ] ; } if ( output [ "Parameters" ] !== undefined && output [ "Parameters" ] [ "Parameter" ] !== undefined ) { contents . Parameters = deserializeAws_queryParametersList ( __getArrayIfSingleItem ( output [ "Parameters" ] [ "Parameter" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryEngineModeList = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_queryEvent = ( output , context ) : Event => { const contents = { SourceIdentifier : undefined , SourceType : undefined , Message : undefined , EventCategories : undefined , Date : undefined , SourceArn : undefined , } ; if ( output [ "SourceIdentifier" ] !== undefined ) { contents . SourceIdentifier = __expectString ( output [ "SourceIdentifier" ] ) ; } if ( output [ "SourceType" ] !== undefined ) { contents . SourceType = __expectString ( output [ "SourceType" ] ) ; } if ( output [ "Message" ] !== undefined ) { contents . Message = __expectString ( output [ "Message" ] ) ; } if ( output . EventCategories === "" ) { contents . EventCategories = [ ] ; } if ( output [ "EventCategories" ] !== undefined && output [ "EventCategories" ] [ "EventCategory" ] !== undefined ) { contents . EventCategories = deserializeAws_queryEventCategoriesList ( __getArrayIfSingleItem ( output [ "EventCategories" ] [ "EventCategory" ] ) , context ) ; } if ( output [ "Date" ] !== undefined ) { contents . Date = __expectNonNull ( __parseRfc3339DateTime ( output [ "Date" ] ) ) ; } if ( output [ "SourceArn" ] !== undefined ) { contents . SourceArn = __expectString ( output [ "SourceArn" ] ) ; } return contents ; } ; const deserializeAws_queryEventCategoriesList = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_queryEventCategoriesMap = ( output , context ) : EventCategoriesMap => { const contents = { SourceType : undefined , EventCategories : undefined , } ; if ( output [ "SourceType" ] !== undefined ) { contents . SourceType = __expectString ( output [ "SourceType" ] ) ; } if ( output . EventCategories === "" ) { contents . EventCategories = [ ] ; } if ( output [ "EventCategories" ] !== undefined && output [ "EventCategories" ] [ "EventCategory" ] !== undefined ) { contents . EventCategories = deserializeAws_queryEventCategoriesList ( __getArrayIfSingleItem ( output [ "EventCategories" ] [ "EventCategory" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryEventCategoriesMapList = ( output , context ) : EventCategoriesMap [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryEventCategoriesMap ( entry , context ) ; } ) ; } ; const deserializeAws_queryEventCategoriesMessage = ( output , context ) : EventCategoriesMessage => { const contents = { EventCategoriesMapList : undefined , } ; if ( output . EventCategoriesMapList === "" ) { contents . EventCategoriesMapList = [ ] ; } if ( output [ "EventCategoriesMapList" ] !== undefined && output [ "EventCategoriesMapList" ] [ "EventCategoriesMap" ] !== undefined ) { contents . EventCategoriesMapList = deserializeAws_queryEventCategoriesMapList ( __getArrayIfSingleItem ( output [ "EventCategoriesMapList" ] [ "EventCategoriesMap" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryEventList = ( output , context ) : Event [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryEvent ( entry , context ) ; } ) ; } ; const deserializeAws_queryEventsMessage = ( output , context ) : EventsMessage => { const contents = { Marker : undefined , Events : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . Events === "" ) { contents . Events = [ ] ; } if ( output [ "Events" ] !== undefined && output [ "Events" ] [ "Event" ] !== undefined ) { contents . Events = deserializeAws_queryEventList ( __getArrayIfSingleItem ( output [ "Events" ] [ "Event" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryEventSubscription = ( output , context ) : EventSubscription => { const contents = { CustomerAwsId : undefined , CustSubscriptionId : undefined , SnsTopicArn : undefined , Status : undefined , SubscriptionCreationTime : undefined , SourceType : undefined , SourceIdsList : undefined , EventCategoriesList : undefined , Enabled : undefined , EventSubscriptionArn : undefined , } ; if ( output [ "CustomerAwsId" ] !== undefined ) { contents . CustomerAwsId = __expectString ( output [ "CustomerAwsId" ] ) ; } if ( output [ "CustSubscriptionId" ] !== undefined ) { contents . CustSubscriptionId = __expectString ( output [ "CustSubscriptionId" ] ) ; } if ( output [ "SnsTopicArn" ] !== undefined ) { contents . SnsTopicArn = __expectString ( output [ "SnsTopicArn" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "SubscriptionCreationTime" ] !== undefined ) { contents . SubscriptionCreationTime = __expectString ( output [ "SubscriptionCreationTime" ] ) ; } if ( output [ "SourceType" ] !== undefined ) { contents . SourceType = __expectString ( output [ "SourceType" ] ) ; } if ( output . SourceIdsList === "" ) { contents . SourceIdsList = [ ] ; } if ( output [ "SourceIdsList" ] !== undefined && output [ "SourceIdsList" ] [ "SourceId" ] !== undefined ) { contents . SourceIdsList = deserializeAws_querySourceIdsList ( __getArrayIfSingleItem ( output [ "SourceIdsList" ] [ "SourceId" ] ) , context ) ; } if ( output . EventCategoriesList === "" ) { contents . EventCategoriesList = [ ] ; } if ( output [ "EventCategoriesList" ] !== undefined && output [ "EventCategoriesList" ] [ "EventCategory" ] !== undefined ) { contents . EventCategoriesList = deserializeAws_queryEventCategoriesList ( __getArrayIfSingleItem ( output [ "EventCategoriesList" ] [ "EventCategory" ] ) , context ) ; } if ( output [ "Enabled" ] !== undefined ) { contents . Enabled = __parseBoolean ( output [ "Enabled" ] ) ; } if ( output [ "EventSubscriptionArn" ] !== undefined ) { contents . EventSubscriptionArn = __expectString ( output [ "EventSubscriptionArn" ] ) ; } return contents ; } ; const deserializeAws_queryEventSubscriptionQuotaExceededFault = ( output , context ) : EventSubscriptionQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryEventSubscriptionsList = ( output , context ) : EventSubscription [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryEventSubscription ( entry , context ) ; } ) ; } ; const deserializeAws_queryEventSubscriptionsMessage = ( output , context ) : EventSubscriptionsMessage => { const contents = { Marker : undefined , EventSubscriptionsList : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . EventSubscriptionsList === "" ) { contents . EventSubscriptionsList = [ ] ; } if ( output [ "EventSubscriptionsList" ] !== undefined && output [ "EventSubscriptionsList" ] [ "EventSubscription" ] !== undefined ) { contents . EventSubscriptionsList = deserializeAws_queryEventSubscriptionsList ( __getArrayIfSingleItem ( output [ "EventSubscriptionsList" ] [ "EventSubscription" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryExportTask = ( output , context ) : ExportTask => { const contents = { ExportTaskIdentifier : undefined , SourceArn : undefined , ExportOnly : undefined , SnapshotTime : undefined , TaskStartTime : undefined , TaskEndTime : undefined , S3Bucket : undefined , S3Prefix : undefined , IamRoleArn : undefined , KmsKeyId : undefined , Status : undefined , PercentProgress : undefined , TotalExtractedDataInGB : undefined , FailureCause : undefined , WarningMessage : undefined , } ; if ( output [ "ExportTaskIdentifier" ] !== undefined ) { contents . ExportTaskIdentifier = __expectString ( output [ "ExportTaskIdentifier" ] ) ; } if ( output [ "SourceArn" ] !== undefined ) { contents . SourceArn = __expectString ( output [ "SourceArn" ] ) ; } if ( output . ExportOnly === "" ) { contents . ExportOnly = [ ] ; } if ( output [ "ExportOnly" ] !== undefined && output [ "ExportOnly" ] [ "member" ] !== undefined ) { contents . ExportOnly = deserializeAws_queryStringList ( __getArrayIfSingleItem ( output [ "ExportOnly" ] [ "member" ] ) , context ) ; } if ( output [ "SnapshotTime" ] !== undefined ) { contents . SnapshotTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "SnapshotTime" ] ) ) ; } if ( output [ "TaskStartTime" ] !== undefined ) { contents . TaskStartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "TaskStartTime" ] ) ) ; } if ( output [ "TaskEndTime" ] !== undefined ) { contents . TaskEndTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "TaskEndTime" ] ) ) ; } if ( output [ "S3Bucket" ] !== undefined ) { contents . S3Bucket = __expectString ( output [ "S3Bucket" ] ) ; } if ( output [ "S3Prefix" ] !== undefined ) { contents . S3Prefix = __expectString ( output [ "S3Prefix" ] ) ; } if ( output [ "IamRoleArn" ] !== undefined ) { contents . IamRoleArn = __expectString ( output [ "IamRoleArn" ] ) ; } if ( output [ "KmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "KmsKeyId" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "PercentProgress" ] !== undefined ) { contents . PercentProgress = __strictParseInt32 ( output [ "PercentProgress" ] ) as number ; } if ( output [ "TotalExtractedDataInGB" ] !== undefined ) { contents . TotalExtractedDataInGB = __strictParseInt32 ( output [ "TotalExtractedDataInGB" ] ) as number ; } if ( output [ "FailureCause" ] !== undefined ) { contents . FailureCause = __expectString ( output [ "FailureCause" ] ) ; } if ( output [ "WarningMessage" ] !== undefined ) { contents . WarningMessage = __expectString ( output [ "WarningMessage" ] ) ; } return contents ; } ; const deserializeAws_queryExportTaskAlreadyExistsFault = ( output , context ) : ExportTaskAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryExportTaskNotFoundFault = ( output , context ) : ExportTaskNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryExportTasksList = ( output , context ) : ExportTask [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryExportTask ( entry , context ) ; } ) ; } ; const deserializeAws_queryExportTasksMessage = ( output , context ) : ExportTasksMessage => { const contents = { Marker : undefined , ExportTasks : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . ExportTasks === "" ) { contents . ExportTasks = [ ] ; } if ( output [ "ExportTasks" ] !== undefined && output [ "ExportTasks" ] [ "ExportTask" ] !== undefined ) { contents . ExportTasks = deserializeAws_queryExportTasksList ( __getArrayIfSingleItem ( output [ "ExportTasks" ] [ "ExportTask" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryFailoverDBClusterResult = ( output , context ) : FailoverDBClusterResult => { const contents = { DBCluster : undefined , } ; if ( output [ "DBCluster" ] !== undefined ) { contents . DBCluster = deserializeAws_queryDBCluster ( output [ "DBCluster" ] , context ) ; } return contents ; } ; const deserializeAws_queryFailoverGlobalClusterResult = ( output , context ) : FailoverGlobalClusterResult => { const contents = { GlobalCluster : undefined , } ; if ( output [ "GlobalCluster" ] !== undefined ) { contents . GlobalCluster = deserializeAws_queryGlobalCluster ( output [ "GlobalCluster" ] , context ) ; } return contents ; } ; const deserializeAws_queryFailoverState = ( output , context ) : FailoverState => { const contents = { Status : undefined , FromDbClusterArn : undefined , ToDbClusterArn : undefined , } ; if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "FromDbClusterArn" ] !== undefined ) { contents . FromDbClusterArn = __expectString ( output [ "FromDbClusterArn" ] ) ; } if ( output [ "ToDbClusterArn" ] !== undefined ) { contents . ToDbClusterArn = __expectString ( output [ "ToDbClusterArn" ] ) ; } return contents ; } ; const deserializeAws_queryFeatureNameList = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_queryGlobalCluster = ( output , context ) : GlobalCluster => { const contents = { GlobalClusterIdentifier : undefined , GlobalClusterResourceId : undefined , GlobalClusterArn : undefined , Status : undefined , Engine : undefined , EngineVersion : undefined , DatabaseName : undefined , StorageEncrypted : undefined , DeletionProtection : undefined , GlobalClusterMembers : undefined , FailoverState : undefined , } ; if ( output [ "GlobalClusterIdentifier" ] !== undefined ) { contents . GlobalClusterIdentifier = __expectString ( output [ "GlobalClusterIdentifier" ] ) ; } if ( output [ "GlobalClusterResourceId" ] !== undefined ) { contents . GlobalClusterResourceId = __expectString ( output [ "GlobalClusterResourceId" ] ) ; } if ( output [ "GlobalClusterArn" ] !== undefined ) { contents . GlobalClusterArn = __expectString ( output [ "GlobalClusterArn" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "Engine" ] !== undefined ) { contents . Engine = __expectString ( output [ "Engine" ] ) ; } if ( output [ "EngineVersion" ] !== undefined ) { contents . EngineVersion = __expectString ( output [ "EngineVersion" ] ) ; } if ( output [ "DatabaseName" ] !== undefined ) { contents . DatabaseName = __expectString ( output [ "DatabaseName" ] ) ; } if ( output [ "StorageEncrypted" ] !== undefined ) { contents . StorageEncrypted = __parseBoolean ( output [ "StorageEncrypted" ] ) ; } if ( output [ "DeletionProtection" ] !== undefined ) { contents . DeletionProtection = __parseBoolean ( output [ "DeletionProtection" ] ) ; } if ( output . GlobalClusterMembers === "" ) { contents . GlobalClusterMembers = [ ] ; } if ( output [ "GlobalClusterMembers" ] !== undefined && output [ "GlobalClusterMembers" ] [ "GlobalClusterMember" ] !== undefined ) { contents . GlobalClusterMembers = deserializeAws_queryGlobalClusterMemberList ( __getArrayIfSingleItem ( output [ "GlobalClusterMembers" ] [ "GlobalClusterMember" ] ) , context ) ; } if ( output [ "FailoverState" ] !== undefined ) { contents . FailoverState = deserializeAws_queryFailoverState ( output [ "FailoverState" ] , context ) ; } return contents ; } ; const deserializeAws_queryGlobalClusterAlreadyExistsFault = ( output , context ) : GlobalClusterAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryGlobalClusterList = ( output , context ) : GlobalCluster [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryGlobalCluster ( entry , context ) ; } ) ; } ; const deserializeAws_queryGlobalClusterMember = ( output , context ) : GlobalClusterMember => { const contents = { DBClusterArn : undefined , Readers : undefined , IsWriter : undefined , GlobalWriteForwardingStatus : undefined , } ; if ( output [ "DBClusterArn" ] !== undefined ) { contents . DBClusterArn = __expectString ( output [ "DBClusterArn" ] ) ; } if ( output . Readers === "" ) { contents . Readers = [ ] ; } if ( output [ "Readers" ] !== undefined && output [ "Readers" ] [ "member" ] !== undefined ) { contents . Readers = deserializeAws_queryReadersArnList ( __getArrayIfSingleItem ( output [ "Readers" ] [ "member" ] ) , context ) ; } if ( output [ "IsWriter" ] !== undefined ) { contents . IsWriter = __parseBoolean ( output [ "IsWriter" ] ) ; } if ( output [ "GlobalWriteForwardingStatus" ] !== undefined ) { contents . GlobalWriteForwardingStatus = __expectString ( output [ "GlobalWriteForwardingStatus" ] ) ; } return contents ; } ; const deserializeAws_queryGlobalClusterMemberList = ( output , context ) : GlobalClusterMember [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryGlobalClusterMember ( entry , context ) ; } ) ; } ; const deserializeAws_queryGlobalClusterNotFoundFault = ( output , context ) : GlobalClusterNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryGlobalClusterQuotaExceededFault = ( output , context ) : GlobalClusterQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryGlobalClustersMessage = ( output , context ) : GlobalClustersMessage => { const contents = { Marker : undefined , GlobalClusters : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . GlobalClusters === "" ) { contents . GlobalClusters = [ ] ; } if ( output [ "GlobalClusters" ] !== undefined && output [ "GlobalClusters" ] [ "GlobalClusterMember" ] !== undefined ) { contents . GlobalClusters = deserializeAws_queryGlobalClusterList ( __getArrayIfSingleItem ( output [ "GlobalClusters" ] [ "GlobalClusterMember" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryIamRoleMissingPermissionsFault = ( output , context ) : IamRoleMissingPermissionsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryIamRoleNotFoundFault = ( output , context ) : IamRoleNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInstallationMedia = ( output , context ) : InstallationMedia => { const contents = { InstallationMediaId : undefined , CustomAvailabilityZoneId : undefined , Engine : undefined , EngineVersion : undefined , EngineInstallationMediaPath : undefined , OSInstallationMediaPath : undefined , Status : undefined , FailureCause : undefined , } ; if ( output [ "InstallationMediaId" ] !== undefined ) { contents . InstallationMediaId = __expectString ( output [ "InstallationMediaId" ] ) ; } if ( output [ "CustomAvailabilityZoneId" ] !== undefined ) { contents . CustomAvailabilityZoneId = __expectString ( output [ "CustomAvailabilityZoneId" ] ) ; } if ( output [ "Engine" ] !== undefined ) { contents . Engine = __expectString ( output [ "Engine" ] ) ; } if ( output [ "EngineVersion" ] !== undefined ) { contents . EngineVersion = __expectString ( output [ "EngineVersion" ] ) ; } if ( output [ "EngineInstallationMediaPath" ] !== undefined ) { contents . EngineInstallationMediaPath = __expectString ( output [ "EngineInstallationMediaPath" ] ) ; } if ( output [ "OSInstallationMediaPath" ] !== undefined ) { contents . OSInstallationMediaPath = __expectString ( output [ "OSInstallationMediaPath" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "FailureCause" ] !== undefined ) { contents . FailureCause = deserializeAws_queryInstallationMediaFailureCause ( output [ "FailureCause" ] , context ) ; } return contents ; } ; const deserializeAws_queryInstallationMediaAlreadyExistsFault = ( output , context ) : InstallationMediaAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInstallationMediaFailureCause = ( output , context ) : InstallationMediaFailureCause => { const contents = { Message : undefined , } ; if ( output [ "Message" ] !== undefined ) { contents . Message = __expectString ( output [ "Message" ] ) ; } return contents ; } ; const deserializeAws_queryInstallationMediaList = ( output , context ) : InstallationMedia [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryInstallationMedia ( entry , context ) ; } ) ; } ; const deserializeAws_queryInstallationMediaMessage = ( output , context ) : InstallationMediaMessage => { const contents = { Marker : undefined , InstallationMedia : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . InstallationMedia === "" ) { contents . InstallationMedia = [ ] ; } if ( output [ "InstallationMedia" ] !== undefined && output [ "InstallationMedia" ] [ "InstallationMedia" ] !== undefined ) { contents . InstallationMedia = deserializeAws_queryInstallationMediaList ( __getArrayIfSingleItem ( output [ "InstallationMedia" ] [ "InstallationMedia" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryInstallationMediaNotFoundFault = ( output , context ) : InstallationMediaNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInstanceQuotaExceededFault = ( output , context ) : InstanceQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInsufficientAvailableIPsInSubnetFault = ( output , context ) : InsufficientAvailableIPsInSubnetFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInsufficientDBClusterCapacityFault = ( output , context ) : InsufficientDBClusterCapacityFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInsufficientDBInstanceCapacityFault = ( output , context ) : InsufficientDBInstanceCapacityFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInsufficientStorageClusterCapacityFault = ( output , context ) : InsufficientStorageClusterCapacityFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidCustomDBEngineVersionStateFault = ( output , context ) : InvalidCustomDBEngineVersionStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidDBClusterCapacityFault = ( output , context ) : InvalidDBClusterCapacityFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidDBClusterEndpointStateFault = ( output , context ) : InvalidDBClusterEndpointStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidDBClusterSnapshotStateFault = ( output , context ) : InvalidDBClusterSnapshotStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidDBClusterStateFault = ( output , context ) : InvalidDBClusterStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidDBInstanceAutomatedBackupStateFault = ( output , context ) : InvalidDBInstanceAutomatedBackupStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidDBInstanceStateFault = ( output , context ) : InvalidDBInstanceStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidDBParameterGroupStateFault = ( output , context ) : InvalidDBParameterGroupStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidDBProxyEndpointStateFault = ( output , context ) : InvalidDBProxyEndpointStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidDBProxyStateFault = ( output , context ) : InvalidDBProxyStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidDBSecurityGroupStateFault = ( output , context ) : InvalidDBSecurityGroupStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidDBSnapshotStateFault = ( output , context ) : InvalidDBSnapshotStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidDBSubnetGroupFault = ( output , context ) : InvalidDBSubnetGroupFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidDBSubnetGroupStateFault = ( output , context ) : InvalidDBSubnetGroupStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidDBSubnetStateFault = ( output , context ) : InvalidDBSubnetStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidEventSubscriptionStateFault = ( output , context ) : InvalidEventSubscriptionStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidExportOnlyFault = ( output , context ) : InvalidExportOnlyFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidExportSourceStateFault = ( output , context ) : InvalidExportSourceStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidExportTaskStateFault = ( output , context ) : InvalidExportTaskStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidGlobalClusterStateFault = ( output , context ) : InvalidGlobalClusterStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidOptionGroupStateFault = ( output , context ) : InvalidOptionGroupStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidRestoreFault = ( output , context ) : InvalidRestoreFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidS3BucketFault = ( output , context ) : InvalidS3BucketFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidSubnet = ( output , context ) : InvalidSubnet => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryInvalidVPCNetworkStateFault = ( output , context ) : InvalidVPCNetworkStateFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryIPRange = ( output , context ) : IPRange => { const contents = { Status : undefined , CIDRIP : undefined , } ; if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "CIDRIP" ] !== undefined ) { contents . CIDRIP = __expectString ( output [ "CIDRIP" ] ) ; } return contents ; } ; const deserializeAws_queryIPRangeList = ( output , context ) : IPRange [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryIPRange ( entry , context ) ; } ) ; } ; const deserializeAws_queryKMSKeyNotAccessibleFault = ( output , context ) : KMSKeyNotAccessibleFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryLogTypeList = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_queryMinimumEngineVersionPerAllowedValue = ( output , context ) : MinimumEngineVersionPerAllowedValue => { const contents = { AllowedValue : undefined , MinimumEngineVersion : undefined , } ; if ( output [ "AllowedValue" ] !== undefined ) { contents . AllowedValue = __expectString ( output [ "AllowedValue" ] ) ; } if ( output [ "MinimumEngineVersion" ] !== undefined ) { contents . MinimumEngineVersion = __expectString ( output [ "MinimumEngineVersion" ] ) ; } return contents ; } ; const deserializeAws_queryMinimumEngineVersionPerAllowedValueList = ( output , context ) : MinimumEngineVersionPerAllowedValue [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryMinimumEngineVersionPerAllowedValue ( entry , context ) ; } ) ; } ; const deserializeAws_queryModifyCertificatesResult = ( output , context ) : ModifyCertificatesResult => { const contents = { Certificate : undefined , } ; if ( output [ "Certificate" ] !== undefined ) { contents . Certificate = deserializeAws_queryCertificate ( output [ "Certificate" ] , context ) ; } return contents ; } ; const deserializeAws_queryModifyDBClusterResult = ( output , context ) : ModifyDBClusterResult => { const contents = { DBCluster : undefined , } ; if ( output [ "DBCluster" ] !== undefined ) { contents . DBCluster = deserializeAws_queryDBCluster ( output [ "DBCluster" ] , context ) ; } return contents ; } ; const deserializeAws_queryModifyDBClusterSnapshotAttributeResult = ( output , context ) : ModifyDBClusterSnapshotAttributeResult => { const contents = { DBClusterSnapshotAttributesResult : undefined , } ; if ( output [ "DBClusterSnapshotAttributesResult" ] !== undefined ) { contents . DBClusterSnapshotAttributesResult = deserializeAws_queryDBClusterSnapshotAttributesResult ( output [ "DBClusterSnapshotAttributesResult" ] , context ) ; } return contents ; } ; const deserializeAws_queryModifyDBInstanceResult = ( output , context ) : ModifyDBInstanceResult => { const contents = { DBInstance : undefined , } ; if ( output [ "DBInstance" ] !== undefined ) { contents . DBInstance = deserializeAws_queryDBInstance ( output [ "DBInstance" ] , context ) ; } return contents ; } ; const deserializeAws_queryModifyDBProxyEndpointResponse = ( output , context ) : ModifyDBProxyEndpointResponse => { const contents = { DBProxyEndpoint : undefined , } ; if ( output [ "DBProxyEndpoint" ] !== undefined ) { contents . DBProxyEndpoint = deserializeAws_queryDBProxyEndpoint ( output [ "DBProxyEndpoint" ] , context ) ; } return contents ; } ; const deserializeAws_queryModifyDBProxyResponse = ( output , context ) : ModifyDBProxyResponse => { const contents = { DBProxy : undefined , } ; if ( output [ "DBProxy" ] !== undefined ) { contents . DBProxy = deserializeAws_queryDBProxy ( output [ "DBProxy" ] , context ) ; } return contents ; } ; const deserializeAws_queryModifyDBProxyTargetGroupResponse = ( output , context ) : ModifyDBProxyTargetGroupResponse => { const contents = { DBProxyTargetGroup : undefined , } ; if ( output [ "DBProxyTargetGroup" ] !== undefined ) { contents . DBProxyTargetGroup = deserializeAws_queryDBProxyTargetGroup ( output [ "DBProxyTargetGroup" ] , context ) ; } return contents ; } ; const deserializeAws_queryModifyDBSnapshotAttributeResult = ( output , context ) : ModifyDBSnapshotAttributeResult => { const contents = { DBSnapshotAttributesResult : undefined , } ; if ( output [ "DBSnapshotAttributesResult" ] !== undefined ) { contents . DBSnapshotAttributesResult = deserializeAws_queryDBSnapshotAttributesResult ( output [ "DBSnapshotAttributesResult" ] , context ) ; } return contents ; } ; const deserializeAws_queryModifyDBSnapshotResult = ( output , context ) : ModifyDBSnapshotResult => { const contents = { DBSnapshot : undefined , } ; if ( output [ "DBSnapshot" ] !== undefined ) { contents . DBSnapshot = deserializeAws_queryDBSnapshot ( output [ "DBSnapshot" ] , context ) ; } return contents ; } ; const deserializeAws_queryModifyDBSubnetGroupResult = ( output , context ) : ModifyDBSubnetGroupResult => { const contents = { DBSubnetGroup : undefined , } ; if ( output [ "DBSubnetGroup" ] !== undefined ) { contents . DBSubnetGroup = deserializeAws_queryDBSubnetGroup ( output [ "DBSubnetGroup" ] , context ) ; } return contents ; } ; const deserializeAws_queryModifyEventSubscriptionResult = ( output , context ) : ModifyEventSubscriptionResult => { const contents = { EventSubscription : undefined , } ; if ( output [ "EventSubscription" ] !== undefined ) { contents . EventSubscription = deserializeAws_queryEventSubscription ( output [ "EventSubscription" ] , context ) ; } return contents ; } ; const deserializeAws_queryModifyGlobalClusterResult = ( output , context ) : ModifyGlobalClusterResult => { const contents = { GlobalCluster : undefined , } ; if ( output [ "GlobalCluster" ] !== undefined ) { contents . GlobalCluster = deserializeAws_queryGlobalCluster ( output [ "GlobalCluster" ] , context ) ; } return contents ; } ; const deserializeAws_queryModifyOptionGroupResult = ( output , context ) : ModifyOptionGroupResult => { const contents = { OptionGroup : undefined , } ; if ( output [ "OptionGroup" ] !== undefined ) { contents . OptionGroup = deserializeAws_queryOptionGroup ( output [ "OptionGroup" ] , context ) ; } return contents ; } ; const deserializeAws_queryOption = ( output , context ) : Option => { const contents = { OptionName : undefined , OptionDescription : undefined , Persistent : undefined , Permanent : undefined , Port : undefined , OptionVersion : undefined , OptionSettings : undefined , DBSecurityGroupMemberships : undefined , VpcSecurityGroupMemberships : undefined , } ; if ( output [ "OptionName" ] !== undefined ) { contents . OptionName = __expectString ( output [ "OptionName" ] ) ; } if ( output [ "OptionDescription" ] !== undefined ) { contents . OptionDescription = __expectString ( output [ "OptionDescription" ] ) ; } if ( output [ "Persistent" ] !== undefined ) { contents . Persistent = __parseBoolean ( output [ "Persistent" ] ) ; } if ( output [ "Permanent" ] !== undefined ) { contents . Permanent = __parseBoolean ( output [ "Permanent" ] ) ; } if ( output [ "Port" ] !== undefined ) { contents . Port = __strictParseInt32 ( output [ "Port" ] ) as number ; } if ( output [ "OptionVersion" ] !== undefined ) { contents . OptionVersion = __expectString ( output [ "OptionVersion" ] ) ; } if ( output . OptionSettings === "" ) { contents . OptionSettings = [ ] ; } if ( output [ "OptionSettings" ] !== undefined && output [ "OptionSettings" ] [ "OptionSetting" ] !== undefined ) { contents . OptionSettings = deserializeAws_queryOptionSettingConfigurationList ( __getArrayIfSingleItem ( output [ "OptionSettings" ] [ "OptionSetting" ] ) , context ) ; } if ( output . DBSecurityGroupMemberships === "" ) { contents . DBSecurityGroupMemberships = [ ] ; } if ( output [ "DBSecurityGroupMemberships" ] !== undefined && output [ "DBSecurityGroupMemberships" ] [ "DBSecurityGroup" ] !== undefined ) { contents . DBSecurityGroupMemberships = deserializeAws_queryDBSecurityGroupMembershipList ( __getArrayIfSingleItem ( output [ "DBSecurityGroupMemberships" ] [ "DBSecurityGroup" ] ) , context ) ; } if ( output . VpcSecurityGroupMemberships === "" ) { contents . VpcSecurityGroupMemberships = [ ] ; } if ( output [ "VpcSecurityGroupMemberships" ] !== undefined && output [ "VpcSecurityGroupMemberships" ] [ "VpcSecurityGroupMembership" ] !== undefined ) { contents . VpcSecurityGroupMemberships = deserializeAws_queryVpcSecurityGroupMembershipList ( __getArrayIfSingleItem ( output [ "VpcSecurityGroupMemberships" ] [ "VpcSecurityGroupMembership" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryOptionGroup = ( output , context ) : OptionGroup => { const contents = { OptionGroupName : undefined , OptionGroupDescription : undefined , EngineName : undefined , MajorEngineVersion : undefined , Options : undefined , AllowsVpcAndNonVpcInstanceMemberships : undefined , VpcId : undefined , OptionGroupArn : undefined , } ; if ( output [ "OptionGroupName" ] !== undefined ) { contents . OptionGroupName = __expectString ( output [ "OptionGroupName" ] ) ; } if ( output [ "OptionGroupDescription" ] !== undefined ) { contents . OptionGroupDescription = __expectString ( output [ "OptionGroupDescription" ] ) ; } if ( output [ "EngineName" ] !== undefined ) { contents . EngineName = __expectString ( output [ "EngineName" ] ) ; } if ( output [ "MajorEngineVersion" ] !== undefined ) { contents . MajorEngineVersion = __expectString ( output [ "MajorEngineVersion" ] ) ; } if ( output . Options === "" ) { contents . Options = [ ] ; } if ( output [ "Options" ] !== undefined && output [ "Options" ] [ "Option" ] !== undefined ) { contents . Options = deserializeAws_queryOptionsList ( __getArrayIfSingleItem ( output [ "Options" ] [ "Option" ] ) , context ) ; } if ( output [ "AllowsVpcAndNonVpcInstanceMemberships" ] !== undefined ) { contents . AllowsVpcAndNonVpcInstanceMemberships = __parseBoolean ( output [ "AllowsVpcAndNonVpcInstanceMemberships" ] ) ; } if ( output [ "VpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "VpcId" ] ) ; } if ( output [ "OptionGroupArn" ] !== undefined ) { contents . OptionGroupArn = __expectString ( output [ "OptionGroupArn" ] ) ; } return contents ; } ; const deserializeAws_queryOptionGroupAlreadyExistsFault = ( output , context ) : OptionGroupAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryOptionGroupMembership = ( output , context ) : OptionGroupMembership => { const contents = { OptionGroupName : undefined , Status : undefined , } ; if ( output [ "OptionGroupName" ] !== undefined ) { contents . OptionGroupName = __expectString ( output [ "OptionGroupName" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } return contents ; } ; const deserializeAws_queryOptionGroupMembershipList = ( output , context ) : OptionGroupMembership [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryOptionGroupMembership ( entry , context ) ; } ) ; } ; const deserializeAws_queryOptionGroupNotFoundFault = ( output , context ) : OptionGroupNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryOptionGroupOption = ( output , context ) : OptionGroupOption => { const contents = { Name : undefined , Description : undefined , EngineName : undefined , MajorEngineVersion : undefined , MinimumRequiredMinorEngineVersion : undefined , PortRequired : undefined , DefaultPort : undefined , OptionsDependedOn : undefined , OptionsConflictsWith : undefined , Persistent : undefined , Permanent : undefined , RequiresAutoMinorEngineVersionUpgrade : undefined , VpcOnly : undefined , SupportsOptionVersionDowngrade : undefined , OptionGroupOptionSettings : undefined , OptionGroupOptionVersions : undefined , } ; if ( output [ "Name" ] !== undefined ) { contents . Name = __expectString ( output [ "Name" ] ) ; } if ( output [ "Description" ] !== undefined ) { contents . Description = __expectString ( output [ "Description" ] ) ; } if ( output [ "EngineName" ] !== undefined ) { contents . EngineName = __expectString ( output [ "EngineName" ] ) ; } if ( output [ "MajorEngineVersion" ] !== undefined ) { contents . MajorEngineVersion = __expectString ( output [ "MajorEngineVersion" ] ) ; } if ( output [ "MinimumRequiredMinorEngineVersion" ] !== undefined ) { contents . MinimumRequiredMinorEngineVersion = __expectString ( output [ "MinimumRequiredMinorEngineVersion" ] ) ; } if ( output [ "PortRequired" ] !== undefined ) { contents . PortRequired = __parseBoolean ( output [ "PortRequired" ] ) ; } if ( output [ "DefaultPort" ] !== undefined ) { contents . DefaultPort = __strictParseInt32 ( output [ "DefaultPort" ] ) as number ; } if ( output . OptionsDependedOn === "" ) { contents . OptionsDependedOn = [ ] ; } if ( output [ "OptionsDependedOn" ] !== undefined && output [ "OptionsDependedOn" ] [ "OptionName" ] !== undefined ) { contents . OptionsDependedOn = deserializeAws_queryOptionsDependedOn ( __getArrayIfSingleItem ( output [ "OptionsDependedOn" ] [ "OptionName" ] ) , context ) ; } if ( output . OptionsConflictsWith === "" ) { contents . OptionsConflictsWith = [ ] ; } if ( output [ "OptionsConflictsWith" ] !== undefined && output [ "OptionsConflictsWith" ] [ "OptionConflictName" ] !== undefined ) { contents . OptionsConflictsWith = deserializeAws_queryOptionsConflictsWith ( __getArrayIfSingleItem ( output [ "OptionsConflictsWith" ] [ "OptionConflictName" ] ) , context ) ; } if ( output [ "Persistent" ] !== undefined ) { contents . Persistent = __parseBoolean ( output [ "Persistent" ] ) ; } if ( output [ "Permanent" ] !== undefined ) { contents . Permanent = __parseBoolean ( output [ "Permanent" ] ) ; } if ( output [ "RequiresAutoMinorEngineVersionUpgrade" ] !== undefined ) { contents . RequiresAutoMinorEngineVersionUpgrade = __parseBoolean ( output [ "RequiresAutoMinorEngineVersionUpgrade" ] ) ; } if ( output [ "VpcOnly" ] !== undefined ) { contents . VpcOnly = __parseBoolean ( output [ "VpcOnly" ] ) ; } if ( output [ "SupportsOptionVersionDowngrade" ] !== undefined ) { contents . SupportsOptionVersionDowngrade = __parseBoolean ( output [ "SupportsOptionVersionDowngrade" ] ) ; } if ( output . OptionGroupOptionSettings === "" ) { contents . OptionGroupOptionSettings = [ ] ; } if ( output [ "OptionGroupOptionSettings" ] !== undefined && output [ "OptionGroupOptionSettings" ] [ "OptionGroupOptionSetting" ] !== undefined ) { contents . OptionGroupOptionSettings = deserializeAws_queryOptionGroupOptionSettingsList ( __getArrayIfSingleItem ( output [ "OptionGroupOptionSettings" ] [ "OptionGroupOptionSetting" ] ) , context ) ; } if ( output . OptionGroupOptionVersions === "" ) { contents . OptionGroupOptionVersions = [ ] ; } if ( output [ "OptionGroupOptionVersions" ] !== undefined && output [ "OptionGroupOptionVersions" ] [ "OptionVersion" ] !== undefined ) { contents . OptionGroupOptionVersions = deserializeAws_queryOptionGroupOptionVersionsList ( __getArrayIfSingleItem ( output [ "OptionGroupOptionVersions" ] [ "OptionVersion" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryOptionGroupOptionSetting = ( output , context ) : OptionGroupOptionSetting => { const contents = { SettingName : undefined , SettingDescription : undefined , DefaultValue : undefined , ApplyType : undefined , AllowedValues : undefined , IsModifiable : undefined , IsRequired : undefined , MinimumEngineVersionPerAllowedValue : undefined , } ; if ( output [ "SettingName" ] !== undefined ) { contents . SettingName = __expectString ( output [ "SettingName" ] ) ; } if ( output [ "SettingDescription" ] !== undefined ) { contents . SettingDescription = __expectString ( output [ "SettingDescription" ] ) ; } if ( output [ "DefaultValue" ] !== undefined ) { contents . DefaultValue = __expectString ( output [ "DefaultValue" ] ) ; } if ( output [ "ApplyType" ] !== undefined ) { contents . ApplyType = __expectString ( output [ "ApplyType" ] ) ; } if ( output [ "AllowedValues" ] !== undefined ) { contents . AllowedValues = __expectString ( output [ "AllowedValues" ] ) ; } if ( output [ "IsModifiable" ] !== undefined ) { contents . IsModifiable = __parseBoolean ( output [ "IsModifiable" ] ) ; } if ( output [ "IsRequired" ] !== undefined ) { contents . IsRequired = __parseBoolean ( output [ "IsRequired" ] ) ; } if ( output . MinimumEngineVersionPerAllowedValue === "" ) { contents . MinimumEngineVersionPerAllowedValue = [ ] ; } if ( output [ "MinimumEngineVersionPerAllowedValue" ] !== undefined && output [ "MinimumEngineVersionPerAllowedValue" ] [ "MinimumEngineVersionPerAllowedValue" ] !== undefined ) { contents . MinimumEngineVersionPerAllowedValue = deserializeAws_queryMinimumEngineVersionPerAllowedValueList ( __getArrayIfSingleItem ( output [ "MinimumEngineVersionPerAllowedValue" ] [ "MinimumEngineVersionPerAllowedValue" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryOptionGroupOptionSettingsList = ( output , context ) : OptionGroupOptionSetting [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryOptionGroupOptionSetting ( entry , context ) ; } ) ; } ; const deserializeAws_queryOptionGroupOptionsList = ( output , context ) : OptionGroupOption [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryOptionGroupOption ( entry , context ) ; } ) ; } ; const deserializeAws_queryOptionGroupOptionsMessage = ( output , context ) : OptionGroupOptionsMessage => { const contents = { OptionGroupOptions : undefined , Marker : undefined , } ; if ( output . OptionGroupOptions === "" ) { contents . OptionGroupOptions = [ ] ; } if ( output [ "OptionGroupOptions" ] !== undefined && output [ "OptionGroupOptions" ] [ "OptionGroupOption" ] !== undefined ) { contents . OptionGroupOptions = deserializeAws_queryOptionGroupOptionsList ( __getArrayIfSingleItem ( output [ "OptionGroupOptions" ] [ "OptionGroupOption" ] ) , context ) ; } if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } return contents ; } ; const deserializeAws_queryOptionGroupOptionVersionsList = ( output , context ) : OptionVersion [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryOptionVersion ( entry , context ) ; } ) ; } ; const deserializeAws_queryOptionGroupQuotaExceededFault = ( output , context ) : OptionGroupQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryOptionGroups = ( output , context ) : OptionGroups => { const contents = { OptionGroupsList : undefined , Marker : undefined , } ; if ( output . OptionGroupsList === "" ) { contents . OptionGroupsList = [ ] ; } if ( output [ "OptionGroupsList" ] !== undefined && output [ "OptionGroupsList" ] [ "OptionGroup" ] !== undefined ) { contents . OptionGroupsList = deserializeAws_queryOptionGroupsList ( __getArrayIfSingleItem ( output [ "OptionGroupsList" ] [ "OptionGroup" ] ) , context ) ; } if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } return contents ; } ; const deserializeAws_queryOptionGroupsList = ( output , context ) : OptionGroup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryOptionGroup ( entry , context ) ; } ) ; } ; const deserializeAws_queryOptionsConflictsWith = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_queryOptionsDependedOn = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_queryOptionSetting = ( output , context ) : OptionSetting => { const contents = { Name : undefined , Value : undefined , DefaultValue : undefined , Description : undefined , ApplyType : undefined , DataType : undefined , AllowedValues : undefined , IsModifiable : undefined , IsCollection : undefined , } ; if ( output [ "Name" ] !== undefined ) { contents . Name = __expectString ( output [ "Name" ] ) ; } if ( output [ "Value" ] !== undefined ) { contents . Value = __expectString ( output [ "Value" ] ) ; } if ( output [ "DefaultValue" ] !== undefined ) { contents . DefaultValue = __expectString ( output [ "DefaultValue" ] ) ; } if ( output [ "Description" ] !== undefined ) { contents . Description = __expectString ( output [ "Description" ] ) ; } if ( output [ "ApplyType" ] !== undefined ) { contents . ApplyType = __expectString ( output [ "ApplyType" ] ) ; } if ( output [ "DataType" ] !== undefined ) { contents . DataType = __expectString ( output [ "DataType" ] ) ; } if ( output [ "AllowedValues" ] !== undefined ) { contents . AllowedValues = __expectString ( output [ "AllowedValues" ] ) ; } if ( output [ "IsModifiable" ] !== undefined ) { contents . IsModifiable = __parseBoolean ( output [ "IsModifiable" ] ) ; } if ( output [ "IsCollection" ] !== undefined ) { contents . IsCollection = __parseBoolean ( output [ "IsCollection" ] ) ; } return contents ; } ; const deserializeAws_queryOptionSettingConfigurationList = ( output , context ) : OptionSetting [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryOptionSetting ( entry , context ) ; } ) ; } ; const deserializeAws_queryOptionsList = ( output , context ) : Option [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryOption ( entry , context ) ; } ) ; } ; const deserializeAws_queryOptionVersion = ( output , context ) : OptionVersion => { const contents = { Version : undefined , IsDefault : undefined , } ; if ( output [ "Version" ] !== undefined ) { contents . Version = __expectString ( output [ "Version" ] ) ; } if ( output [ "IsDefault" ] !== undefined ) { contents . IsDefault = __parseBoolean ( output [ "IsDefault" ] ) ; } return contents ; } ; const deserializeAws_queryOrderableDBInstanceOption = ( output , context ) : OrderableDBInstanceOption => { const contents = { Engine : undefined , EngineVersion : undefined , DBInstanceClass : undefined , LicenseModel : undefined , AvailabilityZoneGroup : undefined , AvailabilityZones : undefined , MultiAZCapable : undefined , ReadReplicaCapable : undefined , Vpc : undefined , SupportsStorageEncryption : undefined , StorageType : undefined , SupportsIops : undefined , SupportsEnhancedMonitoring : undefined , SupportsIAMDatabaseAuthentication : undefined , SupportsPerformanceInsights : undefined , MinStorageSize : undefined , MaxStorageSize : undefined , MinIopsPerDbInstance : undefined , MaxIopsPerDbInstance : undefined , MinIopsPerGib : undefined , MaxIopsPerGib : undefined , AvailableProcessorFeatures : undefined , SupportedEngineModes : undefined , SupportsStorageAutoscaling : undefined , SupportsKerberosAuthentication : undefined , OutpostCapable : undefined , SupportedActivityStreamModes : undefined , SupportsGlobalDatabases : undefined , SupportsClusters : undefined , } ; if ( output [ "Engine" ] !== undefined ) { contents . Engine = __expectString ( output [ "Engine" ] ) ; } if ( output [ "EngineVersion" ] !== undefined ) { contents . EngineVersion = __expectString ( output [ "EngineVersion" ] ) ; } if ( output [ "DBInstanceClass" ] !== undefined ) { contents . DBInstanceClass = __expectString ( output [ "DBInstanceClass" ] ) ; } if ( output [ "LicenseModel" ] !== undefined ) { contents . LicenseModel = __expectString ( output [ "LicenseModel" ] ) ; } if ( output [ "AvailabilityZoneGroup" ] !== undefined ) { contents . AvailabilityZoneGroup = __expectString ( output [ "AvailabilityZoneGroup" ] ) ; } if ( output . AvailabilityZones === "" ) { contents . AvailabilityZones = [ ] ; } if ( output [ "AvailabilityZones" ] !== undefined && output [ "AvailabilityZones" ] [ "AvailabilityZone" ] !== undefined ) { contents . AvailabilityZones = deserializeAws_queryAvailabilityZoneList ( __getArrayIfSingleItem ( output [ "AvailabilityZones" ] [ "AvailabilityZone" ] ) , context ) ; } if ( output [ "MultiAZCapable" ] !== undefined ) { contents . MultiAZCapable = __parseBoolean ( output [ "MultiAZCapable" ] ) ; } if ( output [ "ReadReplicaCapable" ] !== undefined ) { contents . ReadReplicaCapable = __parseBoolean ( output [ "ReadReplicaCapable" ] ) ; } if ( output [ "Vpc" ] !== undefined ) { contents . Vpc = __parseBoolean ( output [ "Vpc" ] ) ; } if ( output [ "SupportsStorageEncryption" ] !== undefined ) { contents . SupportsStorageEncryption = __parseBoolean ( output [ "SupportsStorageEncryption" ] ) ; } if ( output [ "StorageType" ] !== undefined ) { contents . StorageType = __expectString ( output [ "StorageType" ] ) ; } if ( output [ "SupportsIops" ] !== undefined ) { contents . SupportsIops = __parseBoolean ( output [ "SupportsIops" ] ) ; } if ( output [ "SupportsEnhancedMonitoring" ] !== undefined ) { contents . SupportsEnhancedMonitoring = __parseBoolean ( output [ "SupportsEnhancedMonitoring" ] ) ; } if ( output [ "SupportsIAMDatabaseAuthentication" ] !== undefined ) { contents . SupportsIAMDatabaseAuthentication = __parseBoolean ( output [ "SupportsIAMDatabaseAuthentication" ] ) ; } if ( output [ "SupportsPerformanceInsights" ] !== undefined ) { contents . SupportsPerformanceInsights = __parseBoolean ( output [ "SupportsPerformanceInsights" ] ) ; } if ( output [ "MinStorageSize" ] !== undefined ) { contents . MinStorageSize = __strictParseInt32 ( output [ "MinStorageSize" ] ) as number ; } if ( output [ "MaxStorageSize" ] !== undefined ) { contents . MaxStorageSize = __strictParseInt32 ( output [ "MaxStorageSize" ] ) as number ; } if ( output [ "MinIopsPerDbInstance" ] !== undefined ) { contents . MinIopsPerDbInstance = __strictParseInt32 ( output [ "MinIopsPerDbInstance" ] ) as number ; } if ( output [ "MaxIopsPerDbInstance" ] !== undefined ) { contents . MaxIopsPerDbInstance = __strictParseInt32 ( output [ "MaxIopsPerDbInstance" ] ) as number ; } if ( output [ "MinIopsPerGib" ] !== undefined ) { contents . MinIopsPerGib = __strictParseFloat ( output [ "MinIopsPerGib" ] ) as number ; } if ( output [ "MaxIopsPerGib" ] !== undefined ) { contents . MaxIopsPerGib = __strictParseFloat ( output [ "MaxIopsPerGib" ] ) as number ; } if ( output . AvailableProcessorFeatures === "" ) { contents . AvailableProcessorFeatures = [ ] ; } if ( output [ "AvailableProcessorFeatures" ] !== undefined && output [ "AvailableProcessorFeatures" ] [ "AvailableProcessorFeature" ] !== undefined ) { contents . AvailableProcessorFeatures = deserializeAws_queryAvailableProcessorFeatureList ( __getArrayIfSingleItem ( output [ "AvailableProcessorFeatures" ] [ "AvailableProcessorFeature" ] ) , context ) ; } if ( output . SupportedEngineModes === "" ) { contents . SupportedEngineModes = [ ] ; } if ( output [ "SupportedEngineModes" ] !== undefined && output [ "SupportedEngineModes" ] [ "member" ] !== undefined ) { contents . SupportedEngineModes = deserializeAws_queryEngineModeList ( __getArrayIfSingleItem ( output [ "SupportedEngineModes" ] [ "member" ] ) , context ) ; } if ( output [ "SupportsStorageAutoscaling" ] !== undefined ) { contents . SupportsStorageAutoscaling = __parseBoolean ( output [ "SupportsStorageAutoscaling" ] ) ; } if ( output [ "SupportsKerberosAuthentication" ] !== undefined ) { contents . SupportsKerberosAuthentication = __parseBoolean ( output [ "SupportsKerberosAuthentication" ] ) ; } if ( output [ "OutpostCapable" ] !== undefined ) { contents . OutpostCapable = __parseBoolean ( output [ "OutpostCapable" ] ) ; } if ( output . SupportedActivityStreamModes === "" ) { contents . SupportedActivityStreamModes = [ ] ; } if ( output [ "SupportedActivityStreamModes" ] !== undefined && output [ "SupportedActivityStreamModes" ] [ "member" ] !== undefined ) { contents . SupportedActivityStreamModes = deserializeAws_queryActivityStreamModeList ( __getArrayIfSingleItem ( output [ "SupportedActivityStreamModes" ] [ "member" ] ) , context ) ; } if ( output [ "SupportsGlobalDatabases" ] !== undefined ) { contents . SupportsGlobalDatabases = __parseBoolean ( output [ "SupportsGlobalDatabases" ] ) ; } if ( output [ "SupportsClusters" ] !== undefined ) { contents . SupportsClusters = __parseBoolean ( output [ "SupportsClusters" ] ) ; } return contents ; } ; const deserializeAws_queryOrderableDBInstanceOptionsList = ( output , context ) : OrderableDBInstanceOption [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryOrderableDBInstanceOption ( entry , context ) ; } ) ; } ; const deserializeAws_queryOrderableDBInstanceOptionsMessage = ( output , context ) : OrderableDBInstanceOptionsMessage => { const contents = { OrderableDBInstanceOptions : undefined , Marker : undefined , } ; if ( output . OrderableDBInstanceOptions === "" ) { contents . OrderableDBInstanceOptions = [ ] ; } if ( output [ "OrderableDBInstanceOptions" ] !== undefined && output [ "OrderableDBInstanceOptions" ] [ "OrderableDBInstanceOption" ] !== undefined ) { contents . OrderableDBInstanceOptions = deserializeAws_queryOrderableDBInstanceOptionsList ( __getArrayIfSingleItem ( output [ "OrderableDBInstanceOptions" ] [ "OrderableDBInstanceOption" ] ) , context ) ; } if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } return contents ; } ; const deserializeAws_queryOutpost = ( output , context ) : Outpost => { const contents = { Arn : undefined , } ; if ( output [ "Arn" ] !== undefined ) { contents . Arn = __expectString ( output [ "Arn" ] ) ; } return contents ; } ; const deserializeAws_queryParameter = ( output , context ) : Parameter => { const contents = { ParameterName : undefined , ParameterValue : undefined , Description : undefined , Source : undefined , ApplyType : undefined , DataType : undefined , AllowedValues : undefined , IsModifiable : undefined , MinimumEngineVersion : undefined , ApplyMethod : undefined , SupportedEngineModes : undefined , } ; if ( output [ "ParameterName" ] !== undefined ) { contents . ParameterName = __expectString ( output [ "ParameterName" ] ) ; } if ( output [ "ParameterValue" ] !== undefined ) { contents . ParameterValue = __expectString ( output [ "ParameterValue" ] ) ; } if ( output [ "Description" ] !== undefined ) { contents . Description = __expectString ( output [ "Description" ] ) ; } if ( output [ "Source" ] !== undefined ) { contents . Source = __expectString ( output [ "Source" ] ) ; } if ( output [ "ApplyType" ] !== undefined ) { contents . ApplyType = __expectString ( output [ "ApplyType" ] ) ; } if ( output [ "DataType" ] !== undefined ) { contents . DataType = __expectString ( output [ "DataType" ] ) ; } if ( output [ "AllowedValues" ] !== undefined ) { contents . AllowedValues = __expectString ( output [ "AllowedValues" ] ) ; } if ( output [ "IsModifiable" ] !== undefined ) { contents . IsModifiable = __parseBoolean ( output [ "IsModifiable" ] ) ; } if ( output [ "MinimumEngineVersion" ] !== undefined ) { contents . MinimumEngineVersion = __expectString ( output [ "MinimumEngineVersion" ] ) ; } if ( output [ "ApplyMethod" ] !== undefined ) { contents . ApplyMethod = __expectString ( output [ "ApplyMethod" ] ) ; } if ( output . SupportedEngineModes === "" ) { contents . SupportedEngineModes = [ ] ; } if ( output [ "SupportedEngineModes" ] !== undefined && output [ "SupportedEngineModes" ] [ "member" ] !== undefined ) { contents . SupportedEngineModes = deserializeAws_queryEngineModeList ( __getArrayIfSingleItem ( output [ "SupportedEngineModes" ] [ "member" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryParametersList = ( output , context ) : Parameter [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryParameter ( entry , context ) ; } ) ; } ; const deserializeAws_queryPendingCloudwatchLogsExports = ( output , context ) : PendingCloudwatchLogsExports => { const contents = { LogTypesToEnable : undefined , LogTypesToDisable : undefined , } ; if ( output . LogTypesToEnable === "" ) { contents . LogTypesToEnable = [ ] ; } if ( output [ "LogTypesToEnable" ] !== undefined && output [ "LogTypesToEnable" ] [ "member" ] !== undefined ) { contents . LogTypesToEnable = deserializeAws_queryLogTypeList ( __getArrayIfSingleItem ( output [ "LogTypesToEnable" ] [ "member" ] ) , context ) ; } if ( output . LogTypesToDisable === "" ) { contents . LogTypesToDisable = [ ] ; } if ( output [ "LogTypesToDisable" ] !== undefined && output [ "LogTypesToDisable" ] [ "member" ] !== undefined ) { contents . LogTypesToDisable = deserializeAws_queryLogTypeList ( __getArrayIfSingleItem ( output [ "LogTypesToDisable" ] [ "member" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryPendingMaintenanceAction = ( output , context ) : PendingMaintenanceAction => { const contents = { Action : undefined , AutoAppliedAfterDate : undefined , ForcedApplyDate : undefined , OptInStatus : undefined , CurrentApplyDate : undefined , Description : undefined , } ; if ( output [ "Action" ] !== undefined ) { contents . Action = __expectString ( output [ "Action" ] ) ; } if ( output [ "AutoAppliedAfterDate" ] !== undefined ) { contents . AutoAppliedAfterDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "AutoAppliedAfterDate" ] ) ) ; } if ( output [ "ForcedApplyDate" ] !== undefined ) { contents . ForcedApplyDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "ForcedApplyDate" ] ) ) ; } if ( output [ "OptInStatus" ] !== undefined ) { contents . OptInStatus = __expectString ( output [ "OptInStatus" ] ) ; } if ( output [ "CurrentApplyDate" ] !== undefined ) { contents . CurrentApplyDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "CurrentApplyDate" ] ) ) ; } if ( output [ "Description" ] !== undefined ) { contents . Description = __expectString ( output [ "Description" ] ) ; } return contents ; } ; const deserializeAws_queryPendingMaintenanceActionDetails = ( output , context ) : PendingMaintenanceAction [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryPendingMaintenanceAction ( entry , context ) ; } ) ; } ; const deserializeAws_queryPendingMaintenanceActions = ( output , context ) : ResourcePendingMaintenanceActions [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryResourcePendingMaintenanceActions ( entry , context ) ; } ) ; } ; const deserializeAws_queryPendingMaintenanceActionsMessage = ( output , context ) : PendingMaintenanceActionsMessage => { const contents = { PendingMaintenanceActions : undefined , Marker : undefined , } ; if ( output . PendingMaintenanceActions === "" ) { contents . PendingMaintenanceActions = [ ] ; } if ( output [ "PendingMaintenanceActions" ] !== undefined && output [ "PendingMaintenanceActions" ] [ "ResourcePendingMaintenanceActions" ] !== undefined ) { contents . PendingMaintenanceActions = deserializeAws_queryPendingMaintenanceActions ( __getArrayIfSingleItem ( output [ "PendingMaintenanceActions" ] [ "ResourcePendingMaintenanceActions" ] ) , context ) ; } if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } return contents ; } ; const deserializeAws_queryPendingModifiedValues = ( output , context ) : PendingModifiedValues => { const contents = { DBInstanceClass : undefined , AllocatedStorage : undefined , MasterUserPassword : undefined , Port : undefined , BackupRetentionPeriod : undefined , MultiAZ : undefined , EngineVersion : undefined , LicenseModel : undefined , Iops : undefined , DBInstanceIdentifier : undefined , StorageType : undefined , CACertificateIdentifier : undefined , DBSubnetGroupName : undefined , PendingCloudwatchLogsExports : undefined , ProcessorFeatures : undefined , IAMDatabaseAuthenticationEnabled : undefined , AutomationMode : undefined , ResumeFullAutomationModeTime : undefined , } ; if ( output [ "DBInstanceClass" ] !== undefined ) { contents . DBInstanceClass = __expectString ( output [ "DBInstanceClass" ] ) ; } if ( output [ "AllocatedStorage" ] !== undefined ) { contents . AllocatedStorage = __strictParseInt32 ( output [ "AllocatedStorage" ] ) as number ; } if ( output [ "MasterUserPassword" ] !== undefined ) { contents . MasterUserPassword = __expectString ( output [ "MasterUserPassword" ] ) ; } if ( output [ "Port" ] !== undefined ) { contents . Port = __strictParseInt32 ( output [ "Port" ] ) as number ; } if ( output [ "BackupRetentionPeriod" ] !== undefined ) { contents . BackupRetentionPeriod = __strictParseInt32 ( output [ "BackupRetentionPeriod" ] ) as number ; } if ( output [ "MultiAZ" ] !== undefined ) { contents . MultiAZ = __parseBoolean ( output [ "MultiAZ" ] ) ; } if ( output [ "EngineVersion" ] !== undefined ) { contents . EngineVersion = __expectString ( output [ "EngineVersion" ] ) ; } if ( output [ "LicenseModel" ] !== undefined ) { contents . LicenseModel = __expectString ( output [ "LicenseModel" ] ) ; } if ( output [ "Iops" ] !== undefined ) { contents . Iops = __strictParseInt32 ( output [ "Iops" ] ) as number ; } if ( output [ "DBInstanceIdentifier" ] !== undefined ) { contents . DBInstanceIdentifier = __expectString ( output [ "DBInstanceIdentifier" ] ) ; } if ( output [ "StorageType" ] !== undefined ) { contents . StorageType = __expectString ( output [ "StorageType" ] ) ; } if ( output [ "CACertificateIdentifier" ] !== undefined ) { contents . CACertificateIdentifier = __expectString ( output [ "CACertificateIdentifier" ] ) ; } if ( output [ "DBSubnetGroupName" ] !== undefined ) { contents . DBSubnetGroupName = __expectString ( output [ "DBSubnetGroupName" ] ) ; } if ( output [ "PendingCloudwatchLogsExports" ] !== undefined ) { contents . PendingCloudwatchLogsExports = deserializeAws_queryPendingCloudwatchLogsExports ( output [ "PendingCloudwatchLogsExports" ] , context ) ; } if ( output . ProcessorFeatures === "" ) { contents . ProcessorFeatures = [ ] ; } if ( output [ "ProcessorFeatures" ] !== undefined && output [ "ProcessorFeatures" ] [ "ProcessorFeature" ] !== undefined ) { contents . ProcessorFeatures = deserializeAws_queryProcessorFeatureList ( __getArrayIfSingleItem ( output [ "ProcessorFeatures" ] [ "ProcessorFeature" ] ) , context ) ; } if ( output [ "IAMDatabaseAuthenticationEnabled" ] !== undefined ) { contents . IAMDatabaseAuthenticationEnabled = __parseBoolean ( output [ "IAMDatabaseAuthenticationEnabled" ] ) ; } if ( output [ "AutomationMode" ] !== undefined ) { contents . AutomationMode = __expectString ( output [ "AutomationMode" ] ) ; } if ( output [ "ResumeFullAutomationModeTime" ] !== undefined ) { contents . ResumeFullAutomationModeTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "ResumeFullAutomationModeTime" ] ) ) ; } return contents ; } ; const deserializeAws_queryPointInTimeRestoreNotEnabledFault = ( output , context ) : PointInTimeRestoreNotEnabledFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryProcessorFeature = ( output , context ) : ProcessorFeature => { const contents = { Name : undefined , Value : undefined , } ; if ( output [ "Name" ] !== undefined ) { contents . Name = __expectString ( output [ "Name" ] ) ; } if ( output [ "Value" ] !== undefined ) { contents . Value = __expectString ( output [ "Value" ] ) ; } return contents ; } ; const deserializeAws_queryProcessorFeatureList = ( output , context ) : ProcessorFeature [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryProcessorFeature ( entry , context ) ; } ) ; } ; const deserializeAws_queryPromoteReadReplicaDBClusterResult = ( output , context ) : PromoteReadReplicaDBClusterResult => { const contents = { DBCluster : undefined , } ; if ( output [ "DBCluster" ] !== undefined ) { contents . DBCluster = deserializeAws_queryDBCluster ( output [ "DBCluster" ] , context ) ; } return contents ; } ; const deserializeAws_queryPromoteReadReplicaResult = ( output , context ) : PromoteReadReplicaResult => { const contents = { DBInstance : undefined , } ; if ( output [ "DBInstance" ] !== undefined ) { contents . DBInstance = deserializeAws_queryDBInstance ( output [ "DBInstance" ] , context ) ; } return contents ; } ; const deserializeAws_queryProvisionedIopsNotAvailableInAZFault = ( output , context ) : ProvisionedIopsNotAvailableInAZFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryPurchaseReservedDBInstancesOfferingResult = ( output , context ) : PurchaseReservedDBInstancesOfferingResult => { const contents = { ReservedDBInstance : undefined , } ; if ( output [ "ReservedDBInstance" ] !== undefined ) { contents . ReservedDBInstance = deserializeAws_queryReservedDBInstance ( output [ "ReservedDBInstance" ] , context ) ; } return contents ; } ; const deserializeAws_queryRange = ( output , context ) : Range => { const contents = { From : undefined , To : undefined , Step : undefined , } ; if ( output [ "From" ] !== undefined ) { contents . From = __strictParseInt32 ( output [ "From" ] ) as number ; } if ( output [ "To" ] !== undefined ) { contents . To = __strictParseInt32 ( output [ "To" ] ) as number ; } if ( output [ "Step" ] !== undefined ) { contents . Step = __strictParseInt32 ( output [ "Step" ] ) as number ; } return contents ; } ; const deserializeAws_queryRangeList = ( output , context ) : Range [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryRange ( entry , context ) ; } ) ; } ; const deserializeAws_queryReadersArnList = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_queryReadReplicaDBClusterIdentifierList = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_queryReadReplicaDBInstanceIdentifierList = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_queryReadReplicaIdentifierList = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_queryRebootDBClusterResult = ( output , context ) : RebootDBClusterResult => { const contents = { DBCluster : undefined , } ; if ( output [ "DBCluster" ] !== undefined ) { contents . DBCluster = deserializeAws_queryDBCluster ( output [ "DBCluster" ] , context ) ; } return contents ; } ; const deserializeAws_queryRebootDBInstanceResult = ( output , context ) : RebootDBInstanceResult => { const contents = { DBInstance : undefined , } ; if ( output [ "DBInstance" ] !== undefined ) { contents . DBInstance = deserializeAws_queryDBInstance ( output [ "DBInstance" ] , context ) ; } return contents ; } ; const deserializeAws_queryRecurringCharge = ( output , context ) : RecurringCharge => { const contents = { RecurringChargeAmount : undefined , RecurringChargeFrequency : undefined , } ; if ( output [ "RecurringChargeAmount" ] !== undefined ) { contents . RecurringChargeAmount = __strictParseFloat ( output [ "RecurringChargeAmount" ] ) as number ; } if ( output [ "RecurringChargeFrequency" ] !== undefined ) { contents . RecurringChargeFrequency = __expectString ( output [ "RecurringChargeFrequency" ] ) ; } return contents ; } ; const deserializeAws_queryRecurringChargeList = ( output , context ) : RecurringCharge [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryRecurringCharge ( entry , context ) ; } ) ; } ; const deserializeAws_queryRegisterDBProxyTargetsResponse = ( output , context ) : RegisterDBProxyTargetsResponse => { const contents = { DBProxyTargets : undefined , } ; if ( output . DBProxyTargets === "" ) { contents . DBProxyTargets = [ ] ; } if ( output [ "DBProxyTargets" ] !== undefined && output [ "DBProxyTargets" ] [ "member" ] !== undefined ) { contents . DBProxyTargets = deserializeAws_queryTargetList ( __getArrayIfSingleItem ( output [ "DBProxyTargets" ] [ "member" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryRemoveFromGlobalClusterResult = ( output , context ) : RemoveFromGlobalClusterResult => { const contents = { GlobalCluster : undefined , } ; if ( output [ "GlobalCluster" ] !== undefined ) { contents . GlobalCluster = deserializeAws_queryGlobalCluster ( output [ "GlobalCluster" ] , context ) ; } return contents ; } ; const deserializeAws_queryRemoveSourceIdentifierFromSubscriptionResult = ( output , context ) : RemoveSourceIdentifierFromSubscriptionResult => { const contents = { EventSubscription : undefined , } ; if ( output [ "EventSubscription" ] !== undefined ) { contents . EventSubscription = deserializeAws_queryEventSubscription ( output [ "EventSubscription" ] , context ) ; } return contents ; } ; const deserializeAws_queryReservedDBInstance = ( output , context ) : ReservedDBInstance => { const contents = { ReservedDBInstanceId : undefined , ReservedDBInstancesOfferingId : undefined , DBInstanceClass : undefined , StartTime : undefined , Duration : undefined , FixedPrice : undefined , UsagePrice : undefined , CurrencyCode : undefined , DBInstanceCount : undefined , ProductDescription : undefined , OfferingType : undefined , MultiAZ : undefined , State : undefined , RecurringCharges : undefined , ReservedDBInstanceArn : undefined , LeaseId : undefined , } ; if ( output [ "ReservedDBInstanceId" ] !== undefined ) { contents . ReservedDBInstanceId = __expectString ( output [ "ReservedDBInstanceId" ] ) ; } if ( output [ "ReservedDBInstancesOfferingId" ] !== undefined ) { contents . ReservedDBInstancesOfferingId = __expectString ( output [ "ReservedDBInstancesOfferingId" ] ) ; } if ( output [ "DBInstanceClass" ] !== undefined ) { contents . DBInstanceClass = __expectString ( output [ "DBInstanceClass" ] ) ; } if ( output [ "StartTime" ] !== undefined ) { contents . StartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "StartTime" ] ) ) ; } if ( output [ "Duration" ] !== undefined ) { contents . Duration = __strictParseInt32 ( output [ "Duration" ] ) as number ; } if ( output [ "FixedPrice" ] !== undefined ) { contents . FixedPrice = __strictParseFloat ( output [ "FixedPrice" ] ) as number ; } if ( output [ "UsagePrice" ] !== undefined ) { contents . UsagePrice = __strictParseFloat ( output [ "UsagePrice" ] ) as number ; } if ( output [ "CurrencyCode" ] !== undefined ) { contents . CurrencyCode = __expectString ( output [ "CurrencyCode" ] ) ; } if ( output [ "DBInstanceCount" ] !== undefined ) { contents . DBInstanceCount = __strictParseInt32 ( output [ "DBInstanceCount" ] ) as number ; } if ( output [ "ProductDescription" ] !== undefined ) { contents . ProductDescription = __expectString ( output [ "ProductDescription" ] ) ; } if ( output [ "OfferingType" ] !== undefined ) { contents . OfferingType = __expectString ( output [ "OfferingType" ] ) ; } if ( output [ "MultiAZ" ] !== undefined ) { contents . MultiAZ = __parseBoolean ( output [ "MultiAZ" ] ) ; } if ( output [ "State" ] !== undefined ) { contents . State = __expectString ( output [ "State" ] ) ; } if ( output . RecurringCharges === "" ) { contents . RecurringCharges = [ ] ; } if ( output [ "RecurringCharges" ] !== undefined && output [ "RecurringCharges" ] [ "RecurringCharge" ] !== undefined ) { contents . RecurringCharges = deserializeAws_queryRecurringChargeList ( __getArrayIfSingleItem ( output [ "RecurringCharges" ] [ "RecurringCharge" ] ) , context ) ; } if ( output [ "ReservedDBInstanceArn" ] !== undefined ) { contents . ReservedDBInstanceArn = __expectString ( output [ "ReservedDBInstanceArn" ] ) ; } if ( output [ "LeaseId" ] !== undefined ) { contents . LeaseId = __expectString ( output [ "LeaseId" ] ) ; } return contents ; } ; const deserializeAws_queryReservedDBInstanceAlreadyExistsFault = ( output , context ) : ReservedDBInstanceAlreadyExistsFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryReservedDBInstanceList = ( output , context ) : ReservedDBInstance [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryReservedDBInstance ( entry , context ) ; } ) ; } ; const deserializeAws_queryReservedDBInstanceMessage = ( output , context ) : ReservedDBInstanceMessage => { const contents = { Marker : undefined , ReservedDBInstances : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . ReservedDBInstances === "" ) { contents . ReservedDBInstances = [ ] ; } if ( output [ "ReservedDBInstances" ] !== undefined && output [ "ReservedDBInstances" ] [ "ReservedDBInstance" ] !== undefined ) { contents . ReservedDBInstances = deserializeAws_queryReservedDBInstanceList ( __getArrayIfSingleItem ( output [ "ReservedDBInstances" ] [ "ReservedDBInstance" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryReservedDBInstanceNotFoundFault = ( output , context ) : ReservedDBInstanceNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryReservedDBInstanceQuotaExceededFault = ( output , context ) : ReservedDBInstanceQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryReservedDBInstancesOffering = ( output , context ) : ReservedDBInstancesOffering => { const contents = { ReservedDBInstancesOfferingId : undefined , DBInstanceClass : undefined , Duration : undefined , FixedPrice : undefined , UsagePrice : undefined , CurrencyCode : undefined , ProductDescription : undefined , OfferingType : undefined , MultiAZ : undefined , RecurringCharges : undefined , } ; if ( output [ "ReservedDBInstancesOfferingId" ] !== undefined ) { contents . ReservedDBInstancesOfferingId = __expectString ( output [ "ReservedDBInstancesOfferingId" ] ) ; } if ( output [ "DBInstanceClass" ] !== undefined ) { contents . DBInstanceClass = __expectString ( output [ "DBInstanceClass" ] ) ; } if ( output [ "Duration" ] !== undefined ) { contents . Duration = __strictParseInt32 ( output [ "Duration" ] ) as number ; } if ( output [ "FixedPrice" ] !== undefined ) { contents . FixedPrice = __strictParseFloat ( output [ "FixedPrice" ] ) as number ; } if ( output [ "UsagePrice" ] !== undefined ) { contents . UsagePrice = __strictParseFloat ( output [ "UsagePrice" ] ) as number ; } if ( output [ "CurrencyCode" ] !== undefined ) { contents . CurrencyCode = __expectString ( output [ "CurrencyCode" ] ) ; } if ( output [ "ProductDescription" ] !== undefined ) { contents . ProductDescription = __expectString ( output [ "ProductDescription" ] ) ; } if ( output [ "OfferingType" ] !== undefined ) { contents . OfferingType = __expectString ( output [ "OfferingType" ] ) ; } if ( output [ "MultiAZ" ] !== undefined ) { contents . MultiAZ = __parseBoolean ( output [ "MultiAZ" ] ) ; } if ( output . RecurringCharges === "" ) { contents . RecurringCharges = [ ] ; } if ( output [ "RecurringCharges" ] !== undefined && output [ "RecurringCharges" ] [ "RecurringCharge" ] !== undefined ) { contents . RecurringCharges = deserializeAws_queryRecurringChargeList ( __getArrayIfSingleItem ( output [ "RecurringCharges" ] [ "RecurringCharge" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryReservedDBInstancesOfferingList = ( output , context ) : ReservedDBInstancesOffering [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryReservedDBInstancesOffering ( entry , context ) ; } ) ; } ; const deserializeAws_queryReservedDBInstancesOfferingMessage = ( output , context ) : ReservedDBInstancesOfferingMessage => { const contents = { Marker : undefined , ReservedDBInstancesOfferings : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . ReservedDBInstancesOfferings === "" ) { contents . ReservedDBInstancesOfferings = [ ] ; } if ( output [ "ReservedDBInstancesOfferings" ] !== undefined && output [ "ReservedDBInstancesOfferings" ] [ "ReservedDBInstancesOffering" ] !== undefined ) { contents . ReservedDBInstancesOfferings = deserializeAws_queryReservedDBInstancesOfferingList ( __getArrayIfSingleItem ( output [ "ReservedDBInstancesOfferings" ] [ "ReservedDBInstancesOffering" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryReservedDBInstancesOfferingNotFoundFault = ( output , context ) : ReservedDBInstancesOfferingNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryResourceNotFoundFault = ( output , context ) : ResourceNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryResourcePendingMaintenanceActions = ( output , context ) : ResourcePendingMaintenanceActions => { const contents = { ResourceIdentifier : undefined , PendingMaintenanceActionDetails : undefined , } ; if ( output [ "ResourceIdentifier" ] !== undefined ) { contents . ResourceIdentifier = __expectString ( output [ "ResourceIdentifier" ] ) ; } if ( output . PendingMaintenanceActionDetails === "" ) { contents . PendingMaintenanceActionDetails = [ ] ; } if ( output [ "PendingMaintenanceActionDetails" ] !== undefined && output [ "PendingMaintenanceActionDetails" ] [ "PendingMaintenanceAction" ] !== undefined ) { contents . PendingMaintenanceActionDetails = deserializeAws_queryPendingMaintenanceActionDetails ( __getArrayIfSingleItem ( output [ "PendingMaintenanceActionDetails" ] [ "PendingMaintenanceAction" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryRestoreDBClusterFromS3Result = ( output , context ) : RestoreDBClusterFromS3Result => { const contents = { DBCluster : undefined , } ; if ( output [ "DBCluster" ] !== undefined ) { contents . DBCluster = deserializeAws_queryDBCluster ( output [ "DBCluster" ] , context ) ; } return contents ; } ; const deserializeAws_queryRestoreDBClusterFromSnapshotResult = ( output , context ) : RestoreDBClusterFromSnapshotResult => { const contents = { DBCluster : undefined , } ; if ( output [ "DBCluster" ] !== undefined ) { contents . DBCluster = deserializeAws_queryDBCluster ( output [ "DBCluster" ] , context ) ; } return contents ; } ; const deserializeAws_queryRestoreDBClusterToPointInTimeResult = ( output , context ) : RestoreDBClusterToPointInTimeResult => { const contents = { DBCluster : undefined , } ; if ( output [ "DBCluster" ] !== undefined ) { contents . DBCluster = deserializeAws_queryDBCluster ( output [ "DBCluster" ] , context ) ; } return contents ; } ; const deserializeAws_queryRestoreDBInstanceFromDBSnapshotResult = ( output , context ) : RestoreDBInstanceFromDBSnapshotResult => { const contents = { DBInstance : undefined , } ; if ( output [ "DBInstance" ] !== undefined ) { contents . DBInstance = deserializeAws_queryDBInstance ( output [ "DBInstance" ] , context ) ; } return contents ; } ; const deserializeAws_queryRestoreDBInstanceFromS3Result = ( output , context ) : RestoreDBInstanceFromS3Result => { const contents = { DBInstance : undefined , } ; if ( output [ "DBInstance" ] !== undefined ) { contents . DBInstance = deserializeAws_queryDBInstance ( output [ "DBInstance" ] , context ) ; } return contents ; } ; const deserializeAws_queryRestoreDBInstanceToPointInTimeResult = ( output , context ) : RestoreDBInstanceToPointInTimeResult => { const contents = { DBInstance : undefined , } ; if ( output [ "DBInstance" ] !== undefined ) { contents . DBInstance = deserializeAws_queryDBInstance ( output [ "DBInstance" ] , context ) ; } return contents ; } ; const deserializeAws_queryRestoreWindow = ( output , context ) : RestoreWindow => { const contents = { EarliestTime : undefined , LatestTime : undefined , } ; if ( output [ "EarliestTime" ] !== undefined ) { contents . EarliestTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "EarliestTime" ] ) ) ; } if ( output [ "LatestTime" ] !== undefined ) { contents . LatestTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "LatestTime" ] ) ) ; } return contents ; } ; const deserializeAws_queryRevokeDBSecurityGroupIngressResult = ( output , context ) : RevokeDBSecurityGroupIngressResult => { const contents = { DBSecurityGroup : undefined , } ; if ( output [ "DBSecurityGroup" ] !== undefined ) { contents . DBSecurityGroup = deserializeAws_queryDBSecurityGroup ( output [ "DBSecurityGroup" ] , context ) ; } return contents ; } ; const deserializeAws_queryScalingConfigurationInfo = ( output , context ) : ScalingConfigurationInfo => { const contents = { MinCapacity : undefined , MaxCapacity : undefined , AutoPause : undefined , SecondsUntilAutoPause : undefined , TimeoutAction : undefined , SecondsBeforeTimeout : undefined , } ; if ( output [ "MinCapacity" ] !== undefined ) { contents . MinCapacity = __strictParseInt32 ( output [ "MinCapacity" ] ) as number ; } if ( output [ "MaxCapacity" ] !== undefined ) { contents . MaxCapacity = __strictParseInt32 ( output [ "MaxCapacity" ] ) as number ; } if ( output [ "AutoPause" ] !== undefined ) { contents . AutoPause = __parseBoolean ( output [ "AutoPause" ] ) ; } if ( output [ "SecondsUntilAutoPause" ] !== undefined ) { contents . SecondsUntilAutoPause = __strictParseInt32 ( output [ "SecondsUntilAutoPause" ] ) as number ; } if ( output [ "TimeoutAction" ] !== undefined ) { contents . TimeoutAction = __expectString ( output [ "TimeoutAction" ] ) ; } if ( output [ "SecondsBeforeTimeout" ] !== undefined ) { contents . SecondsBeforeTimeout = __strictParseInt32 ( output [ "SecondsBeforeTimeout" ] ) as number ; } return contents ; } ; const deserializeAws_querySharedSnapshotQuotaExceededFault = ( output , context ) : SharedSnapshotQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_querySnapshotQuotaExceededFault = ( output , context ) : SnapshotQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_querySNSInvalidTopicFault = ( output , context ) : SNSInvalidTopicFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_querySNSNoAuthorizationFault = ( output , context ) : SNSNoAuthorizationFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_querySNSTopicArnNotFoundFault = ( output , context ) : SNSTopicArnNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_querySourceIdsList = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_querySourceNotFoundFault = ( output , context ) : SourceNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_querySourceRegion = ( output , context ) : SourceRegion => { const contents = { RegionName : undefined , Endpoint : undefined , Status : undefined , SupportsDBInstanceAutomatedBackupsReplication : undefined , } ; if ( output [ "RegionName" ] !== undefined ) { contents . RegionName = __expectString ( output [ "RegionName" ] ) ; } if ( output [ "Endpoint" ] !== undefined ) { contents . Endpoint = __expectString ( output [ "Endpoint" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "SupportsDBInstanceAutomatedBackupsReplication" ] !== undefined ) { contents . SupportsDBInstanceAutomatedBackupsReplication = __parseBoolean ( output [ "SupportsDBInstanceAutomatedBackupsReplication" ] ) ; } return contents ; } ; const deserializeAws_querySourceRegionList = ( output , context ) : SourceRegion [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_querySourceRegion ( entry , context ) ; } ) ; } ; const deserializeAws_querySourceRegionMessage = ( output , context ) : SourceRegionMessage => { const contents = { Marker : undefined , SourceRegions : undefined , } ; if ( output [ "Marker" ] !== undefined ) { contents . Marker = __expectString ( output [ "Marker" ] ) ; } if ( output . SourceRegions === "" ) { contents . SourceRegions = [ ] ; } if ( output [ "SourceRegions" ] !== undefined && output [ "SourceRegions" ] [ "SourceRegion" ] !== undefined ) { contents . SourceRegions = deserializeAws_querySourceRegionList ( __getArrayIfSingleItem ( output [ "SourceRegions" ] [ "SourceRegion" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryStartActivityStreamResponse = ( output , context ) : StartActivityStreamResponse => { const contents = { KmsKeyId : undefined , KinesisStreamName : undefined , Status : undefined , Mode : undefined , ApplyImmediately : undefined , EngineNativeAuditFieldsIncluded : undefined , } ; if ( output [ "KmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "KmsKeyId" ] ) ; } if ( output [ "KinesisStreamName" ] !== undefined ) { contents . KinesisStreamName = __expectString ( output [ "KinesisStreamName" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } if ( output [ "Mode" ] !== undefined ) { contents . Mode = __expectString ( output [ "Mode" ] ) ; } if ( output [ "ApplyImmediately" ] !== undefined ) { contents . ApplyImmediately = __parseBoolean ( output [ "ApplyImmediately" ] ) ; } if ( output [ "EngineNativeAuditFieldsIncluded" ] !== undefined ) { contents . EngineNativeAuditFieldsIncluded = __parseBoolean ( output [ "EngineNativeAuditFieldsIncluded" ] ) ; } return contents ; } ; const deserializeAws_queryStartDBClusterResult = ( output , context ) : StartDBClusterResult => { const contents = { DBCluster : undefined , } ; if ( output [ "DBCluster" ] !== undefined ) { contents . DBCluster = deserializeAws_queryDBCluster ( output [ "DBCluster" ] , context ) ; } return contents ; } ; const deserializeAws_queryStartDBInstanceAutomatedBackupsReplicationResult = ( output , context ) : StartDBInstanceAutomatedBackupsReplicationResult => { const contents = { DBInstanceAutomatedBackup : undefined , } ; if ( output [ "DBInstanceAutomatedBackup" ] !== undefined ) { contents . DBInstanceAutomatedBackup = deserializeAws_queryDBInstanceAutomatedBackup ( output [ "DBInstanceAutomatedBackup" ] , context ) ; } return contents ; } ; const deserializeAws_queryStartDBInstanceResult = ( output , context ) : StartDBInstanceResult => { const contents = { DBInstance : undefined , } ; if ( output [ "DBInstance" ] !== undefined ) { contents . DBInstance = deserializeAws_queryDBInstance ( output [ "DBInstance" ] , context ) ; } return contents ; } ; const deserializeAws_queryStopActivityStreamResponse = ( output , context ) : StopActivityStreamResponse => { const contents = { KmsKeyId : undefined , KinesisStreamName : undefined , Status : undefined , } ; if ( output [ "KmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "KmsKeyId" ] ) ; } if ( output [ "KinesisStreamName" ] !== undefined ) { contents . KinesisStreamName = __expectString ( output [ "KinesisStreamName" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } return contents ; } ; const deserializeAws_queryStopDBClusterResult = ( output , context ) : StopDBClusterResult => { const contents = { DBCluster : undefined , } ; if ( output [ "DBCluster" ] !== undefined ) { contents . DBCluster = deserializeAws_queryDBCluster ( output [ "DBCluster" ] , context ) ; } return contents ; } ; const deserializeAws_queryStopDBInstanceAutomatedBackupsReplicationResult = ( output , context ) : StopDBInstanceAutomatedBackupsReplicationResult => { const contents = { DBInstanceAutomatedBackup : undefined , } ; if ( output [ "DBInstanceAutomatedBackup" ] !== undefined ) { contents . DBInstanceAutomatedBackup = deserializeAws_queryDBInstanceAutomatedBackup ( output [ "DBInstanceAutomatedBackup" ] , context ) ; } return contents ; } ; const deserializeAws_queryStopDBInstanceResult = ( output , context ) : StopDBInstanceResult => { const contents = { DBInstance : undefined , } ; if ( output [ "DBInstance" ] !== undefined ) { contents . DBInstance = deserializeAws_queryDBInstance ( output [ "DBInstance" ] , context ) ; } return contents ; } ; const deserializeAws_queryStorageQuotaExceededFault = ( output , context ) : StorageQuotaExceededFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryStorageTypeNotSupportedFault = ( output , context ) : StorageTypeNotSupportedFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_queryStringList = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_querySubnet = ( output , context ) : Subnet => { const contents = { SubnetIdentifier : undefined , SubnetAvailabilityZone : undefined , SubnetOutpost : undefined , SubnetStatus : undefined , } ; if ( output [ "SubnetIdentifier" ] !== undefined ) { contents . SubnetIdentifier = __expectString ( output [ "SubnetIdentifier" ] ) ; } if ( output [ "SubnetAvailabilityZone" ] !== undefined ) { contents . SubnetAvailabilityZone = deserializeAws_queryAvailabilityZone ( output [ "SubnetAvailabilityZone" ] , context ) ; } if ( output [ "SubnetOutpost" ] !== undefined ) { contents . SubnetOutpost = deserializeAws_queryOutpost ( output [ "SubnetOutpost" ] , context ) ; } if ( output [ "SubnetStatus" ] !== undefined ) { contents . SubnetStatus = __expectString ( output [ "SubnetStatus" ] ) ; } return contents ; } ; const deserializeAws_querySubnetAlreadyInUse = ( output , context ) : SubnetAlreadyInUse => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_querySubnetList = ( output , context ) : Subnet [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_querySubnet ( entry , context ) ; } ) ; } ; const deserializeAws_querySubscriptionAlreadyExistFault = ( output , context ) : SubscriptionAlreadyExistFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_querySubscriptionCategoryNotFoundFault = ( output , context ) : SubscriptionCategoryNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_querySubscriptionNotFoundFault = ( output , context ) : SubscriptionNotFoundFault => { const contents = { message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_querySupportedCharacterSetsList = ( output , context ) : CharacterSet [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryCharacterSet ( entry , context ) ; } ) ; } ; const deserializeAws_querySupportedTimezonesList = ( output , context ) : Timezone [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryTimezone ( entry , context ) ; } ) ; } ; const deserializeAws_queryTag = ( output , context ) : Tag => { const contents = { Key : undefined , Value : undefined , } ; if ( output [ "Key" ] !== undefined ) { contents . Key = __expectString ( output [ "Key" ] ) ; } if ( output [ "Value" ] !== undefined ) { contents . Value = __expectString ( output [ "Value" ] ) ; } return contents ; } ; const deserializeAws_queryTagList = ( output , context ) : Tag [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryTag ( entry , context ) ; } ) ; } ; const deserializeAws_queryTagListMessage = ( output , context ) : TagListMessage => { const contents = { TagList : undefined , } ; if ( output . TagList === "" ) { contents . TagList = [ ] ; } if ( output [ "TagList" ] !== undefined && output [ "TagList" ] [ "Tag" ] !== undefined ) { contents . TagList = deserializeAws_queryTagList ( __getArrayIfSingleItem ( output [ "TagList" ] [ "Tag" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryTargetGroupList = ( output , context ) : DBProxyTargetGroup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBProxyTargetGroup ( entry , context ) ; } ) ; } ; const deserializeAws_queryTargetHealth = ( output , context ) : TargetHealth => { const contents = { State : undefined , Reason : undefined , Description : undefined , } ; if ( output [ "State" ] !== undefined ) { contents . State = __expectString ( output [ "State" ] ) ; } if ( output [ "Reason" ] !== undefined ) { contents . Reason = __expectString ( output [ "Reason" ] ) ; } if ( output [ "Description" ] !== undefined ) { contents . Description = __expectString ( output [ "Description" ] ) ; } return contents ; } ; const deserializeAws_queryTargetList = ( output , context ) : DBProxyTarget [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryDBProxyTarget ( entry , context ) ; } ) ; } ; const deserializeAws_queryTimezone = ( output , context ) : Timezone => { const contents = { TimezoneName : undefined , } ; if ( output [ "TimezoneName" ] !== undefined ) { contents . TimezoneName = __expectString ( output [ "TimezoneName" ] ) ; } return contents ; } ; const deserializeAws_queryUpgradeTarget = ( output , context ) : UpgradeTarget => { const contents = { Engine : undefined , EngineVersion : undefined , Description : undefined , AutoUpgrade : undefined , IsMajorVersionUpgrade : undefined , SupportedEngineModes : undefined , SupportsParallelQuery : undefined , SupportsGlobalDatabases : undefined , } ; if ( output [ "Engine" ] !== undefined ) { contents . Engine = __expectString ( output [ "Engine" ] ) ; } if ( output [ "EngineVersion" ] !== undefined ) { contents . EngineVersion = __expectString ( output [ "EngineVersion" ] ) ; } if ( output [ "Description" ] !== undefined ) { contents . Description = __expectString ( output [ "Description" ] ) ; } if ( output [ "AutoUpgrade" ] !== undefined ) { contents . AutoUpgrade = __parseBoolean ( output [ "AutoUpgrade" ] ) ; } if ( output [ "IsMajorVersionUpgrade" ] !== undefined ) { contents . IsMajorVersionUpgrade = __parseBoolean ( output [ "IsMajorVersionUpgrade" ] ) ; } if ( output . SupportedEngineModes === "" ) { contents . SupportedEngineModes = [ ] ; } if ( output [ "SupportedEngineModes" ] !== undefined && output [ "SupportedEngineModes" ] [ "member" ] !== undefined ) { contents . SupportedEngineModes = deserializeAws_queryEngineModeList ( __getArrayIfSingleItem ( output [ "SupportedEngineModes" ] [ "member" ] ) , context ) ; } if ( output [ "SupportsParallelQuery" ] !== undefined ) { contents . SupportsParallelQuery = __parseBoolean ( output [ "SupportsParallelQuery" ] ) ; } if ( output [ "SupportsGlobalDatabases" ] !== undefined ) { contents . SupportsGlobalDatabases = __parseBoolean ( output [ "SupportsGlobalDatabases" ] ) ; } return contents ; } ; const deserializeAws_queryUserAuthConfigInfo = ( output , context ) : UserAuthConfigInfo => { const contents = { Description : undefined , UserName : undefined , AuthScheme : undefined , SecretArn : undefined , IAMAuth : undefined , } ; if ( output [ "Description" ] !== undefined ) { contents . Description = __expectString ( output [ "Description" ] ) ; } if ( output [ "UserName" ] !== undefined ) { contents . UserName = __expectString ( output [ "UserName" ] ) ; } if ( output [ "AuthScheme" ] !== undefined ) { contents . AuthScheme = __expectString ( output [ "AuthScheme" ] ) ; } if ( output [ "SecretArn" ] !== undefined ) { contents . SecretArn = __expectString ( output [ "SecretArn" ] ) ; } if ( output [ "IAMAuth" ] !== undefined ) { contents . IAMAuth = __expectString ( output [ "IAMAuth" ] ) ; } return contents ; } ; const deserializeAws_queryUserAuthConfigInfoList = ( output , context ) : UserAuthConfigInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryUserAuthConfigInfo ( entry , context ) ; } ) ; } ; const deserializeAws_queryValidDBInstanceModificationsMessage = ( output , context ) : ValidDBInstanceModificationsMessage => { const contents = { Storage : undefined , ValidProcessorFeatures : undefined , } ; if ( output . Storage === "" ) { contents . Storage = [ ] ; } if ( output [ "Storage" ] !== undefined && output [ "Storage" ] [ "ValidStorageOptions" ] !== undefined ) { contents . Storage = deserializeAws_queryValidStorageOptionsList ( __getArrayIfSingleItem ( output [ "Storage" ] [ "ValidStorageOptions" ] ) , context ) ; } if ( output . ValidProcessorFeatures === "" ) { contents . ValidProcessorFeatures = [ ] ; } if ( output [ "ValidProcessorFeatures" ] !== undefined && output [ "ValidProcessorFeatures" ] [ "AvailableProcessorFeature" ] !== undefined ) { contents . ValidProcessorFeatures = deserializeAws_queryAvailableProcessorFeatureList ( __getArrayIfSingleItem ( output [ "ValidProcessorFeatures" ] [ "AvailableProcessorFeature" ] ) , context ) ; } return contents ; } ; const deserializeAws_queryValidStorageOptions = ( output , context ) : ValidStorageOptions => { const contents = { StorageType : undefined , StorageSize : undefined , ProvisionedIops : undefined , IopsToStorageRatio : undefined , SupportsStorageAutoscaling : undefined , } ; if ( output [ "StorageType" ] !== undefined ) { contents . StorageType = __expectString ( output [ "StorageType" ] ) ; } if ( output . StorageSize === "" ) { contents . StorageSize = [ ] ; } if ( output [ "StorageSize" ] !== undefined && output [ "StorageSize" ] [ "Range" ] !== undefined ) { contents . StorageSize = deserializeAws_queryRangeList ( __getArrayIfSingleItem ( output [ "StorageSize" ] [ "Range" ] ) , context ) ; } if ( output . ProvisionedIops === "" ) { contents . ProvisionedIops = [ ] ; } if ( output [ "ProvisionedIops" ] !== undefined && output [ "ProvisionedIops" ] [ "Range" ] !== undefined ) { contents . ProvisionedIops = deserializeAws_queryRangeList ( __getArrayIfSingleItem ( output [ "ProvisionedIops" ] [ "Range" ] ) , context ) ; } if ( output . IopsToStorageRatio === "" ) { contents . IopsToStorageRatio = [ ] ; } if ( output [ "IopsToStorageRatio" ] !== undefined && output [ "IopsToStorageRatio" ] [ "DoubleRange" ] !== undefined ) { contents . IopsToStorageRatio = deserializeAws_queryDoubleRangeList ( __getArrayIfSingleItem ( output [ "IopsToStorageRatio" ] [ "DoubleRange" ] ) , context ) ; } if ( output [ "SupportsStorageAutoscaling" ] !== undefined ) { contents . SupportsStorageAutoscaling = __parseBoolean ( output [ "SupportsStorageAutoscaling" ] ) ; } return contents ; } ; const deserializeAws_queryValidStorageOptionsList = ( output , context ) : ValidStorageOptions [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryValidStorageOptions ( entry , context ) ; } ) ; } ; const deserializeAws_queryValidUpgradeTargetList = ( output , context ) : UpgradeTarget [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryUpgradeTarget ( entry , context ) ; } ) ; } ; const deserializeAws_queryVpcSecurityGroupMembership = ( output , context ) : VpcSecurityGroupMembership => { const contents = { VpcSecurityGroupId : undefined , Status : undefined , } ; if ( output [ "VpcSecurityGroupId" ] !== undefined ) { contents . VpcSecurityGroupId = __expectString ( output [ "VpcSecurityGroupId" ] ) ; } if ( output [ "Status" ] !== undefined ) { contents . Status = __expectString ( output [ "Status" ] ) ; } return contents ; } ; const deserializeAws_queryVpcSecurityGroupMembershipList = ( output , context ) : VpcSecurityGroupMembership [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_queryVpcSecurityGroupMembership ( entry , context ) ; } ) ; } ; const deserializeAws_queryVpnDetails = ( output , context ) : VpnDetails => { const contents = { VpnId : undefined , VpnTunnelOriginatorIP : undefined , VpnGatewayIp : undefined , VpnPSK : undefined , VpnName : undefined , VpnState : undefined , } ; if ( output [ "VpnId" ] !== undefined ) { contents . VpnId = __expectString ( output [ "VpnId" ] ) ; } if ( output [ "VpnTunnelOriginatorIP" ] !== undefined ) { contents . VpnTunnelOriginatorIP = __expectString ( output [ "VpnTunnelOriginatorIP" ] ) ; } if ( output [ "VpnGatewayIp" ] !== undefined ) { contents . VpnGatewayIp = __expectString ( output [ "VpnGatewayIp" ] ) ; } if ( output [ "VpnPSK" ] !== undefined ) { contents . VpnPSK = __expectString ( output [ "VpnPSK" ] ) ; } if ( output [ "VpnName" ] !== undefined ) { contents . VpnName = __expectString ( output [ "VpnName" ] ) ; } if ( output [ "VpnState" ] !== undefined ) { contents . VpnState = __expectString ( output [ "VpnState" ] ) ; } return contents ; } ; const deserializeMetadata = ( output ) : __ResponseMetadata => ( { httpStatusCode : output . statusCode , requestId : output . headers [ "x-amzn-requestid" ] ?? output . headers [ "x-amzn-request-id" ] , extendedRequestId : output . headers [ "x-amz-id-2" ] , cfId : output . headers [ "x-amz-cf-id" ] , } ) ; const collectBody = ( streamBody = new Uint8Array ( ) , context ) : Promise < Uint8Array > => { if ( streamBody instanceof Uint8Array ) { return Promise . resolve ( streamBody ) ; } return context . streamCollector ( streamBody ) || Promise . resolve ( new Uint8Array ( ) ) ; } ; const collectBodyString = ( streamBody , context ) : Promise < string > => collectBody ( streamBody , context ) . then ( ( body ) => context . utf8Encoder ( body ) ) ; const buildHttpRpcRequest = async ( context , headers , path , resolvedHostname , body ) : Promise < __HttpRequest > => { const { hostname , protocol = "https" , port , path : basePath } = await context . endpoint ( ) ; const contents = { protocol , hostname , port , method : "POST" , path : basePath . endsWith ( "/" ) ? basePath . slice ( 0 , - 1 ) + path : basePath + path , headers , } ; if ( resolvedHostname !== undefined ) { contents . hostname = resolvedHostname ; } if ( body !== undefined ) { contents . body = body ; } return new __HttpRequest ( contents ) ; } ; const parseBody = ( streamBody , context ) : any => collectBodyString ( streamBody , context ) . then ( ( encoded ) => { if ( encoded . length ) { const parsedObj = xmlParse ( encoded , { attributeNamePrefix : "" , ignoreAttributes : false , parseNodeValue : false , trimValues : false , tagValueProcessor : ( val ) => ( val . trim ( ) === "" && val . includes ( "\n" ) ? "" : decodeHTML ( val ) ) , } ) ; const textNodeName = "#text" ; const key = Object . keys ( parsedObj ) [ 0 ] ; const parsedObjToReturn = parsedObj [ key ] ; if ( parsedObjToReturn [ textNodeName ] ) { parsedObjToReturn [ key ] = parsedObjToReturn [ textNodeName ] ; delete parsedObjToReturn [ textNodeName ] ; } return __getValueFromTextNode ( parsedObjToReturn ) ; } return { } ; } ) ; const buildFormUrlencodedString = ( formEntries ) : string => Object . entries ( formEntries ) . map ( ( [ key , value ] ) => __extendedEncodeURIComponent ( key ) + "=" + __extendedEncodeURIComponent ( value ) ) . join ( "&" ) ; const loadQueryErrorCode = ( output , data ) : string => { if ( data . Error . Code !== undefined ) { return data . Error . Code ; } if ( output . statusCode == 404 ) { return "NotFound" ; } return "" ; } ;