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 , limitedParseDouble as __limitedParseDouble , limitedParseFloat32 as __limitedParseFloat32 , parseEpochTimestamp as __parseEpochTimestamp , serializeFloat as __serializeFloat , } 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 { AllocateStaticIpCommandInput , AllocateStaticIpCommandOutput } from "../commands/AllocateStaticIpCommand" ; import { AttachCertificateToDistributionCommandInput , AttachCertificateToDistributionCommandOutput , } from "../commands/AttachCertificateToDistributionCommand" ; import { AttachDiskCommandInput , AttachDiskCommandOutput } from "../commands/AttachDiskCommand" ; import { AttachInstancesToLoadBalancerCommandInput , AttachInstancesToLoadBalancerCommandOutput , } from "../commands/AttachInstancesToLoadBalancerCommand" ; import { AttachLoadBalancerTlsCertificateCommandInput , AttachLoadBalancerTlsCertificateCommandOutput , } from "../commands/AttachLoadBalancerTlsCertificateCommand" ; import { AttachStaticIpCommandInput , AttachStaticIpCommandOutput } from "../commands/AttachStaticIpCommand" ; import { CloseInstancePublicPortsCommandInput , CloseInstancePublicPortsCommandOutput , } from "../commands/CloseInstancePublicPortsCommand" ; import { CopySnapshotCommandInput , CopySnapshotCommandOutput } from "../commands/CopySnapshotCommand" ; import { CreateBucketAccessKeyCommandInput , CreateBucketAccessKeyCommandOutput , } from "../commands/CreateBucketAccessKeyCommand" ; import { CreateBucketCommandInput , CreateBucketCommandOutput } from "../commands/CreateBucketCommand" ; import { CreateCertificateCommandInput , CreateCertificateCommandOutput } from "../commands/CreateCertificateCommand" ; import { CreateCloudFormationStackCommandInput , CreateCloudFormationStackCommandOutput , } from "../commands/CreateCloudFormationStackCommand" ; import { CreateContactMethodCommandInput , CreateContactMethodCommandOutput , } from "../commands/CreateContactMethodCommand" ; import { CreateContainerServiceCommandInput , CreateContainerServiceCommandOutput , } from "../commands/CreateContainerServiceCommand" ; import { CreateContainerServiceDeploymentCommandInput , CreateContainerServiceDeploymentCommandOutput , } from "../commands/CreateContainerServiceDeploymentCommand" ; import { CreateContainerServiceRegistryLoginCommandInput , CreateContainerServiceRegistryLoginCommandOutput , } from "../commands/CreateContainerServiceRegistryLoginCommand" ; import { CreateDiskCommandInput , CreateDiskCommandOutput } from "../commands/CreateDiskCommand" ; import { CreateDiskFromSnapshotCommandInput , CreateDiskFromSnapshotCommandOutput , } from "../commands/CreateDiskFromSnapshotCommand" ; import { CreateDiskSnapshotCommandInput , CreateDiskSnapshotCommandOutput } from "../commands/CreateDiskSnapshotCommand" ; import { CreateDistributionCommandInput , CreateDistributionCommandOutput } from "../commands/CreateDistributionCommand" ; import { CreateDomainCommandInput , CreateDomainCommandOutput } from "../commands/CreateDomainCommand" ; import { CreateDomainEntryCommandInput , CreateDomainEntryCommandOutput } from "../commands/CreateDomainEntryCommand" ; import { CreateInstancesCommandInput , CreateInstancesCommandOutput } from "../commands/CreateInstancesCommand" ; import { CreateInstancesFromSnapshotCommandInput , CreateInstancesFromSnapshotCommandOutput , } from "../commands/CreateInstancesFromSnapshotCommand" ; import { CreateInstanceSnapshotCommandInput , CreateInstanceSnapshotCommandOutput , } from "../commands/CreateInstanceSnapshotCommand" ; import { CreateKeyPairCommandInput , CreateKeyPairCommandOutput } from "../commands/CreateKeyPairCommand" ; import { CreateLoadBalancerCommandInput , CreateLoadBalancerCommandOutput } from "../commands/CreateLoadBalancerCommand" ; import { CreateLoadBalancerTlsCertificateCommandInput , CreateLoadBalancerTlsCertificateCommandOutput , } from "../commands/CreateLoadBalancerTlsCertificateCommand" ; import { CreateRelationalDatabaseCommandInput , CreateRelationalDatabaseCommandOutput , } from "../commands/CreateRelationalDatabaseCommand" ; import { CreateRelationalDatabaseFromSnapshotCommandInput , CreateRelationalDatabaseFromSnapshotCommandOutput , } from "../commands/CreateRelationalDatabaseFromSnapshotCommand" ; import { CreateRelationalDatabaseSnapshotCommandInput , CreateRelationalDatabaseSnapshotCommandOutput , } from "../commands/CreateRelationalDatabaseSnapshotCommand" ; import { DeleteAlarmCommandInput , DeleteAlarmCommandOutput } from "../commands/DeleteAlarmCommand" ; import { DeleteAutoSnapshotCommandInput , DeleteAutoSnapshotCommandOutput } from "../commands/DeleteAutoSnapshotCommand" ; import { DeleteBucketAccessKeyCommandInput , DeleteBucketAccessKeyCommandOutput , } from "../commands/DeleteBucketAccessKeyCommand" ; import { DeleteBucketCommandInput , DeleteBucketCommandOutput } from "../commands/DeleteBucketCommand" ; import { DeleteCertificateCommandInput , DeleteCertificateCommandOutput } from "../commands/DeleteCertificateCommand" ; import { DeleteContactMethodCommandInput , DeleteContactMethodCommandOutput , } from "../commands/DeleteContactMethodCommand" ; import { DeleteContainerImageCommandInput , DeleteContainerImageCommandOutput , } from "../commands/DeleteContainerImageCommand" ; import { DeleteContainerServiceCommandInput , DeleteContainerServiceCommandOutput , } from "../commands/DeleteContainerServiceCommand" ; import { DeleteDiskCommandInput , DeleteDiskCommandOutput } from "../commands/DeleteDiskCommand" ; import { DeleteDiskSnapshotCommandInput , DeleteDiskSnapshotCommandOutput } from "../commands/DeleteDiskSnapshotCommand" ; import { DeleteDistributionCommandInput , DeleteDistributionCommandOutput } from "../commands/DeleteDistributionCommand" ; import { DeleteDomainCommandInput , DeleteDomainCommandOutput } from "../commands/DeleteDomainCommand" ; import { DeleteDomainEntryCommandInput , DeleteDomainEntryCommandOutput } from "../commands/DeleteDomainEntryCommand" ; import { DeleteInstanceCommandInput , DeleteInstanceCommandOutput } from "../commands/DeleteInstanceCommand" ; import { DeleteInstanceSnapshotCommandInput , DeleteInstanceSnapshotCommandOutput , } from "../commands/DeleteInstanceSnapshotCommand" ; import { DeleteKeyPairCommandInput , DeleteKeyPairCommandOutput } from "../commands/DeleteKeyPairCommand" ; import { DeleteKnownHostKeysCommandInput , DeleteKnownHostKeysCommandOutput , } from "../commands/DeleteKnownHostKeysCommand" ; import { DeleteLoadBalancerCommandInput , DeleteLoadBalancerCommandOutput } from "../commands/DeleteLoadBalancerCommand" ; import { DeleteLoadBalancerTlsCertificateCommandInput , DeleteLoadBalancerTlsCertificateCommandOutput , } from "../commands/DeleteLoadBalancerTlsCertificateCommand" ; import { DeleteRelationalDatabaseCommandInput , DeleteRelationalDatabaseCommandOutput , } from "../commands/DeleteRelationalDatabaseCommand" ; import { DeleteRelationalDatabaseSnapshotCommandInput , DeleteRelationalDatabaseSnapshotCommandOutput , } from "../commands/DeleteRelationalDatabaseSnapshotCommand" ; import { DetachCertificateFromDistributionCommandInput , DetachCertificateFromDistributionCommandOutput , } from "../commands/DetachCertificateFromDistributionCommand" ; import { DetachDiskCommandInput , DetachDiskCommandOutput } from "../commands/DetachDiskCommand" ; import { DetachInstancesFromLoadBalancerCommandInput , DetachInstancesFromLoadBalancerCommandOutput , } from "../commands/DetachInstancesFromLoadBalancerCommand" ; import { DetachStaticIpCommandInput , DetachStaticIpCommandOutput } from "../commands/DetachStaticIpCommand" ; import { DisableAddOnCommandInput , DisableAddOnCommandOutput } from "../commands/DisableAddOnCommand" ; import { DownloadDefaultKeyPairCommandInput , DownloadDefaultKeyPairCommandOutput , } from "../commands/DownloadDefaultKeyPairCommand" ; import { EnableAddOnCommandInput , EnableAddOnCommandOutput } from "../commands/EnableAddOnCommand" ; import { ExportSnapshotCommandInput , ExportSnapshotCommandOutput } from "../commands/ExportSnapshotCommand" ; import { GetActiveNamesCommandInput , GetActiveNamesCommandOutput } from "../commands/GetActiveNamesCommand" ; import { GetAlarmsCommandInput , GetAlarmsCommandOutput } from "../commands/GetAlarmsCommand" ; import { GetAutoSnapshotsCommandInput , GetAutoSnapshotsCommandOutput } from "../commands/GetAutoSnapshotsCommand" ; import { GetBlueprintsCommandInput , GetBlueprintsCommandOutput } from "../commands/GetBlueprintsCommand" ; import { GetBucketAccessKeysCommandInput , GetBucketAccessKeysCommandOutput , } from "../commands/GetBucketAccessKeysCommand" ; import { GetBucketBundlesCommandInput , GetBucketBundlesCommandOutput } from "../commands/GetBucketBundlesCommand" ; import { GetBucketMetricDataCommandInput , GetBucketMetricDataCommandOutput , } from "../commands/GetBucketMetricDataCommand" ; import { GetBucketsCommandInput , GetBucketsCommandOutput } from "../commands/GetBucketsCommand" ; import { GetBundlesCommandInput , GetBundlesCommandOutput } from "../commands/GetBundlesCommand" ; import { GetCertificatesCommandInput , GetCertificatesCommandOutput } from "../commands/GetCertificatesCommand" ; import { GetCloudFormationStackRecordsCommandInput , GetCloudFormationStackRecordsCommandOutput , } from "../commands/GetCloudFormationStackRecordsCommand" ; import { GetContactMethodsCommandInput , GetContactMethodsCommandOutput } from "../commands/GetContactMethodsCommand" ; import { GetContainerAPIMetadataCommandInput , GetContainerAPIMetadataCommandOutput , } from "../commands/GetContainerAPIMetadataCommand" ; import { GetContainerImagesCommandInput , GetContainerImagesCommandOutput } from "../commands/GetContainerImagesCommand" ; import { GetContainerLogCommandInput , GetContainerLogCommandOutput } from "../commands/GetContainerLogCommand" ; import { GetContainerServiceDeploymentsCommandInput , GetContainerServiceDeploymentsCommandOutput , } from "../commands/GetContainerServiceDeploymentsCommand" ; import { GetContainerServiceMetricDataCommandInput , GetContainerServiceMetricDataCommandOutput , } from "../commands/GetContainerServiceMetricDataCommand" ; import { GetContainerServicePowersCommandInput , GetContainerServicePowersCommandOutput , } from "../commands/GetContainerServicePowersCommand" ; import { GetContainerServicesCommandInput , GetContainerServicesCommandOutput , } from "../commands/GetContainerServicesCommand" ; import { GetDiskCommandInput , GetDiskCommandOutput } from "../commands/GetDiskCommand" ; import { GetDisksCommandInput , GetDisksCommandOutput } from "../commands/GetDisksCommand" ; import { GetDiskSnapshotCommandInput , GetDiskSnapshotCommandOutput } from "../commands/GetDiskSnapshotCommand" ; import { GetDiskSnapshotsCommandInput , GetDiskSnapshotsCommandOutput } from "../commands/GetDiskSnapshotsCommand" ; import { GetDistributionBundlesCommandInput , GetDistributionBundlesCommandOutput , } from "../commands/GetDistributionBundlesCommand" ; import { GetDistributionLatestCacheResetCommandInput , GetDistributionLatestCacheResetCommandOutput , } from "../commands/GetDistributionLatestCacheResetCommand" ; import { GetDistributionMetricDataCommandInput , GetDistributionMetricDataCommandOutput , } from "../commands/GetDistributionMetricDataCommand" ; import { GetDistributionsCommandInput , GetDistributionsCommandOutput } from "../commands/GetDistributionsCommand" ; import { GetDomainCommandInput , GetDomainCommandOutput } from "../commands/GetDomainCommand" ; import { GetDomainsCommandInput , GetDomainsCommandOutput } from "../commands/GetDomainsCommand" ; import { GetExportSnapshotRecordsCommandInput , GetExportSnapshotRecordsCommandOutput , } from "../commands/GetExportSnapshotRecordsCommand" ; import { GetInstanceAccessDetailsCommandInput , GetInstanceAccessDetailsCommandOutput , } from "../commands/GetInstanceAccessDetailsCommand" ; import { GetInstanceCommandInput , GetInstanceCommandOutput } from "../commands/GetInstanceCommand" ; import { GetInstanceMetricDataCommandInput , GetInstanceMetricDataCommandOutput , } from "../commands/GetInstanceMetricDataCommand" ; import { GetInstancePortStatesCommandInput , GetInstancePortStatesCommandOutput , } from "../commands/GetInstancePortStatesCommand" ; import { GetInstancesCommandInput , GetInstancesCommandOutput } from "../commands/GetInstancesCommand" ; import { GetInstanceSnapshotCommandInput , GetInstanceSnapshotCommandOutput , } from "../commands/GetInstanceSnapshotCommand" ; import { GetInstanceSnapshotsCommandInput , GetInstanceSnapshotsCommandOutput , } from "../commands/GetInstanceSnapshotsCommand" ; import { GetInstanceStateCommandInput , GetInstanceStateCommandOutput } from "../commands/GetInstanceStateCommand" ; import { GetKeyPairCommandInput , GetKeyPairCommandOutput } from "../commands/GetKeyPairCommand" ; import { GetKeyPairsCommandInput , GetKeyPairsCommandOutput } from "../commands/GetKeyPairsCommand" ; import { GetLoadBalancerCommandInput , GetLoadBalancerCommandOutput } from "../commands/GetLoadBalancerCommand" ; import { GetLoadBalancerMetricDataCommandInput , GetLoadBalancerMetricDataCommandOutput , } from "../commands/GetLoadBalancerMetricDataCommand" ; import { GetLoadBalancersCommandInput , GetLoadBalancersCommandOutput } from "../commands/GetLoadBalancersCommand" ; import { GetLoadBalancerTlsCertificatesCommandInput , GetLoadBalancerTlsCertificatesCommandOutput , } from "../commands/GetLoadBalancerTlsCertificatesCommand" ; import { GetOperationCommandInput , GetOperationCommandOutput } from "../commands/GetOperationCommand" ; import { GetOperationsCommandInput , GetOperationsCommandOutput } from "../commands/GetOperationsCommand" ; import { GetOperationsForResourceCommandInput , GetOperationsForResourceCommandOutput , } from "../commands/GetOperationsForResourceCommand" ; import { GetRegionsCommandInput , GetRegionsCommandOutput } from "../commands/GetRegionsCommand" ; import { GetRelationalDatabaseBlueprintsCommandInput , GetRelationalDatabaseBlueprintsCommandOutput , } from "../commands/GetRelationalDatabaseBlueprintsCommand" ; import { GetRelationalDatabaseBundlesCommandInput , GetRelationalDatabaseBundlesCommandOutput , } from "../commands/GetRelationalDatabaseBundlesCommand" ; import { GetRelationalDatabaseCommandInput , GetRelationalDatabaseCommandOutput , } from "../commands/GetRelationalDatabaseCommand" ; import { GetRelationalDatabaseEventsCommandInput , GetRelationalDatabaseEventsCommandOutput , } from "../commands/GetRelationalDatabaseEventsCommand" ; import { GetRelationalDatabaseLogEventsCommandInput , GetRelationalDatabaseLogEventsCommandOutput , } from "../commands/GetRelationalDatabaseLogEventsCommand" ; import { GetRelationalDatabaseLogStreamsCommandInput , GetRelationalDatabaseLogStreamsCommandOutput , } from "../commands/GetRelationalDatabaseLogStreamsCommand" ; import { GetRelationalDatabaseMasterUserPasswordCommandInput , GetRelationalDatabaseMasterUserPasswordCommandOutput , } from "../commands/GetRelationalDatabaseMasterUserPasswordCommand" ; import { GetRelationalDatabaseMetricDataCommandInput , GetRelationalDatabaseMetricDataCommandOutput , } from "../commands/GetRelationalDatabaseMetricDataCommand" ; import { GetRelationalDatabaseParametersCommandInput , GetRelationalDatabaseParametersCommandOutput , } from "../commands/GetRelationalDatabaseParametersCommand" ; import { GetRelationalDatabasesCommandInput , GetRelationalDatabasesCommandOutput , } from "../commands/GetRelationalDatabasesCommand" ; import { GetRelationalDatabaseSnapshotCommandInput , GetRelationalDatabaseSnapshotCommandOutput , } from "../commands/GetRelationalDatabaseSnapshotCommand" ; import { GetRelationalDatabaseSnapshotsCommandInput , GetRelationalDatabaseSnapshotsCommandOutput , } from "../commands/GetRelationalDatabaseSnapshotsCommand" ; import { GetStaticIpCommandInput , GetStaticIpCommandOutput } from "../commands/GetStaticIpCommand" ; import { GetStaticIpsCommandInput , GetStaticIpsCommandOutput } from "../commands/GetStaticIpsCommand" ; import { ImportKeyPairCommandInput , ImportKeyPairCommandOutput } from "../commands/ImportKeyPairCommand" ; import { IsVpcPeeredCommandInput , IsVpcPeeredCommandOutput } from "../commands/IsVpcPeeredCommand" ; import { OpenInstancePublicPortsCommandInput , OpenInstancePublicPortsCommandOutput , } from "../commands/OpenInstancePublicPortsCommand" ; import { PeerVpcCommandInput , PeerVpcCommandOutput } from "../commands/PeerVpcCommand" ; import { PutAlarmCommandInput , PutAlarmCommandOutput } from "../commands/PutAlarmCommand" ; import { PutInstancePublicPortsCommandInput , PutInstancePublicPortsCommandOutput , } from "../commands/PutInstancePublicPortsCommand" ; import { RebootInstanceCommandInput , RebootInstanceCommandOutput } from "../commands/RebootInstanceCommand" ; import { RebootRelationalDatabaseCommandInput , RebootRelationalDatabaseCommandOutput , } from "../commands/RebootRelationalDatabaseCommand" ; import { RegisterContainerImageCommandInput , RegisterContainerImageCommandOutput , } from "../commands/RegisterContainerImageCommand" ; import { ReleaseStaticIpCommandInput , ReleaseStaticIpCommandOutput } from "../commands/ReleaseStaticIpCommand" ; import { ResetDistributionCacheCommandInput , ResetDistributionCacheCommandOutput , } from "../commands/ResetDistributionCacheCommand" ; import { SendContactMethodVerificationCommandInput , SendContactMethodVerificationCommandOutput , } from "../commands/SendContactMethodVerificationCommand" ; import { SetIpAddressTypeCommandInput , SetIpAddressTypeCommandOutput } from "../commands/SetIpAddressTypeCommand" ; import { SetResourceAccessForBucketCommandInput , SetResourceAccessForBucketCommandOutput , } from "../commands/SetResourceAccessForBucketCommand" ; import { StartInstanceCommandInput , StartInstanceCommandOutput } from "../commands/StartInstanceCommand" ; import { StartRelationalDatabaseCommandInput , StartRelationalDatabaseCommandOutput , } from "../commands/StartRelationalDatabaseCommand" ; import { StopInstanceCommandInput , StopInstanceCommandOutput } from "../commands/StopInstanceCommand" ; import { StopRelationalDatabaseCommandInput , StopRelationalDatabaseCommandOutput , } from "../commands/StopRelationalDatabaseCommand" ; import { TagResourceCommandInput , TagResourceCommandOutput } from "../commands/TagResourceCommand" ; import { TestAlarmCommandInput , TestAlarmCommandOutput } from "../commands/TestAlarmCommand" ; import { UnpeerVpcCommandInput , UnpeerVpcCommandOutput } from "../commands/UnpeerVpcCommand" ; import { UntagResourceCommandInput , UntagResourceCommandOutput } from "../commands/UntagResourceCommand" ; import { UpdateBucketBundleCommandInput , UpdateBucketBundleCommandOutput } from "../commands/UpdateBucketBundleCommand" ; import { UpdateBucketCommandInput , UpdateBucketCommandOutput } from "../commands/UpdateBucketCommand" ; import { UpdateContainerServiceCommandInput , UpdateContainerServiceCommandOutput , } from "../commands/UpdateContainerServiceCommand" ; import { UpdateDistributionBundleCommandInput , UpdateDistributionBundleCommandOutput , } from "../commands/UpdateDistributionBundleCommand" ; import { UpdateDistributionCommandInput , UpdateDistributionCommandOutput } from "../commands/UpdateDistributionCommand" ; import { UpdateDomainEntryCommandInput , UpdateDomainEntryCommandOutput } from "../commands/UpdateDomainEntryCommand" ; import { UpdateLoadBalancerAttributeCommandInput , UpdateLoadBalancerAttributeCommandOutput , } from "../commands/UpdateLoadBalancerAttributeCommand" ; import { UpdateRelationalDatabaseCommandInput , UpdateRelationalDatabaseCommandOutput , } from "../commands/UpdateRelationalDatabaseCommand" ; import { UpdateRelationalDatabaseParametersCommandInput , UpdateRelationalDatabaseParametersCommandOutput , } from "../commands/UpdateRelationalDatabaseParametersCommand" ; import { AccessDeniedException , AccessKey , AccessKeyLastUsed , AccessRules , AccountSetupInProgressException , AddOn , AddOnRequest , Alarm , AlarmState , AllocateStaticIpRequest , AllocateStaticIpResult , AttachCertificateToDistributionRequest , AttachCertificateToDistributionResult , AttachDiskRequest , AttachDiskResult , AttachedDisk , AttachInstancesToLoadBalancerRequest , AttachInstancesToLoadBalancerResult , AttachLoadBalancerTlsCertificateRequest , AttachLoadBalancerTlsCertificateResult , AttachStaticIpRequest , AttachStaticIpResult , AutoSnapshotAddOnRequest , AutoSnapshotDetails , AvailabilityZone , Blueprint , Bucket , BucketAccessLogConfig , BucketBundle , BucketState , Bundle , CacheBehavior , CacheBehaviorPerPath , CacheSettings , Certificate , CertificateStatus , CertificateSummary , CloseInstancePublicPortsRequest , CloseInstancePublicPortsResult , CloudFormationStackRecord , CloudFormationStackRecordSourceInfo , ContactMethod , ContactProtocol , Container , ContainerImage , ContainerService , ContainerServiceDeployment , ContainerServiceDeploymentRequest , ContainerServiceEndpoint , ContainerServiceHealthCheckConfig , ContainerServiceLogEvent , ContainerServicePower , ContainerServiceProtocol , ContainerServiceRegistryLogin , ContainerServicesListResult , ContainerServiceStateDetail , CookieObject , CopySnapshotRequest , CopySnapshotResult , CreateBucketAccessKeyRequest , CreateBucketAccessKeyResult , CreateBucketRequest , CreateBucketResult , CreateCertificateRequest , CreateCertificateResult , CreateCloudFormationStackRequest , CreateCloudFormationStackResult , CreateContactMethodRequest , CreateContactMethodResult , CreateContainerServiceDeploymentRequest , CreateContainerServiceDeploymentResult , CreateContainerServiceRegistryLoginRequest , CreateContainerServiceRegistryLoginResult , CreateContainerServiceRequest , CreateContainerServiceResult , CreateDiskFromSnapshotRequest , CreateDiskFromSnapshotResult , CreateDiskRequest , CreateDiskResult , CreateDiskSnapshotRequest , CreateDiskSnapshotResult , CreateDistributionRequest , CreateDistributionResult , CreateDomainEntryRequest , CreateDomainEntryResult , CreateDomainRequest , CreateDomainResult , CreateInstancesFromSnapshotRequest , CreateInstancesFromSnapshotResult , CreateInstanceSnapshotRequest , CreateInstanceSnapshotResult , CreateInstancesRequest , CreateInstancesResult , CreateKeyPairRequest , CreateKeyPairResult , CreateLoadBalancerRequest , CreateLoadBalancerResult , CreateLoadBalancerTlsCertificateRequest , CreateLoadBalancerTlsCertificateResult , CreateRelationalDatabaseFromSnapshotRequest , CreateRelationalDatabaseFromSnapshotResult , CreateRelationalDatabaseRequest , CreateRelationalDatabaseResult , CreateRelationalDatabaseSnapshotRequest , CreateRelationalDatabaseSnapshotResult , DeleteAlarmRequest , DeleteAlarmResult , DeleteAutoSnapshotRequest , DeleteAutoSnapshotResult , DeleteBucketAccessKeyRequest , DeleteBucketAccessKeyResult , DeleteBucketRequest , DeleteBucketResult , DeleteCertificateRequest , DeleteCertificateResult , DeleteContactMethodRequest , DeleteContactMethodResult , DeleteContainerImageRequest , DeleteContainerImageResult , DeleteContainerServiceRequest , DeleteContainerServiceResult , DeleteDiskRequest , DeleteDiskResult , DeleteDiskSnapshotRequest , DeleteDiskSnapshotResult , DeleteDistributionRequest , DeleteDistributionResult , DeleteDomainEntryRequest , DeleteDomainEntryResult , DeleteDomainRequest , DeleteDomainResult , DeleteInstanceRequest , DeleteInstanceResult , DeleteInstanceSnapshotRequest , DeleteInstanceSnapshotResult , DeleteKeyPairRequest , DeleteKeyPairResult , DeleteKnownHostKeysRequest , DeleteKnownHostKeysResult , DeleteLoadBalancerRequest , DeleteLoadBalancerResult , DeleteLoadBalancerTlsCertificateRequest , DeleteLoadBalancerTlsCertificateResult , DeleteRelationalDatabaseRequest , DeleteRelationalDatabaseResult , DeleteRelationalDatabaseSnapshotRequest , DeleteRelationalDatabaseSnapshotResult , DestinationInfo , DetachCertificateFromDistributionRequest , DetachCertificateFromDistributionResult , DetachDiskRequest , DetachDiskResult , DetachInstancesFromLoadBalancerRequest , DetachInstancesFromLoadBalancerResult , DetachStaticIpRequest , DetachStaticIpResult , DisableAddOnRequest , DisableAddOnResult , Disk , DiskInfo , DiskMap , DiskSnapshot , DiskSnapshotInfo , DistributionBundle , Domain , DomainEntry , DomainValidationRecord , DownloadDefaultKeyPairRequest , DownloadDefaultKeyPairResult , EnableAddOnRequest , EnableAddOnResult , EndpointRequest , ExportSnapshotRecord , ExportSnapshotRecordSourceInfo , ExportSnapshotRequest , ExportSnapshotResult , GetActiveNamesRequest , GetActiveNamesResult , GetAlarmsRequest , GetAlarmsResult , GetAutoSnapshotsRequest , GetAutoSnapshotsResult , GetBlueprintsRequest , GetBlueprintsResult , GetBucketAccessKeysRequest , GetBucketAccessKeysResult , GetBucketBundlesRequest , GetBucketBundlesResult , GetBucketMetricDataRequest , GetBucketMetricDataResult , GetBucketsRequest , GetBucketsResult , GetBundlesRequest , GetBundlesResult , GetCertificatesRequest , GetCertificatesResult , GetCloudFormationStackRecordsRequest , GetCloudFormationStackRecordsResult , GetContactMethodsRequest , GetContactMethodsResult , GetContainerAPIMetadataRequest , GetContainerAPIMetadataResult , GetContainerImagesRequest , GetContainerImagesResult , GetContainerLogRequest , GetContainerLogResult , GetContainerServiceDeploymentsRequest , GetContainerServiceDeploymentsResult , GetContainerServiceMetricDataRequest , GetContainerServiceMetricDataResult , GetContainerServicePowersRequest , GetContainerServicePowersResult , GetContainerServicesRequest , GetDiskRequest , GetDiskResult , GetDiskSnapshotRequest , GetDiskSnapshotResult , GetDiskSnapshotsRequest , GetDiskSnapshotsResult , GetDisksRequest , GetDisksResult , GetDistributionBundlesRequest , GetDistributionBundlesResult , GetDistributionLatestCacheResetRequest , GetDistributionLatestCacheResetResult , GetDistributionMetricDataRequest , GetDistributionMetricDataResult , GetDistributionsRequest , GetDistributionsResult , GetDomainRequest , GetDomainResult , GetDomainsRequest , GetDomainsResult , GetExportSnapshotRecordsRequest , GetExportSnapshotRecordsResult , GetInstanceRequest , HeaderEnum , HeaderObject , InputOrigin , InstanceEntry , InstanceHardware , InstancePlatform , InstancePortInfo , InstanceSnapshotInfo , InvalidInputException , KeyPair , LightsailDistribution , MetricDatapoint , MetricStatistic , MonitoredResourceInfo , MonthlyTransfer , NotFoundException , Operation , OperationFailureException , Origin , PortInfo , QueryStringObject , RenewalSummary , ResourceLocation , ResourceReceivingAccess , ResourceRecord , ServiceException , Tag , UnauthenticatedException , } from "../models/models_0" ; import { GetInstanceAccessDetailsRequest , GetInstanceAccessDetailsResult , GetInstanceMetricDataRequest , GetInstanceMetricDataResult , GetInstancePortStatesRequest , GetInstancePortStatesResult , GetInstanceResult , GetInstanceSnapshotRequest , GetInstanceSnapshotResult , GetInstanceSnapshotsRequest , GetInstanceSnapshotsResult , GetInstancesRequest , GetInstancesResult , GetInstanceStateRequest , GetInstanceStateResult , GetKeyPairRequest , GetKeyPairResult , GetKeyPairsRequest , GetKeyPairsResult , GetLoadBalancerMetricDataRequest , GetLoadBalancerMetricDataResult , GetLoadBalancerRequest , GetLoadBalancerResult , GetLoadBalancersRequest , GetLoadBalancersResult , GetLoadBalancerTlsCertificatesRequest , GetLoadBalancerTlsCertificatesResult , GetOperationRequest , GetOperationResult , GetOperationsForResourceRequest , GetOperationsForResourceResult , GetOperationsRequest , GetOperationsResult , GetRegionsRequest , GetRegionsResult , GetRelationalDatabaseBlueprintsRequest , GetRelationalDatabaseBlueprintsResult , GetRelationalDatabaseBundlesRequest , GetRelationalDatabaseBundlesResult , GetRelationalDatabaseEventsRequest , GetRelationalDatabaseEventsResult , GetRelationalDatabaseLogEventsRequest , GetRelationalDatabaseLogEventsResult , GetRelationalDatabaseLogStreamsRequest , GetRelationalDatabaseLogStreamsResult , GetRelationalDatabaseMasterUserPasswordRequest , GetRelationalDatabaseMasterUserPasswordResult , GetRelationalDatabaseMetricDataRequest , GetRelationalDatabaseMetricDataResult , GetRelationalDatabaseParametersRequest , GetRelationalDatabaseParametersResult , GetRelationalDatabaseRequest , GetRelationalDatabaseResult , GetRelationalDatabaseSnapshotRequest , GetRelationalDatabaseSnapshotResult , GetRelationalDatabaseSnapshotsRequest , GetRelationalDatabaseSnapshotsResult , GetRelationalDatabasesRequest , GetRelationalDatabasesResult , GetStaticIpRequest , GetStaticIpResult , GetStaticIpsRequest , GetStaticIpsResult , HostKeyAttributes , ImportKeyPairRequest , ImportKeyPairResult , Instance , InstanceAccessDetails , InstanceHealthSummary , InstanceNetworking , InstancePortState , InstanceSnapshot , InstanceState , IsVpcPeeredRequest , IsVpcPeeredResult , LoadBalancer , LoadBalancerAttributeName , LoadBalancerTlsCertificate , LoadBalancerTlsCertificateDomainValidationOption , LoadBalancerTlsCertificateDomainValidationRecord , LoadBalancerTlsCertificateRenewalSummary , LoadBalancerTlsCertificateSummary , LogEvent , OpenInstancePublicPortsRequest , OpenInstancePublicPortsResult , PasswordData , PeerVpcRequest , PeerVpcResult , PendingMaintenanceAction , PendingModifiedRelationalDatabaseValues , PutAlarmRequest , PutAlarmResult , PutInstancePublicPortsRequest , PutInstancePublicPortsResult , RebootInstanceRequest , RebootInstanceResult , RebootRelationalDatabaseRequest , RebootRelationalDatabaseResult , Region , RegisterContainerImageRequest , RegisterContainerImageResult , RelationalDatabase , RelationalDatabaseBlueprint , RelationalDatabaseBundle , RelationalDatabaseEndpoint , RelationalDatabaseEvent , RelationalDatabaseHardware , RelationalDatabaseParameter , RelationalDatabaseSnapshot , ReleaseStaticIpRequest , ReleaseStaticIpResult , ResetDistributionCacheRequest , ResetDistributionCacheResult , SendContactMethodVerificationRequest , SendContactMethodVerificationResult , SetIpAddressTypeRequest , SetIpAddressTypeResult , SetResourceAccessForBucketRequest , SetResourceAccessForBucketResult , StartInstanceRequest , StartInstanceResult , StartRelationalDatabaseRequest , StartRelationalDatabaseResult , StaticIp , StopInstanceRequest , StopInstanceResult , StopRelationalDatabaseRequest , StopRelationalDatabaseResult , TagResourceRequest , TagResourceResult , TestAlarmRequest , TestAlarmResult , UnpeerVpcRequest , UnpeerVpcResult , UntagResourceRequest , UntagResourceResult , UpdateBucketBundleRequest , UpdateBucketBundleResult , UpdateBucketRequest , UpdateBucketResult , UpdateContainerServiceRequest , UpdateContainerServiceResult , UpdateDistributionBundleRequest , UpdateDistributionBundleResult , UpdateDistributionRequest , UpdateDistributionResult , UpdateDomainEntryRequest , UpdateDomainEntryResult , UpdateLoadBalancerAttributeRequest , UpdateLoadBalancerAttributeResult , UpdateRelationalDatabaseParametersRequest , UpdateRelationalDatabaseParametersResult , UpdateRelationalDatabaseRequest , UpdateRelationalDatabaseResult , } from "../models/models_1" ; export const serializeAws_json1_1AllocateStaticIpCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.AllocateStaticIp" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1AllocateStaticIpRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1AttachCertificateToDistributionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.AttachCertificateToDistribution" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1AttachCertificateToDistributionRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1AttachDiskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.AttachDisk" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1AttachDiskRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1AttachInstancesToLoadBalancerCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.AttachInstancesToLoadBalancer" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1AttachInstancesToLoadBalancerRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1AttachLoadBalancerTlsCertificateCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.AttachLoadBalancerTlsCertificate" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1AttachLoadBalancerTlsCertificateRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1AttachStaticIpCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.AttachStaticIp" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1AttachStaticIpRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CloseInstancePublicPortsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CloseInstancePublicPorts" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CloseInstancePublicPortsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CopySnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CopySnapshot" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CopySnapshotRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateBucketCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateBucket" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateBucketRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateBucketAccessKeyCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateBucketAccessKey" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateBucketAccessKeyRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateCertificateCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateCertificate" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateCertificateRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateCloudFormationStackCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateCloudFormationStack" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateCloudFormationStackRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateContactMethodCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateContactMethod" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateContactMethodRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateContainerServiceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateContainerService" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateContainerServiceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateContainerServiceDeploymentCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateContainerServiceDeployment" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateContainerServiceDeploymentRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateContainerServiceRegistryLoginCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateContainerServiceRegistryLogin" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateContainerServiceRegistryLoginRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateDiskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateDisk" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateDiskRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateDiskFromSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateDiskFromSnapshot" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateDiskFromSnapshotRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateDiskSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateDiskSnapshot" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateDiskSnapshotRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateDistributionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateDistribution" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateDistributionRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateDomainCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateDomain" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateDomainRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateDomainEntryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateDomainEntry" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateDomainEntryRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateInstances" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateInstancesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateInstancesFromSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateInstancesFromSnapshot" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateInstancesFromSnapshotRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateInstanceSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateInstanceSnapshot" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateInstanceSnapshotRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateKeyPairCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateKeyPair" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateKeyPairRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateLoadBalancerCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateLoadBalancer" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateLoadBalancerRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateLoadBalancerTlsCertificateCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateLoadBalancerTlsCertificate" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateLoadBalancerTlsCertificateRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateRelationalDatabaseCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateRelationalDatabase" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateRelationalDatabaseRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateRelationalDatabaseFromSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateRelationalDatabaseFromSnapshot" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateRelationalDatabaseFromSnapshotRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateRelationalDatabaseSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.CreateRelationalDatabaseSnapshot" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateRelationalDatabaseSnapshotRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteAlarmCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteAlarm" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteAlarmRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteAutoSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteAutoSnapshot" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteAutoSnapshotRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteBucketCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteBucket" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteBucketRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteBucketAccessKeyCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteBucketAccessKey" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteBucketAccessKeyRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteCertificateCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteCertificate" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteCertificateRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteContactMethodCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteContactMethod" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteContactMethodRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteContainerImageCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteContainerImage" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteContainerImageRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteContainerServiceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteContainerService" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteContainerServiceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteDiskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteDisk" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteDiskRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteDiskSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteDiskSnapshot" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteDiskSnapshotRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteDistributionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteDistribution" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteDistributionRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteDomainCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteDomain" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteDomainRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteDomainEntryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteDomainEntry" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteDomainEntryRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteInstance" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteInstanceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteInstanceSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteInstanceSnapshot" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteInstanceSnapshotRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteKeyPairCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteKeyPair" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteKeyPairRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteKnownHostKeysCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteKnownHostKeys" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteKnownHostKeysRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteLoadBalancerCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteLoadBalancer" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteLoadBalancerRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteLoadBalancerTlsCertificateCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteLoadBalancerTlsCertificate" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteLoadBalancerTlsCertificateRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteRelationalDatabaseCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteRelationalDatabase" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteRelationalDatabaseRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteRelationalDatabaseSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DeleteRelationalDatabaseSnapshot" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteRelationalDatabaseSnapshotRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DetachCertificateFromDistributionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DetachCertificateFromDistribution" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DetachCertificateFromDistributionRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DetachDiskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DetachDisk" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DetachDiskRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DetachInstancesFromLoadBalancerCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DetachInstancesFromLoadBalancer" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DetachInstancesFromLoadBalancerRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DetachStaticIpCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DetachStaticIp" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DetachStaticIpRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DisableAddOnCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DisableAddOn" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DisableAddOnRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DownloadDefaultKeyPairCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.DownloadDefaultKeyPair" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DownloadDefaultKeyPairRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1EnableAddOnCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.EnableAddOn" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1EnableAddOnRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ExportSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.ExportSnapshot" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ExportSnapshotRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetActiveNamesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetActiveNames" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetActiveNamesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetAlarmsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetAlarms" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetAlarmsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetAutoSnapshotsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetAutoSnapshots" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetAutoSnapshotsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetBlueprintsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetBlueprints" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetBlueprintsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetBucketAccessKeysCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetBucketAccessKeys" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetBucketAccessKeysRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetBucketBundlesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetBucketBundles" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetBucketBundlesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetBucketMetricDataCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetBucketMetricData" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetBucketMetricDataRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetBucketsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetBuckets" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetBucketsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetBundlesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetBundles" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetBundlesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetCertificatesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetCertificates" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetCertificatesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetCloudFormationStackRecordsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetCloudFormationStackRecords" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetCloudFormationStackRecordsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetContactMethodsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetContactMethods" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetContactMethodsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetContainerAPIMetadataCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetContainerAPIMetadata" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetContainerAPIMetadataRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetContainerImagesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetContainerImages" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetContainerImagesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetContainerLogCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetContainerLog" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetContainerLogRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetContainerServiceDeploymentsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetContainerServiceDeployments" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetContainerServiceDeploymentsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetContainerServiceMetricDataCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetContainerServiceMetricData" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetContainerServiceMetricDataRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetContainerServicePowersCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetContainerServicePowers" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetContainerServicePowersRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetContainerServicesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetContainerServices" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetContainerServicesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetDiskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetDisk" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetDiskRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetDisksCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetDisks" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetDisksRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetDiskSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetDiskSnapshot" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetDiskSnapshotRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetDiskSnapshotsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetDiskSnapshots" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetDiskSnapshotsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetDistributionBundlesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetDistributionBundles" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetDistributionBundlesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetDistributionLatestCacheResetCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetDistributionLatestCacheReset" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetDistributionLatestCacheResetRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetDistributionMetricDataCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetDistributionMetricData" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetDistributionMetricDataRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetDistributionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetDistributions" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetDistributionsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetDomainCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetDomain" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetDomainRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetDomainsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetDomains" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetDomainsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetExportSnapshotRecordsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetExportSnapshotRecords" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetExportSnapshotRecordsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetInstance" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetInstanceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetInstanceAccessDetailsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetInstanceAccessDetails" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetInstanceAccessDetailsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetInstanceMetricDataCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetInstanceMetricData" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetInstanceMetricDataRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetInstancePortStatesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetInstancePortStates" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetInstancePortStatesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetInstances" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetInstancesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetInstanceSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetInstanceSnapshot" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetInstanceSnapshotRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetInstanceSnapshotsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetInstanceSnapshots" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetInstanceSnapshotsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetInstanceStateCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetInstanceState" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetInstanceStateRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetKeyPairCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetKeyPair" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetKeyPairRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetKeyPairsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetKeyPairs" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetKeyPairsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetLoadBalancerCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetLoadBalancer" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetLoadBalancerRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetLoadBalancerMetricDataCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetLoadBalancerMetricData" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetLoadBalancerMetricDataRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetLoadBalancersCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetLoadBalancers" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetLoadBalancersRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetLoadBalancerTlsCertificatesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetLoadBalancerTlsCertificates" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetLoadBalancerTlsCertificatesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetOperationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetOperation" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetOperationRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetOperationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetOperations" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetOperationsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetOperationsForResourceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetOperationsForResource" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetOperationsForResourceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetRegionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetRegions" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetRegionsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetRelationalDatabaseCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetRelationalDatabase" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetRelationalDatabaseRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetRelationalDatabaseBlueprintsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetRelationalDatabaseBlueprints" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetRelationalDatabaseBlueprintsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetRelationalDatabaseBundlesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetRelationalDatabaseBundles" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetRelationalDatabaseBundlesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetRelationalDatabaseEventsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetRelationalDatabaseEvents" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetRelationalDatabaseEventsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetRelationalDatabaseLogEventsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetRelationalDatabaseLogEvents" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetRelationalDatabaseLogEventsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetRelationalDatabaseLogStreamsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetRelationalDatabaseLogStreams" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetRelationalDatabaseLogStreamsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetRelationalDatabaseMasterUserPasswordCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetRelationalDatabaseMasterUserPassword" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetRelationalDatabaseMasterUserPasswordRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetRelationalDatabaseMetricDataCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetRelationalDatabaseMetricData" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetRelationalDatabaseMetricDataRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetRelationalDatabaseParametersCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetRelationalDatabaseParameters" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetRelationalDatabaseParametersRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetRelationalDatabasesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetRelationalDatabases" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetRelationalDatabasesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetRelationalDatabaseSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetRelationalDatabaseSnapshot" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetRelationalDatabaseSnapshotRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetRelationalDatabaseSnapshotsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetRelationalDatabaseSnapshots" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetRelationalDatabaseSnapshotsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetStaticIpCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetStaticIp" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetStaticIpRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetStaticIpsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.GetStaticIps" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetStaticIpsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ImportKeyPairCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.ImportKeyPair" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ImportKeyPairRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1IsVpcPeeredCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.IsVpcPeered" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1IsVpcPeeredRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1OpenInstancePublicPortsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.OpenInstancePublicPorts" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1OpenInstancePublicPortsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PeerVpcCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.PeerVpc" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PeerVpcRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutAlarmCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.PutAlarm" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutAlarmRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1PutInstancePublicPortsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.PutInstancePublicPorts" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1PutInstancePublicPortsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1RebootInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.RebootInstance" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1RebootInstanceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1RebootRelationalDatabaseCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.RebootRelationalDatabase" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1RebootRelationalDatabaseRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1RegisterContainerImageCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.RegisterContainerImage" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1RegisterContainerImageRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ReleaseStaticIpCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.ReleaseStaticIp" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ReleaseStaticIpRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ResetDistributionCacheCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.ResetDistributionCache" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ResetDistributionCacheRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1SendContactMethodVerificationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.SendContactMethodVerification" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1SendContactMethodVerificationRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1SetIpAddressTypeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.SetIpAddressType" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1SetIpAddressTypeRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1SetResourceAccessForBucketCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.SetResourceAccessForBucket" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1SetResourceAccessForBucketRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1StartInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.StartInstance" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1StartInstanceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1StartRelationalDatabaseCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.StartRelationalDatabase" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1StartRelationalDatabaseRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1StopInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.StopInstance" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1StopInstanceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1StopRelationalDatabaseCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.StopRelationalDatabase" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1StopRelationalDatabaseRequest ( 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" : "Lightsail_20161128.TagResource" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1TagResourceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1TestAlarmCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.TestAlarm" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1TestAlarmRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1UnpeerVpcCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.UnpeerVpc" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UnpeerVpcRequest ( 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" : "Lightsail_20161128.UntagResource" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UntagResourceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1UpdateBucketCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.UpdateBucket" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UpdateBucketRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1UpdateBucketBundleCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.UpdateBucketBundle" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UpdateBucketBundleRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1UpdateContainerServiceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.UpdateContainerService" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UpdateContainerServiceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1UpdateDistributionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.UpdateDistribution" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UpdateDistributionRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1UpdateDistributionBundleCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.UpdateDistributionBundle" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UpdateDistributionBundleRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1UpdateDomainEntryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.UpdateDomainEntry" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UpdateDomainEntryRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1UpdateLoadBalancerAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.UpdateLoadBalancerAttribute" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UpdateLoadBalancerAttributeRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1UpdateRelationalDatabaseCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.UpdateRelationalDatabase" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UpdateRelationalDatabaseRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1UpdateRelationalDatabaseParametersCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Lightsail_20161128.UpdateRelationalDatabaseParameters" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UpdateRelationalDatabaseParametersRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const deserializeAws_json1_1AllocateStaticIpCommand = async ( output , context ) : Promise < AllocateStaticIpCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1AllocateStaticIpCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1AllocateStaticIpResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1AllocateStaticIpCommandError = async ( output , context ) : Promise < AllocateStaticIpCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1AttachCertificateToDistributionCommand = async ( output , context ) : Promise < AttachCertificateToDistributionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1AttachCertificateToDistributionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1AttachCertificateToDistributionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1AttachCertificateToDistributionCommandError = async ( output , context ) : Promise < AttachCertificateToDistributionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1AttachDiskCommand = async ( output , context ) : Promise < AttachDiskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1AttachDiskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1AttachDiskResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1AttachDiskCommandError = async ( output , context ) : Promise < AttachDiskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1AttachInstancesToLoadBalancerCommand = async ( output , context ) : Promise < AttachInstancesToLoadBalancerCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1AttachInstancesToLoadBalancerCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1AttachInstancesToLoadBalancerResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1AttachInstancesToLoadBalancerCommandError = async ( output , context ) : Promise < AttachInstancesToLoadBalancerCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1AttachLoadBalancerTlsCertificateCommand = async ( output , context ) : Promise < AttachLoadBalancerTlsCertificateCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1AttachLoadBalancerTlsCertificateCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1AttachLoadBalancerTlsCertificateResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1AttachLoadBalancerTlsCertificateCommandError = async ( output , context ) : Promise < AttachLoadBalancerTlsCertificateCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1AttachStaticIpCommand = async ( output , context ) : Promise < AttachStaticIpCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1AttachStaticIpCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1AttachStaticIpResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1AttachStaticIpCommandError = async ( output , context ) : Promise < AttachStaticIpCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CloseInstancePublicPortsCommand = async ( output , context ) : Promise < CloseInstancePublicPortsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CloseInstancePublicPortsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CloseInstancePublicPortsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CloseInstancePublicPortsCommandError = async ( output , context ) : Promise < CloseInstancePublicPortsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CopySnapshotCommand = async ( output , context ) : Promise < CopySnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CopySnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CopySnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CopySnapshotCommandError = async ( output , context ) : Promise < CopySnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateBucketCommand = async ( output , context ) : Promise < CreateBucketCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateBucketCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateBucketResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateBucketCommandError = async ( output , context ) : Promise < CreateBucketCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateBucketAccessKeyCommand = async ( output , context ) : Promise < CreateBucketAccessKeyCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateBucketAccessKeyCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateBucketAccessKeyResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateBucketAccessKeyCommandError = async ( output , context ) : Promise < CreateBucketAccessKeyCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateCertificateCommand = async ( output , context ) : Promise < CreateCertificateCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateCertificateCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateCertificateResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateCertificateCommandError = async ( output , context ) : Promise < CreateCertificateCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateCloudFormationStackCommand = async ( output , context ) : Promise < CreateCloudFormationStackCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateCloudFormationStackCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateCloudFormationStackResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateCloudFormationStackCommandError = async ( output , context ) : Promise < CreateCloudFormationStackCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateContactMethodCommand = async ( output , context ) : Promise < CreateContactMethodCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateContactMethodCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateContactMethodResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateContactMethodCommandError = async ( output , context ) : Promise < CreateContactMethodCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateContainerServiceCommand = async ( output , context ) : Promise < CreateContainerServiceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateContainerServiceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateContainerServiceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateContainerServiceCommandError = async ( output , context ) : Promise < CreateContainerServiceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateContainerServiceDeploymentCommand = async ( output , context ) : Promise < CreateContainerServiceDeploymentCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateContainerServiceDeploymentCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateContainerServiceDeploymentResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateContainerServiceDeploymentCommandError = async ( output , context ) : Promise < CreateContainerServiceDeploymentCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateContainerServiceRegistryLoginCommand = async ( output , context ) : Promise < CreateContainerServiceRegistryLoginCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateContainerServiceRegistryLoginCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateContainerServiceRegistryLoginResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateContainerServiceRegistryLoginCommandError = async ( output , context ) : Promise < CreateContainerServiceRegistryLoginCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateDiskCommand = async ( output , context ) : Promise < CreateDiskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateDiskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateDiskResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateDiskCommandError = async ( output , context ) : Promise < CreateDiskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateDiskFromSnapshotCommand = async ( output , context ) : Promise < CreateDiskFromSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateDiskFromSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateDiskFromSnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateDiskFromSnapshotCommandError = async ( output , context ) : Promise < CreateDiskFromSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateDiskSnapshotCommand = async ( output , context ) : Promise < CreateDiskSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateDiskSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateDiskSnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateDiskSnapshotCommandError = async ( output , context ) : Promise < CreateDiskSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateDistributionCommand = async ( output , context ) : Promise < CreateDistributionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateDistributionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateDistributionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateDistributionCommandError = async ( output , context ) : Promise < CreateDistributionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateDomainCommand = async ( output , context ) : Promise < CreateDomainCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateDomainCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateDomainResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateDomainCommandError = async ( output , context ) : Promise < CreateDomainCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateDomainEntryCommand = async ( output , context ) : Promise < CreateDomainEntryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateDomainEntryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateDomainEntryResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateDomainEntryCommandError = async ( output , context ) : Promise < CreateDomainEntryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateInstancesCommand = async ( output , context ) : Promise < CreateInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateInstancesCommandError = async ( output , context ) : Promise < CreateInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateInstancesFromSnapshotCommand = async ( output , context ) : Promise < CreateInstancesFromSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateInstancesFromSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateInstancesFromSnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateInstancesFromSnapshotCommandError = async ( output , context ) : Promise < CreateInstancesFromSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateInstanceSnapshotCommand = async ( output , context ) : Promise < CreateInstanceSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateInstanceSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateInstanceSnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateInstanceSnapshotCommandError = async ( output , context ) : Promise < CreateInstanceSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateKeyPairCommand = async ( output , context ) : Promise < CreateKeyPairCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateKeyPairCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateKeyPairResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateKeyPairCommandError = async ( output , context ) : Promise < CreateKeyPairCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateLoadBalancerCommand = async ( output , context ) : Promise < CreateLoadBalancerCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateLoadBalancerCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateLoadBalancerResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateLoadBalancerCommandError = async ( output , context ) : Promise < CreateLoadBalancerCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateLoadBalancerTlsCertificateCommand = async ( output , context ) : Promise < CreateLoadBalancerTlsCertificateCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateLoadBalancerTlsCertificateCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateLoadBalancerTlsCertificateResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateLoadBalancerTlsCertificateCommandError = async ( output , context ) : Promise < CreateLoadBalancerTlsCertificateCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateRelationalDatabaseCommand = async ( output , context ) : Promise < CreateRelationalDatabaseCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateRelationalDatabaseCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateRelationalDatabaseResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateRelationalDatabaseCommandError = async ( output , context ) : Promise < CreateRelationalDatabaseCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateRelationalDatabaseFromSnapshotCommand = async ( output , context ) : Promise < CreateRelationalDatabaseFromSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateRelationalDatabaseFromSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateRelationalDatabaseFromSnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateRelationalDatabaseFromSnapshotCommandError = async ( output , context ) : Promise < CreateRelationalDatabaseFromSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1CreateRelationalDatabaseSnapshotCommand = async ( output , context ) : Promise < CreateRelationalDatabaseSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateRelationalDatabaseSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateRelationalDatabaseSnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateRelationalDatabaseSnapshotCommandError = async ( output , context ) : Promise < CreateRelationalDatabaseSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteAlarmCommand = async ( output , context ) : Promise < DeleteAlarmCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteAlarmCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteAlarmResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteAlarmCommandError = async ( output , context ) : Promise < DeleteAlarmCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteAutoSnapshotCommand = async ( output , context ) : Promise < DeleteAutoSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteAutoSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteAutoSnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteAutoSnapshotCommandError = async ( output , context ) : Promise < DeleteAutoSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteBucketCommand = async ( output , context ) : Promise < DeleteBucketCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteBucketCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteBucketResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteBucketCommandError = async ( output , context ) : Promise < DeleteBucketCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteBucketAccessKeyCommand = async ( output , context ) : Promise < DeleteBucketAccessKeyCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteBucketAccessKeyCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteBucketAccessKeyResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteBucketAccessKeyCommandError = async ( output , context ) : Promise < DeleteBucketAccessKeyCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1DeleteCertificateCommand = async ( output , context ) : Promise < DeleteCertificateCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteCertificateCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteCertificateResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteCertificateCommandError = async ( output , context ) : Promise < DeleteCertificateCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteContactMethodCommand = async ( output , context ) : Promise < DeleteContactMethodCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteContactMethodCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteContactMethodResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteContactMethodCommandError = async ( output , context ) : Promise < DeleteContactMethodCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteContainerImageCommand = async ( output , context ) : Promise < DeleteContainerImageCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteContainerImageCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteContainerImageResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteContainerImageCommandError = async ( output , context ) : Promise < DeleteContainerImageCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteContainerServiceCommand = async ( output , context ) : Promise < DeleteContainerServiceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteContainerServiceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteContainerServiceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteContainerServiceCommandError = async ( output , context ) : Promise < DeleteContainerServiceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteDiskCommand = async ( output , context ) : Promise < DeleteDiskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteDiskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteDiskResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteDiskCommandError = async ( output , context ) : Promise < DeleteDiskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteDiskSnapshotCommand = async ( output , context ) : Promise < DeleteDiskSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteDiskSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteDiskSnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteDiskSnapshotCommandError = async ( output , context ) : Promise < DeleteDiskSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteDistributionCommand = async ( output , context ) : Promise < DeleteDistributionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteDistributionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteDistributionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteDistributionCommandError = async ( output , context ) : Promise < DeleteDistributionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteDomainCommand = async ( output , context ) : Promise < DeleteDomainCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteDomainCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteDomainResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteDomainCommandError = async ( output , context ) : Promise < DeleteDomainCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteDomainEntryCommand = async ( output , context ) : Promise < DeleteDomainEntryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteDomainEntryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteDomainEntryResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteDomainEntryCommandError = async ( output , context ) : Promise < DeleteDomainEntryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteInstanceCommand = async ( output , context ) : Promise < DeleteInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteInstanceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteInstanceCommandError = async ( output , context ) : Promise < DeleteInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteInstanceSnapshotCommand = async ( output , context ) : Promise < DeleteInstanceSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteInstanceSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteInstanceSnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteInstanceSnapshotCommandError = async ( output , context ) : Promise < DeleteInstanceSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteKeyPairCommand = async ( output , context ) : Promise < DeleteKeyPairCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteKeyPairCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteKeyPairResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteKeyPairCommandError = async ( output , context ) : Promise < DeleteKeyPairCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteKnownHostKeysCommand = async ( output , context ) : Promise < DeleteKnownHostKeysCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteKnownHostKeysCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteKnownHostKeysResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteKnownHostKeysCommandError = async ( output , context ) : Promise < DeleteKnownHostKeysCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteLoadBalancerCommand = async ( output , context ) : Promise < DeleteLoadBalancerCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteLoadBalancerCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteLoadBalancerResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteLoadBalancerCommandError = async ( output , context ) : Promise < DeleteLoadBalancerCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteLoadBalancerTlsCertificateCommand = async ( output , context ) : Promise < DeleteLoadBalancerTlsCertificateCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteLoadBalancerTlsCertificateCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteLoadBalancerTlsCertificateResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteLoadBalancerTlsCertificateCommandError = async ( output , context ) : Promise < DeleteLoadBalancerTlsCertificateCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteRelationalDatabaseCommand = async ( output , context ) : Promise < DeleteRelationalDatabaseCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteRelationalDatabaseCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteRelationalDatabaseResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteRelationalDatabaseCommandError = async ( output , context ) : Promise < DeleteRelationalDatabaseCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DeleteRelationalDatabaseSnapshotCommand = async ( output , context ) : Promise < DeleteRelationalDatabaseSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteRelationalDatabaseSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteRelationalDatabaseSnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteRelationalDatabaseSnapshotCommandError = async ( output , context ) : Promise < DeleteRelationalDatabaseSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DetachCertificateFromDistributionCommand = async ( output , context ) : Promise < DetachCertificateFromDistributionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DetachCertificateFromDistributionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DetachCertificateFromDistributionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DetachCertificateFromDistributionCommandError = async ( output , context ) : Promise < DetachCertificateFromDistributionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DetachDiskCommand = async ( output , context ) : Promise < DetachDiskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DetachDiskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DetachDiskResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DetachDiskCommandError = async ( output , context ) : Promise < DetachDiskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DetachInstancesFromLoadBalancerCommand = async ( output , context ) : Promise < DetachInstancesFromLoadBalancerCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DetachInstancesFromLoadBalancerCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DetachInstancesFromLoadBalancerResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DetachInstancesFromLoadBalancerCommandError = async ( output , context ) : Promise < DetachInstancesFromLoadBalancerCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DetachStaticIpCommand = async ( output , context ) : Promise < DetachStaticIpCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DetachStaticIpCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DetachStaticIpResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DetachStaticIpCommandError = async ( output , context ) : Promise < DetachStaticIpCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DisableAddOnCommand = async ( output , context ) : Promise < DisableAddOnCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DisableAddOnCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DisableAddOnResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DisableAddOnCommandError = async ( output , context ) : Promise < DisableAddOnCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1DownloadDefaultKeyPairCommand = async ( output , context ) : Promise < DownloadDefaultKeyPairCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DownloadDefaultKeyPairCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DownloadDefaultKeyPairResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DownloadDefaultKeyPairCommandError = async ( output , context ) : Promise < DownloadDefaultKeyPairCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1EnableAddOnCommand = async ( output , context ) : Promise < EnableAddOnCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1EnableAddOnCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1EnableAddOnResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1EnableAddOnCommandError = async ( output , context ) : Promise < EnableAddOnCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1ExportSnapshotCommand = async ( output , context ) : Promise < ExportSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ExportSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ExportSnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ExportSnapshotCommandError = async ( output , context ) : Promise < ExportSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetActiveNamesCommand = async ( output , context ) : Promise < GetActiveNamesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetActiveNamesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetActiveNamesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetActiveNamesCommandError = async ( output , context ) : Promise < GetActiveNamesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetAlarmsCommand = async ( output , context ) : Promise < GetAlarmsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetAlarmsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetAlarmsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetAlarmsCommandError = async ( output , context ) : Promise < GetAlarmsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetAutoSnapshotsCommand = async ( output , context ) : Promise < GetAutoSnapshotsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetAutoSnapshotsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetAutoSnapshotsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetAutoSnapshotsCommandError = async ( output , context ) : Promise < GetAutoSnapshotsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetBlueprintsCommand = async ( output , context ) : Promise < GetBlueprintsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetBlueprintsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetBlueprintsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetBlueprintsCommandError = async ( output , context ) : Promise < GetBlueprintsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetBucketAccessKeysCommand = async ( output , context ) : Promise < GetBucketAccessKeysCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetBucketAccessKeysCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetBucketAccessKeysResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetBucketAccessKeysCommandError = async ( output , context ) : Promise < GetBucketAccessKeysCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetBucketBundlesCommand = async ( output , context ) : Promise < GetBucketBundlesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetBucketBundlesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetBucketBundlesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetBucketBundlesCommandError = async ( output , context ) : Promise < GetBucketBundlesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetBucketMetricDataCommand = async ( output , context ) : Promise < GetBucketMetricDataCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetBucketMetricDataCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetBucketMetricDataResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetBucketMetricDataCommandError = async ( output , context ) : Promise < GetBucketMetricDataCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetBucketsCommand = async ( output , context ) : Promise < GetBucketsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetBucketsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetBucketsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetBucketsCommandError = async ( output , context ) : Promise < GetBucketsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetBundlesCommand = async ( output , context ) : Promise < GetBundlesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetBundlesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetBundlesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetBundlesCommandError = async ( output , context ) : Promise < GetBundlesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetCertificatesCommand = async ( output , context ) : Promise < GetCertificatesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetCertificatesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetCertificatesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetCertificatesCommandError = async ( output , context ) : Promise < GetCertificatesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetCloudFormationStackRecordsCommand = async ( output , context ) : Promise < GetCloudFormationStackRecordsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetCloudFormationStackRecordsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetCloudFormationStackRecordsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetCloudFormationStackRecordsCommandError = async ( output , context ) : Promise < GetCloudFormationStackRecordsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetContactMethodsCommand = async ( output , context ) : Promise < GetContactMethodsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetContactMethodsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetContactMethodsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetContactMethodsCommandError = async ( output , context ) : Promise < GetContactMethodsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetContainerAPIMetadataCommand = async ( output , context ) : Promise < GetContainerAPIMetadataCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetContainerAPIMetadataCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetContainerAPIMetadataResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetContainerAPIMetadataCommandError = async ( output , context ) : Promise < GetContainerAPIMetadataCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetContainerImagesCommand = async ( output , context ) : Promise < GetContainerImagesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetContainerImagesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetContainerImagesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetContainerImagesCommandError = async ( output , context ) : Promise < GetContainerImagesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetContainerLogCommand = async ( output , context ) : Promise < GetContainerLogCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetContainerLogCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetContainerLogResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetContainerLogCommandError = async ( output , context ) : Promise < GetContainerLogCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetContainerServiceDeploymentsCommand = async ( output , context ) : Promise < GetContainerServiceDeploymentsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetContainerServiceDeploymentsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetContainerServiceDeploymentsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetContainerServiceDeploymentsCommandError = async ( output , context ) : Promise < GetContainerServiceDeploymentsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetContainerServiceMetricDataCommand = async ( output , context ) : Promise < GetContainerServiceMetricDataCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetContainerServiceMetricDataCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetContainerServiceMetricDataResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetContainerServiceMetricDataCommandError = async ( output , context ) : Promise < GetContainerServiceMetricDataCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetContainerServicePowersCommand = async ( output , context ) : Promise < GetContainerServicePowersCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetContainerServicePowersCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetContainerServicePowersResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetContainerServicePowersCommandError = async ( output , context ) : Promise < GetContainerServicePowersCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetContainerServicesCommand = async ( output , context ) : Promise < GetContainerServicesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetContainerServicesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ContainerServicesListResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetContainerServicesCommandError = async ( output , context ) : Promise < GetContainerServicesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetDiskCommand = async ( output , context ) : Promise < GetDiskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetDiskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetDiskResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetDiskCommandError = async ( output , context ) : Promise < GetDiskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetDisksCommand = async ( output , context ) : Promise < GetDisksCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetDisksCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetDisksResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetDisksCommandError = async ( output , context ) : Promise < GetDisksCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetDiskSnapshotCommand = async ( output , context ) : Promise < GetDiskSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetDiskSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetDiskSnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetDiskSnapshotCommandError = async ( output , context ) : Promise < GetDiskSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetDiskSnapshotsCommand = async ( output , context ) : Promise < GetDiskSnapshotsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetDiskSnapshotsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetDiskSnapshotsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetDiskSnapshotsCommandError = async ( output , context ) : Promise < GetDiskSnapshotsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetDistributionBundlesCommand = async ( output , context ) : Promise < GetDistributionBundlesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetDistributionBundlesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetDistributionBundlesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetDistributionBundlesCommandError = async ( output , context ) : Promise < GetDistributionBundlesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetDistributionLatestCacheResetCommand = async ( output , context ) : Promise < GetDistributionLatestCacheResetCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetDistributionLatestCacheResetCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetDistributionLatestCacheResetResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetDistributionLatestCacheResetCommandError = async ( output , context ) : Promise < GetDistributionLatestCacheResetCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetDistributionMetricDataCommand = async ( output , context ) : Promise < GetDistributionMetricDataCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetDistributionMetricDataCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetDistributionMetricDataResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetDistributionMetricDataCommandError = async ( output , context ) : Promise < GetDistributionMetricDataCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetDistributionsCommand = async ( output , context ) : Promise < GetDistributionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetDistributionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetDistributionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetDistributionsCommandError = async ( output , context ) : Promise < GetDistributionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetDomainCommand = async ( output , context ) : Promise < GetDomainCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetDomainCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetDomainResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetDomainCommandError = async ( output , context ) : Promise < GetDomainCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetDomainsCommand = async ( output , context ) : Promise < GetDomainsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetDomainsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetDomainsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetDomainsCommandError = async ( output , context ) : Promise < GetDomainsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetExportSnapshotRecordsCommand = async ( output , context ) : Promise < GetExportSnapshotRecordsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetExportSnapshotRecordsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetExportSnapshotRecordsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetExportSnapshotRecordsCommandError = async ( output , context ) : Promise < GetExportSnapshotRecordsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetInstanceCommand = async ( output , context ) : Promise < GetInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetInstanceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetInstanceCommandError = async ( output , context ) : Promise < GetInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetInstanceAccessDetailsCommand = async ( output , context ) : Promise < GetInstanceAccessDetailsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetInstanceAccessDetailsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetInstanceAccessDetailsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetInstanceAccessDetailsCommandError = async ( output , context ) : Promise < GetInstanceAccessDetailsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetInstanceMetricDataCommand = async ( output , context ) : Promise < GetInstanceMetricDataCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetInstanceMetricDataCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetInstanceMetricDataResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetInstanceMetricDataCommandError = async ( output , context ) : Promise < GetInstanceMetricDataCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetInstancePortStatesCommand = async ( output , context ) : Promise < GetInstancePortStatesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetInstancePortStatesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetInstancePortStatesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetInstancePortStatesCommandError = async ( output , context ) : Promise < GetInstancePortStatesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetInstancesCommand = async ( output , context ) : Promise < GetInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetInstancesCommandError = async ( output , context ) : Promise < GetInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetInstanceSnapshotCommand = async ( output , context ) : Promise < GetInstanceSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetInstanceSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetInstanceSnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetInstanceSnapshotCommandError = async ( output , context ) : Promise < GetInstanceSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetInstanceSnapshotsCommand = async ( output , context ) : Promise < GetInstanceSnapshotsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetInstanceSnapshotsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetInstanceSnapshotsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetInstanceSnapshotsCommandError = async ( output , context ) : Promise < GetInstanceSnapshotsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetInstanceStateCommand = async ( output , context ) : Promise < GetInstanceStateCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetInstanceStateCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetInstanceStateResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetInstanceStateCommandError = async ( output , context ) : Promise < GetInstanceStateCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetKeyPairCommand = async ( output , context ) : Promise < GetKeyPairCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetKeyPairCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetKeyPairResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetKeyPairCommandError = async ( output , context ) : Promise < GetKeyPairCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetKeyPairsCommand = async ( output , context ) : Promise < GetKeyPairsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetKeyPairsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetKeyPairsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetKeyPairsCommandError = async ( output , context ) : Promise < GetKeyPairsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetLoadBalancerCommand = async ( output , context ) : Promise < GetLoadBalancerCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetLoadBalancerCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetLoadBalancerResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetLoadBalancerCommandError = async ( output , context ) : Promise < GetLoadBalancerCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetLoadBalancerMetricDataCommand = async ( output , context ) : Promise < GetLoadBalancerMetricDataCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetLoadBalancerMetricDataCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetLoadBalancerMetricDataResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetLoadBalancerMetricDataCommandError = async ( output , context ) : Promise < GetLoadBalancerMetricDataCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetLoadBalancersCommand = async ( output , context ) : Promise < GetLoadBalancersCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetLoadBalancersCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetLoadBalancersResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetLoadBalancersCommandError = async ( output , context ) : Promise < GetLoadBalancersCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetLoadBalancerTlsCertificatesCommand = async ( output , context ) : Promise < GetLoadBalancerTlsCertificatesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetLoadBalancerTlsCertificatesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetLoadBalancerTlsCertificatesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetLoadBalancerTlsCertificatesCommandError = async ( output , context ) : Promise < GetLoadBalancerTlsCertificatesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetOperationCommand = async ( output , context ) : Promise < GetOperationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetOperationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetOperationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetOperationCommandError = async ( output , context ) : Promise < GetOperationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetOperationsCommand = async ( output , context ) : Promise < GetOperationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetOperationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetOperationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetOperationsCommandError = async ( output , context ) : Promise < GetOperationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetOperationsForResourceCommand = async ( output , context ) : Promise < GetOperationsForResourceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetOperationsForResourceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetOperationsForResourceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetOperationsForResourceCommandError = async ( output , context ) : Promise < GetOperationsForResourceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetRegionsCommand = async ( output , context ) : Promise < GetRegionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetRegionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetRegionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetRegionsCommandError = async ( output , context ) : Promise < GetRegionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetRelationalDatabaseCommand = async ( output , context ) : Promise < GetRelationalDatabaseCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetRelationalDatabaseCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetRelationalDatabaseResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetRelationalDatabaseCommandError = async ( output , context ) : Promise < GetRelationalDatabaseCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetRelationalDatabaseBlueprintsCommand = async ( output , context ) : Promise < GetRelationalDatabaseBlueprintsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetRelationalDatabaseBlueprintsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetRelationalDatabaseBlueprintsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetRelationalDatabaseBlueprintsCommandError = async ( output , context ) : Promise < GetRelationalDatabaseBlueprintsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetRelationalDatabaseBundlesCommand = async ( output , context ) : Promise < GetRelationalDatabaseBundlesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetRelationalDatabaseBundlesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetRelationalDatabaseBundlesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetRelationalDatabaseBundlesCommandError = async ( output , context ) : Promise < GetRelationalDatabaseBundlesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetRelationalDatabaseEventsCommand = async ( output , context ) : Promise < GetRelationalDatabaseEventsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetRelationalDatabaseEventsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetRelationalDatabaseEventsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetRelationalDatabaseEventsCommandError = async ( output , context ) : Promise < GetRelationalDatabaseEventsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetRelationalDatabaseLogEventsCommand = async ( output , context ) : Promise < GetRelationalDatabaseLogEventsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetRelationalDatabaseLogEventsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetRelationalDatabaseLogEventsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetRelationalDatabaseLogEventsCommandError = async ( output , context ) : Promise < GetRelationalDatabaseLogEventsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetRelationalDatabaseLogStreamsCommand = async ( output , context ) : Promise < GetRelationalDatabaseLogStreamsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetRelationalDatabaseLogStreamsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetRelationalDatabaseLogStreamsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetRelationalDatabaseLogStreamsCommandError = async ( output , context ) : Promise < GetRelationalDatabaseLogStreamsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetRelationalDatabaseMasterUserPasswordCommand = async ( output , context ) : Promise < GetRelationalDatabaseMasterUserPasswordCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetRelationalDatabaseMasterUserPasswordCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetRelationalDatabaseMasterUserPasswordResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetRelationalDatabaseMasterUserPasswordCommandError = async ( output , context ) : Promise < GetRelationalDatabaseMasterUserPasswordCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetRelationalDatabaseMetricDataCommand = async ( output , context ) : Promise < GetRelationalDatabaseMetricDataCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetRelationalDatabaseMetricDataCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetRelationalDatabaseMetricDataResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetRelationalDatabaseMetricDataCommandError = async ( output , context ) : Promise < GetRelationalDatabaseMetricDataCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetRelationalDatabaseParametersCommand = async ( output , context ) : Promise < GetRelationalDatabaseParametersCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetRelationalDatabaseParametersCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetRelationalDatabaseParametersResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetRelationalDatabaseParametersCommandError = async ( output , context ) : Promise < GetRelationalDatabaseParametersCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetRelationalDatabasesCommand = async ( output , context ) : Promise < GetRelationalDatabasesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetRelationalDatabasesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetRelationalDatabasesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetRelationalDatabasesCommandError = async ( output , context ) : Promise < GetRelationalDatabasesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetRelationalDatabaseSnapshotCommand = async ( output , context ) : Promise < GetRelationalDatabaseSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetRelationalDatabaseSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetRelationalDatabaseSnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetRelationalDatabaseSnapshotCommandError = async ( output , context ) : Promise < GetRelationalDatabaseSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetRelationalDatabaseSnapshotsCommand = async ( output , context ) : Promise < GetRelationalDatabaseSnapshotsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetRelationalDatabaseSnapshotsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetRelationalDatabaseSnapshotsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetRelationalDatabaseSnapshotsCommandError = async ( output , context ) : Promise < GetRelationalDatabaseSnapshotsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetStaticIpCommand = async ( output , context ) : Promise < GetStaticIpCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetStaticIpCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetStaticIpResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetStaticIpCommandError = async ( output , context ) : Promise < GetStaticIpCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1GetStaticIpsCommand = async ( output , context ) : Promise < GetStaticIpsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetStaticIpsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetStaticIpsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetStaticIpsCommandError = async ( output , context ) : Promise < GetStaticIpsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1ImportKeyPairCommand = async ( output , context ) : Promise < ImportKeyPairCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ImportKeyPairCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ImportKeyPairResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ImportKeyPairCommandError = async ( output , context ) : Promise < ImportKeyPairCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1IsVpcPeeredCommand = async ( output , context ) : Promise < IsVpcPeeredCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1IsVpcPeeredCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1IsVpcPeeredResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1IsVpcPeeredCommandError = async ( output , context ) : Promise < IsVpcPeeredCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1OpenInstancePublicPortsCommand = async ( output , context ) : Promise < OpenInstancePublicPortsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1OpenInstancePublicPortsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1OpenInstancePublicPortsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1OpenInstancePublicPortsCommandError = async ( output , context ) : Promise < OpenInstancePublicPortsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1PeerVpcCommand = async ( output , context ) : Promise < PeerVpcCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PeerVpcCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1PeerVpcResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PeerVpcCommandError = async ( output , context ) : Promise < PeerVpcCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1PutAlarmCommand = async ( output , context ) : Promise < PutAlarmCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutAlarmCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1PutAlarmResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutAlarmCommandError = async ( output , context ) : Promise < PutAlarmCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1PutInstancePublicPortsCommand = async ( output , context ) : Promise < PutInstancePublicPortsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1PutInstancePublicPortsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1PutInstancePublicPortsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1PutInstancePublicPortsCommandError = async ( output , context ) : Promise < PutInstancePublicPortsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1RebootInstanceCommand = async ( output , context ) : Promise < RebootInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1RebootInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1RebootInstanceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1RebootInstanceCommandError = async ( output , context ) : Promise < RebootInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1RebootRelationalDatabaseCommand = async ( output , context ) : Promise < RebootRelationalDatabaseCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1RebootRelationalDatabaseCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1RebootRelationalDatabaseResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1RebootRelationalDatabaseCommandError = async ( output , context ) : Promise < RebootRelationalDatabaseCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1RegisterContainerImageCommand = async ( output , context ) : Promise < RegisterContainerImageCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1RegisterContainerImageCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1RegisterContainerImageResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1RegisterContainerImageCommandError = async ( output , context ) : Promise < RegisterContainerImageCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1ReleaseStaticIpCommand = async ( output , context ) : Promise < ReleaseStaticIpCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ReleaseStaticIpCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ReleaseStaticIpResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ReleaseStaticIpCommandError = async ( output , context ) : Promise < ReleaseStaticIpCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1ResetDistributionCacheCommand = async ( output , context ) : Promise < ResetDistributionCacheCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ResetDistributionCacheCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ResetDistributionCacheResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ResetDistributionCacheCommandError = async ( output , context ) : Promise < ResetDistributionCacheCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1SendContactMethodVerificationCommand = async ( output , context ) : Promise < SendContactMethodVerificationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1SendContactMethodVerificationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1SendContactMethodVerificationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1SendContactMethodVerificationCommandError = async ( output , context ) : Promise < SendContactMethodVerificationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1SetIpAddressTypeCommand = async ( output , context ) : Promise < SetIpAddressTypeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1SetIpAddressTypeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1SetIpAddressTypeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1SetIpAddressTypeCommandError = async ( output , context ) : Promise < SetIpAddressTypeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1SetResourceAccessForBucketCommand = async ( output , context ) : Promise < SetResourceAccessForBucketCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1SetResourceAccessForBucketCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1SetResourceAccessForBucketResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1SetResourceAccessForBucketCommandError = async ( output , context ) : Promise < SetResourceAccessForBucketCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1StartInstanceCommand = async ( output , context ) : Promise < StartInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1StartInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1StartInstanceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1StartInstanceCommandError = async ( output , context ) : Promise < StartInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1StartRelationalDatabaseCommand = async ( output , context ) : Promise < StartRelationalDatabaseCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1StartRelationalDatabaseCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1StartRelationalDatabaseResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1StartRelationalDatabaseCommandError = async ( output , context ) : Promise < StartRelationalDatabaseCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1StopInstanceCommand = async ( output , context ) : Promise < StopInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1StopInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1StopInstanceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1StopInstanceCommandError = async ( output , context ) : Promise < StopInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1StopRelationalDatabaseCommand = async ( output , context ) : Promise < StopRelationalDatabaseCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1StopRelationalDatabaseCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1StopRelationalDatabaseResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1StopRelationalDatabaseCommandError = async ( output , context ) : Promise < StopRelationalDatabaseCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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 ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1TagResourceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; 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 "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1TestAlarmCommand = async ( output , context ) : Promise < TestAlarmCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1TestAlarmCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1TestAlarmResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1TestAlarmCommandError = async ( output , context ) : Promise < TestAlarmCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1UnpeerVpcCommand = async ( output , context ) : Promise < UnpeerVpcCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1UnpeerVpcCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1UnpeerVpcResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1UnpeerVpcCommandError = async ( output , context ) : Promise < UnpeerVpcCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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 ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1UntagResourceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; 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 "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1UpdateBucketCommand = async ( output , context ) : Promise < UpdateBucketCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1UpdateBucketCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1UpdateBucketResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1UpdateBucketCommandError = async ( output , context ) : Promise < UpdateBucketCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1UpdateBucketBundleCommand = async ( output , context ) : Promise < UpdateBucketBundleCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1UpdateBucketBundleCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1UpdateBucketBundleResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1UpdateBucketBundleCommandError = async ( output , context ) : Promise < UpdateBucketBundleCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1UpdateContainerServiceCommand = async ( output , context ) : Promise < UpdateContainerServiceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1UpdateContainerServiceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1UpdateContainerServiceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1UpdateContainerServiceCommandError = async ( output , context ) : Promise < UpdateContainerServiceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1UpdateDistributionCommand = async ( output , context ) : Promise < UpdateDistributionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1UpdateDistributionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1UpdateDistributionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1UpdateDistributionCommandError = async ( output , context ) : Promise < UpdateDistributionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1UpdateDistributionBundleCommand = async ( output , context ) : Promise < UpdateDistributionBundleCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1UpdateDistributionBundleCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1UpdateDistributionBundleResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1UpdateDistributionBundleCommandError = async ( output , context ) : Promise < UpdateDistributionBundleCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1UpdateDomainEntryCommand = async ( output , context ) : Promise < UpdateDomainEntryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1UpdateDomainEntryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1UpdateDomainEntryResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1UpdateDomainEntryCommandError = async ( output , context ) : Promise < UpdateDomainEntryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1UpdateLoadBalancerAttributeCommand = async ( output , context ) : Promise < UpdateLoadBalancerAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1UpdateLoadBalancerAttributeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1UpdateLoadBalancerAttributeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1UpdateLoadBalancerAttributeCommandError = async ( output , context ) : Promise < UpdateLoadBalancerAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1UpdateRelationalDatabaseCommand = async ( output , context ) : Promise < UpdateRelationalDatabaseCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1UpdateRelationalDatabaseCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1UpdateRelationalDatabaseResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1UpdateRelationalDatabaseCommandError = async ( output , context ) : Promise < UpdateRelationalDatabaseCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1UpdateRelationalDatabaseParametersCommand = async ( output , context ) : Promise < UpdateRelationalDatabaseParametersCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1UpdateRelationalDatabaseParametersCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1UpdateRelationalDatabaseParametersResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1UpdateRelationalDatabaseParametersCommandError = async ( output , context ) : Promise < UpdateRelationalDatabaseParametersCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "AccessDeniedException" : case "com.amazonaws.lightsail#AccessDeniedException" : response = { ... ( await deserializeAws_json1_1AccessDeniedExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "AccountSetupInProgressException" : case "com.amazonaws.lightsail#AccountSetupInProgressException" : response = { ... ( await deserializeAws_json1_1AccountSetupInProgressExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InvalidInputException" : case "com.amazonaws.lightsail#InvalidInputException" : response = { ... ( await deserializeAws_json1_1InvalidInputExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.lightsail#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "OperationFailureException" : case "com.amazonaws.lightsail#OperationFailureException" : response = { ... ( await deserializeAws_json1_1OperationFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ServiceException" : case "com.amazonaws.lightsail#ServiceException" : response = { ... ( await deserializeAws_json1_1ServiceExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "UnauthenticatedException" : case "com.amazonaws.lightsail#UnauthenticatedException" : response = { ... ( await deserializeAws_json1_1UnauthenticatedExceptionResponse ( 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_1AccessDeniedExceptionResponse = async ( parsedOutput , context ) : Promise < AccessDeniedException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1AccessDeniedException ( body , context ) ; const contents = { name : "AccessDeniedException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1AccountSetupInProgressExceptionResponse = async ( parsedOutput , context ) : Promise < AccountSetupInProgressException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1AccountSetupInProgressException ( body , context ) ; const contents = { name : "AccountSetupInProgressException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InvalidInputExceptionResponse = async ( parsedOutput , context ) : Promise < InvalidInputException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InvalidInputException ( body , context ) ; const contents = { name : "InvalidInputException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NotFoundExceptionResponse = async ( parsedOutput , context ) : Promise < NotFoundException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NotFoundException ( body , context ) ; const contents = { name : "NotFoundException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1OperationFailureExceptionResponse = async ( parsedOutput , context ) : Promise < OperationFailureException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1OperationFailureException ( body , context ) ; const contents = { name : "OperationFailureException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1ServiceExceptionResponse = async ( parsedOutput , context ) : Promise < ServiceException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1ServiceException ( body , context ) ; const contents = { name : "ServiceException" , $fault : "server" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1UnauthenticatedExceptionResponse = async ( parsedOutput , context ) : Promise < UnauthenticatedException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1UnauthenticatedException ( body , context ) ; const contents = { name : "UnauthenticatedException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const serializeAws_json1_1AccessRules = ( input , context ) : any => { return { ... ( input . allowPublicOverrides !== undefined && input . allowPublicOverrides !== null && { allowPublicOverrides : input . allowPublicOverrides } ) , ... ( input . getObject !== undefined && input . getObject !== null && { getObject : input . getObject } ) , } ; } ; const serializeAws_json1_1AddOnRequest = ( input , context ) : any => { return { ... ( input . addOnType !== undefined && input . addOnType !== null && { addOnType : input . addOnType } ) , ... ( input . autoSnapshotAddOnRequest !== undefined && input . autoSnapshotAddOnRequest !== null && { autoSnapshotAddOnRequest : serializeAws_json1_1AutoSnapshotAddOnRequest ( input . autoSnapshotAddOnRequest , context ) , } ) , } ; } ; const serializeAws_json1_1AddOnRequestList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1AddOnRequest ( entry , context ) ; } ) ; } ; const serializeAws_json1_1AllocateStaticIpRequest = ( input , context ) : any => { return { ... ( input . staticIpName !== undefined && input . staticIpName !== null && { staticIpName : input . staticIpName } ) , } ; } ; const serializeAws_json1_1AttachCertificateToDistributionRequest = ( input , context ) : any => { return { ... ( input . certificateName !== undefined && input . certificateName !== null && { certificateName : input . certificateName } ) , ... ( input . distributionName !== undefined && input . distributionName !== null && { distributionName : input . distributionName } ) , } ; } ; const serializeAws_json1_1AttachDiskRequest = ( input , context ) : any => { return { ... ( input . diskName !== undefined && input . diskName !== null && { diskName : input . diskName } ) , ... ( input . diskPath !== undefined && input . diskPath !== null && { diskPath : input . diskPath } ) , ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , } ; } ; const serializeAws_json1_1AttachedDiskMap = ( input , context ) : any => { return Object . entries ( input ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : serializeAws_json1_1DiskMapList ( value , context ) , } ; } , { } ) ; } ; const serializeAws_json1_1AttachInstancesToLoadBalancerRequest = ( input , context ) : any => { return { ... ( input . instanceNames !== undefined && input . instanceNames !== null && { instanceNames : serializeAws_json1_1ResourceNameList ( input . instanceNames , context ) , } ) , ... ( input . loadBalancerName !== undefined && input . loadBalancerName !== null && { loadBalancerName : input . loadBalancerName } ) , } ; } ; const serializeAws_json1_1AttachLoadBalancerTlsCertificateRequest = ( input , context ) : any => { return { ... ( input . certificateName !== undefined && input . certificateName !== null && { certificateName : input . certificateName } ) , ... ( input . loadBalancerName !== undefined && input . loadBalancerName !== null && { loadBalancerName : input . loadBalancerName } ) , } ; } ; const serializeAws_json1_1AttachStaticIpRequest = ( input , context ) : any => { return { ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , ... ( input . staticIpName !== undefined && input . staticIpName !== null && { staticIpName : input . staticIpName } ) , } ; } ; const serializeAws_json1_1AutoSnapshotAddOnRequest = ( input , context ) : any => { return { ... ( input . snapshotTimeOfDay !== undefined && input . snapshotTimeOfDay !== null && { snapshotTimeOfDay : input . snapshotTimeOfDay } ) , } ; } ; const serializeAws_json1_1BucketAccessLogConfig = ( input , context ) : any => { return { ... ( input . destination !== undefined && input . destination !== null && { destination : input . destination } ) , ... ( input . enabled !== undefined && input . enabled !== null && { enabled : input . enabled } ) , ... ( input . prefix !== undefined && input . prefix !== null && { prefix : input . prefix } ) , } ; } ; const serializeAws_json1_1CacheBehavior = ( input , context ) : any => { return { ... ( input . behavior !== undefined && input . behavior !== null && { behavior : input . behavior } ) , } ; } ; const serializeAws_json1_1CacheBehaviorList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1CacheBehaviorPerPath ( entry , context ) ; } ) ; } ; const serializeAws_json1_1CacheBehaviorPerPath = ( input , context ) : any => { return { ... ( input . behavior !== undefined && input . behavior !== null && { behavior : input . behavior } ) , ... ( input . path !== undefined && input . path !== null && { path : input . path } ) , } ; } ; const serializeAws_json1_1CacheSettings = ( input , context ) : any => { return { ... ( input . allowedHTTPMethods !== undefined && input . allowedHTTPMethods !== null && { allowedHTTPMethods : input . allowedHTTPMethods } ) , ... ( input . cachedHTTPMethods !== undefined && input . cachedHTTPMethods !== null && { cachedHTTPMethods : input . cachedHTTPMethods } ) , ... ( input . defaultTTL !== undefined && input . defaultTTL !== null && { defaultTTL : input . defaultTTL } ) , ... ( input . forwardedCookies !== undefined && input . forwardedCookies !== null && { forwardedCookies : serializeAws_json1_1CookieObject ( input . forwardedCookies , context ) , } ) , ... ( input . forwardedHeaders !== undefined && input . forwardedHeaders !== null && { forwardedHeaders : serializeAws_json1_1HeaderObject ( input . forwardedHeaders , context ) , } ) , ... ( input . forwardedQueryStrings !== undefined && input . forwardedQueryStrings !== null && { forwardedQueryStrings : serializeAws_json1_1QueryStringObject ( input . forwardedQueryStrings , context ) , } ) , ... ( input . maximumTTL !== undefined && input . maximumTTL !== null && { maximumTTL : input . maximumTTL } ) , ... ( input . minimumTTL !== undefined && input . minimumTTL !== null && { minimumTTL : input . minimumTTL } ) , } ; } ; const serializeAws_json1_1CertificateStatusList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1CloseInstancePublicPortsRequest = ( input , context ) : any => { return { ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , ... ( input . portInfo !== undefined && input . portInfo !== null && { portInfo : serializeAws_json1_1PortInfo ( input . portInfo , context ) } ) , } ; } ; const serializeAws_json1_1ContactProtocolsList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1Container = ( input , context ) : any => { return { ... ( input . command !== undefined && input . command !== null && { command : serializeAws_json1_1StringList ( input . command , context ) } ) , ... ( input . environment !== undefined && input . environment !== null && { environment : serializeAws_json1_1Environment ( input . environment , context ) } ) , ... ( input . image !== undefined && input . image !== null && { image : input . image } ) , ... ( input . ports !== undefined && input . ports !== null && { ports : serializeAws_json1_1PortMap ( input . ports , context ) } ) , } ; } ; const serializeAws_json1_1ContainerMap = ( input , context ) : any => { return Object . entries ( input ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : serializeAws_json1_1Container ( value , context ) , } ; } , { } ) ; } ; const serializeAws_json1_1ContainerServiceDeploymentRequest = ( input , context ) : any => { return { ... ( input . containers !== undefined && input . containers !== null && { containers : serializeAws_json1_1ContainerMap ( input . containers , context ) } ) , ... ( input . publicEndpoint !== undefined && input . publicEndpoint !== null && { publicEndpoint : serializeAws_json1_1EndpointRequest ( input . publicEndpoint , context ) , } ) , } ; } ; const serializeAws_json1_1ContainerServiceHealthCheckConfig = ( input , context ) : any => { return { ... ( input . healthyThreshold !== undefined && input . healthyThreshold !== null && { healthyThreshold : input . healthyThreshold } ) , ... ( input . intervalSeconds !== undefined && input . intervalSeconds !== null && { intervalSeconds : input . intervalSeconds } ) , ... ( input . path !== undefined && input . path !== null && { path : input . path } ) , ... ( input . successCodes !== undefined && input . successCodes !== null && { successCodes : input . successCodes } ) , ... ( input . timeoutSeconds !== undefined && input . timeoutSeconds !== null && { timeoutSeconds : input . timeoutSeconds } ) , ... ( input . unhealthyThreshold !== undefined && input . unhealthyThreshold !== null && { unhealthyThreshold : input . unhealthyThreshold } ) , } ; } ; const serializeAws_json1_1ContainerServicePublicDomains = ( input , context ) : any => { return Object . entries ( input ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : serializeAws_json1_1ContainerServicePublicDomainsList ( value , context ) , } ; } , { } ) ; } ; const serializeAws_json1_1ContainerServicePublicDomainsList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1CookieObject = ( input , context ) : any => { return { ... ( input . cookiesAllowList !== undefined && input . cookiesAllowList !== null && { cookiesAllowList : serializeAws_json1_1StringList ( input . cookiesAllowList , context ) , } ) , ... ( input . option !== undefined && input . option !== null && { option : input . option } ) , } ; } ; const serializeAws_json1_1CopySnapshotRequest = ( input , context ) : any => { return { ... ( input . restoreDate !== undefined && input . restoreDate !== null && { restoreDate : input . restoreDate } ) , ... ( input . sourceRegion !== undefined && input . sourceRegion !== null && { sourceRegion : input . sourceRegion } ) , ... ( input . sourceResourceName !== undefined && input . sourceResourceName !== null && { sourceResourceName : input . sourceResourceName } ) , ... ( input . sourceSnapshotName !== undefined && input . sourceSnapshotName !== null && { sourceSnapshotName : input . sourceSnapshotName } ) , ... ( input . targetSnapshotName !== undefined && input . targetSnapshotName !== null && { targetSnapshotName : input . targetSnapshotName } ) , ... ( input . useLatestRestorableAutoSnapshot !== undefined && input . useLatestRestorableAutoSnapshot !== null && { useLatestRestorableAutoSnapshot : input . useLatestRestorableAutoSnapshot , } ) , } ; } ; const serializeAws_json1_1CreateBucketAccessKeyRequest = ( input , context ) : any => { return { ... ( input . bucketName !== undefined && input . bucketName !== null && { bucketName : input . bucketName } ) , } ; } ; const serializeAws_json1_1CreateBucketRequest = ( input , context ) : any => { return { ... ( input . bucketName !== undefined && input . bucketName !== null && { bucketName : input . bucketName } ) , ... ( input . bundleId !== undefined && input . bundleId !== null && { bundleId : input . bundleId } ) , ... ( input . enableObjectVersioning !== undefined && input . enableObjectVersioning !== null && { enableObjectVersioning : input . enableObjectVersioning } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , } ; } ; const serializeAws_json1_1CreateCertificateRequest = ( input , context ) : any => { return { ... ( input . certificateName !== undefined && input . certificateName !== null && { certificateName : input . certificateName } ) , ... ( input . domainName !== undefined && input . domainName !== null && { domainName : input . domainName } ) , ... ( input . subjectAlternativeNames !== undefined && input . subjectAlternativeNames !== null && { subjectAlternativeNames : serializeAws_json1_1SubjectAlternativeNameList ( input . subjectAlternativeNames , context ) , } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , } ; } ; const serializeAws_json1_1CreateCloudFormationStackRequest = ( input , context ) : any => { return { ... ( input . instances !== undefined && input . instances !== null && { instances : serializeAws_json1_1InstanceEntryList ( input . instances , context ) } ) , } ; } ; const serializeAws_json1_1CreateContactMethodRequest = ( input , context ) : any => { return { ... ( input . contactEndpoint !== undefined && input . contactEndpoint !== null && { contactEndpoint : input . contactEndpoint } ) , ... ( input . protocol !== undefined && input . protocol !== null && { protocol : input . protocol } ) , } ; } ; const serializeAws_json1_1CreateContainerServiceDeploymentRequest = ( input , context ) : any => { return { ... ( input . containers !== undefined && input . containers !== null && { containers : serializeAws_json1_1ContainerMap ( input . containers , context ) } ) , ... ( input . publicEndpoint !== undefined && input . publicEndpoint !== null && { publicEndpoint : serializeAws_json1_1EndpointRequest ( input . publicEndpoint , context ) , } ) , ... ( input . serviceName !== undefined && input . serviceName !== null && { serviceName : input . serviceName } ) , } ; } ; const serializeAws_json1_1CreateContainerServiceRegistryLoginRequest = ( input , context ) : any => { return { } ; } ; const serializeAws_json1_1CreateContainerServiceRequest = ( input , context ) : any => { return { ... ( input . deployment !== undefined && input . deployment !== null && { deployment : serializeAws_json1_1ContainerServiceDeploymentRequest ( input . deployment , context ) , } ) , ... ( input . power !== undefined && input . power !== null && { power : input . power } ) , ... ( input . publicDomainNames !== undefined && input . publicDomainNames !== null && { publicDomainNames : serializeAws_json1_1ContainerServicePublicDomains ( input . publicDomainNames , context ) , } ) , ... ( input . scale !== undefined && input . scale !== null && { scale : input . scale } ) , ... ( input . serviceName !== undefined && input . serviceName !== null && { serviceName : input . serviceName } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , } ; } ; const serializeAws_json1_1CreateDiskFromSnapshotRequest = ( input , context ) : any => { return { ... ( input . addOns !== undefined && input . addOns !== null && { addOns : serializeAws_json1_1AddOnRequestList ( input . addOns , context ) } ) , ... ( input . availabilityZone !== undefined && input . availabilityZone !== null && { availabilityZone : input . availabilityZone } ) , ... ( input . diskName !== undefined && input . diskName !== null && { diskName : input . diskName } ) , ... ( input . diskSnapshotName !== undefined && input . diskSnapshotName !== null && { diskSnapshotName : input . diskSnapshotName } ) , ... ( input . restoreDate !== undefined && input . restoreDate !== null && { restoreDate : input . restoreDate } ) , ... ( input . sizeInGb !== undefined && input . sizeInGb !== null && { sizeInGb : input . sizeInGb } ) , ... ( input . sourceDiskName !== undefined && input . sourceDiskName !== null && { sourceDiskName : input . sourceDiskName } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , ... ( input . useLatestRestorableAutoSnapshot !== undefined && input . useLatestRestorableAutoSnapshot !== null && { useLatestRestorableAutoSnapshot : input . useLatestRestorableAutoSnapshot , } ) , } ; } ; const serializeAws_json1_1CreateDiskRequest = ( input , context ) : any => { return { ... ( input . addOns !== undefined && input . addOns !== null && { addOns : serializeAws_json1_1AddOnRequestList ( input . addOns , context ) } ) , ... ( input . availabilityZone !== undefined && input . availabilityZone !== null && { availabilityZone : input . availabilityZone } ) , ... ( input . diskName !== undefined && input . diskName !== null && { diskName : input . diskName } ) , ... ( input . sizeInGb !== undefined && input . sizeInGb !== null && { sizeInGb : input . sizeInGb } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , } ; } ; const serializeAws_json1_1CreateDiskSnapshotRequest = ( input , context ) : any => { return { ... ( input . diskName !== undefined && input . diskName !== null && { diskName : input . diskName } ) , ... ( input . diskSnapshotName !== undefined && input . diskSnapshotName !== null && { diskSnapshotName : input . diskSnapshotName } ) , ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , } ; } ; const serializeAws_json1_1CreateDistributionRequest = ( input , context ) : any => { return { ... ( input . bundleId !== undefined && input . bundleId !== null && { bundleId : input . bundleId } ) , ... ( input . cacheBehaviorSettings !== undefined && input . cacheBehaviorSettings !== null && { cacheBehaviorSettings : serializeAws_json1_1CacheSettings ( input . cacheBehaviorSettings , context ) , } ) , ... ( input . cacheBehaviors !== undefined && input . cacheBehaviors !== null && { cacheBehaviors : serializeAws_json1_1CacheBehaviorList ( input . cacheBehaviors , context ) , } ) , ... ( input . defaultCacheBehavior !== undefined && input . defaultCacheBehavior !== null && { defaultCacheBehavior : serializeAws_json1_1CacheBehavior ( input . defaultCacheBehavior , context ) , } ) , ... ( input . distributionName !== undefined && input . distributionName !== null && { distributionName : input . distributionName } ) , ... ( input . ipAddressType !== undefined && input . ipAddressType !== null && { ipAddressType : input . ipAddressType } ) , ... ( input . origin !== undefined && input . origin !== null && { origin : serializeAws_json1_1InputOrigin ( input . origin , context ) } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , } ; } ; const serializeAws_json1_1CreateDomainEntryRequest = ( input , context ) : any => { return { ... ( input . domainEntry !== undefined && input . domainEntry !== null && { domainEntry : serializeAws_json1_1DomainEntry ( input . domainEntry , context ) } ) , ... ( input . domainName !== undefined && input . domainName !== null && { domainName : input . domainName } ) , } ; } ; const serializeAws_json1_1CreateDomainRequest = ( input , context ) : any => { return { ... ( input . domainName !== undefined && input . domainName !== null && { domainName : input . domainName } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , } ; } ; const serializeAws_json1_1CreateInstancesFromSnapshotRequest = ( input , context ) : any => { return { ... ( input . addOns !== undefined && input . addOns !== null && { addOns : serializeAws_json1_1AddOnRequestList ( input . addOns , context ) } ) , ... ( input . attachedDiskMapping !== undefined && input . attachedDiskMapping !== null && { attachedDiskMapping : serializeAws_json1_1AttachedDiskMap ( input . attachedDiskMapping , context ) , } ) , ... ( input . availabilityZone !== undefined && input . availabilityZone !== null && { availabilityZone : input . availabilityZone } ) , ... ( input . bundleId !== undefined && input . bundleId !== null && { bundleId : input . bundleId } ) , ... ( input . instanceNames !== undefined && input . instanceNames !== null && { instanceNames : serializeAws_json1_1StringList ( input . instanceNames , context ) } ) , ... ( input . instanceSnapshotName !== undefined && input . instanceSnapshotName !== null && { instanceSnapshotName : input . instanceSnapshotName } ) , ... ( input . ipAddressType !== undefined && input . ipAddressType !== null && { ipAddressType : input . ipAddressType } ) , ... ( input . keyPairName !== undefined && input . keyPairName !== null && { keyPairName : input . keyPairName } ) , ... ( input . restoreDate !== undefined && input . restoreDate !== null && { restoreDate : input . restoreDate } ) , ... ( input . sourceInstanceName !== undefined && input . sourceInstanceName !== null && { sourceInstanceName : input . sourceInstanceName } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , ... ( input . useLatestRestorableAutoSnapshot !== undefined && input . useLatestRestorableAutoSnapshot !== null && { useLatestRestorableAutoSnapshot : input . useLatestRestorableAutoSnapshot , } ) , ... ( input . userData !== undefined && input . userData !== null && { userData : input . userData } ) , } ; } ; const serializeAws_json1_1CreateInstanceSnapshotRequest = ( input , context ) : any => { return { ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , ... ( input . instanceSnapshotName !== undefined && input . instanceSnapshotName !== null && { instanceSnapshotName : input . instanceSnapshotName } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , } ; } ; const serializeAws_json1_1CreateInstancesRequest = ( input , context ) : any => { return { ... ( input . addOns !== undefined && input . addOns !== null && { addOns : serializeAws_json1_1AddOnRequestList ( input . addOns , context ) } ) , ... ( input . availabilityZone !== undefined && input . availabilityZone !== null && { availabilityZone : input . availabilityZone } ) , ... ( input . blueprintId !== undefined && input . blueprintId !== null && { blueprintId : input . blueprintId } ) , ... ( input . bundleId !== undefined && input . bundleId !== null && { bundleId : input . bundleId } ) , ... ( input . customImageName !== undefined && input . customImageName !== null && { customImageName : input . customImageName } ) , ... ( input . instanceNames !== undefined && input . instanceNames !== null && { instanceNames : serializeAws_json1_1StringList ( input . instanceNames , context ) } ) , ... ( input . ipAddressType !== undefined && input . ipAddressType !== null && { ipAddressType : input . ipAddressType } ) , ... ( input . keyPairName !== undefined && input . keyPairName !== null && { keyPairName : input . keyPairName } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , ... ( input . userData !== undefined && input . userData !== null && { userData : input . userData } ) , } ; } ; const serializeAws_json1_1CreateKeyPairRequest = ( input , context ) : any => { return { ... ( input . keyPairName !== undefined && input . keyPairName !== null && { keyPairName : input . keyPairName } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , } ; } ; const serializeAws_json1_1CreateLoadBalancerRequest = ( input , context ) : any => { return { ... ( input . certificateAlternativeNames !== undefined && input . certificateAlternativeNames !== null && { certificateAlternativeNames : serializeAws_json1_1DomainNameList ( input . certificateAlternativeNames , context ) , } ) , ... ( input . certificateDomainName !== undefined && input . certificateDomainName !== null && { certificateDomainName : input . certificateDomainName } ) , ... ( input . certificateName !== undefined && input . certificateName !== null && { certificateName : input . certificateName } ) , ... ( input . healthCheckPath !== undefined && input . healthCheckPath !== null && { healthCheckPath : input . healthCheckPath } ) , ... ( input . instancePort !== undefined && input . instancePort !== null && { instancePort : input . instancePort } ) , ... ( input . ipAddressType !== undefined && input . ipAddressType !== null && { ipAddressType : input . ipAddressType } ) , ... ( input . loadBalancerName !== undefined && input . loadBalancerName !== null && { loadBalancerName : input . loadBalancerName } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , } ; } ; const serializeAws_json1_1CreateLoadBalancerTlsCertificateRequest = ( input , context ) : any => { return { ... ( input . certificateAlternativeNames !== undefined && input . certificateAlternativeNames !== null && { certificateAlternativeNames : serializeAws_json1_1DomainNameList ( input . certificateAlternativeNames , context ) , } ) , ... ( input . certificateDomainName !== undefined && input . certificateDomainName !== null && { certificateDomainName : input . certificateDomainName } ) , ... ( input . certificateName !== undefined && input . certificateName !== null && { certificateName : input . certificateName } ) , ... ( input . loadBalancerName !== undefined && input . loadBalancerName !== null && { loadBalancerName : input . loadBalancerName } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , } ; } ; const serializeAws_json1_1CreateRelationalDatabaseFromSnapshotRequest = ( input , context ) : any => { return { ... ( input . availabilityZone !== undefined && input . availabilityZone !== null && { availabilityZone : input . availabilityZone } ) , ... ( input . publiclyAccessible !== undefined && input . publiclyAccessible !== null && { publiclyAccessible : input . publiclyAccessible } ) , ... ( input . relationalDatabaseBundleId !== undefined && input . relationalDatabaseBundleId !== null && { relationalDatabaseBundleId : input . relationalDatabaseBundleId } ) , ... ( input . relationalDatabaseName !== undefined && input . relationalDatabaseName !== null && { relationalDatabaseName : input . relationalDatabaseName } ) , ... ( input . relationalDatabaseSnapshotName !== undefined && input . relationalDatabaseSnapshotName !== null && { relationalDatabaseSnapshotName : input . relationalDatabaseSnapshotName , } ) , ... ( input . restoreTime !== undefined && input . restoreTime !== null && { restoreTime : Math . round ( input . restoreTime . getTime ( ) / 1000 ) } ) , ... ( input . sourceRelationalDatabaseName !== undefined && input . sourceRelationalDatabaseName !== null && { sourceRelationalDatabaseName : input . sourceRelationalDatabaseName , } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , ... ( input . useLatestRestorableTime !== undefined && input . useLatestRestorableTime !== null && { useLatestRestorableTime : input . useLatestRestorableTime } ) , } ; } ; const serializeAws_json1_1CreateRelationalDatabaseRequest = ( input , context ) : any => { return { ... ( input . availabilityZone !== undefined && input . availabilityZone !== null && { availabilityZone : input . availabilityZone } ) , ... ( input . masterDatabaseName !== undefined && input . masterDatabaseName !== null && { masterDatabaseName : input . masterDatabaseName } ) , ... ( input . masterUserPassword !== undefined && input . masterUserPassword !== null && { masterUserPassword : input . masterUserPassword } ) , ... ( input . masterUsername !== undefined && input . masterUsername !== null && { masterUsername : input . masterUsername } ) , ... ( input . preferredBackupWindow !== undefined && input . preferredBackupWindow !== null && { preferredBackupWindow : input . preferredBackupWindow } ) , ... ( input . preferredMaintenanceWindow !== undefined && input . preferredMaintenanceWindow !== null && { preferredMaintenanceWindow : input . preferredMaintenanceWindow } ) , ... ( input . publiclyAccessible !== undefined && input . publiclyAccessible !== null && { publiclyAccessible : input . publiclyAccessible } ) , ... ( input . relationalDatabaseBlueprintId !== undefined && input . relationalDatabaseBlueprintId !== null && { relationalDatabaseBlueprintId : input . relationalDatabaseBlueprintId , } ) , ... ( input . relationalDatabaseBundleId !== undefined && input . relationalDatabaseBundleId !== null && { relationalDatabaseBundleId : input . relationalDatabaseBundleId } ) , ... ( input . relationalDatabaseName !== undefined && input . relationalDatabaseName !== null && { relationalDatabaseName : input . relationalDatabaseName } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , } ; } ; const serializeAws_json1_1CreateRelationalDatabaseSnapshotRequest = ( input , context ) : any => { return { ... ( input . relationalDatabaseName !== undefined && input . relationalDatabaseName !== null && { relationalDatabaseName : input . relationalDatabaseName } ) , ... ( input . relationalDatabaseSnapshotName !== undefined && input . relationalDatabaseSnapshotName !== null && { relationalDatabaseSnapshotName : input . relationalDatabaseSnapshotName , } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , } ; } ; const serializeAws_json1_1DeleteAlarmRequest = ( input , context ) : any => { return { ... ( input . alarmName !== undefined && input . alarmName !== null && { alarmName : input . alarmName } ) , } ; } ; const serializeAws_json1_1DeleteAutoSnapshotRequest = ( input , context ) : any => { return { ... ( input . date !== undefined && input . date !== null && { date : input . date } ) , ... ( input . resourceName !== undefined && input . resourceName !== null && { resourceName : input . resourceName } ) , } ; } ; const serializeAws_json1_1DeleteBucketAccessKeyRequest = ( input , context ) : any => { return { ... ( input . accessKeyId !== undefined && input . accessKeyId !== null && { accessKeyId : input . accessKeyId } ) , ... ( input . bucketName !== undefined && input . bucketName !== null && { bucketName : input . bucketName } ) , } ; } ; const serializeAws_json1_1DeleteBucketRequest = ( input , context ) : any => { return { ... ( input . bucketName !== undefined && input . bucketName !== null && { bucketName : input . bucketName } ) , ... ( input . forceDelete !== undefined && input . forceDelete !== null && { forceDelete : input . forceDelete } ) , } ; } ; const serializeAws_json1_1DeleteCertificateRequest = ( input , context ) : any => { return { ... ( input . certificateName !== undefined && input . certificateName !== null && { certificateName : input . certificateName } ) , } ; } ; const serializeAws_json1_1DeleteContactMethodRequest = ( input , context ) : any => { return { ... ( input . protocol !== undefined && input . protocol !== null && { protocol : input . protocol } ) , } ; } ; const serializeAws_json1_1DeleteContainerImageRequest = ( input , context ) : any => { return { ... ( input . image !== undefined && input . image !== null && { image : input . image } ) , ... ( input . serviceName !== undefined && input . serviceName !== null && { serviceName : input . serviceName } ) , } ; } ; const serializeAws_json1_1DeleteContainerServiceRequest = ( input , context ) : any => { return { ... ( input . serviceName !== undefined && input . serviceName !== null && { serviceName : input . serviceName } ) , } ; } ; const serializeAws_json1_1DeleteDiskRequest = ( input , context ) : any => { return { ... ( input . diskName !== undefined && input . diskName !== null && { diskName : input . diskName } ) , ... ( input . forceDeleteAddOns !== undefined && input . forceDeleteAddOns !== null && { forceDeleteAddOns : input . forceDeleteAddOns } ) , } ; } ; const serializeAws_json1_1DeleteDiskSnapshotRequest = ( input , context ) : any => { return { ... ( input . diskSnapshotName !== undefined && input . diskSnapshotName !== null && { diskSnapshotName : input . diskSnapshotName } ) , } ; } ; const serializeAws_json1_1DeleteDistributionRequest = ( input , context ) : any => { return { ... ( input . distributionName !== undefined && input . distributionName !== null && { distributionName : input . distributionName } ) , } ; } ; const serializeAws_json1_1DeleteDomainEntryRequest = ( input , context ) : any => { return { ... ( input . domainEntry !== undefined && input . domainEntry !== null && { domainEntry : serializeAws_json1_1DomainEntry ( input . domainEntry , context ) } ) , ... ( input . domainName !== undefined && input . domainName !== null && { domainName : input . domainName } ) , } ; } ; const serializeAws_json1_1DeleteDomainRequest = ( input , context ) : any => { return { ... ( input . domainName !== undefined && input . domainName !== null && { domainName : input . domainName } ) , } ; } ; const serializeAws_json1_1DeleteInstanceRequest = ( input , context ) : any => { return { ... ( input . forceDeleteAddOns !== undefined && input . forceDeleteAddOns !== null && { forceDeleteAddOns : input . forceDeleteAddOns } ) , ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , } ; } ; const serializeAws_json1_1DeleteInstanceSnapshotRequest = ( input , context ) : any => { return { ... ( input . instanceSnapshotName !== undefined && input . instanceSnapshotName !== null && { instanceSnapshotName : input . instanceSnapshotName } ) , } ; } ; const serializeAws_json1_1DeleteKeyPairRequest = ( input , context ) : any => { return { ... ( input . keyPairName !== undefined && input . keyPairName !== null && { keyPairName : input . keyPairName } ) , } ; } ; const serializeAws_json1_1DeleteKnownHostKeysRequest = ( input , context ) : any => { return { ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , } ; } ; const serializeAws_json1_1DeleteLoadBalancerRequest = ( input , context ) : any => { return { ... ( input . loadBalancerName !== undefined && input . loadBalancerName !== null && { loadBalancerName : input . loadBalancerName } ) , } ; } ; const serializeAws_json1_1DeleteLoadBalancerTlsCertificateRequest = ( input , context ) : any => { return { ... ( input . certificateName !== undefined && input . certificateName !== null && { certificateName : input . certificateName } ) , ... ( input . force !== undefined && input . force !== null && { force : input . force } ) , ... ( input . loadBalancerName !== undefined && input . loadBalancerName !== null && { loadBalancerName : input . loadBalancerName } ) , } ; } ; const serializeAws_json1_1DeleteRelationalDatabaseRequest = ( input , context ) : any => { return { ... ( input . finalRelationalDatabaseSnapshotName !== undefined && input . finalRelationalDatabaseSnapshotName !== null && { finalRelationalDatabaseSnapshotName : input . finalRelationalDatabaseSnapshotName , } ) , ... ( input . relationalDatabaseName !== undefined && input . relationalDatabaseName !== null && { relationalDatabaseName : input . relationalDatabaseName } ) , ... ( input . skipFinalSnapshot !== undefined && input . skipFinalSnapshot !== null && { skipFinalSnapshot : input . skipFinalSnapshot } ) , } ; } ; const serializeAws_json1_1DeleteRelationalDatabaseSnapshotRequest = ( input , context ) : any => { return { ... ( input . relationalDatabaseSnapshotName !== undefined && input . relationalDatabaseSnapshotName !== null && { relationalDatabaseSnapshotName : input . relationalDatabaseSnapshotName , } ) , } ; } ; const serializeAws_json1_1DetachCertificateFromDistributionRequest = ( input , context ) : any => { return { ... ( input . distributionName !== undefined && input . distributionName !== null && { distributionName : input . distributionName } ) , } ; } ; const serializeAws_json1_1DetachDiskRequest = ( input , context ) : any => { return { ... ( input . diskName !== undefined && input . diskName !== null && { diskName : input . diskName } ) , } ; } ; const serializeAws_json1_1DetachInstancesFromLoadBalancerRequest = ( input , context ) : any => { return { ... ( input . instanceNames !== undefined && input . instanceNames !== null && { instanceNames : serializeAws_json1_1ResourceNameList ( input . instanceNames , context ) , } ) , ... ( input . loadBalancerName !== undefined && input . loadBalancerName !== null && { loadBalancerName : input . loadBalancerName } ) , } ; } ; const serializeAws_json1_1DetachStaticIpRequest = ( input , context ) : any => { return { ... ( input . staticIpName !== undefined && input . staticIpName !== null && { staticIpName : input . staticIpName } ) , } ; } ; const serializeAws_json1_1DisableAddOnRequest = ( input , context ) : any => { return { ... ( input . addOnType !== undefined && input . addOnType !== null && { addOnType : input . addOnType } ) , ... ( input . resourceName !== undefined && input . resourceName !== null && { resourceName : input . resourceName } ) , } ; } ; const serializeAws_json1_1DiskMap = ( input , context ) : any => { return { ... ( input . newDiskName !== undefined && input . newDiskName !== null && { newDiskName : input . newDiskName } ) , ... ( input . originalDiskPath !== undefined && input . originalDiskPath !== null && { originalDiskPath : input . originalDiskPath } ) , } ; } ; const serializeAws_json1_1DiskMapList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1DiskMap ( entry , context ) ; } ) ; } ; const serializeAws_json1_1DomainEntry = ( input , context ) : any => { return { ... ( input . id !== undefined && input . id !== null && { id : input . id } ) , ... ( input . isAlias !== undefined && input . isAlias !== null && { isAlias : input . isAlias } ) , ... ( input . name !== undefined && input . name !== null && { name : input . name } ) , ... ( input . options !== undefined && input . options !== null && { options : serializeAws_json1_1DomainEntryOptions ( input . options , context ) } ) , ... ( input . target !== undefined && input . target !== null && { target : input . target } ) , ... ( input . type !== undefined && input . type !== null && { type : input . type } ) , } ; } ; const serializeAws_json1_1DomainEntryOptions = ( input , context ) : any => { return Object . entries ( input ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : value , } ; } , { } ) ; } ; const serializeAws_json1_1DomainNameList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1DownloadDefaultKeyPairRequest = ( input , context ) : any => { return { } ; } ; const serializeAws_json1_1EnableAddOnRequest = ( input , context ) : any => { return { ... ( input . addOnRequest !== undefined && input . addOnRequest !== null && { addOnRequest : serializeAws_json1_1AddOnRequest ( input . addOnRequest , context ) } ) , ... ( input . resourceName !== undefined && input . resourceName !== null && { resourceName : input . resourceName } ) , } ; } ; const serializeAws_json1_1EndpointRequest = ( input , context ) : any => { return { ... ( input . containerName !== undefined && input . containerName !== null && { containerName : input . containerName } ) , ... ( input . containerPort !== undefined && input . containerPort !== null && { containerPort : input . containerPort } ) , ... ( input . healthCheck !== undefined && input . healthCheck !== null && { healthCheck : serializeAws_json1_1ContainerServiceHealthCheckConfig ( input . healthCheck , context ) , } ) , } ; } ; const serializeAws_json1_1Environment = ( input , context ) : any => { return Object . entries ( input ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : value , } ; } , { } ) ; } ; const serializeAws_json1_1ExportSnapshotRequest = ( input , context ) : any => { return { ... ( input . sourceSnapshotName !== undefined && input . sourceSnapshotName !== null && { sourceSnapshotName : input . sourceSnapshotName } ) , } ; } ; const serializeAws_json1_1GetActiveNamesRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetAlarmsRequest = ( input , context ) : any => { return { ... ( input . alarmName !== undefined && input . alarmName !== null && { alarmName : input . alarmName } ) , ... ( input . monitoredResourceName !== undefined && input . monitoredResourceName !== null && { monitoredResourceName : input . monitoredResourceName } ) , ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetAutoSnapshotsRequest = ( input , context ) : any => { return { ... ( input . resourceName !== undefined && input . resourceName !== null && { resourceName : input . resourceName } ) , } ; } ; const serializeAws_json1_1GetBlueprintsRequest = ( input , context ) : any => { return { ... ( input . includeInactive !== undefined && input . includeInactive !== null && { includeInactive : input . includeInactive } ) , ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetBucketAccessKeysRequest = ( input , context ) : any => { return { ... ( input . bucketName !== undefined && input . bucketName !== null && { bucketName : input . bucketName } ) , } ; } ; const serializeAws_json1_1GetBucketBundlesRequest = ( input , context ) : any => { return { ... ( input . includeInactive !== undefined && input . includeInactive !== null && { includeInactive : input . includeInactive } ) , } ; } ; const serializeAws_json1_1GetBucketMetricDataRequest = ( input , context ) : any => { return { ... ( input . bucketName !== undefined && input . bucketName !== null && { bucketName : input . bucketName } ) , ... ( input . endTime !== undefined && input . endTime !== null && { endTime : Math . round ( input . endTime . getTime ( ) / 1000 ) } ) , ... ( input . metricName !== undefined && input . metricName !== null && { metricName : input . metricName } ) , ... ( input . period !== undefined && input . period !== null && { period : input . period } ) , ... ( input . startTime !== undefined && input . startTime !== null && { startTime : Math . round ( input . startTime . getTime ( ) / 1000 ) } ) , ... ( input . statistics !== undefined && input . statistics !== null && { statistics : serializeAws_json1_1MetricStatisticList ( input . statistics , context ) } ) , ... ( input . unit !== undefined && input . unit !== null && { unit : input . unit } ) , } ; } ; const serializeAws_json1_1GetBucketsRequest = ( input , context ) : any => { return { ... ( input . bucketName !== undefined && input . bucketName !== null && { bucketName : input . bucketName } ) , ... ( input . includeConnectedResources !== undefined && input . includeConnectedResources !== null && { includeConnectedResources : input . includeConnectedResources } ) , ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetBundlesRequest = ( input , context ) : any => { return { ... ( input . includeInactive !== undefined && input . includeInactive !== null && { includeInactive : input . includeInactive } ) , ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetCertificatesRequest = ( input , context ) : any => { return { ... ( input . certificateName !== undefined && input . certificateName !== null && { certificateName : input . certificateName } ) , ... ( input . certificateStatuses !== undefined && input . certificateStatuses !== null && { certificateStatuses : serializeAws_json1_1CertificateStatusList ( input . certificateStatuses , context ) , } ) , ... ( input . includeCertificateDetails !== undefined && input . includeCertificateDetails !== null && { includeCertificateDetails : input . includeCertificateDetails } ) , } ; } ; const serializeAws_json1_1GetCloudFormationStackRecordsRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetContactMethodsRequest = ( input , context ) : any => { return { ... ( input . protocols !== undefined && input . protocols !== null && { protocols : serializeAws_json1_1ContactProtocolsList ( input . protocols , context ) } ) , } ; } ; const serializeAws_json1_1GetContainerAPIMetadataRequest = ( input , context ) : any => { return { } ; } ; const serializeAws_json1_1GetContainerImagesRequest = ( input , context ) : any => { return { ... ( input . serviceName !== undefined && input . serviceName !== null && { serviceName : input . serviceName } ) , } ; } ; const serializeAws_json1_1GetContainerLogRequest = ( input , context ) : any => { return { ... ( input . containerName !== undefined && input . containerName !== null && { containerName : input . containerName } ) , ... ( input . endTime !== undefined && input . endTime !== null && { endTime : Math . round ( input . endTime . getTime ( ) / 1000 ) } ) , ... ( input . filterPattern !== undefined && input . filterPattern !== null && { filterPattern : input . filterPattern } ) , ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , ... ( input . serviceName !== undefined && input . serviceName !== null && { serviceName : input . serviceName } ) , ... ( input . startTime !== undefined && input . startTime !== null && { startTime : Math . round ( input . startTime . getTime ( ) / 1000 ) } ) , } ; } ; const serializeAws_json1_1GetContainerServiceDeploymentsRequest = ( input , context ) : any => { return { ... ( input . serviceName !== undefined && input . serviceName !== null && { serviceName : input . serviceName } ) , } ; } ; const serializeAws_json1_1GetContainerServiceMetricDataRequest = ( input , context ) : any => { return { ... ( input . endTime !== undefined && input . endTime !== null && { endTime : Math . round ( input . endTime . getTime ( ) / 1000 ) } ) , ... ( input . metricName !== undefined && input . metricName !== null && { metricName : input . metricName } ) , ... ( input . period !== undefined && input . period !== null && { period : input . period } ) , ... ( input . serviceName !== undefined && input . serviceName !== null && { serviceName : input . serviceName } ) , ... ( input . startTime !== undefined && input . startTime !== null && { startTime : Math . round ( input . startTime . getTime ( ) / 1000 ) } ) , ... ( input . statistics !== undefined && input . statistics !== null && { statistics : serializeAws_json1_1MetricStatisticList ( input . statistics , context ) } ) , } ; } ; const serializeAws_json1_1GetContainerServicePowersRequest = ( input , context ) : any => { return { } ; } ; const serializeAws_json1_1GetContainerServicesRequest = ( input , context ) : any => { return { ... ( input . serviceName !== undefined && input . serviceName !== null && { serviceName : input . serviceName } ) , } ; } ; const serializeAws_json1_1GetDiskRequest = ( input , context ) : any => { return { ... ( input . diskName !== undefined && input . diskName !== null && { diskName : input . diskName } ) , } ; } ; const serializeAws_json1_1GetDiskSnapshotRequest = ( input , context ) : any => { return { ... ( input . diskSnapshotName !== undefined && input . diskSnapshotName !== null && { diskSnapshotName : input . diskSnapshotName } ) , } ; } ; const serializeAws_json1_1GetDiskSnapshotsRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetDisksRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetDistributionBundlesRequest = ( input , context ) : any => { return { } ; } ; const serializeAws_json1_1GetDistributionLatestCacheResetRequest = ( input , context ) : any => { return { ... ( input . distributionName !== undefined && input . distributionName !== null && { distributionName : input . distributionName } ) , } ; } ; const serializeAws_json1_1GetDistributionMetricDataRequest = ( input , context ) : any => { return { ... ( input . distributionName !== undefined && input . distributionName !== null && { distributionName : input . distributionName } ) , ... ( input . endTime !== undefined && input . endTime !== null && { endTime : Math . round ( input . endTime . getTime ( ) / 1000 ) } ) , ... ( input . metricName !== undefined && input . metricName !== null && { metricName : input . metricName } ) , ... ( input . period !== undefined && input . period !== null && { period : input . period } ) , ... ( input . startTime !== undefined && input . startTime !== null && { startTime : Math . round ( input . startTime . getTime ( ) / 1000 ) } ) , ... ( input . statistics !== undefined && input . statistics !== null && { statistics : serializeAws_json1_1MetricStatisticList ( input . statistics , context ) } ) , ... ( input . unit !== undefined && input . unit !== null && { unit : input . unit } ) , } ; } ; const serializeAws_json1_1GetDistributionsRequest = ( input , context ) : any => { return { ... ( input . distributionName !== undefined && input . distributionName !== null && { distributionName : input . distributionName } ) , ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetDomainRequest = ( input , context ) : any => { return { ... ( input . domainName !== undefined && input . domainName !== null && { domainName : input . domainName } ) , } ; } ; const serializeAws_json1_1GetDomainsRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetExportSnapshotRecordsRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetInstanceAccessDetailsRequest = ( input , context ) : any => { return { ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , ... ( input . protocol !== undefined && input . protocol !== null && { protocol : input . protocol } ) , } ; } ; const serializeAws_json1_1GetInstanceMetricDataRequest = ( input , context ) : any => { return { ... ( input . endTime !== undefined && input . endTime !== null && { endTime : Math . round ( input . endTime . getTime ( ) / 1000 ) } ) , ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , ... ( input . metricName !== undefined && input . metricName !== null && { metricName : input . metricName } ) , ... ( input . period !== undefined && input . period !== null && { period : input . period } ) , ... ( input . startTime !== undefined && input . startTime !== null && { startTime : Math . round ( input . startTime . getTime ( ) / 1000 ) } ) , ... ( input . statistics !== undefined && input . statistics !== null && { statistics : serializeAws_json1_1MetricStatisticList ( input . statistics , context ) } ) , ... ( input . unit !== undefined && input . unit !== null && { unit : input . unit } ) , } ; } ; const serializeAws_json1_1GetInstancePortStatesRequest = ( input , context ) : any => { return { ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , } ; } ; const serializeAws_json1_1GetInstanceRequest = ( input , context ) : any => { return { ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , } ; } ; const serializeAws_json1_1GetInstanceSnapshotRequest = ( input , context ) : any => { return { ... ( input . instanceSnapshotName !== undefined && input . instanceSnapshotName !== null && { instanceSnapshotName : input . instanceSnapshotName } ) , } ; } ; const serializeAws_json1_1GetInstanceSnapshotsRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetInstancesRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetInstanceStateRequest = ( input , context ) : any => { return { ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , } ; } ; const serializeAws_json1_1GetKeyPairRequest = ( input , context ) : any => { return { ... ( input . keyPairName !== undefined && input . keyPairName !== null && { keyPairName : input . keyPairName } ) , } ; } ; const serializeAws_json1_1GetKeyPairsRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetLoadBalancerMetricDataRequest = ( input , context ) : any => { return { ... ( input . endTime !== undefined && input . endTime !== null && { endTime : Math . round ( input . endTime . getTime ( ) / 1000 ) } ) , ... ( input . loadBalancerName !== undefined && input . loadBalancerName !== null && { loadBalancerName : input . loadBalancerName } ) , ... ( input . metricName !== undefined && input . metricName !== null && { metricName : input . metricName } ) , ... ( input . period !== undefined && input . period !== null && { period : input . period } ) , ... ( input . startTime !== undefined && input . startTime !== null && { startTime : Math . round ( input . startTime . getTime ( ) / 1000 ) } ) , ... ( input . statistics !== undefined && input . statistics !== null && { statistics : serializeAws_json1_1MetricStatisticList ( input . statistics , context ) } ) , ... ( input . unit !== undefined && input . unit !== null && { unit : input . unit } ) , } ; } ; const serializeAws_json1_1GetLoadBalancerRequest = ( input , context ) : any => { return { ... ( input . loadBalancerName !== undefined && input . loadBalancerName !== null && { loadBalancerName : input . loadBalancerName } ) , } ; } ; const serializeAws_json1_1GetLoadBalancersRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetLoadBalancerTlsCertificatesRequest = ( input , context ) : any => { return { ... ( input . loadBalancerName !== undefined && input . loadBalancerName !== null && { loadBalancerName : input . loadBalancerName } ) , } ; } ; const serializeAws_json1_1GetOperationRequest = ( input , context ) : any => { return { ... ( input . operationId !== undefined && input . operationId !== null && { operationId : input . operationId } ) , } ; } ; const serializeAws_json1_1GetOperationsForResourceRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , ... ( input . resourceName !== undefined && input . resourceName !== null && { resourceName : input . resourceName } ) , } ; } ; const serializeAws_json1_1GetOperationsRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetRegionsRequest = ( input , context ) : any => { return { ... ( input . includeAvailabilityZones !== undefined && input . includeAvailabilityZones !== null && { includeAvailabilityZones : input . includeAvailabilityZones } ) , ... ( input . includeRelationalDatabaseAvailabilityZones !== undefined && input . includeRelationalDatabaseAvailabilityZones !== null && { includeRelationalDatabaseAvailabilityZones : input . includeRelationalDatabaseAvailabilityZones , } ) , } ; } ; const serializeAws_json1_1GetRelationalDatabaseBlueprintsRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetRelationalDatabaseBundlesRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetRelationalDatabaseEventsRequest = ( input , context ) : any => { return { ... ( input . durationInMinutes !== undefined && input . durationInMinutes !== null && { durationInMinutes : input . durationInMinutes } ) , ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , ... ( input . relationalDatabaseName !== undefined && input . relationalDatabaseName !== null && { relationalDatabaseName : input . relationalDatabaseName } ) , } ; } ; const serializeAws_json1_1GetRelationalDatabaseLogEventsRequest = ( input , context ) : any => { return { ... ( input . endTime !== undefined && input . endTime !== null && { endTime : Math . round ( input . endTime . getTime ( ) / 1000 ) } ) , ... ( input . logStreamName !== undefined && input . logStreamName !== null && { logStreamName : input . logStreamName } ) , ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , ... ( input . relationalDatabaseName !== undefined && input . relationalDatabaseName !== null && { relationalDatabaseName : input . relationalDatabaseName } ) , ... ( input . startFromHead !== undefined && input . startFromHead !== null && { startFromHead : input . startFromHead } ) , ... ( input . startTime !== undefined && input . startTime !== null && { startTime : Math . round ( input . startTime . getTime ( ) / 1000 ) } ) , } ; } ; const serializeAws_json1_1GetRelationalDatabaseLogStreamsRequest = ( input , context ) : any => { return { ... ( input . relationalDatabaseName !== undefined && input . relationalDatabaseName !== null && { relationalDatabaseName : input . relationalDatabaseName } ) , } ; } ; const serializeAws_json1_1GetRelationalDatabaseMasterUserPasswordRequest = ( input , context ) : any => { return { ... ( input . passwordVersion !== undefined && input . passwordVersion !== null && { passwordVersion : input . passwordVersion } ) , ... ( input . relationalDatabaseName !== undefined && input . relationalDatabaseName !== null && { relationalDatabaseName : input . relationalDatabaseName } ) , } ; } ; const serializeAws_json1_1GetRelationalDatabaseMetricDataRequest = ( input , context ) : any => { return { ... ( input . endTime !== undefined && input . endTime !== null && { endTime : Math . round ( input . endTime . getTime ( ) / 1000 ) } ) , ... ( input . metricName !== undefined && input . metricName !== null && { metricName : input . metricName } ) , ... ( input . period !== undefined && input . period !== null && { period : input . period } ) , ... ( input . relationalDatabaseName !== undefined && input . relationalDatabaseName !== null && { relationalDatabaseName : input . relationalDatabaseName } ) , ... ( input . startTime !== undefined && input . startTime !== null && { startTime : Math . round ( input . startTime . getTime ( ) / 1000 ) } ) , ... ( input . statistics !== undefined && input . statistics !== null && { statistics : serializeAws_json1_1MetricStatisticList ( input . statistics , context ) } ) , ... ( input . unit !== undefined && input . unit !== null && { unit : input . unit } ) , } ; } ; const serializeAws_json1_1GetRelationalDatabaseParametersRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , ... ( input . relationalDatabaseName !== undefined && input . relationalDatabaseName !== null && { relationalDatabaseName : input . relationalDatabaseName } ) , } ; } ; const serializeAws_json1_1GetRelationalDatabaseRequest = ( input , context ) : any => { return { ... ( input . relationalDatabaseName !== undefined && input . relationalDatabaseName !== null && { relationalDatabaseName : input . relationalDatabaseName } ) , } ; } ; const serializeAws_json1_1GetRelationalDatabaseSnapshotRequest = ( input , context ) : any => { return { ... ( input . relationalDatabaseSnapshotName !== undefined && input . relationalDatabaseSnapshotName !== null && { relationalDatabaseSnapshotName : input . relationalDatabaseSnapshotName , } ) , } ; } ; const serializeAws_json1_1GetRelationalDatabaseSnapshotsRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetRelationalDatabasesRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1GetStaticIpRequest = ( input , context ) : any => { return { ... ( input . staticIpName !== undefined && input . staticIpName !== null && { staticIpName : input . staticIpName } ) , } ; } ; const serializeAws_json1_1GetStaticIpsRequest = ( input , context ) : any => { return { ... ( input . pageToken !== undefined && input . pageToken !== null && { pageToken : input . pageToken } ) , } ; } ; const serializeAws_json1_1HeaderForwardList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1HeaderObject = ( input , context ) : any => { return { ... ( input . headersAllowList !== undefined && input . headersAllowList !== null && { headersAllowList : serializeAws_json1_1HeaderForwardList ( input . headersAllowList , context ) , } ) , ... ( input . option !== undefined && input . option !== null && { option : input . option } ) , } ; } ; const serializeAws_json1_1ImportKeyPairRequest = ( input , context ) : any => { return { ... ( input . keyPairName !== undefined && input . keyPairName !== null && { keyPairName : input . keyPairName } ) , ... ( input . publicKeyBase64 !== undefined && input . publicKeyBase64 !== null && { publicKeyBase64 : input . publicKeyBase64 } ) , } ; } ; const serializeAws_json1_1InputOrigin = ( input , context ) : any => { return { ... ( input . name !== undefined && input . name !== null && { name : input . name } ) , ... ( input . protocolPolicy !== undefined && input . protocolPolicy !== null && { protocolPolicy : input . protocolPolicy } ) , ... ( input . regionName !== undefined && input . regionName !== null && { regionName : input . regionName } ) , } ; } ; const serializeAws_json1_1InstanceEntry = ( input , context ) : any => { return { ... ( input . availabilityZone !== undefined && input . availabilityZone !== null && { availabilityZone : input . availabilityZone } ) , ... ( input . instanceType !== undefined && input . instanceType !== null && { instanceType : input . instanceType } ) , ... ( input . portInfoSource !== undefined && input . portInfoSource !== null && { portInfoSource : input . portInfoSource } ) , ... ( input . sourceName !== undefined && input . sourceName !== null && { sourceName : input . sourceName } ) , ... ( input . userData !== undefined && input . userData !== null && { userData : input . userData } ) , } ; } ; const serializeAws_json1_1InstanceEntryList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1InstanceEntry ( entry , context ) ; } ) ; } ; const serializeAws_json1_1IsVpcPeeredRequest = ( input , context ) : any => { return { } ; } ; const serializeAws_json1_1MetricStatisticList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1NotificationTriggerList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1OpenInstancePublicPortsRequest = ( input , context ) : any => { return { ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , ... ( input . portInfo !== undefined && input . portInfo !== null && { portInfo : serializeAws_json1_1PortInfo ( input . portInfo , context ) } ) , } ; } ; const serializeAws_json1_1PartnerIdList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1PeerVpcRequest = ( input , context ) : any => { return { } ; } ; const serializeAws_json1_1PortInfo = ( input , context ) : any => { return { ... ( input . cidrListAliases !== undefined && input . cidrListAliases !== null && { cidrListAliases : serializeAws_json1_1StringList ( input . cidrListAliases , context ) , } ) , ... ( input . cidrs !== undefined && input . cidrs !== null && { cidrs : serializeAws_json1_1StringList ( input . cidrs , context ) } ) , ... ( input . fromPort !== undefined && input . fromPort !== null && { fromPort : input . fromPort } ) , ... ( input . ipv6Cidrs !== undefined && input . ipv6Cidrs !== null && { ipv6Cidrs : serializeAws_json1_1StringList ( input . ipv6Cidrs , context ) } ) , ... ( input . protocol !== undefined && input . protocol !== null && { protocol : input . protocol } ) , ... ( input . toPort !== undefined && input . toPort !== null && { toPort : input . toPort } ) , } ; } ; const serializeAws_json1_1PortInfoList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1PortInfo ( entry , context ) ; } ) ; } ; const serializeAws_json1_1PortMap = ( input , context ) : any => { return Object . entries ( input ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : value , } ; } , { } ) ; } ; const serializeAws_json1_1PutAlarmRequest = ( input , context ) : any => { return { ... ( input . alarmName !== undefined && input . alarmName !== null && { alarmName : input . alarmName } ) , ... ( input . comparisonOperator !== undefined && input . comparisonOperator !== null && { comparisonOperator : input . comparisonOperator } ) , ... ( input . contactProtocols !== undefined && input . contactProtocols !== null && { contactProtocols : serializeAws_json1_1ContactProtocolsList ( input . contactProtocols , context ) , } ) , ... ( input . datapointsToAlarm !== undefined && input . datapointsToAlarm !== null && { datapointsToAlarm : input . datapointsToAlarm } ) , ... ( input . evaluationPeriods !== undefined && input . evaluationPeriods !== null && { evaluationPeriods : input . evaluationPeriods } ) , ... ( input . metricName !== undefined && input . metricName !== null && { metricName : input . metricName } ) , ... ( input . monitoredResourceName !== undefined && input . monitoredResourceName !== null && { monitoredResourceName : input . monitoredResourceName } ) , ... ( input . notificationEnabled !== undefined && input . notificationEnabled !== null && { notificationEnabled : input . notificationEnabled } ) , ... ( input . notificationTriggers !== undefined && input . notificationTriggers !== null && { notificationTriggers : serializeAws_json1_1NotificationTriggerList ( input . notificationTriggers , context ) , } ) , ... ( input . threshold !== undefined && input . threshold !== null && { threshold : __serializeFloat ( input . threshold ) } ) , ... ( input . treatMissingData !== undefined && input . treatMissingData !== null && { treatMissingData : input . treatMissingData } ) , } ; } ; const serializeAws_json1_1PutInstancePublicPortsRequest = ( input , context ) : any => { return { ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , ... ( input . portInfos !== undefined && input . portInfos !== null && { portInfos : serializeAws_json1_1PortInfoList ( input . portInfos , context ) } ) , } ; } ; const serializeAws_json1_1QueryStringObject = ( input , context ) : any => { return { ... ( input . option !== undefined && input . option !== null && { option : input . option } ) , ... ( input . queryStringsAllowList !== undefined && input . queryStringsAllowList !== null && { queryStringsAllowList : serializeAws_json1_1StringList ( input . queryStringsAllowList , context ) , } ) , } ; } ; const serializeAws_json1_1RebootInstanceRequest = ( input , context ) : any => { return { ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , } ; } ; const serializeAws_json1_1RebootRelationalDatabaseRequest = ( input , context ) : any => { return { ... ( input . relationalDatabaseName !== undefined && input . relationalDatabaseName !== null && { relationalDatabaseName : input . relationalDatabaseName } ) , } ; } ; const serializeAws_json1_1RegisterContainerImageRequest = ( input , context ) : any => { return { ... ( input . digest !== undefined && input . digest !== null && { digest : input . digest } ) , ... ( input . label !== undefined && input . label !== null && { label : input . label } ) , ... ( input . serviceName !== undefined && input . serviceName !== null && { serviceName : input . serviceName } ) , } ; } ; const serializeAws_json1_1RelationalDatabaseParameter = ( input , context ) : any => { return { ... ( input . allowedValues !== undefined && input . allowedValues !== null && { allowedValues : input . allowedValues } ) , ... ( input . applyMethod !== undefined && input . applyMethod !== null && { applyMethod : input . applyMethod } ) , ... ( input . applyType !== undefined && input . applyType !== null && { applyType : input . applyType } ) , ... ( input . dataType !== undefined && input . dataType !== null && { dataType : input . dataType } ) , ... ( input . description !== undefined && input . description !== null && { description : input . description } ) , ... ( input . isModifiable !== undefined && input . isModifiable !== null && { isModifiable : input . isModifiable } ) , ... ( input . parameterName !== undefined && input . parameterName !== null && { parameterName : input . parameterName } ) , ... ( input . parameterValue !== undefined && input . parameterValue !== null && { parameterValue : input . parameterValue } ) , } ; } ; const serializeAws_json1_1RelationalDatabaseParameterList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1RelationalDatabaseParameter ( entry , context ) ; } ) ; } ; const serializeAws_json1_1ReleaseStaticIpRequest = ( input , context ) : any => { return { ... ( input . staticIpName !== undefined && input . staticIpName !== null && { staticIpName : input . staticIpName } ) , } ; } ; const serializeAws_json1_1ResetDistributionCacheRequest = ( input , context ) : any => { return { ... ( input . distributionName !== undefined && input . distributionName !== null && { distributionName : input . distributionName } ) , } ; } ; const serializeAws_json1_1ResourceNameList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1SendContactMethodVerificationRequest = ( input , context ) : any => { return { ... ( input . protocol !== undefined && input . protocol !== null && { protocol : input . protocol } ) , } ; } ; const serializeAws_json1_1SetIpAddressTypeRequest = ( input , context ) : any => { return { ... ( input . ipAddressType !== undefined && input . ipAddressType !== null && { ipAddressType : input . ipAddressType } ) , ... ( input . resourceName !== undefined && input . resourceName !== null && { resourceName : input . resourceName } ) , ... ( input . resourceType !== undefined && input . resourceType !== null && { resourceType : input . resourceType } ) , } ; } ; const serializeAws_json1_1SetResourceAccessForBucketRequest = ( input , context ) : any => { return { ... ( input . access !== undefined && input . access !== null && { access : input . access } ) , ... ( input . bucketName !== undefined && input . bucketName !== null && { bucketName : input . bucketName } ) , ... ( input . resourceName !== undefined && input . resourceName !== null && { resourceName : input . resourceName } ) , } ; } ; const serializeAws_json1_1StartInstanceRequest = ( input , context ) : any => { return { ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , } ; } ; const serializeAws_json1_1StartRelationalDatabaseRequest = ( input , context ) : any => { return { ... ( input . relationalDatabaseName !== undefined && input . relationalDatabaseName !== null && { relationalDatabaseName : input . relationalDatabaseName } ) , } ; } ; const serializeAws_json1_1StopInstanceRequest = ( input , context ) : any => { return { ... ( input . force !== undefined && input . force !== null && { force : input . force } ) , ... ( input . instanceName !== undefined && input . instanceName !== null && { instanceName : input . instanceName } ) , } ; } ; const serializeAws_json1_1StopRelationalDatabaseRequest = ( input , context ) : any => { return { ... ( input . relationalDatabaseName !== undefined && input . relationalDatabaseName !== null && { relationalDatabaseName : input . relationalDatabaseName } ) , ... ( input . relationalDatabaseSnapshotName !== undefined && input . relationalDatabaseSnapshotName !== null && { relationalDatabaseSnapshotName : input . relationalDatabaseSnapshotName , } ) , } ; } ; const serializeAws_json1_1StringList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1SubjectAlternativeNameList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; 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 . resourceName !== undefined && input . resourceName !== null && { resourceName : input . resourceName } ) , ... ( input . tags !== undefined && input . tags !== null && { tags : serializeAws_json1_1TagList ( input . tags , context ) } ) , } ; } ; const serializeAws_json1_1TestAlarmRequest = ( input , context ) : any => { return { ... ( input . alarmName !== undefined && input . alarmName !== null && { alarmName : input . alarmName } ) , ... ( input . state !== undefined && input . state !== null && { state : input . state } ) , } ; } ; const serializeAws_json1_1UnpeerVpcRequest = ( input , context ) : any => { return { } ; } ; const serializeAws_json1_1UntagResourceRequest = ( input , context ) : any => { return { ... ( input . resourceArn !== undefined && input . resourceArn !== null && { resourceArn : input . resourceArn } ) , ... ( input . resourceName !== undefined && input . resourceName !== null && { resourceName : input . resourceName } ) , ... ( input . tagKeys !== undefined && input . tagKeys !== null && { tagKeys : serializeAws_json1_1TagKeyList ( input . tagKeys , context ) } ) , } ; } ; const serializeAws_json1_1UpdateBucketBundleRequest = ( input , context ) : any => { return { ... ( input . bucketName !== undefined && input . bucketName !== null && { bucketName : input . bucketName } ) , ... ( input . bundleId !== undefined && input . bundleId !== null && { bundleId : input . bundleId } ) , } ; } ; const serializeAws_json1_1UpdateBucketRequest = ( input , context ) : any => { return { ... ( input . accessLogConfig !== undefined && input . accessLogConfig !== null && { accessLogConfig : serializeAws_json1_1BucketAccessLogConfig ( input . accessLogConfig , context ) , } ) , ... ( input . accessRules !== undefined && input . accessRules !== null && { accessRules : serializeAws_json1_1AccessRules ( input . accessRules , context ) } ) , ... ( input . bucketName !== undefined && input . bucketName !== null && { bucketName : input . bucketName } ) , ... ( input . readonlyAccessAccounts !== undefined && input . readonlyAccessAccounts !== null && { readonlyAccessAccounts : serializeAws_json1_1PartnerIdList ( input . readonlyAccessAccounts , context ) , } ) , ... ( input . versioning !== undefined && input . versioning !== null && { versioning : input . versioning } ) , } ; } ; const serializeAws_json1_1UpdateContainerServiceRequest = ( input , context ) : any => { return { ... ( input . isDisabled !== undefined && input . isDisabled !== null && { isDisabled : input . isDisabled } ) , ... ( input . power !== undefined && input . power !== null && { power : input . power } ) , ... ( input . publicDomainNames !== undefined && input . publicDomainNames !== null && { publicDomainNames : serializeAws_json1_1ContainerServicePublicDomains ( input . publicDomainNames , context ) , } ) , ... ( input . scale !== undefined && input . scale !== null && { scale : input . scale } ) , ... ( input . serviceName !== undefined && input . serviceName !== null && { serviceName : input . serviceName } ) , } ; } ; const serializeAws_json1_1UpdateDistributionBundleRequest = ( input , context ) : any => { return { ... ( input . bundleId !== undefined && input . bundleId !== null && { bundleId : input . bundleId } ) , ... ( input . distributionName !== undefined && input . distributionName !== null && { distributionName : input . distributionName } ) , } ; } ; const serializeAws_json1_1UpdateDistributionRequest = ( input , context ) : any => { return { ... ( input . cacheBehaviorSettings !== undefined && input . cacheBehaviorSettings !== null && { cacheBehaviorSettings : serializeAws_json1_1CacheSettings ( input . cacheBehaviorSettings , context ) , } ) , ... ( input . cacheBehaviors !== undefined && input . cacheBehaviors !== null && { cacheBehaviors : serializeAws_json1_1CacheBehaviorList ( input . cacheBehaviors , context ) , } ) , ... ( input . defaultCacheBehavior !== undefined && input . defaultCacheBehavior !== null && { defaultCacheBehavior : serializeAws_json1_1CacheBehavior ( input . defaultCacheBehavior , context ) , } ) , ... ( input . distributionName !== undefined && input . distributionName !== null && { distributionName : input . distributionName } ) , ... ( input . isEnabled !== undefined && input . isEnabled !== null && { isEnabled : input . isEnabled } ) , ... ( input . origin !== undefined && input . origin !== null && { origin : serializeAws_json1_1InputOrigin ( input . origin , context ) } ) , } ; } ; const serializeAws_json1_1UpdateDomainEntryRequest = ( input , context ) : any => { return { ... ( input . domainEntry !== undefined && input . domainEntry !== null && { domainEntry : serializeAws_json1_1DomainEntry ( input . domainEntry , context ) } ) , ... ( input . domainName !== undefined && input . domainName !== null && { domainName : input . domainName } ) , } ; } ; const serializeAws_json1_1UpdateLoadBalancerAttributeRequest = ( input , context ) : any => { return { ... ( input . attributeName !== undefined && input . attributeName !== null && { attributeName : input . attributeName } ) , ... ( input . attributeValue !== undefined && input . attributeValue !== null && { attributeValue : input . attributeValue } ) , ... ( input . loadBalancerName !== undefined && input . loadBalancerName !== null && { loadBalancerName : input . loadBalancerName } ) , } ; } ; const serializeAws_json1_1UpdateRelationalDatabaseParametersRequest = ( input , context ) : any => { return { ... ( input . parameters !== undefined && input . parameters !== null && { parameters : serializeAws_json1_1RelationalDatabaseParameterList ( input . parameters , context ) , } ) , ... ( input . relationalDatabaseName !== undefined && input . relationalDatabaseName !== null && { relationalDatabaseName : input . relationalDatabaseName } ) , } ; } ; const serializeAws_json1_1UpdateRelationalDatabaseRequest = ( input , context ) : any => { return { ... ( input . applyImmediately !== undefined && input . applyImmediately !== null && { applyImmediately : input . applyImmediately } ) , ... ( input . caCertificateIdentifier !== undefined && input . caCertificateIdentifier !== null && { caCertificateIdentifier : input . caCertificateIdentifier } ) , ... ( input . disableBackupRetention !== undefined && input . disableBackupRetention !== null && { disableBackupRetention : input . disableBackupRetention } ) , ... ( input . enableBackupRetention !== undefined && input . enableBackupRetention !== null && { enableBackupRetention : input . enableBackupRetention } ) , ... ( input . masterUserPassword !== undefined && input . masterUserPassword !== null && { masterUserPassword : input . masterUserPassword } ) , ... ( input . preferredBackupWindow !== undefined && input . preferredBackupWindow !== null && { preferredBackupWindow : input . preferredBackupWindow } ) , ... ( input . preferredMaintenanceWindow !== undefined && input . preferredMaintenanceWindow !== null && { preferredMaintenanceWindow : input . preferredMaintenanceWindow } ) , ... ( input . publiclyAccessible !== undefined && input . publiclyAccessible !== null && { publiclyAccessible : input . publiclyAccessible } ) , ... ( input . relationalDatabaseName !== undefined && input . relationalDatabaseName !== null && { relationalDatabaseName : input . relationalDatabaseName } ) , ... ( input . rotateMasterUserPassword !== undefined && input . rotateMasterUserPassword !== null && { rotateMasterUserPassword : input . rotateMasterUserPassword } ) , } ; } ; const deserializeAws_json1_1AccessDeniedException = ( output , context ) : AccessDeniedException => { return { code : __expectString ( output . code ) , docs : __expectString ( output . docs ) , message : __expectString ( output . message ) , tip : __expectString ( output . tip ) , } as any ; } ; const deserializeAws_json1_1AccessKey = ( output , context ) : AccessKey => { return { accessKeyId : __expectString ( output . accessKeyId ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , lastUsed : output . lastUsed !== undefined && output . lastUsed !== null ? deserializeAws_json1_1AccessKeyLastUsed ( output . lastUsed , context ) : undefined , secretAccessKey : __expectString ( output . secretAccessKey ) , status : __expectString ( output . status ) , } as any ; } ; const deserializeAws_json1_1AccessKeyLastUsed = ( output , context ) : AccessKeyLastUsed => { return { lastUsedDate : output . lastUsedDate !== undefined && output . lastUsedDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . lastUsedDate ) ) ) : undefined , region : __expectString ( output . region ) , serviceName : __expectString ( output . serviceName ) , } as any ; } ; const deserializeAws_json1_1AccessKeyList = ( output , context ) : AccessKey [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1AccessKey ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1AccessReceiverList = ( output , context ) : ResourceReceivingAccess [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ResourceReceivingAccess ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1AccessRules = ( output , context ) : AccessRules => { return { allowPublicOverrides : __expectBoolean ( output . allowPublicOverrides ) , getObject : __expectString ( output . getObject ) , } as any ; } ; const deserializeAws_json1_1AccountSetupInProgressException = ( output , context ) : AccountSetupInProgressException => { return { code : __expectString ( output . code ) , docs : __expectString ( output . docs ) , message : __expectString ( output . message ) , tip : __expectString ( output . tip ) , } as any ; } ; const deserializeAws_json1_1AddOn = ( output , context ) : AddOn => { return { name : __expectString ( output . name ) , nextSnapshotTimeOfDay : __expectString ( output . nextSnapshotTimeOfDay ) , snapshotTimeOfDay : __expectString ( output . snapshotTimeOfDay ) , status : __expectString ( output . status ) , } as any ; } ; const deserializeAws_json1_1AddOnList = ( output , context ) : AddOn [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1AddOn ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1Alarm = ( output , context ) : Alarm => { return { arn : __expectString ( output . arn ) , comparisonOperator : __expectString ( output . comparisonOperator ) , contactProtocols : output . contactProtocols !== undefined && output . contactProtocols !== null ? deserializeAws_json1_1ContactProtocolsList ( output . contactProtocols , context ) : undefined , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , datapointsToAlarm : __expectInt32 ( output . datapointsToAlarm ) , evaluationPeriods : __expectInt32 ( output . evaluationPeriods ) , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , metricName : __expectString ( output . metricName ) , monitoredResourceInfo : output . monitoredResourceInfo !== undefined && output . monitoredResourceInfo !== null ? deserializeAws_json1_1MonitoredResourceInfo ( output . monitoredResourceInfo , context ) : undefined , name : __expectString ( output . name ) , notificationEnabled : __expectBoolean ( output . notificationEnabled ) , notificationTriggers : output . notificationTriggers !== undefined && output . notificationTriggers !== null ? deserializeAws_json1_1NotificationTriggerList ( output . notificationTriggers , context ) : undefined , period : __expectInt32 ( output . period ) , resourceType : __expectString ( output . resourceType ) , state : __expectString ( output . state ) , statistic : __expectString ( output . statistic ) , supportCode : __expectString ( output . supportCode ) , threshold : __limitedParseDouble ( output . threshold ) , treatMissingData : __expectString ( output . treatMissingData ) , unit : __expectString ( output . unit ) , } as any ; } ; const deserializeAws_json1_1AlarmsList = ( output , context ) : Alarm [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Alarm ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1AllocateStaticIpResult = ( output , context ) : AllocateStaticIpResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1AttachCertificateToDistributionResult = ( output , context ) : AttachCertificateToDistributionResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1AttachDiskResult = ( output , context ) : AttachDiskResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1AttachedDisk = ( output , context ) : AttachedDisk => { return { path : __expectString ( output . path ) , sizeInGb : __expectInt32 ( output . sizeInGb ) , } as any ; } ; const deserializeAws_json1_1AttachedDiskList = ( output , context ) : AttachedDisk [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1AttachedDisk ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1AttachInstancesToLoadBalancerResult = ( output , context ) : AttachInstancesToLoadBalancerResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1AttachLoadBalancerTlsCertificateResult = ( output , context ) : AttachLoadBalancerTlsCertificateResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1AttachStaticIpResult = ( output , context ) : AttachStaticIpResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1AutoSnapshotDetails = ( output , context ) : AutoSnapshotDetails => { return { createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , date : __expectString ( output . date ) , fromAttachedDisks : output . fromAttachedDisks !== undefined && output . fromAttachedDisks !== null ? deserializeAws_json1_1AttachedDiskList ( output . fromAttachedDisks , context ) : undefined , status : __expectString ( output . status ) , } as any ; } ; const deserializeAws_json1_1AutoSnapshotDetailsList = ( output , context ) : AutoSnapshotDetails [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1AutoSnapshotDetails ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1AvailabilityZone = ( output , context ) : AvailabilityZone => { return { state : __expectString ( output . state ) , zoneName : __expectString ( output . zoneName ) , } as any ; } ; const deserializeAws_json1_1AvailabilityZoneList = ( output , context ) : AvailabilityZone [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1AvailabilityZone ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1Blueprint = ( output , context ) : Blueprint => { return { blueprintId : __expectString ( output . blueprintId ) , description : __expectString ( output . description ) , group : __expectString ( output . group ) , isActive : __expectBoolean ( output . isActive ) , licenseUrl : __expectString ( output . licenseUrl ) , minPower : __expectInt32 ( output . minPower ) , name : __expectString ( output . name ) , platform : __expectString ( output . platform ) , productUrl : __expectString ( output . productUrl ) , type : __expectString ( output . type ) , version : __expectString ( output . version ) , versionCode : __expectString ( output . versionCode ) , } as any ; } ; const deserializeAws_json1_1BlueprintList = ( output , context ) : Blueprint [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Blueprint ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1Bucket = ( output , context ) : Bucket => { return { ableToUpdateBundle : __expectBoolean ( output . ableToUpdateBundle ) , accessLogConfig : output . accessLogConfig !== undefined && output . accessLogConfig !== null ? deserializeAws_json1_1BucketAccessLogConfig ( output . accessLogConfig , context ) : undefined , accessRules : output . accessRules !== undefined && output . accessRules !== null ? deserializeAws_json1_1AccessRules ( output . accessRules , context ) : undefined , arn : __expectString ( output . arn ) , bundleId : __expectString ( output . bundleId ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , name : __expectString ( output . name ) , objectVersioning : __expectString ( output . objectVersioning ) , readonlyAccessAccounts : output . readonlyAccessAccounts !== undefined && output . readonlyAccessAccounts !== null ? deserializeAws_json1_1PartnerIdList ( output . readonlyAccessAccounts , context ) : undefined , resourceType : __expectString ( output . resourceType ) , resourcesReceivingAccess : output . resourcesReceivingAccess !== undefined && output . resourcesReceivingAccess !== null ? deserializeAws_json1_1AccessReceiverList ( output . resourcesReceivingAccess , context ) : undefined , state : output . state !== undefined && output . state !== null ? deserializeAws_json1_1BucketState ( output . state , context ) : undefined , supportCode : __expectString ( output . supportCode ) , tags : output . tags !== undefined && output . tags !== null ? deserializeAws_json1_1TagList ( output . tags , context ) : undefined , url : __expectString ( output . url ) , } as any ; } ; const deserializeAws_json1_1BucketAccessLogConfig = ( output , context ) : BucketAccessLogConfig => { return { destination : __expectString ( output . destination ) , enabled : __expectBoolean ( output . enabled ) , prefix : __expectString ( output . prefix ) , } as any ; } ; const deserializeAws_json1_1BucketBundle = ( output , context ) : BucketBundle => { return { bundleId : __expectString ( output . bundleId ) , isActive : __expectBoolean ( output . isActive ) , name : __expectString ( output . name ) , price : __limitedParseFloat32 ( output . price ) , storagePerMonthInGb : __expectInt32 ( output . storagePerMonthInGb ) , transferPerMonthInGb : __expectInt32 ( output . transferPerMonthInGb ) , } as any ; } ; const deserializeAws_json1_1BucketBundleList = ( output , context ) : BucketBundle [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1BucketBundle ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1BucketList = ( output , context ) : Bucket [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Bucket ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1BucketState = ( output , context ) : BucketState => { return { code : __expectString ( output . code ) , message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1Bundle = ( output , context ) : Bundle => { return { bundleId : __expectString ( output . bundleId ) , cpuCount : __expectInt32 ( output . cpuCount ) , diskSizeInGb : __expectInt32 ( output . diskSizeInGb ) , instanceType : __expectString ( output . instanceType ) , isActive : __expectBoolean ( output . isActive ) , name : __expectString ( output . name ) , power : __expectInt32 ( output . power ) , price : __limitedParseFloat32 ( output . price ) , ramSizeInGb : __limitedParseFloat32 ( output . ramSizeInGb ) , supportedPlatforms : output . supportedPlatforms !== undefined && output . supportedPlatforms !== null ? deserializeAws_json1_1InstancePlatformList ( output . supportedPlatforms , context ) : undefined , transferPerMonthInGb : __expectInt32 ( output . transferPerMonthInGb ) , } as any ; } ; const deserializeAws_json1_1BundleList = ( output , context ) : Bundle [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Bundle ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1CacheBehavior = ( output , context ) : CacheBehavior => { return { behavior : __expectString ( output . behavior ) , } as any ; } ; const deserializeAws_json1_1CacheBehaviorList = ( output , context ) : CacheBehaviorPerPath [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1CacheBehaviorPerPath ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1CacheBehaviorPerPath = ( output , context ) : CacheBehaviorPerPath => { return { behavior : __expectString ( output . behavior ) , path : __expectString ( output . path ) , } as any ; } ; const deserializeAws_json1_1CacheSettings = ( output , context ) : CacheSettings => { return { allowedHTTPMethods : __expectString ( output . allowedHTTPMethods ) , cachedHTTPMethods : __expectString ( output . cachedHTTPMethods ) , defaultTTL : __expectLong ( output . defaultTTL ) , forwardedCookies : output . forwardedCookies !== undefined && output . forwardedCookies !== null ? deserializeAws_json1_1CookieObject ( output . forwardedCookies , context ) : undefined , forwardedHeaders : output . forwardedHeaders !== undefined && output . forwardedHeaders !== null ? deserializeAws_json1_1HeaderObject ( output . forwardedHeaders , context ) : undefined , forwardedQueryStrings : output . forwardedQueryStrings !== undefined && output . forwardedQueryStrings !== null ? deserializeAws_json1_1QueryStringObject ( output . forwardedQueryStrings , context ) : undefined , maximumTTL : __expectLong ( output . maximumTTL ) , minimumTTL : __expectLong ( output . minimumTTL ) , } as any ; } ; const deserializeAws_json1_1Certificate = ( output , context ) : Certificate => { return { arn : __expectString ( output . arn ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , domainName : __expectString ( output . domainName ) , domainValidationRecords : output . domainValidationRecords !== undefined && output . domainValidationRecords !== null ? deserializeAws_json1_1DomainValidationRecordList ( output . domainValidationRecords , context ) : undefined , eligibleToRenew : __expectString ( output . eligibleToRenew ) , inUseResourceCount : __expectInt32 ( output . inUseResourceCount ) , issuedAt : output . issuedAt !== undefined && output . issuedAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . issuedAt ) ) ) : undefined , issuerCA : __expectString ( output . issuerCA ) , keyAlgorithm : __expectString ( output . keyAlgorithm ) , name : __expectString ( output . name ) , notAfter : output . notAfter !== undefined && output . notAfter !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . notAfter ) ) ) : undefined , notBefore : output . notBefore !== undefined && output . notBefore !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . notBefore ) ) ) : undefined , renewalSummary : output . renewalSummary !== undefined && output . renewalSummary !== null ? deserializeAws_json1_1RenewalSummary ( output . renewalSummary , context ) : undefined , requestFailureReason : __expectString ( output . requestFailureReason ) , revocationReason : __expectString ( output . revocationReason ) , revokedAt : output . revokedAt !== undefined && output . revokedAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . revokedAt ) ) ) : undefined , serialNumber : __expectString ( output . serialNumber ) , status : __expectString ( output . status ) , subjectAlternativeNames : output . subjectAlternativeNames !== undefined && output . subjectAlternativeNames !== null ? deserializeAws_json1_1SubjectAlternativeNameList ( output . subjectAlternativeNames , context ) : undefined , supportCode : __expectString ( output . supportCode ) , tags : output . tags !== undefined && output . tags !== null ? deserializeAws_json1_1TagList ( output . tags , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CertificateSummary = ( output , context ) : CertificateSummary => { return { certificateArn : __expectString ( output . certificateArn ) , certificateDetail : output . certificateDetail !== undefined && output . certificateDetail !== null ? deserializeAws_json1_1Certificate ( output . certificateDetail , context ) : undefined , certificateName : __expectString ( output . certificateName ) , domainName : __expectString ( output . domainName ) , tags : output . tags !== undefined && output . tags !== null ? deserializeAws_json1_1TagList ( output . tags , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CertificateSummaryList = ( output , context ) : CertificateSummary [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1CertificateSummary ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1CloseInstancePublicPortsResult = ( output , context ) : CloseInstancePublicPortsResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CloudFormationStackRecord = ( output , context ) : CloudFormationStackRecord => { return { arn : __expectString ( output . arn ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , destinationInfo : output . destinationInfo !== undefined && output . destinationInfo !== null ? deserializeAws_json1_1DestinationInfo ( output . destinationInfo , context ) : undefined , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , name : __expectString ( output . name ) , resourceType : __expectString ( output . resourceType ) , sourceInfo : output . sourceInfo !== undefined && output . sourceInfo !== null ? deserializeAws_json1_1CloudFormationStackRecordSourceInfoList ( output . sourceInfo , context ) : undefined , state : __expectString ( output . state ) , } as any ; } ; const deserializeAws_json1_1CloudFormationStackRecordList = ( output , context ) : CloudFormationStackRecord [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1CloudFormationStackRecord ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1CloudFormationStackRecordSourceInfo = ( output , context ) : CloudFormationStackRecordSourceInfo => { return { arn : __expectString ( output . arn ) , name : __expectString ( output . name ) , resourceType : __expectString ( output . resourceType ) , } as any ; } ; const deserializeAws_json1_1CloudFormationStackRecordSourceInfoList = ( output , context ) : CloudFormationStackRecordSourceInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1CloudFormationStackRecordSourceInfo ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ContactMethod = ( output , context ) : ContactMethod => { return { arn : __expectString ( output . arn ) , contactEndpoint : __expectString ( output . contactEndpoint ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , name : __expectString ( output . name ) , protocol : __expectString ( output . protocol ) , resourceType : __expectString ( output . resourceType ) , status : __expectString ( output . status ) , supportCode : __expectString ( output . supportCode ) , } as any ; } ; const deserializeAws_json1_1ContactMethodsList = ( output , context ) : ContactMethod [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ContactMethod ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ContactProtocolsList = ( output , context ) : ( ContactProtocol | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_json1_1Container = ( output , context ) : Container => { return { command : output . command !== undefined && output . command !== null ? deserializeAws_json1_1StringList ( output . command , context ) : undefined , environment : output . environment !== undefined && output . environment !== null ? deserializeAws_json1_1Environment ( output . environment , context ) : undefined , image : __expectString ( output . image ) , ports : output . ports !== undefined && output . ports !== null ? deserializeAws_json1_1PortMap ( output . ports , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ContainerImage = ( output , context ) : ContainerImage => { return { createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , digest : __expectString ( output . digest ) , image : __expectString ( output . image ) , } as any ; } ; const deserializeAws_json1_1ContainerImageList = ( output , context ) : ContainerImage [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ContainerImage ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ContainerMap = ( output , context ) : { [ key ] : Container ; } => { return Object . entries ( output ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : deserializeAws_json1_1Container ( value , context ) , } ; } , { } ) ; } ; const deserializeAws_json1_1ContainerService = ( output , context ) : ContainerService => { return { arn : __expectString ( output . arn ) , containerServiceName : __expectString ( output . containerServiceName ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , currentDeployment : output . currentDeployment !== undefined && output . currentDeployment !== null ? deserializeAws_json1_1ContainerServiceDeployment ( output . currentDeployment , context ) : undefined , isDisabled : __expectBoolean ( output . isDisabled ) , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , nextDeployment : output . nextDeployment !== undefined && output . nextDeployment !== null ? deserializeAws_json1_1ContainerServiceDeployment ( output . nextDeployment , context ) : undefined , power : __expectString ( output . power ) , powerId : __expectString ( output . powerId ) , principalArn : __expectString ( output . principalArn ) , privateDomainName : __expectString ( output . privateDomainName ) , publicDomainNames : output . publicDomainNames !== undefined && output . publicDomainNames !== null ? deserializeAws_json1_1ContainerServicePublicDomains ( output . publicDomainNames , context ) : undefined , resourceType : __expectString ( output . resourceType ) , scale : __expectInt32 ( output . scale ) , state : __expectString ( output . state ) , stateDetail : output . stateDetail !== undefined && output . stateDetail !== null ? deserializeAws_json1_1ContainerServiceStateDetail ( output . stateDetail , context ) : undefined , tags : output . tags !== undefined && output . tags !== null ? deserializeAws_json1_1TagList ( output . tags , context ) : undefined , url : __expectString ( output . url ) , } as any ; } ; const deserializeAws_json1_1ContainerServiceDeployment = ( output , context ) : ContainerServiceDeployment => { return { containers : output . containers !== undefined && output . containers !== null ? deserializeAws_json1_1ContainerMap ( output . containers , context ) : undefined , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , publicEndpoint : output . publicEndpoint !== undefined && output . publicEndpoint !== null ? deserializeAws_json1_1ContainerServiceEndpoint ( output . publicEndpoint , context ) : undefined , state : __expectString ( output . state ) , version : __expectInt32 ( output . version ) , } as any ; } ; const deserializeAws_json1_1ContainerServiceDeploymentList = ( output , context ) : ContainerServiceDeployment [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ContainerServiceDeployment ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ContainerServiceEndpoint = ( output , context ) : ContainerServiceEndpoint => { return { containerName : __expectString ( output . containerName ) , containerPort : __expectInt32 ( output . containerPort ) , healthCheck : output . healthCheck !== undefined && output . healthCheck !== null ? deserializeAws_json1_1ContainerServiceHealthCheckConfig ( output . healthCheck , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ContainerServiceHealthCheckConfig = ( output , context ) : ContainerServiceHealthCheckConfig => { return { healthyThreshold : __expectInt32 ( output . healthyThreshold ) , intervalSeconds : __expectInt32 ( output . intervalSeconds ) , path : __expectString ( output . path ) , successCodes : __expectString ( output . successCodes ) , timeoutSeconds : __expectInt32 ( output . timeoutSeconds ) , unhealthyThreshold : __expectInt32 ( output . unhealthyThreshold ) , } as any ; } ; const deserializeAws_json1_1ContainerServiceList = ( output , context ) : ContainerService [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ContainerService ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ContainerServiceLogEvent = ( output , context ) : ContainerServiceLogEvent => { return { createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1ContainerServiceLogEventList = ( output , context ) : ContainerServiceLogEvent [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ContainerServiceLogEvent ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ContainerServiceMetadataEntry = ( 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_1ContainerServiceMetadataEntryList = ( output , context ) : { [ key ] : string ; } [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ContainerServiceMetadataEntry ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ContainerServicePower = ( output , context ) : ContainerServicePower => { return { cpuCount : __limitedParseFloat32 ( output . cpuCount ) , isActive : __expectBoolean ( output . isActive ) , name : __expectString ( output . name ) , powerId : __expectString ( output . powerId ) , price : __limitedParseFloat32 ( output . price ) , ramSizeInGb : __limitedParseFloat32 ( output . ramSizeInGb ) , } as any ; } ; const deserializeAws_json1_1ContainerServicePowerList = ( output , context ) : ContainerServicePower [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ContainerServicePower ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ContainerServicePublicDomains = ( output , context ) : { [ key ] : string [ ] ; } => { return Object . entries ( output ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : deserializeAws_json1_1ContainerServicePublicDomainsList ( value , context ) , } ; } , { } ) ; } ; const deserializeAws_json1_1ContainerServicePublicDomainsList = ( 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_1ContainerServiceRegistryLogin = ( output , context ) : ContainerServiceRegistryLogin => { return { expiresAt : output . expiresAt !== undefined && output . expiresAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . expiresAt ) ) ) : undefined , password : __expectString ( output . password ) , registry : __expectString ( output . registry ) , username : __expectString ( output . username ) , } as any ; } ; const deserializeAws_json1_1ContainerServicesListResult = ( output , context ) : ContainerServicesListResult => { return { containerServices : output . containerServices !== undefined && output . containerServices !== null ? deserializeAws_json1_1ContainerServiceList ( output . containerServices , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ContainerServiceStateDetail = ( output , context ) : ContainerServiceStateDetail => { return { code : __expectString ( output . code ) , message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1CookieObject = ( output , context ) : CookieObject => { return { cookiesAllowList : output . cookiesAllowList !== undefined && output . cookiesAllowList !== null ? deserializeAws_json1_1StringList ( output . cookiesAllowList , context ) : undefined , option : __expectString ( output . option ) , } as any ; } ; const deserializeAws_json1_1CopySnapshotResult = ( output , context ) : CopySnapshotResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateBucketAccessKeyResult = ( output , context ) : CreateBucketAccessKeyResult => { return { accessKey : output . accessKey !== undefined && output . accessKey !== null ? deserializeAws_json1_1AccessKey ( output . accessKey , context ) : undefined , operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateBucketResult = ( output , context ) : CreateBucketResult => { return { bucket : output . bucket !== undefined && output . bucket !== null ? deserializeAws_json1_1Bucket ( output . bucket , context ) : undefined , operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateCertificateResult = ( output , context ) : CreateCertificateResult => { return { certificate : output . certificate !== undefined && output . certificate !== null ? deserializeAws_json1_1CertificateSummary ( output . certificate , context ) : undefined , operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateCloudFormationStackResult = ( output , context ) : CreateCloudFormationStackResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateContactMethodResult = ( output , context ) : CreateContactMethodResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateContainerServiceDeploymentResult = ( output , context ) : CreateContainerServiceDeploymentResult => { return { containerService : output . containerService !== undefined && output . containerService !== null ? deserializeAws_json1_1ContainerService ( output . containerService , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateContainerServiceRegistryLoginResult = ( output , context ) : CreateContainerServiceRegistryLoginResult => { return { registryLogin : output . registryLogin !== undefined && output . registryLogin !== null ? deserializeAws_json1_1ContainerServiceRegistryLogin ( output . registryLogin , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateContainerServiceResult = ( output , context ) : CreateContainerServiceResult => { return { containerService : output . containerService !== undefined && output . containerService !== null ? deserializeAws_json1_1ContainerService ( output . containerService , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateDiskFromSnapshotResult = ( output , context ) : CreateDiskFromSnapshotResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateDiskResult = ( output , context ) : CreateDiskResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateDiskSnapshotResult = ( output , context ) : CreateDiskSnapshotResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateDistributionResult = ( output , context ) : CreateDistributionResult => { return { distribution : output . distribution !== undefined && output . distribution !== null ? deserializeAws_json1_1LightsailDistribution ( output . distribution , context ) : undefined , operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateDomainEntryResult = ( output , context ) : CreateDomainEntryResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateDomainResult = ( output , context ) : CreateDomainResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateInstancesFromSnapshotResult = ( output , context ) : CreateInstancesFromSnapshotResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateInstanceSnapshotResult = ( output , context ) : CreateInstanceSnapshotResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateInstancesResult = ( output , context ) : CreateInstancesResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateKeyPairResult = ( output , context ) : CreateKeyPairResult => { return { keyPair : output . keyPair !== undefined && output . keyPair !== null ? deserializeAws_json1_1KeyPair ( output . keyPair , context ) : undefined , operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , privateKeyBase64 : __expectString ( output . privateKeyBase64 ) , publicKeyBase64 : __expectString ( output . publicKeyBase64 ) , } as any ; } ; const deserializeAws_json1_1CreateLoadBalancerResult = ( output , context ) : CreateLoadBalancerResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateLoadBalancerTlsCertificateResult = ( output , context ) : CreateLoadBalancerTlsCertificateResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateRelationalDatabaseFromSnapshotResult = ( output , context ) : CreateRelationalDatabaseFromSnapshotResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateRelationalDatabaseResult = ( output , context ) : CreateRelationalDatabaseResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateRelationalDatabaseSnapshotResult = ( output , context ) : CreateRelationalDatabaseSnapshotResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteAlarmResult = ( output , context ) : DeleteAlarmResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteAutoSnapshotResult = ( output , context ) : DeleteAutoSnapshotResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteBucketAccessKeyResult = ( output , context ) : DeleteBucketAccessKeyResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteBucketResult = ( output , context ) : DeleteBucketResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteCertificateResult = ( output , context ) : DeleteCertificateResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteContactMethodResult = ( output , context ) : DeleteContactMethodResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteContainerImageResult = ( output , context ) : DeleteContainerImageResult => { return { } as any ; } ; const deserializeAws_json1_1DeleteContainerServiceResult = ( output , context ) : DeleteContainerServiceResult => { return { } as any ; } ; const deserializeAws_json1_1DeleteDiskResult = ( output , context ) : DeleteDiskResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteDiskSnapshotResult = ( output , context ) : DeleteDiskSnapshotResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteDistributionResult = ( output , context ) : DeleteDistributionResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteDomainEntryResult = ( output , context ) : DeleteDomainEntryResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteDomainResult = ( output , context ) : DeleteDomainResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteInstanceResult = ( output , context ) : DeleteInstanceResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteInstanceSnapshotResult = ( output , context ) : DeleteInstanceSnapshotResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteKeyPairResult = ( output , context ) : DeleteKeyPairResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteKnownHostKeysResult = ( output , context ) : DeleteKnownHostKeysResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteLoadBalancerResult = ( output , context ) : DeleteLoadBalancerResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteLoadBalancerTlsCertificateResult = ( output , context ) : DeleteLoadBalancerTlsCertificateResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteRelationalDatabaseResult = ( output , context ) : DeleteRelationalDatabaseResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DeleteRelationalDatabaseSnapshotResult = ( output , context ) : DeleteRelationalDatabaseSnapshotResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DestinationInfo = ( output , context ) : DestinationInfo => { return { id : __expectString ( output . id ) , service : __expectString ( output . service ) , } as any ; } ; const deserializeAws_json1_1DetachCertificateFromDistributionResult = ( output , context ) : DetachCertificateFromDistributionResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DetachDiskResult = ( output , context ) : DetachDiskResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DetachInstancesFromLoadBalancerResult = ( output , context ) : DetachInstancesFromLoadBalancerResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DetachStaticIpResult = ( output , context ) : DetachStaticIpResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DisableAddOnResult = ( output , context ) : DisableAddOnResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1Disk = ( output , context ) : Disk => { return { addOns : output . addOns !== undefined && output . addOns !== null ? deserializeAws_json1_1AddOnList ( output . addOns , context ) : undefined , arn : __expectString ( output . arn ) , attachedTo : __expectString ( output . attachedTo ) , attachmentState : __expectString ( output . attachmentState ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , gbInUse : __expectInt32 ( output . gbInUse ) , iops : __expectInt32 ( output . iops ) , isAttached : __expectBoolean ( output . isAttached ) , isSystemDisk : __expectBoolean ( output . isSystemDisk ) , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , name : __expectString ( output . name ) , path : __expectString ( output . path ) , resourceType : __expectString ( output . resourceType ) , sizeInGb : __expectInt32 ( output . sizeInGb ) , state : __expectString ( output . state ) , supportCode : __expectString ( output . supportCode ) , tags : output . tags !== undefined && output . tags !== null ? deserializeAws_json1_1TagList ( output . tags , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DiskInfo = ( output , context ) : DiskInfo => { return { isSystemDisk : __expectBoolean ( output . isSystemDisk ) , name : __expectString ( output . name ) , path : __expectString ( output . path ) , sizeInGb : __expectInt32 ( output . sizeInGb ) , } as any ; } ; const deserializeAws_json1_1DiskInfoList = ( output , context ) : DiskInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1DiskInfo ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1DiskList = ( output , context ) : Disk [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Disk ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1DiskSnapshot = ( output , context ) : DiskSnapshot => { return { arn : __expectString ( output . arn ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , fromDiskArn : __expectString ( output . fromDiskArn ) , fromDiskName : __expectString ( output . fromDiskName ) , fromInstanceArn : __expectString ( output . fromInstanceArn ) , fromInstanceName : __expectString ( output . fromInstanceName ) , isFromAutoSnapshot : __expectBoolean ( output . isFromAutoSnapshot ) , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , name : __expectString ( output . name ) , progress : __expectString ( output . progress ) , resourceType : __expectString ( output . resourceType ) , sizeInGb : __expectInt32 ( output . sizeInGb ) , state : __expectString ( output . state ) , supportCode : __expectString ( output . supportCode ) , tags : output . tags !== undefined && output . tags !== null ? deserializeAws_json1_1TagList ( output . tags , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DiskSnapshotInfo = ( output , context ) : DiskSnapshotInfo => { return { sizeInGb : __expectInt32 ( output . sizeInGb ) , } as any ; } ; const deserializeAws_json1_1DiskSnapshotList = ( output , context ) : DiskSnapshot [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1DiskSnapshot ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1DistributionBundle = ( output , context ) : DistributionBundle => { return { bundleId : __expectString ( output . bundleId ) , isActive : __expectBoolean ( output . isActive ) , name : __expectString ( output . name ) , price : __limitedParseFloat32 ( output . price ) , transferPerMonthInGb : __expectInt32 ( output . transferPerMonthInGb ) , } as any ; } ; const deserializeAws_json1_1DistributionBundleList = ( output , context ) : DistributionBundle [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1DistributionBundle ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1DistributionList = ( output , context ) : LightsailDistribution [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1LightsailDistribution ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1Domain = ( output , context ) : Domain => { return { arn : __expectString ( output . arn ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , domainEntries : output . domainEntries !== undefined && output . domainEntries !== null ? deserializeAws_json1_1DomainEntryList ( output . domainEntries , context ) : undefined , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , name : __expectString ( output . name ) , resourceType : __expectString ( output . resourceType ) , supportCode : __expectString ( output . supportCode ) , tags : output . tags !== undefined && output . tags !== null ? deserializeAws_json1_1TagList ( output . tags , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DomainEntry = ( output , context ) : DomainEntry => { return { id : __expectString ( output . id ) , isAlias : __expectBoolean ( output . isAlias ) , name : __expectString ( output . name ) , options : output . options !== undefined && output . options !== null ? deserializeAws_json1_1DomainEntryOptions ( output . options , context ) : undefined , target : __expectString ( output . target ) , type : __expectString ( output . type ) , } as any ; } ; const deserializeAws_json1_1DomainEntryList = ( output , context ) : DomainEntry [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1DomainEntry ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1DomainEntryOptions = ( 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_1DomainList = ( output , context ) : Domain [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Domain ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1DomainValidationRecord = ( output , context ) : DomainValidationRecord => { return { domainName : __expectString ( output . domainName ) , resourceRecord : output . resourceRecord !== undefined && output . resourceRecord !== null ? deserializeAws_json1_1ResourceRecord ( output . resourceRecord , context ) : undefined , } as any ; } ; const deserializeAws_json1_1DomainValidationRecordList = ( output , context ) : DomainValidationRecord [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1DomainValidationRecord ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1DownloadDefaultKeyPairResult = ( output , context ) : DownloadDefaultKeyPairResult => { return { privateKeyBase64 : __expectString ( output . privateKeyBase64 ) , publicKeyBase64 : __expectString ( output . publicKeyBase64 ) , } as any ; } ; const deserializeAws_json1_1EnableAddOnResult = ( output , context ) : EnableAddOnResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1Environment = ( 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_1ExportSnapshotRecord = ( output , context ) : ExportSnapshotRecord => { return { arn : __expectString ( output . arn ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , destinationInfo : output . destinationInfo !== undefined && output . destinationInfo !== null ? deserializeAws_json1_1DestinationInfo ( output . destinationInfo , context ) : undefined , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , name : __expectString ( output . name ) , resourceType : __expectString ( output . resourceType ) , sourceInfo : output . sourceInfo !== undefined && output . sourceInfo !== null ? deserializeAws_json1_1ExportSnapshotRecordSourceInfo ( output . sourceInfo , context ) : undefined , state : __expectString ( output . state ) , } as any ; } ; const deserializeAws_json1_1ExportSnapshotRecordList = ( output , context ) : ExportSnapshotRecord [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ExportSnapshotRecord ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ExportSnapshotRecordSourceInfo = ( output , context ) : ExportSnapshotRecordSourceInfo => { return { arn : __expectString ( output . arn ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , diskSnapshotInfo : output . diskSnapshotInfo !== undefined && output . diskSnapshotInfo !== null ? deserializeAws_json1_1DiskSnapshotInfo ( output . diskSnapshotInfo , context ) : undefined , fromResourceArn : __expectString ( output . fromResourceArn ) , fromResourceName : __expectString ( output . fromResourceName ) , instanceSnapshotInfo : output . instanceSnapshotInfo !== undefined && output . instanceSnapshotInfo !== null ? deserializeAws_json1_1InstanceSnapshotInfo ( output . instanceSnapshotInfo , context ) : undefined , name : __expectString ( output . name ) , resourceType : __expectString ( output . resourceType ) , } as any ; } ; const deserializeAws_json1_1ExportSnapshotResult = ( output , context ) : ExportSnapshotResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetActiveNamesResult = ( output , context ) : GetActiveNamesResult => { return { activeNames : output . activeNames !== undefined && output . activeNames !== null ? deserializeAws_json1_1StringList ( output . activeNames , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetAlarmsResult = ( output , context ) : GetAlarmsResult => { return { alarms : output . alarms !== undefined && output . alarms !== null ? deserializeAws_json1_1AlarmsList ( output . alarms , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetAutoSnapshotsResult = ( output , context ) : GetAutoSnapshotsResult => { return { autoSnapshots : output . autoSnapshots !== undefined && output . autoSnapshots !== null ? deserializeAws_json1_1AutoSnapshotDetailsList ( output . autoSnapshots , context ) : undefined , resourceName : __expectString ( output . resourceName ) , resourceType : __expectString ( output . resourceType ) , } as any ; } ; const deserializeAws_json1_1GetBlueprintsResult = ( output , context ) : GetBlueprintsResult => { return { blueprints : output . blueprints !== undefined && output . blueprints !== null ? deserializeAws_json1_1BlueprintList ( output . blueprints , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetBucketAccessKeysResult = ( output , context ) : GetBucketAccessKeysResult => { return { accessKeys : output . accessKeys !== undefined && output . accessKeys !== null ? deserializeAws_json1_1AccessKeyList ( output . accessKeys , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetBucketBundlesResult = ( output , context ) : GetBucketBundlesResult => { return { bundles : output . bundles !== undefined && output . bundles !== null ? deserializeAws_json1_1BucketBundleList ( output . bundles , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetBucketMetricDataResult = ( output , context ) : GetBucketMetricDataResult => { return { metricData : output . metricData !== undefined && output . metricData !== null ? deserializeAws_json1_1MetricDatapointList ( output . metricData , context ) : undefined , metricName : __expectString ( output . metricName ) , } as any ; } ; const deserializeAws_json1_1GetBucketsResult = ( output , context ) : GetBucketsResult => { return { buckets : output . buckets !== undefined && output . buckets !== null ? deserializeAws_json1_1BucketList ( output . buckets , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetBundlesResult = ( output , context ) : GetBundlesResult => { return { bundles : output . bundles !== undefined && output . bundles !== null ? deserializeAws_json1_1BundleList ( output . bundles , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetCertificatesResult = ( output , context ) : GetCertificatesResult => { return { certificates : output . certificates !== undefined && output . certificates !== null ? deserializeAws_json1_1CertificateSummaryList ( output . certificates , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetCloudFormationStackRecordsResult = ( output , context ) : GetCloudFormationStackRecordsResult => { return { cloudFormationStackRecords : output . cloudFormationStackRecords !== undefined && output . cloudFormationStackRecords !== null ? deserializeAws_json1_1CloudFormationStackRecordList ( output . cloudFormationStackRecords , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetContactMethodsResult = ( output , context ) : GetContactMethodsResult => { return { contactMethods : output . contactMethods !== undefined && output . contactMethods !== null ? deserializeAws_json1_1ContactMethodsList ( output . contactMethods , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetContainerAPIMetadataResult = ( output , context ) : GetContainerAPIMetadataResult => { return { metadata : output . metadata !== undefined && output . metadata !== null ? deserializeAws_json1_1ContainerServiceMetadataEntryList ( output . metadata , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetContainerImagesResult = ( output , context ) : GetContainerImagesResult => { return { containerImages : output . containerImages !== undefined && output . containerImages !== null ? deserializeAws_json1_1ContainerImageList ( output . containerImages , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetContainerLogResult = ( output , context ) : GetContainerLogResult => { return { logEvents : output . logEvents !== undefined && output . logEvents !== null ? deserializeAws_json1_1ContainerServiceLogEventList ( output . logEvents , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetContainerServiceDeploymentsResult = ( output , context ) : GetContainerServiceDeploymentsResult => { return { deployments : output . deployments !== undefined && output . deployments !== null ? deserializeAws_json1_1ContainerServiceDeploymentList ( output . deployments , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetContainerServiceMetricDataResult = ( output , context ) : GetContainerServiceMetricDataResult => { return { metricData : output . metricData !== undefined && output . metricData !== null ? deserializeAws_json1_1MetricDatapointList ( output . metricData , context ) : undefined , metricName : __expectString ( output . metricName ) , } as any ; } ; const deserializeAws_json1_1GetContainerServicePowersResult = ( output , context ) : GetContainerServicePowersResult => { return { powers : output . powers !== undefined && output . powers !== null ? deserializeAws_json1_1ContainerServicePowerList ( output . powers , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetDiskResult = ( output , context ) : GetDiskResult => { return { disk : output . disk !== undefined && output . disk !== null ? deserializeAws_json1_1Disk ( output . disk , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetDiskSnapshotResult = ( output , context ) : GetDiskSnapshotResult => { return { diskSnapshot : output . diskSnapshot !== undefined && output . diskSnapshot !== null ? deserializeAws_json1_1DiskSnapshot ( output . diskSnapshot , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetDiskSnapshotsResult = ( output , context ) : GetDiskSnapshotsResult => { return { diskSnapshots : output . diskSnapshots !== undefined && output . diskSnapshots !== null ? deserializeAws_json1_1DiskSnapshotList ( output . diskSnapshots , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetDisksResult = ( output , context ) : GetDisksResult => { return { disks : output . disks !== undefined && output . disks !== null ? deserializeAws_json1_1DiskList ( output . disks , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetDistributionBundlesResult = ( output , context ) : GetDistributionBundlesResult => { return { bundles : output . bundles !== undefined && output . bundles !== null ? deserializeAws_json1_1DistributionBundleList ( output . bundles , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetDistributionLatestCacheResetResult = ( output , context ) : GetDistributionLatestCacheResetResult => { return { createTime : output . createTime !== undefined && output . createTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createTime ) ) ) : undefined , status : __expectString ( output . status ) , } as any ; } ; const deserializeAws_json1_1GetDistributionMetricDataResult = ( output , context ) : GetDistributionMetricDataResult => { return { metricData : output . metricData !== undefined && output . metricData !== null ? deserializeAws_json1_1MetricDatapointList ( output . metricData , context ) : undefined , metricName : __expectString ( output . metricName ) , } as any ; } ; const deserializeAws_json1_1GetDistributionsResult = ( output , context ) : GetDistributionsResult => { return { distributions : output . distributions !== undefined && output . distributions !== null ? deserializeAws_json1_1DistributionList ( output . distributions , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetDomainResult = ( output , context ) : GetDomainResult => { return { domain : output . domain !== undefined && output . domain !== null ? deserializeAws_json1_1Domain ( output . domain , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetDomainsResult = ( output , context ) : GetDomainsResult => { return { domains : output . domains !== undefined && output . domains !== null ? deserializeAws_json1_1DomainList ( output . domains , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetExportSnapshotRecordsResult = ( output , context ) : GetExportSnapshotRecordsResult => { return { exportSnapshotRecords : output . exportSnapshotRecords !== undefined && output . exportSnapshotRecords !== null ? deserializeAws_json1_1ExportSnapshotRecordList ( output . exportSnapshotRecords , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetInstanceAccessDetailsResult = ( output , context ) : GetInstanceAccessDetailsResult => { return { accessDetails : output . accessDetails !== undefined && output . accessDetails !== null ? deserializeAws_json1_1InstanceAccessDetails ( output . accessDetails , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetInstanceMetricDataResult = ( output , context ) : GetInstanceMetricDataResult => { return { metricData : output . metricData !== undefined && output . metricData !== null ? deserializeAws_json1_1MetricDatapointList ( output . metricData , context ) : undefined , metricName : __expectString ( output . metricName ) , } as any ; } ; const deserializeAws_json1_1GetInstancePortStatesResult = ( output , context ) : GetInstancePortStatesResult => { return { portStates : output . portStates !== undefined && output . portStates !== null ? deserializeAws_json1_1InstancePortStateList ( output . portStates , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetInstanceResult = ( output , context ) : GetInstanceResult => { return { instance : output . instance !== undefined && output . instance !== null ? deserializeAws_json1_1Instance ( output . instance , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetInstanceSnapshotResult = ( output , context ) : GetInstanceSnapshotResult => { return { instanceSnapshot : output . instanceSnapshot !== undefined && output . instanceSnapshot !== null ? deserializeAws_json1_1InstanceSnapshot ( output . instanceSnapshot , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetInstanceSnapshotsResult = ( output , context ) : GetInstanceSnapshotsResult => { return { instanceSnapshots : output . instanceSnapshots !== undefined && output . instanceSnapshots !== null ? deserializeAws_json1_1InstanceSnapshotList ( output . instanceSnapshots , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetInstancesResult = ( output , context ) : GetInstancesResult => { return { instances : output . instances !== undefined && output . instances !== null ? deserializeAws_json1_1InstanceList ( output . instances , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetInstanceStateResult = ( output , context ) : GetInstanceStateResult => { return { state : output . state !== undefined && output . state !== null ? deserializeAws_json1_1InstanceState ( output . state , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetKeyPairResult = ( output , context ) : GetKeyPairResult => { return { keyPair : output . keyPair !== undefined && output . keyPair !== null ? deserializeAws_json1_1KeyPair ( output . keyPair , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetKeyPairsResult = ( output , context ) : GetKeyPairsResult => { return { keyPairs : output . keyPairs !== undefined && output . keyPairs !== null ? deserializeAws_json1_1KeyPairList ( output . keyPairs , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetLoadBalancerMetricDataResult = ( output , context ) : GetLoadBalancerMetricDataResult => { return { metricData : output . metricData !== undefined && output . metricData !== null ? deserializeAws_json1_1MetricDatapointList ( output . metricData , context ) : undefined , metricName : __expectString ( output . metricName ) , } as any ; } ; const deserializeAws_json1_1GetLoadBalancerResult = ( output , context ) : GetLoadBalancerResult => { return { loadBalancer : output . loadBalancer !== undefined && output . loadBalancer !== null ? deserializeAws_json1_1LoadBalancer ( output . loadBalancer , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetLoadBalancersResult = ( output , context ) : GetLoadBalancersResult => { return { loadBalancers : output . loadBalancers !== undefined && output . loadBalancers !== null ? deserializeAws_json1_1LoadBalancerList ( output . loadBalancers , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetLoadBalancerTlsCertificatesResult = ( output , context ) : GetLoadBalancerTlsCertificatesResult => { return { tlsCertificates : output . tlsCertificates !== undefined && output . tlsCertificates !== null ? deserializeAws_json1_1LoadBalancerTlsCertificateList ( output . tlsCertificates , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetOperationResult = ( output , context ) : GetOperationResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetOperationsForResourceResult = ( output , context ) : GetOperationsForResourceResult => { return { nextPageCount : __expectString ( output . nextPageCount ) , nextPageToken : __expectString ( output . nextPageToken ) , operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetOperationsResult = ( output , context ) : GetOperationsResult => { return { nextPageToken : __expectString ( output . nextPageToken ) , operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetRegionsResult = ( output , context ) : GetRegionsResult => { return { regions : output . regions !== undefined && output . regions !== null ? deserializeAws_json1_1RegionList ( output . regions , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetRelationalDatabaseBlueprintsResult = ( output , context ) : GetRelationalDatabaseBlueprintsResult => { return { blueprints : output . blueprints !== undefined && output . blueprints !== null ? deserializeAws_json1_1RelationalDatabaseBlueprintList ( output . blueprints , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetRelationalDatabaseBundlesResult = ( output , context ) : GetRelationalDatabaseBundlesResult => { return { bundles : output . bundles !== undefined && output . bundles !== null ? deserializeAws_json1_1RelationalDatabaseBundleList ( output . bundles , context ) : undefined , nextPageToken : __expectString ( output . nextPageToken ) , } as any ; } ; const deserializeAws_json1_1GetRelationalDatabaseEventsResult = ( output , context ) : GetRelationalDatabaseEventsResult => { return { nextPageToken : __expectString ( output . nextPageToken ) , relationalDatabaseEvents : output . relationalDatabaseEvents !== undefined && output . relationalDatabaseEvents !== null ? deserializeAws_json1_1RelationalDatabaseEventList ( output . relationalDatabaseEvents , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetRelationalDatabaseLogEventsResult = ( output , context ) : GetRelationalDatabaseLogEventsResult => { return { nextBackwardToken : __expectString ( output . nextBackwardToken ) , nextForwardToken : __expectString ( output . nextForwardToken ) , resourceLogEvents : output . resourceLogEvents !== undefined && output . resourceLogEvents !== null ? deserializeAws_json1_1LogEventList ( output . resourceLogEvents , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetRelationalDatabaseLogStreamsResult = ( output , context ) : GetRelationalDatabaseLogStreamsResult => { return { logStreams : output . logStreams !== undefined && output . logStreams !== null ? deserializeAws_json1_1StringList ( output . logStreams , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetRelationalDatabaseMasterUserPasswordResult = ( output , context ) : GetRelationalDatabaseMasterUserPasswordResult => { return { createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , masterUserPassword : __expectString ( output . masterUserPassword ) , } as any ; } ; const deserializeAws_json1_1GetRelationalDatabaseMetricDataResult = ( output , context ) : GetRelationalDatabaseMetricDataResult => { return { metricData : output . metricData !== undefined && output . metricData !== null ? deserializeAws_json1_1MetricDatapointList ( output . metricData , context ) : undefined , metricName : __expectString ( output . metricName ) , } as any ; } ; const deserializeAws_json1_1GetRelationalDatabaseParametersResult = ( output , context ) : GetRelationalDatabaseParametersResult => { return { nextPageToken : __expectString ( output . nextPageToken ) , parameters : output . parameters !== undefined && output . parameters !== null ? deserializeAws_json1_1RelationalDatabaseParameterList ( output . parameters , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetRelationalDatabaseResult = ( output , context ) : GetRelationalDatabaseResult => { return { relationalDatabase : output . relationalDatabase !== undefined && output . relationalDatabase !== null ? deserializeAws_json1_1RelationalDatabase ( output . relationalDatabase , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetRelationalDatabaseSnapshotResult = ( output , context ) : GetRelationalDatabaseSnapshotResult => { return { relationalDatabaseSnapshot : output . relationalDatabaseSnapshot !== undefined && output . relationalDatabaseSnapshot !== null ? deserializeAws_json1_1RelationalDatabaseSnapshot ( output . relationalDatabaseSnapshot , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetRelationalDatabaseSnapshotsResult = ( output , context ) : GetRelationalDatabaseSnapshotsResult => { return { nextPageToken : __expectString ( output . nextPageToken ) , relationalDatabaseSnapshots : output . relationalDatabaseSnapshots !== undefined && output . relationalDatabaseSnapshots !== null ? deserializeAws_json1_1RelationalDatabaseSnapshotList ( output . relationalDatabaseSnapshots , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetRelationalDatabasesResult = ( output , context ) : GetRelationalDatabasesResult => { return { nextPageToken : __expectString ( output . nextPageToken ) , relationalDatabases : output . relationalDatabases !== undefined && output . relationalDatabases !== null ? deserializeAws_json1_1RelationalDatabaseList ( output . relationalDatabases , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetStaticIpResult = ( output , context ) : GetStaticIpResult => { return { staticIp : output . staticIp !== undefined && output . staticIp !== null ? deserializeAws_json1_1StaticIp ( output . staticIp , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetStaticIpsResult = ( output , context ) : GetStaticIpsResult => { return { nextPageToken : __expectString ( output . nextPageToken ) , staticIps : output . staticIps !== undefined && output . staticIps !== null ? deserializeAws_json1_1StaticIpList ( output . staticIps , context ) : undefined , } as any ; } ; const deserializeAws_json1_1HeaderForwardList = ( output , context ) : ( HeaderEnum | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_json1_1HeaderObject = ( output , context ) : HeaderObject => { return { headersAllowList : output . headersAllowList !== undefined && output . headersAllowList !== null ? deserializeAws_json1_1HeaderForwardList ( output . headersAllowList , context ) : undefined , option : __expectString ( output . option ) , } as any ; } ; const deserializeAws_json1_1HostKeyAttributes = ( output , context ) : HostKeyAttributes => { return { algorithm : __expectString ( output . algorithm ) , fingerprintSHA1 : __expectString ( output . fingerprintSHA1 ) , fingerprintSHA256 : __expectString ( output . fingerprintSHA256 ) , notValidAfter : output . notValidAfter !== undefined && output . notValidAfter !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . notValidAfter ) ) ) : undefined , notValidBefore : output . notValidBefore !== undefined && output . notValidBefore !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . notValidBefore ) ) ) : undefined , publicKey : __expectString ( output . publicKey ) , witnessedAt : output . witnessedAt !== undefined && output . witnessedAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . witnessedAt ) ) ) : undefined , } as any ; } ; const deserializeAws_json1_1HostKeysList = ( output , context ) : HostKeyAttributes [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1HostKeyAttributes ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ImportKeyPairResult = ( output , context ) : ImportKeyPairResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1Instance = ( output , context ) : Instance => { return { addOns : output . addOns !== undefined && output . addOns !== null ? deserializeAws_json1_1AddOnList ( output . addOns , context ) : undefined , arn : __expectString ( output . arn ) , blueprintId : __expectString ( output . blueprintId ) , blueprintName : __expectString ( output . blueprintName ) , bundleId : __expectString ( output . bundleId ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , hardware : output . hardware !== undefined && output . hardware !== null ? deserializeAws_json1_1InstanceHardware ( output . hardware , context ) : undefined , ipAddressType : __expectString ( output . ipAddressType ) , ipv6Addresses : output . ipv6Addresses !== undefined && output . ipv6Addresses !== null ? deserializeAws_json1_1Ipv6AddressList ( output . ipv6Addresses , context ) : undefined , isStaticIp : __expectBoolean ( output . isStaticIp ) , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , name : __expectString ( output . name ) , networking : output . networking !== undefined && output . networking !== null ? deserializeAws_json1_1InstanceNetworking ( output . networking , context ) : undefined , privateIpAddress : __expectString ( output . privateIpAddress ) , publicIpAddress : __expectString ( output . publicIpAddress ) , resourceType : __expectString ( output . resourceType ) , sshKeyName : __expectString ( output . sshKeyName ) , state : output . state !== undefined && output . state !== null ? deserializeAws_json1_1InstanceState ( output . state , context ) : undefined , supportCode : __expectString ( output . supportCode ) , tags : output . tags !== undefined && output . tags !== null ? deserializeAws_json1_1TagList ( output . tags , context ) : undefined , username : __expectString ( output . username ) , } as any ; } ; const deserializeAws_json1_1InstanceAccessDetails = ( output , context ) : InstanceAccessDetails => { return { certKey : __expectString ( output . certKey ) , expiresAt : output . expiresAt !== undefined && output . expiresAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . expiresAt ) ) ) : undefined , hostKeys : output . hostKeys !== undefined && output . hostKeys !== null ? deserializeAws_json1_1HostKeysList ( output . hostKeys , context ) : undefined , instanceName : __expectString ( output . instanceName ) , ipAddress : __expectString ( output . ipAddress ) , password : __expectString ( output . password ) , passwordData : output . passwordData !== undefined && output . passwordData !== null ? deserializeAws_json1_1PasswordData ( output . passwordData , context ) : undefined , privateKey : __expectString ( output . privateKey ) , protocol : __expectString ( output . protocol ) , username : __expectString ( output . username ) , } as any ; } ; const deserializeAws_json1_1InstanceHardware = ( output , context ) : InstanceHardware => { return { cpuCount : __expectInt32 ( output . cpuCount ) , disks : output . disks !== undefined && output . disks !== null ? deserializeAws_json1_1DiskList ( output . disks , context ) : undefined , ramSizeInGb : __limitedParseFloat32 ( output . ramSizeInGb ) , } as any ; } ; const deserializeAws_json1_1InstanceHealthSummary = ( output , context ) : InstanceHealthSummary => { return { instanceHealth : __expectString ( output . instanceHealth ) , instanceHealthReason : __expectString ( output . instanceHealthReason ) , instanceName : __expectString ( output . instanceName ) , } as any ; } ; const deserializeAws_json1_1InstanceHealthSummaryList = ( output , context ) : InstanceHealthSummary [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1InstanceHealthSummary ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1InstanceList = ( output , context ) : Instance [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Instance ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1InstanceNetworking = ( output , context ) : InstanceNetworking => { return { monthlyTransfer : output . monthlyTransfer !== undefined && output . monthlyTransfer !== null ? deserializeAws_json1_1MonthlyTransfer ( output . monthlyTransfer , context ) : undefined , ports : output . ports !== undefined && output . ports !== null ? deserializeAws_json1_1InstancePortInfoList ( output . ports , context ) : undefined , } as any ; } ; const deserializeAws_json1_1InstancePlatformList = ( output , context ) : ( InstancePlatform | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_json1_1InstancePortInfo = ( output , context ) : InstancePortInfo => { return { accessDirection : __expectString ( output . accessDirection ) , accessFrom : __expectString ( output . accessFrom ) , accessType : __expectString ( output . accessType ) , cidrListAliases : output . cidrListAliases !== undefined && output . cidrListAliases !== null ? deserializeAws_json1_1StringList ( output . cidrListAliases , context ) : undefined , cidrs : output . cidrs !== undefined && output . cidrs !== null ? deserializeAws_json1_1StringList ( output . cidrs , context ) : undefined , commonName : __expectString ( output . commonName ) , fromPort : __expectInt32 ( output . fromPort ) , ipv6Cidrs : output . ipv6Cidrs !== undefined && output . ipv6Cidrs !== null ? deserializeAws_json1_1StringList ( output . ipv6Cidrs , context ) : undefined , protocol : __expectString ( output . protocol ) , toPort : __expectInt32 ( output . toPort ) , } as any ; } ; const deserializeAws_json1_1InstancePortInfoList = ( output , context ) : InstancePortInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1InstancePortInfo ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1InstancePortState = ( output , context ) : InstancePortState => { return { cidrListAliases : output . cidrListAliases !== undefined && output . cidrListAliases !== null ? deserializeAws_json1_1StringList ( output . cidrListAliases , context ) : undefined , cidrs : output . cidrs !== undefined && output . cidrs !== null ? deserializeAws_json1_1StringList ( output . cidrs , context ) : undefined , fromPort : __expectInt32 ( output . fromPort ) , ipv6Cidrs : output . ipv6Cidrs !== undefined && output . ipv6Cidrs !== null ? deserializeAws_json1_1StringList ( output . ipv6Cidrs , context ) : undefined , protocol : __expectString ( output . protocol ) , state : __expectString ( output . state ) , toPort : __expectInt32 ( output . toPort ) , } as any ; } ; const deserializeAws_json1_1InstancePortStateList = ( output , context ) : InstancePortState [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1InstancePortState ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1InstanceSnapshot = ( output , context ) : InstanceSnapshot => { return { arn : __expectString ( output . arn ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , fromAttachedDisks : output . fromAttachedDisks !== undefined && output . fromAttachedDisks !== null ? deserializeAws_json1_1DiskList ( output . fromAttachedDisks , context ) : undefined , fromBlueprintId : __expectString ( output . fromBlueprintId ) , fromBundleId : __expectString ( output . fromBundleId ) , fromInstanceArn : __expectString ( output . fromInstanceArn ) , fromInstanceName : __expectString ( output . fromInstanceName ) , isFromAutoSnapshot : __expectBoolean ( output . isFromAutoSnapshot ) , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , name : __expectString ( output . name ) , progress : __expectString ( output . progress ) , resourceType : __expectString ( output . resourceType ) , sizeInGb : __expectInt32 ( output . sizeInGb ) , state : __expectString ( output . state ) , supportCode : __expectString ( output . supportCode ) , tags : output . tags !== undefined && output . tags !== null ? deserializeAws_json1_1TagList ( output . tags , context ) : undefined , } as any ; } ; const deserializeAws_json1_1InstanceSnapshotInfo = ( output , context ) : InstanceSnapshotInfo => { return { fromBlueprintId : __expectString ( output . fromBlueprintId ) , fromBundleId : __expectString ( output . fromBundleId ) , fromDiskInfo : output . fromDiskInfo !== undefined && output . fromDiskInfo !== null ? deserializeAws_json1_1DiskInfoList ( output . fromDiskInfo , context ) : undefined , } as any ; } ; const deserializeAws_json1_1InstanceSnapshotList = ( output , context ) : InstanceSnapshot [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1InstanceSnapshot ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1InstanceState = ( output , context ) : InstanceState => { return { code : __expectInt32 ( output . code ) , name : __expectString ( output . name ) , } as any ; } ; const deserializeAws_json1_1InvalidInputException = ( output , context ) : InvalidInputException => { return { code : __expectString ( output . code ) , docs : __expectString ( output . docs ) , message : __expectString ( output . message ) , tip : __expectString ( output . tip ) , } as any ; } ; const deserializeAws_json1_1Ipv6AddressList = ( 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_1IsVpcPeeredResult = ( output , context ) : IsVpcPeeredResult => { return { isPeered : __expectBoolean ( output . isPeered ) , } as any ; } ; const deserializeAws_json1_1KeyPair = ( output , context ) : KeyPair => { return { arn : __expectString ( output . arn ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , fingerprint : __expectString ( output . fingerprint ) , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , name : __expectString ( output . name ) , resourceType : __expectString ( output . resourceType ) , supportCode : __expectString ( output . supportCode ) , tags : output . tags !== undefined && output . tags !== null ? deserializeAws_json1_1TagList ( output . tags , context ) : undefined , } as any ; } ; const deserializeAws_json1_1KeyPairList = ( output , context ) : KeyPair [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1KeyPair ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1LightsailDistribution = ( output , context ) : LightsailDistribution => { return { ableToUpdateBundle : __expectBoolean ( output . ableToUpdateBundle ) , alternativeDomainNames : output . alternativeDomainNames !== undefined && output . alternativeDomainNames !== null ? deserializeAws_json1_1StringList ( output . alternativeDomainNames , context ) : undefined , arn : __expectString ( output . arn ) , bundleId : __expectString ( output . bundleId ) , cacheBehaviorSettings : output . cacheBehaviorSettings !== undefined && output . cacheBehaviorSettings !== null ? deserializeAws_json1_1CacheSettings ( output . cacheBehaviorSettings , context ) : undefined , cacheBehaviors : output . cacheBehaviors !== undefined && output . cacheBehaviors !== null ? deserializeAws_json1_1CacheBehaviorList ( output . cacheBehaviors , context ) : undefined , certificateName : __expectString ( output . certificateName ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , defaultCacheBehavior : output . defaultCacheBehavior !== undefined && output . defaultCacheBehavior !== null ? deserializeAws_json1_1CacheBehavior ( output . defaultCacheBehavior , context ) : undefined , domainName : __expectString ( output . domainName ) , ipAddressType : __expectString ( output . ipAddressType ) , isEnabled : __expectBoolean ( output . isEnabled ) , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , name : __expectString ( output . name ) , origin : output . origin !== undefined && output . origin !== null ? deserializeAws_json1_1Origin ( output . origin , context ) : undefined , originPublicDNS : __expectString ( output . originPublicDNS ) , resourceType : __expectString ( output . resourceType ) , status : __expectString ( output . status ) , supportCode : __expectString ( output . supportCode ) , tags : output . tags !== undefined && output . tags !== null ? deserializeAws_json1_1TagList ( output . tags , context ) : undefined , } as any ; } ; const deserializeAws_json1_1LoadBalancer = ( output , context ) : LoadBalancer => { return { arn : __expectString ( output . arn ) , configurationOptions : output . configurationOptions !== undefined && output . configurationOptions !== null ? deserializeAws_json1_1LoadBalancerConfigurationOptions ( output . configurationOptions , context ) : undefined , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , dnsName : __expectString ( output . dnsName ) , healthCheckPath : __expectString ( output . healthCheckPath ) , instanceHealthSummary : output . instanceHealthSummary !== undefined && output . instanceHealthSummary !== null ? deserializeAws_json1_1InstanceHealthSummaryList ( output . instanceHealthSummary , context ) : undefined , instancePort : __expectInt32 ( output . instancePort ) , ipAddressType : __expectString ( output . ipAddressType ) , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , name : __expectString ( output . name ) , protocol : __expectString ( output . protocol ) , publicPorts : output . publicPorts !== undefined && output . publicPorts !== null ? deserializeAws_json1_1PortList ( output . publicPorts , context ) : undefined , resourceType : __expectString ( output . resourceType ) , state : __expectString ( output . state ) , supportCode : __expectString ( output . supportCode ) , tags : output . tags !== undefined && output . tags !== null ? deserializeAws_json1_1TagList ( output . tags , context ) : undefined , tlsCertificateSummaries : output . tlsCertificateSummaries !== undefined && output . tlsCertificateSummaries !== null ? deserializeAws_json1_1LoadBalancerTlsCertificateSummaryList ( output . tlsCertificateSummaries , context ) : undefined , } as any ; } ; const deserializeAws_json1_1LoadBalancerConfigurationOptions = ( 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_1LoadBalancerList = ( output , context ) : LoadBalancer [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1LoadBalancer ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1LoadBalancerTlsCertificate = ( output , context ) : LoadBalancerTlsCertificate => { return { arn : __expectString ( output . arn ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , domainName : __expectString ( output . domainName ) , domainValidationRecords : output . domainValidationRecords !== undefined && output . domainValidationRecords !== null ? deserializeAws_json1_1LoadBalancerTlsCertificateDomainValidationRecordList ( output . domainValidationRecords , context ) : undefined , failureReason : __expectString ( output . failureReason ) , isAttached : __expectBoolean ( output . isAttached ) , issuedAt : output . issuedAt !== undefined && output . issuedAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . issuedAt ) ) ) : undefined , issuer : __expectString ( output . issuer ) , keyAlgorithm : __expectString ( output . keyAlgorithm ) , loadBalancerName : __expectString ( output . loadBalancerName ) , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , name : __expectString ( output . name ) , notAfter : output . notAfter !== undefined && output . notAfter !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . notAfter ) ) ) : undefined , notBefore : output . notBefore !== undefined && output . notBefore !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . notBefore ) ) ) : undefined , renewalSummary : output . renewalSummary !== undefined && output . renewalSummary !== null ? deserializeAws_json1_1LoadBalancerTlsCertificateRenewalSummary ( output . renewalSummary , context ) : undefined , resourceType : __expectString ( output . resourceType ) , revocationReason : __expectString ( output . revocationReason ) , revokedAt : output . revokedAt !== undefined && output . revokedAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . revokedAt ) ) ) : undefined , serial : __expectString ( output . serial ) , signatureAlgorithm : __expectString ( output . signatureAlgorithm ) , status : __expectString ( output . status ) , subject : __expectString ( output . subject ) , subjectAlternativeNames : output . subjectAlternativeNames !== undefined && output . subjectAlternativeNames !== null ? deserializeAws_json1_1StringList ( output . subjectAlternativeNames , context ) : undefined , supportCode : __expectString ( output . supportCode ) , tags : output . tags !== undefined && output . tags !== null ? deserializeAws_json1_1TagList ( output . tags , context ) : undefined , } as any ; } ; const deserializeAws_json1_1LoadBalancerTlsCertificateDomainValidationOption = ( output , context ) : LoadBalancerTlsCertificateDomainValidationOption => { return { domainName : __expectString ( output . domainName ) , validationStatus : __expectString ( output . validationStatus ) , } as any ; } ; const deserializeAws_json1_1LoadBalancerTlsCertificateDomainValidationOptionList = ( output , context ) : LoadBalancerTlsCertificateDomainValidationOption [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1LoadBalancerTlsCertificateDomainValidationOption ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1LoadBalancerTlsCertificateDomainValidationRecord = ( output , context ) : LoadBalancerTlsCertificateDomainValidationRecord => { return { domainName : __expectString ( output . domainName ) , name : __expectString ( output . name ) , type : __expectString ( output . type ) , validationStatus : __expectString ( output . validationStatus ) , value : __expectString ( output . value ) , } as any ; } ; const deserializeAws_json1_1LoadBalancerTlsCertificateDomainValidationRecordList = ( output , context ) : LoadBalancerTlsCertificateDomainValidationRecord [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1LoadBalancerTlsCertificateDomainValidationRecord ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1LoadBalancerTlsCertificateList = ( output , context ) : LoadBalancerTlsCertificate [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1LoadBalancerTlsCertificate ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1LoadBalancerTlsCertificateRenewalSummary = ( output , context ) : LoadBalancerTlsCertificateRenewalSummary => { return { domainValidationOptions : output . domainValidationOptions !== undefined && output . domainValidationOptions !== null ? deserializeAws_json1_1LoadBalancerTlsCertificateDomainValidationOptionList ( output . domainValidationOptions , context ) : undefined , renewalStatus : __expectString ( output . renewalStatus ) , } as any ; } ; const deserializeAws_json1_1LoadBalancerTlsCertificateSummary = ( output , context ) : LoadBalancerTlsCertificateSummary => { return { isAttached : __expectBoolean ( output . isAttached ) , name : __expectString ( output . name ) , } as any ; } ; const deserializeAws_json1_1LoadBalancerTlsCertificateSummaryList = ( output , context ) : LoadBalancerTlsCertificateSummary [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1LoadBalancerTlsCertificateSummary ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1LogEvent = ( output , context ) : LogEvent => { return { createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , message : __expectString ( output . message ) , } as any ; } ; const deserializeAws_json1_1LogEventList = ( output , context ) : LogEvent [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1LogEvent ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1MetricDatapoint = ( output , context ) : MetricDatapoint => { return { average : __limitedParseDouble ( output . average ) , maximum : __limitedParseDouble ( output . maximum ) , minimum : __limitedParseDouble ( output . minimum ) , sampleCount : __limitedParseDouble ( output . sampleCount ) , sum : __limitedParseDouble ( output . sum ) , timestamp : output . timestamp !== undefined && output . timestamp !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . timestamp ) ) ) : undefined , unit : __expectString ( output . unit ) , } as any ; } ; const deserializeAws_json1_1MetricDatapointList = ( output , context ) : MetricDatapoint [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1MetricDatapoint ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1MonitoredResourceInfo = ( output , context ) : MonitoredResourceInfo => { return { arn : __expectString ( output . arn ) , name : __expectString ( output . name ) , resourceType : __expectString ( output . resourceType ) , } as any ; } ; const deserializeAws_json1_1MonthlyTransfer = ( output , context ) : MonthlyTransfer => { return { gbPerMonthAllocated : __expectInt32 ( output . gbPerMonthAllocated ) , } as any ; } ; const deserializeAws_json1_1NotFoundException = ( output , context ) : NotFoundException => { return { code : __expectString ( output . code ) , docs : __expectString ( output . docs ) , message : __expectString ( output . message ) , tip : __expectString ( output . tip ) , } as any ; } ; const deserializeAws_json1_1NotificationTriggerList = ( output , context ) : ( AlarmState | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_json1_1OpenInstancePublicPortsResult = ( output , context ) : OpenInstancePublicPortsResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1Operation = ( output , context ) : Operation => { return { createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , errorCode : __expectString ( output . errorCode ) , errorDetails : __expectString ( output . errorDetails ) , id : __expectString ( output . id ) , isTerminal : __expectBoolean ( output . isTerminal ) , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , operationDetails : __expectString ( output . operationDetails ) , operationType : __expectString ( output . operationType ) , resourceName : __expectString ( output . resourceName ) , resourceType : __expectString ( output . resourceType ) , status : __expectString ( output . status ) , statusChangedAt : output . statusChangedAt !== undefined && output . statusChangedAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . statusChangedAt ) ) ) : undefined , } as any ; } ; const deserializeAws_json1_1OperationFailureException = ( output , context ) : OperationFailureException => { return { code : __expectString ( output . code ) , docs : __expectString ( output . docs ) , message : __expectString ( output . message ) , tip : __expectString ( output . tip ) , } as any ; } ; const deserializeAws_json1_1OperationList = ( output , context ) : Operation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Operation ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1Origin = ( output , context ) : Origin => { return { name : __expectString ( output . name ) , protocolPolicy : __expectString ( output . protocolPolicy ) , regionName : __expectString ( output . regionName ) , resourceType : __expectString ( output . resourceType ) , } as any ; } ; const deserializeAws_json1_1PartnerIdList = ( 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_1PasswordData = ( output , context ) : PasswordData => { return { ciphertext : __expectString ( output . ciphertext ) , keyPairName : __expectString ( output . keyPairName ) , } as any ; } ; const deserializeAws_json1_1PeerVpcResult = ( output , context ) : PeerVpcResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1PendingMaintenanceAction = ( output , context ) : PendingMaintenanceAction => { return { action : __expectString ( output . action ) , currentApplyDate : output . currentApplyDate !== undefined && output . currentApplyDate !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . currentApplyDate ) ) ) : undefined , description : __expectString ( output . description ) , } as any ; } ; const deserializeAws_json1_1PendingMaintenanceActionList = ( output , context ) : PendingMaintenanceAction [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1PendingMaintenanceAction ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1PendingModifiedRelationalDatabaseValues = ( output , context ) : PendingModifiedRelationalDatabaseValues => { return { backupRetentionEnabled : __expectBoolean ( output . backupRetentionEnabled ) , engineVersion : __expectString ( output . engineVersion ) , masterUserPassword : __expectString ( output . masterUserPassword ) , } as any ; } ; const deserializeAws_json1_1PortList = ( output , context ) : number [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectInt32 ( entry ) as any ; } ) ; } ; const deserializeAws_json1_1PortMap = ( output , context ) : { [ key ] : ContainerServiceProtocol | string ; } => { return Object . entries ( output ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : __expectString ( value ) as any , } ; } , { } ) ; } ; const deserializeAws_json1_1PutAlarmResult = ( output , context ) : PutAlarmResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1PutInstancePublicPortsResult = ( output , context ) : PutInstancePublicPortsResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1QueryStringObject = ( output , context ) : QueryStringObject => { return { option : __expectBoolean ( output . option ) , queryStringsAllowList : output . queryStringsAllowList !== undefined && output . queryStringsAllowList !== null ? deserializeAws_json1_1StringList ( output . queryStringsAllowList , context ) : undefined , } as any ; } ; const deserializeAws_json1_1RebootInstanceResult = ( output , context ) : RebootInstanceResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1RebootRelationalDatabaseResult = ( output , context ) : RebootRelationalDatabaseResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1Region = ( output , context ) : Region => { return { availabilityZones : output . availabilityZones !== undefined && output . availabilityZones !== null ? deserializeAws_json1_1AvailabilityZoneList ( output . availabilityZones , context ) : undefined , continentCode : __expectString ( output . continentCode ) , description : __expectString ( output . description ) , displayName : __expectString ( output . displayName ) , name : __expectString ( output . name ) , relationalDatabaseAvailabilityZones : output . relationalDatabaseAvailabilityZones !== undefined && output . relationalDatabaseAvailabilityZones !== null ? deserializeAws_json1_1AvailabilityZoneList ( output . relationalDatabaseAvailabilityZones , context ) : undefined , } as any ; } ; const deserializeAws_json1_1RegionList = ( output , context ) : Region [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Region ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1RegisterContainerImageResult = ( output , context ) : RegisterContainerImageResult => { return { containerImage : output . containerImage !== undefined && output . containerImage !== null ? deserializeAws_json1_1ContainerImage ( output . containerImage , context ) : undefined , } as any ; } ; const deserializeAws_json1_1RelationalDatabase = ( output , context ) : RelationalDatabase => { return { arn : __expectString ( output . arn ) , backupRetentionEnabled : __expectBoolean ( output . backupRetentionEnabled ) , caCertificateIdentifier : __expectString ( output . caCertificateIdentifier ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , engine : __expectString ( output . engine ) , engineVersion : __expectString ( output . engineVersion ) , hardware : output . hardware !== undefined && output . hardware !== null ? deserializeAws_json1_1RelationalDatabaseHardware ( output . hardware , context ) : undefined , latestRestorableTime : output . latestRestorableTime !== undefined && output . latestRestorableTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . latestRestorableTime ) ) ) : undefined , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , masterDatabaseName : __expectString ( output . masterDatabaseName ) , masterEndpoint : output . masterEndpoint !== undefined && output . masterEndpoint !== null ? deserializeAws_json1_1RelationalDatabaseEndpoint ( output . masterEndpoint , context ) : undefined , masterUsername : __expectString ( output . masterUsername ) , name : __expectString ( output . name ) , parameterApplyStatus : __expectString ( output . parameterApplyStatus ) , pendingMaintenanceActions : output . pendingMaintenanceActions !== undefined && output . pendingMaintenanceActions !== null ? deserializeAws_json1_1PendingMaintenanceActionList ( output . pendingMaintenanceActions , context ) : undefined , pendingModifiedValues : output . pendingModifiedValues !== undefined && output . pendingModifiedValues !== null ? deserializeAws_json1_1PendingModifiedRelationalDatabaseValues ( output . pendingModifiedValues , context ) : undefined , preferredBackupWindow : __expectString ( output . preferredBackupWindow ) , preferredMaintenanceWindow : __expectString ( output . preferredMaintenanceWindow ) , publiclyAccessible : __expectBoolean ( output . publiclyAccessible ) , relationalDatabaseBlueprintId : __expectString ( output . relationalDatabaseBlueprintId ) , relationalDatabaseBundleId : __expectString ( output . relationalDatabaseBundleId ) , resourceType : __expectString ( output . resourceType ) , secondaryAvailabilityZone : __expectString ( output . secondaryAvailabilityZone ) , state : __expectString ( output . state ) , supportCode : __expectString ( output . supportCode ) , tags : output . tags !== undefined && output . tags !== null ? deserializeAws_json1_1TagList ( output . tags , context ) : undefined , } as any ; } ; const deserializeAws_json1_1RelationalDatabaseBlueprint = ( output , context ) : RelationalDatabaseBlueprint => { return { blueprintId : __expectString ( output . blueprintId ) , engine : __expectString ( output . engine ) , engineDescription : __expectString ( output . engineDescription ) , engineVersion : __expectString ( output . engineVersion ) , engineVersionDescription : __expectString ( output . engineVersionDescription ) , isEngineDefault : __expectBoolean ( output . isEngineDefault ) , } as any ; } ; const deserializeAws_json1_1RelationalDatabaseBlueprintList = ( output , context ) : RelationalDatabaseBlueprint [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1RelationalDatabaseBlueprint ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1RelationalDatabaseBundle = ( output , context ) : RelationalDatabaseBundle => { return { bundleId : __expectString ( output . bundleId ) , cpuCount : __expectInt32 ( output . cpuCount ) , diskSizeInGb : __expectInt32 ( output . diskSizeInGb ) , isActive : __expectBoolean ( output . isActive ) , isEncrypted : __expectBoolean ( output . isEncrypted ) , name : __expectString ( output . name ) , price : __limitedParseFloat32 ( output . price ) , ramSizeInGb : __limitedParseFloat32 ( output . ramSizeInGb ) , transferPerMonthInGb : __expectInt32 ( output . transferPerMonthInGb ) , } as any ; } ; const deserializeAws_json1_1RelationalDatabaseBundleList = ( output , context ) : RelationalDatabaseBundle [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1RelationalDatabaseBundle ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1RelationalDatabaseEndpoint = ( output , context ) : RelationalDatabaseEndpoint => { return { address : __expectString ( output . address ) , port : __expectInt32 ( output . port ) , } as any ; } ; const deserializeAws_json1_1RelationalDatabaseEvent = ( output , context ) : RelationalDatabaseEvent => { return { createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , eventCategories : output . eventCategories !== undefined && output . eventCategories !== null ? deserializeAws_json1_1StringList ( output . eventCategories , context ) : undefined , message : __expectString ( output . message ) , resource : __expectString ( output . resource ) , } as any ; } ; const deserializeAws_json1_1RelationalDatabaseEventList = ( output , context ) : RelationalDatabaseEvent [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1RelationalDatabaseEvent ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1RelationalDatabaseHardware = ( output , context ) : RelationalDatabaseHardware => { return { cpuCount : __expectInt32 ( output . cpuCount ) , diskSizeInGb : __expectInt32 ( output . diskSizeInGb ) , ramSizeInGb : __limitedParseFloat32 ( output . ramSizeInGb ) , } as any ; } ; const deserializeAws_json1_1RelationalDatabaseList = ( output , context ) : RelationalDatabase [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1RelationalDatabase ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1RelationalDatabaseParameter = ( output , context ) : RelationalDatabaseParameter => { return { allowedValues : __expectString ( output . allowedValues ) , applyMethod : __expectString ( output . applyMethod ) , applyType : __expectString ( output . applyType ) , dataType : __expectString ( output . dataType ) , description : __expectString ( output . description ) , isModifiable : __expectBoolean ( output . isModifiable ) , parameterName : __expectString ( output . parameterName ) , parameterValue : __expectString ( output . parameterValue ) , } as any ; } ; const deserializeAws_json1_1RelationalDatabaseParameterList = ( output , context ) : RelationalDatabaseParameter [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1RelationalDatabaseParameter ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1RelationalDatabaseSnapshot = ( output , context ) : RelationalDatabaseSnapshot => { return { arn : __expectString ( output . arn ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , engine : __expectString ( output . engine ) , engineVersion : __expectString ( output . engineVersion ) , fromRelationalDatabaseArn : __expectString ( output . fromRelationalDatabaseArn ) , fromRelationalDatabaseBlueprintId : __expectString ( output . fromRelationalDatabaseBlueprintId ) , fromRelationalDatabaseBundleId : __expectString ( output . fromRelationalDatabaseBundleId ) , fromRelationalDatabaseName : __expectString ( output . fromRelationalDatabaseName ) , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , name : __expectString ( output . name ) , resourceType : __expectString ( output . resourceType ) , sizeInGb : __expectInt32 ( output . sizeInGb ) , state : __expectString ( output . state ) , supportCode : __expectString ( output . supportCode ) , tags : output . tags !== undefined && output . tags !== null ? deserializeAws_json1_1TagList ( output . tags , context ) : undefined , } as any ; } ; const deserializeAws_json1_1RelationalDatabaseSnapshotList = ( output , context ) : RelationalDatabaseSnapshot [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1RelationalDatabaseSnapshot ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ReleaseStaticIpResult = ( output , context ) : ReleaseStaticIpResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1RenewalSummary = ( output , context ) : RenewalSummary => { return { domainValidationRecords : output . domainValidationRecords !== undefined && output . domainValidationRecords !== null ? deserializeAws_json1_1DomainValidationRecordList ( output . domainValidationRecords , context ) : undefined , renewalStatus : __expectString ( output . renewalStatus ) , renewalStatusReason : __expectString ( output . renewalStatusReason ) , updatedAt : output . updatedAt !== undefined && output . updatedAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . updatedAt ) ) ) : undefined , } as any ; } ; const deserializeAws_json1_1ResetDistributionCacheResult = ( output , context ) : ResetDistributionCacheResult => { return { createTime : output . createTime !== undefined && output . createTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createTime ) ) ) : undefined , operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , status : __expectString ( output . status ) , } as any ; } ; const deserializeAws_json1_1ResourceLocation = ( output , context ) : ResourceLocation => { return { availabilityZone : __expectString ( output . availabilityZone ) , regionName : __expectString ( output . regionName ) , } as any ; } ; const deserializeAws_json1_1ResourceReceivingAccess = ( output , context ) : ResourceReceivingAccess => { return { name : __expectString ( output . name ) , resourceType : __expectString ( output . resourceType ) , } as any ; } ; const deserializeAws_json1_1ResourceRecord = ( output , context ) : ResourceRecord => { return { name : __expectString ( output . name ) , type : __expectString ( output . type ) , value : __expectString ( output . value ) , } as any ; } ; const deserializeAws_json1_1SendContactMethodVerificationResult = ( output , context ) : SendContactMethodVerificationResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ServiceException = ( output , context ) : ServiceException => { return { code : __expectString ( output . code ) , docs : __expectString ( output . docs ) , message : __expectString ( output . message ) , tip : __expectString ( output . tip ) , } as any ; } ; const deserializeAws_json1_1SetIpAddressTypeResult = ( output , context ) : SetIpAddressTypeResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1SetResourceAccessForBucketResult = ( output , context ) : SetResourceAccessForBucketResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1StartInstanceResult = ( output , context ) : StartInstanceResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1StartRelationalDatabaseResult = ( output , context ) : StartRelationalDatabaseResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1StaticIp = ( output , context ) : StaticIp => { return { arn : __expectString ( output . arn ) , attachedTo : __expectString ( output . attachedTo ) , createdAt : output . createdAt !== undefined && output . createdAt !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . createdAt ) ) ) : undefined , ipAddress : __expectString ( output . ipAddress ) , isAttached : __expectBoolean ( output . isAttached ) , location : output . location !== undefined && output . location !== null ? deserializeAws_json1_1ResourceLocation ( output . location , context ) : undefined , name : __expectString ( output . name ) , resourceType : __expectString ( output . resourceType ) , supportCode : __expectString ( output . supportCode ) , } as any ; } ; const deserializeAws_json1_1StaticIpList = ( output , context ) : StaticIp [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1StaticIp ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1StopInstanceResult = ( output , context ) : StopInstanceResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1StopRelationalDatabaseResult = ( output , context ) : StopRelationalDatabaseResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1StringList = ( 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_1SubjectAlternativeNameList = ( 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_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_1TagResourceResult = ( output , context ) : TagResourceResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1TestAlarmResult = ( output , context ) : TestAlarmResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1UnauthenticatedException = ( output , context ) : UnauthenticatedException => { return { code : __expectString ( output . code ) , docs : __expectString ( output . docs ) , message : __expectString ( output . message ) , tip : __expectString ( output . tip ) , } as any ; } ; const deserializeAws_json1_1UnpeerVpcResult = ( output , context ) : UnpeerVpcResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1UntagResourceResult = ( output , context ) : UntagResourceResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1UpdateBucketBundleResult = ( output , context ) : UpdateBucketBundleResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1UpdateBucketResult = ( output , context ) : UpdateBucketResult => { return { bucket : output . bucket !== undefined && output . bucket !== null ? deserializeAws_json1_1Bucket ( output . bucket , context ) : undefined , operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1UpdateContainerServiceResult = ( output , context ) : UpdateContainerServiceResult => { return { containerService : output . containerService !== undefined && output . containerService !== null ? deserializeAws_json1_1ContainerService ( output . containerService , context ) : undefined , } as any ; } ; const deserializeAws_json1_1UpdateDistributionBundleResult = ( output , context ) : UpdateDistributionBundleResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1UpdateDistributionResult = ( output , context ) : UpdateDistributionResult => { return { operation : output . operation !== undefined && output . operation !== null ? deserializeAws_json1_1Operation ( output . operation , context ) : undefined , } as any ; } ; const deserializeAws_json1_1UpdateDomainEntryResult = ( output , context ) : UpdateDomainEntryResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1UpdateLoadBalancerAttributeResult = ( output , context ) : UpdateLoadBalancerAttributeResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1UpdateRelationalDatabaseParametersResult = ( output , context ) : UpdateRelationalDatabaseParametersResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } as any ; } ; const deserializeAws_json1_1UpdateRelationalDatabaseResult = ( output , context ) : UpdateRelationalDatabaseResult => { return { operations : output . operations !== undefined && output . operations !== null ? deserializeAws_json1_1OperationList ( output . operations , context ) : undefined , } 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 "" ; } ;