import { HttpRequest as __HttpRequest , HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http" ; import { expectBoolean as __expectBoolean , expectInt32 as __expectInt32 , expectLong as __expectLong , expectNonNull as __expectNonNull , expectNumber as __expectNumber , expectString as __expectString , parseEpochTimestamp as __parseEpochTimestamp , } 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 { AddTagsToResourceCommandInput , AddTagsToResourceCommandOutput } from "../commands/AddTagsToResourceCommand" ; import { ApplyPendingMaintenanceActionCommandInput , ApplyPendingMaintenanceActionCommandOutput , } from "../commands/ApplyPendingMaintenanceActionCommand" ; import { CancelReplicationTaskAssessmentRunCommandInput , CancelReplicationTaskAssessmentRunCommandOutput , } from "../commands/CancelReplicationTaskAssessmentRunCommand" ; import { CreateEndpointCommandInput , CreateEndpointCommandOutput } from "../commands/CreateEndpointCommand" ; import { CreateEventSubscriptionCommandInput , CreateEventSubscriptionCommandOutput , } from "../commands/CreateEventSubscriptionCommand" ; import { CreateReplicationInstanceCommandInput , CreateReplicationInstanceCommandOutput , } from "../commands/CreateReplicationInstanceCommand" ; import { CreateReplicationSubnetGroupCommandInput , CreateReplicationSubnetGroupCommandOutput , } from "../commands/CreateReplicationSubnetGroupCommand" ; import { CreateReplicationTaskCommandInput , CreateReplicationTaskCommandOutput , } from "../commands/CreateReplicationTaskCommand" ; import { DeleteCertificateCommandInput , DeleteCertificateCommandOutput } from "../commands/DeleteCertificateCommand" ; import { DeleteConnectionCommandInput , DeleteConnectionCommandOutput } from "../commands/DeleteConnectionCommand" ; import { DeleteEndpointCommandInput , DeleteEndpointCommandOutput } from "../commands/DeleteEndpointCommand" ; import { DeleteEventSubscriptionCommandInput , DeleteEventSubscriptionCommandOutput , } from "../commands/DeleteEventSubscriptionCommand" ; import { DeleteReplicationInstanceCommandInput , DeleteReplicationInstanceCommandOutput , } from "../commands/DeleteReplicationInstanceCommand" ; import { DeleteReplicationSubnetGroupCommandInput , DeleteReplicationSubnetGroupCommandOutput , } from "../commands/DeleteReplicationSubnetGroupCommand" ; import { DeleteReplicationTaskAssessmentRunCommandInput , DeleteReplicationTaskAssessmentRunCommandOutput , } from "../commands/DeleteReplicationTaskAssessmentRunCommand" ; import { DeleteReplicationTaskCommandInput , DeleteReplicationTaskCommandOutput , } from "../commands/DeleteReplicationTaskCommand" ; import { DescribeAccountAttributesCommandInput , DescribeAccountAttributesCommandOutput , } from "../commands/DescribeAccountAttributesCommand" ; import { DescribeApplicableIndividualAssessmentsCommandInput , DescribeApplicableIndividualAssessmentsCommandOutput , } from "../commands/DescribeApplicableIndividualAssessmentsCommand" ; import { DescribeCertificatesCommandInput , DescribeCertificatesCommandOutput , } from "../commands/DescribeCertificatesCommand" ; import { DescribeConnectionsCommandInput , DescribeConnectionsCommandOutput , } from "../commands/DescribeConnectionsCommand" ; import { DescribeEndpointsCommandInput , DescribeEndpointsCommandOutput } from "../commands/DescribeEndpointsCommand" ; import { DescribeEndpointSettingsCommandInput , DescribeEndpointSettingsCommandOutput , } from "../commands/DescribeEndpointSettingsCommand" ; import { DescribeEndpointTypesCommandInput , DescribeEndpointTypesCommandOutput , } from "../commands/DescribeEndpointTypesCommand" ; import { DescribeEventCategoriesCommandInput , DescribeEventCategoriesCommandOutput , } from "../commands/DescribeEventCategoriesCommand" ; import { DescribeEventsCommandInput , DescribeEventsCommandOutput } from "../commands/DescribeEventsCommand" ; import { DescribeEventSubscriptionsCommandInput , DescribeEventSubscriptionsCommandOutput , } from "../commands/DescribeEventSubscriptionsCommand" ; import { DescribeOrderableReplicationInstancesCommandInput , DescribeOrderableReplicationInstancesCommandOutput , } from "../commands/DescribeOrderableReplicationInstancesCommand" ; import { DescribePendingMaintenanceActionsCommandInput , DescribePendingMaintenanceActionsCommandOutput , } from "../commands/DescribePendingMaintenanceActionsCommand" ; import { DescribeRefreshSchemasStatusCommandInput , DescribeRefreshSchemasStatusCommandOutput , } from "../commands/DescribeRefreshSchemasStatusCommand" ; import { DescribeReplicationInstancesCommandInput , DescribeReplicationInstancesCommandOutput , } from "../commands/DescribeReplicationInstancesCommand" ; import { DescribeReplicationInstanceTaskLogsCommandInput , DescribeReplicationInstanceTaskLogsCommandOutput , } from "../commands/DescribeReplicationInstanceTaskLogsCommand" ; import { DescribeReplicationSubnetGroupsCommandInput , DescribeReplicationSubnetGroupsCommandOutput , } from "../commands/DescribeReplicationSubnetGroupsCommand" ; import { DescribeReplicationTaskAssessmentResultsCommandInput , DescribeReplicationTaskAssessmentResultsCommandOutput , } from "../commands/DescribeReplicationTaskAssessmentResultsCommand" ; import { DescribeReplicationTaskAssessmentRunsCommandInput , DescribeReplicationTaskAssessmentRunsCommandOutput , } from "../commands/DescribeReplicationTaskAssessmentRunsCommand" ; import { DescribeReplicationTaskIndividualAssessmentsCommandInput , DescribeReplicationTaskIndividualAssessmentsCommandOutput , } from "../commands/DescribeReplicationTaskIndividualAssessmentsCommand" ; import { DescribeReplicationTasksCommandInput , DescribeReplicationTasksCommandOutput , } from "../commands/DescribeReplicationTasksCommand" ; import { DescribeSchemasCommandInput , DescribeSchemasCommandOutput } from "../commands/DescribeSchemasCommand" ; import { DescribeTableStatisticsCommandInput , DescribeTableStatisticsCommandOutput , } from "../commands/DescribeTableStatisticsCommand" ; import { ImportCertificateCommandInput , ImportCertificateCommandOutput } from "../commands/ImportCertificateCommand" ; import { ListTagsForResourceCommandInput , ListTagsForResourceCommandOutput , } from "../commands/ListTagsForResourceCommand" ; import { ModifyEndpointCommandInput , ModifyEndpointCommandOutput } from "../commands/ModifyEndpointCommand" ; import { ModifyEventSubscriptionCommandInput , ModifyEventSubscriptionCommandOutput , } from "../commands/ModifyEventSubscriptionCommand" ; import { ModifyReplicationInstanceCommandInput , ModifyReplicationInstanceCommandOutput , } from "../commands/ModifyReplicationInstanceCommand" ; import { ModifyReplicationSubnetGroupCommandInput , ModifyReplicationSubnetGroupCommandOutput , } from "../commands/ModifyReplicationSubnetGroupCommand" ; import { ModifyReplicationTaskCommandInput , ModifyReplicationTaskCommandOutput , } from "../commands/ModifyReplicationTaskCommand" ; import { MoveReplicationTaskCommandInput , MoveReplicationTaskCommandOutput , } from "../commands/MoveReplicationTaskCommand" ; import { RebootReplicationInstanceCommandInput , RebootReplicationInstanceCommandOutput , } from "../commands/RebootReplicationInstanceCommand" ; import { RefreshSchemasCommandInput , RefreshSchemasCommandOutput } from "../commands/RefreshSchemasCommand" ; import { ReloadTablesCommandInput , ReloadTablesCommandOutput } from "../commands/ReloadTablesCommand" ; import { RemoveTagsFromResourceCommandInput , RemoveTagsFromResourceCommandOutput , } from "../commands/RemoveTagsFromResourceCommand" ; import { StartReplicationTaskAssessmentCommandInput , StartReplicationTaskAssessmentCommandOutput , } from "../commands/StartReplicationTaskAssessmentCommand" ; import { StartReplicationTaskAssessmentRunCommandInput , StartReplicationTaskAssessmentRunCommandOutput , } from "../commands/StartReplicationTaskAssessmentRunCommand" ; import { StartReplicationTaskCommandInput , StartReplicationTaskCommandOutput , } from "../commands/StartReplicationTaskCommand" ; import { StopReplicationTaskCommandInput , StopReplicationTaskCommandOutput , } from "../commands/StopReplicationTaskCommand" ; import { TestConnectionCommandInput , TestConnectionCommandOutput } from "../commands/TestConnectionCommand" ; import { AccessDeniedFault , AccountQuota , AddTagsToResourceMessage , AddTagsToResourceResponse , ApplyPendingMaintenanceActionMessage , ApplyPendingMaintenanceActionResponse , AvailabilityZone , CancelReplicationTaskAssessmentRunMessage , CancelReplicationTaskAssessmentRunResponse , Certificate , Connection , CreateEndpointMessage , CreateEndpointResponse , CreateEventSubscriptionMessage , CreateEventSubscriptionResponse , CreateReplicationInstanceMessage , CreateReplicationInstanceResponse , CreateReplicationSubnetGroupMessage , CreateReplicationSubnetGroupResponse , CreateReplicationTaskMessage , CreateReplicationTaskResponse , DeleteCertificateMessage , DeleteCertificateResponse , DeleteConnectionMessage , DeleteConnectionResponse , DeleteEndpointMessage , DeleteEndpointResponse , DeleteEventSubscriptionMessage , DeleteEventSubscriptionResponse , DeleteReplicationInstanceMessage , DeleteReplicationInstanceResponse , DeleteReplicationSubnetGroupMessage , DeleteReplicationSubnetGroupResponse , DeleteReplicationTaskAssessmentRunMessage , DeleteReplicationTaskAssessmentRunResponse , DeleteReplicationTaskMessage , DeleteReplicationTaskResponse , DescribeAccountAttributesMessage , DescribeAccountAttributesResponse , DescribeApplicableIndividualAssessmentsMessage , DescribeApplicableIndividualAssessmentsResponse , DescribeCertificatesMessage , DescribeCertificatesResponse , DescribeConnectionsMessage , DescribeConnectionsResponse , DescribeEndpointSettingsMessage , DescribeEndpointSettingsResponse , DescribeEndpointsMessage , DescribeEndpointsResponse , DescribeEndpointTypesMessage , DescribeEndpointTypesResponse , DescribeEventCategoriesMessage , DescribeEventCategoriesResponse , DescribeEventsMessage , DescribeEventsResponse , DescribeEventSubscriptionsMessage , DescribeEventSubscriptionsResponse , DescribeOrderableReplicationInstancesMessage , DescribeOrderableReplicationInstancesResponse , DescribePendingMaintenanceActionsMessage , DescribePendingMaintenanceActionsResponse , DescribeRefreshSchemasStatusMessage , DescribeRefreshSchemasStatusResponse , DescribeReplicationInstancesMessage , DescribeReplicationInstancesResponse , DescribeReplicationInstanceTaskLogsMessage , DescribeReplicationInstanceTaskLogsResponse , DescribeReplicationSubnetGroupsMessage , DescribeReplicationSubnetGroupsResponse , DescribeReplicationTaskAssessmentResultsMessage , DescribeReplicationTaskAssessmentResultsResponse , DescribeReplicationTaskAssessmentRunsMessage , DescribeReplicationTaskAssessmentRunsResponse , DescribeReplicationTaskIndividualAssessmentsMessage , DescribeReplicationTaskIndividualAssessmentsResponse , DescribeReplicationTasksMessage , DescribeReplicationTasksResponse , DescribeSchemasMessage , DescribeSchemasResponse , DescribeTableStatisticsMessage , DescribeTableStatisticsResponse , DmsTransferSettings , DocDbSettings , DynamoDbSettings , ElasticsearchSettings , Endpoint , EndpointSetting , Event , EventCategoryGroup , EventSubscription , Filter , GcpMySQLSettings , IBMDb2Settings , ImportCertificateMessage , ImportCertificateResponse , InsufficientResourceCapacityFault , InvalidCertificateFault , InvalidResourceStateFault , InvalidSubnet , KafkaSettings , KinesisSettings , KMSAccessDeniedFault , KMSDisabledFault , KMSFault , KMSInvalidStateFault , KMSKeyNotAccessibleFault , KMSNotFoundFault , KMSThrottlingFault , ListTagsForResourceMessage , ListTagsForResourceResponse , MicrosoftSQLServerSettings , ModifyEndpointMessage , ModifyEndpointResponse , ModifyEventSubscriptionMessage , ModifyEventSubscriptionResponse , ModifyReplicationInstanceMessage , ModifyReplicationInstanceResponse , ModifyReplicationSubnetGroupMessage , ModifyReplicationSubnetGroupResponse , ModifyReplicationTaskMessage , ModifyReplicationTaskResponse , MongoDbSettings , MoveReplicationTaskMessage , MoveReplicationTaskResponse , MySQLSettings , NeptuneSettings , OracleSettings , OrderableReplicationInstance , PendingMaintenanceAction , PostgreSQLSettings , RebootReplicationInstanceMessage , RebootReplicationInstanceResponse , RedisSettings , RedshiftSettings , RefreshSchemasMessage , RefreshSchemasResponse , RefreshSchemasStatus , ReloadTablesMessage , ReloadTablesResponse , RemoveTagsFromResourceMessage , RemoveTagsFromResourceResponse , ReplicationInstance , ReplicationInstanceTaskLog , ReplicationPendingModifiedValues , ReplicationSubnetGroup , ReplicationSubnetGroupDoesNotCoverEnoughAZs , ReplicationTask , ReplicationTaskAssessmentResult , ReplicationTaskAssessmentRun , ReplicationTaskAssessmentRunProgress , ReplicationTaskIndividualAssessment , ReplicationTaskStats , ResourceAlreadyExistsFault , ResourceNotFoundFault , ResourcePendingMaintenanceActions , ResourceQuotaExceededFault , S3AccessDeniedFault , S3ResourceNotFoundFault , S3Settings , SNSInvalidTopicFault , SNSNoAuthorizationFault , StartReplicationTaskAssessmentMessage , StartReplicationTaskAssessmentResponse , StartReplicationTaskAssessmentRunMessage , StartReplicationTaskAssessmentRunResponse , StartReplicationTaskMessage , StartReplicationTaskResponse , StopReplicationTaskMessage , StopReplicationTaskResponse , StorageQuotaExceededFault , Subnet , SubnetAlreadyInUse , SupportedEndpointType , SybaseSettings , TableStatistics , TableToReload , Tag , TestConnectionMessage , TestConnectionResponse , UpgradeDependencyFailureFault , VpcSecurityGroupMembership , } from "../models/models_0" ; export const serializeAws_json1_1AddTagsToResourceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.AddTagsToResource" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1AddTagsToResourceMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ApplyPendingMaintenanceActionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.ApplyPendingMaintenanceAction" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ApplyPendingMaintenanceActionMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CancelReplicationTaskAssessmentRunCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.CancelReplicationTaskAssessmentRun" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CancelReplicationTaskAssessmentRunMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateEndpointCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.CreateEndpoint" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateEndpointMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateEventSubscriptionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.CreateEventSubscription" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateEventSubscriptionMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateReplicationInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.CreateReplicationInstance" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateReplicationInstanceMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateReplicationSubnetGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.CreateReplicationSubnetGroup" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateReplicationSubnetGroupMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateReplicationTaskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.CreateReplicationTask" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateReplicationTaskMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteCertificateCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DeleteCertificate" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteCertificateMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteConnectionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DeleteConnection" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteConnectionMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteEndpointCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DeleteEndpoint" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteEndpointMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteEventSubscriptionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DeleteEventSubscription" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteEventSubscriptionMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteReplicationInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DeleteReplicationInstance" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteReplicationInstanceMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteReplicationSubnetGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DeleteReplicationSubnetGroup" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteReplicationSubnetGroupMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteReplicationTaskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DeleteReplicationTask" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteReplicationTaskMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteReplicationTaskAssessmentRunCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DeleteReplicationTaskAssessmentRun" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteReplicationTaskAssessmentRunMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeAccountAttributesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeAccountAttributes" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeAccountAttributesMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeApplicableIndividualAssessmentsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeApplicableIndividualAssessments" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeApplicableIndividualAssessmentsMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeCertificatesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeCertificates" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeCertificatesMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeConnectionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeConnections" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeConnectionsMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeEndpointsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeEndpoints" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeEndpointsMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeEndpointSettingsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeEndpointSettings" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeEndpointSettingsMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeEndpointTypesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeEndpointTypes" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeEndpointTypesMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeEventCategoriesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeEventCategories" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeEventCategoriesMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeEventsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeEvents" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeEventsMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeEventSubscriptionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeEventSubscriptions" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeEventSubscriptionsMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeOrderableReplicationInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeOrderableReplicationInstances" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeOrderableReplicationInstancesMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribePendingMaintenanceActionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribePendingMaintenanceActions" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribePendingMaintenanceActionsMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeRefreshSchemasStatusCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeRefreshSchemasStatus" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeRefreshSchemasStatusMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeReplicationInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeReplicationInstances" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeReplicationInstancesMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeReplicationInstanceTaskLogsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeReplicationInstanceTaskLogs" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeReplicationInstanceTaskLogsMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeReplicationSubnetGroupsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeReplicationSubnetGroups" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeReplicationSubnetGroupsMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeReplicationTaskAssessmentResultsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeReplicationTaskAssessmentResults" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeReplicationTaskAssessmentResultsMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeReplicationTaskAssessmentRunsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeReplicationTaskAssessmentRuns" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeReplicationTaskAssessmentRunsMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeReplicationTaskIndividualAssessmentsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeReplicationTaskIndividualAssessments" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeReplicationTaskIndividualAssessmentsMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeReplicationTasksCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeReplicationTasks" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeReplicationTasksMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeSchemasCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeSchemas" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeSchemasMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeTableStatisticsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.DescribeTableStatistics" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeTableStatisticsMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ImportCertificateCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.ImportCertificate" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ImportCertificateMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ListTagsForResourceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.ListTagsForResource" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ListTagsForResourceMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ModifyEndpointCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.ModifyEndpoint" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ModifyEndpointMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ModifyEventSubscriptionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.ModifyEventSubscription" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ModifyEventSubscriptionMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ModifyReplicationInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.ModifyReplicationInstance" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ModifyReplicationInstanceMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ModifyReplicationSubnetGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.ModifyReplicationSubnetGroup" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ModifyReplicationSubnetGroupMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ModifyReplicationTaskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.ModifyReplicationTask" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ModifyReplicationTaskMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1MoveReplicationTaskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.MoveReplicationTask" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1MoveReplicationTaskMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1RebootReplicationInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.RebootReplicationInstance" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1RebootReplicationInstanceMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1RefreshSchemasCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.RefreshSchemas" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1RefreshSchemasMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ReloadTablesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.ReloadTables" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ReloadTablesMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1RemoveTagsFromResourceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.RemoveTagsFromResource" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1RemoveTagsFromResourceMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1StartReplicationTaskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.StartReplicationTask" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1StartReplicationTaskMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1StartReplicationTaskAssessmentCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.StartReplicationTaskAssessment" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1StartReplicationTaskAssessmentMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1StartReplicationTaskAssessmentRunCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.StartReplicationTaskAssessmentRun" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1StartReplicationTaskAssessmentRunMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1StopReplicationTaskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.StopReplicationTask" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1StopReplicationTaskMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1TestConnectionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "AmazonDMSv20160101.TestConnection" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1TestConnectionMessage ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const deserializeAws_json1_1AddTagsToResourceCommand = async ( output , context ) : Promise < AddTagsToResourceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1AddTagsToResourceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1AddTagsToResourceResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1AddTagsToResourceCommandError = async ( output , context ) : Promise < AddTagsToResourceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1ApplyPendingMaintenanceActionCommand = async ( output , context ) : Promise < ApplyPendingMaintenanceActionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ApplyPendingMaintenanceActionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ApplyPendingMaintenanceActionResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ApplyPendingMaintenanceActionCommandError = async ( output , context ) : Promise < ApplyPendingMaintenanceActionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1CancelReplicationTaskAssessmentRunCommand = async ( output , context ) : Promise < CancelReplicationTaskAssessmentRunCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CancelReplicationTaskAssessmentRunCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CancelReplicationTaskAssessmentRunResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CancelReplicationTaskAssessmentRunCommandError = async ( output , context ) : Promise < CancelReplicationTaskAssessmentRunCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1CreateEndpointCommand = async ( output , context ) : Promise < CreateEndpointCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateEndpointCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateEndpointResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateEndpointCommandError = async ( output , context ) : Promise < CreateEndpointCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.databasemigrationservice#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_json1_1KMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceAlreadyExistsFault" : case "com.amazonaws.databasemigrationservice#ResourceAlreadyExistsFault" : response = { ... ( await deserializeAws_json1_1ResourceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceQuotaExceededFault" : case "com.amazonaws.databasemigrationservice#ResourceQuotaExceededFault" : response = { ... ( await deserializeAws_json1_1ResourceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "S3AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#S3AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1S3AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1CreateEventSubscriptionCommand = async ( output , context ) : Promise < CreateEventSubscriptionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateEventSubscriptionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateEventSubscriptionResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateEventSubscriptionCommandError = async ( output , context ) : Promise < CreateEventSubscriptionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "KMSAccessDeniedFault" : case "com.amazonaws.databasemigrationservice#KMSAccessDeniedFault" : response = { ... ( await deserializeAws_json1_1KMSAccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSDisabledFault" : case "com.amazonaws.databasemigrationservice#KMSDisabledFault" : response = { ... ( await deserializeAws_json1_1KMSDisabledFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSInvalidStateFault" : case "com.amazonaws.databasemigrationservice#KMSInvalidStateFault" : response = { ... ( await deserializeAws_json1_1KMSInvalidStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSNotFoundFault" : case "com.amazonaws.databasemigrationservice#KMSNotFoundFault" : response = { ... ( await deserializeAws_json1_1KMSNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSThrottlingFault" : case "com.amazonaws.databasemigrationservice#KMSThrottlingFault" : response = { ... ( await deserializeAws_json1_1KMSThrottlingFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceAlreadyExistsFault" : case "com.amazonaws.databasemigrationservice#ResourceAlreadyExistsFault" : response = { ... ( await deserializeAws_json1_1ResourceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceQuotaExceededFault" : case "com.amazonaws.databasemigrationservice#ResourceQuotaExceededFault" : response = { ... ( await deserializeAws_json1_1ResourceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SNSInvalidTopicFault" : case "com.amazonaws.databasemigrationservice#SNSInvalidTopicFault" : response = { ... ( await deserializeAws_json1_1SNSInvalidTopicFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SNSNoAuthorizationFault" : case "com.amazonaws.databasemigrationservice#SNSNoAuthorizationFault" : response = { ... ( await deserializeAws_json1_1SNSNoAuthorizationFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1CreateReplicationInstanceCommand = async ( output , context ) : Promise < CreateReplicationInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateReplicationInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateReplicationInstanceResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateReplicationInstanceCommandError = async ( output , context ) : Promise < CreateReplicationInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientResourceCapacityFault" : case "com.amazonaws.databasemigrationservice#InsufficientResourceCapacityFault" : response = { ... ( await deserializeAws_json1_1InsufficientResourceCapacityFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.databasemigrationservice#InvalidSubnet" : response = { ... ( await deserializeAws_json1_1InvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.databasemigrationservice#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_json1_1KMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ReplicationSubnetGroupDoesNotCoverEnoughAZs" : case "com.amazonaws.databasemigrationservice#ReplicationSubnetGroupDoesNotCoverEnoughAZs" : response = { ... ( await deserializeAws_json1_1ReplicationSubnetGroupDoesNotCoverEnoughAZsResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceAlreadyExistsFault" : case "com.amazonaws.databasemigrationservice#ResourceAlreadyExistsFault" : response = { ... ( await deserializeAws_json1_1ResourceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceQuotaExceededFault" : case "com.amazonaws.databasemigrationservice#ResourceQuotaExceededFault" : response = { ... ( await deserializeAws_json1_1ResourceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageQuotaExceededFault" : case "com.amazonaws.databasemigrationservice#StorageQuotaExceededFault" : response = { ... ( await deserializeAws_json1_1StorageQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1CreateReplicationSubnetGroupCommand = async ( output , context ) : Promise < CreateReplicationSubnetGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateReplicationSubnetGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateReplicationSubnetGroupResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateReplicationSubnetGroupCommandError = async ( output , context ) : Promise < CreateReplicationSubnetGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.databasemigrationservice#InvalidSubnet" : response = { ... ( await deserializeAws_json1_1InvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ReplicationSubnetGroupDoesNotCoverEnoughAZs" : case "com.amazonaws.databasemigrationservice#ReplicationSubnetGroupDoesNotCoverEnoughAZs" : response = { ... ( await deserializeAws_json1_1ReplicationSubnetGroupDoesNotCoverEnoughAZsResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceAlreadyExistsFault" : case "com.amazonaws.databasemigrationservice#ResourceAlreadyExistsFault" : response = { ... ( await deserializeAws_json1_1ResourceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceQuotaExceededFault" : case "com.amazonaws.databasemigrationservice#ResourceQuotaExceededFault" : response = { ... ( await deserializeAws_json1_1ResourceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1CreateReplicationTaskCommand = async ( output , context ) : Promise < CreateReplicationTaskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateReplicationTaskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateReplicationTaskResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateReplicationTaskCommandError = async ( output , context ) : Promise < CreateReplicationTaskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.databasemigrationservice#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_json1_1KMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceAlreadyExistsFault" : case "com.amazonaws.databasemigrationservice#ResourceAlreadyExistsFault" : response = { ... ( await deserializeAws_json1_1ResourceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceQuotaExceededFault" : case "com.amazonaws.databasemigrationservice#ResourceQuotaExceededFault" : response = { ... ( await deserializeAws_json1_1ResourceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DeleteCertificateCommand = async ( output , context ) : Promise < DeleteCertificateCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteCertificateCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteCertificateResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteCertificateCommandError = async ( output , context ) : Promise < DeleteCertificateCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DeleteConnectionCommand = async ( output , context ) : Promise < DeleteConnectionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteConnectionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteConnectionResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteConnectionCommandError = async ( output , context ) : Promise < DeleteConnectionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DeleteEndpointCommand = async ( output , context ) : Promise < DeleteEndpointCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteEndpointCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteEndpointResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteEndpointCommandError = async ( output , context ) : Promise < DeleteEndpointCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DeleteEventSubscriptionCommand = async ( output , context ) : Promise < DeleteEventSubscriptionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteEventSubscriptionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteEventSubscriptionResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteEventSubscriptionCommandError = async ( output , context ) : Promise < DeleteEventSubscriptionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DeleteReplicationInstanceCommand = async ( output , context ) : Promise < DeleteReplicationInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteReplicationInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteReplicationInstanceResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteReplicationInstanceCommandError = async ( output , context ) : Promise < DeleteReplicationInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DeleteReplicationSubnetGroupCommand = async ( output , context ) : Promise < DeleteReplicationSubnetGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteReplicationSubnetGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteReplicationSubnetGroupResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteReplicationSubnetGroupCommandError = async ( output , context ) : Promise < DeleteReplicationSubnetGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DeleteReplicationTaskCommand = async ( output , context ) : Promise < DeleteReplicationTaskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteReplicationTaskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteReplicationTaskResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteReplicationTaskCommandError = async ( output , context ) : Promise < DeleteReplicationTaskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DeleteReplicationTaskAssessmentRunCommand = async ( output , context ) : Promise < DeleteReplicationTaskAssessmentRunCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteReplicationTaskAssessmentRunCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteReplicationTaskAssessmentRunResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteReplicationTaskAssessmentRunCommandError = async ( output , context ) : Promise < DeleteReplicationTaskAssessmentRunCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeAccountAttributesCommand = async ( output , context ) : Promise < DescribeAccountAttributesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeAccountAttributesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeAccountAttributesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeAccountAttributesCommandError = async ( output , context ) : Promise < DescribeAccountAttributesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeApplicableIndividualAssessmentsCommand = async ( output , context ) : Promise < DescribeApplicableIndividualAssessmentsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeApplicableIndividualAssessmentsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeApplicableIndividualAssessmentsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeApplicableIndividualAssessmentsCommandError = async ( output , context ) : Promise < DescribeApplicableIndividualAssessmentsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeCertificatesCommand = async ( output , context ) : Promise < DescribeCertificatesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeCertificatesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeCertificatesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeCertificatesCommandError = async ( output , context ) : Promise < DescribeCertificatesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeConnectionsCommand = async ( output , context ) : Promise < DescribeConnectionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeConnectionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeConnectionsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeConnectionsCommandError = async ( output , context ) : Promise < DescribeConnectionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeEndpointsCommand = async ( output , context ) : Promise < DescribeEndpointsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeEndpointsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeEndpointsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeEndpointsCommandError = async ( output , context ) : Promise < DescribeEndpointsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeEndpointSettingsCommand = async ( output , context ) : Promise < DescribeEndpointSettingsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeEndpointSettingsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeEndpointSettingsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeEndpointSettingsCommandError = async ( output , context ) : Promise < DescribeEndpointSettingsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeEndpointTypesCommand = async ( output , context ) : Promise < DescribeEndpointTypesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeEndpointTypesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeEndpointTypesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeEndpointTypesCommandError = async ( output , context ) : Promise < DescribeEndpointTypesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeEventCategoriesCommand = async ( output , context ) : Promise < DescribeEventCategoriesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeEventCategoriesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeEventCategoriesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeEventCategoriesCommandError = async ( output , context ) : Promise < DescribeEventCategoriesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeEventsCommand = async ( output , context ) : Promise < DescribeEventsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeEventsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeEventsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeEventsCommandError = async ( output , context ) : Promise < DescribeEventsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeEventSubscriptionsCommand = async ( output , context ) : Promise < DescribeEventSubscriptionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeEventSubscriptionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeEventSubscriptionsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeEventSubscriptionsCommandError = async ( output , context ) : Promise < DescribeEventSubscriptionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeOrderableReplicationInstancesCommand = async ( output , context ) : Promise < DescribeOrderableReplicationInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeOrderableReplicationInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeOrderableReplicationInstancesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeOrderableReplicationInstancesCommandError = async ( output , context ) : Promise < DescribeOrderableReplicationInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribePendingMaintenanceActionsCommand = async ( output , context ) : Promise < DescribePendingMaintenanceActionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribePendingMaintenanceActionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribePendingMaintenanceActionsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribePendingMaintenanceActionsCommandError = async ( output , context ) : Promise < DescribePendingMaintenanceActionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeRefreshSchemasStatusCommand = async ( output , context ) : Promise < DescribeRefreshSchemasStatusCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeRefreshSchemasStatusCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeRefreshSchemasStatusResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeRefreshSchemasStatusCommandError = async ( output , context ) : Promise < DescribeRefreshSchemasStatusCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeReplicationInstancesCommand = async ( output , context ) : Promise < DescribeReplicationInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeReplicationInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeReplicationInstancesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeReplicationInstancesCommandError = async ( output , context ) : Promise < DescribeReplicationInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeReplicationInstanceTaskLogsCommand = async ( output , context ) : Promise < DescribeReplicationInstanceTaskLogsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeReplicationInstanceTaskLogsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeReplicationInstanceTaskLogsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeReplicationInstanceTaskLogsCommandError = async ( output , context ) : Promise < DescribeReplicationInstanceTaskLogsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeReplicationSubnetGroupsCommand = async ( output , context ) : Promise < DescribeReplicationSubnetGroupsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeReplicationSubnetGroupsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeReplicationSubnetGroupsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeReplicationSubnetGroupsCommandError = async ( output , context ) : Promise < DescribeReplicationSubnetGroupsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeReplicationTaskAssessmentResultsCommand = async ( output , context ) : Promise < DescribeReplicationTaskAssessmentResultsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeReplicationTaskAssessmentResultsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeReplicationTaskAssessmentResultsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeReplicationTaskAssessmentResultsCommandError = async ( output , context ) : Promise < DescribeReplicationTaskAssessmentResultsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeReplicationTaskAssessmentRunsCommand = async ( output , context ) : Promise < DescribeReplicationTaskAssessmentRunsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeReplicationTaskAssessmentRunsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeReplicationTaskAssessmentRunsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeReplicationTaskAssessmentRunsCommandError = async ( output , context ) : Promise < DescribeReplicationTaskAssessmentRunsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeReplicationTaskIndividualAssessmentsCommand = async ( output , context ) : Promise < DescribeReplicationTaskIndividualAssessmentsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeReplicationTaskIndividualAssessmentsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeReplicationTaskIndividualAssessmentsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeReplicationTaskIndividualAssessmentsCommandError = async ( output , context ) : Promise < DescribeReplicationTaskIndividualAssessmentsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeReplicationTasksCommand = async ( output , context ) : Promise < DescribeReplicationTasksCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeReplicationTasksCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeReplicationTasksResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeReplicationTasksCommandError = async ( output , context ) : Promise < DescribeReplicationTasksCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeSchemasCommand = async ( output , context ) : Promise < DescribeSchemasCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeSchemasCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeSchemasResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeSchemasCommandError = async ( output , context ) : Promise < DescribeSchemasCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1DescribeTableStatisticsCommand = async ( output , context ) : Promise < DescribeTableStatisticsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeTableStatisticsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeTableStatisticsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeTableStatisticsCommandError = async ( output , context ) : Promise < DescribeTableStatisticsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1ImportCertificateCommand = async ( output , context ) : Promise < ImportCertificateCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ImportCertificateCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ImportCertificateResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ImportCertificateCommandError = async ( output , context ) : Promise < ImportCertificateCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidCertificateFault" : case "com.amazonaws.databasemigrationservice#InvalidCertificateFault" : response = { ... ( await deserializeAws_json1_1InvalidCertificateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceAlreadyExistsFault" : case "com.amazonaws.databasemigrationservice#ResourceAlreadyExistsFault" : response = { ... ( await deserializeAws_json1_1ResourceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceQuotaExceededFault" : case "com.amazonaws.databasemigrationservice#ResourceQuotaExceededFault" : response = { ... ( await deserializeAws_json1_1ResourceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1ListTagsForResourceCommand = async ( output , context ) : Promise < ListTagsForResourceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ListTagsForResourceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ListTagsForResourceResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ListTagsForResourceCommandError = async ( output , context ) : Promise < ListTagsForResourceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1ModifyEndpointCommand = async ( output , context ) : Promise < ModifyEndpointCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ModifyEndpointCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ModifyEndpointResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ModifyEndpointCommandError = async ( output , context ) : Promise < ModifyEndpointCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.databasemigrationservice#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_json1_1KMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceAlreadyExistsFault" : case "com.amazonaws.databasemigrationservice#ResourceAlreadyExistsFault" : response = { ... ( await deserializeAws_json1_1ResourceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1ModifyEventSubscriptionCommand = async ( output , context ) : Promise < ModifyEventSubscriptionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ModifyEventSubscriptionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ModifyEventSubscriptionResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ModifyEventSubscriptionCommandError = async ( output , context ) : Promise < ModifyEventSubscriptionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "KMSAccessDeniedFault" : case "com.amazonaws.databasemigrationservice#KMSAccessDeniedFault" : response = { ... ( await deserializeAws_json1_1KMSAccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSDisabledFault" : case "com.amazonaws.databasemigrationservice#KMSDisabledFault" : response = { ... ( await deserializeAws_json1_1KMSDisabledFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSInvalidStateFault" : case "com.amazonaws.databasemigrationservice#KMSInvalidStateFault" : response = { ... ( await deserializeAws_json1_1KMSInvalidStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSNotFoundFault" : case "com.amazonaws.databasemigrationservice#KMSNotFoundFault" : response = { ... ( await deserializeAws_json1_1KMSNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSThrottlingFault" : case "com.amazonaws.databasemigrationservice#KMSThrottlingFault" : response = { ... ( await deserializeAws_json1_1KMSThrottlingFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceQuotaExceededFault" : case "com.amazonaws.databasemigrationservice#ResourceQuotaExceededFault" : response = { ... ( await deserializeAws_json1_1ResourceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SNSInvalidTopicFault" : case "com.amazonaws.databasemigrationservice#SNSInvalidTopicFault" : response = { ... ( await deserializeAws_json1_1SNSInvalidTopicFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SNSNoAuthorizationFault" : case "com.amazonaws.databasemigrationservice#SNSNoAuthorizationFault" : response = { ... ( await deserializeAws_json1_1SNSNoAuthorizationFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1ModifyReplicationInstanceCommand = async ( output , context ) : Promise < ModifyReplicationInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ModifyReplicationInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ModifyReplicationInstanceResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ModifyReplicationInstanceCommandError = async ( output , context ) : Promise < ModifyReplicationInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientResourceCapacityFault" : case "com.amazonaws.databasemigrationservice#InsufficientResourceCapacityFault" : response = { ... ( await deserializeAws_json1_1InsufficientResourceCapacityFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceAlreadyExistsFault" : case "com.amazonaws.databasemigrationservice#ResourceAlreadyExistsFault" : response = { ... ( await deserializeAws_json1_1ResourceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "StorageQuotaExceededFault" : case "com.amazonaws.databasemigrationservice#StorageQuotaExceededFault" : response = { ... ( await deserializeAws_json1_1StorageQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UpgradeDependencyFailureFault" : case "com.amazonaws.databasemigrationservice#UpgradeDependencyFailureFault" : response = { ... ( await deserializeAws_json1_1UpgradeDependencyFailureFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1ModifyReplicationSubnetGroupCommand = async ( output , context ) : Promise < ModifyReplicationSubnetGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ModifyReplicationSubnetGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ModifyReplicationSubnetGroupResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ModifyReplicationSubnetGroupCommandError = async ( output , context ) : Promise < ModifyReplicationSubnetGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSubnet" : case "com.amazonaws.databasemigrationservice#InvalidSubnet" : response = { ... ( await deserializeAws_json1_1InvalidSubnetResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ReplicationSubnetGroupDoesNotCoverEnoughAZs" : case "com.amazonaws.databasemigrationservice#ReplicationSubnetGroupDoesNotCoverEnoughAZs" : response = { ... ( await deserializeAws_json1_1ReplicationSubnetGroupDoesNotCoverEnoughAZsResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceQuotaExceededFault" : case "com.amazonaws.databasemigrationservice#ResourceQuotaExceededFault" : response = { ... ( await deserializeAws_json1_1ResourceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "SubnetAlreadyInUse" : case "com.amazonaws.databasemigrationservice#SubnetAlreadyInUse" : response = { ... ( await deserializeAws_json1_1SubnetAlreadyInUseResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1ModifyReplicationTaskCommand = async ( output , context ) : Promise < ModifyReplicationTaskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ModifyReplicationTaskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ModifyReplicationTaskResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ModifyReplicationTaskCommandError = async ( output , context ) : Promise < ModifyReplicationTaskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.databasemigrationservice#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_json1_1KMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceAlreadyExistsFault" : case "com.amazonaws.databasemigrationservice#ResourceAlreadyExistsFault" : response = { ... ( await deserializeAws_json1_1ResourceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1MoveReplicationTaskCommand = async ( output , context ) : Promise < MoveReplicationTaskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1MoveReplicationTaskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1MoveReplicationTaskResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1MoveReplicationTaskCommandError = async ( output , context ) : Promise < MoveReplicationTaskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.databasemigrationservice#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_json1_1KMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceQuotaExceededFault" : case "com.amazonaws.databasemigrationservice#ResourceQuotaExceededFault" : response = { ... ( await deserializeAws_json1_1ResourceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1RebootReplicationInstanceCommand = async ( output , context ) : Promise < RebootReplicationInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1RebootReplicationInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1RebootReplicationInstanceResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1RebootReplicationInstanceCommandError = async ( output , context ) : Promise < RebootReplicationInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1RefreshSchemasCommand = async ( output , context ) : Promise < RefreshSchemasCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1RefreshSchemasCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1RefreshSchemasResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1RefreshSchemasCommandError = async ( output , context ) : Promise < RefreshSchemasCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.databasemigrationservice#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_json1_1KMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceQuotaExceededFault" : case "com.amazonaws.databasemigrationservice#ResourceQuotaExceededFault" : response = { ... ( await deserializeAws_json1_1ResourceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1ReloadTablesCommand = async ( output , context ) : Promise < ReloadTablesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ReloadTablesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ReloadTablesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ReloadTablesCommandError = async ( output , context ) : Promise < ReloadTablesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1RemoveTagsFromResourceCommand = async ( output , context ) : Promise < RemoveTagsFromResourceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1RemoveTagsFromResourceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1RemoveTagsFromResourceResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1RemoveTagsFromResourceCommandError = async ( output , context ) : Promise < RemoveTagsFromResourceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1StartReplicationTaskCommand = async ( output , context ) : Promise < StartReplicationTaskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1StartReplicationTaskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1StartReplicationTaskResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1StartReplicationTaskCommandError = async ( output , context ) : Promise < StartReplicationTaskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1StartReplicationTaskAssessmentCommand = async ( output , context ) : Promise < StartReplicationTaskAssessmentCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1StartReplicationTaskAssessmentCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1StartReplicationTaskAssessmentResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1StartReplicationTaskAssessmentCommandError = async ( output , context ) : Promise < StartReplicationTaskAssessmentCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1StartReplicationTaskAssessmentRunCommand = async ( output , context ) : Promise < StartReplicationTaskAssessmentRunCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1StartReplicationTaskAssessmentRunCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1StartReplicationTaskAssessmentRunResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1StartReplicationTaskAssessmentRunCommandError = async ( output , context ) : Promise < StartReplicationTaskAssessmentRunCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSAccessDeniedFault" : case "com.amazonaws.databasemigrationservice#KMSAccessDeniedFault" : response = { ... ( await deserializeAws_json1_1KMSAccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSDisabledFault" : case "com.amazonaws.databasemigrationservice#KMSDisabledFault" : response = { ... ( await deserializeAws_json1_1KMSDisabledFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSFault" : case "com.amazonaws.databasemigrationservice#KMSFault" : response = { ... ( await deserializeAws_json1_1KMSFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSInvalidStateFault" : case "com.amazonaws.databasemigrationservice#KMSInvalidStateFault" : response = { ... ( await deserializeAws_json1_1KMSInvalidStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.databasemigrationservice#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_json1_1KMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSNotFoundFault" : case "com.amazonaws.databasemigrationservice#KMSNotFoundFault" : response = { ... ( await deserializeAws_json1_1KMSNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceAlreadyExistsFault" : case "com.amazonaws.databasemigrationservice#ResourceAlreadyExistsFault" : response = { ... ( await deserializeAws_json1_1ResourceAlreadyExistsFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "S3AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#S3AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1S3AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "S3ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#S3ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1S3ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1StopReplicationTaskCommand = async ( output , context ) : Promise < StopReplicationTaskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1StopReplicationTaskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1StopReplicationTaskResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1StopReplicationTaskCommandError = async ( output , context ) : Promise < StopReplicationTaskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1TestConnectionCommand = async ( output , context ) : Promise < TestConnectionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1TestConnectionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1TestConnectionResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1TestConnectionCommandError = async ( output , context ) : Promise < TestConnectionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedFault" : case "com.amazonaws.databasemigrationservice#AccessDeniedFault" : response = { ... ( await deserializeAws_json1_1AccessDeniedFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidResourceStateFault" : case "com.amazonaws.databasemigrationservice#InvalidResourceStateFault" : response = { ... ( await deserializeAws_json1_1InvalidResourceStateFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "KMSKeyNotAccessibleFault" : case "com.amazonaws.databasemigrationservice#KMSKeyNotAccessibleFault" : response = { ... ( await deserializeAws_json1_1KMSKeyNotAccessibleFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundFault" : case "com.amazonaws.databasemigrationservice#ResourceNotFoundFault" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceQuotaExceededFault" : case "com.amazonaws.databasemigrationservice#ResourceQuotaExceededFault" : response = { ... ( await deserializeAws_json1_1ResourceQuotaExceededFaultResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . 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_json1_1AccessDeniedFaultResponse = async ( parsedOutput , context ) : Promise < AccessDeniedFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1AccessDeniedFault ( body , context ) ; const contents = { name : "AccessDeniedFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InsufficientResourceCapacityFaultResponse = async ( parsedOutput , context ) : Promise < InsufficientResourceCapacityFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InsufficientResourceCapacityFault ( body , context ) ; const contents = { name : "InsufficientResourceCapacityFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidCertificateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidCertificateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidCertificateFault ( body , context ) ; const contents = { name : "InvalidCertificateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidResourceStateFaultResponse = async ( parsedOutput , context ) : Promise < InvalidResourceStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidResourceStateFault ( body , context ) ; const contents = { name : "InvalidResourceStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidSubnetResponse = async ( parsedOutput , context ) : Promise < InvalidSubnet > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidSubnet ( body , context ) ; const contents = { name : "InvalidSubnet" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1KMSAccessDeniedFaultResponse = async ( parsedOutput , context ) : Promise < KMSAccessDeniedFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1KMSAccessDeniedFault ( body , context ) ; const contents = { name : "KMSAccessDeniedFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1KMSDisabledFaultResponse = async ( parsedOutput , context ) : Promise < KMSDisabledFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1KMSDisabledFault ( body , context ) ; const contents = { name : "KMSDisabledFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1KMSFaultResponse = async ( parsedOutput , context ) : Promise < KMSFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1KMSFault ( body , context ) ; const contents = { name : "KMSFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1KMSInvalidStateFaultResponse = async ( parsedOutput , context ) : Promise < KMSInvalidStateFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1KMSInvalidStateFault ( body , context ) ; const contents = { name : "KMSInvalidStateFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1KMSKeyNotAccessibleFaultResponse = async ( parsedOutput , context ) : Promise < KMSKeyNotAccessibleFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1KMSKeyNotAccessibleFault ( body , context ) ; const contents = { name : "KMSKeyNotAccessibleFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1KMSNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < KMSNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1KMSNotFoundFault ( body , context ) ; const contents = { name : "KMSNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1KMSThrottlingFaultResponse = async ( parsedOutput , context ) : Promise < KMSThrottlingFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1KMSThrottlingFault ( body , context ) ; const contents = { name : "KMSThrottlingFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1ReplicationSubnetGroupDoesNotCoverEnoughAZsResponse = async ( parsedOutput , context ) : Promise < ReplicationSubnetGroupDoesNotCoverEnoughAZs > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1ReplicationSubnetGroupDoesNotCoverEnoughAZs ( body , context ) ; const contents = { name : "ReplicationSubnetGroupDoesNotCoverEnoughAZs" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1ResourceAlreadyExistsFaultResponse = async ( parsedOutput , context ) : Promise < ResourceAlreadyExistsFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1ResourceAlreadyExistsFault ( body , context ) ; const contents = { name : "ResourceAlreadyExistsFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1ResourceNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < ResourceNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1ResourceNotFoundFault ( body , context ) ; const contents = { name : "ResourceNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1ResourceQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < ResourceQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1ResourceQuotaExceededFault ( body , context ) ; const contents = { name : "ResourceQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1S3AccessDeniedFaultResponse = async ( parsedOutput , context ) : Promise < S3AccessDeniedFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1S3AccessDeniedFault ( body , context ) ; const contents = { name : "S3AccessDeniedFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1S3ResourceNotFoundFaultResponse = async ( parsedOutput , context ) : Promise < S3ResourceNotFoundFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1S3ResourceNotFoundFault ( body , context ) ; const contents = { name : "S3ResourceNotFoundFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1SNSInvalidTopicFaultResponse = async ( parsedOutput , context ) : Promise < SNSInvalidTopicFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1SNSInvalidTopicFault ( body , context ) ; const contents = { name : "SNSInvalidTopicFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1SNSNoAuthorizationFaultResponse = async ( parsedOutput , context ) : Promise < SNSNoAuthorizationFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1SNSNoAuthorizationFault ( body , context ) ; const contents = { name : "SNSNoAuthorizationFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1StorageQuotaExceededFaultResponse = async ( parsedOutput , context ) : Promise < StorageQuotaExceededFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1StorageQuotaExceededFault ( body , context ) ; const contents = { name : "StorageQuotaExceededFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1SubnetAlreadyInUseResponse = async ( parsedOutput , context ) : Promise < SubnetAlreadyInUse > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1SubnetAlreadyInUse ( body , context ) ; const contents = { name : "SubnetAlreadyInUse" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1UpgradeDependencyFailureFaultResponse = async ( parsedOutput , context ) : Promise < UpgradeDependencyFailureFault > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1UpgradeDependencyFailureFault ( body , context ) ; const contents = { name : "UpgradeDependencyFailureFault" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const serializeAws_json1_1AddTagsToResourceMessage = ( input , context ) : any => { return { ... ( input . ResourceArn !== undefined && input . ResourceArn !== null && { ResourceArn : input . ResourceArn } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagList ( input . Tags , context ) } ) , } ; } ; const serializeAws_json1_1ApplyPendingMaintenanceActionMessage = ( input , context ) : any => { return { ... ( input . ApplyAction !== undefined && input . ApplyAction !== null && { ApplyAction : input . ApplyAction } ) , ... ( input . OptInType !== undefined && input . OptInType !== null && { OptInType : input . OptInType } ) , ... ( input . ReplicationInstanceArn !== undefined && input . ReplicationInstanceArn !== null && { ReplicationInstanceArn : input . ReplicationInstanceArn } ) , } ; } ; const serializeAws_json1_1ArnList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1CancelReplicationTaskAssessmentRunMessage = ( input , context ) : any => { return { ... ( input . ReplicationTaskAssessmentRunArn !== undefined && input . ReplicationTaskAssessmentRunArn !== null && { ReplicationTaskAssessmentRunArn : input . ReplicationTaskAssessmentRunArn , } ) , } ; } ; const serializeAws_json1_1CreateEndpointMessage = ( input , context ) : any => { return { ... ( input . CertificateArn !== undefined && input . CertificateArn !== null && { CertificateArn : input . CertificateArn } ) , ... ( input . DatabaseName !== undefined && input . DatabaseName !== null && { DatabaseName : input . DatabaseName } ) , ... ( input . DmsTransferSettings !== undefined && input . DmsTransferSettings !== null && { DmsTransferSettings : serializeAws_json1_1DmsTransferSettings ( input . DmsTransferSettings , context ) , } ) , ... ( input . DocDbSettings !== undefined && input . DocDbSettings !== null && { DocDbSettings : serializeAws_json1_1DocDbSettings ( input . DocDbSettings , context ) , } ) , ... ( input . DynamoDbSettings !== undefined && input . DynamoDbSettings !== null && { DynamoDbSettings : serializeAws_json1_1DynamoDbSettings ( input . DynamoDbSettings , context ) , } ) , ... ( input . ElasticsearchSettings !== undefined && input . ElasticsearchSettings !== null && { ElasticsearchSettings : serializeAws_json1_1ElasticsearchSettings ( input . ElasticsearchSettings , context ) , } ) , ... ( input . EndpointIdentifier !== undefined && input . EndpointIdentifier !== null && { EndpointIdentifier : input . EndpointIdentifier } ) , ... ( input . EndpointType !== undefined && input . EndpointType !== null && { EndpointType : input . EndpointType } ) , ... ( input . EngineName !== undefined && input . EngineName !== null && { EngineName : input . EngineName } ) , ... ( input . ExternalTableDefinition !== undefined && input . ExternalTableDefinition !== null && { ExternalTableDefinition : input . ExternalTableDefinition } ) , ... ( input . ExtraConnectionAttributes !== undefined && input . ExtraConnectionAttributes !== null && { ExtraConnectionAttributes : input . ExtraConnectionAttributes } ) , ... ( input . GcpMySQLSettings !== undefined && input . GcpMySQLSettings !== null && { GcpMySQLSettings : serializeAws_json1_1GcpMySQLSettings ( input . GcpMySQLSettings , context ) , } ) , ... ( input . IBMDb2Settings !== undefined && input . IBMDb2Settings !== null && { IBMDb2Settings : serializeAws_json1_1IBMDb2Settings ( input . IBMDb2Settings , context ) , } ) , ... ( input . KafkaSettings !== undefined && input . KafkaSettings !== null && { KafkaSettings : serializeAws_json1_1KafkaSettings ( input . KafkaSettings , context ) , } ) , ... ( input . KinesisSettings !== undefined && input . KinesisSettings !== null && { KinesisSettings : serializeAws_json1_1KinesisSettings ( input . KinesisSettings , context ) , } ) , ... ( input . KmsKeyId !== undefined && input . KmsKeyId !== null && { KmsKeyId : input . KmsKeyId } ) , ... ( input . MicrosoftSQLServerSettings !== undefined && input . MicrosoftSQLServerSettings !== null && { MicrosoftSQLServerSettings : serializeAws_json1_1MicrosoftSQLServerSettings ( input . MicrosoftSQLServerSettings , context ) , } ) , ... ( input . MongoDbSettings !== undefined && input . MongoDbSettings !== null && { MongoDbSettings : serializeAws_json1_1MongoDbSettings ( input . MongoDbSettings , context ) , } ) , ... ( input . MySQLSettings !== undefined && input . MySQLSettings !== null && { MySQLSettings : serializeAws_json1_1MySQLSettings ( input . MySQLSettings , context ) , } ) , ... ( input . NeptuneSettings !== undefined && input . NeptuneSettings !== null && { NeptuneSettings : serializeAws_json1_1NeptuneSettings ( input . NeptuneSettings , context ) , } ) , ... ( input . OracleSettings !== undefined && input . OracleSettings !== null && { OracleSettings : serializeAws_json1_1OracleSettings ( input . OracleSettings , context ) , } ) , ... ( input . Password !== undefined && input . Password !== null && { Password : input . Password } ) , ... ( input . Port !== undefined && input . Port !== null && { Port : input . Port } ) , ... ( input . PostgreSQLSettings !== undefined && input . PostgreSQLSettings !== null && { PostgreSQLSettings : serializeAws_json1_1PostgreSQLSettings ( input . PostgreSQLSettings , context ) , } ) , ... ( input . RedisSettings !== undefined && input . RedisSettings !== null && { RedisSettings : serializeAws_json1_1RedisSettings ( input . RedisSettings , context ) , } ) , ... ( input . RedshiftSettings !== undefined && input . RedshiftSettings !== null && { RedshiftSettings : serializeAws_json1_1RedshiftSettings ( input . RedshiftSettings , context ) , } ) , ... ( input . ResourceIdentifier !== undefined && input . ResourceIdentifier !== null && { ResourceIdentifier : input . ResourceIdentifier } ) , ... ( input . S3Settings !== undefined && input . S3Settings !== null && { S3Settings : serializeAws_json1_1S3Settings ( input . S3Settings , context ) } ) , ... ( input . ServerName !== undefined && input . ServerName !== null && { ServerName : input . ServerName } ) , ... ( input . ServiceAccessRoleArn !== undefined && input . ServiceAccessRoleArn !== null && { ServiceAccessRoleArn : input . ServiceAccessRoleArn } ) , ... ( input . SslMode !== undefined && input . SslMode !== null && { SslMode : input . SslMode } ) , ... ( input . SybaseSettings !== undefined && input . SybaseSettings !== null && { SybaseSettings : serializeAws_json1_1SybaseSettings ( input . SybaseSettings , context ) , } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagList ( input . Tags , context ) } ) , ... ( input . Username !== undefined && input . Username !== null && { Username : input . Username } ) , } ; } ; const serializeAws_json1_1CreateEventSubscriptionMessage = ( input , context ) : any => { return { ... ( input . Enabled !== undefined && input . Enabled !== null && { Enabled : input . Enabled } ) , ... ( input . EventCategories !== undefined && input . EventCategories !== null && { EventCategories : serializeAws_json1_1EventCategoriesList ( input . EventCategories , context ) , } ) , ... ( input . SnsTopicArn !== undefined && input . SnsTopicArn !== null && { SnsTopicArn : input . SnsTopicArn } ) , ... ( input . SourceIds !== undefined && input . SourceIds !== null && { SourceIds : serializeAws_json1_1SourceIdsList ( input . SourceIds , context ) } ) , ... ( input . SourceType !== undefined && input . SourceType !== null && { SourceType : input . SourceType } ) , ... ( input . SubscriptionName !== undefined && input . SubscriptionName !== null && { SubscriptionName : input . SubscriptionName } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagList ( input . Tags , context ) } ) , } ; } ; const serializeAws_json1_1CreateReplicationInstanceMessage = ( input , context ) : any => { return { ... ( input . AllocatedStorage !== undefined && input . AllocatedStorage !== null && { AllocatedStorage : input . AllocatedStorage } ) , ... ( input . AutoMinorVersionUpgrade !== undefined && input . AutoMinorVersionUpgrade !== null && { AutoMinorVersionUpgrade : input . AutoMinorVersionUpgrade } ) , ... ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null && { AvailabilityZone : input . AvailabilityZone } ) , ... ( input . DnsNameServers !== undefined && input . DnsNameServers !== null && { DnsNameServers : input . DnsNameServers } ) , ... ( input . EngineVersion !== undefined && input . EngineVersion !== null && { EngineVersion : input . EngineVersion } ) , ... ( input . KmsKeyId !== undefined && input . KmsKeyId !== null && { KmsKeyId : input . KmsKeyId } ) , ... ( input . MultiAZ !== undefined && input . MultiAZ !== null && { MultiAZ : input . MultiAZ } ) , ... ( input . PreferredMaintenanceWindow !== undefined && input . PreferredMaintenanceWindow !== null && { PreferredMaintenanceWindow : input . PreferredMaintenanceWindow } ) , ... ( input . PubliclyAccessible !== undefined && input . PubliclyAccessible !== null && { PubliclyAccessible : input . PubliclyAccessible } ) , ... ( input . ReplicationInstanceClass !== undefined && input . ReplicationInstanceClass !== null && { ReplicationInstanceClass : input . ReplicationInstanceClass } ) , ... ( input . ReplicationInstanceIdentifier !== undefined && input . ReplicationInstanceIdentifier !== null && { ReplicationInstanceIdentifier : input . ReplicationInstanceIdentifier , } ) , ... ( input . ReplicationSubnetGroupIdentifier !== undefined && input . ReplicationSubnetGroupIdentifier !== null && { ReplicationSubnetGroupIdentifier : input . ReplicationSubnetGroupIdentifier , } ) , ... ( input . ResourceIdentifier !== undefined && input . ResourceIdentifier !== null && { ResourceIdentifier : input . ResourceIdentifier } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagList ( input . Tags , context ) } ) , ... ( input . VpcSecurityGroupIds !== undefined && input . VpcSecurityGroupIds !== null && { VpcSecurityGroupIds : serializeAws_json1_1VpcSecurityGroupIdList ( input . VpcSecurityGroupIds , context ) , } ) , } ; } ; const serializeAws_json1_1CreateReplicationSubnetGroupMessage = ( input , context ) : any => { return { ... ( input . ReplicationSubnetGroupDescription !== undefined && input . ReplicationSubnetGroupDescription !== null && { ReplicationSubnetGroupDescription : input . ReplicationSubnetGroupDescription , } ) , ... ( input . ReplicationSubnetGroupIdentifier !== undefined && input . ReplicationSubnetGroupIdentifier !== null && { ReplicationSubnetGroupIdentifier : input . ReplicationSubnetGroupIdentifier , } ) , ... ( input . SubnetIds !== undefined && input . SubnetIds !== null && { SubnetIds : serializeAws_json1_1SubnetIdentifierList ( input . SubnetIds , context ) } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagList ( input . Tags , context ) } ) , } ; } ; const serializeAws_json1_1CreateReplicationTaskMessage = ( input , context ) : any => { return { ... ( input . CdcStartPosition !== undefined && input . CdcStartPosition !== null && { CdcStartPosition : input . CdcStartPosition } ) , ... ( input . CdcStartTime !== undefined && input . CdcStartTime !== null && { CdcStartTime : Math . round ( input . CdcStartTime . getTime ( ) / 1000 ) } ) , ... ( input . CdcStopPosition !== undefined && input . CdcStopPosition !== null && { CdcStopPosition : input . CdcStopPosition } ) , ... ( input . MigrationType !== undefined && input . MigrationType !== null && { MigrationType : input . MigrationType } ) , ... ( input . ReplicationInstanceArn !== undefined && input . ReplicationInstanceArn !== null && { ReplicationInstanceArn : input . ReplicationInstanceArn } ) , ... ( input . ReplicationTaskIdentifier !== undefined && input . ReplicationTaskIdentifier !== null && { ReplicationTaskIdentifier : input . ReplicationTaskIdentifier } ) , ... ( input . ReplicationTaskSettings !== undefined && input . ReplicationTaskSettings !== null && { ReplicationTaskSettings : input . ReplicationTaskSettings } ) , ... ( input . ResourceIdentifier !== undefined && input . ResourceIdentifier !== null && { ResourceIdentifier : input . ResourceIdentifier } ) , ... ( input . SourceEndpointArn !== undefined && input . SourceEndpointArn !== null && { SourceEndpointArn : input . SourceEndpointArn } ) , ... ( input . TableMappings !== undefined && input . TableMappings !== null && { TableMappings : input . TableMappings } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagList ( input . Tags , context ) } ) , ... ( input . TargetEndpointArn !== undefined && input . TargetEndpointArn !== null && { TargetEndpointArn : input . TargetEndpointArn } ) , ... ( input . TaskData !== undefined && input . TaskData !== null && { TaskData : input . TaskData } ) , } ; } ; const serializeAws_json1_1DeleteCertificateMessage = ( input , context ) : any => { return { ... ( input . CertificateArn !== undefined && input . CertificateArn !== null && { CertificateArn : input . CertificateArn } ) , } ; } ; const serializeAws_json1_1DeleteConnectionMessage = ( input , context ) : any => { return { ... ( input . EndpointArn !== undefined && input . EndpointArn !== null && { EndpointArn : input . EndpointArn } ) , ... ( input . ReplicationInstanceArn !== undefined && input . ReplicationInstanceArn !== null && { ReplicationInstanceArn : input . ReplicationInstanceArn } ) , } ; } ; const serializeAws_json1_1DeleteEndpointMessage = ( input , context ) : any => { return { ... ( input . EndpointArn !== undefined && input . EndpointArn !== null && { EndpointArn : input . EndpointArn } ) , } ; } ; const serializeAws_json1_1DeleteEventSubscriptionMessage = ( input , context ) : any => { return { ... ( input . SubscriptionName !== undefined && input . SubscriptionName !== null && { SubscriptionName : input . SubscriptionName } ) , } ; } ; const serializeAws_json1_1DeleteReplicationInstanceMessage = ( input , context ) : any => { return { ... ( input . ReplicationInstanceArn !== undefined && input . ReplicationInstanceArn !== null && { ReplicationInstanceArn : input . ReplicationInstanceArn } ) , } ; } ; const serializeAws_json1_1DeleteReplicationSubnetGroupMessage = ( input , context ) : any => { return { ... ( input . ReplicationSubnetGroupIdentifier !== undefined && input . ReplicationSubnetGroupIdentifier !== null && { ReplicationSubnetGroupIdentifier : input . ReplicationSubnetGroupIdentifier , } ) , } ; } ; const serializeAws_json1_1DeleteReplicationTaskAssessmentRunMessage = ( input , context ) : any => { return { ... ( input . ReplicationTaskAssessmentRunArn !== undefined && input . ReplicationTaskAssessmentRunArn !== null && { ReplicationTaskAssessmentRunArn : input . ReplicationTaskAssessmentRunArn , } ) , } ; } ; const serializeAws_json1_1DeleteReplicationTaskMessage = ( input , context ) : any => { return { ... ( input . ReplicationTaskArn !== undefined && input . ReplicationTaskArn !== null && { ReplicationTaskArn : input . ReplicationTaskArn } ) , } ; } ; const serializeAws_json1_1DescribeAccountAttributesMessage = ( input , context ) : any => { return { } ; } ; const serializeAws_json1_1DescribeApplicableIndividualAssessmentsMessage = ( input , context ) : any => { return { ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , ... ( input . MigrationType !== undefined && input . MigrationType !== null && { MigrationType : input . MigrationType } ) , ... ( input . ReplicationInstanceArn !== undefined && input . ReplicationInstanceArn !== null && { ReplicationInstanceArn : input . ReplicationInstanceArn } ) , ... ( input . ReplicationTaskArn !== undefined && input . ReplicationTaskArn !== null && { ReplicationTaskArn : input . ReplicationTaskArn } ) , ... ( input . SourceEngineName !== undefined && input . SourceEngineName !== null && { SourceEngineName : input . SourceEngineName } ) , ... ( input . TargetEngineName !== undefined && input . TargetEngineName !== null && { TargetEngineName : input . TargetEngineName } ) , } ; } ; const serializeAws_json1_1DescribeCertificatesMessage = ( input , context ) : any => { return { ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1FilterList ( input . Filters , context ) } ) , ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , } ; } ; const serializeAws_json1_1DescribeConnectionsMessage = ( input , context ) : any => { return { ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1FilterList ( input . Filters , context ) } ) , ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , } ; } ; const serializeAws_json1_1DescribeEndpointSettingsMessage = ( input , context ) : any => { return { ... ( input . EngineName !== undefined && input . EngineName !== null && { EngineName : input . EngineName } ) , ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , } ; } ; const serializeAws_json1_1DescribeEndpointsMessage = ( input , context ) : any => { return { ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1FilterList ( input . Filters , context ) } ) , ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , } ; } ; const serializeAws_json1_1DescribeEndpointTypesMessage = ( input , context ) : any => { return { ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1FilterList ( input . Filters , context ) } ) , ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , } ; } ; const serializeAws_json1_1DescribeEventCategoriesMessage = ( input , context ) : any => { return { ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1FilterList ( input . Filters , context ) } ) , ... ( input . SourceType !== undefined && input . SourceType !== null && { SourceType : input . SourceType } ) , } ; } ; const serializeAws_json1_1DescribeEventsMessage = ( input , context ) : any => { return { ... ( input . Duration !== undefined && input . Duration !== null && { Duration : input . Duration } ) , ... ( input . EndTime !== undefined && input . EndTime !== null && { EndTime : Math . round ( input . EndTime . getTime ( ) / 1000 ) } ) , ... ( input . EventCategories !== undefined && input . EventCategories !== null && { EventCategories : serializeAws_json1_1EventCategoriesList ( input . EventCategories , context ) , } ) , ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1FilterList ( input . Filters , context ) } ) , ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , ... ( input . SourceIdentifier !== undefined && input . SourceIdentifier !== null && { SourceIdentifier : input . SourceIdentifier } ) , ... ( input . SourceType !== undefined && input . SourceType !== null && { SourceType : input . SourceType } ) , ... ( input . StartTime !== undefined && input . StartTime !== null && { StartTime : Math . round ( input . StartTime . getTime ( ) / 1000 ) } ) , } ; } ; const serializeAws_json1_1DescribeEventSubscriptionsMessage = ( input , context ) : any => { return { ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1FilterList ( input . Filters , context ) } ) , ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , ... ( input . SubscriptionName !== undefined && input . SubscriptionName !== null && { SubscriptionName : input . SubscriptionName } ) , } ; } ; const serializeAws_json1_1DescribeOrderableReplicationInstancesMessage = ( input , context ) : any => { return { ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , } ; } ; const serializeAws_json1_1DescribePendingMaintenanceActionsMessage = ( input , context ) : any => { return { ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1FilterList ( input . Filters , context ) } ) , ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , ... ( input . ReplicationInstanceArn !== undefined && input . ReplicationInstanceArn !== null && { ReplicationInstanceArn : input . ReplicationInstanceArn } ) , } ; } ; const serializeAws_json1_1DescribeRefreshSchemasStatusMessage = ( input , context ) : any => { return { ... ( input . EndpointArn !== undefined && input . EndpointArn !== null && { EndpointArn : input . EndpointArn } ) , } ; } ; const serializeAws_json1_1DescribeReplicationInstancesMessage = ( input , context ) : any => { return { ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1FilterList ( input . Filters , context ) } ) , ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , } ; } ; const serializeAws_json1_1DescribeReplicationInstanceTaskLogsMessage = ( input , context ) : any => { return { ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , ... ( input . ReplicationInstanceArn !== undefined && input . ReplicationInstanceArn !== null && { ReplicationInstanceArn : input . ReplicationInstanceArn } ) , } ; } ; const serializeAws_json1_1DescribeReplicationSubnetGroupsMessage = ( input , context ) : any => { return { ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1FilterList ( input . Filters , context ) } ) , ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , } ; } ; const serializeAws_json1_1DescribeReplicationTaskAssessmentResultsMessage = ( input , context ) : any => { return { ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , ... ( input . ReplicationTaskArn !== undefined && input . ReplicationTaskArn !== null && { ReplicationTaskArn : input . ReplicationTaskArn } ) , } ; } ; const serializeAws_json1_1DescribeReplicationTaskAssessmentRunsMessage = ( input , context ) : any => { return { ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1FilterList ( input . Filters , context ) } ) , ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , } ; } ; const serializeAws_json1_1DescribeReplicationTaskIndividualAssessmentsMessage = ( input , context ) : any => { return { ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1FilterList ( input . Filters , context ) } ) , ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , } ; } ; const serializeAws_json1_1DescribeReplicationTasksMessage = ( input , context ) : any => { return { ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1FilterList ( input . Filters , context ) } ) , ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , ... ( input . WithoutSettings !== undefined && input . WithoutSettings !== null && { WithoutSettings : input . WithoutSettings } ) , } ; } ; const serializeAws_json1_1DescribeSchemasMessage = ( input , context ) : any => { return { ... ( input . EndpointArn !== undefined && input . EndpointArn !== null && { EndpointArn : input . EndpointArn } ) , ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , } ; } ; const serializeAws_json1_1DescribeTableStatisticsMessage = ( input , context ) : any => { return { ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1FilterList ( input . Filters , context ) } ) , ... ( input . Marker !== undefined && input . Marker !== null && { Marker : input . Marker } ) , ... ( input . MaxRecords !== undefined && input . MaxRecords !== null && { MaxRecords : input . MaxRecords } ) , ... ( input . ReplicationTaskArn !== undefined && input . ReplicationTaskArn !== null && { ReplicationTaskArn : input . ReplicationTaskArn } ) , } ; } ; const serializeAws_json1_1DmsTransferSettings = ( input , context ) : any => { return { ... ( input . BucketName !== undefined && input . BucketName !== null && { BucketName : input . BucketName } ) , ... ( input . ServiceAccessRoleArn !== undefined && input . ServiceAccessRoleArn !== null && { ServiceAccessRoleArn : input . ServiceAccessRoleArn } ) , } ; } ; const serializeAws_json1_1DocDbSettings = ( input , context ) : any => { return { ... ( input . DatabaseName !== undefined && input . DatabaseName !== null && { DatabaseName : input . DatabaseName } ) , ... ( input . DocsToInvestigate !== undefined && input . DocsToInvestigate !== null && { DocsToInvestigate : input . DocsToInvestigate } ) , ... ( input . ExtractDocId !== undefined && input . ExtractDocId !== null && { ExtractDocId : input . ExtractDocId } ) , ... ( input . KmsKeyId !== undefined && input . KmsKeyId !== null && { KmsKeyId : input . KmsKeyId } ) , ... ( input . NestingLevel !== undefined && input . NestingLevel !== null && { NestingLevel : input . NestingLevel } ) , ... ( input . Password !== undefined && input . Password !== null && { Password : input . Password } ) , ... ( input . Port !== undefined && input . Port !== null && { Port : input . Port } ) , ... ( input . SecretsManagerAccessRoleArn !== undefined && input . SecretsManagerAccessRoleArn !== null && { SecretsManagerAccessRoleArn : input . SecretsManagerAccessRoleArn } ) , ... ( input . SecretsManagerSecretId !== undefined && input . SecretsManagerSecretId !== null && { SecretsManagerSecretId : input . SecretsManagerSecretId } ) , ... ( input . ServerName !== undefined && input . ServerName !== null && { ServerName : input . ServerName } ) , ... ( input . Username !== undefined && input . Username !== null && { Username : input . Username } ) , } ; } ; const serializeAws_json1_1DynamoDbSettings = ( input , context ) : any => { return { ... ( input . ServiceAccessRoleArn !== undefined && input . ServiceAccessRoleArn !== null && { ServiceAccessRoleArn : input . ServiceAccessRoleArn } ) , } ; } ; const serializeAws_json1_1ElasticsearchSettings = ( input , context ) : any => { return { ... ( input . EndpointUri !== undefined && input . EndpointUri !== null && { EndpointUri : input . EndpointUri } ) , ... ( input . ErrorRetryDuration !== undefined && input . ErrorRetryDuration !== null && { ErrorRetryDuration : input . ErrorRetryDuration } ) , ... ( input . FullLoadErrorPercentage !== undefined && input . FullLoadErrorPercentage !== null && { FullLoadErrorPercentage : input . FullLoadErrorPercentage } ) , ... ( input . ServiceAccessRoleArn !== undefined && input . ServiceAccessRoleArn !== null && { ServiceAccessRoleArn : input . ServiceAccessRoleArn } ) , } ; } ; const serializeAws_json1_1EventCategoriesList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1ExcludeTestList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1Filter = ( input , context ) : any => { return { ... ( input . Name !== undefined && input . Name !== null && { Name : input . Name } ) , ... ( input . Values !== undefined && input . Values !== null && { Values : serializeAws_json1_1FilterValueList ( input . Values , context ) } ) , } ; } ; const serializeAws_json1_1FilterList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1Filter ( entry , context ) ; } ) ; } ; const serializeAws_json1_1FilterValueList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1GcpMySQLSettings = ( input , context ) : any => { return { ... ( input . AfterConnectScript !== undefined && input . AfterConnectScript !== null && { AfterConnectScript : input . AfterConnectScript } ) , ... ( input . CleanSourceMetadataOnMismatch !== undefined && input . CleanSourceMetadataOnMismatch !== null && { CleanSourceMetadataOnMismatch : input . CleanSourceMetadataOnMismatch , } ) , ... ( input . DatabaseName !== undefined && input . DatabaseName !== null && { DatabaseName : input . DatabaseName } ) , ... ( input . EventsPollInterval !== undefined && input . EventsPollInterval !== null && { EventsPollInterval : input . EventsPollInterval } ) , ... ( input . MaxFileSize !== undefined && input . MaxFileSize !== null && { MaxFileSize : input . MaxFileSize } ) , ... ( input . ParallelLoadThreads !== undefined && input . ParallelLoadThreads !== null && { ParallelLoadThreads : input . ParallelLoadThreads } ) , ... ( input . Password !== undefined && input . Password !== null && { Password : input . Password } ) , ... ( input . Port !== undefined && input . Port !== null && { Port : input . Port } ) , ... ( input . SecretsManagerAccessRoleArn !== undefined && input . SecretsManagerAccessRoleArn !== null && { SecretsManagerAccessRoleArn : input . SecretsManagerAccessRoleArn } ) , ... ( input . SecretsManagerSecretId !== undefined && input . SecretsManagerSecretId !== null && { SecretsManagerSecretId : input . SecretsManagerSecretId } ) , ... ( input . ServerName !== undefined && input . ServerName !== null && { ServerName : input . ServerName } ) , ... ( input . ServerTimezone !== undefined && input . ServerTimezone !== null && { ServerTimezone : input . ServerTimezone } ) , ... ( input . TargetDbType !== undefined && input . TargetDbType !== null && { TargetDbType : input . TargetDbType } ) , ... ( input . Username !== undefined && input . Username !== null && { Username : input . Username } ) , } ; } ; const serializeAws_json1_1IBMDb2Settings = ( input , context ) : any => { return { ... ( input . CurrentLsn !== undefined && input . CurrentLsn !== null && { CurrentLsn : input . CurrentLsn } ) , ... ( input . DatabaseName !== undefined && input . DatabaseName !== null && { DatabaseName : input . DatabaseName } ) , ... ( input . MaxKBytesPerRead !== undefined && input . MaxKBytesPerRead !== null && { MaxKBytesPerRead : input . MaxKBytesPerRead } ) , ... ( input . Password !== undefined && input . Password !== null && { Password : input . Password } ) , ... ( input . Port !== undefined && input . Port !== null && { Port : input . Port } ) , ... ( input . SecretsManagerAccessRoleArn !== undefined && input . SecretsManagerAccessRoleArn !== null && { SecretsManagerAccessRoleArn : input . SecretsManagerAccessRoleArn } ) , ... ( input . SecretsManagerSecretId !== undefined && input . SecretsManagerSecretId !== null && { SecretsManagerSecretId : input . SecretsManagerSecretId } ) , ... ( input . ServerName !== undefined && input . ServerName !== null && { ServerName : input . ServerName } ) , ... ( input . SetDataCaptureChanges !== undefined && input . SetDataCaptureChanges !== null && { SetDataCaptureChanges : input . SetDataCaptureChanges } ) , ... ( input . Username !== undefined && input . Username !== null && { Username : input . Username } ) , } ; } ; const serializeAws_json1_1ImportCertificateMessage = ( input , context ) : any => { return { ... ( input . CertificateIdentifier !== undefined && input . CertificateIdentifier !== null && { CertificateIdentifier : input . CertificateIdentifier } ) , ... ( input . CertificatePem !== undefined && input . CertificatePem !== null && { CertificatePem : input . CertificatePem } ) , ... ( input . CertificateWallet !== undefined && input . CertificateWallet !== null && { CertificateWallet : context . base64Encoder ( input . CertificateWallet ) } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagList ( input . Tags , context ) } ) , } ; } ; const serializeAws_json1_1IncludeTestList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1IntegerList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1KafkaSettings = ( input , context ) : any => { return { ... ( input . Broker !== undefined && input . Broker !== null && { Broker : input . Broker } ) , ... ( input . IncludeControlDetails !== undefined && input . IncludeControlDetails !== null && { IncludeControlDetails : input . IncludeControlDetails } ) , ... ( input . IncludeNullAndEmpty !== undefined && input . IncludeNullAndEmpty !== null && { IncludeNullAndEmpty : input . IncludeNullAndEmpty } ) , ... ( input . IncludePartitionValue !== undefined && input . IncludePartitionValue !== null && { IncludePartitionValue : input . IncludePartitionValue } ) , ... ( input . IncludeTableAlterOperations !== undefined && input . IncludeTableAlterOperations !== null && { IncludeTableAlterOperations : input . IncludeTableAlterOperations } ) , ... ( input . IncludeTransactionDetails !== undefined && input . IncludeTransactionDetails !== null && { IncludeTransactionDetails : input . IncludeTransactionDetails } ) , ... ( input . MessageFormat !== undefined && input . MessageFormat !== null && { MessageFormat : input . MessageFormat } ) , ... ( input . MessageMaxBytes !== undefined && input . MessageMaxBytes !== null && { MessageMaxBytes : input . MessageMaxBytes } ) , ... ( input . NoHexPrefix !== undefined && input . NoHexPrefix !== null && { NoHexPrefix : input . NoHexPrefix } ) , ... ( input . PartitionIncludeSchemaTable !== undefined && input . PartitionIncludeSchemaTable !== null && { PartitionIncludeSchemaTable : input . PartitionIncludeSchemaTable } ) , ... ( input . SaslPassword !== undefined && input . SaslPassword !== null && { SaslPassword : input . SaslPassword } ) , ... ( input . SaslUsername !== undefined && input . SaslUsername !== null && { SaslUsername : input . SaslUsername } ) , ... ( input . SecurityProtocol !== undefined && input . SecurityProtocol !== null && { SecurityProtocol : input . SecurityProtocol } ) , ... ( input . SslCaCertificateArn !== undefined && input . SslCaCertificateArn !== null && { SslCaCertificateArn : input . SslCaCertificateArn } ) , ... ( input . SslClientCertificateArn !== undefined && input . SslClientCertificateArn !== null && { SslClientCertificateArn : input . SslClientCertificateArn } ) , ... ( input . SslClientKeyArn !== undefined && input . SslClientKeyArn !== null && { SslClientKeyArn : input . SslClientKeyArn } ) , ... ( input . SslClientKeyPassword !== undefined && input . SslClientKeyPassword !== null && { SslClientKeyPassword : input . SslClientKeyPassword } ) , ... ( input . Topic !== undefined && input . Topic !== null && { Topic : input . Topic } ) , } ; } ; const serializeAws_json1_1KeyList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1KinesisSettings = ( input , context ) : any => { return { ... ( input . IncludeControlDetails !== undefined && input . IncludeControlDetails !== null && { IncludeControlDetails : input . IncludeControlDetails } ) , ... ( input . IncludeNullAndEmpty !== undefined && input . IncludeNullAndEmpty !== null && { IncludeNullAndEmpty : input . IncludeNullAndEmpty } ) , ... ( input . IncludePartitionValue !== undefined && input . IncludePartitionValue !== null && { IncludePartitionValue : input . IncludePartitionValue } ) , ... ( input . IncludeTableAlterOperations !== undefined && input . IncludeTableAlterOperations !== null && { IncludeTableAlterOperations : input . IncludeTableAlterOperations } ) , ... ( input . IncludeTransactionDetails !== undefined && input . IncludeTransactionDetails !== null && { IncludeTransactionDetails : input . IncludeTransactionDetails } ) , ... ( input . MessageFormat !== undefined && input . MessageFormat !== null && { MessageFormat : input . MessageFormat } ) , ... ( input . NoHexPrefix !== undefined && input . NoHexPrefix !== null && { NoHexPrefix : input . NoHexPrefix } ) , ... ( input . PartitionIncludeSchemaTable !== undefined && input . PartitionIncludeSchemaTable !== null && { PartitionIncludeSchemaTable : input . PartitionIncludeSchemaTable } ) , ... ( input . ServiceAccessRoleArn !== undefined && input . ServiceAccessRoleArn !== null && { ServiceAccessRoleArn : input . ServiceAccessRoleArn } ) , ... ( input . StreamArn !== undefined && input . StreamArn !== null && { StreamArn : input . StreamArn } ) , } ; } ; const serializeAws_json1_1ListTagsForResourceMessage = ( input , context ) : any => { return { ... ( input . ResourceArn !== undefined && input . ResourceArn !== null && { ResourceArn : input . ResourceArn } ) , ... ( input . ResourceArnList !== undefined && input . ResourceArnList !== null && { ResourceArnList : serializeAws_json1_1ArnList ( input . ResourceArnList , context ) , } ) , } ; } ; const serializeAws_json1_1MicrosoftSQLServerSettings = ( input , context ) : any => { return { ... ( input . BcpPacketSize !== undefined && input . BcpPacketSize !== null && { BcpPacketSize : input . BcpPacketSize } ) , ... ( input . ControlTablesFileGroup !== undefined && input . ControlTablesFileGroup !== null && { ControlTablesFileGroup : input . ControlTablesFileGroup } ) , ... ( input . DatabaseName !== undefined && input . DatabaseName !== null && { DatabaseName : input . DatabaseName } ) , ... ( input . Password !== undefined && input . Password !== null && { Password : input . Password } ) , ... ( input . Port !== undefined && input . Port !== null && { Port : input . Port } ) , ... ( input . QuerySingleAlwaysOnNode !== undefined && input . QuerySingleAlwaysOnNode !== null && { QuerySingleAlwaysOnNode : input . QuerySingleAlwaysOnNode } ) , ... ( input . ReadBackupOnly !== undefined && input . ReadBackupOnly !== null && { ReadBackupOnly : input . ReadBackupOnly } ) , ... ( input . SafeguardPolicy !== undefined && input . SafeguardPolicy !== null && { SafeguardPolicy : input . SafeguardPolicy } ) , ... ( input . SecretsManagerAccessRoleArn !== undefined && input . SecretsManagerAccessRoleArn !== null && { SecretsManagerAccessRoleArn : input . SecretsManagerAccessRoleArn } ) , ... ( input . SecretsManagerSecretId !== undefined && input . SecretsManagerSecretId !== null && { SecretsManagerSecretId : input . SecretsManagerSecretId } ) , ... ( input . ServerName !== undefined && input . ServerName !== null && { ServerName : input . ServerName } ) , ... ( input . UseBcpFullLoad !== undefined && input . UseBcpFullLoad !== null && { UseBcpFullLoad : input . UseBcpFullLoad } ) , ... ( input . UseThirdPartyBackupDevice !== undefined && input . UseThirdPartyBackupDevice !== null && { UseThirdPartyBackupDevice : input . UseThirdPartyBackupDevice } ) , ... ( input . Username !== undefined && input . Username !== null && { Username : input . Username } ) , } ; } ; const serializeAws_json1_1ModifyEndpointMessage = ( input , context ) : any => { return { ... ( input . CertificateArn !== undefined && input . CertificateArn !== null && { CertificateArn : input . CertificateArn } ) , ... ( input . DatabaseName !== undefined && input . DatabaseName !== null && { DatabaseName : input . DatabaseName } ) , ... ( input . DmsTransferSettings !== undefined && input . DmsTransferSettings !== null && { DmsTransferSettings : serializeAws_json1_1DmsTransferSettings ( input . DmsTransferSettings , context ) , } ) , ... ( input . DocDbSettings !== undefined && input . DocDbSettings !== null && { DocDbSettings : serializeAws_json1_1DocDbSettings ( input . DocDbSettings , context ) , } ) , ... ( input . DynamoDbSettings !== undefined && input . DynamoDbSettings !== null && { DynamoDbSettings : serializeAws_json1_1DynamoDbSettings ( input . DynamoDbSettings , context ) , } ) , ... ( input . ElasticsearchSettings !== undefined && input . ElasticsearchSettings !== null && { ElasticsearchSettings : serializeAws_json1_1ElasticsearchSettings ( input . ElasticsearchSettings , context ) , } ) , ... ( input . EndpointArn !== undefined && input . EndpointArn !== null && { EndpointArn : input . EndpointArn } ) , ... ( input . EndpointIdentifier !== undefined && input . EndpointIdentifier !== null && { EndpointIdentifier : input . EndpointIdentifier } ) , ... ( input . EndpointType !== undefined && input . EndpointType !== null && { EndpointType : input . EndpointType } ) , ... ( input . EngineName !== undefined && input . EngineName !== null && { EngineName : input . EngineName } ) , ... ( input . ExactSettings !== undefined && input . ExactSettings !== null && { ExactSettings : input . ExactSettings } ) , ... ( input . ExternalTableDefinition !== undefined && input . ExternalTableDefinition !== null && { ExternalTableDefinition : input . ExternalTableDefinition } ) , ... ( input . ExtraConnectionAttributes !== undefined && input . ExtraConnectionAttributes !== null && { ExtraConnectionAttributes : input . ExtraConnectionAttributes } ) , ... ( input . GcpMySQLSettings !== undefined && input . GcpMySQLSettings !== null && { GcpMySQLSettings : serializeAws_json1_1GcpMySQLSettings ( input . GcpMySQLSettings , context ) , } ) , ... ( input . IBMDb2Settings !== undefined && input . IBMDb2Settings !== null && { IBMDb2Settings : serializeAws_json1_1IBMDb2Settings ( input . IBMDb2Settings , context ) , } ) , ... ( input . KafkaSettings !== undefined && input . KafkaSettings !== null && { KafkaSettings : serializeAws_json1_1KafkaSettings ( input . KafkaSettings , context ) , } ) , ... ( input . KinesisSettings !== undefined && input . KinesisSettings !== null && { KinesisSettings : serializeAws_json1_1KinesisSettings ( input . KinesisSettings , context ) , } ) , ... ( input . MicrosoftSQLServerSettings !== undefined && input . MicrosoftSQLServerSettings !== null && { MicrosoftSQLServerSettings : serializeAws_json1_1MicrosoftSQLServerSettings ( input . MicrosoftSQLServerSettings , context ) , } ) , ... ( input . MongoDbSettings !== undefined && input . MongoDbSettings !== null && { MongoDbSettings : serializeAws_json1_1MongoDbSettings ( input . MongoDbSettings , context ) , } ) , ... ( input . MySQLSettings !== undefined && input . MySQLSettings !== null && { MySQLSettings : serializeAws_json1_1MySQLSettings ( input . MySQLSettings , context ) , } ) , ... ( input . NeptuneSettings !== undefined && input . NeptuneSettings !== null && { NeptuneSettings : serializeAws_json1_1NeptuneSettings ( input . NeptuneSettings , context ) , } ) , ... ( input . OracleSettings !== undefined && input . OracleSettings !== null && { OracleSettings : serializeAws_json1_1OracleSettings ( input . OracleSettings , context ) , } ) , ... ( input . Password !== undefined && input . Password !== null && { Password : input . Password } ) , ... ( input . Port !== undefined && input . Port !== null && { Port : input . Port } ) , ... ( input . PostgreSQLSettings !== undefined && input . PostgreSQLSettings !== null && { PostgreSQLSettings : serializeAws_json1_1PostgreSQLSettings ( input . PostgreSQLSettings , context ) , } ) , ... ( input . RedisSettings !== undefined && input . RedisSettings !== null && { RedisSettings : serializeAws_json1_1RedisSettings ( input . RedisSettings , context ) , } ) , ... ( input . RedshiftSettings !== undefined && input . RedshiftSettings !== null && { RedshiftSettings : serializeAws_json1_1RedshiftSettings ( input . RedshiftSettings , context ) , } ) , ... ( input . S3Settings !== undefined && input . S3Settings !== null && { S3Settings : serializeAws_json1_1S3Settings ( input . S3Settings , context ) } ) , ... ( input . ServerName !== undefined && input . ServerName !== null && { ServerName : input . ServerName } ) , ... ( input . ServiceAccessRoleArn !== undefined && input . ServiceAccessRoleArn !== null && { ServiceAccessRoleArn : input . ServiceAccessRoleArn } ) , ... ( input . SslMode !== undefined && input . SslMode !== null && { SslMode : input . SslMode } ) , ... ( input . SybaseSettings !== undefined && input . SybaseSettings !== null && { SybaseSettings : serializeAws_json1_1SybaseSettings ( input . SybaseSettings , context ) , } ) , ... ( input . Username !== undefined && input . Username !== null && { Username : input . Username } ) , } ; } ; const serializeAws_json1_1ModifyEventSubscriptionMessage = ( input , context ) : any => { return { ... ( input . Enabled !== undefined && input . Enabled !== null && { Enabled : input . Enabled } ) , ... ( input . EventCategories !== undefined && input . EventCategories !== null && { EventCategories : serializeAws_json1_1EventCategoriesList ( input . EventCategories , context ) , } ) , ... ( input . SnsTopicArn !== undefined && input . SnsTopicArn !== null && { SnsTopicArn : input . SnsTopicArn } ) , ... ( input . SourceType !== undefined && input . SourceType !== null && { SourceType : input . SourceType } ) , ... ( input . SubscriptionName !== undefined && input . SubscriptionName !== null && { SubscriptionName : input . SubscriptionName } ) , } ; } ; const serializeAws_json1_1ModifyReplicationInstanceMessage = ( input , context ) : any => { return { ... ( input . AllocatedStorage !== undefined && input . AllocatedStorage !== null && { AllocatedStorage : input . AllocatedStorage } ) , ... ( input . AllowMajorVersionUpgrade !== undefined && input . AllowMajorVersionUpgrade !== null && { AllowMajorVersionUpgrade : input . AllowMajorVersionUpgrade } ) , ... ( input . ApplyImmediately !== undefined && input . ApplyImmediately !== null && { ApplyImmediately : input . ApplyImmediately } ) , ... ( input . AutoMinorVersionUpgrade !== undefined && input . AutoMinorVersionUpgrade !== null && { AutoMinorVersionUpgrade : input . AutoMinorVersionUpgrade } ) , ... ( input . EngineVersion !== undefined && input . EngineVersion !== null && { EngineVersion : input . EngineVersion } ) , ... ( input . MultiAZ !== undefined && input . MultiAZ !== null && { MultiAZ : input . MultiAZ } ) , ... ( input . PreferredMaintenanceWindow !== undefined && input . PreferredMaintenanceWindow !== null && { PreferredMaintenanceWindow : input . PreferredMaintenanceWindow } ) , ... ( input . ReplicationInstanceArn !== undefined && input . ReplicationInstanceArn !== null && { ReplicationInstanceArn : input . ReplicationInstanceArn } ) , ... ( input . ReplicationInstanceClass !== undefined && input . ReplicationInstanceClass !== null && { ReplicationInstanceClass : input . ReplicationInstanceClass } ) , ... ( input . ReplicationInstanceIdentifier !== undefined && input . ReplicationInstanceIdentifier !== null && { ReplicationInstanceIdentifier : input . ReplicationInstanceIdentifier , } ) , ... ( input . VpcSecurityGroupIds !== undefined && input . VpcSecurityGroupIds !== null && { VpcSecurityGroupIds : serializeAws_json1_1VpcSecurityGroupIdList ( input . VpcSecurityGroupIds , context ) , } ) , } ; } ; const serializeAws_json1_1ModifyReplicationSubnetGroupMessage = ( input , context ) : any => { return { ... ( input . ReplicationSubnetGroupDescription !== undefined && input . ReplicationSubnetGroupDescription !== null && { ReplicationSubnetGroupDescription : input . ReplicationSubnetGroupDescription , } ) , ... ( input . ReplicationSubnetGroupIdentifier !== undefined && input . ReplicationSubnetGroupIdentifier !== null && { ReplicationSubnetGroupIdentifier : input . ReplicationSubnetGroupIdentifier , } ) , ... ( input . SubnetIds !== undefined && input . SubnetIds !== null && { SubnetIds : serializeAws_json1_1SubnetIdentifierList ( input . SubnetIds , context ) } ) , } ; } ; const serializeAws_json1_1ModifyReplicationTaskMessage = ( input , context ) : any => { return { ... ( input . CdcStartPosition !== undefined && input . CdcStartPosition !== null && { CdcStartPosition : input . CdcStartPosition } ) , ... ( input . CdcStartTime !== undefined && input . CdcStartTime !== null && { CdcStartTime : Math . round ( input . CdcStartTime . getTime ( ) / 1000 ) } ) , ... ( input . CdcStopPosition !== undefined && input . CdcStopPosition !== null && { CdcStopPosition : input . CdcStopPosition } ) , ... ( input . MigrationType !== undefined && input . MigrationType !== null && { MigrationType : input . MigrationType } ) , ... ( input . ReplicationTaskArn !== undefined && input . ReplicationTaskArn !== null && { ReplicationTaskArn : input . ReplicationTaskArn } ) , ... ( input . ReplicationTaskIdentifier !== undefined && input . ReplicationTaskIdentifier !== null && { ReplicationTaskIdentifier : input . ReplicationTaskIdentifier } ) , ... ( input . ReplicationTaskSettings !== undefined && input . ReplicationTaskSettings !== null && { ReplicationTaskSettings : input . ReplicationTaskSettings } ) , ... ( input . TableMappings !== undefined && input . TableMappings !== null && { TableMappings : input . TableMappings } ) , ... ( input . TaskData !== undefined && input . TaskData !== null && { TaskData : input . TaskData } ) , } ; } ; const serializeAws_json1_1MongoDbSettings = ( input , context ) : any => { return { ... ( input . AuthMechanism !== undefined && input . AuthMechanism !== null && { AuthMechanism : input . AuthMechanism } ) , ... ( input . AuthSource !== undefined && input . AuthSource !== null && { AuthSource : input . AuthSource } ) , ... ( input . AuthType !== undefined && input . AuthType !== null && { AuthType : input . AuthType } ) , ... ( input . DatabaseName !== undefined && input . DatabaseName !== null && { DatabaseName : input . DatabaseName } ) , ... ( input . DocsToInvestigate !== undefined && input . DocsToInvestigate !== null && { DocsToInvestigate : input . DocsToInvestigate } ) , ... ( input . ExtractDocId !== undefined && input . ExtractDocId !== null && { ExtractDocId : input . ExtractDocId } ) , ... ( input . KmsKeyId !== undefined && input . KmsKeyId !== null && { KmsKeyId : input . KmsKeyId } ) , ... ( input . NestingLevel !== undefined && input . NestingLevel !== null && { NestingLevel : input . NestingLevel } ) , ... ( input . Password !== undefined && input . Password !== null && { Password : input . Password } ) , ... ( input . Port !== undefined && input . Port !== null && { Port : input . Port } ) , ... ( input . SecretsManagerAccessRoleArn !== undefined && input . SecretsManagerAccessRoleArn !== null && { SecretsManagerAccessRoleArn : input . SecretsManagerAccessRoleArn } ) , ... ( input . SecretsManagerSecretId !== undefined && input . SecretsManagerSecretId !== null && { SecretsManagerSecretId : input . SecretsManagerSecretId } ) , ... ( input . ServerName !== undefined && input . ServerName !== null && { ServerName : input . ServerName } ) , ... ( input . Username !== undefined && input . Username !== null && { Username : input . Username } ) , } ; } ; const serializeAws_json1_1MoveReplicationTaskMessage = ( input , context ) : any => { return { ... ( input . ReplicationTaskArn !== undefined && input . ReplicationTaskArn !== null && { ReplicationTaskArn : input . ReplicationTaskArn } ) , ... ( input . TargetReplicationInstanceArn !== undefined && input . TargetReplicationInstanceArn !== null && { TargetReplicationInstanceArn : input . TargetReplicationInstanceArn , } ) , } ; } ; const serializeAws_json1_1MySQLSettings = ( input , context ) : any => { return { ... ( input . AfterConnectScript !== undefined && input . AfterConnectScript !== null && { AfterConnectScript : input . AfterConnectScript } ) , ... ( input . CleanSourceMetadataOnMismatch !== undefined && input . CleanSourceMetadataOnMismatch !== null && { CleanSourceMetadataOnMismatch : input . CleanSourceMetadataOnMismatch , } ) , ... ( input . DatabaseName !== undefined && input . DatabaseName !== null && { DatabaseName : input . DatabaseName } ) , ... ( input . EventsPollInterval !== undefined && input . EventsPollInterval !== null && { EventsPollInterval : input . EventsPollInterval } ) , ... ( input . MaxFileSize !== undefined && input . MaxFileSize !== null && { MaxFileSize : input . MaxFileSize } ) , ... ( input . ParallelLoadThreads !== undefined && input . ParallelLoadThreads !== null && { ParallelLoadThreads : input . ParallelLoadThreads } ) , ... ( input . Password !== undefined && input . Password !== null && { Password : input . Password } ) , ... ( input . Port !== undefined && input . Port !== null && { Port : input . Port } ) , ... ( input . SecretsManagerAccessRoleArn !== undefined && input . SecretsManagerAccessRoleArn !== null && { SecretsManagerAccessRoleArn : input . SecretsManagerAccessRoleArn } ) , ... ( input . SecretsManagerSecretId !== undefined && input . SecretsManagerSecretId !== null && { SecretsManagerSecretId : input . SecretsManagerSecretId } ) , ... ( input . ServerName !== undefined && input . ServerName !== null && { ServerName : input . ServerName } ) , ... ( input . ServerTimezone !== undefined && input . ServerTimezone !== null && { ServerTimezone : input . ServerTimezone } ) , ... ( input . TargetDbType !== undefined && input . TargetDbType !== null && { TargetDbType : input . TargetDbType } ) , ... ( input . Username !== undefined && input . Username !== null && { Username : input . Username } ) , } ; } ; const serializeAws_json1_1NeptuneSettings = ( input , context ) : any => { return { ... ( input . ErrorRetryDuration !== undefined && input . ErrorRetryDuration !== null && { ErrorRetryDuration : input . ErrorRetryDuration } ) , ... ( input . IamAuthEnabled !== undefined && input . IamAuthEnabled !== null && { IamAuthEnabled : input . IamAuthEnabled } ) , ... ( input . MaxFileSize !== undefined && input . MaxFileSize !== null && { MaxFileSize : input . MaxFileSize } ) , ... ( input . MaxRetryCount !== undefined && input . MaxRetryCount !== null && { MaxRetryCount : input . MaxRetryCount } ) , ... ( input . S3BucketFolder !== undefined && input . S3BucketFolder !== null && { S3BucketFolder : input . S3BucketFolder } ) , ... ( input . S3BucketName !== undefined && input . S3BucketName !== null && { S3BucketName : input . S3BucketName } ) , ... ( input . ServiceAccessRoleArn !== undefined && input . ServiceAccessRoleArn !== null && { ServiceAccessRoleArn : input . ServiceAccessRoleArn } ) , } ; } ; const serializeAws_json1_1OracleSettings = ( input , context ) : any => { return { ... ( input . AccessAlternateDirectly !== undefined && input . AccessAlternateDirectly !== null && { AccessAlternateDirectly : input . AccessAlternateDirectly } ) , ... ( input . AddSupplementalLogging !== undefined && input . AddSupplementalLogging !== null && { AddSupplementalLogging : input . AddSupplementalLogging } ) , ... ( input . AdditionalArchivedLogDestId !== undefined && input . AdditionalArchivedLogDestId !== null && { AdditionalArchivedLogDestId : input . AdditionalArchivedLogDestId } ) , ... ( input . AllowSelectNestedTables !== undefined && input . AllowSelectNestedTables !== null && { AllowSelectNestedTables : input . AllowSelectNestedTables } ) , ... ( input . ArchivedLogDestId !== undefined && input . ArchivedLogDestId !== null && { ArchivedLogDestId : input . ArchivedLogDestId } ) , ... ( input . ArchivedLogsOnly !== undefined && input . ArchivedLogsOnly !== null && { ArchivedLogsOnly : input . ArchivedLogsOnly } ) , ... ( input . AsmPassword !== undefined && input . AsmPassword !== null && { AsmPassword : input . AsmPassword } ) , ... ( input . AsmServer !== undefined && input . AsmServer !== null && { AsmServer : input . AsmServer } ) , ... ( input . AsmUser !== undefined && input . AsmUser !== null && { AsmUser : input . AsmUser } ) , ... ( input . CharLengthSemantics !== undefined && input . CharLengthSemantics !== null && { CharLengthSemantics : input . CharLengthSemantics } ) , ... ( input . DatabaseName !== undefined && input . DatabaseName !== null && { DatabaseName : input . DatabaseName } ) , ... ( input . DirectPathNoLog !== undefined && input . DirectPathNoLog !== null && { DirectPathNoLog : input . DirectPathNoLog } ) , ... ( input . DirectPathParallelLoad !== undefined && input . DirectPathParallelLoad !== null && { DirectPathParallelLoad : input . DirectPathParallelLoad } ) , ... ( input . EnableHomogenousTablespace !== undefined && input . EnableHomogenousTablespace !== null && { EnableHomogenousTablespace : input . EnableHomogenousTablespace } ) , ... ( input . ExtraArchivedLogDestIds !== undefined && input . ExtraArchivedLogDestIds !== null && { ExtraArchivedLogDestIds : serializeAws_json1_1IntegerList ( input . ExtraArchivedLogDestIds , context ) , } ) , ... ( input . FailTasksOnLobTruncation !== undefined && input . FailTasksOnLobTruncation !== null && { FailTasksOnLobTruncation : input . FailTasksOnLobTruncation } ) , ... ( input . NumberDatatypeScale !== undefined && input . NumberDatatypeScale !== null && { NumberDatatypeScale : input . NumberDatatypeScale } ) , ... ( input . OraclePathPrefix !== undefined && input . OraclePathPrefix !== null && { OraclePathPrefix : input . OraclePathPrefix } ) , ... ( input . ParallelAsmReadThreads !== undefined && input . ParallelAsmReadThreads !== null && { ParallelAsmReadThreads : input . ParallelAsmReadThreads } ) , ... ( input . Password !== undefined && input . Password !== null && { Password : input . Password } ) , ... ( input . Port !== undefined && input . Port !== null && { Port : input . Port } ) , ... ( input . ReadAheadBlocks !== undefined && input . ReadAheadBlocks !== null && { ReadAheadBlocks : input . ReadAheadBlocks } ) , ... ( input . ReadTableSpaceName !== undefined && input . ReadTableSpaceName !== null && { ReadTableSpaceName : input . ReadTableSpaceName } ) , ... ( input . ReplacePathPrefix !== undefined && input . ReplacePathPrefix !== null && { ReplacePathPrefix : input . ReplacePathPrefix } ) , ... ( input . RetryInterval !== undefined && input . RetryInterval !== null && { RetryInterval : input . RetryInterval } ) , ... ( input . SecretsManagerAccessRoleArn !== undefined && input . SecretsManagerAccessRoleArn !== null && { SecretsManagerAccessRoleArn : input . SecretsManagerAccessRoleArn } ) , ... ( input . SecretsManagerOracleAsmAccessRoleArn !== undefined && input . SecretsManagerOracleAsmAccessRoleArn !== null && { SecretsManagerOracleAsmAccessRoleArn : input . SecretsManagerOracleAsmAccessRoleArn , } ) , ... ( input . SecretsManagerOracleAsmSecretId !== undefined && input . SecretsManagerOracleAsmSecretId !== null && { SecretsManagerOracleAsmSecretId : input . SecretsManagerOracleAsmSecretId , } ) , ... ( input . SecretsManagerSecretId !== undefined && input . SecretsManagerSecretId !== null && { SecretsManagerSecretId : input . SecretsManagerSecretId } ) , ... ( input . SecurityDbEncryption !== undefined && input . SecurityDbEncryption !== null && { SecurityDbEncryption : input . SecurityDbEncryption } ) , ... ( input . SecurityDbEncryptionName !== undefined && input . SecurityDbEncryptionName !== null && { SecurityDbEncryptionName : input . SecurityDbEncryptionName } ) , ... ( input . ServerName !== undefined && input . ServerName !== null && { ServerName : input . ServerName } ) , ... ( input . SpatialDataOptionToGeoJsonFunctionName !== undefined && input . SpatialDataOptionToGeoJsonFunctionName !== null && { SpatialDataOptionToGeoJsonFunctionName : input . SpatialDataOptionToGeoJsonFunctionName , } ) , ... ( input . StandbyDelayTime !== undefined && input . StandbyDelayTime !== null && { StandbyDelayTime : input . StandbyDelayTime } ) , ... ( input . UseAlternateFolderForOnline !== undefined && input . UseAlternateFolderForOnline !== null && { UseAlternateFolderForOnline : input . UseAlternateFolderForOnline } ) , ... ( input . UseBFile !== undefined && input . UseBFile !== null && { UseBFile : input . UseBFile } ) , ... ( input . UseDirectPathFullLoad !== undefined && input . UseDirectPathFullLoad !== null && { UseDirectPathFullLoad : input . UseDirectPathFullLoad } ) , ... ( input . UseLogminerReader !== undefined && input . UseLogminerReader !== null && { UseLogminerReader : input . UseLogminerReader } ) , ... ( input . UsePathPrefix !== undefined && input . UsePathPrefix !== null && { UsePathPrefix : input . UsePathPrefix } ) , ... ( input . Username !== undefined && input . Username !== null && { Username : input . Username } ) , } ; } ; const serializeAws_json1_1PostgreSQLSettings = ( input , context ) : any => { return { ... ( input . AfterConnectScript !== undefined && input . AfterConnectScript !== null && { AfterConnectScript : input . AfterConnectScript } ) , ... ( input . CaptureDdls !== undefined && input . CaptureDdls !== null && { CaptureDdls : input . CaptureDdls } ) , ... ( input . DatabaseName !== undefined && input . DatabaseName !== null && { DatabaseName : input . DatabaseName } ) , ... ( input . DdlArtifactsSchema !== undefined && input . DdlArtifactsSchema !== null && { DdlArtifactsSchema : input . DdlArtifactsSchema } ) , ... ( input . ExecuteTimeout !== undefined && input . ExecuteTimeout !== null && { ExecuteTimeout : input . ExecuteTimeout } ) , ... ( input . FailTasksOnLobTruncation !== undefined && input . FailTasksOnLobTruncation !== null && { FailTasksOnLobTruncation : input . FailTasksOnLobTruncation } ) , ... ( input . HeartbeatEnable !== undefined && input . HeartbeatEnable !== null && { HeartbeatEnable : input . HeartbeatEnable } ) , ... ( input . HeartbeatFrequency !== undefined && input . HeartbeatFrequency !== null && { HeartbeatFrequency : input . HeartbeatFrequency } ) , ... ( input . HeartbeatSchema !== undefined && input . HeartbeatSchema !== null && { HeartbeatSchema : input . HeartbeatSchema } ) , ... ( input . MaxFileSize !== undefined && input . MaxFileSize !== null && { MaxFileSize : input . MaxFileSize } ) , ... ( input . Password !== undefined && input . Password !== null && { Password : input . Password } ) , ... ( input . PluginName !== undefined && input . PluginName !== null && { PluginName : input . PluginName } ) , ... ( input . Port !== undefined && input . Port !== null && { Port : input . Port } ) , ... ( input . SecretsManagerAccessRoleArn !== undefined && input . SecretsManagerAccessRoleArn !== null && { SecretsManagerAccessRoleArn : input . SecretsManagerAccessRoleArn } ) , ... ( input . SecretsManagerSecretId !== undefined && input . SecretsManagerSecretId !== null && { SecretsManagerSecretId : input . SecretsManagerSecretId } ) , ... ( input . ServerName !== undefined && input . ServerName !== null && { ServerName : input . ServerName } ) , ... ( input . SlotName !== undefined && input . SlotName !== null && { SlotName : input . SlotName } ) , ... ( input . Username !== undefined && input . Username !== null && { Username : input . Username } ) , } ; } ; const serializeAws_json1_1RebootReplicationInstanceMessage = ( input , context ) : any => { return { ... ( input . ForceFailover !== undefined && input . ForceFailover !== null && { ForceFailover : input . ForceFailover } ) , ... ( input . ForcePlannedFailover !== undefined && input . ForcePlannedFailover !== null && { ForcePlannedFailover : input . ForcePlannedFailover } ) , ... ( input . ReplicationInstanceArn !== undefined && input . ReplicationInstanceArn !== null && { ReplicationInstanceArn : input . ReplicationInstanceArn } ) , } ; } ; const serializeAws_json1_1RedisSettings = ( input , context ) : any => { return { ... ( input . AuthPassword !== undefined && input . AuthPassword !== null && { AuthPassword : input . AuthPassword } ) , ... ( input . AuthType !== undefined && input . AuthType !== null && { AuthType : input . AuthType } ) , ... ( input . AuthUserName !== undefined && input . AuthUserName !== null && { AuthUserName : input . AuthUserName } ) , ... ( input . Port !== undefined && input . Port !== null && { Port : input . Port } ) , ... ( input . ServerName !== undefined && input . ServerName !== null && { ServerName : input . ServerName } ) , ... ( input . SslCaCertificateArn !== undefined && input . SslCaCertificateArn !== null && { SslCaCertificateArn : input . SslCaCertificateArn } ) , ... ( input . SslSecurityProtocol !== undefined && input . SslSecurityProtocol !== null && { SslSecurityProtocol : input . SslSecurityProtocol } ) , } ; } ; const serializeAws_json1_1RedshiftSettings = ( input , context ) : any => { return { ... ( input . AcceptAnyDate !== undefined && input . AcceptAnyDate !== null && { AcceptAnyDate : input . AcceptAnyDate } ) , ... ( input . AfterConnectScript !== undefined && input . AfterConnectScript !== null && { AfterConnectScript : input . AfterConnectScript } ) , ... ( input . BucketFolder !== undefined && input . BucketFolder !== null && { BucketFolder : input . BucketFolder } ) , ... ( input . BucketName !== undefined && input . BucketName !== null && { BucketName : input . BucketName } ) , ... ( input . CaseSensitiveNames !== undefined && input . CaseSensitiveNames !== null && { CaseSensitiveNames : input . CaseSensitiveNames } ) , ... ( input . CompUpdate !== undefined && input . CompUpdate !== null && { CompUpdate : input . CompUpdate } ) , ... ( input . ConnectionTimeout !== undefined && input . ConnectionTimeout !== null && { ConnectionTimeout : input . ConnectionTimeout } ) , ... ( input . DatabaseName !== undefined && input . DatabaseName !== null && { DatabaseName : input . DatabaseName } ) , ... ( input . DateFormat !== undefined && input . DateFormat !== null && { DateFormat : input . DateFormat } ) , ... ( input . EmptyAsNull !== undefined && input . EmptyAsNull !== null && { EmptyAsNull : input . EmptyAsNull } ) , ... ( input . EncryptionMode !== undefined && input . EncryptionMode !== null && { EncryptionMode : input . EncryptionMode } ) , ... ( input . ExplicitIds !== undefined && input . ExplicitIds !== null && { ExplicitIds : input . ExplicitIds } ) , ... ( input . FileTransferUploadStreams !== undefined && input . FileTransferUploadStreams !== null && { FileTransferUploadStreams : input . FileTransferUploadStreams } ) , ... ( input . LoadTimeout !== undefined && input . LoadTimeout !== null && { LoadTimeout : input . LoadTimeout } ) , ... ( input . MaxFileSize !== undefined && input . MaxFileSize !== null && { MaxFileSize : input . MaxFileSize } ) , ... ( input . Password !== undefined && input . Password !== null && { Password : input . Password } ) , ... ( input . Port !== undefined && input . Port !== null && { Port : input . Port } ) , ... ( input . RemoveQuotes !== undefined && input . RemoveQuotes !== null && { RemoveQuotes : input . RemoveQuotes } ) , ... ( input . ReplaceChars !== undefined && input . ReplaceChars !== null && { ReplaceChars : input . ReplaceChars } ) , ... ( input . ReplaceInvalidChars !== undefined && input . ReplaceInvalidChars !== null && { ReplaceInvalidChars : input . ReplaceInvalidChars } ) , ... ( input . SecretsManagerAccessRoleArn !== undefined && input . SecretsManagerAccessRoleArn !== null && { SecretsManagerAccessRoleArn : input . SecretsManagerAccessRoleArn } ) , ... ( input . SecretsManagerSecretId !== undefined && input . SecretsManagerSecretId !== null && { SecretsManagerSecretId : input . SecretsManagerSecretId } ) , ... ( input . ServerName !== undefined && input . ServerName !== null && { ServerName : input . ServerName } ) , ... ( input . ServerSideEncryptionKmsKeyId !== undefined && input . ServerSideEncryptionKmsKeyId !== null && { ServerSideEncryptionKmsKeyId : input . ServerSideEncryptionKmsKeyId , } ) , ... ( input . ServiceAccessRoleArn !== undefined && input . ServiceAccessRoleArn !== null && { ServiceAccessRoleArn : input . ServiceAccessRoleArn } ) , ... ( input . TimeFormat !== undefined && input . TimeFormat !== null && { TimeFormat : input . TimeFormat } ) , ... ( input . TrimBlanks !== undefined && input . TrimBlanks !== null && { TrimBlanks : input . TrimBlanks } ) , ... ( input . TruncateColumns !== undefined && input . TruncateColumns !== null && { TruncateColumns : input . TruncateColumns } ) , ... ( input . Username !== undefined && input . Username !== null && { Username : input . Username } ) , ... ( input . WriteBufferSize !== undefined && input . WriteBufferSize !== null && { WriteBufferSize : input . WriteBufferSize } ) , } ; } ; const serializeAws_json1_1RefreshSchemasMessage = ( input , context ) : any => { return { ... ( input . EndpointArn !== undefined && input . EndpointArn !== null && { EndpointArn : input . EndpointArn } ) , ... ( input . ReplicationInstanceArn !== undefined && input . ReplicationInstanceArn !== null && { ReplicationInstanceArn : input . ReplicationInstanceArn } ) , } ; } ; const serializeAws_json1_1ReloadTablesMessage = ( input , context ) : any => { return { ... ( input . ReloadOption !== undefined && input . ReloadOption !== null && { ReloadOption : input . ReloadOption } ) , ... ( input . ReplicationTaskArn !== undefined && input . ReplicationTaskArn !== null && { ReplicationTaskArn : input . ReplicationTaskArn } ) , ... ( input . TablesToReload !== undefined && input . TablesToReload !== null && { TablesToReload : serializeAws_json1_1TableListToReload ( input . TablesToReload , context ) , } ) , } ; } ; const serializeAws_json1_1RemoveTagsFromResourceMessage = ( input , context ) : any => { return { ... ( input . ResourceArn !== undefined && input . ResourceArn !== null && { ResourceArn : input . ResourceArn } ) , ... ( input . TagKeys !== undefined && input . TagKeys !== null && { TagKeys : serializeAws_json1_1KeyList ( input . TagKeys , context ) } ) , } ; } ; const serializeAws_json1_1S3Settings = ( input , context ) : any => { return { ... ( input . AddColumnName !== undefined && input . AddColumnName !== null && { AddColumnName : input . AddColumnName } ) , ... ( input . BucketFolder !== undefined && input . BucketFolder !== null && { BucketFolder : input . BucketFolder } ) , ... ( input . BucketName !== undefined && input . BucketName !== null && { BucketName : input . BucketName } ) , ... ( input . CannedAclForObjects !== undefined && input . CannedAclForObjects !== null && { CannedAclForObjects : input . CannedAclForObjects } ) , ... ( input . CdcInsertsAndUpdates !== undefined && input . CdcInsertsAndUpdates !== null && { CdcInsertsAndUpdates : input . CdcInsertsAndUpdates } ) , ... ( input . CdcInsertsOnly !== undefined && input . CdcInsertsOnly !== null && { CdcInsertsOnly : input . CdcInsertsOnly } ) , ... ( input . CdcMaxBatchInterval !== undefined && input . CdcMaxBatchInterval !== null && { CdcMaxBatchInterval : input . CdcMaxBatchInterval } ) , ... ( input . CdcMinFileSize !== undefined && input . CdcMinFileSize !== null && { CdcMinFileSize : input . CdcMinFileSize } ) , ... ( input . CdcPath !== undefined && input . CdcPath !== null && { CdcPath : input . CdcPath } ) , ... ( input . CompressionType !== undefined && input . CompressionType !== null && { CompressionType : input . CompressionType } ) , ... ( input . CsvDelimiter !== undefined && input . CsvDelimiter !== null && { CsvDelimiter : input . CsvDelimiter } ) , ... ( input . CsvNoSupValue !== undefined && input . CsvNoSupValue !== null && { CsvNoSupValue : input . CsvNoSupValue } ) , ... ( input . CsvNullValue !== undefined && input . CsvNullValue !== null && { CsvNullValue : input . CsvNullValue } ) , ... ( input . CsvRowDelimiter !== undefined && input . CsvRowDelimiter !== null && { CsvRowDelimiter : input . CsvRowDelimiter } ) , ... ( input . DataFormat !== undefined && input . DataFormat !== null && { DataFormat : input . DataFormat } ) , ... ( input . DataPageSize !== undefined && input . DataPageSize !== null && { DataPageSize : input . DataPageSize } ) , ... ( input . DatePartitionDelimiter !== undefined && input . DatePartitionDelimiter !== null && { DatePartitionDelimiter : input . DatePartitionDelimiter } ) , ... ( input . DatePartitionEnabled !== undefined && input . DatePartitionEnabled !== null && { DatePartitionEnabled : input . DatePartitionEnabled } ) , ... ( input . DatePartitionSequence !== undefined && input . DatePartitionSequence !== null && { DatePartitionSequence : input . DatePartitionSequence } ) , ... ( input . DatePartitionTimezone !== undefined && input . DatePartitionTimezone !== null && { DatePartitionTimezone : input . DatePartitionTimezone } ) , ... ( input . DictPageSizeLimit !== undefined && input . DictPageSizeLimit !== null && { DictPageSizeLimit : input . DictPageSizeLimit } ) , ... ( input . EnableStatistics !== undefined && input . EnableStatistics !== null && { EnableStatistics : input . EnableStatistics } ) , ... ( input . EncodingType !== undefined && input . EncodingType !== null && { EncodingType : input . EncodingType } ) , ... ( input . EncryptionMode !== undefined && input . EncryptionMode !== null && { EncryptionMode : input . EncryptionMode } ) , ... ( input . ExternalTableDefinition !== undefined && input . ExternalTableDefinition !== null && { ExternalTableDefinition : input . ExternalTableDefinition } ) , ... ( input . IgnoreHeaderRows !== undefined && input . IgnoreHeaderRows !== null && { IgnoreHeaderRows : input . IgnoreHeaderRows } ) , ... ( input . IncludeOpForFullLoad !== undefined && input . IncludeOpForFullLoad !== null && { IncludeOpForFullLoad : input . IncludeOpForFullLoad } ) , ... ( input . MaxFileSize !== undefined && input . MaxFileSize !== null && { MaxFileSize : input . MaxFileSize } ) , ... ( input . ParquetTimestampInMillisecond !== undefined && input . ParquetTimestampInMillisecond !== null && { ParquetTimestampInMillisecond : input . ParquetTimestampInMillisecond , } ) , ... ( input . ParquetVersion !== undefined && input . ParquetVersion !== null && { ParquetVersion : input . ParquetVersion } ) , ... ( input . PreserveTransactions !== undefined && input . PreserveTransactions !== null && { PreserveTransactions : input . PreserveTransactions } ) , ... ( input . Rfc4180 !== undefined && input . Rfc4180 !== null && { Rfc4180 : input . Rfc4180 } ) , ... ( input . RowGroupLength !== undefined && input . RowGroupLength !== null && { RowGroupLength : input . RowGroupLength } ) , ... ( input . ServerSideEncryptionKmsKeyId !== undefined && input . ServerSideEncryptionKmsKeyId !== null && { ServerSideEncryptionKmsKeyId : input . ServerSideEncryptionKmsKeyId , } ) , ... ( input . ServiceAccessRoleArn !== undefined && input . ServiceAccessRoleArn !== null && { ServiceAccessRoleArn : input . ServiceAccessRoleArn } ) , ... ( input . TimestampColumnName !== undefined && input . TimestampColumnName !== null && { TimestampColumnName : input . TimestampColumnName } ) , ... ( input . UseCsvNoSupValue !== undefined && input . UseCsvNoSupValue !== null && { UseCsvNoSupValue : input . UseCsvNoSupValue } ) , ... ( input . UseTaskStartTimeForFullLoadTimestamp !== undefined && input . UseTaskStartTimeForFullLoadTimestamp !== null && { UseTaskStartTimeForFullLoadTimestamp : input . UseTaskStartTimeForFullLoadTimestamp , } ) , } ; } ; const serializeAws_json1_1SourceIdsList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1StartReplicationTaskAssessmentMessage = ( input , context ) : any => { return { ... ( input . ReplicationTaskArn !== undefined && input . ReplicationTaskArn !== null && { ReplicationTaskArn : input . ReplicationTaskArn } ) , } ; } ; const serializeAws_json1_1StartReplicationTaskAssessmentRunMessage = ( input , context ) : any => { return { ... ( input . AssessmentRunName !== undefined && input . AssessmentRunName !== null && { AssessmentRunName : input . AssessmentRunName } ) , ... ( input . Exclude !== undefined && input . Exclude !== null && { Exclude : serializeAws_json1_1ExcludeTestList ( input . Exclude , context ) } ) , ... ( input . IncludeOnly !== undefined && input . IncludeOnly !== null && { IncludeOnly : serializeAws_json1_1IncludeTestList ( input . IncludeOnly , context ) } ) , ... ( input . ReplicationTaskArn !== undefined && input . ReplicationTaskArn !== null && { ReplicationTaskArn : input . ReplicationTaskArn } ) , ... ( input . ResultEncryptionMode !== undefined && input . ResultEncryptionMode !== null && { ResultEncryptionMode : input . ResultEncryptionMode } ) , ... ( input . ResultKmsKeyArn !== undefined && input . ResultKmsKeyArn !== null && { ResultKmsKeyArn : input . ResultKmsKeyArn } ) , ... ( input . ResultLocationBucket !== undefined && input . ResultLocationBucket !== null && { ResultLocationBucket : input . ResultLocationBucket } ) , ... ( input . ResultLocationFolder !== undefined && input . ResultLocationFolder !== null && { ResultLocationFolder : input . ResultLocationFolder } ) , ... ( input . ServiceAccessRoleArn !== undefined && input . ServiceAccessRoleArn !== null && { ServiceAccessRoleArn : input . ServiceAccessRoleArn } ) , } ; } ; const serializeAws_json1_1StartReplicationTaskMessage = ( input , context ) : any => { return { ... ( input . CdcStartPosition !== undefined && input . CdcStartPosition !== null && { CdcStartPosition : input . CdcStartPosition } ) , ... ( input . CdcStartTime !== undefined && input . CdcStartTime !== null && { CdcStartTime : Math . round ( input . CdcStartTime . getTime ( ) / 1000 ) } ) , ... ( input . CdcStopPosition !== undefined && input . CdcStopPosition !== null && { CdcStopPosition : input . CdcStopPosition } ) , ... ( input . ReplicationTaskArn !== undefined && input . ReplicationTaskArn !== null && { ReplicationTaskArn : input . ReplicationTaskArn } ) , ... ( input . StartReplicationTaskType !== undefined && input . StartReplicationTaskType !== null && { StartReplicationTaskType : input . StartReplicationTaskType } ) , } ; } ; const serializeAws_json1_1StopReplicationTaskMessage = ( input , context ) : any => { return { ... ( input . ReplicationTaskArn !== undefined && input . ReplicationTaskArn !== null && { ReplicationTaskArn : input . ReplicationTaskArn } ) , } ; } ; const serializeAws_json1_1SubnetIdentifierList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1SybaseSettings = ( input , context ) : any => { return { ... ( input . DatabaseName !== undefined && input . DatabaseName !== null && { DatabaseName : input . DatabaseName } ) , ... ( input . Password !== undefined && input . Password !== null && { Password : input . Password } ) , ... ( input . Port !== undefined && input . Port !== null && { Port : input . Port } ) , ... ( input . SecretsManagerAccessRoleArn !== undefined && input . SecretsManagerAccessRoleArn !== null && { SecretsManagerAccessRoleArn : input . SecretsManagerAccessRoleArn } ) , ... ( input . SecretsManagerSecretId !== undefined && input . SecretsManagerSecretId !== null && { SecretsManagerSecretId : input . SecretsManagerSecretId } ) , ... ( input . ServerName !== undefined && input . ServerName !== null && { ServerName : input . ServerName } ) , ... ( input . Username !== undefined && input . Username !== null && { Username : input . Username } ) , } ; } ; const serializeAws_json1_1TableListToReload = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1TableToReload ( entry , context ) ; } ) ; } ; const serializeAws_json1_1TableToReload = ( input , context ) : any => { return { ... ( input . SchemaName !== undefined && input . SchemaName !== null && { SchemaName : input . SchemaName } ) , ... ( input . TableName !== undefined && input . TableName !== null && { TableName : input . TableName } ) , } ; } ; const serializeAws_json1_1Tag = ( input , context ) : any => { return { ... ( input . Key !== undefined && input . Key !== null && { Key : input . Key } ) , ... ( input . ResourceArn !== undefined && input . ResourceArn !== null && { ResourceArn : input . ResourceArn } ) , ... ( input . Value !== undefined && input . Value !== null && { Value : input . Value } ) , } ; } ; const serializeAws_json1_1TagList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1Tag ( entry , context ) ; } ) ; } ; const serializeAws_json1_1TestConnectionMessage = ( input , context ) : any => { return { ... ( input . EndpointArn !== undefined && input . EndpointArn !== null && { EndpointArn : input . EndpointArn } ) , ... ( input . ReplicationInstanceArn !== undefined && input . ReplicationInstanceArn !== null && { ReplicationInstanceArn : input . ReplicationInstanceArn } ) , } ; } ; const serializeAws_json1_1VpcSecurityGroupIdList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const deserializeAws_json1_1AccessDeniedFault = ( output , context ) : AccessDeniedFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1AccountQuota = ( output , context ) : AccountQuota => { return { AccountQuotaName : __expectString ( output . AccountQuotaName ) , Max : __expectLong ( output . Max ) , Used : __expectLong ( output . Used ) , } as any ; } ; const deserializeAws_json1_1AccountQuotaList = ( output , context ) : AccountQuota [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1AccountQuota ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1AddTagsToResourceResponse = ( output , context ) : AddTagsToResourceResponse => { return { } as any ; } ; const deserializeAws_json1_1ApplyPendingMaintenanceActionResponse = ( output , context ) : ApplyPendingMaintenanceActionResponse => { return { ResourcePendingMaintenanceActions : output . ResourcePendingMaintenanceActions !== undefined && output . ResourcePendingMaintenanceActions !== null ? deserializeAws_json1_1ResourcePendingMaintenanceActions ( output . ResourcePendingMaintenanceActions , context ) : undefined , } as any ; } ; const deserializeAws_json1_1AvailabilityZone = ( output , context ) : AvailabilityZone => { return { Name : __expectString ( output . Name ) , } as any ; } ; const deserializeAws_json1_1AvailabilityZonesList = ( 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_json1_1CancelReplicationTaskAssessmentRunResponse = ( output , context ) : CancelReplicationTaskAssessmentRunResponse => { return { ReplicationTaskAssessmentRun : output . ReplicationTaskAssessmentRun !== undefined && output . ReplicationTaskAssessmentRun !== null ? deserializeAws_json1_1ReplicationTaskAssessmentRun ( output . ReplicationTaskAssessmentRun , context ) : undefined , } as any ; } ; const deserializeAws_json1_1Certificate = ( output , context ) : Certificate => { return { CertificateArn : __expectString ( output . CertificateArn ) , CertificateCreationDate : output . CertificateCreationDate !== undefined && output . CertificateCreationDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . CertificateCreationDate ) ) ) : undefined , CertificateIdentifier : __expectString ( output . CertificateIdentifier ) , CertificateOwner : __expectString ( output . CertificateOwner ) , CertificatePem : __expectString ( output . CertificatePem ) , CertificateWallet : output . CertificateWallet !== undefined && output . CertificateWallet !== null ? context . base64Decoder ( output . CertificateWallet ) : undefined , KeyLength : __expectInt32 ( output . KeyLength ) , SigningAlgorithm : __expectString ( output . SigningAlgorithm ) , ValidFromDate : output . ValidFromDate !== undefined && output . ValidFromDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . ValidFromDate ) ) ) : undefined , ValidToDate : output . ValidToDate !== undefined && output . ValidToDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . ValidToDate ) ) ) : undefined , } as any ; } ; const deserializeAws_json1_1CertificateList = ( output , context ) : Certificate [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Certificate ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1Connection = ( output , context ) : Connection => { return { EndpointArn : __expectString ( output . EndpointArn ) , EndpointIdentifier : __expectString ( output . EndpointIdentifier ) , LastFailureMessage : __expectString ( output . LastFailureMessage ) , ReplicationInstanceArn : __expectString ( output . ReplicationInstanceArn ) , ReplicationInstanceIdentifier : __expectString ( output . ReplicationInstanceIdentifier ) , Status : __expectString ( output . Status ) , } as any ; } ; const deserializeAws_json1_1ConnectionList = ( output , context ) : Connection [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Connection ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1CreateEndpointResponse = ( output , context ) : CreateEndpointResponse => { return { Endpoint : output . Endpoint !== undefined && output . Endpoint !== null ? deserializeAws_json1_1Endpoint ( output . Endpoint , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateEventSubscriptionResponse = ( output , context ) : CreateEventSubscriptionResponse => { return { EventSubscription : output . EventSubscription !== undefined && output . EventSubscription !== null ? deserializeAws_json1_1EventSubscription ( output . EventSubscription , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateReplicationInstanceResponse = ( output , context ) : CreateReplicationInstanceResponse => { return { ReplicationInstance : output . ReplicationInstance !== undefined && output . ReplicationInstance !== null ? deserializeAws_json1_1ReplicationInstance ( output . ReplicationInstance , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateReplicationSubnetGroupResponse = ( output , context ) : CreateReplicationSubnetGroupResponse => { return { ReplicationSubnetGroup : output . ReplicationSubnetGroup !== undefined && output . ReplicationSubnetGroup !== null ? deserializeAws_json1_1ReplicationSubnetGroup ( output . ReplicationSubnetGroup , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateReplicationTaskResponse = ( output , context ) : CreateReplicationTaskResponse => { return { ReplicationTask : output . ReplicationTask !== undefined && output . ReplicationTask !== null ? deserializeAws_json1_1ReplicationTask ( output . ReplicationTask , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteCertificateResponse = ( output , context ) : DeleteCertificateResponse => { return { Certificate : output . Certificate !== undefined && output . Certificate !== null ? deserializeAws_json1_1Certificate ( output . Certificate , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteConnectionResponse = ( output , context ) : DeleteConnectionResponse => { return { Connection : output . Connection !== undefined && output . Connection !== null ? deserializeAws_json1_1Connection ( output . Connection , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteEndpointResponse = ( output , context ) : DeleteEndpointResponse => { return { Endpoint : output . Endpoint !== undefined && output . Endpoint !== null ? deserializeAws_json1_1Endpoint ( output . Endpoint , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteEventSubscriptionResponse = ( output , context ) : DeleteEventSubscriptionResponse => { return { EventSubscription : output . EventSubscription !== undefined && output . EventSubscription !== null ? deserializeAws_json1_1EventSubscription ( output . EventSubscription , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteReplicationInstanceResponse = ( output , context ) : DeleteReplicationInstanceResponse => { return { ReplicationInstance : output . ReplicationInstance !== undefined && output . ReplicationInstance !== null ? deserializeAws_json1_1ReplicationInstance ( output . ReplicationInstance , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteReplicationSubnetGroupResponse = ( output , context ) : DeleteReplicationSubnetGroupResponse => { return { } as any ; } ; const deserializeAws_json1_1DeleteReplicationTaskAssessmentRunResponse = ( output , context ) : DeleteReplicationTaskAssessmentRunResponse => { return { ReplicationTaskAssessmentRun : output . ReplicationTaskAssessmentRun !== undefined && output . ReplicationTaskAssessmentRun !== null ? deserializeAws_json1_1ReplicationTaskAssessmentRun ( output . ReplicationTaskAssessmentRun , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteReplicationTaskResponse = ( output , context ) : DeleteReplicationTaskResponse => { return { ReplicationTask : output . ReplicationTask !== undefined && output . ReplicationTask !== null ? deserializeAws_json1_1ReplicationTask ( output . ReplicationTask , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeAccountAttributesResponse = ( output , context ) : DescribeAccountAttributesResponse => { return { AccountQuotas : output . AccountQuotas !== undefined && output . AccountQuotas !== null ? deserializeAws_json1_1AccountQuotaList ( output . AccountQuotas , context ) : undefined , UniqueAccountIdentifier : __expectString ( output . UniqueAccountIdentifier ) , } as any ; } ; const deserializeAws_json1_1DescribeApplicableIndividualAssessmentsResponse = ( output , context ) : DescribeApplicableIndividualAssessmentsResponse => { return { IndividualAssessmentNames : output . IndividualAssessmentNames !== undefined && output . IndividualAssessmentNames !== null ? deserializeAws_json1_1IndividualAssessmentNameList ( output . IndividualAssessmentNames , context ) : undefined , Marker : __expectString ( output . Marker ) , } as any ; } ; const deserializeAws_json1_1DescribeCertificatesResponse = ( output , context ) : DescribeCertificatesResponse => { return { Certificates : output . Certificates !== undefined && output . Certificates !== null ? deserializeAws_json1_1CertificateList ( output . Certificates , context ) : undefined , Marker : __expectString ( output . Marker ) , } as any ; } ; const deserializeAws_json1_1DescribeConnectionsResponse = ( output , context ) : DescribeConnectionsResponse => { return { Connections : output . Connections !== undefined && output . Connections !== null ? deserializeAws_json1_1ConnectionList ( output . Connections , context ) : undefined , Marker : __expectString ( output . Marker ) , } as any ; } ; const deserializeAws_json1_1DescribeEndpointSettingsResponse = ( output , context ) : DescribeEndpointSettingsResponse => { return { EndpointSettings : output . EndpointSettings !== undefined && output . EndpointSettings !== null ? deserializeAws_json1_1EndpointSettingsList ( output . EndpointSettings , context ) : undefined , Marker : __expectString ( output . Marker ) , } as any ; } ; const deserializeAws_json1_1DescribeEndpointsResponse = ( output , context ) : DescribeEndpointsResponse => { return { Endpoints : output . Endpoints !== undefined && output . Endpoints !== null ? deserializeAws_json1_1EndpointList ( output . Endpoints , context ) : undefined , Marker : __expectString ( output . Marker ) , } as any ; } ; const deserializeAws_json1_1DescribeEndpointTypesResponse = ( output , context ) : DescribeEndpointTypesResponse => { return { Marker : __expectString ( output . Marker ) , SupportedEndpointTypes : output . SupportedEndpointTypes !== undefined && output . SupportedEndpointTypes !== null ? deserializeAws_json1_1SupportedEndpointTypeList ( output . SupportedEndpointTypes , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeEventCategoriesResponse = ( output , context ) : DescribeEventCategoriesResponse => { return { EventCategoryGroupList : output . EventCategoryGroupList !== undefined && output . EventCategoryGroupList !== null ? deserializeAws_json1_1EventCategoryGroupList ( output . EventCategoryGroupList , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeEventsResponse = ( output , context ) : DescribeEventsResponse => { return { Events : output . Events !== undefined && output . Events !== null ? deserializeAws_json1_1EventList ( output . Events , context ) : undefined , Marker : __expectString ( output . Marker ) , } as any ; } ; const deserializeAws_json1_1DescribeEventSubscriptionsResponse = ( output , context ) : DescribeEventSubscriptionsResponse => { return { EventSubscriptionsList : output . EventSubscriptionsList !== undefined && output . EventSubscriptionsList !== null ? deserializeAws_json1_1EventSubscriptionsList ( output . EventSubscriptionsList , context ) : undefined , Marker : __expectString ( output . Marker ) , } as any ; } ; const deserializeAws_json1_1DescribeOrderableReplicationInstancesResponse = ( output , context ) : DescribeOrderableReplicationInstancesResponse => { return { Marker : __expectString ( output . Marker ) , OrderableReplicationInstances : output . OrderableReplicationInstances !== undefined && output . OrderableReplicationInstances !== null ? deserializeAws_json1_1OrderableReplicationInstanceList ( output . OrderableReplicationInstances , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribePendingMaintenanceActionsResponse = ( output , context ) : DescribePendingMaintenanceActionsResponse => { return { Marker : __expectString ( output . Marker ) , PendingMaintenanceActions : output . PendingMaintenanceActions !== undefined && output . PendingMaintenanceActions !== null ? deserializeAws_json1_1PendingMaintenanceActions ( output . PendingMaintenanceActions , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeRefreshSchemasStatusResponse = ( output , context ) : DescribeRefreshSchemasStatusResponse => { return { RefreshSchemasStatus : output . RefreshSchemasStatus !== undefined && output . RefreshSchemasStatus !== null ? deserializeAws_json1_1RefreshSchemasStatus ( output . RefreshSchemasStatus , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeReplicationInstancesResponse = ( output , context ) : DescribeReplicationInstancesResponse => { return { Marker : __expectString ( output . Marker ) , ReplicationInstances : output . ReplicationInstances !== undefined && output . ReplicationInstances !== null ? deserializeAws_json1_1ReplicationInstanceList ( output . ReplicationInstances , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeReplicationInstanceTaskLogsResponse = ( output , context ) : DescribeReplicationInstanceTaskLogsResponse => { return { Marker : __expectString ( output . Marker ) , ReplicationInstanceArn : __expectString ( output . ReplicationInstanceArn ) , ReplicationInstanceTaskLogs : output . ReplicationInstanceTaskLogs !== undefined && output . ReplicationInstanceTaskLogs !== null ? deserializeAws_json1_1ReplicationInstanceTaskLogsList ( output . ReplicationInstanceTaskLogs , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeReplicationSubnetGroupsResponse = ( output , context ) : DescribeReplicationSubnetGroupsResponse => { return { Marker : __expectString ( output . Marker ) , ReplicationSubnetGroups : output . ReplicationSubnetGroups !== undefined && output . ReplicationSubnetGroups !== null ? deserializeAws_json1_1ReplicationSubnetGroups ( output . ReplicationSubnetGroups , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeReplicationTaskAssessmentResultsResponse = ( output , context ) : DescribeReplicationTaskAssessmentResultsResponse => { return { BucketName : __expectString ( output . BucketName ) , Marker : __expectString ( output . Marker ) , ReplicationTaskAssessmentResults : output . ReplicationTaskAssessmentResults !== undefined && output . ReplicationTaskAssessmentResults !== null ? deserializeAws_json1_1ReplicationTaskAssessmentResultList ( output . ReplicationTaskAssessmentResults , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeReplicationTaskAssessmentRunsResponse = ( output , context ) : DescribeReplicationTaskAssessmentRunsResponse => { return { Marker : __expectString ( output . Marker ) , ReplicationTaskAssessmentRuns : output . ReplicationTaskAssessmentRuns !== undefined && output . ReplicationTaskAssessmentRuns !== null ? deserializeAws_json1_1ReplicationTaskAssessmentRunList ( output . ReplicationTaskAssessmentRuns , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeReplicationTaskIndividualAssessmentsResponse = ( output , context ) : DescribeReplicationTaskIndividualAssessmentsResponse => { return { Marker : __expectString ( output . Marker ) , ReplicationTaskIndividualAssessments : output . ReplicationTaskIndividualAssessments !== undefined && output . ReplicationTaskIndividualAssessments !== null ? deserializeAws_json1_1ReplicationTaskIndividualAssessmentList ( output . ReplicationTaskIndividualAssessments , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeReplicationTasksResponse = ( output , context ) : DescribeReplicationTasksResponse => { return { Marker : __expectString ( output . Marker ) , ReplicationTasks : output . ReplicationTasks !== undefined && output . ReplicationTasks !== null ? deserializeAws_json1_1ReplicationTaskList ( output . ReplicationTasks , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeSchemasResponse = ( output , context ) : DescribeSchemasResponse => { return { Marker : __expectString ( output . Marker ) , Schemas : output . Schemas !== undefined && output . Schemas !== null ? deserializeAws_json1_1SchemaList ( output . Schemas , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeTableStatisticsResponse = ( output , context ) : DescribeTableStatisticsResponse => { return { Marker : __expectString ( output . Marker ) , ReplicationTaskArn : __expectString ( output . ReplicationTaskArn ) , TableStatistics : output . TableStatistics !== undefined && output . TableStatistics !== null ? deserializeAws_json1_1TableStatisticsList ( output . TableStatistics , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DmsTransferSettings = ( output , context ) : DmsTransferSettings => { return { BucketName : __expectString ( output . BucketName ) , ServiceAccessRoleArn : __expectString ( output . ServiceAccessRoleArn ) , } as any ; } ; const deserializeAws_json1_1DocDbSettings = ( output , context ) : DocDbSettings => { return { DatabaseName : __expectString ( output . DatabaseName ) , DocsToInvestigate : __expectInt32 ( output . DocsToInvestigate ) , ExtractDocId : __expectBoolean ( output . ExtractDocId ) , KmsKeyId : __expectString ( output . KmsKeyId ) , NestingLevel : __expectString ( output . NestingLevel ) , Password : __expectString ( output . Password ) , Port : __expectInt32 ( output . Port ) , SecretsManagerAccessRoleArn : __expectString ( output . SecretsManagerAccessRoleArn ) , SecretsManagerSecretId : __expectString ( output . SecretsManagerSecretId ) , ServerName : __expectString ( output . ServerName ) , Username : __expectString ( output . Username ) , } as any ; } ; const deserializeAws_json1_1DynamoDbSettings = ( output , context ) : DynamoDbSettings => { return { ServiceAccessRoleArn : __expectString ( output . ServiceAccessRoleArn ) , } as any ; } ; const deserializeAws_json1_1ElasticsearchSettings = ( output , context ) : ElasticsearchSettings => { return { EndpointUri : __expectString ( output . EndpointUri ) , ErrorRetryDuration : __expectInt32 ( output . ErrorRetryDuration ) , FullLoadErrorPercentage : __expectInt32 ( output . FullLoadErrorPercentage ) , ServiceAccessRoleArn : __expectString ( output . ServiceAccessRoleArn ) , } as any ; } ; const deserializeAws_json1_1Endpoint = ( output , context ) : Endpoint => { return { CertificateArn : __expectString ( output . CertificateArn ) , DatabaseName : __expectString ( output . DatabaseName ) , DmsTransferSettings : output . DmsTransferSettings !== undefined && output . DmsTransferSettings !== null ? deserializeAws_json1_1DmsTransferSettings ( output . DmsTransferSettings , context ) : undefined , DocDbSettings : output . DocDbSettings !== undefined && output . DocDbSettings !== null ? deserializeAws_json1_1DocDbSettings ( output . DocDbSettings , context ) : undefined , DynamoDbSettings : output . DynamoDbSettings !== undefined && output . DynamoDbSettings !== null ? deserializeAws_json1_1DynamoDbSettings ( output . DynamoDbSettings , context ) : undefined , ElasticsearchSettings : output . ElasticsearchSettings !== undefined && output . ElasticsearchSettings !== null ? deserializeAws_json1_1ElasticsearchSettings ( output . ElasticsearchSettings , context ) : undefined , EndpointArn : __expectString ( output . EndpointArn ) , EndpointIdentifier : __expectString ( output . EndpointIdentifier ) , EndpointType : __expectString ( output . EndpointType ) , EngineDisplayName : __expectString ( output . EngineDisplayName ) , EngineName : __expectString ( output . EngineName ) , ExternalId : __expectString ( output . ExternalId ) , ExternalTableDefinition : __expectString ( output . ExternalTableDefinition ) , ExtraConnectionAttributes : __expectString ( output . ExtraConnectionAttributes ) , GcpMySQLSettings : output . GcpMySQLSettings !== undefined && output . GcpMySQLSettings !== null ? deserializeAws_json1_1GcpMySQLSettings ( output . GcpMySQLSettings , context ) : undefined , IBMDb2Settings : output . IBMDb2Settings !== undefined && output . IBMDb2Settings !== null ? deserializeAws_json1_1IBMDb2Settings ( output . IBMDb2Settings , context ) : undefined , KafkaSettings : output . KafkaSettings !== undefined && output . KafkaSettings !== null ? deserializeAws_json1_1KafkaSettings ( output . KafkaSettings , context ) : undefined , KinesisSettings : output . KinesisSettings !== undefined && output . KinesisSettings !== null ? deserializeAws_json1_1KinesisSettings ( output . KinesisSettings , context ) : undefined , KmsKeyId : __expectString ( output . KmsKeyId ) , MicrosoftSQLServerSettings : output . MicrosoftSQLServerSettings !== undefined && output . MicrosoftSQLServerSettings !== null ? deserializeAws_json1_1MicrosoftSQLServerSettings ( output . MicrosoftSQLServerSettings , context ) : undefined , MongoDbSettings : output . MongoDbSettings !== undefined && output . MongoDbSettings !== null ? deserializeAws_json1_1MongoDbSettings ( output . MongoDbSettings , context ) : undefined , MySQLSettings : output . MySQLSettings !== undefined && output . MySQLSettings !== null ? deserializeAws_json1_1MySQLSettings ( output . MySQLSettings , context ) : undefined , NeptuneSettings : output . NeptuneSettings !== undefined && output . NeptuneSettings !== null ? deserializeAws_json1_1NeptuneSettings ( output . NeptuneSettings , context ) : undefined , OracleSettings : output . OracleSettings !== undefined && output . OracleSettings !== null ? deserializeAws_json1_1OracleSettings ( output . OracleSettings , context ) : undefined , Port : __expectInt32 ( output . Port ) , PostgreSQLSettings : output . PostgreSQLSettings !== undefined && output . PostgreSQLSettings !== null ? deserializeAws_json1_1PostgreSQLSettings ( output . PostgreSQLSettings , context ) : undefined , RedisSettings : output . RedisSettings !== undefined && output . RedisSettings !== null ? deserializeAws_json1_1RedisSettings ( output . RedisSettings , context ) : undefined , RedshiftSettings : output . RedshiftSettings !== undefined && output . RedshiftSettings !== null ? deserializeAws_json1_1RedshiftSettings ( output . RedshiftSettings , context ) : undefined , S3Settings : output . S3Settings !== undefined && output . S3Settings !== null ? deserializeAws_json1_1S3Settings ( output . S3Settings , context ) : undefined , ServerName : __expectString ( output . ServerName ) , ServiceAccessRoleArn : __expectString ( output . ServiceAccessRoleArn ) , SslMode : __expectString ( output . SslMode ) , Status : __expectString ( output . Status ) , SybaseSettings : output . SybaseSettings !== undefined && output . SybaseSettings !== null ? deserializeAws_json1_1SybaseSettings ( output . SybaseSettings , context ) : undefined , Username : __expectString ( output . Username ) , } as any ; } ; const deserializeAws_json1_1EndpointList = ( output , context ) : Endpoint [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Endpoint ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1EndpointSetting = ( output , context ) : EndpointSetting => { return { Applicability : __expectString ( output . Applicability ) , DefaultValue : __expectString ( output . DefaultValue ) , EnumValues : output . EnumValues !== undefined && output . EnumValues !== null ? deserializeAws_json1_1EndpointSettingEnumValues ( output . EnumValues , context ) : undefined , IntValueMax : __expectInt32 ( output . IntValueMax ) , IntValueMin : __expectInt32 ( output . IntValueMin ) , Name : __expectString ( output . Name ) , Sensitive : __expectBoolean ( output . Sensitive ) , Type : __expectString ( output . Type ) , Units : __expectString ( output . Units ) , } as any ; } ; const deserializeAws_json1_1EndpointSettingEnumValues = ( 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_json1_1EndpointSettingsList = ( output , context ) : EndpointSetting [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1EndpointSetting ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1Event = ( output , context ) : Event => { return { Date : output . Date !== undefined && output . Date !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . Date ) ) ) : undefined , EventCategories : output . EventCategories !== undefined && output . EventCategories !== null ? deserializeAws_json1_1EventCategoriesList ( output . EventCategories , context ) : undefined , Message : __expectString ( output . Message ) , SourceIdentifier : __expectString ( output . SourceIdentifier ) , SourceType : __expectString ( output . SourceType ) , } as any ; } ; const deserializeAws_json1_1EventCategoriesList = ( 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_json1_1EventCategoryGroup = ( output , context ) : EventCategoryGroup => { return { EventCategories : output . EventCategories !== undefined && output . EventCategories !== null ? deserializeAws_json1_1EventCategoriesList ( output . EventCategories , context ) : undefined , SourceType : __expectString ( output . SourceType ) , } as any ; } ; const deserializeAws_json1_1EventCategoryGroupList = ( output , context ) : EventCategoryGroup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1EventCategoryGroup ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1EventList = ( output , context ) : Event [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Event ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1EventSubscription = ( output , context ) : EventSubscription => { return { CustSubscriptionId : __expectString ( output . CustSubscriptionId ) , CustomerAwsId : __expectString ( output . CustomerAwsId ) , Enabled : __expectBoolean ( output . Enabled ) , EventCategoriesList : output . EventCategoriesList !== undefined && output . EventCategoriesList !== null ? deserializeAws_json1_1EventCategoriesList ( output . EventCategoriesList , context ) : undefined , SnsTopicArn : __expectString ( output . SnsTopicArn ) , SourceIdsList : output . SourceIdsList !== undefined && output . SourceIdsList !== null ? deserializeAws_json1_1SourceIdsList ( output . SourceIdsList , context ) : undefined , SourceType : __expectString ( output . SourceType ) , Status : __expectString ( output . Status ) , SubscriptionCreationTime : __expectString ( output . SubscriptionCreationTime ) , } as any ; } ; const deserializeAws_json1_1EventSubscriptionsList = ( output , context ) : EventSubscription [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1EventSubscription ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1GcpMySQLSettings = ( output , context ) : GcpMySQLSettings => { return { AfterConnectScript : __expectString ( output . AfterConnectScript ) , CleanSourceMetadataOnMismatch : __expectBoolean ( output . CleanSourceMetadataOnMismatch ) , DatabaseName : __expectString ( output . DatabaseName ) , EventsPollInterval : __expectInt32 ( output . EventsPollInterval ) , MaxFileSize : __expectInt32 ( output . MaxFileSize ) , ParallelLoadThreads : __expectInt32 ( output . ParallelLoadThreads ) , Password : __expectString ( output . Password ) , Port : __expectInt32 ( output . Port ) , SecretsManagerAccessRoleArn : __expectString ( output . SecretsManagerAccessRoleArn ) , SecretsManagerSecretId : __expectString ( output . SecretsManagerSecretId ) , ServerName : __expectString ( output . ServerName ) , ServerTimezone : __expectString ( output . ServerTimezone ) , TargetDbType : __expectString ( output . TargetDbType ) , Username : __expectString ( output . Username ) , } as any ; } ; const deserializeAws_json1_1IBMDb2Settings = ( output , context ) : IBMDb2Settings => { return { CurrentLsn : __expectString ( output . CurrentLsn ) , DatabaseName : __expectString ( output . DatabaseName ) , MaxKBytesPerRead : __expectInt32 ( output . MaxKBytesPerRead ) , Password : __expectString ( output . Password ) , Port : __expectInt32 ( output . Port ) , SecretsManagerAccessRoleArn : __expectString ( output . SecretsManagerAccessRoleArn ) , SecretsManagerSecretId : __expectString ( output . SecretsManagerSecretId ) , ServerName : __expectString ( output . ServerName ) , SetDataCaptureChanges : __expectBoolean ( output . SetDataCaptureChanges ) , Username : __expectString ( output . Username ) , } as any ; } ; const deserializeAws_json1_1ImportCertificateResponse = ( output , context ) : ImportCertificateResponse => { return { Certificate : output . Certificate !== undefined && output . Certificate !== null ? deserializeAws_json1_1Certificate ( output . Certificate , context ) : undefined , } as any ; } ; const deserializeAws_json1_1IndividualAssessmentNameList = ( 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_json1_1InsufficientResourceCapacityFault = ( output , context ) : InsufficientResourceCapacityFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1IntegerList = ( output , context ) : number [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectInt32 ( entry ) as any ; } ) ; } ; const deserializeAws_json1_1InvalidCertificateFault = ( output , context ) : InvalidCertificateFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1InvalidResourceStateFault = ( output , context ) : InvalidResourceStateFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1InvalidSubnet = ( output , context ) : InvalidSubnet => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1KafkaSettings = ( output , context ) : KafkaSettings => { return { Broker : __expectString ( output . Broker ) , IncludeControlDetails : __expectBoolean ( output . IncludeControlDetails ) , IncludeNullAndEmpty : __expectBoolean ( output . IncludeNullAndEmpty ) , IncludePartitionValue : __expectBoolean ( output . IncludePartitionValue ) , IncludeTableAlterOperations : __expectBoolean ( output . IncludeTableAlterOperations ) , IncludeTransactionDetails : __expectBoolean ( output . IncludeTransactionDetails ) , MessageFormat : __expectString ( output . MessageFormat ) , MessageMaxBytes : __expectInt32 ( output . MessageMaxBytes ) , NoHexPrefix : __expectBoolean ( output . NoHexPrefix ) , PartitionIncludeSchemaTable : __expectBoolean ( output . PartitionIncludeSchemaTable ) , SaslPassword : __expectString ( output . SaslPassword ) , SaslUsername : __expectString ( output . SaslUsername ) , SecurityProtocol : __expectString ( output . SecurityProtocol ) , SslCaCertificateArn : __expectString ( output . SslCaCertificateArn ) , SslClientCertificateArn : __expectString ( output . SslClientCertificateArn ) , SslClientKeyArn : __expectString ( output . SslClientKeyArn ) , SslClientKeyPassword : __expectString ( output . SslClientKeyPassword ) , Topic : __expectString ( output . Topic ) , } as any ; } ; const deserializeAws_json1_1KinesisSettings = ( output , context ) : KinesisSettings => { return { IncludeControlDetails : __expectBoolean ( output . IncludeControlDetails ) , IncludeNullAndEmpty : __expectBoolean ( output . IncludeNullAndEmpty ) , IncludePartitionValue : __expectBoolean ( output . IncludePartitionValue ) , IncludeTableAlterOperations : __expectBoolean ( output . IncludeTableAlterOperations ) , IncludeTransactionDetails : __expectBoolean ( output . IncludeTransactionDetails ) , MessageFormat : __expectString ( output . MessageFormat ) , NoHexPrefix : __expectBoolean ( output . NoHexPrefix ) , PartitionIncludeSchemaTable : __expectBoolean ( output . PartitionIncludeSchemaTable ) , ServiceAccessRoleArn : __expectString ( output . ServiceAccessRoleArn ) , StreamArn : __expectString ( output . StreamArn ) , } as any ; } ; const deserializeAws_json1_1KMSAccessDeniedFault = ( output , context ) : KMSAccessDeniedFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1KMSDisabledFault = ( output , context ) : KMSDisabledFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1KMSFault = ( output , context ) : KMSFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1KMSInvalidStateFault = ( output , context ) : KMSInvalidStateFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1KMSKeyNotAccessibleFault = ( output , context ) : KMSKeyNotAccessibleFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1KMSNotFoundFault = ( output , context ) : KMSNotFoundFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1KMSThrottlingFault = ( output , context ) : KMSThrottlingFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1ListTagsForResourceResponse = ( output , context ) : ListTagsForResourceResponse => { return { TagList : output . TagList !== undefined && output . TagList !== null ? deserializeAws_json1_1TagList ( output . TagList , context ) : undefined , } as any ; } ; const deserializeAws_json1_1MicrosoftSQLServerSettings = ( output , context ) : MicrosoftSQLServerSettings => { return { BcpPacketSize : __expectInt32 ( output . BcpPacketSize ) , ControlTablesFileGroup : __expectString ( output . ControlTablesFileGroup ) , DatabaseName : __expectString ( output . DatabaseName ) , Password : __expectString ( output . Password ) , Port : __expectInt32 ( output . Port ) , QuerySingleAlwaysOnNode : __expectBoolean ( output . QuerySingleAlwaysOnNode ) , ReadBackupOnly : __expectBoolean ( output . ReadBackupOnly ) , SafeguardPolicy : __expectString ( output . SafeguardPolicy ) , SecretsManagerAccessRoleArn : __expectString ( output . SecretsManagerAccessRoleArn ) , SecretsManagerSecretId : __expectString ( output . SecretsManagerSecretId ) , ServerName : __expectString ( output . ServerName ) , UseBcpFullLoad : __expectBoolean ( output . UseBcpFullLoad ) , UseThirdPartyBackupDevice : __expectBoolean ( output . UseThirdPartyBackupDevice ) , Username : __expectString ( output . Username ) , } as any ; } ; const deserializeAws_json1_1ModifyEndpointResponse = ( output , context ) : ModifyEndpointResponse => { return { Endpoint : output . Endpoint !== undefined && output . Endpoint !== null ? deserializeAws_json1_1Endpoint ( output . Endpoint , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ModifyEventSubscriptionResponse = ( output , context ) : ModifyEventSubscriptionResponse => { return { EventSubscription : output . EventSubscription !== undefined && output . EventSubscription !== null ? deserializeAws_json1_1EventSubscription ( output . EventSubscription , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ModifyReplicationInstanceResponse = ( output , context ) : ModifyReplicationInstanceResponse => { return { ReplicationInstance : output . ReplicationInstance !== undefined && output . ReplicationInstance !== null ? deserializeAws_json1_1ReplicationInstance ( output . ReplicationInstance , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ModifyReplicationSubnetGroupResponse = ( output , context ) : ModifyReplicationSubnetGroupResponse => { return { ReplicationSubnetGroup : output . ReplicationSubnetGroup !== undefined && output . ReplicationSubnetGroup !== null ? deserializeAws_json1_1ReplicationSubnetGroup ( output . ReplicationSubnetGroup , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ModifyReplicationTaskResponse = ( output , context ) : ModifyReplicationTaskResponse => { return { ReplicationTask : output . ReplicationTask !== undefined && output . ReplicationTask !== null ? deserializeAws_json1_1ReplicationTask ( output . ReplicationTask , context ) : undefined , } as any ; } ; const deserializeAws_json1_1MongoDbSettings = ( output , context ) : MongoDbSettings => { return { AuthMechanism : __expectString ( output . AuthMechanism ) , AuthSource : __expectString ( output . AuthSource ) , AuthType : __expectString ( output . AuthType ) , DatabaseName : __expectString ( output . DatabaseName ) , DocsToInvestigate : __expectString ( output . DocsToInvestigate ) , ExtractDocId : __expectString ( output . ExtractDocId ) , KmsKeyId : __expectString ( output . KmsKeyId ) , NestingLevel : __expectString ( output . NestingLevel ) , Password : __expectString ( output . Password ) , Port : __expectInt32 ( output . Port ) , SecretsManagerAccessRoleArn : __expectString ( output . SecretsManagerAccessRoleArn ) , SecretsManagerSecretId : __expectString ( output . SecretsManagerSecretId ) , ServerName : __expectString ( output . ServerName ) , Username : __expectString ( output . Username ) , } as any ; } ; const deserializeAws_json1_1MoveReplicationTaskResponse = ( output , context ) : MoveReplicationTaskResponse => { return { ReplicationTask : output . ReplicationTask !== undefined && output . ReplicationTask !== null ? deserializeAws_json1_1ReplicationTask ( output . ReplicationTask , context ) : undefined , } as any ; } ; const deserializeAws_json1_1MySQLSettings = ( output , context ) : MySQLSettings => { return { AfterConnectScript : __expectString ( output . AfterConnectScript ) , CleanSourceMetadataOnMismatch : __expectBoolean ( output . CleanSourceMetadataOnMismatch ) , DatabaseName : __expectString ( output . DatabaseName ) , EventsPollInterval : __expectInt32 ( output . EventsPollInterval ) , MaxFileSize : __expectInt32 ( output . MaxFileSize ) , ParallelLoadThreads : __expectInt32 ( output . ParallelLoadThreads ) , Password : __expectString ( output . Password ) , Port : __expectInt32 ( output . Port ) , SecretsManagerAccessRoleArn : __expectString ( output . SecretsManagerAccessRoleArn ) , SecretsManagerSecretId : __expectString ( output . SecretsManagerSecretId ) , ServerName : __expectString ( output . ServerName ) , ServerTimezone : __expectString ( output . ServerTimezone ) , TargetDbType : __expectString ( output . TargetDbType ) , Username : __expectString ( output . Username ) , } as any ; } ; const deserializeAws_json1_1NeptuneSettings = ( output , context ) : NeptuneSettings => { return { ErrorRetryDuration : __expectInt32 ( output . ErrorRetryDuration ) , IamAuthEnabled : __expectBoolean ( output . IamAuthEnabled ) , MaxFileSize : __expectInt32 ( output . MaxFileSize ) , MaxRetryCount : __expectInt32 ( output . MaxRetryCount ) , S3BucketFolder : __expectString ( output . S3BucketFolder ) , S3BucketName : __expectString ( output . S3BucketName ) , ServiceAccessRoleArn : __expectString ( output . ServiceAccessRoleArn ) , } as any ; } ; const deserializeAws_json1_1OracleSettings = ( output , context ) : OracleSettings => { return { AccessAlternateDirectly : __expectBoolean ( output . AccessAlternateDirectly ) , AddSupplementalLogging : __expectBoolean ( output . AddSupplementalLogging ) , AdditionalArchivedLogDestId : __expectInt32 ( output . AdditionalArchivedLogDestId ) , AllowSelectNestedTables : __expectBoolean ( output . AllowSelectNestedTables ) , ArchivedLogDestId : __expectInt32 ( output . ArchivedLogDestId ) , ArchivedLogsOnly : __expectBoolean ( output . ArchivedLogsOnly ) , AsmPassword : __expectString ( output . AsmPassword ) , AsmServer : __expectString ( output . AsmServer ) , AsmUser : __expectString ( output . AsmUser ) , CharLengthSemantics : __expectString ( output . CharLengthSemantics ) , DatabaseName : __expectString ( output . DatabaseName ) , DirectPathNoLog : __expectBoolean ( output . DirectPathNoLog ) , DirectPathParallelLoad : __expectBoolean ( output . DirectPathParallelLoad ) , EnableHomogenousTablespace : __expectBoolean ( output . EnableHomogenousTablespace ) , ExtraArchivedLogDestIds : output . ExtraArchivedLogDestIds !== undefined && output . ExtraArchivedLogDestIds !== null ? deserializeAws_json1_1IntegerList ( output . ExtraArchivedLogDestIds , context ) : undefined , FailTasksOnLobTruncation : __expectBoolean ( output . FailTasksOnLobTruncation ) , NumberDatatypeScale : __expectInt32 ( output . NumberDatatypeScale ) , OraclePathPrefix : __expectString ( output . OraclePathPrefix ) , ParallelAsmReadThreads : __expectInt32 ( output . ParallelAsmReadThreads ) , Password : __expectString ( output . Password ) , Port : __expectInt32 ( output . Port ) , ReadAheadBlocks : __expectInt32 ( output . ReadAheadBlocks ) , ReadTableSpaceName : __expectBoolean ( output . ReadTableSpaceName ) , ReplacePathPrefix : __expectBoolean ( output . ReplacePathPrefix ) , RetryInterval : __expectInt32 ( output . RetryInterval ) , SecretsManagerAccessRoleArn : __expectString ( output . SecretsManagerAccessRoleArn ) , SecretsManagerOracleAsmAccessRoleArn : __expectString ( output . SecretsManagerOracleAsmAccessRoleArn ) , SecretsManagerOracleAsmSecretId : __expectString ( output . SecretsManagerOracleAsmSecretId ) , SecretsManagerSecretId : __expectString ( output . SecretsManagerSecretId ) , SecurityDbEncryption : __expectString ( output . SecurityDbEncryption ) , SecurityDbEncryptionName : __expectString ( output . SecurityDbEncryptionName ) , ServerName : __expectString ( output . ServerName ) , SpatialDataOptionToGeoJsonFunctionName : __expectString ( output . SpatialDataOptionToGeoJsonFunctionName ) , StandbyDelayTime : __expectInt32 ( output . StandbyDelayTime ) , UseAlternateFolderForOnline : __expectBoolean ( output . UseAlternateFolderForOnline ) , UseBFile : __expectBoolean ( output . UseBFile ) , UseDirectPathFullLoad : __expectBoolean ( output . UseDirectPathFullLoad ) , UseLogminerReader : __expectBoolean ( output . UseLogminerReader ) , UsePathPrefix : __expectString ( output . UsePathPrefix ) , Username : __expectString ( output . Username ) , } as any ; } ; const deserializeAws_json1_1OrderableReplicationInstance = ( output , context ) : OrderableReplicationInstance => { return { AvailabilityZones : output . AvailabilityZones !== undefined && output . AvailabilityZones !== null ? deserializeAws_json1_1AvailabilityZonesList ( output . AvailabilityZones , context ) : undefined , DefaultAllocatedStorage : __expectInt32 ( output . DefaultAllocatedStorage ) , EngineVersion : __expectString ( output . EngineVersion ) , IncludedAllocatedStorage : __expectInt32 ( output . IncludedAllocatedStorage ) , MaxAllocatedStorage : __expectInt32 ( output . MaxAllocatedStorage ) , MinAllocatedStorage : __expectInt32 ( output . MinAllocatedStorage ) , ReleaseStatus : __expectString ( output . ReleaseStatus ) , ReplicationInstanceClass : __expectString ( output . ReplicationInstanceClass ) , StorageType : __expectString ( output . StorageType ) , } as any ; } ; const deserializeAws_json1_1OrderableReplicationInstanceList = ( output , context ) : OrderableReplicationInstance [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1OrderableReplicationInstance ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1PendingMaintenanceAction = ( output , context ) : PendingMaintenanceAction => { return { Action : __expectString ( output . Action ) , AutoAppliedAfterDate : output . AutoAppliedAfterDate !== undefined && output . AutoAppliedAfterDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . AutoAppliedAfterDate ) ) ) : undefined , CurrentApplyDate : output . CurrentApplyDate !== undefined && output . CurrentApplyDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . CurrentApplyDate ) ) ) : undefined , Description : __expectString ( output . Description ) , ForcedApplyDate : output . ForcedApplyDate !== undefined && output . ForcedApplyDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . ForcedApplyDate ) ) ) : undefined , OptInStatus : __expectString ( output . OptInStatus ) , } as any ; } ; const deserializeAws_json1_1PendingMaintenanceActionDetails = ( output , context ) : PendingMaintenanceAction [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1PendingMaintenanceAction ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1PendingMaintenanceActions = ( output , context ) : ResourcePendingMaintenanceActions [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ResourcePendingMaintenanceActions ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1PostgreSQLSettings = ( output , context ) : PostgreSQLSettings => { return { AfterConnectScript : __expectString ( output . AfterConnectScript ) , CaptureDdls : __expectBoolean ( output . CaptureDdls ) , DatabaseName : __expectString ( output . DatabaseName ) , DdlArtifactsSchema : __expectString ( output . DdlArtifactsSchema ) , ExecuteTimeout : __expectInt32 ( output . ExecuteTimeout ) , FailTasksOnLobTruncation : __expectBoolean ( output . FailTasksOnLobTruncation ) , HeartbeatEnable : __expectBoolean ( output . HeartbeatEnable ) , HeartbeatFrequency : __expectInt32 ( output . HeartbeatFrequency ) , HeartbeatSchema : __expectString ( output . HeartbeatSchema ) , MaxFileSize : __expectInt32 ( output . MaxFileSize ) , Password : __expectString ( output . Password ) , PluginName : __expectString ( output . PluginName ) , Port : __expectInt32 ( output . Port ) , SecretsManagerAccessRoleArn : __expectString ( output . SecretsManagerAccessRoleArn ) , SecretsManagerSecretId : __expectString ( output . SecretsManagerSecretId ) , ServerName : __expectString ( output . ServerName ) , SlotName : __expectString ( output . SlotName ) , Username : __expectString ( output . Username ) , } as any ; } ; const deserializeAws_json1_1RebootReplicationInstanceResponse = ( output , context ) : RebootReplicationInstanceResponse => { return { ReplicationInstance : output . ReplicationInstance !== undefined && output . ReplicationInstance !== null ? deserializeAws_json1_1ReplicationInstance ( output . ReplicationInstance , context ) : undefined , } as any ; } ; const deserializeAws_json1_1RedisSettings = ( output , context ) : RedisSettings => { return { AuthPassword : __expectString ( output . AuthPassword ) , AuthType : __expectString ( output . AuthType ) , AuthUserName : __expectString ( output . AuthUserName ) , Port : __expectInt32 ( output . Port ) , ServerName : __expectString ( output . ServerName ) , SslCaCertificateArn : __expectString ( output . SslCaCertificateArn ) , SslSecurityProtocol : __expectString ( output . SslSecurityProtocol ) , } as any ; } ; const deserializeAws_json1_1RedshiftSettings = ( output , context ) : RedshiftSettings => { return { AcceptAnyDate : __expectBoolean ( output . AcceptAnyDate ) , AfterConnectScript : __expectString ( output . AfterConnectScript ) , BucketFolder : __expectString ( output . BucketFolder ) , BucketName : __expectString ( output . BucketName ) , CaseSensitiveNames : __expectBoolean ( output . CaseSensitiveNames ) , CompUpdate : __expectBoolean ( output . CompUpdate ) , ConnectionTimeout : __expectInt32 ( output . ConnectionTimeout ) , DatabaseName : __expectString ( output . DatabaseName ) , DateFormat : __expectString ( output . DateFormat ) , EmptyAsNull : __expectBoolean ( output . EmptyAsNull ) , EncryptionMode : __expectString ( output . EncryptionMode ) , ExplicitIds : __expectBoolean ( output . ExplicitIds ) , FileTransferUploadStreams : __expectInt32 ( output . FileTransferUploadStreams ) , LoadTimeout : __expectInt32 ( output . LoadTimeout ) , MaxFileSize : __expectInt32 ( output . MaxFileSize ) , Password : __expectString ( output . Password ) , Port : __expectInt32 ( output . Port ) , RemoveQuotes : __expectBoolean ( output . RemoveQuotes ) , ReplaceChars : __expectString ( output . ReplaceChars ) , ReplaceInvalidChars : __expectString ( output . ReplaceInvalidChars ) , SecretsManagerAccessRoleArn : __expectString ( output . SecretsManagerAccessRoleArn ) , SecretsManagerSecretId : __expectString ( output . SecretsManagerSecretId ) , ServerName : __expectString ( output . ServerName ) , ServerSideEncryptionKmsKeyId : __expectString ( output . ServerSideEncryptionKmsKeyId ) , ServiceAccessRoleArn : __expectString ( output . ServiceAccessRoleArn ) , TimeFormat : __expectString ( output . TimeFormat ) , TrimBlanks : __expectBoolean ( output . TrimBlanks ) , TruncateColumns : __expectBoolean ( output . TruncateColumns ) , Username : __expectString ( output . Username ) , WriteBufferSize : __expectInt32 ( output . WriteBufferSize ) , } as any ; } ; const deserializeAws_json1_1RefreshSchemasResponse = ( output , context ) : RefreshSchemasResponse => { return { RefreshSchemasStatus : output . RefreshSchemasStatus !== undefined && output . RefreshSchemasStatus !== null ? deserializeAws_json1_1RefreshSchemasStatus ( output . RefreshSchemasStatus , context ) : undefined , } as any ; } ; const deserializeAws_json1_1RefreshSchemasStatus = ( output , context ) : RefreshSchemasStatus => { return { EndpointArn : __expectString ( output . EndpointArn ) , LastFailureMessage : __expectString ( output . LastFailureMessage ) , LastRefreshDate : output . LastRefreshDate !== undefined && output . LastRefreshDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastRefreshDate ) ) ) : undefined , ReplicationInstanceArn : __expectString ( output . ReplicationInstanceArn ) , Status : __expectString ( output . Status ) , } as any ; } ; const deserializeAws_json1_1ReloadTablesResponse = ( output , context ) : ReloadTablesResponse => { return { ReplicationTaskArn : __expectString ( output . ReplicationTaskArn ) , } as any ; } ; const deserializeAws_json1_1RemoveTagsFromResourceResponse = ( output , context ) : RemoveTagsFromResourceResponse => { return { } as any ; } ; const deserializeAws_json1_1ReplicationInstance = ( output , context ) : ReplicationInstance => { return { AllocatedStorage : __expectInt32 ( output . AllocatedStorage ) , AutoMinorVersionUpgrade : __expectBoolean ( output . AutoMinorVersionUpgrade ) , AvailabilityZone : __expectString ( output . AvailabilityZone ) , DnsNameServers : __expectString ( output . DnsNameServers ) , EngineVersion : __expectString ( output . EngineVersion ) , FreeUntil : output . FreeUntil !== undefined && output . FreeUntil !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . FreeUntil ) ) ) : undefined , InstanceCreateTime : output . InstanceCreateTime !== undefined && output . InstanceCreateTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . InstanceCreateTime ) ) ) : undefined , KmsKeyId : __expectString ( output . KmsKeyId ) , MultiAZ : __expectBoolean ( output . MultiAZ ) , PendingModifiedValues : output . PendingModifiedValues !== undefined && output . PendingModifiedValues !== null ? deserializeAws_json1_1ReplicationPendingModifiedValues ( output . PendingModifiedValues , context ) : undefined , PreferredMaintenanceWindow : __expectString ( output . PreferredMaintenanceWindow ) , PubliclyAccessible : __expectBoolean ( output . PubliclyAccessible ) , ReplicationInstanceArn : __expectString ( output . ReplicationInstanceArn ) , ReplicationInstanceClass : __expectString ( output . ReplicationInstanceClass ) , ReplicationInstanceIdentifier : __expectString ( output . ReplicationInstanceIdentifier ) , ReplicationInstancePrivateIpAddress : __expectString ( output . ReplicationInstancePrivateIpAddress ) , ReplicationInstancePrivateIpAddresses : output . ReplicationInstancePrivateIpAddresses !== undefined && output . ReplicationInstancePrivateIpAddresses !== null ? deserializeAws_json1_1ReplicationInstancePrivateIpAddressList ( output . ReplicationInstancePrivateIpAddresses , context ) : undefined , ReplicationInstancePublicIpAddress : __expectString ( output . ReplicationInstancePublicIpAddress ) , ReplicationInstancePublicIpAddresses : output . ReplicationInstancePublicIpAddresses !== undefined && output . ReplicationInstancePublicIpAddresses !== null ? deserializeAws_json1_1ReplicationInstancePublicIpAddressList ( output . ReplicationInstancePublicIpAddresses , context ) : undefined , ReplicationInstanceStatus : __expectString ( output . ReplicationInstanceStatus ) , ReplicationSubnetGroup : output . ReplicationSubnetGroup !== undefined && output . ReplicationSubnetGroup !== null ? deserializeAws_json1_1ReplicationSubnetGroup ( output . ReplicationSubnetGroup , context ) : undefined , SecondaryAvailabilityZone : __expectString ( output . SecondaryAvailabilityZone ) , VpcSecurityGroups : output . VpcSecurityGroups !== undefined && output . VpcSecurityGroups !== null ? deserializeAws_json1_1VpcSecurityGroupMembershipList ( output . VpcSecurityGroups , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ReplicationInstanceList = ( output , context ) : ReplicationInstance [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ReplicationInstance ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ReplicationInstancePrivateIpAddressList = ( 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_json1_1ReplicationInstancePublicIpAddressList = ( 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_json1_1ReplicationInstanceTaskLog = ( output , context ) : ReplicationInstanceTaskLog => { return { ReplicationInstanceTaskLogSize : __expectLong ( output . ReplicationInstanceTaskLogSize ) , ReplicationTaskArn : __expectString ( output . ReplicationTaskArn ) , ReplicationTaskName : __expectString ( output . ReplicationTaskName ) , } as any ; } ; const deserializeAws_json1_1ReplicationInstanceTaskLogsList = ( output , context ) : ReplicationInstanceTaskLog [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ReplicationInstanceTaskLog ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ReplicationPendingModifiedValues = ( output , context ) : ReplicationPendingModifiedValues => { return { AllocatedStorage : __expectInt32 ( output . AllocatedStorage ) , EngineVersion : __expectString ( output . EngineVersion ) , MultiAZ : __expectBoolean ( output . MultiAZ ) , ReplicationInstanceClass : __expectString ( output . ReplicationInstanceClass ) , } as any ; } ; const deserializeAws_json1_1ReplicationSubnetGroup = ( output , context ) : ReplicationSubnetGroup => { return { ReplicationSubnetGroupDescription : __expectString ( output . ReplicationSubnetGroupDescription ) , ReplicationSubnetGroupIdentifier : __expectString ( output . ReplicationSubnetGroupIdentifier ) , SubnetGroupStatus : __expectString ( output . SubnetGroupStatus ) , Subnets : output . Subnets !== undefined && output . Subnets !== null ? deserializeAws_json1_1SubnetList ( output . Subnets , context ) : undefined , VpcId : __expectString ( output . VpcId ) , } as any ; } ; const deserializeAws_json1_1ReplicationSubnetGroupDoesNotCoverEnoughAZs = ( output , context ) : ReplicationSubnetGroupDoesNotCoverEnoughAZs => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1ReplicationSubnetGroups = ( output , context ) : ReplicationSubnetGroup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ReplicationSubnetGroup ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ReplicationTask = ( output , context ) : ReplicationTask => { return { CdcStartPosition : __expectString ( output . CdcStartPosition ) , CdcStopPosition : __expectString ( output . CdcStopPosition ) , LastFailureMessage : __expectString ( output . LastFailureMessage ) , MigrationType : __expectString ( output . MigrationType ) , RecoveryCheckpoint : __expectString ( output . RecoveryCheckpoint ) , ReplicationInstanceArn : __expectString ( output . ReplicationInstanceArn ) , ReplicationTaskArn : __expectString ( output . ReplicationTaskArn ) , ReplicationTaskCreationDate : output . ReplicationTaskCreationDate !== undefined && output . ReplicationTaskCreationDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . ReplicationTaskCreationDate ) ) ) : undefined , ReplicationTaskIdentifier : __expectString ( output . ReplicationTaskIdentifier ) , ReplicationTaskSettings : __expectString ( output . ReplicationTaskSettings ) , ReplicationTaskStartDate : output . ReplicationTaskStartDate !== undefined && output . ReplicationTaskStartDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . ReplicationTaskStartDate ) ) ) : undefined , ReplicationTaskStats : output . ReplicationTaskStats !== undefined && output . ReplicationTaskStats !== null ? deserializeAws_json1_1ReplicationTaskStats ( output . ReplicationTaskStats , context ) : undefined , SourceEndpointArn : __expectString ( output . SourceEndpointArn ) , Status : __expectString ( output . Status ) , StopReason : __expectString ( output . StopReason ) , TableMappings : __expectString ( output . TableMappings ) , TargetEndpointArn : __expectString ( output . TargetEndpointArn ) , TargetReplicationInstanceArn : __expectString ( output . TargetReplicationInstanceArn ) , TaskData : __expectString ( output . TaskData ) , } as any ; } ; const deserializeAws_json1_1ReplicationTaskAssessmentResult = ( output , context ) : ReplicationTaskAssessmentResult => { return { AssessmentResults : __expectString ( output . AssessmentResults ) , AssessmentResultsFile : __expectString ( output . AssessmentResultsFile ) , AssessmentStatus : __expectString ( output . AssessmentStatus ) , ReplicationTaskArn : __expectString ( output . ReplicationTaskArn ) , ReplicationTaskIdentifier : __expectString ( output . ReplicationTaskIdentifier ) , ReplicationTaskLastAssessmentDate : output . ReplicationTaskLastAssessmentDate !== undefined && output . ReplicationTaskLastAssessmentDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . ReplicationTaskLastAssessmentDate ) ) ) : undefined , S3ObjectUrl : __expectString ( output . S3ObjectUrl ) , } as any ; } ; const deserializeAws_json1_1ReplicationTaskAssessmentResultList = ( output , context ) : ReplicationTaskAssessmentResult [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ReplicationTaskAssessmentResult ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ReplicationTaskAssessmentRun = ( output , context ) : ReplicationTaskAssessmentRun => { return { AssessmentProgress : output . AssessmentProgress !== undefined && output . AssessmentProgress !== null ? deserializeAws_json1_1ReplicationTaskAssessmentRunProgress ( output . AssessmentProgress , context ) : undefined , AssessmentRunName : __expectString ( output . AssessmentRunName ) , LastFailureMessage : __expectString ( output . LastFailureMessage ) , ReplicationTaskArn : __expectString ( output . ReplicationTaskArn ) , ReplicationTaskAssessmentRunArn : __expectString ( output . ReplicationTaskAssessmentRunArn ) , ReplicationTaskAssessmentRunCreationDate : output . ReplicationTaskAssessmentRunCreationDate !== undefined && output . ReplicationTaskAssessmentRunCreationDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . ReplicationTaskAssessmentRunCreationDate ) ) ) : undefined , ResultEncryptionMode : __expectString ( output . ResultEncryptionMode ) , ResultKmsKeyArn : __expectString ( output . ResultKmsKeyArn ) , ResultLocationBucket : __expectString ( output . ResultLocationBucket ) , ResultLocationFolder : __expectString ( output . ResultLocationFolder ) , ServiceAccessRoleArn : __expectString ( output . ServiceAccessRoleArn ) , Status : __expectString ( output . Status ) , } as any ; } ; const deserializeAws_json1_1ReplicationTaskAssessmentRunList = ( output , context ) : ReplicationTaskAssessmentRun [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ReplicationTaskAssessmentRun ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ReplicationTaskAssessmentRunProgress = ( output , context ) : ReplicationTaskAssessmentRunProgress => { return { IndividualAssessmentCompletedCount : __expectInt32 ( output . IndividualAssessmentCompletedCount ) , IndividualAssessmentCount : __expectInt32 ( output . IndividualAssessmentCount ) , } as any ; } ; const deserializeAws_json1_1ReplicationTaskIndividualAssessment = ( output , context ) : ReplicationTaskIndividualAssessment => { return { IndividualAssessmentName : __expectString ( output . IndividualAssessmentName ) , ReplicationTaskAssessmentRunArn : __expectString ( output . ReplicationTaskAssessmentRunArn ) , ReplicationTaskIndividualAssessmentArn : __expectString ( output . ReplicationTaskIndividualAssessmentArn ) , ReplicationTaskIndividualAssessmentStartDate : output . ReplicationTaskIndividualAssessmentStartDate !== undefined && output . ReplicationTaskIndividualAssessmentStartDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . ReplicationTaskIndividualAssessmentStartDate ) ) ) : undefined , Status : __expectString ( output . Status ) , } as any ; } ; const deserializeAws_json1_1ReplicationTaskIndividualAssessmentList = ( output , context ) : ReplicationTaskIndividualAssessment [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ReplicationTaskIndividualAssessment ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ReplicationTaskList = ( output , context ) : ReplicationTask [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ReplicationTask ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ReplicationTaskStats = ( output , context ) : ReplicationTaskStats => { return { ElapsedTimeMillis : __expectLong ( output . ElapsedTimeMillis ) , FreshStartDate : output . FreshStartDate !== undefined && output . FreshStartDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . FreshStartDate ) ) ) : undefined , FullLoadFinishDate : output . FullLoadFinishDate !== undefined && output . FullLoadFinishDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . FullLoadFinishDate ) ) ) : undefined , FullLoadProgressPercent : __expectInt32 ( output . FullLoadProgressPercent ) , FullLoadStartDate : output . FullLoadStartDate !== undefined && output . FullLoadStartDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . FullLoadStartDate ) ) ) : undefined , StartDate : output . StartDate !== undefined && output . StartDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . StartDate ) ) ) : undefined , StopDate : output . StopDate !== undefined && output . StopDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . StopDate ) ) ) : undefined , TablesErrored : __expectInt32 ( output . TablesErrored ) , TablesLoaded : __expectInt32 ( output . TablesLoaded ) , TablesLoading : __expectInt32 ( output . TablesLoading ) , TablesQueued : __expectInt32 ( output . TablesQueued ) , } as any ; } ; const deserializeAws_json1_1ResourceAlreadyExistsFault = ( output , context ) : ResourceAlreadyExistsFault => { return { message : __expectString ( output . message ) , resourceArn : __expectString ( output . resourceArn ) , } as any ; } ; const deserializeAws_json1_1ResourceNotFoundFault = ( output , context ) : ResourceNotFoundFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1ResourcePendingMaintenanceActions = ( output , context ) : ResourcePendingMaintenanceActions => { return { PendingMaintenanceActionDetails : output . PendingMaintenanceActionDetails !== undefined && output . PendingMaintenanceActionDetails !== null ? deserializeAws_json1_1PendingMaintenanceActionDetails ( output . PendingMaintenanceActionDetails , context ) : undefined , ResourceIdentifier : __expectString ( output . ResourceIdentifier ) , } as any ; } ; const deserializeAws_json1_1ResourceQuotaExceededFault = ( output , context ) : ResourceQuotaExceededFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1S3AccessDeniedFault = ( output , context ) : S3AccessDeniedFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1S3ResourceNotFoundFault = ( output , context ) : S3ResourceNotFoundFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1S3Settings = ( output , context ) : S3Settings => { return { AddColumnName : __expectBoolean ( output . AddColumnName ) , BucketFolder : __expectString ( output . BucketFolder ) , BucketName : __expectString ( output . BucketName ) , CannedAclForObjects : __expectString ( output . CannedAclForObjects ) , CdcInsertsAndUpdates : __expectBoolean ( output . CdcInsertsAndUpdates ) , CdcInsertsOnly : __expectBoolean ( output . CdcInsertsOnly ) , CdcMaxBatchInterval : __expectInt32 ( output . CdcMaxBatchInterval ) , CdcMinFileSize : __expectInt32 ( output . CdcMinFileSize ) , CdcPath : __expectString ( output . CdcPath ) , CompressionType : __expectString ( output . CompressionType ) , CsvDelimiter : __expectString ( output . CsvDelimiter ) , CsvNoSupValue : __expectString ( output . CsvNoSupValue ) , CsvNullValue : __expectString ( output . CsvNullValue ) , CsvRowDelimiter : __expectString ( output . CsvRowDelimiter ) , DataFormat : __expectString ( output . DataFormat ) , DataPageSize : __expectInt32 ( output . DataPageSize ) , DatePartitionDelimiter : __expectString ( output . DatePartitionDelimiter ) , DatePartitionEnabled : __expectBoolean ( output . DatePartitionEnabled ) , DatePartitionSequence : __expectString ( output . DatePartitionSequence ) , DatePartitionTimezone : __expectString ( output . DatePartitionTimezone ) , DictPageSizeLimit : __expectInt32 ( output . DictPageSizeLimit ) , EnableStatistics : __expectBoolean ( output . EnableStatistics ) , EncodingType : __expectString ( output . EncodingType ) , EncryptionMode : __expectString ( output . EncryptionMode ) , ExternalTableDefinition : __expectString ( output . ExternalTableDefinition ) , IgnoreHeaderRows : __expectInt32 ( output . IgnoreHeaderRows ) , IncludeOpForFullLoad : __expectBoolean ( output . IncludeOpForFullLoad ) , MaxFileSize : __expectInt32 ( output . MaxFileSize ) , ParquetTimestampInMillisecond : __expectBoolean ( output . ParquetTimestampInMillisecond ) , ParquetVersion : __expectString ( output . ParquetVersion ) , PreserveTransactions : __expectBoolean ( output . PreserveTransactions ) , Rfc4180 : __expectBoolean ( output . Rfc4180 ) , RowGroupLength : __expectInt32 ( output . RowGroupLength ) , ServerSideEncryptionKmsKeyId : __expectString ( output . ServerSideEncryptionKmsKeyId ) , ServiceAccessRoleArn : __expectString ( output . ServiceAccessRoleArn ) , TimestampColumnName : __expectString ( output . TimestampColumnName ) , UseCsvNoSupValue : __expectBoolean ( output . UseCsvNoSupValue ) , UseTaskStartTimeForFullLoadTimestamp : __expectBoolean ( output . UseTaskStartTimeForFullLoadTimestamp ) , } as any ; } ; const deserializeAws_json1_1SchemaList = ( 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_json1_1SNSInvalidTopicFault = ( output , context ) : SNSInvalidTopicFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1SNSNoAuthorizationFault = ( output , context ) : SNSNoAuthorizationFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1SourceIdsList = ( 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_json1_1StartReplicationTaskAssessmentResponse = ( output , context ) : StartReplicationTaskAssessmentResponse => { return { ReplicationTask : output . ReplicationTask !== undefined && output . ReplicationTask !== null ? deserializeAws_json1_1ReplicationTask ( output . ReplicationTask , context ) : undefined , } as any ; } ; const deserializeAws_json1_1StartReplicationTaskAssessmentRunResponse = ( output , context ) : StartReplicationTaskAssessmentRunResponse => { return { ReplicationTaskAssessmentRun : output . ReplicationTaskAssessmentRun !== undefined && output . ReplicationTaskAssessmentRun !== null ? deserializeAws_json1_1ReplicationTaskAssessmentRun ( output . ReplicationTaskAssessmentRun , context ) : undefined , } as any ; } ; const deserializeAws_json1_1StartReplicationTaskResponse = ( output , context ) : StartReplicationTaskResponse => { return { ReplicationTask : output . ReplicationTask !== undefined && output . ReplicationTask !== null ? deserializeAws_json1_1ReplicationTask ( output . ReplicationTask , context ) : undefined , } as any ; } ; const deserializeAws_json1_1StopReplicationTaskResponse = ( output , context ) : StopReplicationTaskResponse => { return { ReplicationTask : output . ReplicationTask !== undefined && output . ReplicationTask !== null ? deserializeAws_json1_1ReplicationTask ( output . ReplicationTask , context ) : undefined , } as any ; } ; const deserializeAws_json1_1StorageQuotaExceededFault = ( output , context ) : StorageQuotaExceededFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1Subnet = ( output , context ) : Subnet => { return { SubnetAvailabilityZone : output . SubnetAvailabilityZone !== undefined && output . SubnetAvailabilityZone !== null ? deserializeAws_json1_1AvailabilityZone ( output . SubnetAvailabilityZone , context ) : undefined , SubnetIdentifier : __expectString ( output . SubnetIdentifier ) , SubnetStatus : __expectString ( output . SubnetStatus ) , } as any ; } ; const deserializeAws_json1_1SubnetAlreadyInUse = ( output , context ) : SubnetAlreadyInUse => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1SubnetList = ( output , context ) : Subnet [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Subnet ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1SupportedEndpointType = ( output , context ) : SupportedEndpointType => { return { EndpointType : __expectString ( output . EndpointType ) , EngineDisplayName : __expectString ( output . EngineDisplayName ) , EngineName : __expectString ( output . EngineName ) , ReplicationInstanceEngineMinimumVersion : __expectString ( output . ReplicationInstanceEngineMinimumVersion ) , SupportsCDC : __expectBoolean ( output . SupportsCDC ) , } as any ; } ; const deserializeAws_json1_1SupportedEndpointTypeList = ( output , context ) : SupportedEndpointType [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1SupportedEndpointType ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1SybaseSettings = ( output , context ) : SybaseSettings => { return { DatabaseName : __expectString ( output . DatabaseName ) , Password : __expectString ( output . Password ) , Port : __expectInt32 ( output . Port ) , SecretsManagerAccessRoleArn : __expectString ( output . SecretsManagerAccessRoleArn ) , SecretsManagerSecretId : __expectString ( output . SecretsManagerSecretId ) , ServerName : __expectString ( output . ServerName ) , Username : __expectString ( output . Username ) , } as any ; } ; const deserializeAws_json1_1TableStatistics = ( output , context ) : TableStatistics => { return { Ddls : __expectLong ( output . Ddls ) , Deletes : __expectLong ( output . Deletes ) , FullLoadCondtnlChkFailedRows : __expectLong ( output . FullLoadCondtnlChkFailedRows ) , FullLoadEndTime : output . FullLoadEndTime !== undefined && output . FullLoadEndTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . FullLoadEndTime ) ) ) : undefined , FullLoadErrorRows : __expectLong ( output . FullLoadErrorRows ) , FullLoadReloaded : __expectBoolean ( output . FullLoadReloaded ) , FullLoadRows : __expectLong ( output . FullLoadRows ) , FullLoadStartTime : output . FullLoadStartTime !== undefined && output . FullLoadStartTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . FullLoadStartTime ) ) ) : undefined , Inserts : __expectLong ( output . Inserts ) , LastUpdateTime : output . LastUpdateTime !== undefined && output . LastUpdateTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastUpdateTime ) ) ) : undefined , SchemaName : __expectString ( output . SchemaName ) , TableName : __expectString ( output . TableName ) , TableState : __expectString ( output . TableState ) , Updates : __expectLong ( output . Updates ) , ValidationFailedRecords : __expectLong ( output . ValidationFailedRecords ) , ValidationPendingRecords : __expectLong ( output . ValidationPendingRecords ) , ValidationState : __expectString ( output . ValidationState ) , ValidationStateDetails : __expectString ( output . ValidationStateDetails ) , ValidationSuspendedRecords : __expectLong ( output . ValidationSuspendedRecords ) , } as any ; } ; const deserializeAws_json1_1TableStatisticsList = ( output , context ) : TableStatistics [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1TableStatistics ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1Tag = ( output , context ) : Tag => { return { Key : __expectString ( output . Key ) , ResourceArn : __expectString ( output . ResourceArn ) , Value : __expectString ( output . Value ) , } as any ; } ; const deserializeAws_json1_1TagList = ( output , context ) : Tag [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Tag ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1TestConnectionResponse = ( output , context ) : TestConnectionResponse => { return { Connection : output . Connection !== undefined && output . Connection !== null ? deserializeAws_json1_1Connection ( output . Connection , context ) : undefined , } as any ; } ; const deserializeAws_json1_1UpgradeDependencyFailureFault = ( output , context ) : UpgradeDependencyFailureFault => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1VpcSecurityGroupMembership = ( output , context ) : VpcSecurityGroupMembership => { return { Status : __expectString ( output . Status ) , VpcSecurityGroupId : __expectString ( output . VpcSecurityGroupId ) , } as any ; } ; const deserializeAws_json1_1VpcSecurityGroupMembershipList = ( output , context ) : VpcSecurityGroupMembership [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1VpcSecurityGroupMembership ( entry , context ) ; } ) ; } ; 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 ) { return JSON . parse ( encoded ) ; } return { } ; } ) ; /**
 * Load an error code for the aws.rest-json-1.1 protocol.
 */ const loadRestJsonErrorCode = ( output , data ) : string => { const findKey = ( object , key ) => Object . keys ( object ) . find ( ( k ) => k . toLowerCase ( ) === key . toLowerCase ( ) ) ; const sanitizeErrorCode = ( rawValue ) : string => { let cleanValue = rawValue ; if ( cleanValue . indexOf ( ":" ) >= 0 ) { cleanValue = cleanValue . split ( ":" ) [ 0 ] ; } if ( cleanValue . indexOf ( "#" ) >= 0 ) { cleanValue = cleanValue . split ( "#" ) [ 1 ] ; } return cleanValue ; } ; const headerKey = findKey ( output . headers , "x-amzn-errortype" ) ; if ( headerKey !== undefined ) { return sanitizeErrorCode ( output . headers [ headerKey ] ) ; } if ( data . code !== undefined ) { return sanitizeErrorCode ( data . code ) ; } if ( data [ "__type" ] !== undefined ) { return sanitizeErrorCode ( data [ "__type" ] ) ; } return "" ; } ;