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 { BatchGetAggregateResourceConfigCommandInput , BatchGetAggregateResourceConfigCommandOutput , } from "../commands/BatchGetAggregateResourceConfigCommand" ; import { BatchGetResourceConfigCommandInput , BatchGetResourceConfigCommandOutput , } from "../commands/BatchGetResourceConfigCommand" ; import { DeleteAggregationAuthorizationCommandInput , DeleteAggregationAuthorizationCommandOutput , } from "../commands/DeleteAggregationAuthorizationCommand" ; import { DeleteConfigRuleCommandInput , DeleteConfigRuleCommandOutput } from "../commands/DeleteConfigRuleCommand" ; import { DeleteConfigurationAggregatorCommandInput , DeleteConfigurationAggregatorCommandOutput , } from "../commands/DeleteConfigurationAggregatorCommand" ; import { DeleteConfigurationRecorderCommandInput , DeleteConfigurationRecorderCommandOutput , } from "../commands/DeleteConfigurationRecorderCommand" ; import { DeleteConformancePackCommandInput , DeleteConformancePackCommandOutput , } from "../commands/DeleteConformancePackCommand" ; import { DeleteDeliveryChannelCommandInput , DeleteDeliveryChannelCommandOutput , } from "../commands/DeleteDeliveryChannelCommand" ; import { DeleteEvaluationResultsCommandInput , DeleteEvaluationResultsCommandOutput , } from "../commands/DeleteEvaluationResultsCommand" ; import { DeleteOrganizationConfigRuleCommandInput , DeleteOrganizationConfigRuleCommandOutput , } from "../commands/DeleteOrganizationConfigRuleCommand" ; import { DeleteOrganizationConformancePackCommandInput , DeleteOrganizationConformancePackCommandOutput , } from "../commands/DeleteOrganizationConformancePackCommand" ; import { DeletePendingAggregationRequestCommandInput , DeletePendingAggregationRequestCommandOutput , } from "../commands/DeletePendingAggregationRequestCommand" ; import { DeleteRemediationConfigurationCommandInput , DeleteRemediationConfigurationCommandOutput , } from "../commands/DeleteRemediationConfigurationCommand" ; import { DeleteRemediationExceptionsCommandInput , DeleteRemediationExceptionsCommandOutput , } from "../commands/DeleteRemediationExceptionsCommand" ; import { DeleteResourceConfigCommandInput , DeleteResourceConfigCommandOutput , } from "../commands/DeleteResourceConfigCommand" ; import { DeleteRetentionConfigurationCommandInput , DeleteRetentionConfigurationCommandOutput , } from "../commands/DeleteRetentionConfigurationCommand" ; import { DeleteStoredQueryCommandInput , DeleteStoredQueryCommandOutput } from "../commands/DeleteStoredQueryCommand" ; import { DeliverConfigSnapshotCommandInput , DeliverConfigSnapshotCommandOutput , } from "../commands/DeliverConfigSnapshotCommand" ; import { DescribeAggregateComplianceByConfigRulesCommandInput , DescribeAggregateComplianceByConfigRulesCommandOutput , } from "../commands/DescribeAggregateComplianceByConfigRulesCommand" ; import { DescribeAggregateComplianceByConformancePacksCommandInput , DescribeAggregateComplianceByConformancePacksCommandOutput , } from "../commands/DescribeAggregateComplianceByConformancePacksCommand" ; import { DescribeAggregationAuthorizationsCommandInput , DescribeAggregationAuthorizationsCommandOutput , } from "../commands/DescribeAggregationAuthorizationsCommand" ; import { DescribeComplianceByConfigRuleCommandInput , DescribeComplianceByConfigRuleCommandOutput , } from "../commands/DescribeComplianceByConfigRuleCommand" ; import { DescribeComplianceByResourceCommandInput , DescribeComplianceByResourceCommandOutput , } from "../commands/DescribeComplianceByResourceCommand" ; import { DescribeConfigRuleEvaluationStatusCommandInput , DescribeConfigRuleEvaluationStatusCommandOutput , } from "../commands/DescribeConfigRuleEvaluationStatusCommand" ; import { DescribeConfigRulesCommandInput , DescribeConfigRulesCommandOutput , } from "../commands/DescribeConfigRulesCommand" ; import { DescribeConfigurationAggregatorsCommandInput , DescribeConfigurationAggregatorsCommandOutput , } from "../commands/DescribeConfigurationAggregatorsCommand" ; import { DescribeConfigurationAggregatorSourcesStatusCommandInput , DescribeConfigurationAggregatorSourcesStatusCommandOutput , } from "../commands/DescribeConfigurationAggregatorSourcesStatusCommand" ; import { DescribeConfigurationRecordersCommandInput , DescribeConfigurationRecordersCommandOutput , } from "../commands/DescribeConfigurationRecordersCommand" ; import { DescribeConfigurationRecorderStatusCommandInput , DescribeConfigurationRecorderStatusCommandOutput , } from "../commands/DescribeConfigurationRecorderStatusCommand" ; import { DescribeConformancePackComplianceCommandInput , DescribeConformancePackComplianceCommandOutput , } from "../commands/DescribeConformancePackComplianceCommand" ; import { DescribeConformancePacksCommandInput , DescribeConformancePacksCommandOutput , } from "../commands/DescribeConformancePacksCommand" ; import { DescribeConformancePackStatusCommandInput , DescribeConformancePackStatusCommandOutput , } from "../commands/DescribeConformancePackStatusCommand" ; import { DescribeDeliveryChannelsCommandInput , DescribeDeliveryChannelsCommandOutput , } from "../commands/DescribeDeliveryChannelsCommand" ; import { DescribeDeliveryChannelStatusCommandInput , DescribeDeliveryChannelStatusCommandOutput , } from "../commands/DescribeDeliveryChannelStatusCommand" ; import { DescribeOrganizationConfigRulesCommandInput , DescribeOrganizationConfigRulesCommandOutput , } from "../commands/DescribeOrganizationConfigRulesCommand" ; import { DescribeOrganizationConfigRuleStatusesCommandInput , DescribeOrganizationConfigRuleStatusesCommandOutput , } from "../commands/DescribeOrganizationConfigRuleStatusesCommand" ; import { DescribeOrganizationConformancePacksCommandInput , DescribeOrganizationConformancePacksCommandOutput , } from "../commands/DescribeOrganizationConformancePacksCommand" ; import { DescribeOrganizationConformancePackStatusesCommandInput , DescribeOrganizationConformancePackStatusesCommandOutput , } from "../commands/DescribeOrganizationConformancePackStatusesCommand" ; import { DescribePendingAggregationRequestsCommandInput , DescribePendingAggregationRequestsCommandOutput , } from "../commands/DescribePendingAggregationRequestsCommand" ; import { DescribeRemediationConfigurationsCommandInput , DescribeRemediationConfigurationsCommandOutput , } from "../commands/DescribeRemediationConfigurationsCommand" ; import { DescribeRemediationExceptionsCommandInput , DescribeRemediationExceptionsCommandOutput , } from "../commands/DescribeRemediationExceptionsCommand" ; import { DescribeRemediationExecutionStatusCommandInput , DescribeRemediationExecutionStatusCommandOutput , } from "../commands/DescribeRemediationExecutionStatusCommand" ; import { DescribeRetentionConfigurationsCommandInput , DescribeRetentionConfigurationsCommandOutput , } from "../commands/DescribeRetentionConfigurationsCommand" ; import { GetAggregateComplianceDetailsByConfigRuleCommandInput , GetAggregateComplianceDetailsByConfigRuleCommandOutput , } from "../commands/GetAggregateComplianceDetailsByConfigRuleCommand" ; import { GetAggregateConfigRuleComplianceSummaryCommandInput , GetAggregateConfigRuleComplianceSummaryCommandOutput , } from "../commands/GetAggregateConfigRuleComplianceSummaryCommand" ; import { GetAggregateConformancePackComplianceSummaryCommandInput , GetAggregateConformancePackComplianceSummaryCommandOutput , } from "../commands/GetAggregateConformancePackComplianceSummaryCommand" ; import { GetAggregateDiscoveredResourceCountsCommandInput , GetAggregateDiscoveredResourceCountsCommandOutput , } from "../commands/GetAggregateDiscoveredResourceCountsCommand" ; import { GetAggregateResourceConfigCommandInput , GetAggregateResourceConfigCommandOutput , } from "../commands/GetAggregateResourceConfigCommand" ; import { GetComplianceDetailsByConfigRuleCommandInput , GetComplianceDetailsByConfigRuleCommandOutput , } from "../commands/GetComplianceDetailsByConfigRuleCommand" ; import { GetComplianceDetailsByResourceCommandInput , GetComplianceDetailsByResourceCommandOutput , } from "../commands/GetComplianceDetailsByResourceCommand" ; import { GetComplianceSummaryByConfigRuleCommandInput , GetComplianceSummaryByConfigRuleCommandOutput , } from "../commands/GetComplianceSummaryByConfigRuleCommand" ; import { GetComplianceSummaryByResourceTypeCommandInput , GetComplianceSummaryByResourceTypeCommandOutput , } from "../commands/GetComplianceSummaryByResourceTypeCommand" ; import { GetConformancePackComplianceDetailsCommandInput , GetConformancePackComplianceDetailsCommandOutput , } from "../commands/GetConformancePackComplianceDetailsCommand" ; import { GetConformancePackComplianceSummaryCommandInput , GetConformancePackComplianceSummaryCommandOutput , } from "../commands/GetConformancePackComplianceSummaryCommand" ; import { GetDiscoveredResourceCountsCommandInput , GetDiscoveredResourceCountsCommandOutput , } from "../commands/GetDiscoveredResourceCountsCommand" ; import { GetOrganizationConfigRuleDetailedStatusCommandInput , GetOrganizationConfigRuleDetailedStatusCommandOutput , } from "../commands/GetOrganizationConfigRuleDetailedStatusCommand" ; import { GetOrganizationConformancePackDetailedStatusCommandInput , GetOrganizationConformancePackDetailedStatusCommandOutput , } from "../commands/GetOrganizationConformancePackDetailedStatusCommand" ; import { GetResourceConfigHistoryCommandInput , GetResourceConfigHistoryCommandOutput , } from "../commands/GetResourceConfigHistoryCommand" ; import { GetStoredQueryCommandInput , GetStoredQueryCommandOutput } from "../commands/GetStoredQueryCommand" ; import { ListAggregateDiscoveredResourcesCommandInput , ListAggregateDiscoveredResourcesCommandOutput , } from "../commands/ListAggregateDiscoveredResourcesCommand" ; import { ListDiscoveredResourcesCommandInput , ListDiscoveredResourcesCommandOutput , } from "../commands/ListDiscoveredResourcesCommand" ; import { ListStoredQueriesCommandInput , ListStoredQueriesCommandOutput } from "../commands/ListStoredQueriesCommand" ; import { ListTagsForResourceCommandInput , ListTagsForResourceCommandOutput , } from "../commands/ListTagsForResourceCommand" ; import { PutAggregationAuthorizationCommandInput , PutAggregationAuthorizationCommandOutput , } from "../commands/PutAggregationAuthorizationCommand" ; import { PutConfigRuleCommandInput , PutConfigRuleCommandOutput } from "../commands/PutConfigRuleCommand" ; import { PutConfigurationAggregatorCommandInput , PutConfigurationAggregatorCommandOutput , } from "../commands/PutConfigurationAggregatorCommand" ; import { PutConfigurationRecorderCommandInput , PutConfigurationRecorderCommandOutput , } from "../commands/PutConfigurationRecorderCommand" ; import { PutConformancePackCommandInput , PutConformancePackCommandOutput } from "../commands/PutConformancePackCommand" ; import { PutDeliveryChannelCommandInput , PutDeliveryChannelCommandOutput } from "../commands/PutDeliveryChannelCommand" ; import { PutEvaluationsCommandInput , PutEvaluationsCommandOutput } from "../commands/PutEvaluationsCommand" ; import { PutExternalEvaluationCommandInput , PutExternalEvaluationCommandOutput , } from "../commands/PutExternalEvaluationCommand" ; import { PutOrganizationConfigRuleCommandInput , PutOrganizationConfigRuleCommandOutput , } from "../commands/PutOrganizationConfigRuleCommand" ; import { PutOrganizationConformancePackCommandInput , PutOrganizationConformancePackCommandOutput , } from "../commands/PutOrganizationConformancePackCommand" ; import { PutRemediationConfigurationsCommandInput , PutRemediationConfigurationsCommandOutput , } from "../commands/PutRemediationConfigurationsCommand" ; import { PutRemediationExceptionsCommandInput , PutRemediationExceptionsCommandOutput , } from "../commands/PutRemediationExceptionsCommand" ; import { PutResourceConfigCommandInput , PutResourceConfigCommandOutput } from "../commands/PutResourceConfigCommand" ; import { PutRetentionConfigurationCommandInput , PutRetentionConfigurationCommandOutput , } from "../commands/PutRetentionConfigurationCommand" ; import { PutStoredQueryCommandInput , PutStoredQueryCommandOutput } from "../commands/PutStoredQueryCommand" ; import { SelectAggregateResourceConfigCommandInput , SelectAggregateResourceConfigCommandOutput , } from "../commands/SelectAggregateResourceConfigCommand" ; import { SelectResourceConfigCommandInput , SelectResourceConfigCommandOutput , } from "../commands/SelectResourceConfigCommand" ; import { StartConfigRulesEvaluationCommandInput , StartConfigRulesEvaluationCommandOutput , } from "../commands/StartConfigRulesEvaluationCommand" ; import { StartConfigurationRecorderCommandInput , StartConfigurationRecorderCommandOutput , } from "../commands/StartConfigurationRecorderCommand" ; import { StartRemediationExecutionCommandInput , StartRemediationExecutionCommandOutput , } from "../commands/StartRemediationExecutionCommand" ; import { StopConfigurationRecorderCommandInput , StopConfigurationRecorderCommandOutput , } from "../commands/StopConfigurationRecorderCommand" ; import { TagResourceCommandInput , TagResourceCommandOutput } from "../commands/TagResourceCommand" ; import { UntagResourceCommandInput , UntagResourceCommandOutput } from "../commands/UntagResourceCommand" ; import { AccountAggregationSource , AggregateComplianceByConfigRule , AggregateComplianceByConformancePack , AggregateComplianceCount , AggregateConformancePackCompliance , AggregateConformancePackComplianceCount , AggregateConformancePackComplianceFilters , AggregateConformancePackComplianceSummary , AggregateConformancePackComplianceSummaryFilters , AggregatedSourceStatus , AggregatedSourceStatusType , AggregateEvaluationResult , AggregateResourceIdentifier , AggregationAuthorization , BaseConfigurationItem , BatchGetAggregateResourceConfigRequest , BatchGetAggregateResourceConfigResponse , BatchGetResourceConfigRequest , BatchGetResourceConfigResponse , Compliance , ComplianceByConfigRule , ComplianceByResource , ComplianceContributorCount , ComplianceSummary , ComplianceSummaryByResourceType , ComplianceType , ConfigExportDeliveryInfo , ConfigRule , ConfigRuleComplianceFilters , ConfigRuleComplianceSummaryFilters , ConfigRuleEvaluationStatus , ConfigSnapshotDeliveryProperties , ConfigStreamDeliveryInfo , ConfigurationAggregator , ConfigurationItem , ConfigurationRecorder , ConfigurationRecorderStatus , ConformancePackComplianceFilters , ConformancePackComplianceSummary , ConformancePackDetail , ConformancePackEvaluationFilters , ConformancePackEvaluationResult , ConformancePackInputParameter , ConformancePackRuleCompliance , ConformancePackStatusDetail , ConformancePackTemplateValidationException , DeleteAggregationAuthorizationRequest , DeleteConfigRuleRequest , DeleteConfigurationAggregatorRequest , DeleteConfigurationRecorderRequest , DeleteConformancePackRequest , DeleteDeliveryChannelRequest , DeleteEvaluationResultsRequest , DeleteEvaluationResultsResponse , DeleteOrganizationConfigRuleRequest , DeleteOrganizationConformancePackRequest , DeletePendingAggregationRequestRequest , DeleteRemediationConfigurationRequest , DeleteRemediationConfigurationResponse , DeleteRemediationExceptionsRequest , DeleteRemediationExceptionsResponse , DeleteResourceConfigRequest , DeleteRetentionConfigurationRequest , DeleteStoredQueryRequest , DeleteStoredQueryResponse , DeliverConfigSnapshotRequest , DeliverConfigSnapshotResponse , DeliveryChannel , DeliveryChannelStatus , DescribeAggregateComplianceByConfigRulesRequest , DescribeAggregateComplianceByConfigRulesResponse , DescribeAggregateComplianceByConformancePacksRequest , DescribeAggregateComplianceByConformancePacksResponse , DescribeAggregationAuthorizationsRequest , DescribeAggregationAuthorizationsResponse , DescribeComplianceByConfigRuleRequest , DescribeComplianceByConfigRuleResponse , DescribeComplianceByResourceRequest , DescribeComplianceByResourceResponse , DescribeConfigRuleEvaluationStatusRequest , DescribeConfigRuleEvaluationStatusResponse , DescribeConfigRulesRequest , DescribeConfigRulesResponse , DescribeConfigurationAggregatorSourcesStatusRequest , DescribeConfigurationAggregatorSourcesStatusResponse , DescribeConfigurationAggregatorsRequest , DescribeConfigurationAggregatorsResponse , DescribeConfigurationRecordersRequest , DescribeConfigurationRecordersResponse , DescribeConfigurationRecorderStatusRequest , DescribeConfigurationRecorderStatusResponse , DescribeConformancePackComplianceRequest , DescribeConformancePackComplianceResponse , DescribeConformancePacksRequest , DescribeConformancePacksResponse , DescribeConformancePackStatusRequest , DescribeConformancePackStatusResponse , DescribeDeliveryChannelsRequest , DescribeDeliveryChannelsResponse , DescribeDeliveryChannelStatusRequest , DescribeDeliveryChannelStatusResponse , DescribeOrganizationConfigRulesRequest , DescribeOrganizationConfigRulesResponse , DescribeOrganizationConfigRuleStatusesRequest , DescribeOrganizationConfigRuleStatusesResponse , DescribeOrganizationConformancePacksRequest , DescribeOrganizationConformancePacksResponse , DescribeOrganizationConformancePackStatusesRequest , DescribeOrganizationConformancePackStatusesResponse , DescribePendingAggregationRequestsRequest , DescribePendingAggregationRequestsResponse , DescribeRemediationConfigurationsRequest , DescribeRemediationConfigurationsResponse , DescribeRemediationExceptionsRequest , DescribeRemediationExceptionsResponse , DescribeRemediationExecutionStatusRequest , DescribeRemediationExecutionStatusResponse , DescribeRetentionConfigurationsRequest , DescribeRetentionConfigurationsResponse , Evaluation , EvaluationResult , EvaluationResultIdentifier , EvaluationResultQualifier , ExecutionControls , ExternalEvaluation , FailedDeleteRemediationExceptionsBatch , FailedRemediationBatch , FailedRemediationExceptionBatch , FieldInfo , GetAggregateComplianceDetailsByConfigRuleRequest , GetAggregateComplianceDetailsByConfigRuleResponse , GetAggregateConfigRuleComplianceSummaryRequest , GetAggregateConfigRuleComplianceSummaryResponse , GetAggregateConformancePackComplianceSummaryRequest , GetAggregateConformancePackComplianceSummaryResponse , GetAggregateDiscoveredResourceCountsRequest , GetAggregateDiscoveredResourceCountsResponse , GetAggregateResourceConfigRequest , GetAggregateResourceConfigResponse , GetComplianceDetailsByConfigRuleRequest , GetComplianceDetailsByConfigRuleResponse , GetComplianceDetailsByResourceRequest , GetComplianceDetailsByResourceResponse , GetComplianceSummaryByConfigRuleResponse , GetComplianceSummaryByResourceTypeRequest , GetComplianceSummaryByResourceTypeResponse , GetConformancePackComplianceDetailsRequest , GetConformancePackComplianceDetailsResponse , GetConformancePackComplianceSummaryRequest , GetConformancePackComplianceSummaryResponse , GetDiscoveredResourceCountsRequest , GetDiscoveredResourceCountsResponse , GetOrganizationConfigRuleDetailedStatusRequest , GetOrganizationConfigRuleDetailedStatusResponse , GetOrganizationConformancePackDetailedStatusRequest , GetOrganizationConformancePackDetailedStatusResponse , GetResourceConfigHistoryRequest , GetResourceConfigHistoryResponse , GetStoredQueryRequest , GetStoredQueryResponse , GroupedResourceCount , InsufficientDeliveryPolicyException , InsufficientPermissionsException , InvalidConfigurationRecorderNameException , InvalidDeliveryChannelNameException , InvalidExpressionException , InvalidLimitException , InvalidNextTokenException , InvalidParameterValueException , InvalidRecordingGroupException , InvalidResultTokenException , InvalidRoleException , InvalidS3KeyPrefixException , InvalidS3KmsKeyArnException , InvalidSNSTopicARNException , InvalidTimeRangeException , LastDeliveryChannelDeleteFailedException , LimitExceededException , ListAggregateDiscoveredResourcesRequest , ListAggregateDiscoveredResourcesResponse , ListDiscoveredResourcesRequest , ListDiscoveredResourcesResponse , ListStoredQueriesRequest , ListStoredQueriesResponse , ListTagsForResourceRequest , ListTagsForResourceResponse , MaxActiveResourcesExceededException , MaxNumberOfConfigRulesExceededException , MaxNumberOfConfigurationRecordersExceededException , MaxNumberOfConformancePacksExceededException , MaxNumberOfDeliveryChannelsExceededException , MaxNumberOfOrganizationConfigRulesExceededException , MaxNumberOfOrganizationConformancePacksExceededException , MaxNumberOfRetentionConfigurationsExceededException , MemberAccountStatus , NoAvailableConfigurationRecorderException , NoAvailableDeliveryChannelException , NoAvailableOrganizationException , NoRunningConfigurationRecorderException , NoSuchBucketException , NoSuchConfigRuleException , NoSuchConfigRuleInConformancePackException , NoSuchConfigurationAggregatorException , NoSuchConfigurationRecorderException , NoSuchConformancePackException , NoSuchDeliveryChannelException , NoSuchOrganizationConfigRuleException , NoSuchOrganizationConformancePackException , NoSuchRemediationConfigurationException , NoSuchRemediationExceptionException , NoSuchRetentionConfigurationException , OrganizationAccessDeniedException , OrganizationAggregationSource , OrganizationAllFeaturesNotEnabledException , OrganizationConfigRule , OrganizationConfigRuleStatus , OrganizationConfigRuleTriggerType , OrganizationConformancePack , OrganizationConformancePackDetailedStatus , OrganizationConformancePackStatus , OrganizationConformancePackTemplateValidationException , OrganizationCustomRuleMetadata , OrganizationManagedRuleMetadata , OrganizationResourceDetailedStatusFilters , OversizedConfigurationItemException , PendingAggregationRequest , PutAggregationAuthorizationRequest , PutAggregationAuthorizationResponse , PutConfigRuleRequest , PutConfigurationAggregatorRequest , PutConfigurationAggregatorResponse , PutConfigurationRecorderRequest , PutConformancePackRequest , PutConformancePackResponse , PutDeliveryChannelRequest , PutEvaluationsRequest , PutEvaluationsResponse , PutExternalEvaluationRequest , PutExternalEvaluationResponse , PutOrganizationConfigRuleRequest , PutOrganizationConfigRuleResponse , PutOrganizationConformancePackRequest , PutOrganizationConformancePackResponse , PutRemediationConfigurationsRequest , PutRemediationConfigurationsResponse , PutRemediationExceptionsRequest , PutRemediationExceptionsResponse , RecordingGroup , Relationship , RemediationConfiguration , RemediationException , RemediationExceptionResourceKey , RemediationExecutionStatus , RemediationExecutionStep , RemediationInProgressException , RemediationParameterValue , ResourceCount , ResourceCountFilters , ResourceFilters , ResourceIdentifier , ResourceInUseException , ResourceKey , ResourceNotDiscoveredException , ResourceNotFoundException , ResourceType , ResourceValue , RetentionConfiguration , Scope , Source , SourceDetail , SsmControls , StaticValue , StatusDetailFilters , StoredQuery , StoredQueryMetadata , Tag , ValidationException , } from "../models/models_0" ; import { PutResourceConfigRequest , PutRetentionConfigurationRequest , PutRetentionConfigurationResponse , PutStoredQueryRequest , PutStoredQueryResponse , QueryInfo , ResourceConcurrentModificationException , SelectAggregateResourceConfigRequest , SelectAggregateResourceConfigResponse , SelectResourceConfigRequest , SelectResourceConfigResponse , StartConfigRulesEvaluationRequest , StartConfigRulesEvaluationResponse , StartConfigurationRecorderRequest , StartRemediationExecutionRequest , StartRemediationExecutionResponse , StopConfigurationRecorderRequest , TagResourceRequest , TooManyTagsException , UntagResourceRequest , } from "../models/models_1" ; export const serializeAws_json1_1BatchGetAggregateResourceConfigCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.BatchGetAggregateResourceConfig" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1BatchGetAggregateResourceConfigRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1BatchGetResourceConfigCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.BatchGetResourceConfig" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1BatchGetResourceConfigRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteAggregationAuthorizationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DeleteAggregationAuthorization" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteAggregationAuthorizationRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteConfigRuleCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DeleteConfigRule" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteConfigRuleRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteConfigurationAggregatorCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DeleteConfigurationAggregator" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteConfigurationAggregatorRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteConfigurationRecorderCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DeleteConfigurationRecorder" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteConfigurationRecorderRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteConformancePackCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DeleteConformancePack" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteConformancePackRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteDeliveryChannelCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DeleteDeliveryChannel" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteDeliveryChannelRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteEvaluationResultsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DeleteEvaluationResults" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteEvaluationResultsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteOrganizationConfigRuleCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DeleteOrganizationConfigRule" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteOrganizationConfigRuleRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteOrganizationConformancePackCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DeleteOrganizationConformancePack" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteOrganizationConformancePackRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeletePendingAggregationRequestCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DeletePendingAggregationRequest" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeletePendingAggregationRequestRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteRemediationConfigurationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DeleteRemediationConfiguration" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteRemediationConfigurationRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteRemediationExceptionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DeleteRemediationExceptions" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteRemediationExceptionsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteResourceConfigCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DeleteResourceConfig" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteResourceConfigRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteRetentionConfigurationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DeleteRetentionConfiguration" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteRetentionConfigurationRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteStoredQueryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DeleteStoredQuery" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteStoredQueryRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeliverConfigSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DeliverConfigSnapshot" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeliverConfigSnapshotRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeAggregateComplianceByConfigRulesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeAggregateComplianceByConfigRules" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeAggregateComplianceByConfigRulesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeAggregateComplianceByConformancePacksCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeAggregateComplianceByConformancePacks" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeAggregateComplianceByConformancePacksRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeAggregationAuthorizationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeAggregationAuthorizations" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeAggregationAuthorizationsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeComplianceByConfigRuleCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeComplianceByConfigRule" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeComplianceByConfigRuleRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeComplianceByResourceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeComplianceByResource" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeComplianceByResourceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeConfigRuleEvaluationStatusCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeConfigRuleEvaluationStatus" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeConfigRuleEvaluationStatusRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeConfigRulesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeConfigRules" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeConfigRulesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeConfigurationAggregatorsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeConfigurationAggregators" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeConfigurationAggregatorsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeConfigurationAggregatorSourcesStatusCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeConfigurationAggregatorSourcesStatus" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeConfigurationAggregatorSourcesStatusRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeConfigurationRecordersCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeConfigurationRecorders" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeConfigurationRecordersRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeConfigurationRecorderStatusCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeConfigurationRecorderStatus" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeConfigurationRecorderStatusRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeConformancePackComplianceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeConformancePackCompliance" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeConformancePackComplianceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeConformancePacksCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeConformancePacks" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeConformancePacksRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeConformancePackStatusCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeConformancePackStatus" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeConformancePackStatusRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeDeliveryChannelsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeDeliveryChannels" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeDeliveryChannelsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeDeliveryChannelStatusCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeDeliveryChannelStatus" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeDeliveryChannelStatusRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeOrganizationConfigRulesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeOrganizationConfigRules" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeOrganizationConfigRulesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeOrganizationConfigRuleStatusesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeOrganizationConfigRuleStatuses" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeOrganizationConfigRuleStatusesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeOrganizationConformancePacksCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeOrganizationConformancePacks" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeOrganizationConformancePacksRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeOrganizationConformancePackStatusesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeOrganizationConformancePackStatuses" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeOrganizationConformancePackStatusesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribePendingAggregationRequestsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribePendingAggregationRequests" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribePendingAggregationRequestsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeRemediationConfigurationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeRemediationConfigurations" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeRemediationConfigurationsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeRemediationExceptionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeRemediationExceptions" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeRemediationExceptionsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeRemediationExecutionStatusCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeRemediationExecutionStatus" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeRemediationExecutionStatusRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeRetentionConfigurationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.DescribeRetentionConfigurations" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeRetentionConfigurationsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetAggregateComplianceDetailsByConfigRuleCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.GetAggregateComplianceDetailsByConfigRule" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetAggregateComplianceDetailsByConfigRuleRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetAggregateConfigRuleComplianceSummaryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.GetAggregateConfigRuleComplianceSummary" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetAggregateConfigRuleComplianceSummaryRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetAggregateConformancePackComplianceSummaryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.GetAggregateConformancePackComplianceSummary" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetAggregateConformancePackComplianceSummaryRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetAggregateDiscoveredResourceCountsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.GetAggregateDiscoveredResourceCounts" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetAggregateDiscoveredResourceCountsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetAggregateResourceConfigCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.GetAggregateResourceConfig" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetAggregateResourceConfigRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetComplianceDetailsByConfigRuleCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.GetComplianceDetailsByConfigRule" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetComplianceDetailsByConfigRuleRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetComplianceDetailsByResourceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.GetComplianceDetailsByResource" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetComplianceDetailsByResourceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetComplianceSummaryByConfigRuleCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.GetComplianceSummaryByConfigRule" , } ; const body = "{}" ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetComplianceSummaryByResourceTypeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.GetComplianceSummaryByResourceType" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetComplianceSummaryByResourceTypeRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetConformancePackComplianceDetailsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.GetConformancePackComplianceDetails" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetConformancePackComplianceDetailsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetConformancePackComplianceSummaryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.GetConformancePackComplianceSummary" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetConformancePackComplianceSummaryRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetDiscoveredResourceCountsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.GetDiscoveredResourceCounts" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetDiscoveredResourceCountsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetOrganizationConfigRuleDetailedStatusCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.GetOrganizationConfigRuleDetailedStatus" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetOrganizationConfigRuleDetailedStatusRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetOrganizationConformancePackDetailedStatusCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.GetOrganizationConformancePackDetailedStatus" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetOrganizationConformancePackDetailedStatusRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetResourceConfigHistoryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.GetResourceConfigHistory" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetResourceConfigHistoryRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetStoredQueryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.GetStoredQuery" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetStoredQueryRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ListAggregateDiscoveredResourcesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.ListAggregateDiscoveredResources" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ListAggregateDiscoveredResourcesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ListDiscoveredResourcesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.ListDiscoveredResources" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ListDiscoveredResourcesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ListStoredQueriesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.ListStoredQueries" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ListStoredQueriesRequest ( 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" : "StarlingDoveService.ListTagsForResource" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ListTagsForResourceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutAggregationAuthorizationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.PutAggregationAuthorization" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutAggregationAuthorizationRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutConfigRuleCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.PutConfigRule" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutConfigRuleRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutConfigurationAggregatorCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.PutConfigurationAggregator" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutConfigurationAggregatorRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutConfigurationRecorderCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.PutConfigurationRecorder" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutConfigurationRecorderRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutConformancePackCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.PutConformancePack" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutConformancePackRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutDeliveryChannelCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.PutDeliveryChannel" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutDeliveryChannelRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutEvaluationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.PutEvaluations" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutEvaluationsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutExternalEvaluationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.PutExternalEvaluation" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutExternalEvaluationRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutOrganizationConfigRuleCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.PutOrganizationConfigRule" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutOrganizationConfigRuleRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutOrganizationConformancePackCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.PutOrganizationConformancePack" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutOrganizationConformancePackRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutRemediationConfigurationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.PutRemediationConfigurations" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutRemediationConfigurationsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutRemediationExceptionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.PutRemediationExceptions" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutRemediationExceptionsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutResourceConfigCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.PutResourceConfig" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutResourceConfigRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutRetentionConfigurationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.PutRetentionConfiguration" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutRetentionConfigurationRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutStoredQueryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.PutStoredQuery" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutStoredQueryRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1SelectAggregateResourceConfigCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.SelectAggregateResourceConfig" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1SelectAggregateResourceConfigRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1SelectResourceConfigCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.SelectResourceConfig" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1SelectResourceConfigRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1StartConfigRulesEvaluationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.StartConfigRulesEvaluation" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1StartConfigRulesEvaluationRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1StartConfigurationRecorderCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.StartConfigurationRecorder" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1StartConfigurationRecorderRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1StartRemediationExecutionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.StartRemediationExecution" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1StartRemediationExecutionRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1StopConfigurationRecorderCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.StopConfigurationRecorder" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1StopConfigurationRecorderRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1TagResourceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.TagResource" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1TagResourceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1UntagResourceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "StarlingDoveService.UntagResource" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UntagResourceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const deserializeAws_json1_1BatchGetAggregateResourceConfigCommand = async ( output , context ) : Promise < BatchGetAggregateResourceConfigCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1BatchGetAggregateResourceConfigCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1BatchGetAggregateResourceConfigResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1BatchGetAggregateResourceConfigCommandError = async ( output , context ) : Promise < BatchGetAggregateResourceConfigCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoSuchConfigurationAggregatorException" : case "com.amazonaws.configservice#NoSuchConfigurationAggregatorException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationAggregatorExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1BatchGetResourceConfigCommand = async ( output , context ) : Promise < BatchGetResourceConfigCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1BatchGetResourceConfigCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1BatchGetResourceConfigResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1BatchGetResourceConfigCommandError = async ( output , context ) : Promise < BatchGetResourceConfigCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoAvailableConfigurationRecorderException" : case "com.amazonaws.configservice#NoAvailableConfigurationRecorderException" : response = { ... ( await deserializeAws_json1_1NoAvailableConfigurationRecorderExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1DeleteAggregationAuthorizationCommand = async ( output , context ) : Promise < DeleteAggregationAuthorizationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteAggregationAuthorizationCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteAggregationAuthorizationCommandError = async ( output , context ) : Promise < DeleteAggregationAuthorizationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( 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_1DeleteConfigRuleCommand = async ( output , context ) : Promise < DeleteConfigRuleCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteConfigRuleCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteConfigRuleCommandError = async ( output , context ) : Promise < DeleteConfigRuleCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoSuchConfigRuleException" : case "com.amazonaws.configservice#NoSuchConfigRuleException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigRuleExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceInUseException" : case "com.amazonaws.configservice#ResourceInUseException" : response = { ... ( await deserializeAws_json1_1ResourceInUseExceptionResponse ( 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_1DeleteConfigurationAggregatorCommand = async ( output , context ) : Promise < DeleteConfigurationAggregatorCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteConfigurationAggregatorCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteConfigurationAggregatorCommandError = async ( output , context ) : Promise < DeleteConfigurationAggregatorCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoSuchConfigurationAggregatorException" : case "com.amazonaws.configservice#NoSuchConfigurationAggregatorException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationAggregatorExceptionResponse ( 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_1DeleteConfigurationRecorderCommand = async ( output , context ) : Promise < DeleteConfigurationRecorderCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteConfigurationRecorderCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteConfigurationRecorderCommandError = async ( output , context ) : Promise < DeleteConfigurationRecorderCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoSuchConfigurationRecorderException" : case "com.amazonaws.configservice#NoSuchConfigurationRecorderException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationRecorderExceptionResponse ( 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_1DeleteConformancePackCommand = async ( output , context ) : Promise < DeleteConformancePackCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteConformancePackCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteConformancePackCommandError = async ( output , context ) : Promise < DeleteConformancePackCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoSuchConformancePackException" : case "com.amazonaws.configservice#NoSuchConformancePackException" : response = { ... ( await deserializeAws_json1_1NoSuchConformancePackExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceInUseException" : case "com.amazonaws.configservice#ResourceInUseException" : response = { ... ( await deserializeAws_json1_1ResourceInUseExceptionResponse ( 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_1DeleteDeliveryChannelCommand = async ( output , context ) : Promise < DeleteDeliveryChannelCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteDeliveryChannelCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteDeliveryChannelCommandError = async ( output , context ) : Promise < DeleteDeliveryChannelCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "LastDeliveryChannelDeleteFailedException" : case "com.amazonaws.configservice#LastDeliveryChannelDeleteFailedException" : response = { ... ( await deserializeAws_json1_1LastDeliveryChannelDeleteFailedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchDeliveryChannelException" : case "com.amazonaws.configservice#NoSuchDeliveryChannelException" : response = { ... ( await deserializeAws_json1_1NoSuchDeliveryChannelExceptionResponse ( 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_1DeleteEvaluationResultsCommand = async ( output , context ) : Promise < DeleteEvaluationResultsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteEvaluationResultsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteEvaluationResultsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteEvaluationResultsCommandError = async ( output , context ) : Promise < DeleteEvaluationResultsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoSuchConfigRuleException" : case "com.amazonaws.configservice#NoSuchConfigRuleException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigRuleExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceInUseException" : case "com.amazonaws.configservice#ResourceInUseException" : response = { ... ( await deserializeAws_json1_1ResourceInUseExceptionResponse ( 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_1DeleteOrganizationConfigRuleCommand = async ( output , context ) : Promise < DeleteOrganizationConfigRuleCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteOrganizationConfigRuleCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteOrganizationConfigRuleCommandError = async ( output , context ) : Promise < DeleteOrganizationConfigRuleCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoSuchOrganizationConfigRuleException" : case "com.amazonaws.configservice#NoSuchOrganizationConfigRuleException" : response = { ... ( await deserializeAws_json1_1NoSuchOrganizationConfigRuleExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OrganizationAccessDeniedException" : case "com.amazonaws.configservice#OrganizationAccessDeniedException" : response = { ... ( await deserializeAws_json1_1OrganizationAccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceInUseException" : case "com.amazonaws.configservice#ResourceInUseException" : response = { ... ( await deserializeAws_json1_1ResourceInUseExceptionResponse ( 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_1DeleteOrganizationConformancePackCommand = async ( output , context ) : Promise < DeleteOrganizationConformancePackCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteOrganizationConformancePackCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteOrganizationConformancePackCommandError = async ( output , context ) : Promise < DeleteOrganizationConformancePackCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoSuchOrganizationConformancePackException" : case "com.amazonaws.configservice#NoSuchOrganizationConformancePackException" : response = { ... ( await deserializeAws_json1_1NoSuchOrganizationConformancePackExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OrganizationAccessDeniedException" : case "com.amazonaws.configservice#OrganizationAccessDeniedException" : response = { ... ( await deserializeAws_json1_1OrganizationAccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceInUseException" : case "com.amazonaws.configservice#ResourceInUseException" : response = { ... ( await deserializeAws_json1_1ResourceInUseExceptionResponse ( 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_1DeletePendingAggregationRequestCommand = async ( output , context ) : Promise < DeletePendingAggregationRequestCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeletePendingAggregationRequestCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeletePendingAggregationRequestCommandError = async ( output , context ) : Promise < DeletePendingAggregationRequestCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( 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_1DeleteRemediationConfigurationCommand = async ( output , context ) : Promise < DeleteRemediationConfigurationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteRemediationConfigurationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteRemediationConfigurationResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteRemediationConfigurationCommandError = async ( output , context ) : Promise < DeleteRemediationConfigurationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InsufficientPermissionsException" : case "com.amazonaws.configservice#InsufficientPermissionsException" : response = { ... ( await deserializeAws_json1_1InsufficientPermissionsExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchRemediationConfigurationException" : case "com.amazonaws.configservice#NoSuchRemediationConfigurationException" : response = { ... ( await deserializeAws_json1_1NoSuchRemediationConfigurationExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "RemediationInProgressException" : case "com.amazonaws.configservice#RemediationInProgressException" : response = { ... ( await deserializeAws_json1_1RemediationInProgressExceptionResponse ( 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_1DeleteRemediationExceptionsCommand = async ( output , context ) : Promise < DeleteRemediationExceptionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteRemediationExceptionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteRemediationExceptionsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteRemediationExceptionsCommandError = async ( output , context ) : Promise < DeleteRemediationExceptionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoSuchRemediationExceptionException" : case "com.amazonaws.configservice#NoSuchRemediationExceptionException" : response = { ... ( await deserializeAws_json1_1NoSuchRemediationExceptionExceptionResponse ( 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_1DeleteResourceConfigCommand = async ( output , context ) : Promise < DeleteResourceConfigCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteResourceConfigCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteResourceConfigCommandError = async ( output , context ) : Promise < DeleteResourceConfigCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoRunningConfigurationRecorderException" : case "com.amazonaws.configservice#NoRunningConfigurationRecorderException" : response = { ... ( await deserializeAws_json1_1NoRunningConfigurationRecorderExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1DeleteRetentionConfigurationCommand = async ( output , context ) : Promise < DeleteRetentionConfigurationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteRetentionConfigurationCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteRetentionConfigurationCommandError = async ( output , context ) : Promise < DeleteRetentionConfigurationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchRetentionConfigurationException" : case "com.amazonaws.configservice#NoSuchRetentionConfigurationException" : response = { ... ( await deserializeAws_json1_1NoSuchRetentionConfigurationExceptionResponse ( 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_1DeleteStoredQueryCommand = async ( output , context ) : Promise < DeleteStoredQueryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteStoredQueryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteStoredQueryResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteStoredQueryCommandError = async ( output , context ) : Promise < DeleteStoredQueryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundException" : case "com.amazonaws.configservice#ResourceNotFoundException" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1DeliverConfigSnapshotCommand = async ( output , context ) : Promise < DeliverConfigSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeliverConfigSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeliverConfigSnapshotResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeliverConfigSnapshotCommandError = async ( output , context ) : Promise < DeliverConfigSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoAvailableConfigurationRecorderException" : case "com.amazonaws.configservice#NoAvailableConfigurationRecorderException" : response = { ... ( await deserializeAws_json1_1NoAvailableConfigurationRecorderExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoRunningConfigurationRecorderException" : case "com.amazonaws.configservice#NoRunningConfigurationRecorderException" : response = { ... ( await deserializeAws_json1_1NoRunningConfigurationRecorderExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchDeliveryChannelException" : case "com.amazonaws.configservice#NoSuchDeliveryChannelException" : response = { ... ( await deserializeAws_json1_1NoSuchDeliveryChannelExceptionResponse ( 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_1DescribeAggregateComplianceByConfigRulesCommand = async ( output , context ) : Promise < DescribeAggregateComplianceByConfigRulesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeAggregateComplianceByConfigRulesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeAggregateComplianceByConfigRulesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeAggregateComplianceByConfigRulesCommandError = async ( output , context ) : Promise < DescribeAggregateComplianceByConfigRulesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigurationAggregatorException" : case "com.amazonaws.configservice#NoSuchConfigurationAggregatorException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationAggregatorExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1DescribeAggregateComplianceByConformancePacksCommand = async ( output , context ) : Promise < DescribeAggregateComplianceByConformancePacksCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeAggregateComplianceByConformancePacksCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeAggregateComplianceByConformancePacksResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeAggregateComplianceByConformancePacksCommandError = async ( output , context ) : Promise < DescribeAggregateComplianceByConformancePacksCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigurationAggregatorException" : case "com.amazonaws.configservice#NoSuchConfigurationAggregatorException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationAggregatorExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1DescribeAggregationAuthorizationsCommand = async ( output , context ) : Promise < DescribeAggregationAuthorizationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeAggregationAuthorizationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeAggregationAuthorizationsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeAggregationAuthorizationsCommandError = async ( output , context ) : Promise < DescribeAggregationAuthorizationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( 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_1DescribeComplianceByConfigRuleCommand = async ( output , context ) : Promise < DescribeComplianceByConfigRuleCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeComplianceByConfigRuleCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeComplianceByConfigRuleResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeComplianceByConfigRuleCommandError = async ( output , context ) : Promise < DescribeComplianceByConfigRuleCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigRuleException" : case "com.amazonaws.configservice#NoSuchConfigRuleException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigRuleExceptionResponse ( 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_1DescribeComplianceByResourceCommand = async ( output , context ) : Promise < DescribeComplianceByResourceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeComplianceByResourceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeComplianceByResourceResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeComplianceByResourceCommandError = async ( output , context ) : Promise < DescribeComplianceByResourceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( 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_1DescribeConfigRuleEvaluationStatusCommand = async ( output , context ) : Promise < DescribeConfigRuleEvaluationStatusCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeConfigRuleEvaluationStatusCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeConfigRuleEvaluationStatusResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeConfigRuleEvaluationStatusCommandError = async ( output , context ) : Promise < DescribeConfigRuleEvaluationStatusCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigRuleException" : case "com.amazonaws.configservice#NoSuchConfigRuleException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigRuleExceptionResponse ( 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_1DescribeConfigRulesCommand = async ( output , context ) : Promise < DescribeConfigRulesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeConfigRulesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeConfigRulesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeConfigRulesCommandError = async ( output , context ) : Promise < DescribeConfigRulesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigRuleException" : case "com.amazonaws.configservice#NoSuchConfigRuleException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigRuleExceptionResponse ( 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_1DescribeConfigurationAggregatorsCommand = async ( output , context ) : Promise < DescribeConfigurationAggregatorsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeConfigurationAggregatorsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeConfigurationAggregatorsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeConfigurationAggregatorsCommandError = async ( output , context ) : Promise < DescribeConfigurationAggregatorsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigurationAggregatorException" : case "com.amazonaws.configservice#NoSuchConfigurationAggregatorException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationAggregatorExceptionResponse ( 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_1DescribeConfigurationAggregatorSourcesStatusCommand = async ( output , context ) : Promise < DescribeConfigurationAggregatorSourcesStatusCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeConfigurationAggregatorSourcesStatusCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeConfigurationAggregatorSourcesStatusResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeConfigurationAggregatorSourcesStatusCommandError = async ( output , context ) : Promise < DescribeConfigurationAggregatorSourcesStatusCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigurationAggregatorException" : case "com.amazonaws.configservice#NoSuchConfigurationAggregatorException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationAggregatorExceptionResponse ( 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_1DescribeConfigurationRecordersCommand = async ( output , context ) : Promise < DescribeConfigurationRecordersCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeConfigurationRecordersCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeConfigurationRecordersResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeConfigurationRecordersCommandError = async ( output , context ) : Promise < DescribeConfigurationRecordersCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoSuchConfigurationRecorderException" : case "com.amazonaws.configservice#NoSuchConfigurationRecorderException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationRecorderExceptionResponse ( 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_1DescribeConfigurationRecorderStatusCommand = async ( output , context ) : Promise < DescribeConfigurationRecorderStatusCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeConfigurationRecorderStatusCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeConfigurationRecorderStatusResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeConfigurationRecorderStatusCommandError = async ( output , context ) : Promise < DescribeConfigurationRecorderStatusCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoSuchConfigurationRecorderException" : case "com.amazonaws.configservice#NoSuchConfigurationRecorderException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationRecorderExceptionResponse ( 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_1DescribeConformancePackComplianceCommand = async ( output , context ) : Promise < DescribeConformancePackComplianceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeConformancePackComplianceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeConformancePackComplianceResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeConformancePackComplianceCommandError = async ( output , context ) : Promise < DescribeConformancePackComplianceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigRuleInConformancePackException" : case "com.amazonaws.configservice#NoSuchConfigRuleInConformancePackException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigRuleInConformancePackExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConformancePackException" : case "com.amazonaws.configservice#NoSuchConformancePackException" : response = { ... ( await deserializeAws_json1_1NoSuchConformancePackExceptionResponse ( 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_1DescribeConformancePacksCommand = async ( output , context ) : Promise < DescribeConformancePacksCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeConformancePacksCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeConformancePacksResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeConformancePacksCommandError = async ( output , context ) : Promise < DescribeConformancePacksCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConformancePackException" : case "com.amazonaws.configservice#NoSuchConformancePackException" : response = { ... ( await deserializeAws_json1_1NoSuchConformancePackExceptionResponse ( 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_1DescribeConformancePackStatusCommand = async ( output , context ) : Promise < DescribeConformancePackStatusCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeConformancePackStatusCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeConformancePackStatusResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeConformancePackStatusCommandError = async ( output , context ) : Promise < DescribeConformancePackStatusCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( 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_1DescribeDeliveryChannelsCommand = async ( output , context ) : Promise < DescribeDeliveryChannelsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeDeliveryChannelsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeDeliveryChannelsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeDeliveryChannelsCommandError = async ( output , context ) : Promise < DescribeDeliveryChannelsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoSuchDeliveryChannelException" : case "com.amazonaws.configservice#NoSuchDeliveryChannelException" : response = { ... ( await deserializeAws_json1_1NoSuchDeliveryChannelExceptionResponse ( 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_1DescribeDeliveryChannelStatusCommand = async ( output , context ) : Promise < DescribeDeliveryChannelStatusCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeDeliveryChannelStatusCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeDeliveryChannelStatusResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeDeliveryChannelStatusCommandError = async ( output , context ) : Promise < DescribeDeliveryChannelStatusCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoSuchDeliveryChannelException" : case "com.amazonaws.configservice#NoSuchDeliveryChannelException" : response = { ... ( await deserializeAws_json1_1NoSuchDeliveryChannelExceptionResponse ( 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_1DescribeOrganizationConfigRulesCommand = async ( output , context ) : Promise < DescribeOrganizationConfigRulesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeOrganizationConfigRulesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeOrganizationConfigRulesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeOrganizationConfigRulesCommandError = async ( output , context ) : Promise < DescribeOrganizationConfigRulesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchOrganizationConfigRuleException" : case "com.amazonaws.configservice#NoSuchOrganizationConfigRuleException" : response = { ... ( await deserializeAws_json1_1NoSuchOrganizationConfigRuleExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OrganizationAccessDeniedException" : case "com.amazonaws.configservice#OrganizationAccessDeniedException" : response = { ... ( await deserializeAws_json1_1OrganizationAccessDeniedExceptionResponse ( 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_1DescribeOrganizationConfigRuleStatusesCommand = async ( output , context ) : Promise < DescribeOrganizationConfigRuleStatusesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeOrganizationConfigRuleStatusesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeOrganizationConfigRuleStatusesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeOrganizationConfigRuleStatusesCommandError = async ( output , context ) : Promise < DescribeOrganizationConfigRuleStatusesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchOrganizationConfigRuleException" : case "com.amazonaws.configservice#NoSuchOrganizationConfigRuleException" : response = { ... ( await deserializeAws_json1_1NoSuchOrganizationConfigRuleExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OrganizationAccessDeniedException" : case "com.amazonaws.configservice#OrganizationAccessDeniedException" : response = { ... ( await deserializeAws_json1_1OrganizationAccessDeniedExceptionResponse ( 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_1DescribeOrganizationConformancePacksCommand = async ( output , context ) : Promise < DescribeOrganizationConformancePacksCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeOrganizationConformancePacksCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeOrganizationConformancePacksResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeOrganizationConformancePacksCommandError = async ( output , context ) : Promise < DescribeOrganizationConformancePacksCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchOrganizationConformancePackException" : case "com.amazonaws.configservice#NoSuchOrganizationConformancePackException" : response = { ... ( await deserializeAws_json1_1NoSuchOrganizationConformancePackExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OrganizationAccessDeniedException" : case "com.amazonaws.configservice#OrganizationAccessDeniedException" : response = { ... ( await deserializeAws_json1_1OrganizationAccessDeniedExceptionResponse ( 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_1DescribeOrganizationConformancePackStatusesCommand = async ( output , context ) : Promise < DescribeOrganizationConformancePackStatusesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeOrganizationConformancePackStatusesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeOrganizationConformancePackStatusesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeOrganizationConformancePackStatusesCommandError = async ( output , context ) : Promise < DescribeOrganizationConformancePackStatusesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchOrganizationConformancePackException" : case "com.amazonaws.configservice#NoSuchOrganizationConformancePackException" : response = { ... ( await deserializeAws_json1_1NoSuchOrganizationConformancePackExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OrganizationAccessDeniedException" : case "com.amazonaws.configservice#OrganizationAccessDeniedException" : response = { ... ( await deserializeAws_json1_1OrganizationAccessDeniedExceptionResponse ( 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_1DescribePendingAggregationRequestsCommand = async ( output , context ) : Promise < DescribePendingAggregationRequestsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribePendingAggregationRequestsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribePendingAggregationRequestsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribePendingAggregationRequestsCommandError = async ( output , context ) : Promise < DescribePendingAggregationRequestsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( 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_1DescribeRemediationConfigurationsCommand = async ( output , context ) : Promise < DescribeRemediationConfigurationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeRemediationConfigurationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeRemediationConfigurationsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeRemediationConfigurationsCommandError = async ( output , context ) : Promise < DescribeRemediationConfigurationsCommandOutput > => { 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_1DescribeRemediationExceptionsCommand = async ( output , context ) : Promise < DescribeRemediationExceptionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeRemediationExceptionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeRemediationExceptionsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeRemediationExceptionsCommandError = async ( output , context ) : Promise < DescribeRemediationExceptionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( 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_1DescribeRemediationExecutionStatusCommand = async ( output , context ) : Promise < DescribeRemediationExecutionStatusCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeRemediationExecutionStatusCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeRemediationExecutionStatusResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeRemediationExecutionStatusCommandError = async ( output , context ) : Promise < DescribeRemediationExecutionStatusCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchRemediationConfigurationException" : case "com.amazonaws.configservice#NoSuchRemediationConfigurationException" : response = { ... ( await deserializeAws_json1_1NoSuchRemediationConfigurationExceptionResponse ( 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_1DescribeRetentionConfigurationsCommand = async ( output , context ) : Promise < DescribeRetentionConfigurationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeRetentionConfigurationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeRetentionConfigurationsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeRetentionConfigurationsCommandError = async ( output , context ) : Promise < DescribeRetentionConfigurationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchRetentionConfigurationException" : case "com.amazonaws.configservice#NoSuchRetentionConfigurationException" : response = { ... ( await deserializeAws_json1_1NoSuchRetentionConfigurationExceptionResponse ( 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_1GetAggregateComplianceDetailsByConfigRuleCommand = async ( output , context ) : Promise < GetAggregateComplianceDetailsByConfigRuleCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetAggregateComplianceDetailsByConfigRuleCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetAggregateComplianceDetailsByConfigRuleResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetAggregateComplianceDetailsByConfigRuleCommandError = async ( output , context ) : Promise < GetAggregateComplianceDetailsByConfigRuleCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigurationAggregatorException" : case "com.amazonaws.configservice#NoSuchConfigurationAggregatorException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationAggregatorExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1GetAggregateConfigRuleComplianceSummaryCommand = async ( output , context ) : Promise < GetAggregateConfigRuleComplianceSummaryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetAggregateConfigRuleComplianceSummaryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetAggregateConfigRuleComplianceSummaryResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetAggregateConfigRuleComplianceSummaryCommandError = async ( output , context ) : Promise < GetAggregateConfigRuleComplianceSummaryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigurationAggregatorException" : case "com.amazonaws.configservice#NoSuchConfigurationAggregatorException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationAggregatorExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1GetAggregateConformancePackComplianceSummaryCommand = async ( output , context ) : Promise < GetAggregateConformancePackComplianceSummaryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetAggregateConformancePackComplianceSummaryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetAggregateConformancePackComplianceSummaryResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetAggregateConformancePackComplianceSummaryCommandError = async ( output , context ) : Promise < GetAggregateConformancePackComplianceSummaryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigurationAggregatorException" : case "com.amazonaws.configservice#NoSuchConfigurationAggregatorException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationAggregatorExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1GetAggregateDiscoveredResourceCountsCommand = async ( output , context ) : Promise < GetAggregateDiscoveredResourceCountsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetAggregateDiscoveredResourceCountsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetAggregateDiscoveredResourceCountsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetAggregateDiscoveredResourceCountsCommandError = async ( output , context ) : Promise < GetAggregateDiscoveredResourceCountsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigurationAggregatorException" : case "com.amazonaws.configservice#NoSuchConfigurationAggregatorException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationAggregatorExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1GetAggregateResourceConfigCommand = async ( output , context ) : Promise < GetAggregateResourceConfigCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetAggregateResourceConfigCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetAggregateResourceConfigResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetAggregateResourceConfigCommandError = async ( output , context ) : Promise < GetAggregateResourceConfigCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoSuchConfigurationAggregatorException" : case "com.amazonaws.configservice#NoSuchConfigurationAggregatorException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationAggregatorExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OversizedConfigurationItemException" : case "com.amazonaws.configservice#OversizedConfigurationItemException" : response = { ... ( await deserializeAws_json1_1OversizedConfigurationItemExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotDiscoveredException" : case "com.amazonaws.configservice#ResourceNotDiscoveredException" : response = { ... ( await deserializeAws_json1_1ResourceNotDiscoveredExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1GetComplianceDetailsByConfigRuleCommand = async ( output , context ) : Promise < GetComplianceDetailsByConfigRuleCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetComplianceDetailsByConfigRuleCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetComplianceDetailsByConfigRuleResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetComplianceDetailsByConfigRuleCommandError = async ( output , context ) : Promise < GetComplianceDetailsByConfigRuleCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigRuleException" : case "com.amazonaws.configservice#NoSuchConfigRuleException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigRuleExceptionResponse ( 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_1GetComplianceDetailsByResourceCommand = async ( output , context ) : Promise < GetComplianceDetailsByResourceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetComplianceDetailsByResourceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetComplianceDetailsByResourceResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetComplianceDetailsByResourceCommandError = async ( output , context ) : Promise < GetComplianceDetailsByResourceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( 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_1GetComplianceSummaryByConfigRuleCommand = async ( output , context ) : Promise < GetComplianceSummaryByConfigRuleCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetComplianceSummaryByConfigRuleCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetComplianceSummaryByConfigRuleResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetComplianceSummaryByConfigRuleCommandError = async ( output , context ) : Promise < GetComplianceSummaryByConfigRuleCommandOutput > => { 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_1GetComplianceSummaryByResourceTypeCommand = async ( output , context ) : Promise < GetComplianceSummaryByResourceTypeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetComplianceSummaryByResourceTypeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetComplianceSummaryByResourceTypeResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetComplianceSummaryByResourceTypeCommandError = async ( output , context ) : Promise < GetComplianceSummaryByResourceTypeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( 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_1GetConformancePackComplianceDetailsCommand = async ( output , context ) : Promise < GetConformancePackComplianceDetailsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetConformancePackComplianceDetailsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetConformancePackComplianceDetailsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetConformancePackComplianceDetailsCommandError = async ( output , context ) : Promise < GetConformancePackComplianceDetailsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigRuleInConformancePackException" : case "com.amazonaws.configservice#NoSuchConfigRuleInConformancePackException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigRuleInConformancePackExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConformancePackException" : case "com.amazonaws.configservice#NoSuchConformancePackException" : response = { ... ( await deserializeAws_json1_1NoSuchConformancePackExceptionResponse ( 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_1GetConformancePackComplianceSummaryCommand = async ( output , context ) : Promise < GetConformancePackComplianceSummaryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetConformancePackComplianceSummaryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetConformancePackComplianceSummaryResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetConformancePackComplianceSummaryCommandError = async ( output , context ) : Promise < GetConformancePackComplianceSummaryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConformancePackException" : case "com.amazonaws.configservice#NoSuchConformancePackException" : response = { ... ( await deserializeAws_json1_1NoSuchConformancePackExceptionResponse ( 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_1GetDiscoveredResourceCountsCommand = async ( output , context ) : Promise < GetDiscoveredResourceCountsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetDiscoveredResourceCountsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetDiscoveredResourceCountsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetDiscoveredResourceCountsCommandError = async ( output , context ) : Promise < GetDiscoveredResourceCountsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1GetOrganizationConfigRuleDetailedStatusCommand = async ( output , context ) : Promise < GetOrganizationConfigRuleDetailedStatusCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetOrganizationConfigRuleDetailedStatusCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetOrganizationConfigRuleDetailedStatusResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetOrganizationConfigRuleDetailedStatusCommandError = async ( output , context ) : Promise < GetOrganizationConfigRuleDetailedStatusCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchOrganizationConfigRuleException" : case "com.amazonaws.configservice#NoSuchOrganizationConfigRuleException" : response = { ... ( await deserializeAws_json1_1NoSuchOrganizationConfigRuleExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OrganizationAccessDeniedException" : case "com.amazonaws.configservice#OrganizationAccessDeniedException" : response = { ... ( await deserializeAws_json1_1OrganizationAccessDeniedExceptionResponse ( 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_1GetOrganizationConformancePackDetailedStatusCommand = async ( output , context ) : Promise < GetOrganizationConformancePackDetailedStatusCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetOrganizationConformancePackDetailedStatusCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetOrganizationConformancePackDetailedStatusResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetOrganizationConformancePackDetailedStatusCommandError = async ( output , context ) : Promise < GetOrganizationConformancePackDetailedStatusCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchOrganizationConformancePackException" : case "com.amazonaws.configservice#NoSuchOrganizationConformancePackException" : response = { ... ( await deserializeAws_json1_1NoSuchOrganizationConformancePackExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OrganizationAccessDeniedException" : case "com.amazonaws.configservice#OrganizationAccessDeniedException" : response = { ... ( await deserializeAws_json1_1OrganizationAccessDeniedExceptionResponse ( 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_1GetResourceConfigHistoryCommand = async ( output , context ) : Promise < GetResourceConfigHistoryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetResourceConfigHistoryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetResourceConfigHistoryResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetResourceConfigHistoryCommandError = async ( output , context ) : Promise < GetResourceConfigHistoryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidTimeRangeException" : case "com.amazonaws.configservice#InvalidTimeRangeException" : response = { ... ( await deserializeAws_json1_1InvalidTimeRangeExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoAvailableConfigurationRecorderException" : case "com.amazonaws.configservice#NoAvailableConfigurationRecorderException" : response = { ... ( await deserializeAws_json1_1NoAvailableConfigurationRecorderExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotDiscoveredException" : case "com.amazonaws.configservice#ResourceNotDiscoveredException" : response = { ... ( await deserializeAws_json1_1ResourceNotDiscoveredExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1GetStoredQueryCommand = async ( output , context ) : Promise < GetStoredQueryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetStoredQueryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetStoredQueryResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetStoredQueryCommandError = async ( output , context ) : Promise < GetStoredQueryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundException" : case "com.amazonaws.configservice#ResourceNotFoundException" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1ListAggregateDiscoveredResourcesCommand = async ( output , context ) : Promise < ListAggregateDiscoveredResourcesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ListAggregateDiscoveredResourcesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ListAggregateDiscoveredResourcesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ListAggregateDiscoveredResourcesCommandError = async ( output , context ) : Promise < ListAggregateDiscoveredResourcesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigurationAggregatorException" : case "com.amazonaws.configservice#NoSuchConfigurationAggregatorException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationAggregatorExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1ListDiscoveredResourcesCommand = async ( output , context ) : Promise < ListDiscoveredResourcesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ListDiscoveredResourcesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ListDiscoveredResourcesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ListDiscoveredResourcesCommandError = async ( output , context ) : Promise < ListDiscoveredResourcesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoAvailableConfigurationRecorderException" : case "com.amazonaws.configservice#NoAvailableConfigurationRecorderException" : response = { ... ( await deserializeAws_json1_1NoAvailableConfigurationRecorderExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1ListStoredQueriesCommand = async ( output , context ) : Promise < ListStoredQueriesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ListStoredQueriesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ListStoredQueriesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ListStoredQueriesCommandError = async ( output , context ) : Promise < ListStoredQueriesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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 "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceNotFoundException" : case "com.amazonaws.configservice#ResourceNotFoundException" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1PutAggregationAuthorizationCommand = async ( output , context ) : Promise < PutAggregationAuthorizationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutAggregationAuthorizationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1PutAggregationAuthorizationResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutAggregationAuthorizationCommandError = async ( output , context ) : Promise < PutAggregationAuthorizationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( 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_1PutConfigRuleCommand = async ( output , context ) : Promise < PutConfigRuleCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutConfigRuleCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutConfigRuleCommandError = async ( output , context ) : Promise < PutConfigRuleCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InsufficientPermissionsException" : case "com.amazonaws.configservice#InsufficientPermissionsException" : response = { ... ( await deserializeAws_json1_1InsufficientPermissionsExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "MaxNumberOfConfigRulesExceededException" : case "com.amazonaws.configservice#MaxNumberOfConfigRulesExceededException" : response = { ... ( await deserializeAws_json1_1MaxNumberOfConfigRulesExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoAvailableConfigurationRecorderException" : case "com.amazonaws.configservice#NoAvailableConfigurationRecorderException" : response = { ... ( await deserializeAws_json1_1NoAvailableConfigurationRecorderExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceInUseException" : case "com.amazonaws.configservice#ResourceInUseException" : response = { ... ( await deserializeAws_json1_1ResourceInUseExceptionResponse ( 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_1PutConfigurationAggregatorCommand = async ( output , context ) : Promise < PutConfigurationAggregatorCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutConfigurationAggregatorCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1PutConfigurationAggregatorResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutConfigurationAggregatorCommandError = async ( output , context ) : Promise < PutConfigurationAggregatorCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidRoleException" : case "com.amazonaws.configservice#InvalidRoleException" : response = { ... ( await deserializeAws_json1_1InvalidRoleExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.configservice#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoAvailableOrganizationException" : case "com.amazonaws.configservice#NoAvailableOrganizationException" : response = { ... ( await deserializeAws_json1_1NoAvailableOrganizationExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OrganizationAccessDeniedException" : case "com.amazonaws.configservice#OrganizationAccessDeniedException" : response = { ... ( await deserializeAws_json1_1OrganizationAccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OrganizationAllFeaturesNotEnabledException" : case "com.amazonaws.configservice#OrganizationAllFeaturesNotEnabledException" : response = { ... ( await deserializeAws_json1_1OrganizationAllFeaturesNotEnabledExceptionResponse ( 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_1PutConfigurationRecorderCommand = async ( output , context ) : Promise < PutConfigurationRecorderCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutConfigurationRecorderCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutConfigurationRecorderCommandError = async ( output , context ) : Promise < PutConfigurationRecorderCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidConfigurationRecorderNameException" : case "com.amazonaws.configservice#InvalidConfigurationRecorderNameException" : response = { ... ( await deserializeAws_json1_1InvalidConfigurationRecorderNameExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidRecordingGroupException" : case "com.amazonaws.configservice#InvalidRecordingGroupException" : response = { ... ( await deserializeAws_json1_1InvalidRecordingGroupExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidRoleException" : case "com.amazonaws.configservice#InvalidRoleException" : response = { ... ( await deserializeAws_json1_1InvalidRoleExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "MaxNumberOfConfigurationRecordersExceededException" : case "com.amazonaws.configservice#MaxNumberOfConfigurationRecordersExceededException" : response = { ... ( await deserializeAws_json1_1MaxNumberOfConfigurationRecordersExceededExceptionResponse ( 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_1PutConformancePackCommand = async ( output , context ) : Promise < PutConformancePackCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutConformancePackCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1PutConformancePackResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutConformancePackCommandError = async ( output , context ) : Promise < PutConformancePackCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ConformancePackTemplateValidationException" : case "com.amazonaws.configservice#ConformancePackTemplateValidationException" : response = { ... ( await deserializeAws_json1_1ConformancePackTemplateValidationExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InsufficientPermissionsException" : case "com.amazonaws.configservice#InsufficientPermissionsException" : response = { ... ( await deserializeAws_json1_1InsufficientPermissionsExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "MaxNumberOfConformancePacksExceededException" : case "com.amazonaws.configservice#MaxNumberOfConformancePacksExceededException" : response = { ... ( await deserializeAws_json1_1MaxNumberOfConformancePacksExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceInUseException" : case "com.amazonaws.configservice#ResourceInUseException" : response = { ... ( await deserializeAws_json1_1ResourceInUseExceptionResponse ( 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_1PutDeliveryChannelCommand = async ( output , context ) : Promise < PutDeliveryChannelCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutDeliveryChannelCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutDeliveryChannelCommandError = async ( output , context ) : Promise < PutDeliveryChannelCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InsufficientDeliveryPolicyException" : case "com.amazonaws.configservice#InsufficientDeliveryPolicyException" : response = { ... ( await deserializeAws_json1_1InsufficientDeliveryPolicyExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidDeliveryChannelNameException" : case "com.amazonaws.configservice#InvalidDeliveryChannelNameException" : response = { ... ( await deserializeAws_json1_1InvalidDeliveryChannelNameExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidS3KeyPrefixException" : case "com.amazonaws.configservice#InvalidS3KeyPrefixException" : response = { ... ( await deserializeAws_json1_1InvalidS3KeyPrefixExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidS3KmsKeyArnException" : case "com.amazonaws.configservice#InvalidS3KmsKeyArnException" : response = { ... ( await deserializeAws_json1_1InvalidS3KmsKeyArnExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidSNSTopicARNException" : case "com.amazonaws.configservice#InvalidSNSTopicARNException" : response = { ... ( await deserializeAws_json1_1InvalidSNSTopicARNExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "MaxNumberOfDeliveryChannelsExceededException" : case "com.amazonaws.configservice#MaxNumberOfDeliveryChannelsExceededException" : response = { ... ( await deserializeAws_json1_1MaxNumberOfDeliveryChannelsExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoAvailableConfigurationRecorderException" : case "com.amazonaws.configservice#NoAvailableConfigurationRecorderException" : response = { ... ( await deserializeAws_json1_1NoAvailableConfigurationRecorderExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchBucketException" : case "com.amazonaws.configservice#NoSuchBucketException" : response = { ... ( await deserializeAws_json1_1NoSuchBucketExceptionResponse ( 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_1PutEvaluationsCommand = async ( output , context ) : Promise < PutEvaluationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutEvaluationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1PutEvaluationsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutEvaluationsCommandError = async ( output , context ) : Promise < PutEvaluationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidResultTokenException" : case "com.amazonaws.configservice#InvalidResultTokenException" : response = { ... ( await deserializeAws_json1_1InvalidResultTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigRuleException" : case "com.amazonaws.configservice#NoSuchConfigRuleException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigRuleExceptionResponse ( 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_1PutExternalEvaluationCommand = async ( output , context ) : Promise < PutExternalEvaluationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutExternalEvaluationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1PutExternalEvaluationResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutExternalEvaluationCommandError = async ( output , context ) : Promise < PutExternalEvaluationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigRuleException" : case "com.amazonaws.configservice#NoSuchConfigRuleException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigRuleExceptionResponse ( 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_1PutOrganizationConfigRuleCommand = async ( output , context ) : Promise < PutOrganizationConfigRuleCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutOrganizationConfigRuleCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1PutOrganizationConfigRuleResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutOrganizationConfigRuleCommandError = async ( output , context ) : Promise < PutOrganizationConfigRuleCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InsufficientPermissionsException" : case "com.amazonaws.configservice#InsufficientPermissionsException" : response = { ... ( await deserializeAws_json1_1InsufficientPermissionsExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "MaxNumberOfOrganizationConfigRulesExceededException" : case "com.amazonaws.configservice#MaxNumberOfOrganizationConfigRulesExceededException" : response = { ... ( await deserializeAws_json1_1MaxNumberOfOrganizationConfigRulesExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoAvailableOrganizationException" : case "com.amazonaws.configservice#NoAvailableOrganizationException" : response = { ... ( await deserializeAws_json1_1NoAvailableOrganizationExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OrganizationAccessDeniedException" : case "com.amazonaws.configservice#OrganizationAccessDeniedException" : response = { ... ( await deserializeAws_json1_1OrganizationAccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OrganizationAllFeaturesNotEnabledException" : case "com.amazonaws.configservice#OrganizationAllFeaturesNotEnabledException" : response = { ... ( await deserializeAws_json1_1OrganizationAllFeaturesNotEnabledExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceInUseException" : case "com.amazonaws.configservice#ResourceInUseException" : response = { ... ( await deserializeAws_json1_1ResourceInUseExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1PutOrganizationConformancePackCommand = async ( output , context ) : Promise < PutOrganizationConformancePackCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutOrganizationConformancePackCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1PutOrganizationConformancePackResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutOrganizationConformancePackCommandError = async ( output , context ) : Promise < PutOrganizationConformancePackCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InsufficientPermissionsException" : case "com.amazonaws.configservice#InsufficientPermissionsException" : response = { ... ( await deserializeAws_json1_1InsufficientPermissionsExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "MaxNumberOfOrganizationConformancePacksExceededException" : case "com.amazonaws.configservice#MaxNumberOfOrganizationConformancePacksExceededException" : response = { ... ( await deserializeAws_json1_1MaxNumberOfOrganizationConformancePacksExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoAvailableOrganizationException" : case "com.amazonaws.configservice#NoAvailableOrganizationException" : response = { ... ( await deserializeAws_json1_1NoAvailableOrganizationExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OrganizationAccessDeniedException" : case "com.amazonaws.configservice#OrganizationAccessDeniedException" : response = { ... ( await deserializeAws_json1_1OrganizationAccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OrganizationAllFeaturesNotEnabledException" : case "com.amazonaws.configservice#OrganizationAllFeaturesNotEnabledException" : response = { ... ( await deserializeAws_json1_1OrganizationAllFeaturesNotEnabledExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OrganizationConformancePackTemplateValidationException" : case "com.amazonaws.configservice#OrganizationConformancePackTemplateValidationException" : response = { ... ( await deserializeAws_json1_1OrganizationConformancePackTemplateValidationExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceInUseException" : case "com.amazonaws.configservice#ResourceInUseException" : response = { ... ( await deserializeAws_json1_1ResourceInUseExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1PutRemediationConfigurationsCommand = async ( output , context ) : Promise < PutRemediationConfigurationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutRemediationConfigurationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1PutRemediationConfigurationsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutRemediationConfigurationsCommandError = async ( output , context ) : Promise < PutRemediationConfigurationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InsufficientPermissionsException" : case "com.amazonaws.configservice#InsufficientPermissionsException" : response = { ... ( await deserializeAws_json1_1InsufficientPermissionsExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( 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_1PutRemediationExceptionsCommand = async ( output , context ) : Promise < PutRemediationExceptionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutRemediationExceptionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1PutRemediationExceptionsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutRemediationExceptionsCommandError = async ( output , context ) : Promise < PutRemediationExceptionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InsufficientPermissionsException" : case "com.amazonaws.configservice#InsufficientPermissionsException" : response = { ... ( await deserializeAws_json1_1InsufficientPermissionsExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( 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_1PutResourceConfigCommand = async ( output , context ) : Promise < PutResourceConfigCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutResourceConfigCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutResourceConfigCommandError = async ( output , context ) : Promise < PutResourceConfigCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InsufficientPermissionsException" : case "com.amazonaws.configservice#InsufficientPermissionsException" : response = { ... ( await deserializeAws_json1_1InsufficientPermissionsExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "MaxActiveResourcesExceededException" : case "com.amazonaws.configservice#MaxActiveResourcesExceededException" : response = { ... ( await deserializeAws_json1_1MaxActiveResourcesExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoRunningConfigurationRecorderException" : case "com.amazonaws.configservice#NoRunningConfigurationRecorderException" : response = { ... ( await deserializeAws_json1_1NoRunningConfigurationRecorderExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1PutRetentionConfigurationCommand = async ( output , context ) : Promise < PutRetentionConfigurationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutRetentionConfigurationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1PutRetentionConfigurationResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutRetentionConfigurationCommandError = async ( output , context ) : Promise < PutRetentionConfigurationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "MaxNumberOfRetentionConfigurationsExceededException" : case "com.amazonaws.configservice#MaxNumberOfRetentionConfigurationsExceededException" : response = { ... ( await deserializeAws_json1_1MaxNumberOfRetentionConfigurationsExceededExceptionResponse ( 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_1PutStoredQueryCommand = async ( output , context ) : Promise < PutStoredQueryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutStoredQueryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1PutStoredQueryResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutStoredQueryCommandError = async ( output , context ) : Promise < PutStoredQueryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceConcurrentModificationException" : case "com.amazonaws.configservice#ResourceConcurrentModificationException" : response = { ... ( await deserializeAws_json1_1ResourceConcurrentModificationExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "TooManyTagsException" : case "com.amazonaws.configservice#TooManyTagsException" : response = { ... ( await deserializeAws_json1_1TooManyTagsExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1SelectAggregateResourceConfigCommand = async ( output , context ) : Promise < SelectAggregateResourceConfigCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1SelectAggregateResourceConfigCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1SelectAggregateResourceConfigResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1SelectAggregateResourceConfigCommandError = async ( output , context ) : Promise < SelectAggregateResourceConfigCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidExpressionException" : case "com.amazonaws.configservice#InvalidExpressionException" : response = { ... ( await deserializeAws_json1_1InvalidExpressionExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigurationAggregatorException" : case "com.amazonaws.configservice#NoSuchConfigurationAggregatorException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationAggregatorExceptionResponse ( 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_1SelectResourceConfigCommand = async ( output , context ) : Promise < SelectResourceConfigCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1SelectResourceConfigCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1SelectResourceConfigResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1SelectResourceConfigCommandError = async ( output , context ) : Promise < SelectResourceConfigCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidExpressionException" : case "com.amazonaws.configservice#InvalidExpressionException" : response = { ... ( await deserializeAws_json1_1InvalidExpressionExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidLimitException" : case "com.amazonaws.configservice#InvalidLimitException" : response = { ... ( await deserializeAws_json1_1InvalidLimitExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidNextTokenException" : case "com.amazonaws.configservice#InvalidNextTokenException" : response = { ... ( await deserializeAws_json1_1InvalidNextTokenExceptionResponse ( 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_1StartConfigRulesEvaluationCommand = async ( output , context ) : Promise < StartConfigRulesEvaluationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1StartConfigRulesEvaluationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1StartConfigRulesEvaluationResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1StartConfigRulesEvaluationCommandError = async ( output , context ) : Promise < StartConfigRulesEvaluationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.configservice#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigRuleException" : case "com.amazonaws.configservice#NoSuchConfigRuleException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigRuleExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ResourceInUseException" : case "com.amazonaws.configservice#ResourceInUseException" : response = { ... ( await deserializeAws_json1_1ResourceInUseExceptionResponse ( 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_1StartConfigurationRecorderCommand = async ( output , context ) : Promise < StartConfigurationRecorderCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1StartConfigurationRecorderCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1StartConfigurationRecorderCommandError = async ( output , context ) : Promise < StartConfigurationRecorderCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoAvailableDeliveryChannelException" : case "com.amazonaws.configservice#NoAvailableDeliveryChannelException" : response = { ... ( await deserializeAws_json1_1NoAvailableDeliveryChannelExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchConfigurationRecorderException" : case "com.amazonaws.configservice#NoSuchConfigurationRecorderException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationRecorderExceptionResponse ( 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_1StartRemediationExecutionCommand = async ( output , context ) : Promise < StartRemediationExecutionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1StartRemediationExecutionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1StartRemediationExecutionResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1StartRemediationExecutionCommandError = async ( output , context ) : Promise < StartRemediationExecutionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "InsufficientPermissionsException" : case "com.amazonaws.configservice#InsufficientPermissionsException" : response = { ... ( await deserializeAws_json1_1InsufficientPermissionsExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidParameterValueException" : case "com.amazonaws.configservice#InvalidParameterValueException" : response = { ... ( await deserializeAws_json1_1InvalidParameterValueExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NoSuchRemediationConfigurationException" : case "com.amazonaws.configservice#NoSuchRemediationConfigurationException" : response = { ... ( await deserializeAws_json1_1NoSuchRemediationConfigurationExceptionResponse ( 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_1StopConfigurationRecorderCommand = async ( output , context ) : Promise < StopConfigurationRecorderCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1StopConfigurationRecorderCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1StopConfigurationRecorderCommandError = async ( output , context ) : Promise < StopConfigurationRecorderCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "NoSuchConfigurationRecorderException" : case "com.amazonaws.configservice#NoSuchConfigurationRecorderException" : response = { ... ( await deserializeAws_json1_1NoSuchConfigurationRecorderExceptionResponse ( 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_1TagResourceCommand = async ( output , context ) : Promise < TagResourceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1TagResourceCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1TagResourceCommandError = async ( output , context ) : Promise < TagResourceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundException" : case "com.amazonaws.configservice#ResourceNotFoundException" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "TooManyTagsException" : case "com.amazonaws.configservice#TooManyTagsException" : response = { ... ( await deserializeAws_json1_1TooManyTagsExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1UntagResourceCommand = async ( output , context ) : Promise < UntagResourceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1UntagResourceCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1UntagResourceCommandError = async ( output , context ) : Promise < UntagResourceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "ResourceNotFoundException" : case "com.amazonaws.configservice#ResourceNotFoundException" : response = { ... ( await deserializeAws_json1_1ResourceNotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ValidationException" : case "com.amazonaws.configservice#ValidationException" : response = { ... ( await deserializeAws_json1_1ValidationExceptionResponse ( 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_1ConformancePackTemplateValidationExceptionResponse = async ( parsedOutput , context ) : Promise < ConformancePackTemplateValidationException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1ConformancePackTemplateValidationException ( body , context ) ; const contents = { name : "ConformancePackTemplateValidationException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InsufficientDeliveryPolicyExceptionResponse = async ( parsedOutput , context ) : Promise < InsufficientDeliveryPolicyException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InsufficientDeliveryPolicyException ( body , context ) ; const contents = { name : "InsufficientDeliveryPolicyException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InsufficientPermissionsExceptionResponse = async ( parsedOutput , context ) : Promise < InsufficientPermissionsException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InsufficientPermissionsException ( body , context ) ; const contents = { name : "InsufficientPermissionsException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidConfigurationRecorderNameExceptionResponse = async ( parsedOutput , context ) : Promise < InvalidConfigurationRecorderNameException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidConfigurationRecorderNameException ( body , context ) ; const contents = { name : "InvalidConfigurationRecorderNameException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidDeliveryChannelNameExceptionResponse = async ( parsedOutput , context ) : Promise < InvalidDeliveryChannelNameException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidDeliveryChannelNameException ( body , context ) ; const contents = { name : "InvalidDeliveryChannelNameException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidExpressionExceptionResponse = async ( parsedOutput , context ) : Promise < InvalidExpressionException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidExpressionException ( body , context ) ; const contents = { name : "InvalidExpressionException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidLimitExceptionResponse = async ( parsedOutput , context ) : Promise < InvalidLimitException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidLimitException ( body , context ) ; const contents = { name : "InvalidLimitException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidNextTokenExceptionResponse = async ( parsedOutput , context ) : Promise < InvalidNextTokenException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidNextTokenException ( body , context ) ; const contents = { name : "InvalidNextTokenException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidParameterValueExceptionResponse = async ( parsedOutput , context ) : Promise < InvalidParameterValueException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidParameterValueException ( body , context ) ; const contents = { name : "InvalidParameterValueException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidRecordingGroupExceptionResponse = async ( parsedOutput , context ) : Promise < InvalidRecordingGroupException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidRecordingGroupException ( body , context ) ; const contents = { name : "InvalidRecordingGroupException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidResultTokenExceptionResponse = async ( parsedOutput , context ) : Promise < InvalidResultTokenException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidResultTokenException ( body , context ) ; const contents = { name : "InvalidResultTokenException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidRoleExceptionResponse = async ( parsedOutput , context ) : Promise < InvalidRoleException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidRoleException ( body , context ) ; const contents = { name : "InvalidRoleException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidS3KeyPrefixExceptionResponse = async ( parsedOutput , context ) : Promise < InvalidS3KeyPrefixException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidS3KeyPrefixException ( body , context ) ; const contents = { name : "InvalidS3KeyPrefixException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidS3KmsKeyArnExceptionResponse = async ( parsedOutput , context ) : Promise < InvalidS3KmsKeyArnException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidS3KmsKeyArnException ( body , context ) ; const contents = { name : "InvalidS3KmsKeyArnException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidSNSTopicARNExceptionResponse = async ( parsedOutput , context ) : Promise < InvalidSNSTopicARNException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidSNSTopicARNException ( body , context ) ; const contents = { name : "InvalidSNSTopicARNException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidTimeRangeExceptionResponse = async ( parsedOutput , context ) : Promise < InvalidTimeRangeException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidTimeRangeException ( body , context ) ; const contents = { name : "InvalidTimeRangeException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1LastDeliveryChannelDeleteFailedExceptionResponse = async ( parsedOutput , context ) : Promise < LastDeliveryChannelDeleteFailedException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1LastDeliveryChannelDeleteFailedException ( body , context ) ; const contents = { name : "LastDeliveryChannelDeleteFailedException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1LimitExceededExceptionResponse = async ( parsedOutput , context ) : Promise < LimitExceededException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1LimitExceededException ( body , context ) ; const contents = { name : "LimitExceededException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1MaxActiveResourcesExceededExceptionResponse = async ( parsedOutput , context ) : Promise < MaxActiveResourcesExceededException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1MaxActiveResourcesExceededException ( body , context ) ; const contents = { name : "MaxActiveResourcesExceededException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1MaxNumberOfConfigRulesExceededExceptionResponse = async ( parsedOutput , context ) : Promise < MaxNumberOfConfigRulesExceededException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1MaxNumberOfConfigRulesExceededException ( body , context ) ; const contents = { name : "MaxNumberOfConfigRulesExceededException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1MaxNumberOfConfigurationRecordersExceededExceptionResponse = async ( parsedOutput , context ) : Promise < MaxNumberOfConfigurationRecordersExceededException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1MaxNumberOfConfigurationRecordersExceededException ( body , context ) ; const contents = { name : "MaxNumberOfConfigurationRecordersExceededException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1MaxNumberOfConformancePacksExceededExceptionResponse = async ( parsedOutput , context ) : Promise < MaxNumberOfConformancePacksExceededException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1MaxNumberOfConformancePacksExceededException ( body , context ) ; const contents = { name : "MaxNumberOfConformancePacksExceededException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1MaxNumberOfDeliveryChannelsExceededExceptionResponse = async ( parsedOutput , context ) : Promise < MaxNumberOfDeliveryChannelsExceededException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1MaxNumberOfDeliveryChannelsExceededException ( body , context ) ; const contents = { name : "MaxNumberOfDeliveryChannelsExceededException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1MaxNumberOfOrganizationConfigRulesExceededExceptionResponse = async ( parsedOutput , context ) : Promise < MaxNumberOfOrganizationConfigRulesExceededException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1MaxNumberOfOrganizationConfigRulesExceededException ( body , context ) ; const contents = { name : "MaxNumberOfOrganizationConfigRulesExceededException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1MaxNumberOfOrganizationConformancePacksExceededExceptionResponse = async ( parsedOutput , context ) : Promise < MaxNumberOfOrganizationConformancePacksExceededException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1MaxNumberOfOrganizationConformancePacksExceededException ( body , context ) ; const contents = { name : "MaxNumberOfOrganizationConformancePacksExceededException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1MaxNumberOfRetentionConfigurationsExceededExceptionResponse = async ( parsedOutput , context ) : Promise < MaxNumberOfRetentionConfigurationsExceededException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1MaxNumberOfRetentionConfigurationsExceededException ( body , context ) ; const contents = { name : "MaxNumberOfRetentionConfigurationsExceededException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NoAvailableConfigurationRecorderExceptionResponse = async ( parsedOutput , context ) : Promise < NoAvailableConfigurationRecorderException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NoAvailableConfigurationRecorderException ( body , context ) ; const contents = { name : "NoAvailableConfigurationRecorderException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NoAvailableDeliveryChannelExceptionResponse = async ( parsedOutput , context ) : Promise < NoAvailableDeliveryChannelException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NoAvailableDeliveryChannelException ( body , context ) ; const contents = { name : "NoAvailableDeliveryChannelException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NoAvailableOrganizationExceptionResponse = async ( parsedOutput , context ) : Promise < NoAvailableOrganizationException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NoAvailableOrganizationException ( body , context ) ; const contents = { name : "NoAvailableOrganizationException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NoRunningConfigurationRecorderExceptionResponse = async ( parsedOutput , context ) : Promise < NoRunningConfigurationRecorderException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NoRunningConfigurationRecorderException ( body , context ) ; const contents = { name : "NoRunningConfigurationRecorderException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NoSuchBucketExceptionResponse = async ( parsedOutput , context ) : Promise < NoSuchBucketException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NoSuchBucketException ( body , context ) ; const contents = { name : "NoSuchBucketException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NoSuchConfigRuleExceptionResponse = async ( parsedOutput , context ) : Promise < NoSuchConfigRuleException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NoSuchConfigRuleException ( body , context ) ; const contents = { name : "NoSuchConfigRuleException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NoSuchConfigRuleInConformancePackExceptionResponse = async ( parsedOutput , context ) : Promise < NoSuchConfigRuleInConformancePackException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NoSuchConfigRuleInConformancePackException ( body , context ) ; const contents = { name : "NoSuchConfigRuleInConformancePackException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NoSuchConfigurationAggregatorExceptionResponse = async ( parsedOutput , context ) : Promise < NoSuchConfigurationAggregatorException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NoSuchConfigurationAggregatorException ( body , context ) ; const contents = { name : "NoSuchConfigurationAggregatorException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NoSuchConfigurationRecorderExceptionResponse = async ( parsedOutput , context ) : Promise < NoSuchConfigurationRecorderException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NoSuchConfigurationRecorderException ( body , context ) ; const contents = { name : "NoSuchConfigurationRecorderException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NoSuchConformancePackExceptionResponse = async ( parsedOutput , context ) : Promise < NoSuchConformancePackException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NoSuchConformancePackException ( body , context ) ; const contents = { name : "NoSuchConformancePackException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NoSuchDeliveryChannelExceptionResponse = async ( parsedOutput , context ) : Promise < NoSuchDeliveryChannelException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NoSuchDeliveryChannelException ( body , context ) ; const contents = { name : "NoSuchDeliveryChannelException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NoSuchOrganizationConfigRuleExceptionResponse = async ( parsedOutput , context ) : Promise < NoSuchOrganizationConfigRuleException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NoSuchOrganizationConfigRuleException ( body , context ) ; const contents = { name : "NoSuchOrganizationConfigRuleException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NoSuchOrganizationConformancePackExceptionResponse = async ( parsedOutput , context ) : Promise < NoSuchOrganizationConformancePackException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NoSuchOrganizationConformancePackException ( body , context ) ; const contents = { name : "NoSuchOrganizationConformancePackException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NoSuchRemediationConfigurationExceptionResponse = async ( parsedOutput , context ) : Promise < NoSuchRemediationConfigurationException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NoSuchRemediationConfigurationException ( body , context ) ; const contents = { name : "NoSuchRemediationConfigurationException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NoSuchRemediationExceptionExceptionResponse = async ( parsedOutput , context ) : Promise < NoSuchRemediationExceptionException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NoSuchRemediationExceptionException ( body , context ) ; const contents = { name : "NoSuchRemediationExceptionException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NoSuchRetentionConfigurationExceptionResponse = async ( parsedOutput , context ) : Promise < NoSuchRetentionConfigurationException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NoSuchRetentionConfigurationException ( body , context ) ; const contents = { name : "NoSuchRetentionConfigurationException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1OrganizationAccessDeniedExceptionResponse = async ( parsedOutput , context ) : Promise < OrganizationAccessDeniedException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1OrganizationAccessDeniedException ( body , context ) ; const contents = { name : "OrganizationAccessDeniedException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1OrganizationAllFeaturesNotEnabledExceptionResponse = async ( parsedOutput , context ) : Promise < OrganizationAllFeaturesNotEnabledException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1OrganizationAllFeaturesNotEnabledException ( body , context ) ; const contents = { name : "OrganizationAllFeaturesNotEnabledException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1OrganizationConformancePackTemplateValidationExceptionResponse = async ( parsedOutput , context ) : Promise < OrganizationConformancePackTemplateValidationException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1OrganizationConformancePackTemplateValidationException ( body , context ) ; const contents = { name : "OrganizationConformancePackTemplateValidationException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1OversizedConfigurationItemExceptionResponse = async ( parsedOutput , context ) : Promise < OversizedConfigurationItemException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1OversizedConfigurationItemException ( body , context ) ; const contents = { name : "OversizedConfigurationItemException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1RemediationInProgressExceptionResponse = async ( parsedOutput , context ) : Promise < RemediationInProgressException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1RemediationInProgressException ( body , context ) ; const contents = { name : "RemediationInProgressException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1ResourceConcurrentModificationExceptionResponse = async ( parsedOutput , context ) : Promise < ResourceConcurrentModificationException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1ResourceConcurrentModificationException ( body , context ) ; const contents = { name : "ResourceConcurrentModificationException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1ResourceInUseExceptionResponse = async ( parsedOutput , context ) : Promise < ResourceInUseException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1ResourceInUseException ( body , context ) ; const contents = { name : "ResourceInUseException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1ResourceNotDiscoveredExceptionResponse = async ( parsedOutput , context ) : Promise < ResourceNotDiscoveredException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1ResourceNotDiscoveredException ( body , context ) ; const contents = { name : "ResourceNotDiscoveredException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async ( parsedOutput , context ) : Promise < ResourceNotFoundException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1ResourceNotFoundException ( body , context ) ; const contents = { name : "ResourceNotFoundException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1TooManyTagsExceptionResponse = async ( parsedOutput , context ) : Promise < TooManyTagsException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1TooManyTagsException ( body , context ) ; const contents = { name : "TooManyTagsException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1ValidationExceptionResponse = async ( parsedOutput , context ) : Promise < ValidationException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1ValidationException ( body , context ) ; const contents = { name : "ValidationException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const serializeAws_json1_1AccountAggregationSource = ( input , context ) : any => { return { ... ( input . AccountIds !== undefined && input . AccountIds !== null && { AccountIds : serializeAws_json1_1AccountAggregationSourceAccountList ( input . AccountIds , context ) , } ) , ... ( input . AllAwsRegions !== undefined && input . AllAwsRegions !== null && { AllAwsRegions : input . AllAwsRegions } ) , ... ( input . AwsRegions !== undefined && input . AwsRegions !== null && { AwsRegions : serializeAws_json1_1AggregatorRegionList ( input . AwsRegions , context ) } ) , } ; } ; const serializeAws_json1_1AccountAggregationSourceAccountList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1AccountAggregationSourceList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1AccountAggregationSource ( entry , context ) ; } ) ; } ; const serializeAws_json1_1AggregateConformancePackComplianceFilters = ( input , context ) : any => { return { ... ( input . AccountId !== undefined && input . AccountId !== null && { AccountId : input . AccountId } ) , ... ( input . AwsRegion !== undefined && input . AwsRegion !== null && { AwsRegion : input . AwsRegion } ) , ... ( input . ComplianceType !== undefined && input . ComplianceType !== null && { ComplianceType : input . ComplianceType } ) , ... ( input . ConformancePackName !== undefined && input . ConformancePackName !== null && { ConformancePackName : input . ConformancePackName } ) , } ; } ; const serializeAws_json1_1AggregateConformancePackComplianceSummaryFilters = ( input , context ) : any => { return { ... ( input . AccountId !== undefined && input . AccountId !== null && { AccountId : input . AccountId } ) , ... ( input . AwsRegion !== undefined && input . AwsRegion !== null && { AwsRegion : input . AwsRegion } ) , } ; } ; const serializeAws_json1_1AggregatedSourceStatusTypeList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1AggregateResourceIdentifier = ( input , context ) : any => { return { ... ( input . ResourceId !== undefined && input . ResourceId !== null && { ResourceId : input . ResourceId } ) , ... ( input . ResourceName !== undefined && input . ResourceName !== null && { ResourceName : input . ResourceName } ) , ... ( input . ResourceType !== undefined && input . ResourceType !== null && { ResourceType : input . ResourceType } ) , ... ( input . SourceAccountId !== undefined && input . SourceAccountId !== null && { SourceAccountId : input . SourceAccountId } ) , ... ( input . SourceRegion !== undefined && input . SourceRegion !== null && { SourceRegion : input . SourceRegion } ) , } ; } ; const serializeAws_json1_1AggregatorRegionList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1BatchGetAggregateResourceConfigRequest = ( input , context ) : any => { return { ... ( input . ConfigurationAggregatorName !== undefined && input . ConfigurationAggregatorName !== null && { ConfigurationAggregatorName : input . ConfigurationAggregatorName } ) , ... ( input . ResourceIdentifiers !== undefined && input . ResourceIdentifiers !== null && { ResourceIdentifiers : serializeAws_json1_1ResourceIdentifiersList ( input . ResourceIdentifiers , context ) , } ) , } ; } ; const serializeAws_json1_1BatchGetResourceConfigRequest = ( input , context ) : any => { return { ... ( input . resourceKeys !== undefined && input . resourceKeys !== null && { resourceKeys : serializeAws_json1_1ResourceKeys ( input . resourceKeys , context ) } ) , } ; } ; const serializeAws_json1_1ComplianceResourceTypes = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1ComplianceTypes = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1ConfigRule = ( input , context ) : any => { return { ... ( input . ConfigRuleArn !== undefined && input . ConfigRuleArn !== null && { ConfigRuleArn : input . ConfigRuleArn } ) , ... ( input . ConfigRuleId !== undefined && input . ConfigRuleId !== null && { ConfigRuleId : input . ConfigRuleId } ) , ... ( input . ConfigRuleName !== undefined && input . ConfigRuleName !== null && { ConfigRuleName : input . ConfigRuleName } ) , ... ( input . ConfigRuleState !== undefined && input . ConfigRuleState !== null && { ConfigRuleState : input . ConfigRuleState } ) , ... ( input . CreatedBy !== undefined && input . CreatedBy !== null && { CreatedBy : input . CreatedBy } ) , ... ( input . Description !== undefined && input . Description !== null && { Description : input . Description } ) , ... ( input . InputParameters !== undefined && input . InputParameters !== null && { InputParameters : input . InputParameters } ) , ... ( input . MaximumExecutionFrequency !== undefined && input . MaximumExecutionFrequency !== null && { MaximumExecutionFrequency : input . MaximumExecutionFrequency } ) , ... ( input . Scope !== undefined && input . Scope !== null && { Scope : serializeAws_json1_1Scope ( input . Scope , context ) } ) , ... ( input . Source !== undefined && input . Source !== null && { Source : serializeAws_json1_1Source ( input . Source , context ) } ) , } ; } ; const serializeAws_json1_1ConfigRuleComplianceFilters = ( input , context ) : any => { return { ... ( input . AccountId !== undefined && input . AccountId !== null && { AccountId : input . AccountId } ) , ... ( input . AwsRegion !== undefined && input . AwsRegion !== null && { AwsRegion : input . AwsRegion } ) , ... ( input . ComplianceType !== undefined && input . ComplianceType !== null && { ComplianceType : input . ComplianceType } ) , ... ( input . ConfigRuleName !== undefined && input . ConfigRuleName !== null && { ConfigRuleName : input . ConfigRuleName } ) , } ; } ; const serializeAws_json1_1ConfigRuleComplianceSummaryFilters = ( input , context ) : any => { return { ... ( input . AccountId !== undefined && input . AccountId !== null && { AccountId : input . AccountId } ) , ... ( input . AwsRegion !== undefined && input . AwsRegion !== null && { AwsRegion : input . AwsRegion } ) , } ; } ; const serializeAws_json1_1ConfigRuleNames = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1ConfigSnapshotDeliveryProperties = ( input , context ) : any => { return { ... ( input . deliveryFrequency !== undefined && input . deliveryFrequency !== null && { deliveryFrequency : input . deliveryFrequency } ) , } ; } ; const serializeAws_json1_1ConfigurationAggregatorNameList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1ConfigurationRecorder = ( input , context ) : any => { return { ... ( input . name !== undefined && input . name !== null && { name : input . name } ) , ... ( input . recordingGroup !== undefined && input . recordingGroup !== null && { recordingGroup : serializeAws_json1_1RecordingGroup ( input . recordingGroup , context ) , } ) , ... ( input . roleARN !== undefined && input . roleARN !== null && { roleARN : input . roleARN } ) , } ; } ; const serializeAws_json1_1ConfigurationRecorderNameList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1ConformancePackComplianceFilters = ( input , context ) : any => { return { ... ( input . ComplianceType !== undefined && input . ComplianceType !== null && { ComplianceType : input . ComplianceType } ) , ... ( input . ConfigRuleNames !== undefined && input . ConfigRuleNames !== null && { ConfigRuleNames : serializeAws_json1_1ConformancePackConfigRuleNames ( input . ConfigRuleNames , context ) , } ) , } ; } ; const serializeAws_json1_1ConformancePackComplianceResourceIds = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1ConformancePackConfigRuleNames = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1ConformancePackEvaluationFilters = ( input , context ) : any => { return { ... ( input . ComplianceType !== undefined && input . ComplianceType !== null && { ComplianceType : input . ComplianceType } ) , ... ( input . ConfigRuleNames !== undefined && input . ConfigRuleNames !== null && { ConfigRuleNames : serializeAws_json1_1ConformancePackConfigRuleNames ( input . ConfigRuleNames , context ) , } ) , ... ( input . ResourceIds !== undefined && input . ResourceIds !== null && { ResourceIds : serializeAws_json1_1ConformancePackComplianceResourceIds ( input . ResourceIds , context ) , } ) , ... ( input . ResourceType !== undefined && input . ResourceType !== null && { ResourceType : input . ResourceType } ) , } ; } ; const serializeAws_json1_1ConformancePackInputParameter = ( input , context ) : any => { return { ... ( input . ParameterName !== undefined && input . ParameterName !== null && { ParameterName : input . ParameterName } ) , ... ( input . ParameterValue !== undefined && input . ParameterValue !== null && { ParameterValue : input . ParameterValue } ) , } ; } ; const serializeAws_json1_1ConformancePackInputParameters = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1ConformancePackInputParameter ( entry , context ) ; } ) ; } ; const serializeAws_json1_1ConformancePackNamesList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1ConformancePackNamesToSummarizeList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1DeleteAggregationAuthorizationRequest = ( input , context ) : any => { return { ... ( input . AuthorizedAccountId !== undefined && input . AuthorizedAccountId !== null && { AuthorizedAccountId : input . AuthorizedAccountId } ) , ... ( input . AuthorizedAwsRegion !== undefined && input . AuthorizedAwsRegion !== null && { AuthorizedAwsRegion : input . AuthorizedAwsRegion } ) , } ; } ; const serializeAws_json1_1DeleteConfigRuleRequest = ( input , context ) : any => { return { ... ( input . ConfigRuleName !== undefined && input . ConfigRuleName !== null && { ConfigRuleName : input . ConfigRuleName } ) , } ; } ; const serializeAws_json1_1DeleteConfigurationAggregatorRequest = ( input , context ) : any => { return { ... ( input . ConfigurationAggregatorName !== undefined && input . ConfigurationAggregatorName !== null && { ConfigurationAggregatorName : input . ConfigurationAggregatorName } ) , } ; } ; const serializeAws_json1_1DeleteConfigurationRecorderRequest = ( input , context ) : any => { return { ... ( input . ConfigurationRecorderName !== undefined && input . ConfigurationRecorderName !== null && { ConfigurationRecorderName : input . ConfigurationRecorderName } ) , } ; } ; const serializeAws_json1_1DeleteConformancePackRequest = ( input , context ) : any => { return { ... ( input . ConformancePackName !== undefined && input . ConformancePackName !== null && { ConformancePackName : input . ConformancePackName } ) , } ; } ; const serializeAws_json1_1DeleteDeliveryChannelRequest = ( input , context ) : any => { return { ... ( input . DeliveryChannelName !== undefined && input . DeliveryChannelName !== null && { DeliveryChannelName : input . DeliveryChannelName } ) , } ; } ; const serializeAws_json1_1DeleteEvaluationResultsRequest = ( input , context ) : any => { return { ... ( input . ConfigRuleName !== undefined && input . ConfigRuleName !== null && { ConfigRuleName : input . ConfigRuleName } ) , } ; } ; const serializeAws_json1_1DeleteOrganizationConfigRuleRequest = ( input , context ) : any => { return { ... ( input . OrganizationConfigRuleName !== undefined && input . OrganizationConfigRuleName !== null && { OrganizationConfigRuleName : input . OrganizationConfigRuleName } ) , } ; } ; const serializeAws_json1_1DeleteOrganizationConformancePackRequest = ( input , context ) : any => { return { ... ( input . OrganizationConformancePackName !== undefined && input . OrganizationConformancePackName !== null && { OrganizationConformancePackName : input . OrganizationConformancePackName , } ) , } ; } ; const serializeAws_json1_1DeletePendingAggregationRequestRequest = ( input , context ) : any => { return { ... ( input . RequesterAccountId !== undefined && input . RequesterAccountId !== null && { RequesterAccountId : input . RequesterAccountId } ) , ... ( input . RequesterAwsRegion !== undefined && input . RequesterAwsRegion !== null && { RequesterAwsRegion : input . RequesterAwsRegion } ) , } ; } ; const serializeAws_json1_1DeleteRemediationConfigurationRequest = ( input , context ) : any => { return { ... ( input . ConfigRuleName !== undefined && input . ConfigRuleName !== null && { ConfigRuleName : input . ConfigRuleName } ) , ... ( input . ResourceType !== undefined && input . ResourceType !== null && { ResourceType : input . ResourceType } ) , } ; } ; const serializeAws_json1_1DeleteRemediationExceptionsRequest = ( input , context ) : any => { return { ... ( input . ConfigRuleName !== undefined && input . ConfigRuleName !== null && { ConfigRuleName : input . ConfigRuleName } ) , ... ( input . ResourceKeys !== undefined && input . ResourceKeys !== null && { ResourceKeys : serializeAws_json1_1RemediationExceptionResourceKeys ( input . ResourceKeys , context ) , } ) , } ; } ; const serializeAws_json1_1DeleteResourceConfigRequest = ( input , context ) : any => { return { ... ( input . ResourceId !== undefined && input . ResourceId !== null && { ResourceId : input . ResourceId } ) , ... ( input . ResourceType !== undefined && input . ResourceType !== null && { ResourceType : input . ResourceType } ) , } ; } ; const serializeAws_json1_1DeleteRetentionConfigurationRequest = ( input , context ) : any => { return { ... ( input . RetentionConfigurationName !== undefined && input . RetentionConfigurationName !== null && { RetentionConfigurationName : input . RetentionConfigurationName } ) , } ; } ; const serializeAws_json1_1DeleteStoredQueryRequest = ( input , context ) : any => { return { ... ( input . QueryName !== undefined && input . QueryName !== null && { QueryName : input . QueryName } ) , } ; } ; const serializeAws_json1_1DeliverConfigSnapshotRequest = ( input , context ) : any => { return { ... ( input . deliveryChannelName !== undefined && input . deliveryChannelName !== null && { deliveryChannelName : input . deliveryChannelName } ) , } ; } ; const serializeAws_json1_1DeliveryChannel = ( input , context ) : any => { return { ... ( input . configSnapshotDeliveryProperties !== undefined && input . configSnapshotDeliveryProperties !== null && { configSnapshotDeliveryProperties : serializeAws_json1_1ConfigSnapshotDeliveryProperties ( input . configSnapshotDeliveryProperties , context ) , } ) , ... ( input . name !== undefined && input . name !== null && { name : input . name } ) , ... ( input . s3BucketName !== undefined && input . s3BucketName !== null && { s3BucketName : input . s3BucketName } ) , ... ( input . s3KeyPrefix !== undefined && input . s3KeyPrefix !== null && { s3KeyPrefix : input . s3KeyPrefix } ) , ... ( input . s3KmsKeyArn !== undefined && input . s3KmsKeyArn !== null && { s3KmsKeyArn : input . s3KmsKeyArn } ) , ... ( input . snsTopicARN !== undefined && input . snsTopicARN !== null && { snsTopicARN : input . snsTopicARN } ) , } ; } ; const serializeAws_json1_1DeliveryChannelNameList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1DescribeAggregateComplianceByConfigRulesRequest = ( input , context ) : any => { return { ... ( input . ConfigurationAggregatorName !== undefined && input . ConfigurationAggregatorName !== null && { ConfigurationAggregatorName : input . ConfigurationAggregatorName } ) , ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1ConfigRuleComplianceFilters ( input . Filters , context ) } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1DescribeAggregateComplianceByConformancePacksRequest = ( input , context ) : any => { return { ... ( input . ConfigurationAggregatorName !== undefined && input . ConfigurationAggregatorName !== null && { ConfigurationAggregatorName : input . ConfigurationAggregatorName } ) , ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1AggregateConformancePackComplianceFilters ( input . Filters , context ) , } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1DescribeAggregationAuthorizationsRequest = ( input , context ) : any => { return { ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1DescribeComplianceByConfigRuleRequest = ( input , context ) : any => { return { ... ( input . ComplianceTypes !== undefined && input . ComplianceTypes !== null && { ComplianceTypes : serializeAws_json1_1ComplianceTypes ( input . ComplianceTypes , context ) , } ) , ... ( input . ConfigRuleNames !== undefined && input . ConfigRuleNames !== null && { ConfigRuleNames : serializeAws_json1_1ConfigRuleNames ( input . ConfigRuleNames , context ) , } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1DescribeComplianceByResourceRequest = ( input , context ) : any => { return { ... ( input . ComplianceTypes !== undefined && input . ComplianceTypes !== null && { ComplianceTypes : serializeAws_json1_1ComplianceTypes ( input . ComplianceTypes , context ) , } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . ResourceId !== undefined && input . ResourceId !== null && { ResourceId : input . ResourceId } ) , ... ( input . ResourceType !== undefined && input . ResourceType !== null && { ResourceType : input . ResourceType } ) , } ; } ; const serializeAws_json1_1DescribeConfigRuleEvaluationStatusRequest = ( input , context ) : any => { return { ... ( input . ConfigRuleNames !== undefined && input . ConfigRuleNames !== null && { ConfigRuleNames : serializeAws_json1_1ConfigRuleNames ( input . ConfigRuleNames , context ) , } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1DescribeConfigRulesRequest = ( input , context ) : any => { return { ... ( input . ConfigRuleNames !== undefined && input . ConfigRuleNames !== null && { ConfigRuleNames : serializeAws_json1_1ConfigRuleNames ( input . ConfigRuleNames , context ) , } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1DescribeConfigurationAggregatorSourcesStatusRequest = ( input , context ) : any => { return { ... ( input . ConfigurationAggregatorName !== undefined && input . ConfigurationAggregatorName !== null && { ConfigurationAggregatorName : input . ConfigurationAggregatorName } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . UpdateStatus !== undefined && input . UpdateStatus !== null && { UpdateStatus : serializeAws_json1_1AggregatedSourceStatusTypeList ( input . UpdateStatus , context ) , } ) , } ; } ; const serializeAws_json1_1DescribeConfigurationAggregatorsRequest = ( input , context ) : any => { return { ... ( input . ConfigurationAggregatorNames !== undefined && input . ConfigurationAggregatorNames !== null && { ConfigurationAggregatorNames : serializeAws_json1_1ConfigurationAggregatorNameList ( input . ConfigurationAggregatorNames , context ) , } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1DescribeConfigurationRecordersRequest = ( input , context ) : any => { return { ... ( input . ConfigurationRecorderNames !== undefined && input . ConfigurationRecorderNames !== null && { ConfigurationRecorderNames : serializeAws_json1_1ConfigurationRecorderNameList ( input . ConfigurationRecorderNames , context ) , } ) , } ; } ; const serializeAws_json1_1DescribeConfigurationRecorderStatusRequest = ( input , context ) : any => { return { ... ( input . ConfigurationRecorderNames !== undefined && input . ConfigurationRecorderNames !== null && { ConfigurationRecorderNames : serializeAws_json1_1ConfigurationRecorderNameList ( input . ConfigurationRecorderNames , context ) , } ) , } ; } ; const serializeAws_json1_1DescribeConformancePackComplianceRequest = ( input , context ) : any => { return { ... ( input . ConformancePackName !== undefined && input . ConformancePackName !== null && { ConformancePackName : input . ConformancePackName } ) , ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1ConformancePackComplianceFilters ( input . Filters , context ) , } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1DescribeConformancePacksRequest = ( input , context ) : any => { return { ... ( input . ConformancePackNames !== undefined && input . ConformancePackNames !== null && { ConformancePackNames : serializeAws_json1_1ConformancePackNamesList ( input . ConformancePackNames , context ) , } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1DescribeConformancePackStatusRequest = ( input , context ) : any => { return { ... ( input . ConformancePackNames !== undefined && input . ConformancePackNames !== null && { ConformancePackNames : serializeAws_json1_1ConformancePackNamesList ( input . ConformancePackNames , context ) , } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1DescribeDeliveryChannelsRequest = ( input , context ) : any => { return { ... ( input . DeliveryChannelNames !== undefined && input . DeliveryChannelNames !== null && { DeliveryChannelNames : serializeAws_json1_1DeliveryChannelNameList ( input . DeliveryChannelNames , context ) , } ) , } ; } ; const serializeAws_json1_1DescribeDeliveryChannelStatusRequest = ( input , context ) : any => { return { ... ( input . DeliveryChannelNames !== undefined && input . DeliveryChannelNames !== null && { DeliveryChannelNames : serializeAws_json1_1DeliveryChannelNameList ( input . DeliveryChannelNames , context ) , } ) , } ; } ; const serializeAws_json1_1DescribeOrganizationConfigRulesRequest = ( input , context ) : any => { return { ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . OrganizationConfigRuleNames !== undefined && input . OrganizationConfigRuleNames !== null && { OrganizationConfigRuleNames : serializeAws_json1_1OrganizationConfigRuleNames ( input . OrganizationConfigRuleNames , context ) , } ) , } ; } ; const serializeAws_json1_1DescribeOrganizationConfigRuleStatusesRequest = ( input , context ) : any => { return { ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . OrganizationConfigRuleNames !== undefined && input . OrganizationConfigRuleNames !== null && { OrganizationConfigRuleNames : serializeAws_json1_1OrganizationConfigRuleNames ( input . OrganizationConfigRuleNames , context ) , } ) , } ; } ; const serializeAws_json1_1DescribeOrganizationConformancePacksRequest = ( input , context ) : any => { return { ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . OrganizationConformancePackNames !== undefined && input . OrganizationConformancePackNames !== null && { OrganizationConformancePackNames : serializeAws_json1_1OrganizationConformancePackNames ( input . OrganizationConformancePackNames , context ) , } ) , } ; } ; const serializeAws_json1_1DescribeOrganizationConformancePackStatusesRequest = ( input , context ) : any => { return { ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . OrganizationConformancePackNames !== undefined && input . OrganizationConformancePackNames !== null && { OrganizationConformancePackNames : serializeAws_json1_1OrganizationConformancePackNames ( input . OrganizationConformancePackNames , context ) , } ) , } ; } ; const serializeAws_json1_1DescribePendingAggregationRequestsRequest = ( input , context ) : any => { return { ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1DescribeRemediationConfigurationsRequest = ( input , context ) : any => { return { ... ( input . ConfigRuleNames !== undefined && input . ConfigRuleNames !== null && { ConfigRuleNames : serializeAws_json1_1ConfigRuleNames ( input . ConfigRuleNames , context ) , } ) , } ; } ; const serializeAws_json1_1DescribeRemediationExceptionsRequest = ( input , context ) : any => { return { ... ( input . ConfigRuleName !== undefined && input . ConfigRuleName !== null && { ConfigRuleName : input . ConfigRuleName } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . ResourceKeys !== undefined && input . ResourceKeys !== null && { ResourceKeys : serializeAws_json1_1RemediationExceptionResourceKeys ( input . ResourceKeys , context ) , } ) , } ; } ; const serializeAws_json1_1DescribeRemediationExecutionStatusRequest = ( input , context ) : any => { return { ... ( input . ConfigRuleName !== undefined && input . ConfigRuleName !== null && { ConfigRuleName : input . ConfigRuleName } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . ResourceKeys !== undefined && input . ResourceKeys !== null && { ResourceKeys : serializeAws_json1_1ResourceKeys ( input . ResourceKeys , context ) } ) , } ; } ; const serializeAws_json1_1DescribeRetentionConfigurationsRequest = ( input , context ) : any => { return { ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . RetentionConfigurationNames !== undefined && input . RetentionConfigurationNames !== null && { RetentionConfigurationNames : serializeAws_json1_1RetentionConfigurationNameList ( input . RetentionConfigurationNames , context ) , } ) , } ; } ; const serializeAws_json1_1Evaluation = ( input , context ) : any => { return { ... ( input . Annotation !== undefined && input . Annotation !== null && { Annotation : input . Annotation } ) , ... ( input . ComplianceResourceId !== undefined && input . ComplianceResourceId !== null && { ComplianceResourceId : input . ComplianceResourceId } ) , ... ( input . ComplianceResourceType !== undefined && input . ComplianceResourceType !== null && { ComplianceResourceType : input . ComplianceResourceType } ) , ... ( input . ComplianceType !== undefined && input . ComplianceType !== null && { ComplianceType : input . ComplianceType } ) , ... ( input . OrderingTimestamp !== undefined && input . OrderingTimestamp !== null && { OrderingTimestamp : Math . round ( input . OrderingTimestamp . getTime ( ) / 1000 ) } ) , } ; } ; const serializeAws_json1_1Evaluations = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1Evaluation ( entry , context ) ; } ) ; } ; const serializeAws_json1_1ExcludedAccounts = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1ExecutionControls = ( input , context ) : any => { return { ... ( input . SsmControls !== undefined && input . SsmControls !== null && { SsmControls : serializeAws_json1_1SsmControls ( input . SsmControls , context ) } ) , } ; } ; const serializeAws_json1_1ExternalEvaluation = ( input , context ) : any => { return { ... ( input . Annotation !== undefined && input . Annotation !== null && { Annotation : input . Annotation } ) , ... ( input . ComplianceResourceId !== undefined && input . ComplianceResourceId !== null && { ComplianceResourceId : input . ComplianceResourceId } ) , ... ( input . ComplianceResourceType !== undefined && input . ComplianceResourceType !== null && { ComplianceResourceType : input . ComplianceResourceType } ) , ... ( input . ComplianceType !== undefined && input . ComplianceType !== null && { ComplianceType : input . ComplianceType } ) , ... ( input . OrderingTimestamp !== undefined && input . OrderingTimestamp !== null && { OrderingTimestamp : Math . round ( input . OrderingTimestamp . getTime ( ) / 1000 ) } ) , } ; } ; const serializeAws_json1_1GetAggregateComplianceDetailsByConfigRuleRequest = ( input , context ) : any => { return { ... ( input . AccountId !== undefined && input . AccountId !== null && { AccountId : input . AccountId } ) , ... ( input . AwsRegion !== undefined && input . AwsRegion !== null && { AwsRegion : input . AwsRegion } ) , ... ( input . ComplianceType !== undefined && input . ComplianceType !== null && { ComplianceType : input . ComplianceType } ) , ... ( input . ConfigRuleName !== undefined && input . ConfigRuleName !== null && { ConfigRuleName : input . ConfigRuleName } ) , ... ( input . ConfigurationAggregatorName !== undefined && input . ConfigurationAggregatorName !== null && { ConfigurationAggregatorName : input . ConfigurationAggregatorName } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1GetAggregateConfigRuleComplianceSummaryRequest = ( input , context ) : any => { return { ... ( input . ConfigurationAggregatorName !== undefined && input . ConfigurationAggregatorName !== null && { ConfigurationAggregatorName : input . ConfigurationAggregatorName } ) , ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1ConfigRuleComplianceSummaryFilters ( input . Filters , context ) , } ) , ... ( input . GroupByKey !== undefined && input . GroupByKey !== null && { GroupByKey : input . GroupByKey } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1GetAggregateConformancePackComplianceSummaryRequest = ( input , context ) : any => { return { ... ( input . ConfigurationAggregatorName !== undefined && input . ConfigurationAggregatorName !== null && { ConfigurationAggregatorName : input . ConfigurationAggregatorName } ) , ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1AggregateConformancePackComplianceSummaryFilters ( input . Filters , context ) , } ) , ... ( input . GroupByKey !== undefined && input . GroupByKey !== null && { GroupByKey : input . GroupByKey } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1GetAggregateDiscoveredResourceCountsRequest = ( input , context ) : any => { return { ... ( input . ConfigurationAggregatorName !== undefined && input . ConfigurationAggregatorName !== null && { ConfigurationAggregatorName : input . ConfigurationAggregatorName } ) , ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1ResourceCountFilters ( input . Filters , context ) } ) , ... ( input . GroupByKey !== undefined && input . GroupByKey !== null && { GroupByKey : input . GroupByKey } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1GetAggregateResourceConfigRequest = ( input , context ) : any => { return { ... ( input . ConfigurationAggregatorName !== undefined && input . ConfigurationAggregatorName !== null && { ConfigurationAggregatorName : input . ConfigurationAggregatorName } ) , ... ( input . ResourceIdentifier !== undefined && input . ResourceIdentifier !== null && { ResourceIdentifier : serializeAws_json1_1AggregateResourceIdentifier ( input . ResourceIdentifier , context ) , } ) , } ; } ; const serializeAws_json1_1GetComplianceDetailsByConfigRuleRequest = ( input , context ) : any => { return { ... ( input . ComplianceTypes !== undefined && input . ComplianceTypes !== null && { ComplianceTypes : serializeAws_json1_1ComplianceTypes ( input . ComplianceTypes , context ) , } ) , ... ( input . ConfigRuleName !== undefined && input . ConfigRuleName !== null && { ConfigRuleName : input . ConfigRuleName } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1GetComplianceDetailsByResourceRequest = ( input , context ) : any => { return { ... ( input . ComplianceTypes !== undefined && input . ComplianceTypes !== null && { ComplianceTypes : serializeAws_json1_1ComplianceTypes ( input . ComplianceTypes , context ) , } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . ResourceId !== undefined && input . ResourceId !== null && { ResourceId : input . ResourceId } ) , ... ( input . ResourceType !== undefined && input . ResourceType !== null && { ResourceType : input . ResourceType } ) , } ; } ; const serializeAws_json1_1GetComplianceSummaryByResourceTypeRequest = ( input , context ) : any => { return { ... ( input . ResourceTypes !== undefined && input . ResourceTypes !== null && { ResourceTypes : serializeAws_json1_1ResourceTypes ( input . ResourceTypes , context ) , } ) , } ; } ; const serializeAws_json1_1GetConformancePackComplianceDetailsRequest = ( input , context ) : any => { return { ... ( input . ConformancePackName !== undefined && input . ConformancePackName !== null && { ConformancePackName : input . ConformancePackName } ) , ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1ConformancePackEvaluationFilters ( input . Filters , context ) , } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1GetConformancePackComplianceSummaryRequest = ( input , context ) : any => { return { ... ( input . ConformancePackNames !== undefined && input . ConformancePackNames !== null && { ConformancePackNames : serializeAws_json1_1ConformancePackNamesToSummarizeList ( input . ConformancePackNames , context ) , } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1GetDiscoveredResourceCountsRequest = ( input , context ) : any => { return { ... ( input . limit !== undefined && input . limit !== null && { limit : input . limit } ) , ... ( input . nextToken !== undefined && input . nextToken !== null && { nextToken : input . nextToken } ) , ... ( input . resourceTypes !== undefined && input . resourceTypes !== null && { resourceTypes : serializeAws_json1_1ResourceTypes ( input . resourceTypes , context ) , } ) , } ; } ; const serializeAws_json1_1GetOrganizationConfigRuleDetailedStatusRequest = ( input , context ) : any => { return { ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1StatusDetailFilters ( input . Filters , context ) } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . OrganizationConfigRuleName !== undefined && input . OrganizationConfigRuleName !== null && { OrganizationConfigRuleName : input . OrganizationConfigRuleName } ) , } ; } ; const serializeAws_json1_1GetOrganizationConformancePackDetailedStatusRequest = ( input , context ) : any => { return { ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1OrganizationResourceDetailedStatusFilters ( input . Filters , context ) , } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . OrganizationConformancePackName !== undefined && input . OrganizationConformancePackName !== null && { OrganizationConformancePackName : input . OrganizationConformancePackName , } ) , } ; } ; const serializeAws_json1_1GetResourceConfigHistoryRequest = ( input , context ) : any => { return { ... ( input . chronologicalOrder !== undefined && input . chronologicalOrder !== null && { chronologicalOrder : input . chronologicalOrder } ) , ... ( input . earlierTime !== undefined && input . earlierTime !== null && { earlierTime : Math . round ( input . earlierTime . getTime ( ) / 1000 ) } ) , ... ( input . laterTime !== undefined && input . laterTime !== null && { laterTime : Math . round ( input . laterTime . getTime ( ) / 1000 ) } ) , ... ( input . limit !== undefined && input . limit !== null && { limit : input . limit } ) , ... ( input . nextToken !== undefined && input . nextToken !== null && { nextToken : input . nextToken } ) , ... ( input . resourceId !== undefined && input . resourceId !== null && { resourceId : input . resourceId } ) , ... ( input . resourceType !== undefined && input . resourceType !== null && { resourceType : input . resourceType } ) , } ; } ; const serializeAws_json1_1GetStoredQueryRequest = ( input , context ) : any => { return { ... ( input . QueryName !== undefined && input . QueryName !== null && { QueryName : input . QueryName } ) , } ; } ; const serializeAws_json1_1ListAggregateDiscoveredResourcesRequest = ( input , context ) : any => { return { ... ( input . ConfigurationAggregatorName !== undefined && input . ConfigurationAggregatorName !== null && { ConfigurationAggregatorName : input . ConfigurationAggregatorName } ) , ... ( input . Filters !== undefined && input . Filters !== null && { Filters : serializeAws_json1_1ResourceFilters ( input . Filters , context ) } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . ResourceType !== undefined && input . ResourceType !== null && { ResourceType : input . ResourceType } ) , } ; } ; const serializeAws_json1_1ListDiscoveredResourcesRequest = ( input , context ) : any => { return { ... ( input . includeDeletedResources !== undefined && input . includeDeletedResources !== null && { includeDeletedResources : input . includeDeletedResources } ) , ... ( input . limit !== undefined && input . limit !== null && { limit : input . limit } ) , ... ( input . nextToken !== undefined && input . nextToken !== null && { nextToken : input . nextToken } ) , ... ( input . resourceIds !== undefined && input . resourceIds !== null && { resourceIds : serializeAws_json1_1ResourceIdList ( input . resourceIds , context ) } ) , ... ( input . resourceName !== undefined && input . resourceName !== null && { resourceName : input . resourceName } ) , ... ( input . resourceType !== undefined && input . resourceType !== null && { resourceType : input . resourceType } ) , } ; } ; const serializeAws_json1_1ListStoredQueriesRequest = ( input , context ) : any => { return { ... ( input . MaxResults !== undefined && input . MaxResults !== null && { MaxResults : input . MaxResults } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1ListTagsForResourceRequest = ( input , context ) : any => { return { ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . ResourceArn !== undefined && input . ResourceArn !== null && { ResourceArn : input . ResourceArn } ) , } ; } ; const serializeAws_json1_1OrganizationAggregationSource = ( input , context ) : any => { return { ... ( input . AllAwsRegions !== undefined && input . AllAwsRegions !== null && { AllAwsRegions : input . AllAwsRegions } ) , ... ( input . AwsRegions !== undefined && input . AwsRegions !== null && { AwsRegions : serializeAws_json1_1AggregatorRegionList ( input . AwsRegions , context ) } ) , ... ( input . RoleArn !== undefined && input . RoleArn !== null && { RoleArn : input . RoleArn } ) , } ; } ; const serializeAws_json1_1OrganizationConfigRuleNames = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1OrganizationConfigRuleTriggerTypes = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1OrganizationConformancePackNames = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1OrganizationCustomRuleMetadata = ( input , context ) : any => { return { ... ( input . Description !== undefined && input . Description !== null && { Description : input . Description } ) , ... ( input . InputParameters !== undefined && input . InputParameters !== null && { InputParameters : input . InputParameters } ) , ... ( input . LambdaFunctionArn !== undefined && input . LambdaFunctionArn !== null && { LambdaFunctionArn : input . LambdaFunctionArn } ) , ... ( input . MaximumExecutionFrequency !== undefined && input . MaximumExecutionFrequency !== null && { MaximumExecutionFrequency : input . MaximumExecutionFrequency } ) , ... ( input . OrganizationConfigRuleTriggerTypes !== undefined && input . OrganizationConfigRuleTriggerTypes !== null && { OrganizationConfigRuleTriggerTypes : serializeAws_json1_1OrganizationConfigRuleTriggerTypes ( input . OrganizationConfigRuleTriggerTypes , context ) , } ) , ... ( input . ResourceIdScope !== undefined && input . ResourceIdScope !== null && { ResourceIdScope : input . ResourceIdScope } ) , ... ( input . ResourceTypesScope !== undefined && input . ResourceTypesScope !== null && { ResourceTypesScope : serializeAws_json1_1ResourceTypesScope ( input . ResourceTypesScope , context ) , } ) , ... ( input . TagKeyScope !== undefined && input . TagKeyScope !== null && { TagKeyScope : input . TagKeyScope } ) , ... ( input . TagValueScope !== undefined && input . TagValueScope !== null && { TagValueScope : input . TagValueScope } ) , } ; } ; const serializeAws_json1_1OrganizationManagedRuleMetadata = ( input , context ) : any => { return { ... ( input . Description !== undefined && input . Description !== null && { Description : input . Description } ) , ... ( input . InputParameters !== undefined && input . InputParameters !== null && { InputParameters : input . InputParameters } ) , ... ( input . MaximumExecutionFrequency !== undefined && input . MaximumExecutionFrequency !== null && { MaximumExecutionFrequency : input . MaximumExecutionFrequency } ) , ... ( input . ResourceIdScope !== undefined && input . ResourceIdScope !== null && { ResourceIdScope : input . ResourceIdScope } ) , ... ( input . ResourceTypesScope !== undefined && input . ResourceTypesScope !== null && { ResourceTypesScope : serializeAws_json1_1ResourceTypesScope ( input . ResourceTypesScope , context ) , } ) , ... ( input . RuleIdentifier !== undefined && input . RuleIdentifier !== null && { RuleIdentifier : input . RuleIdentifier } ) , ... ( input . TagKeyScope !== undefined && input . TagKeyScope !== null && { TagKeyScope : input . TagKeyScope } ) , ... ( input . TagValueScope !== undefined && input . TagValueScope !== null && { TagValueScope : input . TagValueScope } ) , } ; } ; const serializeAws_json1_1OrganizationResourceDetailedStatusFilters = ( input , context ) : any => { return { ... ( input . AccountId !== undefined && input . AccountId !== null && { AccountId : input . AccountId } ) , ... ( input . Status !== undefined && input . Status !== null && { Status : input . Status } ) , } ; } ; const serializeAws_json1_1PutAggregationAuthorizationRequest = ( input , context ) : any => { return { ... ( input . AuthorizedAccountId !== undefined && input . AuthorizedAccountId !== null && { AuthorizedAccountId : input . AuthorizedAccountId } ) , ... ( input . AuthorizedAwsRegion !== undefined && input . AuthorizedAwsRegion !== null && { AuthorizedAwsRegion : input . AuthorizedAwsRegion } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagsList ( input . Tags , context ) } ) , } ; } ; const serializeAws_json1_1PutConfigRuleRequest = ( input , context ) : any => { return { ... ( input . ConfigRule !== undefined && input . ConfigRule !== null && { ConfigRule : serializeAws_json1_1ConfigRule ( input . ConfigRule , context ) } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagsList ( input . Tags , context ) } ) , } ; } ; const serializeAws_json1_1PutConfigurationAggregatorRequest = ( input , context ) : any => { return { ... ( input . AccountAggregationSources !== undefined && input . AccountAggregationSources !== null && { AccountAggregationSources : serializeAws_json1_1AccountAggregationSourceList ( input . AccountAggregationSources , context ) , } ) , ... ( input . ConfigurationAggregatorName !== undefined && input . ConfigurationAggregatorName !== null && { ConfigurationAggregatorName : input . ConfigurationAggregatorName } ) , ... ( input . OrganizationAggregationSource !== undefined && input . OrganizationAggregationSource !== null && { OrganizationAggregationSource : serializeAws_json1_1OrganizationAggregationSource ( input . OrganizationAggregationSource , context ) , } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagsList ( input . Tags , context ) } ) , } ; } ; const serializeAws_json1_1PutConfigurationRecorderRequest = ( input , context ) : any => { return { ... ( input . ConfigurationRecorder !== undefined && input . ConfigurationRecorder !== null && { ConfigurationRecorder : serializeAws_json1_1ConfigurationRecorder ( input . ConfigurationRecorder , context ) , } ) , } ; } ; const serializeAws_json1_1PutConformancePackRequest = ( input , context ) : any => { return { ... ( input . ConformancePackInputParameters !== undefined && input . ConformancePackInputParameters !== null && { ConformancePackInputParameters : serializeAws_json1_1ConformancePackInputParameters ( input . ConformancePackInputParameters , context ) , } ) , ... ( input . ConformancePackName !== undefined && input . ConformancePackName !== null && { ConformancePackName : input . ConformancePackName } ) , ... ( input . DeliveryS3Bucket !== undefined && input . DeliveryS3Bucket !== null && { DeliveryS3Bucket : input . DeliveryS3Bucket } ) , ... ( input . DeliveryS3KeyPrefix !== undefined && input . DeliveryS3KeyPrefix !== null && { DeliveryS3KeyPrefix : input . DeliveryS3KeyPrefix } ) , ... ( input . TemplateBody !== undefined && input . TemplateBody !== null && { TemplateBody : input . TemplateBody } ) , ... ( input . TemplateS3Uri !== undefined && input . TemplateS3Uri !== null && { TemplateS3Uri : input . TemplateS3Uri } ) , } ; } ; const serializeAws_json1_1PutDeliveryChannelRequest = ( input , context ) : any => { return { ... ( input . DeliveryChannel !== undefined && input . DeliveryChannel !== null && { DeliveryChannel : serializeAws_json1_1DeliveryChannel ( input . DeliveryChannel , context ) , } ) , } ; } ; const serializeAws_json1_1PutEvaluationsRequest = ( input , context ) : any => { return { ... ( input . Evaluations !== undefined && input . Evaluations !== null && { Evaluations : serializeAws_json1_1Evaluations ( input . Evaluations , context ) } ) , ... ( input . ResultToken !== undefined && input . ResultToken !== null && { ResultToken : input . ResultToken } ) , ... ( input . TestMode !== undefined && input . TestMode !== null && { TestMode : input . TestMode } ) , } ; } ; const serializeAws_json1_1PutExternalEvaluationRequest = ( input , context ) : any => { return { ... ( input . ConfigRuleName !== undefined && input . ConfigRuleName !== null && { ConfigRuleName : input . ConfigRuleName } ) , ... ( input . ExternalEvaluation !== undefined && input . ExternalEvaluation !== null && { ExternalEvaluation : serializeAws_json1_1ExternalEvaluation ( input . ExternalEvaluation , context ) , } ) , } ; } ; const serializeAws_json1_1PutOrganizationConfigRuleRequest = ( input , context ) : any => { return { ... ( input . ExcludedAccounts !== undefined && input . ExcludedAccounts !== null && { ExcludedAccounts : serializeAws_json1_1ExcludedAccounts ( input . ExcludedAccounts , context ) , } ) , ... ( input . OrganizationConfigRuleName !== undefined && input . OrganizationConfigRuleName !== null && { OrganizationConfigRuleName : input . OrganizationConfigRuleName } ) , ... ( input . OrganizationCustomRuleMetadata !== undefined && input . OrganizationCustomRuleMetadata !== null && { OrganizationCustomRuleMetadata : serializeAws_json1_1OrganizationCustomRuleMetadata ( input . OrganizationCustomRuleMetadata , context ) , } ) , ... ( input . OrganizationManagedRuleMetadata !== undefined && input . OrganizationManagedRuleMetadata !== null && { OrganizationManagedRuleMetadata : serializeAws_json1_1OrganizationManagedRuleMetadata ( input . OrganizationManagedRuleMetadata , context ) , } ) , } ; } ; const serializeAws_json1_1PutOrganizationConformancePackRequest = ( input , context ) : any => { return { ... ( input . ConformancePackInputParameters !== undefined && input . ConformancePackInputParameters !== null && { ConformancePackInputParameters : serializeAws_json1_1ConformancePackInputParameters ( input . ConformancePackInputParameters , context ) , } ) , ... ( input . DeliveryS3Bucket !== undefined && input . DeliveryS3Bucket !== null && { DeliveryS3Bucket : input . DeliveryS3Bucket } ) , ... ( input . DeliveryS3KeyPrefix !== undefined && input . DeliveryS3KeyPrefix !== null && { DeliveryS3KeyPrefix : input . DeliveryS3KeyPrefix } ) , ... ( input . ExcludedAccounts !== undefined && input . ExcludedAccounts !== null && { ExcludedAccounts : serializeAws_json1_1ExcludedAccounts ( input . ExcludedAccounts , context ) , } ) , ... ( input . OrganizationConformancePackName !== undefined && input . OrganizationConformancePackName !== null && { OrganizationConformancePackName : input . OrganizationConformancePackName , } ) , ... ( input . TemplateBody !== undefined && input . TemplateBody !== null && { TemplateBody : input . TemplateBody } ) , ... ( input . TemplateS3Uri !== undefined && input . TemplateS3Uri !== null && { TemplateS3Uri : input . TemplateS3Uri } ) , } ; } ; const serializeAws_json1_1PutRemediationConfigurationsRequest = ( input , context ) : any => { return { ... ( input . RemediationConfigurations !== undefined && input . RemediationConfigurations !== null && { RemediationConfigurations : serializeAws_json1_1RemediationConfigurations ( input . RemediationConfigurations , context ) , } ) , } ; } ; const serializeAws_json1_1PutRemediationExceptionsRequest = ( input , context ) : any => { return { ... ( input . ConfigRuleName !== undefined && input . ConfigRuleName !== null && { ConfigRuleName : input . ConfigRuleName } ) , ... ( input . ExpirationTime !== undefined && input . ExpirationTime !== null && { ExpirationTime : Math . round ( input . ExpirationTime . getTime ( ) / 1000 ) } ) , ... ( input . Message !== undefined && input . Message !== null && { Message : input . Message } ) , ... ( input . ResourceKeys !== undefined && input . ResourceKeys !== null && { ResourceKeys : serializeAws_json1_1RemediationExceptionResourceKeys ( input . ResourceKeys , context ) , } ) , } ; } ; const serializeAws_json1_1PutResourceConfigRequest = ( input , context ) : any => { return { ... ( input . Configuration !== undefined && input . Configuration !== null && { Configuration : input . Configuration } ) , ... ( input . ResourceId !== undefined && input . ResourceId !== null && { ResourceId : input . ResourceId } ) , ... ( input . ResourceName !== undefined && input . ResourceName !== null && { ResourceName : input . ResourceName } ) , ... ( input . ResourceType !== undefined && input . ResourceType !== null && { ResourceType : input . ResourceType } ) , ... ( input . SchemaVersionId !== undefined && input . SchemaVersionId !== null && { SchemaVersionId : input . SchemaVersionId } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1Tags ( input . Tags , context ) } ) , } ; } ; const serializeAws_json1_1PutRetentionConfigurationRequest = ( input , context ) : any => { return { ... ( input . RetentionPeriodInDays !== undefined && input . RetentionPeriodInDays !== null && { RetentionPeriodInDays : input . RetentionPeriodInDays } ) , } ; } ; const serializeAws_json1_1PutStoredQueryRequest = ( input , context ) : any => { return { ... ( input . StoredQuery !== undefined && input . StoredQuery !== null && { StoredQuery : serializeAws_json1_1StoredQuery ( input . StoredQuery , context ) } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagsList ( input . Tags , context ) } ) , } ; } ; const serializeAws_json1_1RecordingGroup = ( input , context ) : any => { return { ... ( input . allSupported !== undefined && input . allSupported !== null && { allSupported : input . allSupported } ) , ... ( input . includeGlobalResourceTypes !== undefined && input . includeGlobalResourceTypes !== null && { includeGlobalResourceTypes : input . includeGlobalResourceTypes } ) , ... ( input . resourceTypes !== undefined && input . resourceTypes !== null && { resourceTypes : serializeAws_json1_1ResourceTypeList ( input . resourceTypes , context ) , } ) , } ; } ; const serializeAws_json1_1ReevaluateConfigRuleNames = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1RemediationConfiguration = ( input , context ) : any => { return { ... ( input . Arn !== undefined && input . Arn !== null && { Arn : input . Arn } ) , ... ( input . Automatic !== undefined && input . Automatic !== null && { Automatic : input . Automatic } ) , ... ( input . ConfigRuleName !== undefined && input . ConfigRuleName !== null && { ConfigRuleName : input . ConfigRuleName } ) , ... ( input . CreatedByService !== undefined && input . CreatedByService !== null && { CreatedByService : input . CreatedByService } ) , ... ( input . ExecutionControls !== undefined && input . ExecutionControls !== null && { ExecutionControls : serializeAws_json1_1ExecutionControls ( input . ExecutionControls , context ) , } ) , ... ( input . MaximumAutomaticAttempts !== undefined && input . MaximumAutomaticAttempts !== null && { MaximumAutomaticAttempts : input . MaximumAutomaticAttempts } ) , ... ( input . Parameters !== undefined && input . Parameters !== null && { Parameters : serializeAws_json1_1RemediationParameters ( input . Parameters , context ) , } ) , ... ( input . ResourceType !== undefined && input . ResourceType !== null && { ResourceType : input . ResourceType } ) , ... ( input . RetryAttemptSeconds !== undefined && input . RetryAttemptSeconds !== null && { RetryAttemptSeconds : input . RetryAttemptSeconds } ) , ... ( input . TargetId !== undefined && input . TargetId !== null && { TargetId : input . TargetId } ) , ... ( input . TargetType !== undefined && input . TargetType !== null && { TargetType : input . TargetType } ) , ... ( input . TargetVersion !== undefined && input . TargetVersion !== null && { TargetVersion : input . TargetVersion } ) , } ; } ; const serializeAws_json1_1RemediationConfigurations = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1RemediationConfiguration ( entry , context ) ; } ) ; } ; const serializeAws_json1_1RemediationExceptionResourceKey = ( input , context ) : any => { return { ... ( input . ResourceId !== undefined && input . ResourceId !== null && { ResourceId : input . ResourceId } ) , ... ( input . ResourceType !== undefined && input . ResourceType !== null && { ResourceType : input . ResourceType } ) , } ; } ; const serializeAws_json1_1RemediationExceptionResourceKeys = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1RemediationExceptionResourceKey ( entry , context ) ; } ) ; } ; const serializeAws_json1_1RemediationParameters = ( input , context ) : any => { return Object . entries ( input ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : serializeAws_json1_1RemediationParameterValue ( value , context ) , } ; } , { } ) ; } ; const serializeAws_json1_1RemediationParameterValue = ( input , context ) : any => { return { ... ( input . ResourceValue !== undefined && input . ResourceValue !== null && { ResourceValue : serializeAws_json1_1ResourceValue ( input . ResourceValue , context ) , } ) , ... ( input . StaticValue !== undefined && input . StaticValue !== null && { StaticValue : serializeAws_json1_1StaticValue ( input . StaticValue , context ) } ) , } ; } ; const serializeAws_json1_1ResourceCountFilters = ( input , context ) : any => { return { ... ( input . AccountId !== undefined && input . AccountId !== null && { AccountId : input . AccountId } ) , ... ( input . Region !== undefined && input . Region !== null && { Region : input . Region } ) , ... ( input . ResourceType !== undefined && input . ResourceType !== null && { ResourceType : input . ResourceType } ) , } ; } ; const serializeAws_json1_1ResourceFilters = ( input , context ) : any => { return { ... ( input . AccountId !== undefined && input . AccountId !== null && { AccountId : input . AccountId } ) , ... ( input . Region !== undefined && input . Region !== null && { Region : input . Region } ) , ... ( input . ResourceId !== undefined && input . ResourceId !== null && { ResourceId : input . ResourceId } ) , ... ( input . ResourceName !== undefined && input . ResourceName !== null && { ResourceName : input . ResourceName } ) , } ; } ; const serializeAws_json1_1ResourceIdentifiersList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1AggregateResourceIdentifier ( entry , context ) ; } ) ; } ; const serializeAws_json1_1ResourceIdList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1ResourceKey = ( input , context ) : any => { return { ... ( input . resourceId !== undefined && input . resourceId !== null && { resourceId : input . resourceId } ) , ... ( input . resourceType !== undefined && input . resourceType !== null && { resourceType : input . resourceType } ) , } ; } ; const serializeAws_json1_1ResourceKeys = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1ResourceKey ( entry , context ) ; } ) ; } ; const serializeAws_json1_1ResourceTypeList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1ResourceTypes = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1ResourceTypesScope = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1ResourceValue = ( input , context ) : any => { return { ... ( input . Value !== undefined && input . Value !== null && { Value : input . Value } ) , } ; } ; const serializeAws_json1_1RetentionConfigurationNameList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1Scope = ( input , context ) : any => { return { ... ( input . ComplianceResourceId !== undefined && input . ComplianceResourceId !== null && { ComplianceResourceId : input . ComplianceResourceId } ) , ... ( input . ComplianceResourceTypes !== undefined && input . ComplianceResourceTypes !== null && { ComplianceResourceTypes : serializeAws_json1_1ComplianceResourceTypes ( input . ComplianceResourceTypes , context ) , } ) , ... ( input . TagKey !== undefined && input . TagKey !== null && { TagKey : input . TagKey } ) , ... ( input . TagValue !== undefined && input . TagValue !== null && { TagValue : input . TagValue } ) , } ; } ; const serializeAws_json1_1SelectAggregateResourceConfigRequest = ( input , context ) : any => { return { ... ( input . ConfigurationAggregatorName !== undefined && input . ConfigurationAggregatorName !== null && { ConfigurationAggregatorName : input . ConfigurationAggregatorName } ) , ... ( input . Expression !== undefined && input . Expression !== null && { Expression : input . Expression } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . MaxResults !== undefined && input . MaxResults !== null && { MaxResults : input . MaxResults } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1SelectResourceConfigRequest = ( input , context ) : any => { return { ... ( input . Expression !== undefined && input . Expression !== null && { Expression : input . Expression } ) , ... ( input . Limit !== undefined && input . Limit !== null && { Limit : input . Limit } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1Source = ( input , context ) : any => { return { ... ( input . Owner !== undefined && input . Owner !== null && { Owner : input . Owner } ) , ... ( input . SourceDetails !== undefined && input . SourceDetails !== null && { SourceDetails : serializeAws_json1_1SourceDetails ( input . SourceDetails , context ) , } ) , ... ( input . SourceIdentifier !== undefined && input . SourceIdentifier !== null && { SourceIdentifier : input . SourceIdentifier } ) , } ; } ; const serializeAws_json1_1SourceDetail = ( input , context ) : any => { return { ... ( input . EventSource !== undefined && input . EventSource !== null && { EventSource : input . EventSource } ) , ... ( input . MaximumExecutionFrequency !== undefined && input . MaximumExecutionFrequency !== null && { MaximumExecutionFrequency : input . MaximumExecutionFrequency } ) , ... ( input . MessageType !== undefined && input . MessageType !== null && { MessageType : input . MessageType } ) , } ; } ; const serializeAws_json1_1SourceDetails = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1SourceDetail ( entry , context ) ; } ) ; } ; const serializeAws_json1_1SsmControls = ( input , context ) : any => { return { ... ( input . ConcurrentExecutionRatePercentage !== undefined && input . ConcurrentExecutionRatePercentage !== null && { ConcurrentExecutionRatePercentage : input . ConcurrentExecutionRatePercentage , } ) , ... ( input . ErrorPercentage !== undefined && input . ErrorPercentage !== null && { ErrorPercentage : input . ErrorPercentage } ) , } ; } ; const serializeAws_json1_1StartConfigRulesEvaluationRequest = ( input , context ) : any => { return { ... ( input . ConfigRuleNames !== undefined && input . ConfigRuleNames !== null && { ConfigRuleNames : serializeAws_json1_1ReevaluateConfigRuleNames ( input . ConfigRuleNames , context ) , } ) , } ; } ; const serializeAws_json1_1StartConfigurationRecorderRequest = ( input , context ) : any => { return { ... ( input . ConfigurationRecorderName !== undefined && input . ConfigurationRecorderName !== null && { ConfigurationRecorderName : input . ConfigurationRecorderName } ) , } ; } ; const serializeAws_json1_1StartRemediationExecutionRequest = ( input , context ) : any => { return { ... ( input . ConfigRuleName !== undefined && input . ConfigRuleName !== null && { ConfigRuleName : input . ConfigRuleName } ) , ... ( input . ResourceKeys !== undefined && input . ResourceKeys !== null && { ResourceKeys : serializeAws_json1_1ResourceKeys ( input . ResourceKeys , context ) } ) , } ; } ; const serializeAws_json1_1StaticParameterValues = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1StaticValue = ( input , context ) : any => { return { ... ( input . Values !== undefined && input . Values !== null && { Values : serializeAws_json1_1StaticParameterValues ( input . Values , context ) } ) , } ; } ; const serializeAws_json1_1StatusDetailFilters = ( input , context ) : any => { return { ... ( input . AccountId !== undefined && input . AccountId !== null && { AccountId : input . AccountId } ) , ... ( input . MemberAccountRuleStatus !== undefined && input . MemberAccountRuleStatus !== null && { MemberAccountRuleStatus : input . MemberAccountRuleStatus } ) , } ; } ; const serializeAws_json1_1StopConfigurationRecorderRequest = ( input , context ) : any => { return { ... ( input . ConfigurationRecorderName !== undefined && input . ConfigurationRecorderName !== null && { ConfigurationRecorderName : input . ConfigurationRecorderName } ) , } ; } ; const serializeAws_json1_1StoredQuery = ( input , context ) : any => { return { ... ( input . Description !== undefined && input . Description !== null && { Description : input . Description } ) , ... ( input . Expression !== undefined && input . Expression !== null && { Expression : input . Expression } ) , ... ( input . QueryArn !== undefined && input . QueryArn !== null && { QueryArn : input . QueryArn } ) , ... ( input . QueryId !== undefined && input . QueryId !== null && { QueryId : input . QueryId } ) , ... ( input . QueryName !== undefined && input . QueryName !== null && { QueryName : input . QueryName } ) , } ; } ; const serializeAws_json1_1Tag = ( input , context ) : any => { return { ... ( input . Key !== undefined && input . Key !== null && { Key : input . Key } ) , ... ( input . Value !== undefined && input . Value !== null && { Value : input . Value } ) , } ; } ; const serializeAws_json1_1TagKeyList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; 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_1TagResourceRequest = ( 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_1Tags = ( input , context ) : any => { return Object . entries ( input ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : value , } ; } , { } ) ; } ; const serializeAws_json1_1TagsList = ( 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_1UntagResourceRequest = ( input , context ) : any => { return { ... ( input . ResourceArn !== undefined && input . ResourceArn !== null && { ResourceArn : input . ResourceArn } ) , ... ( input . TagKeys !== undefined && input . TagKeys !== null && { TagKeys : serializeAws_json1_1TagKeyList ( input . TagKeys , context ) } ) , } ; } ; const deserializeAws_json1_1AccountAggregationSource = ( output , context ) : AccountAggregationSource => { return { AccountIds : output . AccountIds !== undefined && output . AccountIds !== null ? deserializeAws_json1_1AccountAggregationSourceAccountList ( output . AccountIds , context ) : undefined , AllAwsRegions : __expectBoolean ( output . AllAwsRegions ) , AwsRegions : output . AwsRegions !== undefined && output . AwsRegions !== null ? deserializeAws_json1_1AggregatorRegionList ( output . AwsRegions , context ) : undefined , } as any ; } ; const deserializeAws_json1_1AccountAggregationSourceAccountList = ( 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_1AccountAggregationSourceList = ( output , context ) : AccountAggregationSource [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1AccountAggregationSource ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1AggregateComplianceByConfigRule = ( output , context ) : AggregateComplianceByConfigRule => { return { AccountId : __expectString ( output . AccountId ) , AwsRegion : __expectString ( output . AwsRegion ) , Compliance : output . Compliance !== undefined && output . Compliance !== null ? deserializeAws_json1_1Compliance ( output . Compliance , context ) : undefined , ConfigRuleName : __expectString ( output . ConfigRuleName ) , } as any ; } ; const deserializeAws_json1_1AggregateComplianceByConfigRuleList = ( output , context ) : AggregateComplianceByConfigRule [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1AggregateComplianceByConfigRule ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1AggregateComplianceByConformancePack = ( output , context ) : AggregateComplianceByConformancePack => { return { AccountId : __expectString ( output . AccountId ) , AwsRegion : __expectString ( output . AwsRegion ) , Compliance : output . Compliance !== undefined && output . Compliance !== null ? deserializeAws_json1_1AggregateConformancePackCompliance ( output . Compliance , context ) : undefined , ConformancePackName : __expectString ( output . ConformancePackName ) , } as any ; } ; const deserializeAws_json1_1AggregateComplianceByConformancePackList = ( output , context ) : AggregateComplianceByConformancePack [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1AggregateComplianceByConformancePack ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1AggregateComplianceCount = ( output , context ) : AggregateComplianceCount => { return { ComplianceSummary : output . ComplianceSummary !== undefined && output . ComplianceSummary !== null ? deserializeAws_json1_1ComplianceSummary ( output . ComplianceSummary , context ) : undefined , GroupName : __expectString ( output . GroupName ) , } as any ; } ; const deserializeAws_json1_1AggregateComplianceCountList = ( output , context ) : AggregateComplianceCount [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1AggregateComplianceCount ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1AggregateConformancePackCompliance = ( output , context ) : AggregateConformancePackCompliance => { return { ComplianceType : __expectString ( output . ComplianceType ) , CompliantRuleCount : __expectInt32 ( output . CompliantRuleCount ) , NonCompliantRuleCount : __expectInt32 ( output . NonCompliantRuleCount ) , TotalRuleCount : __expectInt32 ( output . TotalRuleCount ) , } as any ; } ; const deserializeAws_json1_1AggregateConformancePackComplianceCount = ( output , context ) : AggregateConformancePackComplianceCount => { return { CompliantConformancePackCount : __expectInt32 ( output . CompliantConformancePackCount ) , NonCompliantConformancePackCount : __expectInt32 ( output . NonCompliantConformancePackCount ) , } as any ; } ; const deserializeAws_json1_1AggregateConformancePackComplianceSummary = ( output , context ) : AggregateConformancePackComplianceSummary => { return { ComplianceSummary : output . ComplianceSummary !== undefined && output . ComplianceSummary !== null ? deserializeAws_json1_1AggregateConformancePackComplianceCount ( output . ComplianceSummary , context ) : undefined , GroupName : __expectString ( output . GroupName ) , } as any ; } ; const deserializeAws_json1_1AggregateConformancePackComplianceSummaryList = ( output , context ) : AggregateConformancePackComplianceSummary [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1AggregateConformancePackComplianceSummary ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1AggregatedSourceStatus = ( output , context ) : AggregatedSourceStatus => { return { AwsRegion : __expectString ( output . AwsRegion ) , LastErrorCode : __expectString ( output . LastErrorCode ) , LastErrorMessage : __expectString ( output . LastErrorMessage ) , LastUpdateStatus : __expectString ( output . LastUpdateStatus ) , LastUpdateTime : output . LastUpdateTime !== undefined && output . LastUpdateTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastUpdateTime ) ) ) : undefined , SourceId : __expectString ( output . SourceId ) , SourceType : __expectString ( output . SourceType ) , } as any ; } ; const deserializeAws_json1_1AggregatedSourceStatusList = ( output , context ) : AggregatedSourceStatus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1AggregatedSourceStatus ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1AggregateEvaluationResult = ( output , context ) : AggregateEvaluationResult => { return { AccountId : __expectString ( output . AccountId ) , Annotation : __expectString ( output . Annotation ) , AwsRegion : __expectString ( output . AwsRegion ) , ComplianceType : __expectString ( output . ComplianceType ) , ConfigRuleInvokedTime : output . ConfigRuleInvokedTime !== undefined && output . ConfigRuleInvokedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . ConfigRuleInvokedTime ) ) ) : undefined , EvaluationResultIdentifier : output . EvaluationResultIdentifier !== undefined && output . EvaluationResultIdentifier !== null ? deserializeAws_json1_1EvaluationResultIdentifier ( output . EvaluationResultIdentifier , context ) : undefined , ResultRecordedTime : output . ResultRecordedTime !== undefined && output . ResultRecordedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . ResultRecordedTime ) ) ) : undefined , } as any ; } ; const deserializeAws_json1_1AggregateEvaluationResultList = ( output , context ) : AggregateEvaluationResult [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1AggregateEvaluationResult ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1AggregateResourceIdentifier = ( output , context ) : AggregateResourceIdentifier => { return { ResourceId : __expectString ( output . ResourceId ) , ResourceName : __expectString ( output . ResourceName ) , ResourceType : __expectString ( output . ResourceType ) , SourceAccountId : __expectString ( output . SourceAccountId ) , SourceRegion : __expectString ( output . SourceRegion ) , } as any ; } ; const deserializeAws_json1_1AggregationAuthorization = ( output , context ) : AggregationAuthorization => { return { AggregationAuthorizationArn : __expectString ( output . AggregationAuthorizationArn ) , AuthorizedAccountId : __expectString ( output . AuthorizedAccountId ) , AuthorizedAwsRegion : __expectString ( output . AuthorizedAwsRegion ) , CreationTime : output . CreationTime !== undefined && output . CreationTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . CreationTime ) ) ) : undefined , } as any ; } ; const deserializeAws_json1_1AggregationAuthorizationList = ( output , context ) : AggregationAuthorization [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1AggregationAuthorization ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1AggregatorRegionList = ( 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_1BaseConfigurationItem = ( output , context ) : BaseConfigurationItem => { return { accountId : __expectString ( output . accountId ) , arn : __expectString ( output . arn ) , availabilityZone : __expectString ( output . availabilityZone ) , awsRegion : __expectString ( output . awsRegion ) , configuration : __expectString ( output . configuration ) , configurationItemCaptureTime : output . configurationItemCaptureTime !== undefined && output . configurationItemCaptureTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . configurationItemCaptureTime ) ) ) : undefined , configurationItemStatus : __expectString ( output . configurationItemStatus ) , configurationStateId : __expectString ( output . configurationStateId ) , resourceCreationTime : output . resourceCreationTime !== undefined && output . resourceCreationTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . resourceCreationTime ) ) ) : undefined , resourceId : __expectString ( output . resourceId ) , resourceName : __expectString ( output . resourceName ) , resourceType : __expectString ( output . resourceType ) , supplementaryConfiguration : output . supplementaryConfiguration !== undefined && output . supplementaryConfiguration !== null ? deserializeAws_json1_1SupplementaryConfiguration ( output . supplementaryConfiguration , context ) : undefined , version : __expectString ( output . version ) , } as any ; } ; const deserializeAws_json1_1BaseConfigurationItems = ( output , context ) : BaseConfigurationItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1BaseConfigurationItem ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1BatchGetAggregateResourceConfigResponse = ( output , context ) : BatchGetAggregateResourceConfigResponse => { return { BaseConfigurationItems : output . BaseConfigurationItems !== undefined && output . BaseConfigurationItems !== null ? deserializeAws_json1_1BaseConfigurationItems ( output . BaseConfigurationItems , context ) : undefined , UnprocessedResourceIdentifiers : output . UnprocessedResourceIdentifiers !== undefined && output . UnprocessedResourceIdentifiers !== null ? deserializeAws_json1_1UnprocessedResourceIdentifierList ( output . UnprocessedResourceIdentifiers , context ) : undefined , } as any ; } ; const deserializeAws_json1_1BatchGetResourceConfigResponse = ( output , context ) : BatchGetResourceConfigResponse => { return { baseConfigurationItems : output . baseConfigurationItems !== undefined && output . baseConfigurationItems !== null ? deserializeAws_json1_1BaseConfigurationItems ( output . baseConfigurationItems , context ) : undefined , unprocessedResourceKeys : output . unprocessedResourceKeys !== undefined && output . unprocessedResourceKeys !== null ? deserializeAws_json1_1ResourceKeys ( output . unprocessedResourceKeys , context ) : undefined , } as any ; } ; const deserializeAws_json1_1Compliance = ( output , context ) : Compliance => { return { ComplianceContributorCount : output . ComplianceContributorCount !== undefined && output . ComplianceContributorCount !== null ? deserializeAws_json1_1ComplianceContributorCount ( output . ComplianceContributorCount , context ) : undefined , ComplianceType : __expectString ( output . ComplianceType ) , } as any ; } ; const deserializeAws_json1_1ComplianceByConfigRule = ( output , context ) : ComplianceByConfigRule => { return { Compliance : output . Compliance !== undefined && output . Compliance !== null ? deserializeAws_json1_1Compliance ( output . Compliance , context ) : undefined , ConfigRuleName : __expectString ( output . ConfigRuleName ) , } as any ; } ; const deserializeAws_json1_1ComplianceByConfigRules = ( output , context ) : ComplianceByConfigRule [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ComplianceByConfigRule ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ComplianceByResource = ( output , context ) : ComplianceByResource => { return { Compliance : output . Compliance !== undefined && output . Compliance !== null ? deserializeAws_json1_1Compliance ( output . Compliance , context ) : undefined , ResourceId : __expectString ( output . ResourceId ) , ResourceType : __expectString ( output . ResourceType ) , } as any ; } ; const deserializeAws_json1_1ComplianceByResources = ( output , context ) : ComplianceByResource [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ComplianceByResource ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ComplianceContributorCount = ( output , context ) : ComplianceContributorCount => { return { CapExceeded : __expectBoolean ( output . CapExceeded ) , CappedCount : __expectInt32 ( output . CappedCount ) , } as any ; } ; const deserializeAws_json1_1ComplianceResourceTypes = ( 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_1ComplianceSummariesByResourceType = ( output , context ) : ComplianceSummaryByResourceType [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ComplianceSummaryByResourceType ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ComplianceSummary = ( output , context ) : ComplianceSummary => { return { ComplianceSummaryTimestamp : output . ComplianceSummaryTimestamp !== undefined && output . ComplianceSummaryTimestamp !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . ComplianceSummaryTimestamp ) ) ) : undefined , CompliantResourceCount : output . CompliantResourceCount !== undefined && output . CompliantResourceCount !== null ? deserializeAws_json1_1ComplianceContributorCount ( output . CompliantResourceCount , context ) : undefined , NonCompliantResourceCount : output . NonCompliantResourceCount !== undefined && output . NonCompliantResourceCount !== null ? deserializeAws_json1_1ComplianceContributorCount ( output . NonCompliantResourceCount , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ComplianceSummaryByResourceType = ( output , context ) : ComplianceSummaryByResourceType => { return { ComplianceSummary : output . ComplianceSummary !== undefined && output . ComplianceSummary !== null ? deserializeAws_json1_1ComplianceSummary ( output . ComplianceSummary , context ) : undefined , ResourceType : __expectString ( output . ResourceType ) , } as any ; } ; const deserializeAws_json1_1ConfigExportDeliveryInfo = ( output , context ) : ConfigExportDeliveryInfo => { return { lastAttemptTime : output . lastAttemptTime !== undefined && output . lastAttemptTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . lastAttemptTime ) ) ) : undefined , lastErrorCode : __expectString ( output . lastErrorCode ) , lastErrorMessage : __expectString ( output . lastErrorMessage ) , lastStatus : __expectString ( output . lastStatus ) , lastSuccessfulTime : output . lastSuccessfulTime !== undefined && output . lastSuccessfulTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . lastSuccessfulTime ) ) ) : undefined , nextDeliveryTime : output . nextDeliveryTime !== undefined && output . nextDeliveryTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . nextDeliveryTime ) ) ) : undefined , } as any ; } ; const deserializeAws_json1_1ConfigRule = ( output , context ) : ConfigRule => { return { ConfigRuleArn : __expectString ( output . ConfigRuleArn ) , ConfigRuleId : __expectString ( output . ConfigRuleId ) , ConfigRuleName : __expectString ( output . ConfigRuleName ) , ConfigRuleState : __expectString ( output . ConfigRuleState ) , CreatedBy : __expectString ( output . CreatedBy ) , Description : __expectString ( output . Description ) , InputParameters : __expectString ( output . InputParameters ) , MaximumExecutionFrequency : __expectString ( output . MaximumExecutionFrequency ) , Scope : output . Scope !== undefined && output . Scope !== null ? deserializeAws_json1_1Scope ( output . Scope , context ) : undefined , Source : output . Source !== undefined && output . Source !== null ? deserializeAws_json1_1Source ( output . Source , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ConfigRuleEvaluationStatus = ( output , context ) : ConfigRuleEvaluationStatus => { return { ConfigRuleArn : __expectString ( output . ConfigRuleArn ) , ConfigRuleId : __expectString ( output . ConfigRuleId ) , ConfigRuleName : __expectString ( output . ConfigRuleName ) , FirstActivatedTime : output . FirstActivatedTime !== undefined && output . FirstActivatedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . FirstActivatedTime ) ) ) : undefined , FirstEvaluationStarted : __expectBoolean ( output . FirstEvaluationStarted ) , LastDeactivatedTime : output . LastDeactivatedTime !== undefined && output . LastDeactivatedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastDeactivatedTime ) ) ) : undefined , LastErrorCode : __expectString ( output . LastErrorCode ) , LastErrorMessage : __expectString ( output . LastErrorMessage ) , LastFailedEvaluationTime : output . LastFailedEvaluationTime !== undefined && output . LastFailedEvaluationTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastFailedEvaluationTime ) ) ) : undefined , LastFailedInvocationTime : output . LastFailedInvocationTime !== undefined && output . LastFailedInvocationTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastFailedInvocationTime ) ) ) : undefined , LastSuccessfulEvaluationTime : output . LastSuccessfulEvaluationTime !== undefined && output . LastSuccessfulEvaluationTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastSuccessfulEvaluationTime ) ) ) : undefined , LastSuccessfulInvocationTime : output . LastSuccessfulInvocationTime !== undefined && output . LastSuccessfulInvocationTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastSuccessfulInvocationTime ) ) ) : undefined , } as any ; } ; const deserializeAws_json1_1ConfigRuleEvaluationStatusList = ( output , context ) : ConfigRuleEvaluationStatus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ConfigRuleEvaluationStatus ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ConfigRules = ( output , context ) : ConfigRule [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ConfigRule ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ConfigSnapshotDeliveryProperties = ( output , context ) : ConfigSnapshotDeliveryProperties => { return { deliveryFrequency : __expectString ( output . deliveryFrequency ) , } as any ; } ; const deserializeAws_json1_1ConfigStreamDeliveryInfo = ( output , context ) : ConfigStreamDeliveryInfo => { return { lastErrorCode : __expectString ( output . lastErrorCode ) , lastErrorMessage : __expectString ( output . lastErrorMessage ) , lastStatus : __expectString ( output . lastStatus ) , lastStatusChangeTime : output . lastStatusChangeTime !== undefined && output . lastStatusChangeTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . lastStatusChangeTime ) ) ) : undefined , } as any ; } ; const deserializeAws_json1_1ConfigurationAggregator = ( output , context ) : ConfigurationAggregator => { return { AccountAggregationSources : output . AccountAggregationSources !== undefined && output . AccountAggregationSources !== null ? deserializeAws_json1_1AccountAggregationSourceList ( output . AccountAggregationSources , context ) : undefined , ConfigurationAggregatorArn : __expectString ( output . ConfigurationAggregatorArn ) , ConfigurationAggregatorName : __expectString ( output . ConfigurationAggregatorName ) , CreatedBy : __expectString ( output . CreatedBy ) , CreationTime : output . CreationTime !== undefined && output . CreationTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . CreationTime ) ) ) : undefined , LastUpdatedTime : output . LastUpdatedTime !== undefined && output . LastUpdatedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastUpdatedTime ) ) ) : undefined , OrganizationAggregationSource : output . OrganizationAggregationSource !== undefined && output . OrganizationAggregationSource !== null ? deserializeAws_json1_1OrganizationAggregationSource ( output . OrganizationAggregationSource , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ConfigurationAggregatorList = ( output , context ) : ConfigurationAggregator [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ConfigurationAggregator ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ConfigurationItem = ( output , context ) : ConfigurationItem => { return { accountId : __expectString ( output . accountId ) , arn : __expectString ( output . arn ) , availabilityZone : __expectString ( output . availabilityZone ) , awsRegion : __expectString ( output . awsRegion ) , configuration : __expectString ( output . configuration ) , configurationItemCaptureTime : output . configurationItemCaptureTime !== undefined && output . configurationItemCaptureTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . configurationItemCaptureTime ) ) ) : undefined , configurationItemMD5Hash : __expectString ( output . configurationItemMD5Hash ) , configurationItemStatus : __expectString ( output . configurationItemStatus ) , configurationStateId : __expectString ( output . configurationStateId ) , relatedEvents : output . relatedEvents !== undefined && output . relatedEvents !== null ? deserializeAws_json1_1RelatedEventList ( output . relatedEvents , context ) : undefined , relationships : output . relationships !== undefined && output . relationships !== null ? deserializeAws_json1_1RelationshipList ( output . relationships , context ) : undefined , resourceCreationTime : output . resourceCreationTime !== undefined && output . resourceCreationTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . resourceCreationTime ) ) ) : undefined , resourceId : __expectString ( output . resourceId ) , resourceName : __expectString ( output . resourceName ) , resourceType : __expectString ( output . resourceType ) , supplementaryConfiguration : output . supplementaryConfiguration !== undefined && output . supplementaryConfiguration !== null ? deserializeAws_json1_1SupplementaryConfiguration ( output . supplementaryConfiguration , context ) : undefined , tags : output . tags !== undefined && output . tags !== null ? deserializeAws_json1_1Tags ( output . tags , context ) : undefined , version : __expectString ( output . version ) , } as any ; } ; const deserializeAws_json1_1ConfigurationItemList = ( output , context ) : ConfigurationItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ConfigurationItem ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ConfigurationRecorder = ( output , context ) : ConfigurationRecorder => { return { name : __expectString ( output . name ) , recordingGroup : output . recordingGroup !== undefined && output . recordingGroup !== null ? deserializeAws_json1_1RecordingGroup ( output . recordingGroup , context ) : undefined , roleARN : __expectString ( output . roleARN ) , } as any ; } ; const deserializeAws_json1_1ConfigurationRecorderList = ( output , context ) : ConfigurationRecorder [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ConfigurationRecorder ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ConfigurationRecorderStatus = ( output , context ) : ConfigurationRecorderStatus => { return { lastErrorCode : __expectString ( output . lastErrorCode ) , lastErrorMessage : __expectString ( output . lastErrorMessage ) , lastStartTime : output . lastStartTime !== undefined && output . lastStartTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . lastStartTime ) ) ) : undefined , lastStatus : __expectString ( output . lastStatus ) , lastStatusChangeTime : output . lastStatusChangeTime !== undefined && output . lastStatusChangeTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . lastStatusChangeTime ) ) ) : undefined , lastStopTime : output . lastStopTime !== undefined && output . lastStopTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . lastStopTime ) ) ) : undefined , name : __expectString ( output . name ) , recording : __expectBoolean ( output . recording ) , } as any ; } ; const deserializeAws_json1_1ConfigurationRecorderStatusList = ( output , context ) : ConfigurationRecorderStatus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ConfigurationRecorderStatus ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ConformancePackComplianceSummary = ( output , context ) : ConformancePackComplianceSummary => { return { ConformancePackComplianceStatus : __expectString ( output . ConformancePackComplianceStatus ) , ConformancePackName : __expectString ( output . ConformancePackName ) , } as any ; } ; const deserializeAws_json1_1ConformancePackComplianceSummaryList = ( output , context ) : ConformancePackComplianceSummary [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ConformancePackComplianceSummary ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ConformancePackDetail = ( output , context ) : ConformancePackDetail => { return { ConformancePackArn : __expectString ( output . ConformancePackArn ) , ConformancePackId : __expectString ( output . ConformancePackId ) , ConformancePackInputParameters : output . ConformancePackInputParameters !== undefined && output . ConformancePackInputParameters !== null ? deserializeAws_json1_1ConformancePackInputParameters ( output . ConformancePackInputParameters , context ) : undefined , ConformancePackName : __expectString ( output . ConformancePackName ) , CreatedBy : __expectString ( output . CreatedBy ) , DeliveryS3Bucket : __expectString ( output . DeliveryS3Bucket ) , DeliveryS3KeyPrefix : __expectString ( output . DeliveryS3KeyPrefix ) , LastUpdateRequestedTime : output . LastUpdateRequestedTime !== undefined && output . LastUpdateRequestedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastUpdateRequestedTime ) ) ) : undefined , } as any ; } ; const deserializeAws_json1_1ConformancePackDetailList = ( output , context ) : ConformancePackDetail [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ConformancePackDetail ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ConformancePackEvaluationResult = ( output , context ) : ConformancePackEvaluationResult => { return { Annotation : __expectString ( output . Annotation ) , ComplianceType : __expectString ( output . ComplianceType ) , ConfigRuleInvokedTime : output . ConfigRuleInvokedTime !== undefined && output . ConfigRuleInvokedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . ConfigRuleInvokedTime ) ) ) : undefined , EvaluationResultIdentifier : output . EvaluationResultIdentifier !== undefined && output . EvaluationResultIdentifier !== null ? deserializeAws_json1_1EvaluationResultIdentifier ( output . EvaluationResultIdentifier , context ) : undefined , ResultRecordedTime : output . ResultRecordedTime !== undefined && output . ResultRecordedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . ResultRecordedTime ) ) ) : undefined , } as any ; } ; const deserializeAws_json1_1ConformancePackInputParameter = ( output , context ) : ConformancePackInputParameter => { return { ParameterName : __expectString ( output . ParameterName ) , ParameterValue : __expectString ( output . ParameterValue ) , } as any ; } ; const deserializeAws_json1_1ConformancePackInputParameters = ( output , context ) : ConformancePackInputParameter [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ConformancePackInputParameter ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ConformancePackRuleCompliance = ( output , context ) : ConformancePackRuleCompliance => { return { ComplianceType : __expectString ( output . ComplianceType ) , ConfigRuleName : __expectString ( output . ConfigRuleName ) , Controls : output . Controls !== undefined && output . Controls !== null ? deserializeAws_json1_1ControlsList ( output . Controls , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ConformancePackRuleComplianceList = ( output , context ) : ConformancePackRuleCompliance [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ConformancePackRuleCompliance ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ConformancePackRuleEvaluationResultsList = ( output , context ) : ConformancePackEvaluationResult [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ConformancePackEvaluationResult ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ConformancePackStatusDetail = ( output , context ) : ConformancePackStatusDetail => { return { ConformancePackArn : __expectString ( output . ConformancePackArn ) , ConformancePackId : __expectString ( output . ConformancePackId ) , ConformancePackName : __expectString ( output . ConformancePackName ) , ConformancePackState : __expectString ( output . ConformancePackState ) , ConformancePackStatusReason : __expectString ( output . ConformancePackStatusReason ) , LastUpdateCompletedTime : output . LastUpdateCompletedTime !== undefined && output . LastUpdateCompletedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastUpdateCompletedTime ) ) ) : undefined , LastUpdateRequestedTime : output . LastUpdateRequestedTime !== undefined && output . LastUpdateRequestedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastUpdateRequestedTime ) ) ) : undefined , StackArn : __expectString ( output . StackArn ) , } as any ; } ; const deserializeAws_json1_1ConformancePackStatusDetailsList = ( output , context ) : ConformancePackStatusDetail [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ConformancePackStatusDetail ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ConformancePackTemplateValidationException = ( output , context ) : ConformancePackTemplateValidationException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1ControlsList = ( 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_1DeleteEvaluationResultsResponse = ( output , context ) : DeleteEvaluationResultsResponse => { return { } as any ; } ; const deserializeAws_json1_1DeleteRemediationConfigurationResponse = ( output , context ) : DeleteRemediationConfigurationResponse => { return { } as any ; } ; const deserializeAws_json1_1DeleteRemediationExceptionsResponse = ( output , context ) : DeleteRemediationExceptionsResponse => { return { FailedBatches : output . FailedBatches !== undefined && output . FailedBatches !== null ? deserializeAws_json1_1FailedDeleteRemediationExceptionsBatches ( output . FailedBatches , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteStoredQueryResponse = ( output , context ) : DeleteStoredQueryResponse => { return { } as any ; } ; const deserializeAws_json1_1DeliverConfigSnapshotResponse = ( output , context ) : DeliverConfigSnapshotResponse => { return { configSnapshotId : __expectString ( output . configSnapshotId ) , } as any ; } ; const deserializeAws_json1_1DeliveryChannel = ( output , context ) : DeliveryChannel => { return { configSnapshotDeliveryProperties : output . configSnapshotDeliveryProperties !== undefined && output . configSnapshotDeliveryProperties !== null ? deserializeAws_json1_1ConfigSnapshotDeliveryProperties ( output . configSnapshotDeliveryProperties , context ) : undefined , name : __expectString ( output . name ) , s3BucketName : __expectString ( output . s3BucketName ) , s3KeyPrefix : __expectString ( output . s3KeyPrefix ) , s3KmsKeyArn : __expectString ( output . s3KmsKeyArn ) , snsTopicARN : __expectString ( output . snsTopicARN ) , } as any ; } ; const deserializeAws_json1_1DeliveryChannelList = ( output , context ) : DeliveryChannel [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1DeliveryChannel ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1DeliveryChannelStatus = ( output , context ) : DeliveryChannelStatus => { return { configHistoryDeliveryInfo : output . configHistoryDeliveryInfo !== undefined && output . configHistoryDeliveryInfo !== null ? deserializeAws_json1_1ConfigExportDeliveryInfo ( output . configHistoryDeliveryInfo , context ) : undefined , configSnapshotDeliveryInfo : output . configSnapshotDeliveryInfo !== undefined && output . configSnapshotDeliveryInfo !== null ? deserializeAws_json1_1ConfigExportDeliveryInfo ( output . configSnapshotDeliveryInfo , context ) : undefined , configStreamDeliveryInfo : output . configStreamDeliveryInfo !== undefined && output . configStreamDeliveryInfo !== null ? deserializeAws_json1_1ConfigStreamDeliveryInfo ( output . configStreamDeliveryInfo , context ) : undefined , name : __expectString ( output . name ) , } as any ; } ; const deserializeAws_json1_1DeliveryChannelStatusList = ( output , context ) : DeliveryChannelStatus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1DeliveryChannelStatus ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1DescribeAggregateComplianceByConfigRulesResponse = ( output , context ) : DescribeAggregateComplianceByConfigRulesResponse => { return { AggregateComplianceByConfigRules : output . AggregateComplianceByConfigRules !== undefined && output . AggregateComplianceByConfigRules !== null ? deserializeAws_json1_1AggregateComplianceByConfigRuleList ( output . AggregateComplianceByConfigRules , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1DescribeAggregateComplianceByConformancePacksResponse = ( output , context ) : DescribeAggregateComplianceByConformancePacksResponse => { return { AggregateComplianceByConformancePacks : output . AggregateComplianceByConformancePacks !== undefined && output . AggregateComplianceByConformancePacks !== null ? deserializeAws_json1_1AggregateComplianceByConformancePackList ( output . AggregateComplianceByConformancePacks , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1DescribeAggregationAuthorizationsResponse = ( output , context ) : DescribeAggregationAuthorizationsResponse => { return { AggregationAuthorizations : output . AggregationAuthorizations !== undefined && output . AggregationAuthorizations !== null ? deserializeAws_json1_1AggregationAuthorizationList ( output . AggregationAuthorizations , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1DescribeComplianceByConfigRuleResponse = ( output , context ) : DescribeComplianceByConfigRuleResponse => { return { ComplianceByConfigRules : output . ComplianceByConfigRules !== undefined && output . ComplianceByConfigRules !== null ? deserializeAws_json1_1ComplianceByConfigRules ( output . ComplianceByConfigRules , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1DescribeComplianceByResourceResponse = ( output , context ) : DescribeComplianceByResourceResponse => { return { ComplianceByResources : output . ComplianceByResources !== undefined && output . ComplianceByResources !== null ? deserializeAws_json1_1ComplianceByResources ( output . ComplianceByResources , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1DescribeConfigRuleEvaluationStatusResponse = ( output , context ) : DescribeConfigRuleEvaluationStatusResponse => { return { ConfigRulesEvaluationStatus : output . ConfigRulesEvaluationStatus !== undefined && output . ConfigRulesEvaluationStatus !== null ? deserializeAws_json1_1ConfigRuleEvaluationStatusList ( output . ConfigRulesEvaluationStatus , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1DescribeConfigRulesResponse = ( output , context ) : DescribeConfigRulesResponse => { return { ConfigRules : output . ConfigRules !== undefined && output . ConfigRules !== null ? deserializeAws_json1_1ConfigRules ( output . ConfigRules , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1DescribeConfigurationAggregatorSourcesStatusResponse = ( output , context ) : DescribeConfigurationAggregatorSourcesStatusResponse => { return { AggregatedSourceStatusList : output . AggregatedSourceStatusList !== undefined && output . AggregatedSourceStatusList !== null ? deserializeAws_json1_1AggregatedSourceStatusList ( output . AggregatedSourceStatusList , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1DescribeConfigurationAggregatorsResponse = ( output , context ) : DescribeConfigurationAggregatorsResponse => { return { ConfigurationAggregators : output . ConfigurationAggregators !== undefined && output . ConfigurationAggregators !== null ? deserializeAws_json1_1ConfigurationAggregatorList ( output . ConfigurationAggregators , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1DescribeConfigurationRecordersResponse = ( output , context ) : DescribeConfigurationRecordersResponse => { return { ConfigurationRecorders : output . ConfigurationRecorders !== undefined && output . ConfigurationRecorders !== null ? deserializeAws_json1_1ConfigurationRecorderList ( output . ConfigurationRecorders , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeConfigurationRecorderStatusResponse = ( output , context ) : DescribeConfigurationRecorderStatusResponse => { return { ConfigurationRecordersStatus : output . ConfigurationRecordersStatus !== undefined && output . ConfigurationRecordersStatus !== null ? deserializeAws_json1_1ConfigurationRecorderStatusList ( output . ConfigurationRecordersStatus , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeConformancePackComplianceResponse = ( output , context ) : DescribeConformancePackComplianceResponse => { return { ConformancePackName : __expectString ( output . ConformancePackName ) , ConformancePackRuleComplianceList : output . ConformancePackRuleComplianceList !== undefined && output . ConformancePackRuleComplianceList !== null ? deserializeAws_json1_1ConformancePackRuleComplianceList ( output . ConformancePackRuleComplianceList , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1DescribeConformancePacksResponse = ( output , context ) : DescribeConformancePacksResponse => { return { ConformancePackDetails : output . ConformancePackDetails !== undefined && output . ConformancePackDetails !== null ? deserializeAws_json1_1ConformancePackDetailList ( output . ConformancePackDetails , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1DescribeConformancePackStatusResponse = ( output , context ) : DescribeConformancePackStatusResponse => { return { ConformancePackStatusDetails : output . ConformancePackStatusDetails !== undefined && output . ConformancePackStatusDetails !== null ? deserializeAws_json1_1ConformancePackStatusDetailsList ( output . ConformancePackStatusDetails , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1DescribeDeliveryChannelsResponse = ( output , context ) : DescribeDeliveryChannelsResponse => { return { DeliveryChannels : output . DeliveryChannels !== undefined && output . DeliveryChannels !== null ? deserializeAws_json1_1DeliveryChannelList ( output . DeliveryChannels , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeDeliveryChannelStatusResponse = ( output , context ) : DescribeDeliveryChannelStatusResponse => { return { DeliveryChannelsStatus : output . DeliveryChannelsStatus !== undefined && output . DeliveryChannelsStatus !== null ? deserializeAws_json1_1DeliveryChannelStatusList ( output . DeliveryChannelsStatus , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeOrganizationConfigRulesResponse = ( output , context ) : DescribeOrganizationConfigRulesResponse => { return { NextToken : __expectString ( output . NextToken ) , OrganizationConfigRules : output . OrganizationConfigRules !== undefined && output . OrganizationConfigRules !== null ? deserializeAws_json1_1OrganizationConfigRules ( output . OrganizationConfigRules , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeOrganizationConfigRuleStatusesResponse = ( output , context ) : DescribeOrganizationConfigRuleStatusesResponse => { return { NextToken : __expectString ( output . NextToken ) , OrganizationConfigRuleStatuses : output . OrganizationConfigRuleStatuses !== undefined && output . OrganizationConfigRuleStatuses !== null ? deserializeAws_json1_1OrganizationConfigRuleStatuses ( output . OrganizationConfigRuleStatuses , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeOrganizationConformancePacksResponse = ( output , context ) : DescribeOrganizationConformancePacksResponse => { return { NextToken : __expectString ( output . NextToken ) , OrganizationConformancePacks : output . OrganizationConformancePacks !== undefined && output . OrganizationConformancePacks !== null ? deserializeAws_json1_1OrganizationConformancePacks ( output . OrganizationConformancePacks , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeOrganizationConformancePackStatusesResponse = ( output , context ) : DescribeOrganizationConformancePackStatusesResponse => { return { NextToken : __expectString ( output . NextToken ) , OrganizationConformancePackStatuses : output . OrganizationConformancePackStatuses !== undefined && output . OrganizationConformancePackStatuses !== null ? deserializeAws_json1_1OrganizationConformancePackStatuses ( output . OrganizationConformancePackStatuses , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribePendingAggregationRequestsResponse = ( output , context ) : DescribePendingAggregationRequestsResponse => { return { NextToken : __expectString ( output . NextToken ) , PendingAggregationRequests : output . PendingAggregationRequests !== undefined && output . PendingAggregationRequests !== null ? deserializeAws_json1_1PendingAggregationRequestList ( output . PendingAggregationRequests , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeRemediationConfigurationsResponse = ( output , context ) : DescribeRemediationConfigurationsResponse => { return { RemediationConfigurations : output . RemediationConfigurations !== undefined && output . RemediationConfigurations !== null ? deserializeAws_json1_1RemediationConfigurations ( output . RemediationConfigurations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeRemediationExceptionsResponse = ( output , context ) : DescribeRemediationExceptionsResponse => { return { NextToken : __expectString ( output . NextToken ) , RemediationExceptions : output . RemediationExceptions !== undefined && output . RemediationExceptions !== null ? deserializeAws_json1_1RemediationExceptions ( output . RemediationExceptions , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeRemediationExecutionStatusResponse = ( output , context ) : DescribeRemediationExecutionStatusResponse => { return { NextToken : __expectString ( output . NextToken ) , RemediationExecutionStatuses : output . RemediationExecutionStatuses !== undefined && output . RemediationExecutionStatuses !== null ? deserializeAws_json1_1RemediationExecutionStatuses ( output . RemediationExecutionStatuses , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DescribeRetentionConfigurationsResponse = ( output , context ) : DescribeRetentionConfigurationsResponse => { return { NextToken : __expectString ( output . NextToken ) , RetentionConfigurations : output . RetentionConfigurations !== undefined && output . RetentionConfigurations !== null ? deserializeAws_json1_1RetentionConfigurationList ( output . RetentionConfigurations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DiscoveredResourceIdentifierList = ( output , context ) : AggregateResourceIdentifier [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1AggregateResourceIdentifier ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1Evaluation = ( output , context ) : Evaluation => { return { Annotation : __expectString ( output . Annotation ) , ComplianceResourceId : __expectString ( output . ComplianceResourceId ) , ComplianceResourceType : __expectString ( output . ComplianceResourceType ) , ComplianceType : __expectString ( output . ComplianceType ) , OrderingTimestamp : output . OrderingTimestamp !== undefined && output . OrderingTimestamp !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . OrderingTimestamp ) ) ) : undefined , } as any ; } ; const deserializeAws_json1_1EvaluationResult = ( output , context ) : EvaluationResult => { return { Annotation : __expectString ( output . Annotation ) , ComplianceType : __expectString ( output . ComplianceType ) , ConfigRuleInvokedTime : output . ConfigRuleInvokedTime !== undefined && output . ConfigRuleInvokedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . ConfigRuleInvokedTime ) ) ) : undefined , EvaluationResultIdentifier : output . EvaluationResultIdentifier !== undefined && output . EvaluationResultIdentifier !== null ? deserializeAws_json1_1EvaluationResultIdentifier ( output . EvaluationResultIdentifier , context ) : undefined , ResultRecordedTime : output . ResultRecordedTime !== undefined && output . ResultRecordedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . ResultRecordedTime ) ) ) : undefined , ResultToken : __expectString ( output . ResultToken ) , } as any ; } ; const deserializeAws_json1_1EvaluationResultIdentifier = ( output , context ) : EvaluationResultIdentifier => { return { EvaluationResultQualifier : output . EvaluationResultQualifier !== undefined && output . EvaluationResultQualifier !== null ? deserializeAws_json1_1EvaluationResultQualifier ( output . EvaluationResultQualifier , context ) : undefined , OrderingTimestamp : output . OrderingTimestamp !== undefined && output . OrderingTimestamp !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . OrderingTimestamp ) ) ) : undefined , } as any ; } ; const deserializeAws_json1_1EvaluationResultQualifier = ( output , context ) : EvaluationResultQualifier => { return { ConfigRuleName : __expectString ( output . ConfigRuleName ) , ResourceId : __expectString ( output . ResourceId ) , ResourceType : __expectString ( output . ResourceType ) , } as any ; } ; const deserializeAws_json1_1EvaluationResults = ( output , context ) : EvaluationResult [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1EvaluationResult ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1Evaluations = ( output , context ) : Evaluation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Evaluation ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ExcludedAccounts = ( 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_1ExecutionControls = ( output , context ) : ExecutionControls => { return { SsmControls : output . SsmControls !== undefined && output . SsmControls !== null ? deserializeAws_json1_1SsmControls ( output . SsmControls , context ) : undefined , } as any ; } ; const deserializeAws_json1_1FailedDeleteRemediationExceptionsBatch = ( output , context ) : FailedDeleteRemediationExceptionsBatch => { return { FailedItems : output . FailedItems !== undefined && output . FailedItems !== null ? deserializeAws_json1_1RemediationExceptionResourceKeys ( output . FailedItems , context ) : undefined , FailureMessage : __expectString ( output . FailureMessage ) , } as any ; } ; const deserializeAws_json1_1FailedDeleteRemediationExceptionsBatches = ( output , context ) : FailedDeleteRemediationExceptionsBatch [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1FailedDeleteRemediationExceptionsBatch ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1FailedRemediationBatch = ( output , context ) : FailedRemediationBatch => { return { FailedItems : output . FailedItems !== undefined && output . FailedItems !== null ? deserializeAws_json1_1RemediationConfigurations ( output . FailedItems , context ) : undefined , FailureMessage : __expectString ( output . FailureMessage ) , } as any ; } ; const deserializeAws_json1_1FailedRemediationBatches = ( output , context ) : FailedRemediationBatch [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1FailedRemediationBatch ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1FailedRemediationExceptionBatch = ( output , context ) : FailedRemediationExceptionBatch => { return { FailedItems : output . FailedItems !== undefined && output . FailedItems !== null ? deserializeAws_json1_1RemediationExceptions ( output . FailedItems , context ) : undefined , FailureMessage : __expectString ( output . FailureMessage ) , } as any ; } ; const deserializeAws_json1_1FailedRemediationExceptionBatches = ( output , context ) : FailedRemediationExceptionBatch [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1FailedRemediationExceptionBatch ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1FieldInfo = ( output , context ) : FieldInfo => { return { Name : __expectString ( output . Name ) , } as any ; } ; const deserializeAws_json1_1FieldInfoList = ( output , context ) : FieldInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1FieldInfo ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1GetAggregateComplianceDetailsByConfigRuleResponse = ( output , context ) : GetAggregateComplianceDetailsByConfigRuleResponse => { return { AggregateEvaluationResults : output . AggregateEvaluationResults !== undefined && output . AggregateEvaluationResults !== null ? deserializeAws_json1_1AggregateEvaluationResultList ( output . AggregateEvaluationResults , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1GetAggregateConfigRuleComplianceSummaryResponse = ( output , context ) : GetAggregateConfigRuleComplianceSummaryResponse => { return { AggregateComplianceCounts : output . AggregateComplianceCounts !== undefined && output . AggregateComplianceCounts !== null ? deserializeAws_json1_1AggregateComplianceCountList ( output . AggregateComplianceCounts , context ) : undefined , GroupByKey : __expectString ( output . GroupByKey ) , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1GetAggregateConformancePackComplianceSummaryResponse = ( output , context ) : GetAggregateConformancePackComplianceSummaryResponse => { return { AggregateConformancePackComplianceSummaries : output . AggregateConformancePackComplianceSummaries !== undefined && output . AggregateConformancePackComplianceSummaries !== null ? deserializeAws_json1_1AggregateConformancePackComplianceSummaryList ( output . AggregateConformancePackComplianceSummaries , context ) : undefined , GroupByKey : __expectString ( output . GroupByKey ) , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1GetAggregateDiscoveredResourceCountsResponse = ( output , context ) : GetAggregateDiscoveredResourceCountsResponse => { return { GroupByKey : __expectString ( output . GroupByKey ) , GroupedResourceCounts : output . GroupedResourceCounts !== undefined && output . GroupedResourceCounts !== null ? deserializeAws_json1_1GroupedResourceCountList ( output . GroupedResourceCounts , context ) : undefined , NextToken : __expectString ( output . NextToken ) , TotalDiscoveredResources : __expectLong ( output . TotalDiscoveredResources ) , } as any ; } ; const deserializeAws_json1_1GetAggregateResourceConfigResponse = ( output , context ) : GetAggregateResourceConfigResponse => { return { ConfigurationItem : output . ConfigurationItem !== undefined && output . ConfigurationItem !== null ? deserializeAws_json1_1ConfigurationItem ( output . ConfigurationItem , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetComplianceDetailsByConfigRuleResponse = ( output , context ) : GetComplianceDetailsByConfigRuleResponse => { return { EvaluationResults : output . EvaluationResults !== undefined && output . EvaluationResults !== null ? deserializeAws_json1_1EvaluationResults ( output . EvaluationResults , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1GetComplianceDetailsByResourceResponse = ( output , context ) : GetComplianceDetailsByResourceResponse => { return { EvaluationResults : output . EvaluationResults !== undefined && output . EvaluationResults !== null ? deserializeAws_json1_1EvaluationResults ( output . EvaluationResults , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1GetComplianceSummaryByConfigRuleResponse = ( output , context ) : GetComplianceSummaryByConfigRuleResponse => { return { ComplianceSummary : output . ComplianceSummary !== undefined && output . ComplianceSummary !== null ? deserializeAws_json1_1ComplianceSummary ( output . ComplianceSummary , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetComplianceSummaryByResourceTypeResponse = ( output , context ) : GetComplianceSummaryByResourceTypeResponse => { return { ComplianceSummariesByResourceType : output . ComplianceSummariesByResourceType !== undefined && output . ComplianceSummariesByResourceType !== null ? deserializeAws_json1_1ComplianceSummariesByResourceType ( output . ComplianceSummariesByResourceType , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetConformancePackComplianceDetailsResponse = ( output , context ) : GetConformancePackComplianceDetailsResponse => { return { ConformancePackName : __expectString ( output . ConformancePackName ) , ConformancePackRuleEvaluationResults : output . ConformancePackRuleEvaluationResults !== undefined && output . ConformancePackRuleEvaluationResults !== null ? deserializeAws_json1_1ConformancePackRuleEvaluationResultsList ( output . ConformancePackRuleEvaluationResults , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1GetConformancePackComplianceSummaryResponse = ( output , context ) : GetConformancePackComplianceSummaryResponse => { return { ConformancePackComplianceSummaryList : output . ConformancePackComplianceSummaryList !== undefined && output . ConformancePackComplianceSummaryList !== null ? deserializeAws_json1_1ConformancePackComplianceSummaryList ( output . ConformancePackComplianceSummaryList , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1GetDiscoveredResourceCountsResponse = ( output , context ) : GetDiscoveredResourceCountsResponse => { return { nextToken : __expectString ( output . nextToken ) , resourceCounts : output . resourceCounts !== undefined && output . resourceCounts !== null ? deserializeAws_json1_1ResourceCounts ( output . resourceCounts , context ) : undefined , totalDiscoveredResources : __expectLong ( output . totalDiscoveredResources ) , } as any ; } ; const deserializeAws_json1_1GetOrganizationConfigRuleDetailedStatusResponse = ( output , context ) : GetOrganizationConfigRuleDetailedStatusResponse => { return { NextToken : __expectString ( output . NextToken ) , OrganizationConfigRuleDetailedStatus : output . OrganizationConfigRuleDetailedStatus !== undefined && output . OrganizationConfigRuleDetailedStatus !== null ? deserializeAws_json1_1OrganizationConfigRuleDetailedStatus ( output . OrganizationConfigRuleDetailedStatus , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetOrganizationConformancePackDetailedStatusResponse = ( output , context ) : GetOrganizationConformancePackDetailedStatusResponse => { return { NextToken : __expectString ( output . NextToken ) , OrganizationConformancePackDetailedStatuses : output . OrganizationConformancePackDetailedStatuses !== undefined && output . OrganizationConformancePackDetailedStatuses !== null ? deserializeAws_json1_1OrganizationConformancePackDetailedStatuses ( output . OrganizationConformancePackDetailedStatuses , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetResourceConfigHistoryResponse = ( output , context ) : GetResourceConfigHistoryResponse => { return { configurationItems : output . configurationItems !== undefined && output . configurationItems !== null ? deserializeAws_json1_1ConfigurationItemList ( output . configurationItems , context ) : undefined , nextToken : __expectString ( output . nextToken ) , } as any ; } ; const deserializeAws_json1_1GetStoredQueryResponse = ( output , context ) : GetStoredQueryResponse => { return { StoredQuery : output . StoredQuery !== undefined && output . StoredQuery !== null ? deserializeAws_json1_1StoredQuery ( output . StoredQuery , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GroupedResourceCount = ( output , context ) : GroupedResourceCount => { return { GroupName : __expectString ( output . GroupName ) , ResourceCount : __expectLong ( output . ResourceCount ) , } as any ; } ; const deserializeAws_json1_1GroupedResourceCountList = ( output , context ) : GroupedResourceCount [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1GroupedResourceCount ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1InsufficientDeliveryPolicyException = ( output , context ) : InsufficientDeliveryPolicyException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1InsufficientPermissionsException = ( output , context ) : InsufficientPermissionsException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1InvalidConfigurationRecorderNameException = ( output , context ) : InvalidConfigurationRecorderNameException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1InvalidDeliveryChannelNameException = ( output , context ) : InvalidDeliveryChannelNameException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1InvalidExpressionException = ( output , context ) : InvalidExpressionException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1InvalidLimitException = ( output , context ) : InvalidLimitException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1InvalidNextTokenException = ( output , context ) : InvalidNextTokenException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1InvalidParameterValueException = ( output , context ) : InvalidParameterValueException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1InvalidRecordingGroupException = ( output , context ) : InvalidRecordingGroupException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1InvalidResultTokenException = ( output , context ) : InvalidResultTokenException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1InvalidRoleException = ( output , context ) : InvalidRoleException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1InvalidS3KeyPrefixException = ( output , context ) : InvalidS3KeyPrefixException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1InvalidS3KmsKeyArnException = ( output , context ) : InvalidS3KmsKeyArnException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1InvalidSNSTopicARNException = ( output , context ) : InvalidSNSTopicARNException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1InvalidTimeRangeException = ( output , context ) : InvalidTimeRangeException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1LastDeliveryChannelDeleteFailedException = ( output , context ) : LastDeliveryChannelDeleteFailedException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1LimitExceededException = ( output , context ) : LimitExceededException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1ListAggregateDiscoveredResourcesResponse = ( output , context ) : ListAggregateDiscoveredResourcesResponse => { return { NextToken : __expectString ( output . NextToken ) , ResourceIdentifiers : output . ResourceIdentifiers !== undefined && output . ResourceIdentifiers !== null ? deserializeAws_json1_1DiscoveredResourceIdentifierList ( output . ResourceIdentifiers , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ListDiscoveredResourcesResponse = ( output , context ) : ListDiscoveredResourcesResponse => { return { nextToken : __expectString ( output . nextToken ) , resourceIdentifiers : output . resourceIdentifiers !== undefined && output . resourceIdentifiers !== null ? deserializeAws_json1_1ResourceIdentifierList ( output . resourceIdentifiers , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ListStoredQueriesResponse = ( output , context ) : ListStoredQueriesResponse => { return { NextToken : __expectString ( output . NextToken ) , StoredQueryMetadata : output . StoredQueryMetadata !== undefined && output . StoredQueryMetadata !== null ? deserializeAws_json1_1StoredQueryMetadataList ( output . StoredQueryMetadata , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ListTagsForResourceResponse = ( output , context ) : ListTagsForResourceResponse => { return { NextToken : __expectString ( output . NextToken ) , Tags : output . Tags !== undefined && output . Tags !== null ? deserializeAws_json1_1TagList ( output . Tags , context ) : undefined , } as any ; } ; const deserializeAws_json1_1MaxActiveResourcesExceededException = ( output , context ) : MaxActiveResourcesExceededException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1MaxNumberOfConfigRulesExceededException = ( output , context ) : MaxNumberOfConfigRulesExceededException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1MaxNumberOfConfigurationRecordersExceededException = ( output , context ) : MaxNumberOfConfigurationRecordersExceededException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1MaxNumberOfConformancePacksExceededException = ( output , context ) : MaxNumberOfConformancePacksExceededException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1MaxNumberOfDeliveryChannelsExceededException = ( output , context ) : MaxNumberOfDeliveryChannelsExceededException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1MaxNumberOfOrganizationConfigRulesExceededException = ( output , context ) : MaxNumberOfOrganizationConfigRulesExceededException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1MaxNumberOfOrganizationConformancePacksExceededException = ( output , context ) : MaxNumberOfOrganizationConformancePacksExceededException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1MaxNumberOfRetentionConfigurationsExceededException = ( output , context ) : MaxNumberOfRetentionConfigurationsExceededException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1MemberAccountStatus = ( output , context ) : MemberAccountStatus => { return { AccountId : __expectString ( output . AccountId ) , ConfigRuleName : __expectString ( output . ConfigRuleName ) , ErrorCode : __expectString ( output . ErrorCode ) , ErrorMessage : __expectString ( output . ErrorMessage ) , LastUpdateTime : output . LastUpdateTime !== undefined && output . LastUpdateTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastUpdateTime ) ) ) : undefined , MemberAccountRuleStatus : __expectString ( output . MemberAccountRuleStatus ) , } as any ; } ; const deserializeAws_json1_1NoAvailableConfigurationRecorderException = ( output , context ) : NoAvailableConfigurationRecorderException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1NoAvailableDeliveryChannelException = ( output , context ) : NoAvailableDeliveryChannelException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1NoAvailableOrganizationException = ( output , context ) : NoAvailableOrganizationException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1NoRunningConfigurationRecorderException = ( output , context ) : NoRunningConfigurationRecorderException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1NoSuchBucketException = ( output , context ) : NoSuchBucketException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1NoSuchConfigRuleException = ( output , context ) : NoSuchConfigRuleException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1NoSuchConfigRuleInConformancePackException = ( output , context ) : NoSuchConfigRuleInConformancePackException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1NoSuchConfigurationAggregatorException = ( output , context ) : NoSuchConfigurationAggregatorException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1NoSuchConfigurationRecorderException = ( output , context ) : NoSuchConfigurationRecorderException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1NoSuchConformancePackException = ( output , context ) : NoSuchConformancePackException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1NoSuchDeliveryChannelException = ( output , context ) : NoSuchDeliveryChannelException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1NoSuchOrganizationConfigRuleException = ( output , context ) : NoSuchOrganizationConfigRuleException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1NoSuchOrganizationConformancePackException = ( output , context ) : NoSuchOrganizationConformancePackException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1NoSuchRemediationConfigurationException = ( output , context ) : NoSuchRemediationConfigurationException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1NoSuchRemediationExceptionException = ( output , context ) : NoSuchRemediationExceptionException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1NoSuchRetentionConfigurationException = ( output , context ) : NoSuchRetentionConfigurationException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1OrganizationAccessDeniedException = ( output , context ) : OrganizationAccessDeniedException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1OrganizationAggregationSource = ( output , context ) : OrganizationAggregationSource => { return { AllAwsRegions : __expectBoolean ( output . AllAwsRegions ) , AwsRegions : output . AwsRegions !== undefined && output . AwsRegions !== null ? deserializeAws_json1_1AggregatorRegionList ( output . AwsRegions , context ) : undefined , RoleArn : __expectString ( output . RoleArn ) , } as any ; } ; const deserializeAws_json1_1OrganizationAllFeaturesNotEnabledException = ( output , context ) : OrganizationAllFeaturesNotEnabledException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1OrganizationConfigRule = ( output , context ) : OrganizationConfigRule => { return { ExcludedAccounts : output . ExcludedAccounts !== undefined && output . ExcludedAccounts !== null ? deserializeAws_json1_1ExcludedAccounts ( output . ExcludedAccounts , context ) : undefined , LastUpdateTime : output . LastUpdateTime !== undefined && output . LastUpdateTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastUpdateTime ) ) ) : undefined , OrganizationConfigRuleArn : __expectString ( output . OrganizationConfigRuleArn ) , OrganizationConfigRuleName : __expectString ( output . OrganizationConfigRuleName ) , OrganizationCustomRuleMetadata : output . OrganizationCustomRuleMetadata !== undefined && output . OrganizationCustomRuleMetadata !== null ? deserializeAws_json1_1OrganizationCustomRuleMetadata ( output . OrganizationCustomRuleMetadata , context ) : undefined , OrganizationManagedRuleMetadata : output . OrganizationManagedRuleMetadata !== undefined && output . OrganizationManagedRuleMetadata !== null ? deserializeAws_json1_1OrganizationManagedRuleMetadata ( output . OrganizationManagedRuleMetadata , context ) : undefined , } as any ; } ; const deserializeAws_json1_1OrganizationConfigRuleDetailedStatus = ( output , context ) : MemberAccountStatus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1MemberAccountStatus ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1OrganizationConfigRules = ( output , context ) : OrganizationConfigRule [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1OrganizationConfigRule ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1OrganizationConfigRuleStatus = ( output , context ) : OrganizationConfigRuleStatus => { return { ErrorCode : __expectString ( output . ErrorCode ) , ErrorMessage : __expectString ( output . ErrorMessage ) , LastUpdateTime : output . LastUpdateTime !== undefined && output . LastUpdateTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastUpdateTime ) ) ) : undefined , OrganizationConfigRuleName : __expectString ( output . OrganizationConfigRuleName ) , OrganizationRuleStatus : __expectString ( output . OrganizationRuleStatus ) , } as any ; } ; const deserializeAws_json1_1OrganizationConfigRuleStatuses = ( output , context ) : OrganizationConfigRuleStatus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1OrganizationConfigRuleStatus ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1OrganizationConfigRuleTriggerTypes = ( output , context ) : ( OrganizationConfigRuleTriggerType | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_json1_1OrganizationConformancePack = ( output , context ) : OrganizationConformancePack => { return { ConformancePackInputParameters : output . ConformancePackInputParameters !== undefined && output . ConformancePackInputParameters !== null ? deserializeAws_json1_1ConformancePackInputParameters ( output . ConformancePackInputParameters , context ) : undefined , DeliveryS3Bucket : __expectString ( output . DeliveryS3Bucket ) , DeliveryS3KeyPrefix : __expectString ( output . DeliveryS3KeyPrefix ) , ExcludedAccounts : output . ExcludedAccounts !== undefined && output . ExcludedAccounts !== null ? deserializeAws_json1_1ExcludedAccounts ( output . ExcludedAccounts , context ) : undefined , LastUpdateTime : output . LastUpdateTime !== undefined && output . LastUpdateTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastUpdateTime ) ) ) : undefined , OrganizationConformancePackArn : __expectString ( output . OrganizationConformancePackArn ) , OrganizationConformancePackName : __expectString ( output . OrganizationConformancePackName ) , } as any ; } ; const deserializeAws_json1_1OrganizationConformancePackDetailedStatus = ( output , context ) : OrganizationConformancePackDetailedStatus => { return { AccountId : __expectString ( output . AccountId ) , ConformancePackName : __expectString ( output . ConformancePackName ) , ErrorCode : __expectString ( output . ErrorCode ) , ErrorMessage : __expectString ( output . ErrorMessage ) , LastUpdateTime : output . LastUpdateTime !== undefined && output . LastUpdateTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastUpdateTime ) ) ) : undefined , Status : __expectString ( output . Status ) , } as any ; } ; const deserializeAws_json1_1OrganizationConformancePackDetailedStatuses = ( output , context ) : OrganizationConformancePackDetailedStatus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1OrganizationConformancePackDetailedStatus ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1OrganizationConformancePacks = ( output , context ) : OrganizationConformancePack [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1OrganizationConformancePack ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1OrganizationConformancePackStatus = ( output , context ) : OrganizationConformancePackStatus => { return { ErrorCode : __expectString ( output . ErrorCode ) , ErrorMessage : __expectString ( output . ErrorMessage ) , LastUpdateTime : output . LastUpdateTime !== undefined && output . LastUpdateTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastUpdateTime ) ) ) : undefined , OrganizationConformancePackName : __expectString ( output . OrganizationConformancePackName ) , Status : __expectString ( output . Status ) , } as any ; } ; const deserializeAws_json1_1OrganizationConformancePackStatuses = ( output , context ) : OrganizationConformancePackStatus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1OrganizationConformancePackStatus ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1OrganizationConformancePackTemplateValidationException = ( output , context ) : OrganizationConformancePackTemplateValidationException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1OrganizationCustomRuleMetadata = ( output , context ) : OrganizationCustomRuleMetadata => { return { Description : __expectString ( output . Description ) , InputParameters : __expectString ( output . InputParameters ) , LambdaFunctionArn : __expectString ( output . LambdaFunctionArn ) , MaximumExecutionFrequency : __expectString ( output . MaximumExecutionFrequency ) , OrganizationConfigRuleTriggerTypes : output . OrganizationConfigRuleTriggerTypes !== undefined && output . OrganizationConfigRuleTriggerTypes !== null ? deserializeAws_json1_1OrganizationConfigRuleTriggerTypes ( output . OrganizationConfigRuleTriggerTypes , context ) : undefined , ResourceIdScope : __expectString ( output . ResourceIdScope ) , ResourceTypesScope : output . ResourceTypesScope !== undefined && output . ResourceTypesScope !== null ? deserializeAws_json1_1ResourceTypesScope ( output . ResourceTypesScope , context ) : undefined , TagKeyScope : __expectString ( output . TagKeyScope ) , TagValueScope : __expectString ( output . TagValueScope ) , } as any ; } ; const deserializeAws_json1_1OrganizationManagedRuleMetadata = ( output , context ) : OrganizationManagedRuleMetadata => { return { Description : __expectString ( output . Description ) , InputParameters : __expectString ( output . InputParameters ) , MaximumExecutionFrequency : __expectString ( output . MaximumExecutionFrequency ) , ResourceIdScope : __expectString ( output . ResourceIdScope ) , ResourceTypesScope : output . ResourceTypesScope !== undefined && output . ResourceTypesScope !== null ? deserializeAws_json1_1ResourceTypesScope ( output . ResourceTypesScope , context ) : undefined , RuleIdentifier : __expectString ( output . RuleIdentifier ) , TagKeyScope : __expectString ( output . TagKeyScope ) , TagValueScope : __expectString ( output . TagValueScope ) , } as any ; } ; const deserializeAws_json1_1OversizedConfigurationItemException = ( output , context ) : OversizedConfigurationItemException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1PendingAggregationRequest = ( output , context ) : PendingAggregationRequest => { return { RequesterAccountId : __expectString ( output . RequesterAccountId ) , RequesterAwsRegion : __expectString ( output . RequesterAwsRegion ) , } as any ; } ; const deserializeAws_json1_1PendingAggregationRequestList = ( output , context ) : PendingAggregationRequest [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1PendingAggregationRequest ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1PutAggregationAuthorizationResponse = ( output , context ) : PutAggregationAuthorizationResponse => { return { AggregationAuthorization : output . AggregationAuthorization !== undefined && output . AggregationAuthorization !== null ? deserializeAws_json1_1AggregationAuthorization ( output . AggregationAuthorization , context ) : undefined , } as any ; } ; const deserializeAws_json1_1PutConfigurationAggregatorResponse = ( output , context ) : PutConfigurationAggregatorResponse => { return { ConfigurationAggregator : output . ConfigurationAggregator !== undefined && output . ConfigurationAggregator !== null ? deserializeAws_json1_1ConfigurationAggregator ( output . ConfigurationAggregator , context ) : undefined , } as any ; } ; const deserializeAws_json1_1PutConformancePackResponse = ( output , context ) : PutConformancePackResponse => { return { ConformancePackArn : __expectString ( output . ConformancePackArn ) , } as any ; } ; const deserializeAws_json1_1PutEvaluationsResponse = ( output , context ) : PutEvaluationsResponse => { return { FailedEvaluations : output . FailedEvaluations !== undefined && output . FailedEvaluations !== null ? deserializeAws_json1_1Evaluations ( output . FailedEvaluations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1PutExternalEvaluationResponse = ( output , context ) : PutExternalEvaluationResponse => { return { } as any ; } ; const deserializeAws_json1_1PutOrganizationConfigRuleResponse = ( output , context ) : PutOrganizationConfigRuleResponse => { return { OrganizationConfigRuleArn : __expectString ( output . OrganizationConfigRuleArn ) , } as any ; } ; const deserializeAws_json1_1PutOrganizationConformancePackResponse = ( output , context ) : PutOrganizationConformancePackResponse => { return { OrganizationConformancePackArn : __expectString ( output . OrganizationConformancePackArn ) , } as any ; } ; const deserializeAws_json1_1PutRemediationConfigurationsResponse = ( output , context ) : PutRemediationConfigurationsResponse => { return { FailedBatches : output . FailedBatches !== undefined && output . FailedBatches !== null ? deserializeAws_json1_1FailedRemediationBatches ( output . FailedBatches , context ) : undefined , } as any ; } ; const deserializeAws_json1_1PutRemediationExceptionsResponse = ( output , context ) : PutRemediationExceptionsResponse => { return { FailedBatches : output . FailedBatches !== undefined && output . FailedBatches !== null ? deserializeAws_json1_1FailedRemediationExceptionBatches ( output . FailedBatches , context ) : undefined , } as any ; } ; const deserializeAws_json1_1PutRetentionConfigurationResponse = ( output , context ) : PutRetentionConfigurationResponse => { return { RetentionConfiguration : output . RetentionConfiguration !== undefined && output . RetentionConfiguration !== null ? deserializeAws_json1_1RetentionConfiguration ( output . RetentionConfiguration , context ) : undefined , } as any ; } ; const deserializeAws_json1_1PutStoredQueryResponse = ( output , context ) : PutStoredQueryResponse => { return { QueryArn : __expectString ( output . QueryArn ) , } as any ; } ; const deserializeAws_json1_1QueryInfo = ( output , context ) : QueryInfo => { return { SelectFields : output . SelectFields !== undefined && output . SelectFields !== null ? deserializeAws_json1_1FieldInfoList ( output . SelectFields , context ) : undefined , } as any ; } ; const deserializeAws_json1_1RecordingGroup = ( output , context ) : RecordingGroup => { return { allSupported : __expectBoolean ( output . allSupported ) , includeGlobalResourceTypes : __expectBoolean ( output . includeGlobalResourceTypes ) , resourceTypes : output . resourceTypes !== undefined && output . resourceTypes !== null ? deserializeAws_json1_1ResourceTypeList ( output . resourceTypes , context ) : undefined , } as any ; } ; const deserializeAws_json1_1RelatedEventList = ( 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_1Relationship = ( output , context ) : Relationship => { return { relationshipName : __expectString ( output . relationshipName ) , resourceId : __expectString ( output . resourceId ) , resourceName : __expectString ( output . resourceName ) , resourceType : __expectString ( output . resourceType ) , } as any ; } ; const deserializeAws_json1_1RelationshipList = ( output , context ) : Relationship [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Relationship ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1RemediationConfiguration = ( output , context ) : RemediationConfiguration => { return { Arn : __expectString ( output . Arn ) , Automatic : __expectBoolean ( output . Automatic ) , ConfigRuleName : __expectString ( output . ConfigRuleName ) , CreatedByService : __expectString ( output . CreatedByService ) , ExecutionControls : output . ExecutionControls !== undefined && output . ExecutionControls !== null ? deserializeAws_json1_1ExecutionControls ( output . ExecutionControls , context ) : undefined , MaximumAutomaticAttempts : __expectInt32 ( output . MaximumAutomaticAttempts ) , Parameters : output . Parameters !== undefined && output . Parameters !== null ? deserializeAws_json1_1RemediationParameters ( output . Parameters , context ) : undefined , ResourceType : __expectString ( output . ResourceType ) , RetryAttemptSeconds : __expectLong ( output . RetryAttemptSeconds ) , TargetId : __expectString ( output . TargetId ) , TargetType : __expectString ( output . TargetType ) , TargetVersion : __expectString ( output . TargetVersion ) , } as any ; } ; const deserializeAws_json1_1RemediationConfigurations = ( output , context ) : RemediationConfiguration [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1RemediationConfiguration ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1RemediationException = ( output , context ) : RemediationException => { return { ConfigRuleName : __expectString ( output . ConfigRuleName ) , ExpirationTime : output . ExpirationTime !== undefined && output . ExpirationTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . ExpirationTime ) ) ) : undefined , Message : __expectString ( output . Message ) , ResourceId : __expectString ( output . ResourceId ) , ResourceType : __expectString ( output . ResourceType ) , } as any ; } ; const deserializeAws_json1_1RemediationExceptionResourceKey = ( output , context ) : RemediationExceptionResourceKey => { return { ResourceId : __expectString ( output . ResourceId ) , ResourceType : __expectString ( output . ResourceType ) , } as any ; } ; const deserializeAws_json1_1RemediationExceptionResourceKeys = ( output , context ) : RemediationExceptionResourceKey [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1RemediationExceptionResourceKey ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1RemediationExceptions = ( output , context ) : RemediationException [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1RemediationException ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1RemediationExecutionStatus = ( output , context ) : RemediationExecutionStatus => { return { InvocationTime : output . InvocationTime !== undefined && output . InvocationTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . InvocationTime ) ) ) : undefined , LastUpdatedTime : output . LastUpdatedTime !== undefined && output . LastUpdatedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastUpdatedTime ) ) ) : undefined , ResourceKey : output . ResourceKey !== undefined && output . ResourceKey !== null ? deserializeAws_json1_1ResourceKey ( output . ResourceKey , context ) : undefined , State : __expectString ( output . State ) , StepDetails : output . StepDetails !== undefined && output . StepDetails !== null ? deserializeAws_json1_1RemediationExecutionSteps ( output . StepDetails , context ) : undefined , } as any ; } ; const deserializeAws_json1_1RemediationExecutionStatuses = ( output , context ) : RemediationExecutionStatus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1RemediationExecutionStatus ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1RemediationExecutionStep = ( output , context ) : RemediationExecutionStep => { return { ErrorMessage : __expectString ( output . ErrorMessage ) , Name : __expectString ( output . Name ) , StartTime : output . StartTime !== undefined && output . StartTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . StartTime ) ) ) : undefined , State : __expectString ( output . State ) , StopTime : output . StopTime !== undefined && output . StopTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . StopTime ) ) ) : undefined , } as any ; } ; const deserializeAws_json1_1RemediationExecutionSteps = ( output , context ) : RemediationExecutionStep [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1RemediationExecutionStep ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1RemediationInProgressException = ( output , context ) : RemediationInProgressException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1RemediationParameters = ( output , context ) : { [ key ] : RemediationParameterValue ; } => { return Object . entries ( output ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : deserializeAws_json1_1RemediationParameterValue ( value , context ) , } ; } , { } ) ; } ; const deserializeAws_json1_1RemediationParameterValue = ( output , context ) : RemediationParameterValue => { return { ResourceValue : output . ResourceValue !== undefined && output . ResourceValue !== null ? deserializeAws_json1_1ResourceValue ( output . ResourceValue , context ) : undefined , StaticValue : output . StaticValue !== undefined && output . StaticValue !== null ? deserializeAws_json1_1StaticValue ( output . StaticValue , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ResourceConcurrentModificationException = ( output , context ) : ResourceConcurrentModificationException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1ResourceCount = ( output , context ) : ResourceCount => { return { count : __expectLong ( output . count ) , resourceType : __expectString ( output . resourceType ) , } as any ; } ; const deserializeAws_json1_1ResourceCounts = ( output , context ) : ResourceCount [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ResourceCount ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ResourceIdentifier = ( output , context ) : ResourceIdentifier => { return { resourceDeletionTime : output . resourceDeletionTime !== undefined && output . resourceDeletionTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . resourceDeletionTime ) ) ) : undefined , resourceId : __expectString ( output . resourceId ) , resourceName : __expectString ( output . resourceName ) , resourceType : __expectString ( output . resourceType ) , } as any ; } ; const deserializeAws_json1_1ResourceIdentifierList = ( output , context ) : ResourceIdentifier [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ResourceIdentifier ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ResourceInUseException = ( output , context ) : ResourceInUseException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1ResourceKey = ( output , context ) : ResourceKey => { return { resourceId : __expectString ( output . resourceId ) , resourceType : __expectString ( output . resourceType ) , } as any ; } ; const deserializeAws_json1_1ResourceKeys = ( output , context ) : ResourceKey [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ResourceKey ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ResourceNotDiscoveredException = ( output , context ) : ResourceNotDiscoveredException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1ResourceNotFoundException = ( output , context ) : ResourceNotFoundException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1ResourceTypeList = ( output , context ) : ( ResourceType | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_json1_1ResourceTypesScope = ( 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_1ResourceValue = ( output , context ) : ResourceValue => { return { Value : __expectString ( output . Value ) , } as any ; } ; const deserializeAws_json1_1Results = ( 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_1RetentionConfiguration = ( output , context ) : RetentionConfiguration => { return { Name : __expectString ( output . Name ) , RetentionPeriodInDays : __expectInt32 ( output . RetentionPeriodInDays ) , } as any ; } ; const deserializeAws_json1_1RetentionConfigurationList = ( output , context ) : RetentionConfiguration [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1RetentionConfiguration ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1Scope = ( output , context ) : Scope => { return { ComplianceResourceId : __expectString ( output . ComplianceResourceId ) , ComplianceResourceTypes : output . ComplianceResourceTypes !== undefined && output . ComplianceResourceTypes !== null ? deserializeAws_json1_1ComplianceResourceTypes ( output . ComplianceResourceTypes , context ) : undefined , TagKey : __expectString ( output . TagKey ) , TagValue : __expectString ( output . TagValue ) , } as any ; } ; const deserializeAws_json1_1SelectAggregateResourceConfigResponse = ( output , context ) : SelectAggregateResourceConfigResponse => { return { NextToken : __expectString ( output . NextToken ) , QueryInfo : output . QueryInfo !== undefined && output . QueryInfo !== null ? deserializeAws_json1_1QueryInfo ( output . QueryInfo , context ) : undefined , Results : output . Results !== undefined && output . Results !== null ? deserializeAws_json1_1Results ( output . Results , context ) : undefined , } as any ; } ; const deserializeAws_json1_1SelectResourceConfigResponse = ( output , context ) : SelectResourceConfigResponse => { return { NextToken : __expectString ( output . NextToken ) , QueryInfo : output . QueryInfo !== undefined && output . QueryInfo !== null ? deserializeAws_json1_1QueryInfo ( output . QueryInfo , context ) : undefined , Results : output . Results !== undefined && output . Results !== null ? deserializeAws_json1_1Results ( output . Results , context ) : undefined , } as any ; } ; const deserializeAws_json1_1Source = ( output , context ) : Source => { return { Owner : __expectString ( output . Owner ) , SourceDetails : output . SourceDetails !== undefined && output . SourceDetails !== null ? deserializeAws_json1_1SourceDetails ( output . SourceDetails , context ) : undefined , SourceIdentifier : __expectString ( output . SourceIdentifier ) , } as any ; } ; const deserializeAws_json1_1SourceDetail = ( output , context ) : SourceDetail => { return { EventSource : __expectString ( output . EventSource ) , MaximumExecutionFrequency : __expectString ( output . MaximumExecutionFrequency ) , MessageType : __expectString ( output . MessageType ) , } as any ; } ; const deserializeAws_json1_1SourceDetails = ( output , context ) : SourceDetail [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1SourceDetail ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1SsmControls = ( output , context ) : SsmControls => { return { ConcurrentExecutionRatePercentage : __expectInt32 ( output . ConcurrentExecutionRatePercentage ) , ErrorPercentage : __expectInt32 ( output . ErrorPercentage ) , } as any ; } ; const deserializeAws_json1_1StartConfigRulesEvaluationResponse = ( output , context ) : StartConfigRulesEvaluationResponse => { return { } as any ; } ; const deserializeAws_json1_1StartRemediationExecutionResponse = ( output , context ) : StartRemediationExecutionResponse => { return { FailedItems : output . FailedItems !== undefined && output . FailedItems !== null ? deserializeAws_json1_1ResourceKeys ( output . FailedItems , context ) : undefined , FailureMessage : __expectString ( output . FailureMessage ) , } as any ; } ; const deserializeAws_json1_1StaticParameterValues = ( 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_1StaticValue = ( output , context ) : StaticValue => { return { Values : output . Values !== undefined && output . Values !== null ? deserializeAws_json1_1StaticParameterValues ( output . Values , context ) : undefined , } as any ; } ; const deserializeAws_json1_1StoredQuery = ( output , context ) : StoredQuery => { return { Description : __expectString ( output . Description ) , Expression : __expectString ( output . Expression ) , QueryArn : __expectString ( output . QueryArn ) , QueryId : __expectString ( output . QueryId ) , QueryName : __expectString ( output . QueryName ) , } as any ; } ; const deserializeAws_json1_1StoredQueryMetadata = ( output , context ) : StoredQueryMetadata => { return { Description : __expectString ( output . Description ) , QueryArn : __expectString ( output . QueryArn ) , QueryId : __expectString ( output . QueryId ) , QueryName : __expectString ( output . QueryName ) , } as any ; } ; const deserializeAws_json1_1StoredQueryMetadataList = ( output , context ) : StoredQueryMetadata [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1StoredQueryMetadata ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1SupplementaryConfiguration = ( output , context ) : { [ key ] : string ; } => { return Object . entries ( output ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : __expectString ( value ) as any , } ; } , { } ) ; } ; const deserializeAws_json1_1Tag = ( output , context ) : Tag => { return { Key : __expectString ( output . Key ) , 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_1Tags = ( output , context ) : { [ key ] : string ; } => { return Object . entries ( output ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : __expectString ( value ) as any , } ; } , { } ) ; } ; const deserializeAws_json1_1TooManyTagsException = ( output , context ) : TooManyTagsException => { return { message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1UnprocessedResourceIdentifierList = ( output , context ) : AggregateResourceIdentifier [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1AggregateResourceIdentifier ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ValidationException = ( output , context ) : ValidationException => { return { message : __expectString ( output . message ) , } as any ; } ; 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 "" ; } ;