import { HttpRequest as __HttpRequest , HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http" ; import { expectNonNull as __expectNonNull , expectString as __expectString , extendedEncodeURIComponent as __extendedEncodeURIComponent , getArrayIfSingleItem as __getArrayIfSingleItem , getValueFromTextNode as __getValueFromTextNode , parseBoolean as __parseBoolean , parseRfc3339DateTime as __parseRfc3339DateTime , serializeFloat as __serializeFloat , strictParseFloat as __strictParseFloat , strictParseInt32 as __strictParseInt32 , strictParseLong as __strictParseLong , } from "@aws-sdk/smithy-client" ; import { Endpoint as __Endpoint , HeaderBag as __HeaderBag , MetadataBearer as __MetadataBearer , ResponseMetadata as __ResponseMetadata , SerdeContext as __SerdeContext , SmithyException as __SmithyException , } from "@aws-sdk/types" ; import { decodeHTML } from "entities" ; import { parse as xmlParse } from "fast-xml-parser" ; import { v4 as generateIdempotencyToken } from "uuid" ; import { AcceptReservedInstancesExchangeQuoteCommandInput , AcceptReservedInstancesExchangeQuoteCommandOutput , } from "../commands/AcceptReservedInstancesExchangeQuoteCommand" ; import { AcceptTransitGatewayMulticastDomainAssociationsCommandInput , AcceptTransitGatewayMulticastDomainAssociationsCommandOutput , } from "../commands/AcceptTransitGatewayMulticastDomainAssociationsCommand" ; import { AcceptTransitGatewayPeeringAttachmentCommandInput , AcceptTransitGatewayPeeringAttachmentCommandOutput , } from "../commands/AcceptTransitGatewayPeeringAttachmentCommand" ; import { AcceptTransitGatewayVpcAttachmentCommandInput , AcceptTransitGatewayVpcAttachmentCommandOutput , } from "../commands/AcceptTransitGatewayVpcAttachmentCommand" ; import { AcceptVpcEndpointConnectionsCommandInput , AcceptVpcEndpointConnectionsCommandOutput , } from "../commands/AcceptVpcEndpointConnectionsCommand" ; import { AcceptVpcPeeringConnectionCommandInput , AcceptVpcPeeringConnectionCommandOutput , } from "../commands/AcceptVpcPeeringConnectionCommand" ; import { AdvertiseByoipCidrCommandInput , AdvertiseByoipCidrCommandOutput } from "../commands/AdvertiseByoipCidrCommand" ; import { AllocateAddressCommandInput , AllocateAddressCommandOutput } from "../commands/AllocateAddressCommand" ; import { AllocateHostsCommandInput , AllocateHostsCommandOutput } from "../commands/AllocateHostsCommand" ; import { AllocateIpamPoolCidrCommandInput , AllocateIpamPoolCidrCommandOutput , } from "../commands/AllocateIpamPoolCidrCommand" ; import { ApplySecurityGroupsToClientVpnTargetNetworkCommandInput , ApplySecurityGroupsToClientVpnTargetNetworkCommandOutput , } from "../commands/ApplySecurityGroupsToClientVpnTargetNetworkCommand" ; import { AssignIpv6AddressesCommandInput , AssignIpv6AddressesCommandOutput , } from "../commands/AssignIpv6AddressesCommand" ; import { AssignPrivateIpAddressesCommandInput , AssignPrivateIpAddressesCommandOutput , } from "../commands/AssignPrivateIpAddressesCommand" ; import { AssociateAddressCommandInput , AssociateAddressCommandOutput } from "../commands/AssociateAddressCommand" ; import { AssociateClientVpnTargetNetworkCommandInput , AssociateClientVpnTargetNetworkCommandOutput , } from "../commands/AssociateClientVpnTargetNetworkCommand" ; import { AssociateDhcpOptionsCommandInput , AssociateDhcpOptionsCommandOutput , } from "../commands/AssociateDhcpOptionsCommand" ; import { AssociateEnclaveCertificateIamRoleCommandInput , AssociateEnclaveCertificateIamRoleCommandOutput , } from "../commands/AssociateEnclaveCertificateIamRoleCommand" ; import { AssociateIamInstanceProfileCommandInput , AssociateIamInstanceProfileCommandOutput , } from "../commands/AssociateIamInstanceProfileCommand" ; import { AssociateInstanceEventWindowCommandInput , AssociateInstanceEventWindowCommandOutput , } from "../commands/AssociateInstanceEventWindowCommand" ; import { AssociateRouteTableCommandInput , AssociateRouteTableCommandOutput , } from "../commands/AssociateRouteTableCommand" ; import { AssociateSubnetCidrBlockCommandInput , AssociateSubnetCidrBlockCommandOutput , } from "../commands/AssociateSubnetCidrBlockCommand" ; import { AssociateTransitGatewayMulticastDomainCommandInput , AssociateTransitGatewayMulticastDomainCommandOutput , } from "../commands/AssociateTransitGatewayMulticastDomainCommand" ; import { AssociateTransitGatewayRouteTableCommandInput , AssociateTransitGatewayRouteTableCommandOutput , } from "../commands/AssociateTransitGatewayRouteTableCommand" ; import { AssociateTrunkInterfaceCommandInput , AssociateTrunkInterfaceCommandOutput , } from "../commands/AssociateTrunkInterfaceCommand" ; import { AssociateVpcCidrBlockCommandInput , AssociateVpcCidrBlockCommandOutput , } from "../commands/AssociateVpcCidrBlockCommand" ; import { AttachClassicLinkVpcCommandInput , AttachClassicLinkVpcCommandOutput , } from "../commands/AttachClassicLinkVpcCommand" ; import { AttachInternetGatewayCommandInput , AttachInternetGatewayCommandOutput , } from "../commands/AttachInternetGatewayCommand" ; import { AttachNetworkInterfaceCommandInput , AttachNetworkInterfaceCommandOutput , } from "../commands/AttachNetworkInterfaceCommand" ; import { AttachVolumeCommandInput , AttachVolumeCommandOutput } from "../commands/AttachVolumeCommand" ; import { AttachVpnGatewayCommandInput , AttachVpnGatewayCommandOutput } from "../commands/AttachVpnGatewayCommand" ; import { AuthorizeClientVpnIngressCommandInput , AuthorizeClientVpnIngressCommandOutput , } from "../commands/AuthorizeClientVpnIngressCommand" ; import { AuthorizeSecurityGroupEgressCommandInput , AuthorizeSecurityGroupEgressCommandOutput , } from "../commands/AuthorizeSecurityGroupEgressCommand" ; import { AuthorizeSecurityGroupIngressCommandInput , AuthorizeSecurityGroupIngressCommandOutput , } from "../commands/AuthorizeSecurityGroupIngressCommand" ; import { BundleInstanceCommandInput , BundleInstanceCommandOutput } from "../commands/BundleInstanceCommand" ; import { CancelBundleTaskCommandInput , CancelBundleTaskCommandOutput } from "../commands/CancelBundleTaskCommand" ; import { CancelCapacityReservationCommandInput , CancelCapacityReservationCommandOutput , } from "../commands/CancelCapacityReservationCommand" ; import { CancelCapacityReservationFleetsCommandInput , CancelCapacityReservationFleetsCommandOutput , } from "../commands/CancelCapacityReservationFleetsCommand" ; import { CancelConversionTaskCommandInput , CancelConversionTaskCommandOutput , } from "../commands/CancelConversionTaskCommand" ; import { CancelExportTaskCommandInput , CancelExportTaskCommandOutput } from "../commands/CancelExportTaskCommand" ; import { CancelImportTaskCommandInput , CancelImportTaskCommandOutput } from "../commands/CancelImportTaskCommand" ; import { CancelReservedInstancesListingCommandInput , CancelReservedInstancesListingCommandOutput , } from "../commands/CancelReservedInstancesListingCommand" ; import { CancelSpotFleetRequestsCommandInput , CancelSpotFleetRequestsCommandOutput , } from "../commands/CancelSpotFleetRequestsCommand" ; import { CancelSpotInstanceRequestsCommandInput , CancelSpotInstanceRequestsCommandOutput , } from "../commands/CancelSpotInstanceRequestsCommand" ; import { ConfirmProductInstanceCommandInput , ConfirmProductInstanceCommandOutput , } from "../commands/ConfirmProductInstanceCommand" ; import { CopyFpgaImageCommandInput , CopyFpgaImageCommandOutput } from "../commands/CopyFpgaImageCommand" ; import { CopyImageCommandInput , CopyImageCommandOutput } from "../commands/CopyImageCommand" ; import { CopySnapshotCommandInput , CopySnapshotCommandOutput } from "../commands/CopySnapshotCommand" ; import { CreateCapacityReservationCommandInput , CreateCapacityReservationCommandOutput , } from "../commands/CreateCapacityReservationCommand" ; import { CreateCapacityReservationFleetCommandInput , CreateCapacityReservationFleetCommandOutput , } from "../commands/CreateCapacityReservationFleetCommand" ; import { CreateCarrierGatewayCommandInput , CreateCarrierGatewayCommandOutput , } from "../commands/CreateCarrierGatewayCommand" ; import { CreateClientVpnEndpointCommandInput , CreateClientVpnEndpointCommandOutput , } from "../commands/CreateClientVpnEndpointCommand" ; import { CreateClientVpnRouteCommandInput , CreateClientVpnRouteCommandOutput , } from "../commands/CreateClientVpnRouteCommand" ; import { CreateCustomerGatewayCommandInput , CreateCustomerGatewayCommandOutput , } from "../commands/CreateCustomerGatewayCommand" ; import { CreateDefaultSubnetCommandInput , CreateDefaultSubnetCommandOutput , } from "../commands/CreateDefaultSubnetCommand" ; import { CreateDefaultVpcCommandInput , CreateDefaultVpcCommandOutput } from "../commands/CreateDefaultVpcCommand" ; import { CreateDhcpOptionsCommandInput , CreateDhcpOptionsCommandOutput } from "../commands/CreateDhcpOptionsCommand" ; import { CreateEgressOnlyInternetGatewayCommandInput , CreateEgressOnlyInternetGatewayCommandOutput , } from "../commands/CreateEgressOnlyInternetGatewayCommand" ; import { CreateFleetCommandInput , CreateFleetCommandOutput } from "../commands/CreateFleetCommand" ; import { CreateFlowLogsCommandInput , CreateFlowLogsCommandOutput } from "../commands/CreateFlowLogsCommand" ; import { CreateFpgaImageCommandInput , CreateFpgaImageCommandOutput } from "../commands/CreateFpgaImageCommand" ; import { CreateImageCommandInput , CreateImageCommandOutput } from "../commands/CreateImageCommand" ; import { CreateInstanceEventWindowCommandInput , CreateInstanceEventWindowCommandOutput , } from "../commands/CreateInstanceEventWindowCommand" ; import { CreateInstanceExportTaskCommandInput , CreateInstanceExportTaskCommandOutput , } from "../commands/CreateInstanceExportTaskCommand" ; import { CreateInternetGatewayCommandInput , CreateInternetGatewayCommandOutput , } from "../commands/CreateInternetGatewayCommand" ; import { CreateIpamCommandInput , CreateIpamCommandOutput } from "../commands/CreateIpamCommand" ; import { CreateIpamPoolCommandInput , CreateIpamPoolCommandOutput } from "../commands/CreateIpamPoolCommand" ; import { CreateIpamScopeCommandInput , CreateIpamScopeCommandOutput } from "../commands/CreateIpamScopeCommand" ; import { CreateKeyPairCommandInput , CreateKeyPairCommandOutput } from "../commands/CreateKeyPairCommand" ; import { CreateLaunchTemplateCommandInput , CreateLaunchTemplateCommandOutput , } from "../commands/CreateLaunchTemplateCommand" ; import { CreateLaunchTemplateVersionCommandInput , CreateLaunchTemplateVersionCommandOutput , } from "../commands/CreateLaunchTemplateVersionCommand" ; import { CreateLocalGatewayRouteCommandInput , CreateLocalGatewayRouteCommandOutput , } from "../commands/CreateLocalGatewayRouteCommand" ; import { CreateLocalGatewayRouteTableVpcAssociationCommandInput , CreateLocalGatewayRouteTableVpcAssociationCommandOutput , } from "../commands/CreateLocalGatewayRouteTableVpcAssociationCommand" ; import { CreateManagedPrefixListCommandInput , CreateManagedPrefixListCommandOutput , } from "../commands/CreateManagedPrefixListCommand" ; import { CreateNatGatewayCommandInput , CreateNatGatewayCommandOutput } from "../commands/CreateNatGatewayCommand" ; import { CreateNetworkAclCommandInput , CreateNetworkAclCommandOutput } from "../commands/CreateNetworkAclCommand" ; import { CreateNetworkAclEntryCommandInput , CreateNetworkAclEntryCommandOutput , } from "../commands/CreateNetworkAclEntryCommand" ; import { CreateNetworkInsightsAccessScopeCommandInput , CreateNetworkInsightsAccessScopeCommandOutput , } from "../commands/CreateNetworkInsightsAccessScopeCommand" ; import { CreateNetworkInsightsPathCommandInput , CreateNetworkInsightsPathCommandOutput , } from "../commands/CreateNetworkInsightsPathCommand" ; import { CreateNetworkInterfaceCommandInput , CreateNetworkInterfaceCommandOutput , } from "../commands/CreateNetworkInterfaceCommand" ; import { CreateNetworkInterfacePermissionCommandInput , CreateNetworkInterfacePermissionCommandOutput , } from "../commands/CreateNetworkInterfacePermissionCommand" ; import { CreatePlacementGroupCommandInput , CreatePlacementGroupCommandOutput , } from "../commands/CreatePlacementGroupCommand" ; import { CreatePublicIpv4PoolCommandInput , CreatePublicIpv4PoolCommandOutput , } from "../commands/CreatePublicIpv4PoolCommand" ; import { CreateReplaceRootVolumeTaskCommandInput , CreateReplaceRootVolumeTaskCommandOutput , } from "../commands/CreateReplaceRootVolumeTaskCommand" ; import { CreateReservedInstancesListingCommandInput , CreateReservedInstancesListingCommandOutput , } from "../commands/CreateReservedInstancesListingCommand" ; import { CreateRestoreImageTaskCommandInput , CreateRestoreImageTaskCommandOutput , } from "../commands/CreateRestoreImageTaskCommand" ; import { CreateRouteCommandInput , CreateRouteCommandOutput } from "../commands/CreateRouteCommand" ; import { CreateRouteTableCommandInput , CreateRouteTableCommandOutput } from "../commands/CreateRouteTableCommand" ; import { CreateSecurityGroupCommandInput , CreateSecurityGroupCommandOutput , } from "../commands/CreateSecurityGroupCommand" ; import { CreateSnapshotCommandInput , CreateSnapshotCommandOutput } from "../commands/CreateSnapshotCommand" ; import { CreateSnapshotsCommandInput , CreateSnapshotsCommandOutput } from "../commands/CreateSnapshotsCommand" ; import { CreateSpotDatafeedSubscriptionCommandInput , CreateSpotDatafeedSubscriptionCommandOutput , } from "../commands/CreateSpotDatafeedSubscriptionCommand" ; import { CreateStoreImageTaskCommandInput , CreateStoreImageTaskCommandOutput , } from "../commands/CreateStoreImageTaskCommand" ; import { CreateSubnetCidrReservationCommandInput , CreateSubnetCidrReservationCommandOutput , } from "../commands/CreateSubnetCidrReservationCommand" ; import { CreateSubnetCommandInput , CreateSubnetCommandOutput } from "../commands/CreateSubnetCommand" ; import { CreateTagsCommandInput , CreateTagsCommandOutput } from "../commands/CreateTagsCommand" ; import { CreateTrafficMirrorFilterCommandInput , CreateTrafficMirrorFilterCommandOutput , } from "../commands/CreateTrafficMirrorFilterCommand" ; import { CreateTrafficMirrorFilterRuleCommandInput , CreateTrafficMirrorFilterRuleCommandOutput , } from "../commands/CreateTrafficMirrorFilterRuleCommand" ; import { CreateTrafficMirrorSessionCommandInput , CreateTrafficMirrorSessionCommandOutput , } from "../commands/CreateTrafficMirrorSessionCommand" ; import { CreateTrafficMirrorTargetCommandInput , CreateTrafficMirrorTargetCommandOutput , } from "../commands/CreateTrafficMirrorTargetCommand" ; import { CreateTransitGatewayCommandInput , CreateTransitGatewayCommandOutput , } from "../commands/CreateTransitGatewayCommand" ; import { CreateTransitGatewayConnectCommandInput , CreateTransitGatewayConnectCommandOutput , } from "../commands/CreateTransitGatewayConnectCommand" ; import { CreateTransitGatewayConnectPeerCommandInput , CreateTransitGatewayConnectPeerCommandOutput , } from "../commands/CreateTransitGatewayConnectPeerCommand" ; import { CreateTransitGatewayMulticastDomainCommandInput , CreateTransitGatewayMulticastDomainCommandOutput , } from "../commands/CreateTransitGatewayMulticastDomainCommand" ; import { CreateTransitGatewayPeeringAttachmentCommandInput , CreateTransitGatewayPeeringAttachmentCommandOutput , } from "../commands/CreateTransitGatewayPeeringAttachmentCommand" ; import { CreateTransitGatewayPrefixListReferenceCommandInput , CreateTransitGatewayPrefixListReferenceCommandOutput , } from "../commands/CreateTransitGatewayPrefixListReferenceCommand" ; import { CreateTransitGatewayRouteCommandInput , CreateTransitGatewayRouteCommandOutput , } from "../commands/CreateTransitGatewayRouteCommand" ; import { CreateTransitGatewayRouteTableCommandInput , CreateTransitGatewayRouteTableCommandOutput , } from "../commands/CreateTransitGatewayRouteTableCommand" ; import { CreateTransitGatewayVpcAttachmentCommandInput , CreateTransitGatewayVpcAttachmentCommandOutput , } from "../commands/CreateTransitGatewayVpcAttachmentCommand" ; import { CreateVolumeCommandInput , CreateVolumeCommandOutput } from "../commands/CreateVolumeCommand" ; import { CreateVpcCommandInput , CreateVpcCommandOutput } from "../commands/CreateVpcCommand" ; import { CreateVpcEndpointCommandInput , CreateVpcEndpointCommandOutput } from "../commands/CreateVpcEndpointCommand" ; import { CreateVpcEndpointConnectionNotificationCommandInput , CreateVpcEndpointConnectionNotificationCommandOutput , } from "../commands/CreateVpcEndpointConnectionNotificationCommand" ; import { CreateVpcEndpointServiceConfigurationCommandInput , CreateVpcEndpointServiceConfigurationCommandOutput , } from "../commands/CreateVpcEndpointServiceConfigurationCommand" ; import { CreateVpcPeeringConnectionCommandInput , CreateVpcPeeringConnectionCommandOutput , } from "../commands/CreateVpcPeeringConnectionCommand" ; import { CreateVpnConnectionCommandInput , CreateVpnConnectionCommandOutput , } from "../commands/CreateVpnConnectionCommand" ; import { CreateVpnConnectionRouteCommandInput , CreateVpnConnectionRouteCommandOutput , } from "../commands/CreateVpnConnectionRouteCommand" ; import { CreateVpnGatewayCommandInput , CreateVpnGatewayCommandOutput } from "../commands/CreateVpnGatewayCommand" ; import { DeleteCarrierGatewayCommandInput , DeleteCarrierGatewayCommandOutput , } from "../commands/DeleteCarrierGatewayCommand" ; import { DeleteClientVpnEndpointCommandInput , DeleteClientVpnEndpointCommandOutput , } from "../commands/DeleteClientVpnEndpointCommand" ; import { DeleteClientVpnRouteCommandInput , DeleteClientVpnRouteCommandOutput , } from "../commands/DeleteClientVpnRouteCommand" ; import { DeleteCustomerGatewayCommandInput , DeleteCustomerGatewayCommandOutput , } from "../commands/DeleteCustomerGatewayCommand" ; import { DeleteDhcpOptionsCommandInput , DeleteDhcpOptionsCommandOutput } from "../commands/DeleteDhcpOptionsCommand" ; import { DeleteEgressOnlyInternetGatewayCommandInput , DeleteEgressOnlyInternetGatewayCommandOutput , } from "../commands/DeleteEgressOnlyInternetGatewayCommand" ; import { DeleteFleetsCommandInput , DeleteFleetsCommandOutput } from "../commands/DeleteFleetsCommand" ; import { DeleteFlowLogsCommandInput , DeleteFlowLogsCommandOutput } from "../commands/DeleteFlowLogsCommand" ; import { DeleteFpgaImageCommandInput , DeleteFpgaImageCommandOutput } from "../commands/DeleteFpgaImageCommand" ; import { DeleteInstanceEventWindowCommandInput , DeleteInstanceEventWindowCommandOutput , } from "../commands/DeleteInstanceEventWindowCommand" ; import { DeleteInternetGatewayCommandInput , DeleteInternetGatewayCommandOutput , } from "../commands/DeleteInternetGatewayCommand" ; import { DeleteIpamCommandInput , DeleteIpamCommandOutput } from "../commands/DeleteIpamCommand" ; import { DeleteIpamPoolCommandInput , DeleteIpamPoolCommandOutput } from "../commands/DeleteIpamPoolCommand" ; import { DeleteIpamScopeCommandInput , DeleteIpamScopeCommandOutput } from "../commands/DeleteIpamScopeCommand" ; import { DeleteKeyPairCommandInput , DeleteKeyPairCommandOutput } from "../commands/DeleteKeyPairCommand" ; import { DeleteLaunchTemplateCommandInput , DeleteLaunchTemplateCommandOutput , } from "../commands/DeleteLaunchTemplateCommand" ; import { DeleteLaunchTemplateVersionsCommandInput , DeleteLaunchTemplateVersionsCommandOutput , } from "../commands/DeleteLaunchTemplateVersionsCommand" ; import { DeleteLocalGatewayRouteCommandInput , DeleteLocalGatewayRouteCommandOutput , } from "../commands/DeleteLocalGatewayRouteCommand" ; import { DeleteLocalGatewayRouteTableVpcAssociationCommandInput , DeleteLocalGatewayRouteTableVpcAssociationCommandOutput , } from "../commands/DeleteLocalGatewayRouteTableVpcAssociationCommand" ; import { DeleteManagedPrefixListCommandInput , DeleteManagedPrefixListCommandOutput , } from "../commands/DeleteManagedPrefixListCommand" ; import { DeleteNatGatewayCommandInput , DeleteNatGatewayCommandOutput } from "../commands/DeleteNatGatewayCommand" ; import { DeleteNetworkAclCommandInput , DeleteNetworkAclCommandOutput } from "../commands/DeleteNetworkAclCommand" ; import { DeleteNetworkAclEntryCommandInput , DeleteNetworkAclEntryCommandOutput , } from "../commands/DeleteNetworkAclEntryCommand" ; import { DeleteNetworkInsightsAccessScopeAnalysisCommandInput , DeleteNetworkInsightsAccessScopeAnalysisCommandOutput , } from "../commands/DeleteNetworkInsightsAccessScopeAnalysisCommand" ; import { DeleteNetworkInsightsAccessScopeCommandInput , DeleteNetworkInsightsAccessScopeCommandOutput , } from "../commands/DeleteNetworkInsightsAccessScopeCommand" ; import { DeleteNetworkInsightsAnalysisCommandInput , DeleteNetworkInsightsAnalysisCommandOutput , } from "../commands/DeleteNetworkInsightsAnalysisCommand" ; import { DeleteNetworkInsightsPathCommandInput , DeleteNetworkInsightsPathCommandOutput , } from "../commands/DeleteNetworkInsightsPathCommand" ; import { DeleteNetworkInterfaceCommandInput , DeleteNetworkInterfaceCommandOutput , } from "../commands/DeleteNetworkInterfaceCommand" ; import { DeleteNetworkInterfacePermissionCommandInput , DeleteNetworkInterfacePermissionCommandOutput , } from "../commands/DeleteNetworkInterfacePermissionCommand" ; import { DeletePlacementGroupCommandInput , DeletePlacementGroupCommandOutput , } from "../commands/DeletePlacementGroupCommand" ; import { DeletePublicIpv4PoolCommandInput , DeletePublicIpv4PoolCommandOutput , } from "../commands/DeletePublicIpv4PoolCommand" ; import { DeleteQueuedReservedInstancesCommandInput , DeleteQueuedReservedInstancesCommandOutput , } from "../commands/DeleteQueuedReservedInstancesCommand" ; import { DeleteRouteCommandInput , DeleteRouteCommandOutput } from "../commands/DeleteRouteCommand" ; import { DeleteRouteTableCommandInput , DeleteRouteTableCommandOutput } from "../commands/DeleteRouteTableCommand" ; import { DeleteSecurityGroupCommandInput , DeleteSecurityGroupCommandOutput , } from "../commands/DeleteSecurityGroupCommand" ; import { DeleteSnapshotCommandInput , DeleteSnapshotCommandOutput } from "../commands/DeleteSnapshotCommand" ; import { DeleteSpotDatafeedSubscriptionCommandInput , DeleteSpotDatafeedSubscriptionCommandOutput , } from "../commands/DeleteSpotDatafeedSubscriptionCommand" ; import { DeleteSubnetCidrReservationCommandInput , DeleteSubnetCidrReservationCommandOutput , } from "../commands/DeleteSubnetCidrReservationCommand" ; import { DeleteSubnetCommandInput , DeleteSubnetCommandOutput } from "../commands/DeleteSubnetCommand" ; import { DeleteTagsCommandInput , DeleteTagsCommandOutput } from "../commands/DeleteTagsCommand" ; import { DeleteTrafficMirrorFilterCommandInput , DeleteTrafficMirrorFilterCommandOutput , } from "../commands/DeleteTrafficMirrorFilterCommand" ; import { DeleteTrafficMirrorFilterRuleCommandInput , DeleteTrafficMirrorFilterRuleCommandOutput , } from "../commands/DeleteTrafficMirrorFilterRuleCommand" ; import { DeleteTrafficMirrorSessionCommandInput , DeleteTrafficMirrorSessionCommandOutput , } from "../commands/DeleteTrafficMirrorSessionCommand" ; import { DeleteTrafficMirrorTargetCommandInput , DeleteTrafficMirrorTargetCommandOutput , } from "../commands/DeleteTrafficMirrorTargetCommand" ; import { DeleteTransitGatewayCommandInput , DeleteTransitGatewayCommandOutput , } from "../commands/DeleteTransitGatewayCommand" ; import { DeleteTransitGatewayConnectCommandInput , DeleteTransitGatewayConnectCommandOutput , } from "../commands/DeleteTransitGatewayConnectCommand" ; import { DeleteTransitGatewayConnectPeerCommandInput , DeleteTransitGatewayConnectPeerCommandOutput , } from "../commands/DeleteTransitGatewayConnectPeerCommand" ; import { DeleteTransitGatewayMulticastDomainCommandInput , DeleteTransitGatewayMulticastDomainCommandOutput , } from "../commands/DeleteTransitGatewayMulticastDomainCommand" ; import { DeleteTransitGatewayPeeringAttachmentCommandInput , DeleteTransitGatewayPeeringAttachmentCommandOutput , } from "../commands/DeleteTransitGatewayPeeringAttachmentCommand" ; import { DeleteTransitGatewayPrefixListReferenceCommandInput , DeleteTransitGatewayPrefixListReferenceCommandOutput , } from "../commands/DeleteTransitGatewayPrefixListReferenceCommand" ; import { DeleteTransitGatewayRouteCommandInput , DeleteTransitGatewayRouteCommandOutput , } from "../commands/DeleteTransitGatewayRouteCommand" ; import { DeleteTransitGatewayRouteTableCommandInput , DeleteTransitGatewayRouteTableCommandOutput , } from "../commands/DeleteTransitGatewayRouteTableCommand" ; import { DeleteTransitGatewayVpcAttachmentCommandInput , DeleteTransitGatewayVpcAttachmentCommandOutput , } from "../commands/DeleteTransitGatewayVpcAttachmentCommand" ; import { DeleteVolumeCommandInput , DeleteVolumeCommandOutput } from "../commands/DeleteVolumeCommand" ; import { DeleteVpcCommandInput , DeleteVpcCommandOutput } from "../commands/DeleteVpcCommand" ; import { DeleteVpcEndpointConnectionNotificationsCommandInput , DeleteVpcEndpointConnectionNotificationsCommandOutput , } from "../commands/DeleteVpcEndpointConnectionNotificationsCommand" ; import { DeleteVpcEndpointsCommandInput , DeleteVpcEndpointsCommandOutput } from "../commands/DeleteVpcEndpointsCommand" ; import { DeleteVpcEndpointServiceConfigurationsCommandInput , DeleteVpcEndpointServiceConfigurationsCommandOutput , } from "../commands/DeleteVpcEndpointServiceConfigurationsCommand" ; import { DeleteVpcPeeringConnectionCommandInput , DeleteVpcPeeringConnectionCommandOutput , } from "../commands/DeleteVpcPeeringConnectionCommand" ; import { DeleteVpnConnectionCommandInput , DeleteVpnConnectionCommandOutput , } from "../commands/DeleteVpnConnectionCommand" ; import { DeleteVpnConnectionRouteCommandInput , DeleteVpnConnectionRouteCommandOutput , } from "../commands/DeleteVpnConnectionRouteCommand" ; import { DeleteVpnGatewayCommandInput , DeleteVpnGatewayCommandOutput } from "../commands/DeleteVpnGatewayCommand" ; import { DeprovisionByoipCidrCommandInput , DeprovisionByoipCidrCommandOutput , } from "../commands/DeprovisionByoipCidrCommand" ; import { DeprovisionIpamPoolCidrCommandInput , DeprovisionIpamPoolCidrCommandOutput , } from "../commands/DeprovisionIpamPoolCidrCommand" ; import { DeprovisionPublicIpv4PoolCidrCommandInput , DeprovisionPublicIpv4PoolCidrCommandOutput , } from "../commands/DeprovisionPublicIpv4PoolCidrCommand" ; import { DeregisterImageCommandInput , DeregisterImageCommandOutput } from "../commands/DeregisterImageCommand" ; import { DeregisterInstanceEventNotificationAttributesCommandInput , DeregisterInstanceEventNotificationAttributesCommandOutput , } from "../commands/DeregisterInstanceEventNotificationAttributesCommand" ; import { DeregisterTransitGatewayMulticastGroupMembersCommandInput , DeregisterTransitGatewayMulticastGroupMembersCommandOutput , } from "../commands/DeregisterTransitGatewayMulticastGroupMembersCommand" ; import { DeregisterTransitGatewayMulticastGroupSourcesCommandInput , DeregisterTransitGatewayMulticastGroupSourcesCommandOutput , } from "../commands/DeregisterTransitGatewayMulticastGroupSourcesCommand" ; import { DescribeAccountAttributesCommandInput , DescribeAccountAttributesCommandOutput , } from "../commands/DescribeAccountAttributesCommand" ; import { DescribeAddressesAttributeCommandInput , DescribeAddressesAttributeCommandOutput , } from "../commands/DescribeAddressesAttributeCommand" ; import { DescribeAddressesCommandInput , DescribeAddressesCommandOutput } from "../commands/DescribeAddressesCommand" ; import { DescribeAggregateIdFormatCommandInput , DescribeAggregateIdFormatCommandOutput , } from "../commands/DescribeAggregateIdFormatCommand" ; import { DescribeAvailabilityZonesCommandInput , DescribeAvailabilityZonesCommandOutput , } from "../commands/DescribeAvailabilityZonesCommand" ; import { DescribeBundleTasksCommandInput , DescribeBundleTasksCommandOutput , } from "../commands/DescribeBundleTasksCommand" ; import { DescribeByoipCidrsCommandInput , DescribeByoipCidrsCommandOutput } from "../commands/DescribeByoipCidrsCommand" ; import { DescribeCapacityReservationFleetsCommandInput , DescribeCapacityReservationFleetsCommandOutput , } from "../commands/DescribeCapacityReservationFleetsCommand" ; import { DescribeCapacityReservationsCommandInput , DescribeCapacityReservationsCommandOutput , } from "../commands/DescribeCapacityReservationsCommand" ; import { DescribeCarrierGatewaysCommandInput , DescribeCarrierGatewaysCommandOutput , } from "../commands/DescribeCarrierGatewaysCommand" ; import { DescribeClassicLinkInstancesCommandInput , DescribeClassicLinkInstancesCommandOutput , } from "../commands/DescribeClassicLinkInstancesCommand" ; import { DescribeClientVpnAuthorizationRulesCommandInput , DescribeClientVpnAuthorizationRulesCommandOutput , } from "../commands/DescribeClientVpnAuthorizationRulesCommand" ; import { DescribeClientVpnConnectionsCommandInput , DescribeClientVpnConnectionsCommandOutput , } from "../commands/DescribeClientVpnConnectionsCommand" ; import { DescribeClientVpnEndpointsCommandInput , DescribeClientVpnEndpointsCommandOutput , } from "../commands/DescribeClientVpnEndpointsCommand" ; import { DescribeClientVpnRoutesCommandInput , DescribeClientVpnRoutesCommandOutput , } from "../commands/DescribeClientVpnRoutesCommand" ; import { DescribeClientVpnTargetNetworksCommandInput , DescribeClientVpnTargetNetworksCommandOutput , } from "../commands/DescribeClientVpnTargetNetworksCommand" ; import { DescribeCoipPoolsCommandInput , DescribeCoipPoolsCommandOutput } from "../commands/DescribeCoipPoolsCommand" ; import { DescribeConversionTasksCommandInput , DescribeConversionTasksCommandOutput , } from "../commands/DescribeConversionTasksCommand" ; import { DescribeCustomerGatewaysCommandInput , DescribeCustomerGatewaysCommandOutput , } from "../commands/DescribeCustomerGatewaysCommand" ; import { DescribeDhcpOptionsCommandInput , DescribeDhcpOptionsCommandOutput , } from "../commands/DescribeDhcpOptionsCommand" ; import { DescribeEgressOnlyInternetGatewaysCommandInput , DescribeEgressOnlyInternetGatewaysCommandOutput , } from "../commands/DescribeEgressOnlyInternetGatewaysCommand" ; import { DescribeElasticGpusCommandInput , DescribeElasticGpusCommandOutput , } from "../commands/DescribeElasticGpusCommand" ; import { DescribeExportImageTasksCommandInput , DescribeExportImageTasksCommandOutput , } from "../commands/DescribeExportImageTasksCommand" ; import { DescribeExportTasksCommandInput , DescribeExportTasksCommandOutput , } from "../commands/DescribeExportTasksCommand" ; import { DescribeFastSnapshotRestoresCommandInput , DescribeFastSnapshotRestoresCommandOutput , } from "../commands/DescribeFastSnapshotRestoresCommand" ; import { DescribeFleetHistoryCommandInput , DescribeFleetHistoryCommandOutput , } from "../commands/DescribeFleetHistoryCommand" ; import { DescribeFleetInstancesCommandInput , DescribeFleetInstancesCommandOutput , } from "../commands/DescribeFleetInstancesCommand" ; import { DescribeFleetsCommandInput , DescribeFleetsCommandOutput } from "../commands/DescribeFleetsCommand" ; import { DescribeFlowLogsCommandInput , DescribeFlowLogsCommandOutput } from "../commands/DescribeFlowLogsCommand" ; import { DescribeFpgaImageAttributeCommandInput , DescribeFpgaImageAttributeCommandOutput , } from "../commands/DescribeFpgaImageAttributeCommand" ; import { DescribeFpgaImagesCommandInput , DescribeFpgaImagesCommandOutput } from "../commands/DescribeFpgaImagesCommand" ; import { DescribeHostReservationOfferingsCommandInput , DescribeHostReservationOfferingsCommandOutput , } from "../commands/DescribeHostReservationOfferingsCommand" ; import { DescribeHostReservationsCommandInput , DescribeHostReservationsCommandOutput , } from "../commands/DescribeHostReservationsCommand" ; import { DescribeHostsCommandInput , DescribeHostsCommandOutput } from "../commands/DescribeHostsCommand" ; import { DescribeIamInstanceProfileAssociationsCommandInput , DescribeIamInstanceProfileAssociationsCommandOutput , } from "../commands/DescribeIamInstanceProfileAssociationsCommand" ; import { DescribeIdentityIdFormatCommandInput , DescribeIdentityIdFormatCommandOutput , } from "../commands/DescribeIdentityIdFormatCommand" ; import { DescribeIdFormatCommandInput , DescribeIdFormatCommandOutput } from "../commands/DescribeIdFormatCommand" ; import { DescribeImageAttributeCommandInput , DescribeImageAttributeCommandOutput , } from "../commands/DescribeImageAttributeCommand" ; import { DescribeImagesCommandInput , DescribeImagesCommandOutput } from "../commands/DescribeImagesCommand" ; import { DescribeImportImageTasksCommandInput , DescribeImportImageTasksCommandOutput , } from "../commands/DescribeImportImageTasksCommand" ; import { DescribeImportSnapshotTasksCommandInput , DescribeImportSnapshotTasksCommandOutput , } from "../commands/DescribeImportSnapshotTasksCommand" ; import { DescribeInstanceAttributeCommandInput , DescribeInstanceAttributeCommandOutput , } from "../commands/DescribeInstanceAttributeCommand" ; import { DescribeInstanceCreditSpecificationsCommandInput , DescribeInstanceCreditSpecificationsCommandOutput , } from "../commands/DescribeInstanceCreditSpecificationsCommand" ; import { DescribeInstanceEventNotificationAttributesCommandInput , DescribeInstanceEventNotificationAttributesCommandOutput , } from "../commands/DescribeInstanceEventNotificationAttributesCommand" ; import { DescribeInstanceEventWindowsCommandInput , DescribeInstanceEventWindowsCommandOutput , } from "../commands/DescribeInstanceEventWindowsCommand" ; import { DescribeInstancesCommandInput , DescribeInstancesCommandOutput } from "../commands/DescribeInstancesCommand" ; import { DescribeInstanceStatusCommandInput , DescribeInstanceStatusCommandOutput , } from "../commands/DescribeInstanceStatusCommand" ; import { DescribeInstanceTypeOfferingsCommandInput , DescribeInstanceTypeOfferingsCommandOutput , } from "../commands/DescribeInstanceTypeOfferingsCommand" ; import { DescribeInstanceTypesCommandInput , DescribeInstanceTypesCommandOutput , } from "../commands/DescribeInstanceTypesCommand" ; import { DescribeInternetGatewaysCommandInput , DescribeInternetGatewaysCommandOutput , } from "../commands/DescribeInternetGatewaysCommand" ; import { DescribeIpamPoolsCommandInput , DescribeIpamPoolsCommandOutput } from "../commands/DescribeIpamPoolsCommand" ; import { DescribeIpamsCommandInput , DescribeIpamsCommandOutput } from "../commands/DescribeIpamsCommand" ; import { DescribeIpamScopesCommandInput , DescribeIpamScopesCommandOutput } from "../commands/DescribeIpamScopesCommand" ; import { DescribeIpv6PoolsCommandInput , DescribeIpv6PoolsCommandOutput } from "../commands/DescribeIpv6PoolsCommand" ; import { DescribeKeyPairsCommandInput , DescribeKeyPairsCommandOutput } from "../commands/DescribeKeyPairsCommand" ; import { DescribeLaunchTemplatesCommandInput , DescribeLaunchTemplatesCommandOutput , } from "../commands/DescribeLaunchTemplatesCommand" ; import { DescribeLaunchTemplateVersionsCommandInput , DescribeLaunchTemplateVersionsCommandOutput , } from "../commands/DescribeLaunchTemplateVersionsCommand" ; import { DescribeLocalGatewayRouteTablesCommandInput , DescribeLocalGatewayRouteTablesCommandOutput , } from "../commands/DescribeLocalGatewayRouteTablesCommand" ; import { DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsCommandInput , DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsCommandOutput , } from "../commands/DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsCommand" ; import { DescribeLocalGatewayRouteTableVpcAssociationsCommandInput , DescribeLocalGatewayRouteTableVpcAssociationsCommandOutput , } from "../commands/DescribeLocalGatewayRouteTableVpcAssociationsCommand" ; import { DescribeLocalGatewaysCommandInput , DescribeLocalGatewaysCommandOutput , } from "../commands/DescribeLocalGatewaysCommand" ; import { DescribeLocalGatewayVirtualInterfaceGroupsCommandInput , DescribeLocalGatewayVirtualInterfaceGroupsCommandOutput , } from "../commands/DescribeLocalGatewayVirtualInterfaceGroupsCommand" ; import { DescribeLocalGatewayVirtualInterfacesCommandInput , DescribeLocalGatewayVirtualInterfacesCommandOutput , } from "../commands/DescribeLocalGatewayVirtualInterfacesCommand" ; import { DescribeManagedPrefixListsCommandInput , DescribeManagedPrefixListsCommandOutput , } from "../commands/DescribeManagedPrefixListsCommand" ; import { DescribeMovingAddressesCommandInput , DescribeMovingAddressesCommandOutput , } from "../commands/DescribeMovingAddressesCommand" ; import { DescribeNatGatewaysCommandInput , DescribeNatGatewaysCommandOutput , } from "../commands/DescribeNatGatewaysCommand" ; import { DescribeNetworkAclsCommandInput , DescribeNetworkAclsCommandOutput , } from "../commands/DescribeNetworkAclsCommand" ; import { DescribeNetworkInsightsAccessScopeAnalysesCommandInput , DescribeNetworkInsightsAccessScopeAnalysesCommandOutput , } from "../commands/DescribeNetworkInsightsAccessScopeAnalysesCommand" ; import { DescribeNetworkInsightsAccessScopesCommandInput , DescribeNetworkInsightsAccessScopesCommandOutput , } from "../commands/DescribeNetworkInsightsAccessScopesCommand" ; import { DescribeNetworkInsightsAnalysesCommandInput , DescribeNetworkInsightsAnalysesCommandOutput , } from "../commands/DescribeNetworkInsightsAnalysesCommand" ; import { DescribeNetworkInsightsPathsCommandInput , DescribeNetworkInsightsPathsCommandOutput , } from "../commands/DescribeNetworkInsightsPathsCommand" ; import { DescribeNetworkInterfaceAttributeCommandInput , DescribeNetworkInterfaceAttributeCommandOutput , } from "../commands/DescribeNetworkInterfaceAttributeCommand" ; import { DescribeNetworkInterfacePermissionsCommandInput , DescribeNetworkInterfacePermissionsCommandOutput , } from "../commands/DescribeNetworkInterfacePermissionsCommand" ; import { DescribeNetworkInterfacesCommandInput , DescribeNetworkInterfacesCommandOutput , } from "../commands/DescribeNetworkInterfacesCommand" ; import { DescribePlacementGroupsCommandInput , DescribePlacementGroupsCommandOutput , } from "../commands/DescribePlacementGroupsCommand" ; import { DescribePrefixListsCommandInput , DescribePrefixListsCommandOutput , } from "../commands/DescribePrefixListsCommand" ; import { DescribePrincipalIdFormatCommandInput , DescribePrincipalIdFormatCommandOutput , } from "../commands/DescribePrincipalIdFormatCommand" ; import { DescribePublicIpv4PoolsCommandInput , DescribePublicIpv4PoolsCommandOutput , } from "../commands/DescribePublicIpv4PoolsCommand" ; import { DescribeRegionsCommandInput , DescribeRegionsCommandOutput } from "../commands/DescribeRegionsCommand" ; import { DescribeReplaceRootVolumeTasksCommandInput , DescribeReplaceRootVolumeTasksCommandOutput , } from "../commands/DescribeReplaceRootVolumeTasksCommand" ; import { DescribeReservedInstancesCommandInput , DescribeReservedInstancesCommandOutput , } from "../commands/DescribeReservedInstancesCommand" ; import { DescribeReservedInstancesListingsCommandInput , DescribeReservedInstancesListingsCommandOutput , } from "../commands/DescribeReservedInstancesListingsCommand" ; import { DescribeReservedInstancesModificationsCommandInput , DescribeReservedInstancesModificationsCommandOutput , } from "../commands/DescribeReservedInstancesModificationsCommand" ; import { DescribeReservedInstancesOfferingsCommandInput , DescribeReservedInstancesOfferingsCommandOutput , } from "../commands/DescribeReservedInstancesOfferingsCommand" ; import { DescribeRouteTablesCommandInput , DescribeRouteTablesCommandOutput , } from "../commands/DescribeRouteTablesCommand" ; import { DescribeScheduledInstanceAvailabilityCommandInput , DescribeScheduledInstanceAvailabilityCommandOutput , } from "../commands/DescribeScheduledInstanceAvailabilityCommand" ; import { DescribeScheduledInstancesCommandInput , DescribeScheduledInstancesCommandOutput , } from "../commands/DescribeScheduledInstancesCommand" ; import { DescribeSecurityGroupReferencesCommandInput , DescribeSecurityGroupReferencesCommandOutput , } from "../commands/DescribeSecurityGroupReferencesCommand" ; import { DescribeSecurityGroupRulesCommandInput , DescribeSecurityGroupRulesCommandOutput , } from "../commands/DescribeSecurityGroupRulesCommand" ; import { DescribeSecurityGroupsCommandInput , DescribeSecurityGroupsCommandOutput , } from "../commands/DescribeSecurityGroupsCommand" ; import { DescribeSnapshotAttributeCommandInput , DescribeSnapshotAttributeCommandOutput , } from "../commands/DescribeSnapshotAttributeCommand" ; import { DescribeSnapshotsCommandInput , DescribeSnapshotsCommandOutput } from "../commands/DescribeSnapshotsCommand" ; import { DescribeSnapshotTierStatusCommandInput , DescribeSnapshotTierStatusCommandOutput , } from "../commands/DescribeSnapshotTierStatusCommand" ; import { DescribeSpotDatafeedSubscriptionCommandInput , DescribeSpotDatafeedSubscriptionCommandOutput , } from "../commands/DescribeSpotDatafeedSubscriptionCommand" ; import { DescribeSpotFleetInstancesCommandInput , DescribeSpotFleetInstancesCommandOutput , } from "../commands/DescribeSpotFleetInstancesCommand" ; import { DescribeSpotFleetRequestHistoryCommandInput , DescribeSpotFleetRequestHistoryCommandOutput , } from "../commands/DescribeSpotFleetRequestHistoryCommand" ; import { DescribeSpotFleetRequestsCommandInput , DescribeSpotFleetRequestsCommandOutput , } from "../commands/DescribeSpotFleetRequestsCommand" ; import { DescribeSpotInstanceRequestsCommandInput , DescribeSpotInstanceRequestsCommandOutput , } from "../commands/DescribeSpotInstanceRequestsCommand" ; import { DescribeSpotPriceHistoryCommandInput , DescribeSpotPriceHistoryCommandOutput , } from "../commands/DescribeSpotPriceHistoryCommand" ; import { DescribeStaleSecurityGroupsCommandInput , DescribeStaleSecurityGroupsCommandOutput , } from "../commands/DescribeStaleSecurityGroupsCommand" ; import { DescribeStoreImageTasksCommandInput , DescribeStoreImageTasksCommandOutput , } from "../commands/DescribeStoreImageTasksCommand" ; import { DescribeSubnetsCommandInput , DescribeSubnetsCommandOutput } from "../commands/DescribeSubnetsCommand" ; import { DescribeTagsCommandInput , DescribeTagsCommandOutput } from "../commands/DescribeTagsCommand" ; import { DescribeTrafficMirrorFiltersCommandInput , DescribeTrafficMirrorFiltersCommandOutput , } from "../commands/DescribeTrafficMirrorFiltersCommand" ; import { DescribeTrafficMirrorSessionsCommandInput , DescribeTrafficMirrorSessionsCommandOutput , } from "../commands/DescribeTrafficMirrorSessionsCommand" ; import { DescribeTrafficMirrorTargetsCommandInput , DescribeTrafficMirrorTargetsCommandOutput , } from "../commands/DescribeTrafficMirrorTargetsCommand" ; import { DescribeTransitGatewayAttachmentsCommandInput , DescribeTransitGatewayAttachmentsCommandOutput , } from "../commands/DescribeTransitGatewayAttachmentsCommand" ; import { DescribeTransitGatewayConnectPeersCommandInput , DescribeTransitGatewayConnectPeersCommandOutput , } from "../commands/DescribeTransitGatewayConnectPeersCommand" ; import { DescribeTransitGatewayConnectsCommandInput , DescribeTransitGatewayConnectsCommandOutput , } from "../commands/DescribeTransitGatewayConnectsCommand" ; import { DescribeTransitGatewayMulticastDomainsCommandInput , DescribeTransitGatewayMulticastDomainsCommandOutput , } from "../commands/DescribeTransitGatewayMulticastDomainsCommand" ; import { DescribeTransitGatewayPeeringAttachmentsCommandInput , DescribeTransitGatewayPeeringAttachmentsCommandOutput , } from "../commands/DescribeTransitGatewayPeeringAttachmentsCommand" ; import { DescribeTransitGatewayRouteTablesCommandInput , DescribeTransitGatewayRouteTablesCommandOutput , } from "../commands/DescribeTransitGatewayRouteTablesCommand" ; import { DescribeTransitGatewaysCommandInput , DescribeTransitGatewaysCommandOutput , } from "../commands/DescribeTransitGatewaysCommand" ; import { DescribeTransitGatewayVpcAttachmentsCommandInput , DescribeTransitGatewayVpcAttachmentsCommandOutput , } from "../commands/DescribeTransitGatewayVpcAttachmentsCommand" ; import { DescribeTrunkInterfaceAssociationsCommandInput , DescribeTrunkInterfaceAssociationsCommandOutput , } from "../commands/DescribeTrunkInterfaceAssociationsCommand" ; import { DescribeVolumeAttributeCommandInput , DescribeVolumeAttributeCommandOutput , } from "../commands/DescribeVolumeAttributeCommand" ; import { DescribeVolumesCommandInput , DescribeVolumesCommandOutput } from "../commands/DescribeVolumesCommand" ; import { DescribeVolumesModificationsCommandInput , DescribeVolumesModificationsCommandOutput , } from "../commands/DescribeVolumesModificationsCommand" ; import { DescribeVolumeStatusCommandInput , DescribeVolumeStatusCommandOutput , } from "../commands/DescribeVolumeStatusCommand" ; import { DescribeVpcAttributeCommandInput , DescribeVpcAttributeCommandOutput , } from "../commands/DescribeVpcAttributeCommand" ; import { DescribeVpcClassicLinkCommandInput , DescribeVpcClassicLinkCommandOutput , } from "../commands/DescribeVpcClassicLinkCommand" ; import { DescribeVpcClassicLinkDnsSupportCommandInput , DescribeVpcClassicLinkDnsSupportCommandOutput , } from "../commands/DescribeVpcClassicLinkDnsSupportCommand" ; import { DescribeVpcEndpointConnectionNotificationsCommandInput , DescribeVpcEndpointConnectionNotificationsCommandOutput , } from "../commands/DescribeVpcEndpointConnectionNotificationsCommand" ; import { DescribeVpcEndpointConnectionsCommandInput , DescribeVpcEndpointConnectionsCommandOutput , } from "../commands/DescribeVpcEndpointConnectionsCommand" ; import { DescribeVpcEndpointsCommandInput , DescribeVpcEndpointsCommandOutput , } from "../commands/DescribeVpcEndpointsCommand" ; import { DescribeVpcEndpointServiceConfigurationsCommandInput , DescribeVpcEndpointServiceConfigurationsCommandOutput , } from "../commands/DescribeVpcEndpointServiceConfigurationsCommand" ; import { DescribeVpcEndpointServicePermissionsCommandInput , DescribeVpcEndpointServicePermissionsCommandOutput , } from "../commands/DescribeVpcEndpointServicePermissionsCommand" ; import { DescribeVpcEndpointServicesCommandInput , DescribeVpcEndpointServicesCommandOutput , } from "../commands/DescribeVpcEndpointServicesCommand" ; import { DescribeVpcPeeringConnectionsCommandInput , DescribeVpcPeeringConnectionsCommandOutput , } from "../commands/DescribeVpcPeeringConnectionsCommand" ; import { DescribeVpcsCommandInput , DescribeVpcsCommandOutput } from "../commands/DescribeVpcsCommand" ; import { DescribeVpnConnectionsCommandInput , DescribeVpnConnectionsCommandOutput , } from "../commands/DescribeVpnConnectionsCommand" ; import { DescribeVpnGatewaysCommandInput , DescribeVpnGatewaysCommandOutput , } from "../commands/DescribeVpnGatewaysCommand" ; import { DetachClassicLinkVpcCommandInput , DetachClassicLinkVpcCommandOutput , } from "../commands/DetachClassicLinkVpcCommand" ; import { DetachInternetGatewayCommandInput , DetachInternetGatewayCommandOutput , } from "../commands/DetachInternetGatewayCommand" ; import { DetachNetworkInterfaceCommandInput , DetachNetworkInterfaceCommandOutput , } from "../commands/DetachNetworkInterfaceCommand" ; import { DetachVolumeCommandInput , DetachVolumeCommandOutput } from "../commands/DetachVolumeCommand" ; import { DetachVpnGatewayCommandInput , DetachVpnGatewayCommandOutput } from "../commands/DetachVpnGatewayCommand" ; import { DisableEbsEncryptionByDefaultCommandInput , DisableEbsEncryptionByDefaultCommandOutput , } from "../commands/DisableEbsEncryptionByDefaultCommand" ; import { DisableFastSnapshotRestoresCommandInput , DisableFastSnapshotRestoresCommandOutput , } from "../commands/DisableFastSnapshotRestoresCommand" ; import { DisableImageDeprecationCommandInput , DisableImageDeprecationCommandOutput , } from "../commands/DisableImageDeprecationCommand" ; import { DisableIpamOrganizationAdminAccountCommandInput , DisableIpamOrganizationAdminAccountCommandOutput , } from "../commands/DisableIpamOrganizationAdminAccountCommand" ; import { DisableSerialConsoleAccessCommandInput , DisableSerialConsoleAccessCommandOutput , } from "../commands/DisableSerialConsoleAccessCommand" ; import { DisableTransitGatewayRouteTablePropagationCommandInput , DisableTransitGatewayRouteTablePropagationCommandOutput , } from "../commands/DisableTransitGatewayRouteTablePropagationCommand" ; import { DisableVgwRoutePropagationCommandInput , DisableVgwRoutePropagationCommandOutput , } from "../commands/DisableVgwRoutePropagationCommand" ; import { DisableVpcClassicLinkCommandInput , DisableVpcClassicLinkCommandOutput , } from "../commands/DisableVpcClassicLinkCommand" ; import { DisableVpcClassicLinkDnsSupportCommandInput , DisableVpcClassicLinkDnsSupportCommandOutput , } from "../commands/DisableVpcClassicLinkDnsSupportCommand" ; import { DisassociateAddressCommandInput , DisassociateAddressCommandOutput , } from "../commands/DisassociateAddressCommand" ; import { DisassociateClientVpnTargetNetworkCommandInput , DisassociateClientVpnTargetNetworkCommandOutput , } from "../commands/DisassociateClientVpnTargetNetworkCommand" ; import { DisassociateEnclaveCertificateIamRoleCommandInput , DisassociateEnclaveCertificateIamRoleCommandOutput , } from "../commands/DisassociateEnclaveCertificateIamRoleCommand" ; import { DisassociateIamInstanceProfileCommandInput , DisassociateIamInstanceProfileCommandOutput , } from "../commands/DisassociateIamInstanceProfileCommand" ; import { DisassociateInstanceEventWindowCommandInput , DisassociateInstanceEventWindowCommandOutput , } from "../commands/DisassociateInstanceEventWindowCommand" ; import { DisassociateRouteTableCommandInput , DisassociateRouteTableCommandOutput , } from "../commands/DisassociateRouteTableCommand" ; import { DisassociateSubnetCidrBlockCommandInput , DisassociateSubnetCidrBlockCommandOutput , } from "../commands/DisassociateSubnetCidrBlockCommand" ; import { DisassociateTransitGatewayMulticastDomainCommandInput , DisassociateTransitGatewayMulticastDomainCommandOutput , } from "../commands/DisassociateTransitGatewayMulticastDomainCommand" ; import { DisassociateTransitGatewayRouteTableCommandInput , DisassociateTransitGatewayRouteTableCommandOutput , } from "../commands/DisassociateTransitGatewayRouteTableCommand" ; import { DisassociateTrunkInterfaceCommandInput , DisassociateTrunkInterfaceCommandOutput , } from "../commands/DisassociateTrunkInterfaceCommand" ; import { DisassociateVpcCidrBlockCommandInput , DisassociateVpcCidrBlockCommandOutput , } from "../commands/DisassociateVpcCidrBlockCommand" ; import { EnableEbsEncryptionByDefaultCommandInput , EnableEbsEncryptionByDefaultCommandOutput , } from "../commands/EnableEbsEncryptionByDefaultCommand" ; import { EnableFastSnapshotRestoresCommandInput , EnableFastSnapshotRestoresCommandOutput , } from "../commands/EnableFastSnapshotRestoresCommand" ; import { EnableImageDeprecationCommandInput , EnableImageDeprecationCommandOutput , } from "../commands/EnableImageDeprecationCommand" ; import { EnableIpamOrganizationAdminAccountCommandInput , EnableIpamOrganizationAdminAccountCommandOutput , } from "../commands/EnableIpamOrganizationAdminAccountCommand" ; import { EnableSerialConsoleAccessCommandInput , EnableSerialConsoleAccessCommandOutput , } from "../commands/EnableSerialConsoleAccessCommand" ; import { EnableTransitGatewayRouteTablePropagationCommandInput , EnableTransitGatewayRouteTablePropagationCommandOutput , } from "../commands/EnableTransitGatewayRouteTablePropagationCommand" ; import { EnableVgwRoutePropagationCommandInput , EnableVgwRoutePropagationCommandOutput , } from "../commands/EnableVgwRoutePropagationCommand" ; import { EnableVolumeIOCommandInput , EnableVolumeIOCommandOutput } from "../commands/EnableVolumeIOCommand" ; import { EnableVpcClassicLinkCommandInput , EnableVpcClassicLinkCommandOutput , } from "../commands/EnableVpcClassicLinkCommand" ; import { EnableVpcClassicLinkDnsSupportCommandInput , EnableVpcClassicLinkDnsSupportCommandOutput , } from "../commands/EnableVpcClassicLinkDnsSupportCommand" ; import { ExportClientVpnClientCertificateRevocationListCommandInput , ExportClientVpnClientCertificateRevocationListCommandOutput , } from "../commands/ExportClientVpnClientCertificateRevocationListCommand" ; import { ExportClientVpnClientConfigurationCommandInput , ExportClientVpnClientConfigurationCommandOutput , } from "../commands/ExportClientVpnClientConfigurationCommand" ; import { ExportImageCommandInput , ExportImageCommandOutput } from "../commands/ExportImageCommand" ; import { ExportTransitGatewayRoutesCommandInput , ExportTransitGatewayRoutesCommandOutput , } from "../commands/ExportTransitGatewayRoutesCommand" ; import { GetAssociatedEnclaveCertificateIamRolesCommandInput , GetAssociatedEnclaveCertificateIamRolesCommandOutput , } from "../commands/GetAssociatedEnclaveCertificateIamRolesCommand" ; import { GetAssociatedIpv6PoolCidrsCommandInput , GetAssociatedIpv6PoolCidrsCommandOutput , } from "../commands/GetAssociatedIpv6PoolCidrsCommand" ; import { GetCapacityReservationUsageCommandInput , GetCapacityReservationUsageCommandOutput , } from "../commands/GetCapacityReservationUsageCommand" ; import { GetCoipPoolUsageCommandInput , GetCoipPoolUsageCommandOutput } from "../commands/GetCoipPoolUsageCommand" ; import { GetConsoleOutputCommandInput , GetConsoleOutputCommandOutput } from "../commands/GetConsoleOutputCommand" ; import { GetConsoleScreenshotCommandInput , GetConsoleScreenshotCommandOutput , } from "../commands/GetConsoleScreenshotCommand" ; import { GetDefaultCreditSpecificationCommandInput , GetDefaultCreditSpecificationCommandOutput , } from "../commands/GetDefaultCreditSpecificationCommand" ; import { GetEbsDefaultKmsKeyIdCommandInput , GetEbsDefaultKmsKeyIdCommandOutput , } from "../commands/GetEbsDefaultKmsKeyIdCommand" ; import { GetEbsEncryptionByDefaultCommandInput , GetEbsEncryptionByDefaultCommandOutput , } from "../commands/GetEbsEncryptionByDefaultCommand" ; import { GetFlowLogsIntegrationTemplateCommandInput , GetFlowLogsIntegrationTemplateCommandOutput , } from "../commands/GetFlowLogsIntegrationTemplateCommand" ; import { GetGroupsForCapacityReservationCommandInput , GetGroupsForCapacityReservationCommandOutput , } from "../commands/GetGroupsForCapacityReservationCommand" ; import { GetHostReservationPurchasePreviewCommandInput , GetHostReservationPurchasePreviewCommandOutput , } from "../commands/GetHostReservationPurchasePreviewCommand" ; import { GetInstanceTypesFromInstanceRequirementsCommandInput , GetInstanceTypesFromInstanceRequirementsCommandOutput , } from "../commands/GetInstanceTypesFromInstanceRequirementsCommand" ; import { GetIpamAddressHistoryCommandInput , GetIpamAddressHistoryCommandOutput , } from "../commands/GetIpamAddressHistoryCommand" ; import { GetIpamPoolAllocationsCommandInput , GetIpamPoolAllocationsCommandOutput , } from "../commands/GetIpamPoolAllocationsCommand" ; import { GetIpamPoolCidrsCommandInput , GetIpamPoolCidrsCommandOutput } from "../commands/GetIpamPoolCidrsCommand" ; import { GetIpamResourceCidrsCommandInput , GetIpamResourceCidrsCommandOutput , } from "../commands/GetIpamResourceCidrsCommand" ; import { GetLaunchTemplateDataCommandInput , GetLaunchTemplateDataCommandOutput , } from "../commands/GetLaunchTemplateDataCommand" ; import { GetManagedPrefixListAssociationsCommandInput , GetManagedPrefixListAssociationsCommandOutput , } from "../commands/GetManagedPrefixListAssociationsCommand" ; import { GetManagedPrefixListEntriesCommandInput , GetManagedPrefixListEntriesCommandOutput , } from "../commands/GetManagedPrefixListEntriesCommand" ; import { GetNetworkInsightsAccessScopeAnalysisFindingsCommandInput , GetNetworkInsightsAccessScopeAnalysisFindingsCommandOutput , } from "../commands/GetNetworkInsightsAccessScopeAnalysisFindingsCommand" ; import { GetNetworkInsightsAccessScopeContentCommandInput , GetNetworkInsightsAccessScopeContentCommandOutput , } from "../commands/GetNetworkInsightsAccessScopeContentCommand" ; import { GetPasswordDataCommandInput , GetPasswordDataCommandOutput } from "../commands/GetPasswordDataCommand" ; import { GetReservedInstancesExchangeQuoteCommandInput , GetReservedInstancesExchangeQuoteCommandOutput , } from "../commands/GetReservedInstancesExchangeQuoteCommand" ; import { GetSerialConsoleAccessStatusCommandInput , GetSerialConsoleAccessStatusCommandOutput , } from "../commands/GetSerialConsoleAccessStatusCommand" ; import { GetSpotPlacementScoresCommandInput , GetSpotPlacementScoresCommandOutput , } from "../commands/GetSpotPlacementScoresCommand" ; import { GetSubnetCidrReservationsCommandInput , GetSubnetCidrReservationsCommandOutput , } from "../commands/GetSubnetCidrReservationsCommand" ; import { GetTransitGatewayAttachmentPropagationsCommandInput , GetTransitGatewayAttachmentPropagationsCommandOutput , } from "../commands/GetTransitGatewayAttachmentPropagationsCommand" ; import { GetTransitGatewayMulticastDomainAssociationsCommandInput , GetTransitGatewayMulticastDomainAssociationsCommandOutput , } from "../commands/GetTransitGatewayMulticastDomainAssociationsCommand" ; import { GetTransitGatewayPrefixListReferencesCommandInput , GetTransitGatewayPrefixListReferencesCommandOutput , } from "../commands/GetTransitGatewayPrefixListReferencesCommand" ; import { GetTransitGatewayRouteTableAssociationsCommandInput , GetTransitGatewayRouteTableAssociationsCommandOutput , } from "../commands/GetTransitGatewayRouteTableAssociationsCommand" ; import { GetTransitGatewayRouteTablePropagationsCommandInput , GetTransitGatewayRouteTablePropagationsCommandOutput , } from "../commands/GetTransitGatewayRouteTablePropagationsCommand" ; import { GetVpnConnectionDeviceSampleConfigurationCommandInput , GetVpnConnectionDeviceSampleConfigurationCommandOutput , } from "../commands/GetVpnConnectionDeviceSampleConfigurationCommand" ; import { GetVpnConnectionDeviceTypesCommandInput , GetVpnConnectionDeviceTypesCommandOutput , } from "../commands/GetVpnConnectionDeviceTypesCommand" ; import { ImportClientVpnClientCertificateRevocationListCommandInput , ImportClientVpnClientCertificateRevocationListCommandOutput , } from "../commands/ImportClientVpnClientCertificateRevocationListCommand" ; import { ImportImageCommandInput , ImportImageCommandOutput } from "../commands/ImportImageCommand" ; import { ImportInstanceCommandInput , ImportInstanceCommandOutput } from "../commands/ImportInstanceCommand" ; import { ImportKeyPairCommandInput , ImportKeyPairCommandOutput } from "../commands/ImportKeyPairCommand" ; import { ImportSnapshotCommandInput , ImportSnapshotCommandOutput } from "../commands/ImportSnapshotCommand" ; import { ImportVolumeCommandInput , ImportVolumeCommandOutput } from "../commands/ImportVolumeCommand" ; import { ListSnapshotsInRecycleBinCommandInput , ListSnapshotsInRecycleBinCommandOutput , } from "../commands/ListSnapshotsInRecycleBinCommand" ; import { ModifyAddressAttributeCommandInput , ModifyAddressAttributeCommandOutput , } from "../commands/ModifyAddressAttributeCommand" ; import { ModifyAvailabilityZoneGroupCommandInput , ModifyAvailabilityZoneGroupCommandOutput , } from "../commands/ModifyAvailabilityZoneGroupCommand" ; import { ModifyCapacityReservationCommandInput , ModifyCapacityReservationCommandOutput , } from "../commands/ModifyCapacityReservationCommand" ; import { ModifyCapacityReservationFleetCommandInput , ModifyCapacityReservationFleetCommandOutput , } from "../commands/ModifyCapacityReservationFleetCommand" ; import { ModifyClientVpnEndpointCommandInput , ModifyClientVpnEndpointCommandOutput , } from "../commands/ModifyClientVpnEndpointCommand" ; import { ModifyDefaultCreditSpecificationCommandInput , ModifyDefaultCreditSpecificationCommandOutput , } from "../commands/ModifyDefaultCreditSpecificationCommand" ; import { ModifyEbsDefaultKmsKeyIdCommandInput , ModifyEbsDefaultKmsKeyIdCommandOutput , } from "../commands/ModifyEbsDefaultKmsKeyIdCommand" ; import { ModifyFleetCommandInput , ModifyFleetCommandOutput } from "../commands/ModifyFleetCommand" ; import { ModifyFpgaImageAttributeCommandInput , ModifyFpgaImageAttributeCommandOutput , } from "../commands/ModifyFpgaImageAttributeCommand" ; import { ModifyHostsCommandInput , ModifyHostsCommandOutput } from "../commands/ModifyHostsCommand" ; import { ModifyIdentityIdFormatCommandInput , ModifyIdentityIdFormatCommandOutput , } from "../commands/ModifyIdentityIdFormatCommand" ; import { ModifyIdFormatCommandInput , ModifyIdFormatCommandOutput } from "../commands/ModifyIdFormatCommand" ; import { ModifyImageAttributeCommandInput , ModifyImageAttributeCommandOutput , } from "../commands/ModifyImageAttributeCommand" ; import { ModifyInstanceAttributeCommandInput , ModifyInstanceAttributeCommandOutput , } from "../commands/ModifyInstanceAttributeCommand" ; import { ModifyInstanceCapacityReservationAttributesCommandInput , ModifyInstanceCapacityReservationAttributesCommandOutput , } from "../commands/ModifyInstanceCapacityReservationAttributesCommand" ; import { ModifyInstanceCreditSpecificationCommandInput , ModifyInstanceCreditSpecificationCommandOutput , } from "../commands/ModifyInstanceCreditSpecificationCommand" ; import { ModifyInstanceEventStartTimeCommandInput , ModifyInstanceEventStartTimeCommandOutput , } from "../commands/ModifyInstanceEventStartTimeCommand" ; import { ModifyInstanceEventWindowCommandInput , ModifyInstanceEventWindowCommandOutput , } from "../commands/ModifyInstanceEventWindowCommand" ; import { ModifyInstanceMetadataOptionsCommandInput , ModifyInstanceMetadataOptionsCommandOutput , } from "../commands/ModifyInstanceMetadataOptionsCommand" ; import { ModifyInstancePlacementCommandInput , ModifyInstancePlacementCommandOutput , } from "../commands/ModifyInstancePlacementCommand" ; import { ModifyIpamCommandInput , ModifyIpamCommandOutput } from "../commands/ModifyIpamCommand" ; import { ModifyIpamPoolCommandInput , ModifyIpamPoolCommandOutput } from "../commands/ModifyIpamPoolCommand" ; import { ModifyIpamResourceCidrCommandInput , ModifyIpamResourceCidrCommandOutput , } from "../commands/ModifyIpamResourceCidrCommand" ; import { ModifyIpamScopeCommandInput , ModifyIpamScopeCommandOutput } from "../commands/ModifyIpamScopeCommand" ; import { ModifyLaunchTemplateCommandInput , ModifyLaunchTemplateCommandOutput , } from "../commands/ModifyLaunchTemplateCommand" ; import { ModifyManagedPrefixListCommandInput , ModifyManagedPrefixListCommandOutput , } from "../commands/ModifyManagedPrefixListCommand" ; import { ModifyNetworkInterfaceAttributeCommandInput , ModifyNetworkInterfaceAttributeCommandOutput , } from "../commands/ModifyNetworkInterfaceAttributeCommand" ; import { ModifyPrivateDnsNameOptionsCommandInput , ModifyPrivateDnsNameOptionsCommandOutput , } from "../commands/ModifyPrivateDnsNameOptionsCommand" ; import { ModifyReservedInstancesCommandInput , ModifyReservedInstancesCommandOutput , } from "../commands/ModifyReservedInstancesCommand" ; import { ModifySecurityGroupRulesCommandInput , ModifySecurityGroupRulesCommandOutput , } from "../commands/ModifySecurityGroupRulesCommand" ; import { ModifySnapshotAttributeCommandInput , ModifySnapshotAttributeCommandOutput , } from "../commands/ModifySnapshotAttributeCommand" ; import { ModifySnapshotTierCommandInput , ModifySnapshotTierCommandOutput } from "../commands/ModifySnapshotTierCommand" ; import { ModifySpotFleetRequestCommandInput , ModifySpotFleetRequestCommandOutput , } from "../commands/ModifySpotFleetRequestCommand" ; import { ModifySubnetAttributeCommandInput , ModifySubnetAttributeCommandOutput , } from "../commands/ModifySubnetAttributeCommand" ; import { ModifyTrafficMirrorFilterNetworkServicesCommandInput , ModifyTrafficMirrorFilterNetworkServicesCommandOutput , } from "../commands/ModifyTrafficMirrorFilterNetworkServicesCommand" ; import { ModifyTrafficMirrorFilterRuleCommandInput , ModifyTrafficMirrorFilterRuleCommandOutput , } from "../commands/ModifyTrafficMirrorFilterRuleCommand" ; import { ModifyTrafficMirrorSessionCommandInput , ModifyTrafficMirrorSessionCommandOutput , } from "../commands/ModifyTrafficMirrorSessionCommand" ; import { ModifyTransitGatewayCommandInput , ModifyTransitGatewayCommandOutput , } from "../commands/ModifyTransitGatewayCommand" ; import { ModifyTransitGatewayPrefixListReferenceCommandInput , ModifyTransitGatewayPrefixListReferenceCommandOutput , } from "../commands/ModifyTransitGatewayPrefixListReferenceCommand" ; import { ModifyTransitGatewayVpcAttachmentCommandInput , ModifyTransitGatewayVpcAttachmentCommandOutput , } from "../commands/ModifyTransitGatewayVpcAttachmentCommand" ; import { ModifyVolumeAttributeCommandInput , ModifyVolumeAttributeCommandOutput , } from "../commands/ModifyVolumeAttributeCommand" ; import { ModifyVolumeCommandInput , ModifyVolumeCommandOutput } from "../commands/ModifyVolumeCommand" ; import { ModifyVpcAttributeCommandInput , ModifyVpcAttributeCommandOutput } from "../commands/ModifyVpcAttributeCommand" ; import { ModifyVpcEndpointCommandInput , ModifyVpcEndpointCommandOutput } from "../commands/ModifyVpcEndpointCommand" ; import { ModifyVpcEndpointConnectionNotificationCommandInput , ModifyVpcEndpointConnectionNotificationCommandOutput , } from "../commands/ModifyVpcEndpointConnectionNotificationCommand" ; import { ModifyVpcEndpointServiceConfigurationCommandInput , ModifyVpcEndpointServiceConfigurationCommandOutput , } from "../commands/ModifyVpcEndpointServiceConfigurationCommand" ; import { ModifyVpcEndpointServicePayerResponsibilityCommandInput , ModifyVpcEndpointServicePayerResponsibilityCommandOutput , } from "../commands/ModifyVpcEndpointServicePayerResponsibilityCommand" ; import { ModifyVpcEndpointServicePermissionsCommandInput , ModifyVpcEndpointServicePermissionsCommandOutput , } from "../commands/ModifyVpcEndpointServicePermissionsCommand" ; import { ModifyVpcPeeringConnectionOptionsCommandInput , ModifyVpcPeeringConnectionOptionsCommandOutput , } from "../commands/ModifyVpcPeeringConnectionOptionsCommand" ; import { ModifyVpcTenancyCommandInput , ModifyVpcTenancyCommandOutput } from "../commands/ModifyVpcTenancyCommand" ; import { ModifyVpnConnectionCommandInput , ModifyVpnConnectionCommandOutput , } from "../commands/ModifyVpnConnectionCommand" ; import { ModifyVpnConnectionOptionsCommandInput , ModifyVpnConnectionOptionsCommandOutput , } from "../commands/ModifyVpnConnectionOptionsCommand" ; import { ModifyVpnTunnelCertificateCommandInput , ModifyVpnTunnelCertificateCommandOutput , } from "../commands/ModifyVpnTunnelCertificateCommand" ; import { ModifyVpnTunnelOptionsCommandInput , ModifyVpnTunnelOptionsCommandOutput , } from "../commands/ModifyVpnTunnelOptionsCommand" ; import { MonitorInstancesCommandInput , MonitorInstancesCommandOutput } from "../commands/MonitorInstancesCommand" ; import { MoveAddressToVpcCommandInput , MoveAddressToVpcCommandOutput } from "../commands/MoveAddressToVpcCommand" ; import { MoveByoipCidrToIpamCommandInput , MoveByoipCidrToIpamCommandOutput , } from "../commands/MoveByoipCidrToIpamCommand" ; import { ProvisionByoipCidrCommandInput , ProvisionByoipCidrCommandOutput } from "../commands/ProvisionByoipCidrCommand" ; import { ProvisionIpamPoolCidrCommandInput , ProvisionIpamPoolCidrCommandOutput , } from "../commands/ProvisionIpamPoolCidrCommand" ; import { ProvisionPublicIpv4PoolCidrCommandInput , ProvisionPublicIpv4PoolCidrCommandOutput , } from "../commands/ProvisionPublicIpv4PoolCidrCommand" ; import { PurchaseHostReservationCommandInput , PurchaseHostReservationCommandOutput , } from "../commands/PurchaseHostReservationCommand" ; import { PurchaseReservedInstancesOfferingCommandInput , PurchaseReservedInstancesOfferingCommandOutput , } from "../commands/PurchaseReservedInstancesOfferingCommand" ; import { PurchaseScheduledInstancesCommandInput , PurchaseScheduledInstancesCommandOutput , } from "../commands/PurchaseScheduledInstancesCommand" ; import { RebootInstancesCommandInput , RebootInstancesCommandOutput } from "../commands/RebootInstancesCommand" ; import { RegisterImageCommandInput , RegisterImageCommandOutput } from "../commands/RegisterImageCommand" ; import { RegisterInstanceEventNotificationAttributesCommandInput , RegisterInstanceEventNotificationAttributesCommandOutput , } from "../commands/RegisterInstanceEventNotificationAttributesCommand" ; import { RegisterTransitGatewayMulticastGroupMembersCommandInput , RegisterTransitGatewayMulticastGroupMembersCommandOutput , } from "../commands/RegisterTransitGatewayMulticastGroupMembersCommand" ; import { RegisterTransitGatewayMulticastGroupSourcesCommandInput , RegisterTransitGatewayMulticastGroupSourcesCommandOutput , } from "../commands/RegisterTransitGatewayMulticastGroupSourcesCommand" ; import { RejectTransitGatewayMulticastDomainAssociationsCommandInput , RejectTransitGatewayMulticastDomainAssociationsCommandOutput , } from "../commands/RejectTransitGatewayMulticastDomainAssociationsCommand" ; import { RejectTransitGatewayPeeringAttachmentCommandInput , RejectTransitGatewayPeeringAttachmentCommandOutput , } from "../commands/RejectTransitGatewayPeeringAttachmentCommand" ; import { RejectTransitGatewayVpcAttachmentCommandInput , RejectTransitGatewayVpcAttachmentCommandOutput , } from "../commands/RejectTransitGatewayVpcAttachmentCommand" ; import { RejectVpcEndpointConnectionsCommandInput , RejectVpcEndpointConnectionsCommandOutput , } from "../commands/RejectVpcEndpointConnectionsCommand" ; import { RejectVpcPeeringConnectionCommandInput , RejectVpcPeeringConnectionCommandOutput , } from "../commands/RejectVpcPeeringConnectionCommand" ; import { ReleaseAddressCommandInput , ReleaseAddressCommandOutput } from "../commands/ReleaseAddressCommand" ; import { ReleaseHostsCommandInput , ReleaseHostsCommandOutput } from "../commands/ReleaseHostsCommand" ; import { ReleaseIpamPoolAllocationCommandInput , ReleaseIpamPoolAllocationCommandOutput , } from "../commands/ReleaseIpamPoolAllocationCommand" ; import { ReplaceIamInstanceProfileAssociationCommandInput , ReplaceIamInstanceProfileAssociationCommandOutput , } from "../commands/ReplaceIamInstanceProfileAssociationCommand" ; import { ReplaceNetworkAclAssociationCommandInput , ReplaceNetworkAclAssociationCommandOutput , } from "../commands/ReplaceNetworkAclAssociationCommand" ; import { ReplaceNetworkAclEntryCommandInput , ReplaceNetworkAclEntryCommandOutput , } from "../commands/ReplaceNetworkAclEntryCommand" ; import { ReplaceRouteCommandInput , ReplaceRouteCommandOutput } from "../commands/ReplaceRouteCommand" ; import { ReplaceRouteTableAssociationCommandInput , ReplaceRouteTableAssociationCommandOutput , } from "../commands/ReplaceRouteTableAssociationCommand" ; import { ReplaceTransitGatewayRouteCommandInput , ReplaceTransitGatewayRouteCommandOutput , } from "../commands/ReplaceTransitGatewayRouteCommand" ; import { ReportInstanceStatusCommandInput , ReportInstanceStatusCommandOutput , } from "../commands/ReportInstanceStatusCommand" ; import { RequestSpotFleetCommandInput , RequestSpotFleetCommandOutput } from "../commands/RequestSpotFleetCommand" ; import { RequestSpotInstancesCommandInput , RequestSpotInstancesCommandOutput , } from "../commands/RequestSpotInstancesCommand" ; import { ResetAddressAttributeCommandInput , ResetAddressAttributeCommandOutput , } from "../commands/ResetAddressAttributeCommand" ; import { ResetEbsDefaultKmsKeyIdCommandInput , ResetEbsDefaultKmsKeyIdCommandOutput , } from "../commands/ResetEbsDefaultKmsKeyIdCommand" ; import { ResetFpgaImageAttributeCommandInput , ResetFpgaImageAttributeCommandOutput , } from "../commands/ResetFpgaImageAttributeCommand" ; import { ResetImageAttributeCommandInput , ResetImageAttributeCommandOutput , } from "../commands/ResetImageAttributeCommand" ; import { ResetInstanceAttributeCommandInput , ResetInstanceAttributeCommandOutput , } from "../commands/ResetInstanceAttributeCommand" ; import { ResetNetworkInterfaceAttributeCommandInput , ResetNetworkInterfaceAttributeCommandOutput , } from "../commands/ResetNetworkInterfaceAttributeCommand" ; import { ResetSnapshotAttributeCommandInput , ResetSnapshotAttributeCommandOutput , } from "../commands/ResetSnapshotAttributeCommand" ; import { RestoreAddressToClassicCommandInput , RestoreAddressToClassicCommandOutput , } from "../commands/RestoreAddressToClassicCommand" ; import { RestoreManagedPrefixListVersionCommandInput , RestoreManagedPrefixListVersionCommandOutput , } from "../commands/RestoreManagedPrefixListVersionCommand" ; import { RestoreSnapshotFromRecycleBinCommandInput , RestoreSnapshotFromRecycleBinCommandOutput , } from "../commands/RestoreSnapshotFromRecycleBinCommand" ; import { RestoreSnapshotTierCommandInput , RestoreSnapshotTierCommandOutput , } from "../commands/RestoreSnapshotTierCommand" ; import { RevokeClientVpnIngressCommandInput , RevokeClientVpnIngressCommandOutput , } from "../commands/RevokeClientVpnIngressCommand" ; import { RevokeSecurityGroupEgressCommandInput , RevokeSecurityGroupEgressCommandOutput , } from "../commands/RevokeSecurityGroupEgressCommand" ; import { RevokeSecurityGroupIngressCommandInput , RevokeSecurityGroupIngressCommandOutput , } from "../commands/RevokeSecurityGroupIngressCommand" ; import { RunInstancesCommandInput , RunInstancesCommandOutput } from "../commands/RunInstancesCommand" ; import { RunScheduledInstancesCommandInput , RunScheduledInstancesCommandOutput , } from "../commands/RunScheduledInstancesCommand" ; import { SearchLocalGatewayRoutesCommandInput , SearchLocalGatewayRoutesCommandOutput , } from "../commands/SearchLocalGatewayRoutesCommand" ; import { SearchTransitGatewayMulticastGroupsCommandInput , SearchTransitGatewayMulticastGroupsCommandOutput , } from "../commands/SearchTransitGatewayMulticastGroupsCommand" ; import { SearchTransitGatewayRoutesCommandInput , SearchTransitGatewayRoutesCommandOutput , } from "../commands/SearchTransitGatewayRoutesCommand" ; import { SendDiagnosticInterruptCommandInput , SendDiagnosticInterruptCommandOutput , } from "../commands/SendDiagnosticInterruptCommand" ; import { StartInstancesCommandInput , StartInstancesCommandOutput } from "../commands/StartInstancesCommand" ; import { StartNetworkInsightsAccessScopeAnalysisCommandInput , StartNetworkInsightsAccessScopeAnalysisCommandOutput , } from "../commands/StartNetworkInsightsAccessScopeAnalysisCommand" ; import { StartNetworkInsightsAnalysisCommandInput , StartNetworkInsightsAnalysisCommandOutput , } from "../commands/StartNetworkInsightsAnalysisCommand" ; import { StartVpcEndpointServicePrivateDnsVerificationCommandInput , StartVpcEndpointServicePrivateDnsVerificationCommandOutput , } from "../commands/StartVpcEndpointServicePrivateDnsVerificationCommand" ; import { StopInstancesCommandInput , StopInstancesCommandOutput } from "../commands/StopInstancesCommand" ; import { TerminateClientVpnConnectionsCommandInput , TerminateClientVpnConnectionsCommandOutput , } from "../commands/TerminateClientVpnConnectionsCommand" ; import { TerminateInstancesCommandInput , TerminateInstancesCommandOutput } from "../commands/TerminateInstancesCommand" ; import { UnassignIpv6AddressesCommandInput , UnassignIpv6AddressesCommandOutput , } from "../commands/UnassignIpv6AddressesCommand" ; import { UnassignPrivateIpAddressesCommandInput , UnassignPrivateIpAddressesCommandOutput , } from "../commands/UnassignPrivateIpAddressesCommand" ; import { UnmonitorInstancesCommandInput , UnmonitorInstancesCommandOutput } from "../commands/UnmonitorInstancesCommand" ; import { UpdateSecurityGroupRuleDescriptionsEgressCommandInput , UpdateSecurityGroupRuleDescriptionsEgressCommandOutput , } from "../commands/UpdateSecurityGroupRuleDescriptionsEgressCommand" ; import { UpdateSecurityGroupRuleDescriptionsIngressCommandInput , UpdateSecurityGroupRuleDescriptionsIngressCommandOutput , } from "../commands/UpdateSecurityGroupRuleDescriptionsIngressCommand" ; import { WithdrawByoipCidrCommandInput , WithdrawByoipCidrCommandOutput } from "../commands/WithdrawByoipCidrCommand" ; import { _InstanceType , AcceleratorCount , AcceleratorCountRequest , AcceleratorManufacturer , AcceleratorName , AcceleratorTotalMemoryMiB , AcceleratorTotalMemoryMiBRequest , AcceleratorType , AcceptReservedInstancesExchangeQuoteRequest , AcceptReservedInstancesExchangeQuoteResult , AcceptTransitGatewayMulticastDomainAssociationsRequest , AcceptTransitGatewayMulticastDomainAssociationsResult , AcceptTransitGatewayPeeringAttachmentRequest , AcceptTransitGatewayPeeringAttachmentResult , AcceptTransitGatewayVpcAttachmentRequest , AcceptTransitGatewayVpcAttachmentResult , AcceptVpcEndpointConnectionsRequest , AcceptVpcEndpointConnectionsResult , AcceptVpcPeeringConnectionRequest , AcceptVpcPeeringConnectionResult , AccessScopeAnalysisFinding , AccessScopePath , AccessScopePathRequest , AccountAttribute , AccountAttributeName , AccountAttributeValue , ActiveInstance , AddIpamOperatingRegion , AddPrefixListEntry , Address , AddressAttribute , AdvertiseByoipCidrRequest , AdvertiseByoipCidrResult , AllocateAddressRequest , AllocateAddressResult , AllocateHostsRequest , AllocateHostsResult , AllocateIpamPoolCidrRequest , AllocateIpamPoolCidrResult , AllowedPrincipal , AlternatePathHint , AnalysisAclRule , AnalysisComponent , AnalysisPacketHeader , AnalysisRouteTableRoute , AnalysisSecurityGroupRule , ApplySecurityGroupsToClientVpnTargetNetworkRequest , ApplySecurityGroupsToClientVpnTargetNetworkResult , AssignedPrivateIpAddress , AssignIpv6AddressesRequest , AssignIpv6AddressesResult , AssignPrivateIpAddressesRequest , AssignPrivateIpAddressesResult , AssociateAddressRequest , AssociateAddressResult , AssociateClientVpnTargetNetworkRequest , AssociateClientVpnTargetNetworkResult , AssociateDhcpOptionsRequest , AssociateEnclaveCertificateIamRoleRequest , AssociateEnclaveCertificateIamRoleResult , AssociateIamInstanceProfileRequest , AssociateIamInstanceProfileResult , AssociateInstanceEventWindowRequest , AssociateInstanceEventWindowResult , AssociateRouteTableRequest , AssociateRouteTableResult , AssociateSubnetCidrBlockRequest , AssociateSubnetCidrBlockResult , AssociateTransitGatewayMulticastDomainRequest , AssociateTransitGatewayMulticastDomainResult , AssociateTransitGatewayRouteTableRequest , AssociateTransitGatewayRouteTableResult , AssociateTrunkInterfaceRequest , AssociateTrunkInterfaceResult , AssociateVpcCidrBlockRequest , AssociateVpcCidrBlockResult , AssociationStatus , AttachClassicLinkVpcRequest , AttachClassicLinkVpcResult , AttachInternetGatewayRequest , AttachNetworkInterfaceRequest , AttachNetworkInterfaceResult , AttachVolumeRequest , AttachVpnGatewayRequest , AttachVpnGatewayResult , AttributeValue , AuthorizeClientVpnIngressRequest , AuthorizeClientVpnIngressResult , AuthorizeSecurityGroupEgressRequest , AuthorizeSecurityGroupEgressResult , AuthorizeSecurityGroupIngressRequest , AuthorizeSecurityGroupIngressResult , BaselineEbsBandwidthMbpsRequest , BundleInstanceRequest , BundleInstanceResult , BundleTask , BundleTaskError , ByoipCidr , CancelBundleTaskRequest , CancelBundleTaskResult , CancelCapacityReservationFleetError , CancelCapacityReservationFleetsRequest , CancelCapacityReservationFleetsResult , CancelCapacityReservationRequest , CancelCapacityReservationResult , CancelConversionRequest , CancelExportTaskRequest , CancelImportTaskRequest , CancelImportTaskResult , CancelledSpotInstanceRequest , CancelReservedInstancesListingRequest , CancelReservedInstancesListingResult , CancelSpotFleetRequestsError , CancelSpotFleetRequestsErrorItem , CancelSpotFleetRequestsRequest , CancelSpotFleetRequestsResponse , CancelSpotFleetRequestsSuccessItem , CancelSpotInstanceRequestsRequest , CancelSpotInstanceRequestsResult , CapacityReservation , CapacityReservationFleetCancellationState , CarrierGateway , CertificateAuthenticationRequest , CidrBlock , ClientConnectOptions , ClientVpnAuthenticationRequest , ClientVpnAuthorizationRuleStatus , ClientVpnEndpointStatus , ClientVpnRouteStatus , ConfirmProductInstanceRequest , ConfirmProductInstanceResult , ConnectionLogOptions , CopyFpgaImageRequest , CopyFpgaImageResult , CopyImageRequest , CopyImageResult , CopySnapshotRequest , CopySnapshotResult , CpuManufacturer , CreateCapacityReservationFleetRequest , CreateCapacityReservationFleetResult , CreateCapacityReservationRequest , CreateCapacityReservationResult , CreateCarrierGatewayRequest , CreateCarrierGatewayResult , CreateClientVpnEndpointRequest , CreateClientVpnEndpointResult , CreateClientVpnRouteRequest , CreateClientVpnRouteResult , CreateCustomerGatewayRequest , CreateCustomerGatewayResult , CreateDefaultSubnetRequest , CreateDefaultSubnetResult , CreateDefaultVpcRequest , CreateDefaultVpcResult , CreateDhcpOptionsRequest , CreateDhcpOptionsResult , CreateEgressOnlyInternetGatewayRequest , CreateEgressOnlyInternetGatewayResult , CustomerGateway , DhcpConfiguration , DhcpOptions , DirectoryServiceAuthenticationRequest , EgressOnlyInternetGateway , FailedCapacityReservationFleetCancellationResult , FederatedAuthenticationRequest , FleetCapacityReservation , FleetLaunchTemplateSpecificationRequest , IamInstanceProfile , IamInstanceProfileAssociation , IamInstanceProfileSpecification , InstanceCount , InstanceEventWindow , InstanceEventWindowAssociationRequest , InstanceEventWindowAssociationTarget , InstanceEventWindowTimeRange , InstanceGeneration , InternetGatewayAttachment , IpamPoolAllocation , IpPermission , IpRange , Ipv4PrefixSpecification , Ipv6CidrBlock , Ipv6Range , LocalStorageType , NewDhcpConfiguration , PacketHeaderStatement , PacketHeaderStatementRequest , PathComponent , PathStatement , PathStatementRequest , PeeringAttachmentStatus , PeeringTgwInfo , PortRange , PrefixListId , PriceSchedule , PrivateDnsNameOptionsOnLaunch , Protocol , PtrUpdateStatus , ReferencedSecurityGroup , ReservationFleetInstanceSpecification , ReservedInstancesListing , ResourceStatement , ResourceStatementRequest , RouteTableAssociationState , S3Storage , SecurityGroupRule , Storage , Subnet , SubnetAssociation , SubnetCidrBlockState , SubnetIpv6CidrBlockAssociation , Tag , TagSpecification , TargetConfigurationRequest , ThroughResourcesStatement , ThroughResourcesStatementRequest , TransitGatewayAssociation , TransitGatewayMulticastDomainAssociations , TransitGatewayPeeringAttachment , TransitGatewayVpcAttachment , TransitGatewayVpcAttachmentOptions , TrunkInterfaceAssociation , UnsuccessfulItem , UnsuccessfulItemError , UserIdGroupPair , VolumeAttachment , Vpc , VpcAttachment , VpcCidrBlockAssociation , VpcCidrBlockState , VpcIpv6CidrBlockAssociation , VpcPeeringConnection , VpcPeeringConnectionOptionsDescription , VpcPeeringConnectionStateReason , VpcPeeringConnectionVpcInfo , } from "../models/models_0" ; import { BaselineEbsBandwidthMbps , BlockDeviceMapping , CapacityReservationOptionsRequest , CapacityReservationTarget , CapacityReservationTargetResponse , CreateFleetError , CreateFleetInstance , CreateFleetRequest , CreateFleetResult , CreateFlowLogsRequest , CreateFlowLogsResult , CreateFpgaImageRequest , CreateFpgaImageResult , CreateImageRequest , CreateImageResult , CreateInstanceEventWindowRequest , CreateInstanceEventWindowResult , CreateInstanceExportTaskRequest , CreateInstanceExportTaskResult , CreateInternetGatewayRequest , CreateInternetGatewayResult , CreateIpamPoolRequest , CreateIpamPoolResult , CreateIpamRequest , CreateIpamResult , CreateIpamScopeRequest , CreateIpamScopeResult , CreateKeyPairRequest , CreateLaunchTemplateRequest , CreateLaunchTemplateResult , CreateLaunchTemplateVersionRequest , CreateLaunchTemplateVersionResult , CreateLocalGatewayRouteRequest , CreateLocalGatewayRouteResult , CreateLocalGatewayRouteTableVpcAssociationRequest , CreateLocalGatewayRouteTableVpcAssociationResult , CreateManagedPrefixListRequest , CreateManagedPrefixListResult , CreateNatGatewayRequest , CreateNatGatewayResult , CreateNetworkAclEntryRequest , CreateNetworkAclRequest , CreateNetworkAclResult , CreateNetworkInsightsAccessScopeRequest , CreateNetworkInsightsAccessScopeResult , CreateNetworkInsightsPathRequest , CreateNetworkInsightsPathResult , CreateNetworkInterfacePermissionRequest , CreateNetworkInterfacePermissionResult , CreateNetworkInterfaceRequest , CreateNetworkInterfaceResult , CreatePlacementGroupRequest , CreatePlacementGroupResult , CreatePublicIpv4PoolRequest , CreatePublicIpv4PoolResult , CreateReplaceRootVolumeTaskRequest , CreateReplaceRootVolumeTaskResult , CreateReservedInstancesListingRequest , CreateReservedInstancesListingResult , CreateRestoreImageTaskRequest , CreateRestoreImageTaskResult , CreateRouteRequest , CreateRouteResult , CreateRouteTableRequest , CreateRouteTableResult , CreateSecurityGroupRequest , CreateSecurityGroupResult , CreateSnapshotRequest , CreateSnapshotsRequest , CreateSnapshotsResult , CreateSpotDatafeedSubscriptionRequest , CreateSpotDatafeedSubscriptionResult , CreateStoreImageTaskRequest , CreateStoreImageTaskResult , CreateSubnetCidrReservationRequest , CreateSubnetCidrReservationResult , CreateSubnetRequest , CreateSubnetResult , CreateTagsRequest , CreateTrafficMirrorFilterRequest , CreateTrafficMirrorFilterResult , CreateTrafficMirrorFilterRuleRequest , CreateTrafficMirrorFilterRuleResult , CreateTrafficMirrorSessionRequest , CreateTrafficMirrorSessionResult , CreateTrafficMirrorTargetRequest , CreateTrafficMirrorTargetResult , CreateTransitGatewayConnectPeerRequest , CreateTransitGatewayConnectRequest , CreateTransitGatewayConnectRequestOptions , CreateTransitGatewayConnectResult , CreateTransitGatewayRequest , CreateTransitGatewayResult , CreditSpecification , CreditSpecificationRequest , DestinationOptionsRequest , EbsBlockDevice , ElasticGpuSpecification , ElasticGpuSpecificationResponse , ExportTask , ExportToS3Task , ExportToS3TaskSpecification , FleetLaunchTemplateConfigRequest , FleetLaunchTemplateOverrides , FleetLaunchTemplateOverridesRequest , FleetLaunchTemplateSpecification , FleetSpotCapacityRebalanceRequest , FleetSpotMaintenanceStrategiesRequest , GroupIdentifier , IcmpTypeCode , InstanceEventWindowTimeRangeRequest , InstanceExportDetails , InstanceIpv6Address , InstanceIpv6AddressRequest , InstanceRequirements , InstanceRequirementsRequest , InstanceSpecification , InternetGateway , Ipam , IpamOperatingRegion , IpamPool , IpamResourceTag , IpamScope , Ipv4PrefixSpecificationRequest , Ipv4PrefixSpecificationResponse , Ipv6PrefixSpecification , Ipv6PrefixSpecificationRequest , Ipv6PrefixSpecificationResponse , KeyPair , LaunchTemplate , LaunchTemplateAndOverridesResponse , LaunchTemplateBlockDeviceMapping , LaunchTemplateBlockDeviceMappingRequest , LaunchTemplateCapacityReservationSpecificationRequest , LaunchTemplateCapacityReservationSpecificationResponse , LaunchTemplateCpuOptions , LaunchTemplateCpuOptionsRequest , LaunchTemplateEbsBlockDevice , LaunchTemplateEbsBlockDeviceRequest , LaunchTemplateElasticInferenceAccelerator , LaunchTemplateElasticInferenceAcceleratorResponse , LaunchTemplateEnclaveOptions , LaunchTemplateEnclaveOptionsRequest , LaunchTemplateHibernationOptions , LaunchTemplateHibernationOptionsRequest , LaunchTemplateIamInstanceProfileSpecification , LaunchTemplateIamInstanceProfileSpecificationRequest , LaunchTemplateInstanceMarketOptions , LaunchTemplateInstanceMarketOptionsRequest , LaunchTemplateInstanceMetadataOptions , LaunchTemplateInstanceMetadataOptionsRequest , LaunchTemplateInstanceNetworkInterfaceSpecification , LaunchTemplateInstanceNetworkInterfaceSpecificationRequest , LaunchTemplateLicenseConfiguration , LaunchTemplateLicenseConfigurationRequest , LaunchTemplatePlacement , LaunchTemplatePlacementRequest , LaunchTemplatePrivateDnsNameOptions , LaunchTemplatePrivateDnsNameOptionsRequest , LaunchTemplatesMonitoring , LaunchTemplatesMonitoringRequest , LaunchTemplateSpotMarketOptions , LaunchTemplateSpotMarketOptionsRequest , LaunchTemplateTagSpecification , LaunchTemplateTagSpecificationRequest , LaunchTemplateVersion , LocalGatewayRoute , LocalGatewayRouteTableVpcAssociation , ManagedPrefixList , MemoryGiBPerVCpu , MemoryGiBPerVCpuRequest , MemoryMiB , MemoryMiBRequest , NatGateway , NatGatewayAddress , NetworkAcl , NetworkAclAssociation , NetworkAclEntry , NetworkInsightsAccessScope , NetworkInsightsAccessScopeContent , NetworkInsightsPath , NetworkInterface , NetworkInterfaceAssociation , NetworkInterfaceAttachment , NetworkInterfaceCount , NetworkInterfaceCountRequest , NetworkInterfaceIpv6Address , NetworkInterfacePermission , NetworkInterfacePermissionState , NetworkInterfacePrivateIpAddress , OnDemandOptionsRequest , Placement , PlacementGroup , PlacementResponse , PriceScheduleSpecification , PrivateIpAddressSpecification , PropagatingVgw , ProvisionedBandwidth , ReplaceRootVolumeTask , RequestIpamResourceTag , RequestLaunchTemplateData , ResponseLaunchTemplateData , Route , RouteTable , RouteTableAssociation , S3ObjectTag , Snapshot , SnapshotInfo , SpotDatafeedSubscription , SpotInstanceStateFault , SpotOptionsRequest , StorageLocation , SubnetCidrReservation , TargetCapacitySpecificationRequest , TotalLocalStorageGB , TotalLocalStorageGBRequest , TrafficMirrorFilter , TrafficMirrorFilterRule , TrafficMirrorNetworkService , TrafficMirrorPortRange , TrafficMirrorPortRangeRequest , TrafficMirrorSession , TrafficMirrorTarget , TransitGateway , TransitGatewayConnect , TransitGatewayConnectOptions , TransitGatewayConnectRequestBgpOptions , TransitGatewayOptions , TransitGatewayRequestOptions , ValidationError , ValidationWarning , VCpuCountRange , VCpuCountRangeRequest , } from "../models/models_1" ; import { AssociatedTargetNetwork , AuthorizationRule , AvailabilityZone , AvailabilityZoneMessage , CapacityReservationFleet , CertificateAuthentication , ClassicLinkInstance , ClientConnectResponseOptions , ClientVpnAuthentication , ClientVpnConnection , ClientVpnConnectionStatus , ClientVpnEndpoint , ClientVpnEndpointAttributeStatus , ClientVpnRoute , CoipPool , ConnectionLogResponseOptions , ConnectionNotification , CreateTransitGatewayConnectPeerResult , CreateTransitGatewayMulticastDomainRequest , CreateTransitGatewayMulticastDomainRequestOptions , CreateTransitGatewayMulticastDomainResult , CreateTransitGatewayPeeringAttachmentRequest , CreateTransitGatewayPeeringAttachmentResult , CreateTransitGatewayPrefixListReferenceRequest , CreateTransitGatewayPrefixListReferenceResult , CreateTransitGatewayRouteRequest , CreateTransitGatewayRouteResult , CreateTransitGatewayRouteTableRequest , CreateTransitGatewayRouteTableResult , CreateTransitGatewayVpcAttachmentRequest , CreateTransitGatewayVpcAttachmentRequestOptions , CreateTransitGatewayVpcAttachmentResult , CreateVolumeRequest , CreateVpcEndpointConnectionNotificationRequest , CreateVpcEndpointConnectionNotificationResult , CreateVpcEndpointRequest , CreateVpcEndpointResult , CreateVpcEndpointServiceConfigurationRequest , CreateVpcEndpointServiceConfigurationResult , CreateVpcPeeringConnectionRequest , CreateVpcPeeringConnectionResult , CreateVpcRequest , CreateVpcResult , CreateVpnConnectionRequest , CreateVpnConnectionResult , CreateVpnConnectionRouteRequest , CreateVpnGatewayRequest , CreateVpnGatewayResult , DeleteCarrierGatewayRequest , DeleteCarrierGatewayResult , DeleteClientVpnEndpointRequest , DeleteClientVpnEndpointResult , DeleteClientVpnRouteRequest , DeleteClientVpnRouteResult , DeleteCustomerGatewayRequest , DeleteDhcpOptionsRequest , DeleteEgressOnlyInternetGatewayRequest , DeleteEgressOnlyInternetGatewayResult , DeleteFleetError , DeleteFleetErrorItem , DeleteFleetsRequest , DeleteFleetsResult , DeleteFleetSuccessItem , DeleteFlowLogsRequest , DeleteFlowLogsResult , DeleteFpgaImageRequest , DeleteFpgaImageResult , DeleteInstanceEventWindowRequest , DeleteInstanceEventWindowResult , DeleteInternetGatewayRequest , DeleteIpamPoolRequest , DeleteIpamPoolResult , DeleteIpamRequest , DeleteIpamResult , DeleteIpamScopeRequest , DeleteIpamScopeResult , DeleteKeyPairRequest , DeleteLaunchTemplateRequest , DeleteLaunchTemplateResult , DeleteLaunchTemplateVersionsRequest , DeleteLaunchTemplateVersionsResponseErrorItem , DeleteLaunchTemplateVersionsResponseSuccessItem , DeleteLaunchTemplateVersionsResult , DeleteLocalGatewayRouteRequest , DeleteLocalGatewayRouteResult , DeleteLocalGatewayRouteTableVpcAssociationRequest , DeleteLocalGatewayRouteTableVpcAssociationResult , DeleteManagedPrefixListRequest , DeleteManagedPrefixListResult , DeleteNatGatewayRequest , DeleteNatGatewayResult , DeleteNetworkAclEntryRequest , DeleteNetworkAclRequest , DeleteNetworkInsightsAccessScopeAnalysisRequest , DeleteNetworkInsightsAccessScopeAnalysisResult , DeleteNetworkInsightsAccessScopeRequest , DeleteNetworkInsightsAccessScopeResult , DeleteNetworkInsightsAnalysisRequest , DeleteNetworkInsightsAnalysisResult , DeleteNetworkInsightsPathRequest , DeleteNetworkInsightsPathResult , DeleteNetworkInterfacePermissionRequest , DeleteNetworkInterfacePermissionResult , DeleteNetworkInterfaceRequest , DeletePlacementGroupRequest , DeletePublicIpv4PoolRequest , DeletePublicIpv4PoolResult , DeleteQueuedReservedInstancesError , DeleteQueuedReservedInstancesRequest , DeleteQueuedReservedInstancesResult , DeleteRouteRequest , DeleteRouteTableRequest , DeleteSecurityGroupRequest , DeleteSnapshotRequest , DeleteSpotDatafeedSubscriptionRequest , DeleteSubnetCidrReservationRequest , DeleteSubnetCidrReservationResult , DeleteSubnetRequest , DeleteTagsRequest , DeleteTrafficMirrorFilterRequest , DeleteTrafficMirrorFilterResult , DeleteTrafficMirrorFilterRuleRequest , DeleteTrafficMirrorFilterRuleResult , DeleteTrafficMirrorSessionRequest , DeleteTrafficMirrorSessionResult , DeleteTrafficMirrorTargetRequest , DeleteTrafficMirrorTargetResult , DeleteTransitGatewayConnectPeerRequest , DeleteTransitGatewayConnectPeerResult , DeleteTransitGatewayConnectRequest , DeleteTransitGatewayConnectResult , DeleteTransitGatewayMulticastDomainRequest , DeleteTransitGatewayMulticastDomainResult , DeleteTransitGatewayPeeringAttachmentRequest , DeleteTransitGatewayPeeringAttachmentResult , DeleteTransitGatewayPrefixListReferenceRequest , DeleteTransitGatewayPrefixListReferenceResult , DeleteTransitGatewayRequest , DeleteTransitGatewayResult , DeleteTransitGatewayRouteRequest , DeleteTransitGatewayRouteResult , DeleteTransitGatewayRouteTableRequest , DeleteTransitGatewayRouteTableResult , DeleteTransitGatewayVpcAttachmentRequest , DeleteTransitGatewayVpcAttachmentResult , DeleteVolumeRequest , DeleteVpcEndpointConnectionNotificationsRequest , DeleteVpcEndpointConnectionNotificationsResult , DeleteVpcEndpointServiceConfigurationsRequest , DeleteVpcEndpointServiceConfigurationsResult , DeleteVpcEndpointsRequest , DeleteVpcEndpointsResult , DeleteVpcPeeringConnectionRequest , DeleteVpcPeeringConnectionResult , DeleteVpcRequest , DeleteVpnConnectionRequest , DeleteVpnConnectionRouteRequest , DeleteVpnGatewayRequest , DeprovisionByoipCidrRequest , DeprovisionByoipCidrResult , DeprovisionIpamPoolCidrRequest , DeprovisionIpamPoolCidrResult , DeprovisionPublicIpv4PoolCidrRequest , DeprovisionPublicIpv4PoolCidrResult , DeregisterImageRequest , DeregisterInstanceEventNotificationAttributesRequest , DeregisterInstanceEventNotificationAttributesResult , DeregisterInstanceTagAttributeRequest , DeregisterTransitGatewayMulticastGroupMembersRequest , DeregisterTransitGatewayMulticastGroupMembersResult , DeregisterTransitGatewayMulticastGroupSourcesRequest , DeregisterTransitGatewayMulticastGroupSourcesResult , DescribeAccountAttributesRequest , DescribeAccountAttributesResult , DescribeAddressesAttributeRequest , DescribeAddressesAttributeResult , DescribeAddressesRequest , DescribeAddressesResult , DescribeAggregateIdFormatRequest , DescribeAggregateIdFormatResult , DescribeAvailabilityZonesRequest , DescribeAvailabilityZonesResult , DescribeBundleTasksRequest , DescribeBundleTasksResult , DescribeByoipCidrsRequest , DescribeByoipCidrsResult , DescribeCapacityReservationFleetsRequest , DescribeCapacityReservationFleetsResult , DescribeCapacityReservationsRequest , DescribeCapacityReservationsResult , DescribeCarrierGatewaysRequest , DescribeCarrierGatewaysResult , DescribeClassicLinkInstancesRequest , DescribeClassicLinkInstancesResult , DescribeClientVpnAuthorizationRulesRequest , DescribeClientVpnAuthorizationRulesResult , DescribeClientVpnConnectionsRequest , DescribeClientVpnConnectionsResult , DescribeClientVpnEndpointsRequest , DescribeClientVpnEndpointsResult , DescribeClientVpnRoutesRequest , DescribeClientVpnRoutesResult , DescribeClientVpnTargetNetworksRequest , DescribeClientVpnTargetNetworksResult , DescribeCoipPoolsRequest , DescribeCoipPoolsResult , DescribeConversionTasksRequest , DirectoryServiceAuthentication , DiskImageDescription , DiskImageVolumeDescription , DnsEntry , FailedQueuedPurchaseDeletion , FederatedAuthentication , Filter , IdFormat , IKEVersionsListValue , IKEVersionsRequestListValue , ImportInstanceTaskDetails , ImportInstanceVolumeDetailItem , InstanceEventWindowStateChange , InstanceTagNotificationAttribute , IpamPoolCidr , IpamPoolCidrFailureReason , LastError , Phase1DHGroupNumbersListValue , Phase1DHGroupNumbersRequestListValue , Phase1EncryptionAlgorithmsListValue , Phase1EncryptionAlgorithmsRequestListValue , Phase1IntegrityAlgorithmsListValue , Phase1IntegrityAlgorithmsRequestListValue , Phase2DHGroupNumbersListValue , Phase2DHGroupNumbersRequestListValue , Phase2EncryptionAlgorithmsListValue , Phase2EncryptionAlgorithmsRequestListValue , Phase2IntegrityAlgorithmsListValue , Phase2IntegrityAlgorithmsRequestListValue , PrivateDnsNameConfiguration , ResponseError , SecurityGroupIdentifier , ServiceConfiguration , ServiceTypeDetail , SuccessfulQueuedPurchaseDeletion , TargetNetwork , TransitGatewayAttachmentBgpConfiguration , TransitGatewayConnectPeer , TransitGatewayConnectPeerConfiguration , TransitGatewayMulticastDeregisteredGroupMembers , TransitGatewayMulticastDeregisteredGroupSources , TransitGatewayMulticastDomain , TransitGatewayMulticastDomainOptions , TransitGatewayPrefixListAttachment , TransitGatewayPrefixListReference , TransitGatewayRoute , TransitGatewayRouteAttachment , TransitGatewayRouteTable , TunnelOption , VgwTelemetry , Volume , VpcEndpoint , VpnConnection , VpnConnectionOptions , VpnConnectionOptionsSpecification , VpnGateway , VpnStaticRoute , VpnTunnelOptionsSpecification , } from "../models/models_2" ; import { AnalysisLoadBalancerListener , AnalysisLoadBalancerTarget , ArchitectureType , AttributeBooleanValue , AvailableCapacity , BootModeType , CapacityReservationOptions , CapacityReservationSpecificationResponse , ConversionTask , CpuOptions , DescribeConversionTasksResult , DescribeCustomerGatewaysRequest , DescribeCustomerGatewaysResult , DescribeDhcpOptionsRequest , DescribeDhcpOptionsResult , DescribeEgressOnlyInternetGatewaysRequest , DescribeEgressOnlyInternetGatewaysResult , DescribeElasticGpusRequest , DescribeElasticGpusResult , DescribeExportImageTasksRequest , DescribeExportImageTasksResult , DescribeExportTasksRequest , DescribeExportTasksResult , DescribeFastSnapshotRestoresRequest , DescribeFastSnapshotRestoresResult , DescribeFastSnapshotRestoreSuccessItem , DescribeFleetError , DescribeFleetHistoryRequest , DescribeFleetHistoryResult , DescribeFleetInstancesRequest , DescribeFleetInstancesResult , DescribeFleetsInstances , DescribeFleetsRequest , DescribeFleetsResult , DescribeFlowLogsRequest , DescribeFlowLogsResult , DescribeFpgaImageAttributeRequest , DescribeFpgaImageAttributeResult , DescribeFpgaImagesRequest , DescribeFpgaImagesResult , DescribeHostReservationOfferingsRequest , DescribeHostReservationOfferingsResult , DescribeHostReservationsRequest , DescribeHostReservationsResult , DescribeHostsRequest , DescribeHostsResult , DescribeIamInstanceProfileAssociationsRequest , DescribeIamInstanceProfileAssociationsResult , DescribeIdentityIdFormatRequest , DescribeIdentityIdFormatResult , DescribeIdFormatRequest , DescribeIdFormatResult , DescribeImageAttributeRequest , DescribeImagesRequest , DescribeImagesResult , DescribeImportImageTasksRequest , DescribeImportImageTasksResult , DescribeImportSnapshotTasksRequest , DescribeImportSnapshotTasksResult , DescribeInstanceAttributeRequest , DescribeInstanceCreditSpecificationsRequest , DescribeInstanceCreditSpecificationsResult , DescribeInstanceEventNotificationAttributesRequest , DescribeInstanceEventNotificationAttributesResult , DescribeInstanceEventWindowsRequest , DescribeInstanceEventWindowsResult , DescribeInstancesRequest , DescribeInstancesResult , DescribeInstanceStatusRequest , DescribeInstanceStatusResult , DescribeInstanceTypeOfferingsRequest , DescribeInstanceTypeOfferingsResult , DescribeInstanceTypesRequest , DescribeInstanceTypesResult , DescribeInternetGatewaysRequest , DescribeInternetGatewaysResult , DescribeIpamPoolsRequest , DescribeIpamPoolsResult , DescribeIpamScopesRequest , DescribeIpamScopesResult , DescribeIpamsRequest , DescribeIpamsResult , DescribeIpv6PoolsRequest , DescribeIpv6PoolsResult , DescribeKeyPairsRequest , DescribeKeyPairsResult , DescribeLaunchTemplatesRequest , DescribeLaunchTemplatesResult , DescribeLaunchTemplateVersionsRequest , DescribeLaunchTemplateVersionsResult , DescribeLocalGatewayRouteTablesRequest , DescribeLocalGatewayRouteTablesResult , DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsRequest , DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsResult , DescribeLocalGatewayRouteTableVpcAssociationsRequest , DescribeLocalGatewayRouteTableVpcAssociationsResult , DescribeLocalGatewaysRequest , DescribeLocalGatewaysResult , DescribeLocalGatewayVirtualInterfaceGroupsRequest , DescribeLocalGatewayVirtualInterfaceGroupsResult , DescribeLocalGatewayVirtualInterfacesRequest , DescribeLocalGatewayVirtualInterfacesResult , DescribeManagedPrefixListsRequest , DescribeManagedPrefixListsResult , DescribeMovingAddressesRequest , DescribeMovingAddressesResult , DescribeNatGatewaysRequest , DescribeNatGatewaysResult , DescribeNetworkAclsRequest , DescribeNetworkAclsResult , DescribeNetworkInsightsAccessScopeAnalysesRequest , DescribeNetworkInsightsAccessScopeAnalysesResult , DescribeNetworkInsightsAccessScopesRequest , DescribeNetworkInsightsAccessScopesResult , DescribeNetworkInsightsAnalysesRequest , DescribeNetworkInsightsAnalysesResult , DescribeNetworkInsightsPathsRequest , DescribeNetworkInsightsPathsResult , DescribeNetworkInterfaceAttributeRequest , DescribeNetworkInterfaceAttributeResult , DescribeNetworkInterfacePermissionsRequest , DescribeNetworkInterfacePermissionsResult , DescribeNetworkInterfacesRequest , DescribeNetworkInterfacesResult , DescribePlacementGroupsRequest , DescribePlacementGroupsResult , DescribePrefixListsRequest , DescribePrefixListsResult , DescribePrincipalIdFormatRequest , DescribePrincipalIdFormatResult , DescribePublicIpv4PoolsRequest , DescribePublicIpv4PoolsResult , DescribeRegionsRequest , DescribeRegionsResult , DescribeReplaceRootVolumeTasksRequest , DescribeReplaceRootVolumeTasksResult , DescribeReservedInstancesListingsRequest , DescribeReservedInstancesListingsResult , DescribeReservedInstancesModificationsRequest , DescribeReservedInstancesRequest , DescribeReservedInstancesResult , DestinationOptionsResponse , DiskInfo , EbsInfo , EbsInstanceBlockDevice , EbsOptimizedInfo , EfaInfo , ElasticGpuAssociation , ElasticGpuHealth , ElasticGpus , ElasticInferenceAcceleratorAssociation , EnclaveOptions , EventInformation , Explanation , ExportImageTask , ExportTaskS3Location , FleetData , FleetLaunchTemplateConfig , FleetSpotCapacityRebalance , FleetSpotMaintenanceStrategies , FlowLog , FpgaDeviceInfo , FpgaDeviceMemoryInfo , FpgaImage , FpgaImageAttribute , FpgaImageState , FpgaInfo , GpuDeviceInfo , GpuDeviceMemoryInfo , GpuInfo , HibernationOptions , HistoryRecordEntry , Host , HostInstance , HostOffering , HostProperties , HostReservation , Image , ImageAttribute , ImportImageLicenseConfigurationResponse , ImportImageTask , ImportSnapshotTask , ImportVolumeTaskDetails , InferenceAcceleratorInfo , InferenceDeviceInfo , Instance , InstanceAttribute , InstanceBlockDeviceMapping , InstanceCapacity , InstanceCreditSpecification , InstanceIpv4Prefix , InstanceIpv6Prefix , InstanceMetadataOptionsResponse , InstanceNetworkInterface , InstanceNetworkInterfaceAssociation , InstanceNetworkInterfaceAttachment , InstancePrivateIpAddress , InstanceState , InstanceStatus , InstanceStatusDetails , InstanceStatusEvent , InstanceStatusSummary , InstanceStorageInfo , InstanceTypeInfo , InstanceTypeOffering , Ipv6Pool , KeyPairInfo , LaunchPermission , LicenseConfiguration , LoadPermission , LocalGateway , LocalGatewayRouteTable , LocalGatewayRouteTableVirtualInterfaceGroupAssociation , LocalGatewayVirtualInterface , LocalGatewayVirtualInterfaceGroup , MemoryInfo , Monitoring , MovingAddressStatus , NetworkCardInfo , NetworkInfo , NetworkInsightsAccessScopeAnalysis , NetworkInsightsAnalysis , OnDemandOptions , PciId , PlacementGroupInfo , PlacementGroupStrategy , PoolCidrBlock , PrefixList , PrincipalIdFormat , PrivateDnsNameOptionsResponse , ProcessorInfo , ProductCode , PublicIpv4Pool , PublicIpv4PoolRange , RecurringCharge , Region , Reservation , ReservedInstances , ReservedInstancesConfiguration , RootDeviceType , SnapshotDetail , SnapshotTaskDetail , SpotOptions , StateReason , TargetCapacitySpecification , UsageClassType , UserBucketDetails , VCpuInfo , VirtualizationType , } from "../models/models_3" ; import { AssociatedRole , AthenaIntegration , CapacityReservationGroup , ClassicLinkDnsSupport , ClassicLoadBalancer , ClassicLoadBalancersConfig , ClientCertificateRevocationListStatus , CoipAddressUsage , CreateVolumePermission , DescribeReservedInstancesModificationsResult , DescribeReservedInstancesOfferingsRequest , DescribeReservedInstancesOfferingsResult , DescribeRouteTablesRequest , DescribeRouteTablesResult , DescribeScheduledInstanceAvailabilityRequest , DescribeScheduledInstanceAvailabilityResult , DescribeScheduledInstancesRequest , DescribeScheduledInstancesResult , DescribeSecurityGroupReferencesRequest , DescribeSecurityGroupReferencesResult , DescribeSecurityGroupRulesRequest , DescribeSecurityGroupRulesResult , DescribeSecurityGroupsRequest , DescribeSecurityGroupsResult , DescribeSnapshotAttributeRequest , DescribeSnapshotAttributeResult , DescribeSnapshotsRequest , DescribeSnapshotsResult , DescribeSnapshotTierStatusRequest , DescribeSnapshotTierStatusResult , DescribeSpotDatafeedSubscriptionRequest , DescribeSpotDatafeedSubscriptionResult , DescribeSpotFleetInstancesRequest , DescribeSpotFleetInstancesResponse , DescribeSpotFleetRequestHistoryRequest , DescribeSpotFleetRequestHistoryResponse , DescribeSpotFleetRequestsRequest , DescribeSpotFleetRequestsResponse , DescribeSpotInstanceRequestsRequest , DescribeSpotInstanceRequestsResult , DescribeSpotPriceHistoryRequest , DescribeSpotPriceHistoryResult , DescribeStaleSecurityGroupsRequest , DescribeStaleSecurityGroupsResult , DescribeStoreImageTasksRequest , DescribeStoreImageTasksResult , DescribeSubnetsRequest , DescribeSubnetsResult , DescribeTagsRequest , DescribeTagsResult , DescribeTrafficMirrorFiltersRequest , DescribeTrafficMirrorFiltersResult , DescribeTrafficMirrorSessionsRequest , DescribeTrafficMirrorSessionsResult , DescribeTrafficMirrorTargetsRequest , DescribeTrafficMirrorTargetsResult , DescribeTransitGatewayAttachmentsRequest , DescribeTransitGatewayAttachmentsResult , DescribeTransitGatewayConnectPeersRequest , DescribeTransitGatewayConnectPeersResult , DescribeTransitGatewayConnectsRequest , DescribeTransitGatewayConnectsResult , DescribeTransitGatewayMulticastDomainsRequest , DescribeTransitGatewayMulticastDomainsResult , DescribeTransitGatewayPeeringAttachmentsRequest , DescribeTransitGatewayPeeringAttachmentsResult , DescribeTransitGatewayRouteTablesRequest , DescribeTransitGatewayRouteTablesResult , DescribeTransitGatewaysRequest , DescribeTransitGatewaysResult , DescribeTransitGatewayVpcAttachmentsRequest , DescribeTransitGatewayVpcAttachmentsResult , DescribeTrunkInterfaceAssociationsRequest , DescribeTrunkInterfaceAssociationsResult , DescribeVolumeAttributeRequest , DescribeVolumeAttributeResult , DescribeVolumesModificationsRequest , DescribeVolumesModificationsResult , DescribeVolumesRequest , DescribeVolumesResult , DescribeVolumeStatusRequest , DescribeVolumeStatusResult , DescribeVpcAttributeRequest , DescribeVpcAttributeResult , DescribeVpcClassicLinkDnsSupportRequest , DescribeVpcClassicLinkDnsSupportResult , DescribeVpcClassicLinkRequest , DescribeVpcClassicLinkResult , DescribeVpcEndpointConnectionNotificationsRequest , DescribeVpcEndpointConnectionNotificationsResult , DescribeVpcEndpointConnectionsRequest , DescribeVpcEndpointConnectionsResult , DescribeVpcEndpointServiceConfigurationsRequest , DescribeVpcEndpointServiceConfigurationsResult , DescribeVpcEndpointServicePermissionsRequest , DescribeVpcEndpointServicePermissionsResult , DescribeVpcEndpointServicesRequest , DescribeVpcEndpointServicesResult , DescribeVpcEndpointsRequest , DescribeVpcEndpointsResult , DescribeVpcPeeringConnectionsRequest , DescribeVpcPeeringConnectionsResult , DescribeVpcsRequest , DescribeVpcsResult , DescribeVpnConnectionsRequest , DescribeVpnConnectionsResult , DescribeVpnGatewaysRequest , DescribeVpnGatewaysResult , DetachClassicLinkVpcRequest , DetachClassicLinkVpcResult , DetachInternetGatewayRequest , DetachNetworkInterfaceRequest , DetachVolumeRequest , DetachVpnGatewayRequest , DisableEbsEncryptionByDefaultRequest , DisableEbsEncryptionByDefaultResult , DisableFastSnapshotRestoreErrorItem , DisableFastSnapshotRestoresRequest , DisableFastSnapshotRestoresResult , DisableFastSnapshotRestoreStateError , DisableFastSnapshotRestoreStateErrorItem , DisableFastSnapshotRestoreSuccessItem , DisableImageDeprecationRequest , DisableImageDeprecationResult , DisableIpamOrganizationAdminAccountRequest , DisableIpamOrganizationAdminAccountResult , DisableSerialConsoleAccessRequest , DisableSerialConsoleAccessResult , DisableTransitGatewayRouteTablePropagationRequest , DisableTransitGatewayRouteTablePropagationResult , DisableVgwRoutePropagationRequest , DisableVpcClassicLinkDnsSupportRequest , DisableVpcClassicLinkDnsSupportResult , DisableVpcClassicLinkRequest , DisableVpcClassicLinkResult , DisassociateAddressRequest , DisassociateClientVpnTargetNetworkRequest , DisassociateClientVpnTargetNetworkResult , DisassociateEnclaveCertificateIamRoleRequest , DisassociateEnclaveCertificateIamRoleResult , DisassociateIamInstanceProfileRequest , DisassociateIamInstanceProfileResult , DisassociateInstanceEventWindowRequest , DisassociateInstanceEventWindowResult , DisassociateRouteTableRequest , DisassociateSubnetCidrBlockRequest , DisassociateSubnetCidrBlockResult , DisassociateTransitGatewayMulticastDomainRequest , DisassociateTransitGatewayMulticastDomainResult , DisassociateTransitGatewayRouteTableRequest , DisassociateTransitGatewayRouteTableResult , DisassociateTrunkInterfaceRequest , DisassociateTrunkInterfaceResult , DisassociateVpcCidrBlockRequest , DisassociateVpcCidrBlockResult , EnableEbsEncryptionByDefaultRequest , EnableEbsEncryptionByDefaultResult , EnableFastSnapshotRestoreErrorItem , EnableFastSnapshotRestoresRequest , EnableFastSnapshotRestoresResult , EnableFastSnapshotRestoreStateError , EnableFastSnapshotRestoreStateErrorItem , EnableFastSnapshotRestoreSuccessItem , EnableImageDeprecationRequest , EnableImageDeprecationResult , EnableIpamOrganizationAdminAccountRequest , EnableIpamOrganizationAdminAccountResult , EnableSerialConsoleAccessRequest , EnableSerialConsoleAccessResult , EnableTransitGatewayRouteTablePropagationRequest , EnableTransitGatewayRouteTablePropagationResult , EnableVgwRoutePropagationRequest , EnableVolumeIORequest , EnableVpcClassicLinkDnsSupportRequest , EnableVpcClassicLinkDnsSupportResult , EnableVpcClassicLinkRequest , EnableVpcClassicLinkResult , ExportClientVpnClientCertificateRevocationListRequest , ExportClientVpnClientCertificateRevocationListResult , ExportClientVpnClientConfigurationRequest , ExportClientVpnClientConfigurationResult , ExportImageRequest , ExportImageResult , ExportTaskS3LocationRequest , ExportTransitGatewayRoutesRequest , ExportTransitGatewayRoutesResult , GetAssociatedEnclaveCertificateIamRolesRequest , GetAssociatedEnclaveCertificateIamRolesResult , GetAssociatedIpv6PoolCidrsRequest , GetAssociatedIpv6PoolCidrsResult , GetCapacityReservationUsageRequest , GetCapacityReservationUsageResult , GetCoipPoolUsageRequest , GetCoipPoolUsageResult , GetConsoleOutputRequest , GetConsoleOutputResult , GetConsoleScreenshotRequest , GetConsoleScreenshotResult , GetDefaultCreditSpecificationRequest , GetDefaultCreditSpecificationResult , GetEbsDefaultKmsKeyIdRequest , GetEbsDefaultKmsKeyIdResult , GetEbsEncryptionByDefaultRequest , GetEbsEncryptionByDefaultResult , GetFlowLogsIntegrationTemplateRequest , GetFlowLogsIntegrationTemplateResult , GetGroupsForCapacityReservationRequest , GetGroupsForCapacityReservationResult , GetHostReservationPurchasePreviewRequest , GetHostReservationPurchasePreviewResult , GetInstanceTypesFromInstanceRequirementsRequest , GetInstanceTypesFromInstanceRequirementsResult , GetIpamAddressHistoryRequest , GetIpamAddressHistoryResult , GetIpamPoolAllocationsRequest , GetIpamPoolAllocationsResult , GetIpamPoolCidrsRequest , GetIpamPoolCidrsResult , GetIpamResourceCidrsRequest , HistoryRecord , InstanceEventWindowDisassociationRequest , InstanceFamilyCreditSpecification , InstanceNetworkInterfaceSpecification , InstanceTypeInfoFromInstanceRequirements , InstanceUsage , IntegrateServices , IpamAddressHistoryRecord , Ipv6CidrAssociation , LaunchSpecification , LaunchTemplateConfig , LaunchTemplateOverrides , LoadBalancersConfig , PricingDetail , PrivateDnsDetails , Purchase , ReservedInstancesId , ReservedInstancesModification , ReservedInstancesModificationResult , ReservedInstancesOffering , RunInstancesMonitoringEnabled , ScheduledInstance , ScheduledInstanceAvailability , ScheduledInstanceRecurrence , ScheduledInstanceRecurrenceRequest , SecurityGroup , SecurityGroupReference , ServiceDetail , SlotDateTimeRangeRequest , SlotStartTimeRangeRequest , SnapshotTierStatus , SpotCapacityRebalance , SpotFleetLaunchSpecification , SpotFleetMonitoring , SpotFleetRequestConfig , SpotFleetRequestConfigData , SpotFleetTagSpecification , SpotInstanceRequest , SpotInstanceStatus , SpotMaintenanceStrategies , SpotPlacement , SpotPrice , StaleIpPermission , StaleSecurityGroup , StoreImageTaskResult , TagDescription , TargetGroup , TargetGroupsConfig , TransitGatewayAttachment , TransitGatewayAttachmentAssociation , TransitGatewayPropagation , VolumeModification , VolumeStatusAction , VolumeStatusAttachmentStatus , VolumeStatusDetails , VolumeStatusEvent , VolumeStatusInfo , VolumeStatusItem , VpcClassicLink , VpcEndpointConnection , } from "../models/models_4" ; import { BlobAttributeValue , CapacityReservationSpecification , CidrAuthorizationContext , ClientData , CpuOptionsRequest , CreateVolumePermissionModifications , DiskImage , DiskImageDetail , DnsServersOptionsModifyStructure , EbsInstanceBlockDeviceSpecification , GetIpamResourceCidrsResult , GetLaunchTemplateDataRequest , GetLaunchTemplateDataResult , GetManagedPrefixListAssociationsRequest , GetManagedPrefixListAssociationsResult , GetManagedPrefixListEntriesRequest , GetManagedPrefixListEntriesResult , GetNetworkInsightsAccessScopeAnalysisFindingsRequest , GetNetworkInsightsAccessScopeAnalysisFindingsResult , GetNetworkInsightsAccessScopeContentRequest , GetNetworkInsightsAccessScopeContentResult , GetPasswordDataRequest , GetPasswordDataResult , GetReservedInstancesExchangeQuoteRequest , GetReservedInstancesExchangeQuoteResult , GetSerialConsoleAccessStatusRequest , GetSerialConsoleAccessStatusResult , GetSpotPlacementScoresRequest , GetSpotPlacementScoresResult , GetSubnetCidrReservationsRequest , GetSubnetCidrReservationsResult , GetTransitGatewayAttachmentPropagationsRequest , GetTransitGatewayAttachmentPropagationsResult , GetTransitGatewayMulticastDomainAssociationsRequest , GetTransitGatewayMulticastDomainAssociationsResult , GetTransitGatewayPrefixListReferencesRequest , GetTransitGatewayPrefixListReferencesResult , GetTransitGatewayRouteTableAssociationsRequest , GetTransitGatewayRouteTableAssociationsResult , GetTransitGatewayRouteTablePropagationsRequest , GetTransitGatewayRouteTablePropagationsResult , GetVpnConnectionDeviceSampleConfigurationRequest , GetVpnConnectionDeviceSampleConfigurationResult , GetVpnConnectionDeviceTypesRequest , GetVpnConnectionDeviceTypesResult , ImageDiskContainer , ImportClientVpnClientCertificateRevocationListRequest , ImportClientVpnClientCertificateRevocationListResult , ImportImageLicenseConfigurationRequest , ImportImageRequest , ImportImageResult , ImportInstanceLaunchSpecification , ImportInstanceRequest , ImportInstanceResult , ImportKeyPairRequest , ImportKeyPairResult , ImportSnapshotRequest , ImportSnapshotResult , ImportVolumeRequest , ImportVolumeResult , InstanceBlockDeviceMappingSpecification , InstanceCreditSpecificationRequest , InstanceMonitoring , InstanceRequirementsWithMetadataRequest , IpamCidrAuthorizationContext , IpamResourceCidr , LaunchPermissionModifications , ListSnapshotsInRecycleBinRequest , ListSnapshotsInRecycleBinResult , LoadPermissionModifications , LoadPermissionRequest , ModifyAddressAttributeRequest , ModifyAddressAttributeResult , ModifyAvailabilityZoneGroupRequest , ModifyAvailabilityZoneGroupResult , ModifyCapacityReservationFleetRequest , ModifyCapacityReservationFleetResult , ModifyCapacityReservationRequest , ModifyCapacityReservationResult , ModifyClientVpnEndpointRequest , ModifyClientVpnEndpointResult , ModifyDefaultCreditSpecificationRequest , ModifyDefaultCreditSpecificationResult , ModifyEbsDefaultKmsKeyIdRequest , ModifyEbsDefaultKmsKeyIdResult , ModifyFleetRequest , ModifyFleetResult , ModifyFpgaImageAttributeRequest , ModifyFpgaImageAttributeResult , ModifyHostsRequest , ModifyHostsResult , ModifyIdentityIdFormatRequest , ModifyIdFormatRequest , ModifyImageAttributeRequest , ModifyInstanceAttributeRequest , ModifyInstanceCapacityReservationAttributesRequest , ModifyInstanceCapacityReservationAttributesResult , ModifyInstanceCreditSpecificationRequest , ModifyInstanceCreditSpecificationResult , ModifyInstanceEventStartTimeRequest , ModifyInstanceEventStartTimeResult , ModifyInstanceEventWindowRequest , ModifyInstanceEventWindowResult , ModifyInstanceMetadataOptionsRequest , ModifyInstanceMetadataOptionsResult , ModifyInstancePlacementRequest , ModifyInstancePlacementResult , ModifyIpamPoolRequest , ModifyIpamPoolResult , ModifyIpamRequest , ModifyIpamResourceCidrRequest , ModifyIpamResourceCidrResult , ModifyIpamResult , ModifyIpamScopeRequest , ModifyIpamScopeResult , ModifyLaunchTemplateRequest , ModifyLaunchTemplateResult , ModifyManagedPrefixListRequest , ModifyManagedPrefixListResult , ModifyNetworkInterfaceAttributeRequest , ModifyPrivateDnsNameOptionsRequest , ModifyPrivateDnsNameOptionsResult , ModifyReservedInstancesRequest , ModifyReservedInstancesResult , ModifySecurityGroupRulesRequest , ModifySecurityGroupRulesResult , ModifySnapshotAttributeRequest , ModifySnapshotTierRequest , ModifySnapshotTierResult , ModifySpotFleetRequestRequest , ModifySpotFleetRequestResponse , ModifySubnetAttributeRequest , ModifyTrafficMirrorFilterNetworkServicesRequest , ModifyTrafficMirrorFilterNetworkServicesResult , ModifyTrafficMirrorFilterRuleRequest , ModifyTrafficMirrorFilterRuleResult , ModifyTrafficMirrorSessionRequest , ModifyTrafficMirrorSessionResult , ModifyTransitGatewayOptions , ModifyTransitGatewayPrefixListReferenceRequest , ModifyTransitGatewayPrefixListReferenceResult , ModifyTransitGatewayRequest , ModifyTransitGatewayResult , ModifyTransitGatewayVpcAttachmentRequest , ModifyTransitGatewayVpcAttachmentRequestOptions , ModifyTransitGatewayVpcAttachmentResult , ModifyVolumeAttributeRequest , ModifyVolumeRequest , ModifyVolumeResult , ModifyVpcAttributeRequest , ModifyVpcEndpointConnectionNotificationRequest , ModifyVpcEndpointConnectionNotificationResult , ModifyVpcEndpointRequest , ModifyVpcEndpointResult , ModifyVpcEndpointServiceConfigurationRequest , ModifyVpcEndpointServiceConfigurationResult , ModifyVpcEndpointServicePayerResponsibilityRequest , ModifyVpcEndpointServicePayerResponsibilityResult , ModifyVpcEndpointServicePermissionsRequest , ModifyVpcEndpointServicePermissionsResult , ModifyVpcPeeringConnectionOptionsRequest , ModifyVpcPeeringConnectionOptionsResult , ModifyVpcTenancyRequest , ModifyVpcTenancyResult , ModifyVpnConnectionOptionsRequest , ModifyVpnConnectionOptionsResult , ModifyVpnConnectionRequest , ModifyVpnConnectionResult , ModifyVpnTunnelCertificateRequest , ModifyVpnTunnelCertificateResult , ModifyVpnTunnelOptionsRequest , ModifyVpnTunnelOptionsResult , ModifyVpnTunnelOptionsSpecification , MonitorInstancesRequest , MonitorInstancesResult , MoveAddressToVpcRequest , MoveAddressToVpcResult , MoveByoipCidrToIpamRequest , MoveByoipCidrToIpamResult , NetworkInterfaceAttachmentChanges , PeeringConnectionOptions , PeeringConnectionOptionsRequest , PrefixListAssociation , PrefixListEntry , ProvisionByoipCidrRequest , ProvisionByoipCidrResult , ProvisionIpamPoolCidrRequest , ProvisionIpamPoolCidrResult , ProvisionPublicIpv4PoolCidrRequest , ProvisionPublicIpv4PoolCidrResult , PurchaseHostReservationRequest , PurchaseHostReservationResult , PurchaseRequest , PurchaseReservedInstancesOfferingRequest , PurchaseReservedInstancesOfferingResult , PurchaseScheduledInstancesRequest , PurchaseScheduledInstancesResult , RebootInstancesRequest , RegisterImageRequest , RegisterImageResult , RegisterInstanceEventNotificationAttributesRequest , RegisterInstanceEventNotificationAttributesResult , RegisterInstanceTagAttributeRequest , RegisterTransitGatewayMulticastGroupMembersRequest , RegisterTransitGatewayMulticastGroupMembersResult , RegisterTransitGatewayMulticastGroupSourcesRequest , RegisterTransitGatewayMulticastGroupSourcesResult , RejectTransitGatewayMulticastDomainAssociationsRequest , RejectTransitGatewayMulticastDomainAssociationsResult , RejectTransitGatewayPeeringAttachmentRequest , RejectTransitGatewayPeeringAttachmentResult , RejectTransitGatewayVpcAttachmentRequest , RejectTransitGatewayVpcAttachmentResult , RejectVpcEndpointConnectionsRequest , RejectVpcEndpointConnectionsResult , RejectVpcPeeringConnectionRequest , RejectVpcPeeringConnectionResult , ReleaseAddressRequest , ReleaseHostsRequest , ReleaseHostsResult , ReleaseIpamPoolAllocationRequest , ReleaseIpamPoolAllocationResult , RemoveIpamOperatingRegion , RemovePrefixListEntry , ReplaceIamInstanceProfileAssociationRequest , ReplaceIamInstanceProfileAssociationResult , ReplaceNetworkAclAssociationRequest , ReplaceNetworkAclAssociationResult , ReplaceNetworkAclEntryRequest , ReplaceRouteRequest , ReplaceRouteTableAssociationRequest , ReplaceRouteTableAssociationResult , ReplaceTransitGatewayRouteRequest , ReplaceTransitGatewayRouteResult , ReportInstanceReasonCodes , ReportInstanceStatusRequest , RequestSpotFleetRequest , RequestSpotFleetResponse , RequestSpotInstancesRequest , RequestSpotInstancesResult , RequestSpotLaunchSpecification , ReservationValue , ReservedInstanceLimitPrice , ReservedInstanceReservationValue , ResetAddressAttributeRequest , ResetAddressAttributeResult , ResetEbsDefaultKmsKeyIdRequest , ResetEbsDefaultKmsKeyIdResult , ResetFpgaImageAttributeRequest , ResetFpgaImageAttributeResult , ResetImageAttributeRequest , ResetInstanceAttributeRequest , ResetNetworkInterfaceAttributeRequest , ResetSnapshotAttributeRequest , RestoreAddressToClassicRequest , RestoreAddressToClassicResult , RestoreManagedPrefixListVersionRequest , RestoreManagedPrefixListVersionResult , RestoreSnapshotFromRecycleBinRequest , RestoreSnapshotFromRecycleBinResult , RestoreSnapshotTierRequest , RestoreSnapshotTierResult , RevokeClientVpnIngressRequest , RevokeClientVpnIngressResult , RevokeSecurityGroupEgressRequest , RevokeSecurityGroupEgressResult , RevokeSecurityGroupIngressRequest , RevokeSecurityGroupIngressResult , SecurityGroupRuleRequest , SecurityGroupRuleUpdate , SnapshotDiskContainer , SnapshotRecycleBinInfo , SpotPlacementScore , SuccessfulInstanceCreditSpecificationItem , TargetConfiguration , TargetReservationValue , TrafficMirrorFilterRuleField , TrafficMirrorSessionField , TransitGatewayAttachmentPropagation , TransitGatewayMulticastDomainAssociation , TransitGatewayMulticastRegisteredGroupMembers , TransitGatewayMulticastRegisteredGroupSources , TransitGatewayRouteTableAssociation , TransitGatewayRouteTablePropagation , UnsuccessfulInstanceCreditSpecificationItem , UnsuccessfulInstanceCreditSpecificationItemError , UserBucket , UserData , VolumeDetail , VpnConnectionDeviceType , } from "../models/models_5" ; import { ElasticInferenceAccelerator , EnclaveOptionsRequest , HibernationOptionsRequest , InstanceMarketOptionsRequest , InstanceMetadataOptionsRequest , InstanceStateChange , LaunchTemplateSpecification , LicenseConfigurationRequest , PrivateDnsNameOptionsRequest , RunInstancesRequest , RunScheduledInstancesRequest , RunScheduledInstancesResult , ScheduledInstancesBlockDeviceMapping , ScheduledInstancesEbs , ScheduledInstancesIamInstanceProfile , ScheduledInstancesIpv6Address , ScheduledInstancesLaunchSpecification , ScheduledInstancesMonitoring , ScheduledInstancesNetworkInterface , ScheduledInstancesPlacement , ScheduledInstancesPrivateIpAddressConfig , SearchLocalGatewayRoutesRequest , SearchLocalGatewayRoutesResult , SearchTransitGatewayMulticastGroupsRequest , SearchTransitGatewayMulticastGroupsResult , SearchTransitGatewayRoutesRequest , SearchTransitGatewayRoutesResult , SecurityGroupRuleDescription , SendDiagnosticInterruptRequest , SpotMarketOptions , StartInstancesRequest , StartInstancesResult , StartNetworkInsightsAccessScopeAnalysisRequest , StartNetworkInsightsAccessScopeAnalysisResult , StartNetworkInsightsAnalysisRequest , StartNetworkInsightsAnalysisResult , StartVpcEndpointServicePrivateDnsVerificationRequest , StartVpcEndpointServicePrivateDnsVerificationResult , StopInstancesRequest , StopInstancesResult , TerminateClientVpnConnectionsRequest , TerminateClientVpnConnectionsResult , TerminateConnectionStatus , TerminateInstancesRequest , TerminateInstancesResult , TransitGatewayMulticastGroup , UnassignIpv6AddressesRequest , UnassignIpv6AddressesResult , UnassignPrivateIpAddressesRequest , UnmonitorInstancesRequest , UnmonitorInstancesResult , UpdateSecurityGroupRuleDescriptionsEgressRequest , UpdateSecurityGroupRuleDescriptionsEgressResult , UpdateSecurityGroupRuleDescriptionsIngressRequest , UpdateSecurityGroupRuleDescriptionsIngressResult , WithdrawByoipCidrRequest , WithdrawByoipCidrResult , } from "../models/models_6" ; export const serializeAws_ec2AcceptReservedInstancesExchangeQuoteCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AcceptReservedInstancesExchangeQuoteRequest ( input , context ) , Action : "AcceptReservedInstancesExchangeQuote" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AcceptTransitGatewayMulticastDomainAssociationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AcceptTransitGatewayMulticastDomainAssociationsRequest ( input , context ) , Action : "AcceptTransitGatewayMulticastDomainAssociations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AcceptTransitGatewayPeeringAttachmentCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AcceptTransitGatewayPeeringAttachmentRequest ( input , context ) , Action : "AcceptTransitGatewayPeeringAttachment" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AcceptTransitGatewayVpcAttachmentCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AcceptTransitGatewayVpcAttachmentRequest ( input , context ) , Action : "AcceptTransitGatewayVpcAttachment" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AcceptVpcEndpointConnectionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AcceptVpcEndpointConnectionsRequest ( input , context ) , Action : "AcceptVpcEndpointConnections" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AcceptVpcPeeringConnectionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AcceptVpcPeeringConnectionRequest ( input , context ) , Action : "AcceptVpcPeeringConnection" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AdvertiseByoipCidrCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AdvertiseByoipCidrRequest ( input , context ) , Action : "AdvertiseByoipCidr" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AllocateAddressCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AllocateAddressRequest ( input , context ) , Action : "AllocateAddress" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AllocateHostsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AllocateHostsRequest ( input , context ) , Action : "AllocateHosts" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AllocateIpamPoolCidrCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AllocateIpamPoolCidrRequest ( input , context ) , Action : "AllocateIpamPoolCidr" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ApplySecurityGroupsToClientVpnTargetNetworkCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ApplySecurityGroupsToClientVpnTargetNetworkRequest ( input , context ) , Action : "ApplySecurityGroupsToClientVpnTargetNetwork" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AssignIpv6AddressesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AssignIpv6AddressesRequest ( input , context ) , Action : "AssignIpv6Addresses" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AssignPrivateIpAddressesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AssignPrivateIpAddressesRequest ( input , context ) , Action : "AssignPrivateIpAddresses" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AssociateAddressCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AssociateAddressRequest ( input , context ) , Action : "AssociateAddress" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AssociateClientVpnTargetNetworkCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AssociateClientVpnTargetNetworkRequest ( input , context ) , Action : "AssociateClientVpnTargetNetwork" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AssociateDhcpOptionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AssociateDhcpOptionsRequest ( input , context ) , Action : "AssociateDhcpOptions" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AssociateEnclaveCertificateIamRoleCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AssociateEnclaveCertificateIamRoleRequest ( input , context ) , Action : "AssociateEnclaveCertificateIamRole" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AssociateIamInstanceProfileCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AssociateIamInstanceProfileRequest ( input , context ) , Action : "AssociateIamInstanceProfile" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AssociateInstanceEventWindowCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AssociateInstanceEventWindowRequest ( input , context ) , Action : "AssociateInstanceEventWindow" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AssociateRouteTableCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AssociateRouteTableRequest ( input , context ) , Action : "AssociateRouteTable" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AssociateSubnetCidrBlockCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AssociateSubnetCidrBlockRequest ( input , context ) , Action : "AssociateSubnetCidrBlock" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AssociateTransitGatewayMulticastDomainCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AssociateTransitGatewayMulticastDomainRequest ( input , context ) , Action : "AssociateTransitGatewayMulticastDomain" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AssociateTransitGatewayRouteTableCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AssociateTransitGatewayRouteTableRequest ( input , context ) , Action : "AssociateTransitGatewayRouteTable" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AssociateTrunkInterfaceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AssociateTrunkInterfaceRequest ( input , context ) , Action : "AssociateTrunkInterface" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AssociateVpcCidrBlockCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AssociateVpcCidrBlockRequest ( input , context ) , Action : "AssociateVpcCidrBlock" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AttachClassicLinkVpcCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AttachClassicLinkVpcRequest ( input , context ) , Action : "AttachClassicLinkVpc" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AttachInternetGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AttachInternetGatewayRequest ( input , context ) , Action : "AttachInternetGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AttachNetworkInterfaceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AttachNetworkInterfaceRequest ( input , context ) , Action : "AttachNetworkInterface" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AttachVolumeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AttachVolumeRequest ( input , context ) , Action : "AttachVolume" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AttachVpnGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AttachVpnGatewayRequest ( input , context ) , Action : "AttachVpnGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AuthorizeClientVpnIngressCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AuthorizeClientVpnIngressRequest ( input , context ) , Action : "AuthorizeClientVpnIngress" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AuthorizeSecurityGroupEgressCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AuthorizeSecurityGroupEgressRequest ( input , context ) , Action : "AuthorizeSecurityGroupEgress" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2AuthorizeSecurityGroupIngressCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2AuthorizeSecurityGroupIngressRequest ( input , context ) , Action : "AuthorizeSecurityGroupIngress" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2BundleInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2BundleInstanceRequest ( input , context ) , Action : "BundleInstance" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CancelBundleTaskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CancelBundleTaskRequest ( input , context ) , Action : "CancelBundleTask" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CancelCapacityReservationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CancelCapacityReservationRequest ( input , context ) , Action : "CancelCapacityReservation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CancelCapacityReservationFleetsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CancelCapacityReservationFleetsRequest ( input , context ) , Action : "CancelCapacityReservationFleets" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CancelConversionTaskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CancelConversionRequest ( input , context ) , Action : "CancelConversionTask" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CancelExportTaskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CancelExportTaskRequest ( input , context ) , Action : "CancelExportTask" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CancelImportTaskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CancelImportTaskRequest ( input , context ) , Action : "CancelImportTask" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CancelReservedInstancesListingCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CancelReservedInstancesListingRequest ( input , context ) , Action : "CancelReservedInstancesListing" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CancelSpotFleetRequestsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CancelSpotFleetRequestsRequest ( input , context ) , Action : "CancelSpotFleetRequests" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CancelSpotInstanceRequestsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CancelSpotInstanceRequestsRequest ( input , context ) , Action : "CancelSpotInstanceRequests" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ConfirmProductInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ConfirmProductInstanceRequest ( input , context ) , Action : "ConfirmProductInstance" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CopyFpgaImageCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CopyFpgaImageRequest ( input , context ) , Action : "CopyFpgaImage" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CopyImageCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CopyImageRequest ( input , context ) , Action : "CopyImage" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CopySnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CopySnapshotRequest ( input , context ) , Action : "CopySnapshot" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateCapacityReservationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateCapacityReservationRequest ( input , context ) , Action : "CreateCapacityReservation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateCapacityReservationFleetCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateCapacityReservationFleetRequest ( input , context ) , Action : "CreateCapacityReservationFleet" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateCarrierGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateCarrierGatewayRequest ( input , context ) , Action : "CreateCarrierGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateClientVpnEndpointCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateClientVpnEndpointRequest ( input , context ) , Action : "CreateClientVpnEndpoint" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateClientVpnRouteCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateClientVpnRouteRequest ( input , context ) , Action : "CreateClientVpnRoute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateCustomerGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateCustomerGatewayRequest ( input , context ) , Action : "CreateCustomerGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateDefaultSubnetCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateDefaultSubnetRequest ( input , context ) , Action : "CreateDefaultSubnet" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateDefaultVpcCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateDefaultVpcRequest ( input , context ) , Action : "CreateDefaultVpc" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateDhcpOptionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateDhcpOptionsRequest ( input , context ) , Action : "CreateDhcpOptions" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateEgressOnlyInternetGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateEgressOnlyInternetGatewayRequest ( input , context ) , Action : "CreateEgressOnlyInternetGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateFleetCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateFleetRequest ( input , context ) , Action : "CreateFleet" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateFlowLogsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateFlowLogsRequest ( input , context ) , Action : "CreateFlowLogs" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateFpgaImageCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateFpgaImageRequest ( input , context ) , Action : "CreateFpgaImage" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateImageCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateImageRequest ( input , context ) , Action : "CreateImage" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateInstanceEventWindowCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateInstanceEventWindowRequest ( input , context ) , Action : "CreateInstanceEventWindow" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateInstanceExportTaskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateInstanceExportTaskRequest ( input , context ) , Action : "CreateInstanceExportTask" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateInternetGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateInternetGatewayRequest ( input , context ) , Action : "CreateInternetGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateIpamCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateIpamRequest ( input , context ) , Action : "CreateIpam" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateIpamPoolCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateIpamPoolRequest ( input , context ) , Action : "CreateIpamPool" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateIpamScopeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateIpamScopeRequest ( input , context ) , Action : "CreateIpamScope" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateKeyPairCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateKeyPairRequest ( input , context ) , Action : "CreateKeyPair" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateLaunchTemplateCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateLaunchTemplateRequest ( input , context ) , Action : "CreateLaunchTemplate" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateLaunchTemplateVersionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateLaunchTemplateVersionRequest ( input , context ) , Action : "CreateLaunchTemplateVersion" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateLocalGatewayRouteCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateLocalGatewayRouteRequest ( input , context ) , Action : "CreateLocalGatewayRoute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateLocalGatewayRouteTableVpcAssociationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateLocalGatewayRouteTableVpcAssociationRequest ( input , context ) , Action : "CreateLocalGatewayRouteTableVpcAssociation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateManagedPrefixListCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateManagedPrefixListRequest ( input , context ) , Action : "CreateManagedPrefixList" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateNatGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateNatGatewayRequest ( input , context ) , Action : "CreateNatGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateNetworkAclCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateNetworkAclRequest ( input , context ) , Action : "CreateNetworkAcl" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateNetworkAclEntryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateNetworkAclEntryRequest ( input , context ) , Action : "CreateNetworkAclEntry" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateNetworkInsightsAccessScopeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateNetworkInsightsAccessScopeRequest ( input , context ) , Action : "CreateNetworkInsightsAccessScope" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateNetworkInsightsPathCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateNetworkInsightsPathRequest ( input , context ) , Action : "CreateNetworkInsightsPath" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateNetworkInterfaceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateNetworkInterfaceRequest ( input , context ) , Action : "CreateNetworkInterface" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateNetworkInterfacePermissionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateNetworkInterfacePermissionRequest ( input , context ) , Action : "CreateNetworkInterfacePermission" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreatePlacementGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreatePlacementGroupRequest ( input , context ) , Action : "CreatePlacementGroup" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreatePublicIpv4PoolCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreatePublicIpv4PoolRequest ( input , context ) , Action : "CreatePublicIpv4Pool" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateReplaceRootVolumeTaskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateReplaceRootVolumeTaskRequest ( input , context ) , Action : "CreateReplaceRootVolumeTask" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateReservedInstancesListingCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateReservedInstancesListingRequest ( input , context ) , Action : "CreateReservedInstancesListing" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateRestoreImageTaskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateRestoreImageTaskRequest ( input , context ) , Action : "CreateRestoreImageTask" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateRouteCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateRouteRequest ( input , context ) , Action : "CreateRoute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateRouteTableCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateRouteTableRequest ( input , context ) , Action : "CreateRouteTable" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateSecurityGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateSecurityGroupRequest ( input , context ) , Action : "CreateSecurityGroup" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateSnapshotRequest ( input , context ) , Action : "CreateSnapshot" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateSnapshotsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateSnapshotsRequest ( input , context ) , Action : "CreateSnapshots" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateSpotDatafeedSubscriptionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateSpotDatafeedSubscriptionRequest ( input , context ) , Action : "CreateSpotDatafeedSubscription" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateStoreImageTaskCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateStoreImageTaskRequest ( input , context ) , Action : "CreateStoreImageTask" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateSubnetCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateSubnetRequest ( input , context ) , Action : "CreateSubnet" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateSubnetCidrReservationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateSubnetCidrReservationRequest ( input , context ) , Action : "CreateSubnetCidrReservation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateTagsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateTagsRequest ( input , context ) , Action : "CreateTags" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateTrafficMirrorFilterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateTrafficMirrorFilterRequest ( input , context ) , Action : "CreateTrafficMirrorFilter" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateTrafficMirrorFilterRuleCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateTrafficMirrorFilterRuleRequest ( input , context ) , Action : "CreateTrafficMirrorFilterRule" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateTrafficMirrorSessionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateTrafficMirrorSessionRequest ( input , context ) , Action : "CreateTrafficMirrorSession" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateTrafficMirrorTargetCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateTrafficMirrorTargetRequest ( input , context ) , Action : "CreateTrafficMirrorTarget" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateTransitGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateTransitGatewayRequest ( input , context ) , Action : "CreateTransitGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateTransitGatewayConnectCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateTransitGatewayConnectRequest ( input , context ) , Action : "CreateTransitGatewayConnect" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateTransitGatewayConnectPeerCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateTransitGatewayConnectPeerRequest ( input , context ) , Action : "CreateTransitGatewayConnectPeer" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateTransitGatewayMulticastDomainCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateTransitGatewayMulticastDomainRequest ( input , context ) , Action : "CreateTransitGatewayMulticastDomain" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateTransitGatewayPeeringAttachmentCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateTransitGatewayPeeringAttachmentRequest ( input , context ) , Action : "CreateTransitGatewayPeeringAttachment" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateTransitGatewayPrefixListReferenceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateTransitGatewayPrefixListReferenceRequest ( input , context ) , Action : "CreateTransitGatewayPrefixListReference" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateTransitGatewayRouteCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateTransitGatewayRouteRequest ( input , context ) , Action : "CreateTransitGatewayRoute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateTransitGatewayRouteTableCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateTransitGatewayRouteTableRequest ( input , context ) , Action : "CreateTransitGatewayRouteTable" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateTransitGatewayVpcAttachmentCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateTransitGatewayVpcAttachmentRequest ( input , context ) , Action : "CreateTransitGatewayVpcAttachment" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateVolumeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateVolumeRequest ( input , context ) , Action : "CreateVolume" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateVpcCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateVpcRequest ( input , context ) , Action : "CreateVpc" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateVpcEndpointCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateVpcEndpointRequest ( input , context ) , Action : "CreateVpcEndpoint" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateVpcEndpointConnectionNotificationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateVpcEndpointConnectionNotificationRequest ( input , context ) , Action : "CreateVpcEndpointConnectionNotification" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateVpcEndpointServiceConfigurationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateVpcEndpointServiceConfigurationRequest ( input , context ) , Action : "CreateVpcEndpointServiceConfiguration" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateVpcPeeringConnectionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateVpcPeeringConnectionRequest ( input , context ) , Action : "CreateVpcPeeringConnection" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateVpnConnectionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateVpnConnectionRequest ( input , context ) , Action : "CreateVpnConnection" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateVpnConnectionRouteCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateVpnConnectionRouteRequest ( input , context ) , Action : "CreateVpnConnectionRoute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2CreateVpnGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2CreateVpnGatewayRequest ( input , context ) , Action : "CreateVpnGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteCarrierGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteCarrierGatewayRequest ( input , context ) , Action : "DeleteCarrierGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteClientVpnEndpointCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteClientVpnEndpointRequest ( input , context ) , Action : "DeleteClientVpnEndpoint" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteClientVpnRouteCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteClientVpnRouteRequest ( input , context ) , Action : "DeleteClientVpnRoute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteCustomerGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteCustomerGatewayRequest ( input , context ) , Action : "DeleteCustomerGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteDhcpOptionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteDhcpOptionsRequest ( input , context ) , Action : "DeleteDhcpOptions" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteEgressOnlyInternetGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteEgressOnlyInternetGatewayRequest ( input , context ) , Action : "DeleteEgressOnlyInternetGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteFleetsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteFleetsRequest ( input , context ) , Action : "DeleteFleets" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteFlowLogsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteFlowLogsRequest ( input , context ) , Action : "DeleteFlowLogs" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteFpgaImageCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteFpgaImageRequest ( input , context ) , Action : "DeleteFpgaImage" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteInstanceEventWindowCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteInstanceEventWindowRequest ( input , context ) , Action : "DeleteInstanceEventWindow" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteInternetGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteInternetGatewayRequest ( input , context ) , Action : "DeleteInternetGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteIpamCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteIpamRequest ( input , context ) , Action : "DeleteIpam" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteIpamPoolCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteIpamPoolRequest ( input , context ) , Action : "DeleteIpamPool" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteIpamScopeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteIpamScopeRequest ( input , context ) , Action : "DeleteIpamScope" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteKeyPairCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteKeyPairRequest ( input , context ) , Action : "DeleteKeyPair" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteLaunchTemplateCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteLaunchTemplateRequest ( input , context ) , Action : "DeleteLaunchTemplate" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteLaunchTemplateVersionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteLaunchTemplateVersionsRequest ( input , context ) , Action : "DeleteLaunchTemplateVersions" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteLocalGatewayRouteCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteLocalGatewayRouteRequest ( input , context ) , Action : "DeleteLocalGatewayRoute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteLocalGatewayRouteTableVpcAssociationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteLocalGatewayRouteTableVpcAssociationRequest ( input , context ) , Action : "DeleteLocalGatewayRouteTableVpcAssociation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteManagedPrefixListCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteManagedPrefixListRequest ( input , context ) , Action : "DeleteManagedPrefixList" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteNatGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteNatGatewayRequest ( input , context ) , Action : "DeleteNatGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteNetworkAclCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteNetworkAclRequest ( input , context ) , Action : "DeleteNetworkAcl" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteNetworkAclEntryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteNetworkAclEntryRequest ( input , context ) , Action : "DeleteNetworkAclEntry" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteNetworkInsightsAccessScopeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteNetworkInsightsAccessScopeRequest ( input , context ) , Action : "DeleteNetworkInsightsAccessScope" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteNetworkInsightsAccessScopeAnalysisCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteNetworkInsightsAccessScopeAnalysisRequest ( input , context ) , Action : "DeleteNetworkInsightsAccessScopeAnalysis" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteNetworkInsightsAnalysisCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteNetworkInsightsAnalysisRequest ( input , context ) , Action : "DeleteNetworkInsightsAnalysis" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteNetworkInsightsPathCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteNetworkInsightsPathRequest ( input , context ) , Action : "DeleteNetworkInsightsPath" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteNetworkInterfaceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteNetworkInterfaceRequest ( input , context ) , Action : "DeleteNetworkInterface" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteNetworkInterfacePermissionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteNetworkInterfacePermissionRequest ( input , context ) , Action : "DeleteNetworkInterfacePermission" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeletePlacementGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeletePlacementGroupRequest ( input , context ) , Action : "DeletePlacementGroup" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeletePublicIpv4PoolCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeletePublicIpv4PoolRequest ( input , context ) , Action : "DeletePublicIpv4Pool" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteQueuedReservedInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteQueuedReservedInstancesRequest ( input , context ) , Action : "DeleteQueuedReservedInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteRouteCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteRouteRequest ( input , context ) , Action : "DeleteRoute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteRouteTableCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteRouteTableRequest ( input , context ) , Action : "DeleteRouteTable" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteSecurityGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteSecurityGroupRequest ( input , context ) , Action : "DeleteSecurityGroup" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteSnapshotRequest ( input , context ) , Action : "DeleteSnapshot" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteSpotDatafeedSubscriptionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteSpotDatafeedSubscriptionRequest ( input , context ) , Action : "DeleteSpotDatafeedSubscription" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteSubnetCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteSubnetRequest ( input , context ) , Action : "DeleteSubnet" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteSubnetCidrReservationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteSubnetCidrReservationRequest ( input , context ) , Action : "DeleteSubnetCidrReservation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteTagsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteTagsRequest ( input , context ) , Action : "DeleteTags" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteTrafficMirrorFilterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteTrafficMirrorFilterRequest ( input , context ) , Action : "DeleteTrafficMirrorFilter" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteTrafficMirrorFilterRuleCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteTrafficMirrorFilterRuleRequest ( input , context ) , Action : "DeleteTrafficMirrorFilterRule" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteTrafficMirrorSessionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteTrafficMirrorSessionRequest ( input , context ) , Action : "DeleteTrafficMirrorSession" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteTrafficMirrorTargetCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteTrafficMirrorTargetRequest ( input , context ) , Action : "DeleteTrafficMirrorTarget" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteTransitGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteTransitGatewayRequest ( input , context ) , Action : "DeleteTransitGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteTransitGatewayConnectCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteTransitGatewayConnectRequest ( input , context ) , Action : "DeleteTransitGatewayConnect" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteTransitGatewayConnectPeerCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteTransitGatewayConnectPeerRequest ( input , context ) , Action : "DeleteTransitGatewayConnectPeer" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteTransitGatewayMulticastDomainCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteTransitGatewayMulticastDomainRequest ( input , context ) , Action : "DeleteTransitGatewayMulticastDomain" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteTransitGatewayPeeringAttachmentCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteTransitGatewayPeeringAttachmentRequest ( input , context ) , Action : "DeleteTransitGatewayPeeringAttachment" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteTransitGatewayPrefixListReferenceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteTransitGatewayPrefixListReferenceRequest ( input , context ) , Action : "DeleteTransitGatewayPrefixListReference" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteTransitGatewayRouteCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteTransitGatewayRouteRequest ( input , context ) , Action : "DeleteTransitGatewayRoute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteTransitGatewayRouteTableCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteTransitGatewayRouteTableRequest ( input , context ) , Action : "DeleteTransitGatewayRouteTable" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteTransitGatewayVpcAttachmentCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteTransitGatewayVpcAttachmentRequest ( input , context ) , Action : "DeleteTransitGatewayVpcAttachment" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteVolumeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteVolumeRequest ( input , context ) , Action : "DeleteVolume" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteVpcCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteVpcRequest ( input , context ) , Action : "DeleteVpc" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteVpcEndpointConnectionNotificationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteVpcEndpointConnectionNotificationsRequest ( input , context ) , Action : "DeleteVpcEndpointConnectionNotifications" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteVpcEndpointsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteVpcEndpointsRequest ( input , context ) , Action : "DeleteVpcEndpoints" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteVpcEndpointServiceConfigurationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteVpcEndpointServiceConfigurationsRequest ( input , context ) , Action : "DeleteVpcEndpointServiceConfigurations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteVpcPeeringConnectionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteVpcPeeringConnectionRequest ( input , context ) , Action : "DeleteVpcPeeringConnection" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteVpnConnectionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteVpnConnectionRequest ( input , context ) , Action : "DeleteVpnConnection" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteVpnConnectionRouteCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteVpnConnectionRouteRequest ( input , context ) , Action : "DeleteVpnConnectionRoute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeleteVpnGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeleteVpnGatewayRequest ( input , context ) , Action : "DeleteVpnGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeprovisionByoipCidrCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeprovisionByoipCidrRequest ( input , context ) , Action : "DeprovisionByoipCidr" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeprovisionIpamPoolCidrCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeprovisionIpamPoolCidrRequest ( input , context ) , Action : "DeprovisionIpamPoolCidr" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeprovisionPublicIpv4PoolCidrCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeprovisionPublicIpv4PoolCidrRequest ( input , context ) , Action : "DeprovisionPublicIpv4PoolCidr" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeregisterImageCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeregisterImageRequest ( input , context ) , Action : "DeregisterImage" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeregisterInstanceEventNotificationAttributesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeregisterInstanceEventNotificationAttributesRequest ( input , context ) , Action : "DeregisterInstanceEventNotificationAttributes" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeregisterTransitGatewayMulticastGroupMembersCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeregisterTransitGatewayMulticastGroupMembersRequest ( input , context ) , Action : "DeregisterTransitGatewayMulticastGroupMembers" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DeregisterTransitGatewayMulticastGroupSourcesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DeregisterTransitGatewayMulticastGroupSourcesRequest ( input , context ) , Action : "DeregisterTransitGatewayMulticastGroupSources" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeAccountAttributesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeAccountAttributesRequest ( input , context ) , Action : "DescribeAccountAttributes" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeAddressesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeAddressesRequest ( input , context ) , Action : "DescribeAddresses" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeAddressesAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeAddressesAttributeRequest ( input , context ) , Action : "DescribeAddressesAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeAggregateIdFormatCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeAggregateIdFormatRequest ( input , context ) , Action : "DescribeAggregateIdFormat" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeAvailabilityZonesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeAvailabilityZonesRequest ( input , context ) , Action : "DescribeAvailabilityZones" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeBundleTasksCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeBundleTasksRequest ( input , context ) , Action : "DescribeBundleTasks" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeByoipCidrsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeByoipCidrsRequest ( input , context ) , Action : "DescribeByoipCidrs" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeCapacityReservationFleetsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeCapacityReservationFleetsRequest ( input , context ) , Action : "DescribeCapacityReservationFleets" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeCapacityReservationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeCapacityReservationsRequest ( input , context ) , Action : "DescribeCapacityReservations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeCarrierGatewaysCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeCarrierGatewaysRequest ( input , context ) , Action : "DescribeCarrierGateways" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeClassicLinkInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeClassicLinkInstancesRequest ( input , context ) , Action : "DescribeClassicLinkInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeClientVpnAuthorizationRulesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeClientVpnAuthorizationRulesRequest ( input , context ) , Action : "DescribeClientVpnAuthorizationRules" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeClientVpnConnectionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeClientVpnConnectionsRequest ( input , context ) , Action : "DescribeClientVpnConnections" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeClientVpnEndpointsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeClientVpnEndpointsRequest ( input , context ) , Action : "DescribeClientVpnEndpoints" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeClientVpnRoutesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeClientVpnRoutesRequest ( input , context ) , Action : "DescribeClientVpnRoutes" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeClientVpnTargetNetworksCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeClientVpnTargetNetworksRequest ( input , context ) , Action : "DescribeClientVpnTargetNetworks" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeCoipPoolsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeCoipPoolsRequest ( input , context ) , Action : "DescribeCoipPools" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeConversionTasksCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeConversionTasksRequest ( input , context ) , Action : "DescribeConversionTasks" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeCustomerGatewaysCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeCustomerGatewaysRequest ( input , context ) , Action : "DescribeCustomerGateways" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeDhcpOptionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeDhcpOptionsRequest ( input , context ) , Action : "DescribeDhcpOptions" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeEgressOnlyInternetGatewaysCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeEgressOnlyInternetGatewaysRequest ( input , context ) , Action : "DescribeEgressOnlyInternetGateways" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeElasticGpusCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeElasticGpusRequest ( input , context ) , Action : "DescribeElasticGpus" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeExportImageTasksCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeExportImageTasksRequest ( input , context ) , Action : "DescribeExportImageTasks" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeExportTasksCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeExportTasksRequest ( input , context ) , Action : "DescribeExportTasks" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeFastSnapshotRestoresCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeFastSnapshotRestoresRequest ( input , context ) , Action : "DescribeFastSnapshotRestores" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeFleetHistoryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeFleetHistoryRequest ( input , context ) , Action : "DescribeFleetHistory" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeFleetInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeFleetInstancesRequest ( input , context ) , Action : "DescribeFleetInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeFleetsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeFleetsRequest ( input , context ) , Action : "DescribeFleets" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeFlowLogsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeFlowLogsRequest ( input , context ) , Action : "DescribeFlowLogs" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeFpgaImageAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeFpgaImageAttributeRequest ( input , context ) , Action : "DescribeFpgaImageAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeFpgaImagesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeFpgaImagesRequest ( input , context ) , Action : "DescribeFpgaImages" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeHostReservationOfferingsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeHostReservationOfferingsRequest ( input , context ) , Action : "DescribeHostReservationOfferings" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeHostReservationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeHostReservationsRequest ( input , context ) , Action : "DescribeHostReservations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeHostsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeHostsRequest ( input , context ) , Action : "DescribeHosts" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeIamInstanceProfileAssociationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeIamInstanceProfileAssociationsRequest ( input , context ) , Action : "DescribeIamInstanceProfileAssociations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeIdentityIdFormatCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeIdentityIdFormatRequest ( input , context ) , Action : "DescribeIdentityIdFormat" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeIdFormatCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeIdFormatRequest ( input , context ) , Action : "DescribeIdFormat" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeImageAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeImageAttributeRequest ( input , context ) , Action : "DescribeImageAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeImagesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeImagesRequest ( input , context ) , Action : "DescribeImages" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeImportImageTasksCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeImportImageTasksRequest ( input , context ) , Action : "DescribeImportImageTasks" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeImportSnapshotTasksCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeImportSnapshotTasksRequest ( input , context ) , Action : "DescribeImportSnapshotTasks" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeInstanceAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeInstanceAttributeRequest ( input , context ) , Action : "DescribeInstanceAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeInstanceCreditSpecificationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeInstanceCreditSpecificationsRequest ( input , context ) , Action : "DescribeInstanceCreditSpecifications" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeInstanceEventNotificationAttributesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeInstanceEventNotificationAttributesRequest ( input , context ) , Action : "DescribeInstanceEventNotificationAttributes" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeInstanceEventWindowsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeInstanceEventWindowsRequest ( input , context ) , Action : "DescribeInstanceEventWindows" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeInstancesRequest ( input , context ) , Action : "DescribeInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeInstanceStatusCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeInstanceStatusRequest ( input , context ) , Action : "DescribeInstanceStatus" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeInstanceTypeOfferingsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeInstanceTypeOfferingsRequest ( input , context ) , Action : "DescribeInstanceTypeOfferings" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeInstanceTypesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeInstanceTypesRequest ( input , context ) , Action : "DescribeInstanceTypes" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeInternetGatewaysCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeInternetGatewaysRequest ( input , context ) , Action : "DescribeInternetGateways" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeIpamPoolsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeIpamPoolsRequest ( input , context ) , Action : "DescribeIpamPools" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeIpamsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeIpamsRequest ( input , context ) , Action : "DescribeIpams" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeIpamScopesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeIpamScopesRequest ( input , context ) , Action : "DescribeIpamScopes" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeIpv6PoolsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeIpv6PoolsRequest ( input , context ) , Action : "DescribeIpv6Pools" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeKeyPairsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeKeyPairsRequest ( input , context ) , Action : "DescribeKeyPairs" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeLaunchTemplatesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeLaunchTemplatesRequest ( input , context ) , Action : "DescribeLaunchTemplates" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeLaunchTemplateVersionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeLaunchTemplateVersionsRequest ( input , context ) , Action : "DescribeLaunchTemplateVersions" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeLocalGatewayRouteTablesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeLocalGatewayRouteTablesRequest ( input , context ) , Action : "DescribeLocalGatewayRouteTables" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsRequest ( input , context ) , Action : "DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeLocalGatewayRouteTableVpcAssociationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeLocalGatewayRouteTableVpcAssociationsRequest ( input , context ) , Action : "DescribeLocalGatewayRouteTableVpcAssociations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeLocalGatewaysCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeLocalGatewaysRequest ( input , context ) , Action : "DescribeLocalGateways" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeLocalGatewayVirtualInterfaceGroupsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeLocalGatewayVirtualInterfaceGroupsRequest ( input , context ) , Action : "DescribeLocalGatewayVirtualInterfaceGroups" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeLocalGatewayVirtualInterfacesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeLocalGatewayVirtualInterfacesRequest ( input , context ) , Action : "DescribeLocalGatewayVirtualInterfaces" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeManagedPrefixListsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeManagedPrefixListsRequest ( input , context ) , Action : "DescribeManagedPrefixLists" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeMovingAddressesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeMovingAddressesRequest ( input , context ) , Action : "DescribeMovingAddresses" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeNatGatewaysCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeNatGatewaysRequest ( input , context ) , Action : "DescribeNatGateways" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeNetworkAclsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeNetworkAclsRequest ( input , context ) , Action : "DescribeNetworkAcls" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeNetworkInsightsAccessScopeAnalysesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeNetworkInsightsAccessScopeAnalysesRequest ( input , context ) , Action : "DescribeNetworkInsightsAccessScopeAnalyses" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeNetworkInsightsAccessScopesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeNetworkInsightsAccessScopesRequest ( input , context ) , Action : "DescribeNetworkInsightsAccessScopes" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeNetworkInsightsAnalysesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeNetworkInsightsAnalysesRequest ( input , context ) , Action : "DescribeNetworkInsightsAnalyses" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeNetworkInsightsPathsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeNetworkInsightsPathsRequest ( input , context ) , Action : "DescribeNetworkInsightsPaths" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeNetworkInterfaceAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeNetworkInterfaceAttributeRequest ( input , context ) , Action : "DescribeNetworkInterfaceAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeNetworkInterfacePermissionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeNetworkInterfacePermissionsRequest ( input , context ) , Action : "DescribeNetworkInterfacePermissions" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeNetworkInterfacesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeNetworkInterfacesRequest ( input , context ) , Action : "DescribeNetworkInterfaces" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribePlacementGroupsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribePlacementGroupsRequest ( input , context ) , Action : "DescribePlacementGroups" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribePrefixListsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribePrefixListsRequest ( input , context ) , Action : "DescribePrefixLists" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribePrincipalIdFormatCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribePrincipalIdFormatRequest ( input , context ) , Action : "DescribePrincipalIdFormat" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribePublicIpv4PoolsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribePublicIpv4PoolsRequest ( input , context ) , Action : "DescribePublicIpv4Pools" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeRegionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeRegionsRequest ( input , context ) , Action : "DescribeRegions" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeReplaceRootVolumeTasksCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeReplaceRootVolumeTasksRequest ( input , context ) , Action : "DescribeReplaceRootVolumeTasks" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeReservedInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeReservedInstancesRequest ( input , context ) , Action : "DescribeReservedInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeReservedInstancesListingsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeReservedInstancesListingsRequest ( input , context ) , Action : "DescribeReservedInstancesListings" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeReservedInstancesModificationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeReservedInstancesModificationsRequest ( input , context ) , Action : "DescribeReservedInstancesModifications" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeReservedInstancesOfferingsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeReservedInstancesOfferingsRequest ( input , context ) , Action : "DescribeReservedInstancesOfferings" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeRouteTablesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeRouteTablesRequest ( input , context ) , Action : "DescribeRouteTables" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeScheduledInstanceAvailabilityCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeScheduledInstanceAvailabilityRequest ( input , context ) , Action : "DescribeScheduledInstanceAvailability" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeScheduledInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeScheduledInstancesRequest ( input , context ) , Action : "DescribeScheduledInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeSecurityGroupReferencesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeSecurityGroupReferencesRequest ( input , context ) , Action : "DescribeSecurityGroupReferences" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeSecurityGroupRulesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeSecurityGroupRulesRequest ( input , context ) , Action : "DescribeSecurityGroupRules" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeSecurityGroupsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeSecurityGroupsRequest ( input , context ) , Action : "DescribeSecurityGroups" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeSnapshotAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeSnapshotAttributeRequest ( input , context ) , Action : "DescribeSnapshotAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeSnapshotsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeSnapshotsRequest ( input , context ) , Action : "DescribeSnapshots" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeSnapshotTierStatusCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeSnapshotTierStatusRequest ( input , context ) , Action : "DescribeSnapshotTierStatus" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeSpotDatafeedSubscriptionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeSpotDatafeedSubscriptionRequest ( input , context ) , Action : "DescribeSpotDatafeedSubscription" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeSpotFleetInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeSpotFleetInstancesRequest ( input , context ) , Action : "DescribeSpotFleetInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeSpotFleetRequestHistoryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeSpotFleetRequestHistoryRequest ( input , context ) , Action : "DescribeSpotFleetRequestHistory" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeSpotFleetRequestsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeSpotFleetRequestsRequest ( input , context ) , Action : "DescribeSpotFleetRequests" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeSpotInstanceRequestsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeSpotInstanceRequestsRequest ( input , context ) , Action : "DescribeSpotInstanceRequests" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeSpotPriceHistoryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeSpotPriceHistoryRequest ( input , context ) , Action : "DescribeSpotPriceHistory" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeStaleSecurityGroupsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeStaleSecurityGroupsRequest ( input , context ) , Action : "DescribeStaleSecurityGroups" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeStoreImageTasksCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeStoreImageTasksRequest ( input , context ) , Action : "DescribeStoreImageTasks" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeSubnetsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeSubnetsRequest ( input , context ) , Action : "DescribeSubnets" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeTagsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeTagsRequest ( input , context ) , Action : "DescribeTags" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeTrafficMirrorFiltersCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeTrafficMirrorFiltersRequest ( input , context ) , Action : "DescribeTrafficMirrorFilters" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeTrafficMirrorSessionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeTrafficMirrorSessionsRequest ( input , context ) , Action : "DescribeTrafficMirrorSessions" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeTrafficMirrorTargetsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeTrafficMirrorTargetsRequest ( input , context ) , Action : "DescribeTrafficMirrorTargets" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeTransitGatewayAttachmentsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeTransitGatewayAttachmentsRequest ( input , context ) , Action : "DescribeTransitGatewayAttachments" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeTransitGatewayConnectPeersCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeTransitGatewayConnectPeersRequest ( input , context ) , Action : "DescribeTransitGatewayConnectPeers" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeTransitGatewayConnectsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeTransitGatewayConnectsRequest ( input , context ) , Action : "DescribeTransitGatewayConnects" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeTransitGatewayMulticastDomainsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeTransitGatewayMulticastDomainsRequest ( input , context ) , Action : "DescribeTransitGatewayMulticastDomains" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeTransitGatewayPeeringAttachmentsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeTransitGatewayPeeringAttachmentsRequest ( input , context ) , Action : "DescribeTransitGatewayPeeringAttachments" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeTransitGatewayRouteTablesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeTransitGatewayRouteTablesRequest ( input , context ) , Action : "DescribeTransitGatewayRouteTables" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeTransitGatewaysCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeTransitGatewaysRequest ( input , context ) , Action : "DescribeTransitGateways" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeTransitGatewayVpcAttachmentsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeTransitGatewayVpcAttachmentsRequest ( input , context ) , Action : "DescribeTransitGatewayVpcAttachments" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeTrunkInterfaceAssociationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeTrunkInterfaceAssociationsRequest ( input , context ) , Action : "DescribeTrunkInterfaceAssociations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVolumeAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVolumeAttributeRequest ( input , context ) , Action : "DescribeVolumeAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVolumesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVolumesRequest ( input , context ) , Action : "DescribeVolumes" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVolumesModificationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVolumesModificationsRequest ( input , context ) , Action : "DescribeVolumesModifications" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVolumeStatusCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVolumeStatusRequest ( input , context ) , Action : "DescribeVolumeStatus" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVpcAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVpcAttributeRequest ( input , context ) , Action : "DescribeVpcAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVpcClassicLinkCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVpcClassicLinkRequest ( input , context ) , Action : "DescribeVpcClassicLink" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVpcClassicLinkDnsSupportCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVpcClassicLinkDnsSupportRequest ( input , context ) , Action : "DescribeVpcClassicLinkDnsSupport" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVpcEndpointConnectionNotificationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVpcEndpointConnectionNotificationsRequest ( input , context ) , Action : "DescribeVpcEndpointConnectionNotifications" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVpcEndpointConnectionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVpcEndpointConnectionsRequest ( input , context ) , Action : "DescribeVpcEndpointConnections" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVpcEndpointsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVpcEndpointsRequest ( input , context ) , Action : "DescribeVpcEndpoints" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVpcEndpointServiceConfigurationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVpcEndpointServiceConfigurationsRequest ( input , context ) , Action : "DescribeVpcEndpointServiceConfigurations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVpcEndpointServicePermissionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVpcEndpointServicePermissionsRequest ( input , context ) , Action : "DescribeVpcEndpointServicePermissions" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVpcEndpointServicesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVpcEndpointServicesRequest ( input , context ) , Action : "DescribeVpcEndpointServices" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVpcPeeringConnectionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVpcPeeringConnectionsRequest ( input , context ) , Action : "DescribeVpcPeeringConnections" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVpcsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVpcsRequest ( input , context ) , Action : "DescribeVpcs" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVpnConnectionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVpnConnectionsRequest ( input , context ) , Action : "DescribeVpnConnections" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DescribeVpnGatewaysCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DescribeVpnGatewaysRequest ( input , context ) , Action : "DescribeVpnGateways" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DetachClassicLinkVpcCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DetachClassicLinkVpcRequest ( input , context ) , Action : "DetachClassicLinkVpc" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DetachInternetGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DetachInternetGatewayRequest ( input , context ) , Action : "DetachInternetGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DetachNetworkInterfaceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DetachNetworkInterfaceRequest ( input , context ) , Action : "DetachNetworkInterface" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DetachVolumeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DetachVolumeRequest ( input , context ) , Action : "DetachVolume" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DetachVpnGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DetachVpnGatewayRequest ( input , context ) , Action : "DetachVpnGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisableEbsEncryptionByDefaultCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisableEbsEncryptionByDefaultRequest ( input , context ) , Action : "DisableEbsEncryptionByDefault" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisableFastSnapshotRestoresCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisableFastSnapshotRestoresRequest ( input , context ) , Action : "DisableFastSnapshotRestores" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisableImageDeprecationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisableImageDeprecationRequest ( input , context ) , Action : "DisableImageDeprecation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisableIpamOrganizationAdminAccountCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisableIpamOrganizationAdminAccountRequest ( input , context ) , Action : "DisableIpamOrganizationAdminAccount" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisableSerialConsoleAccessCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisableSerialConsoleAccessRequest ( input , context ) , Action : "DisableSerialConsoleAccess" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisableTransitGatewayRouteTablePropagationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisableTransitGatewayRouteTablePropagationRequest ( input , context ) , Action : "DisableTransitGatewayRouteTablePropagation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisableVgwRoutePropagationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisableVgwRoutePropagationRequest ( input , context ) , Action : "DisableVgwRoutePropagation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisableVpcClassicLinkCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisableVpcClassicLinkRequest ( input , context ) , Action : "DisableVpcClassicLink" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisableVpcClassicLinkDnsSupportCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisableVpcClassicLinkDnsSupportRequest ( input , context ) , Action : "DisableVpcClassicLinkDnsSupport" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisassociateAddressCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisassociateAddressRequest ( input , context ) , Action : "DisassociateAddress" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisassociateClientVpnTargetNetworkCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisassociateClientVpnTargetNetworkRequest ( input , context ) , Action : "DisassociateClientVpnTargetNetwork" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisassociateEnclaveCertificateIamRoleCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisassociateEnclaveCertificateIamRoleRequest ( input , context ) , Action : "DisassociateEnclaveCertificateIamRole" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisassociateIamInstanceProfileCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisassociateIamInstanceProfileRequest ( input , context ) , Action : "DisassociateIamInstanceProfile" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisassociateInstanceEventWindowCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisassociateInstanceEventWindowRequest ( input , context ) , Action : "DisassociateInstanceEventWindow" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisassociateRouteTableCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisassociateRouteTableRequest ( input , context ) , Action : "DisassociateRouteTable" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisassociateSubnetCidrBlockCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisassociateSubnetCidrBlockRequest ( input , context ) , Action : "DisassociateSubnetCidrBlock" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisassociateTransitGatewayMulticastDomainCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisassociateTransitGatewayMulticastDomainRequest ( input , context ) , Action : "DisassociateTransitGatewayMulticastDomain" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisassociateTransitGatewayRouteTableCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisassociateTransitGatewayRouteTableRequest ( input , context ) , Action : "DisassociateTransitGatewayRouteTable" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisassociateTrunkInterfaceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisassociateTrunkInterfaceRequest ( input , context ) , Action : "DisassociateTrunkInterface" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2DisassociateVpcCidrBlockCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2DisassociateVpcCidrBlockRequest ( input , context ) , Action : "DisassociateVpcCidrBlock" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2EnableEbsEncryptionByDefaultCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2EnableEbsEncryptionByDefaultRequest ( input , context ) , Action : "EnableEbsEncryptionByDefault" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2EnableFastSnapshotRestoresCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2EnableFastSnapshotRestoresRequest ( input , context ) , Action : "EnableFastSnapshotRestores" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2EnableImageDeprecationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2EnableImageDeprecationRequest ( input , context ) , Action : "EnableImageDeprecation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2EnableIpamOrganizationAdminAccountCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2EnableIpamOrganizationAdminAccountRequest ( input , context ) , Action : "EnableIpamOrganizationAdminAccount" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2EnableSerialConsoleAccessCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2EnableSerialConsoleAccessRequest ( input , context ) , Action : "EnableSerialConsoleAccess" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2EnableTransitGatewayRouteTablePropagationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2EnableTransitGatewayRouteTablePropagationRequest ( input , context ) , Action : "EnableTransitGatewayRouteTablePropagation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2EnableVgwRoutePropagationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2EnableVgwRoutePropagationRequest ( input , context ) , Action : "EnableVgwRoutePropagation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2EnableVolumeIOCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2EnableVolumeIORequest ( input , context ) , Action : "EnableVolumeIO" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2EnableVpcClassicLinkCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2EnableVpcClassicLinkRequest ( input , context ) , Action : "EnableVpcClassicLink" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2EnableVpcClassicLinkDnsSupportCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2EnableVpcClassicLinkDnsSupportRequest ( input , context ) , Action : "EnableVpcClassicLinkDnsSupport" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ExportClientVpnClientCertificateRevocationListCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ExportClientVpnClientCertificateRevocationListRequest ( input , context ) , Action : "ExportClientVpnClientCertificateRevocationList" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ExportClientVpnClientConfigurationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ExportClientVpnClientConfigurationRequest ( input , context ) , Action : "ExportClientVpnClientConfiguration" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ExportImageCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ExportImageRequest ( input , context ) , Action : "ExportImage" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ExportTransitGatewayRoutesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ExportTransitGatewayRoutesRequest ( input , context ) , Action : "ExportTransitGatewayRoutes" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetAssociatedEnclaveCertificateIamRolesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetAssociatedEnclaveCertificateIamRolesRequest ( input , context ) , Action : "GetAssociatedEnclaveCertificateIamRoles" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetAssociatedIpv6PoolCidrsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetAssociatedIpv6PoolCidrsRequest ( input , context ) , Action : "GetAssociatedIpv6PoolCidrs" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetCapacityReservationUsageCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetCapacityReservationUsageRequest ( input , context ) , Action : "GetCapacityReservationUsage" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetCoipPoolUsageCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetCoipPoolUsageRequest ( input , context ) , Action : "GetCoipPoolUsage" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetConsoleOutputCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetConsoleOutputRequest ( input , context ) , Action : "GetConsoleOutput" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetConsoleScreenshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetConsoleScreenshotRequest ( input , context ) , Action : "GetConsoleScreenshot" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetDefaultCreditSpecificationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetDefaultCreditSpecificationRequest ( input , context ) , Action : "GetDefaultCreditSpecification" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetEbsDefaultKmsKeyIdCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetEbsDefaultKmsKeyIdRequest ( input , context ) , Action : "GetEbsDefaultKmsKeyId" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetEbsEncryptionByDefaultCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetEbsEncryptionByDefaultRequest ( input , context ) , Action : "GetEbsEncryptionByDefault" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetFlowLogsIntegrationTemplateCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetFlowLogsIntegrationTemplateRequest ( input , context ) , Action : "GetFlowLogsIntegrationTemplate" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetGroupsForCapacityReservationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetGroupsForCapacityReservationRequest ( input , context ) , Action : "GetGroupsForCapacityReservation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetHostReservationPurchasePreviewCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetHostReservationPurchasePreviewRequest ( input , context ) , Action : "GetHostReservationPurchasePreview" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetInstanceTypesFromInstanceRequirementsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetInstanceTypesFromInstanceRequirementsRequest ( input , context ) , Action : "GetInstanceTypesFromInstanceRequirements" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetIpamAddressHistoryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetIpamAddressHistoryRequest ( input , context ) , Action : "GetIpamAddressHistory" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetIpamPoolAllocationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetIpamPoolAllocationsRequest ( input , context ) , Action : "GetIpamPoolAllocations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetIpamPoolCidrsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetIpamPoolCidrsRequest ( input , context ) , Action : "GetIpamPoolCidrs" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetIpamResourceCidrsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetIpamResourceCidrsRequest ( input , context ) , Action : "GetIpamResourceCidrs" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetLaunchTemplateDataCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetLaunchTemplateDataRequest ( input , context ) , Action : "GetLaunchTemplateData" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetManagedPrefixListAssociationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetManagedPrefixListAssociationsRequest ( input , context ) , Action : "GetManagedPrefixListAssociations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetManagedPrefixListEntriesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetManagedPrefixListEntriesRequest ( input , context ) , Action : "GetManagedPrefixListEntries" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetNetworkInsightsAccessScopeAnalysisFindingsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetNetworkInsightsAccessScopeAnalysisFindingsRequest ( input , context ) , Action : "GetNetworkInsightsAccessScopeAnalysisFindings" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetNetworkInsightsAccessScopeContentCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetNetworkInsightsAccessScopeContentRequest ( input , context ) , Action : "GetNetworkInsightsAccessScopeContent" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetPasswordDataCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetPasswordDataRequest ( input , context ) , Action : "GetPasswordData" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetReservedInstancesExchangeQuoteCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetReservedInstancesExchangeQuoteRequest ( input , context ) , Action : "GetReservedInstancesExchangeQuote" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetSerialConsoleAccessStatusCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetSerialConsoleAccessStatusRequest ( input , context ) , Action : "GetSerialConsoleAccessStatus" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetSpotPlacementScoresCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetSpotPlacementScoresRequest ( input , context ) , Action : "GetSpotPlacementScores" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetSubnetCidrReservationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetSubnetCidrReservationsRequest ( input , context ) , Action : "GetSubnetCidrReservations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetTransitGatewayAttachmentPropagationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetTransitGatewayAttachmentPropagationsRequest ( input , context ) , Action : "GetTransitGatewayAttachmentPropagations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetTransitGatewayMulticastDomainAssociationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetTransitGatewayMulticastDomainAssociationsRequest ( input , context ) , Action : "GetTransitGatewayMulticastDomainAssociations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetTransitGatewayPrefixListReferencesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetTransitGatewayPrefixListReferencesRequest ( input , context ) , Action : "GetTransitGatewayPrefixListReferences" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetTransitGatewayRouteTableAssociationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetTransitGatewayRouteTableAssociationsRequest ( input , context ) , Action : "GetTransitGatewayRouteTableAssociations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetTransitGatewayRouteTablePropagationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetTransitGatewayRouteTablePropagationsRequest ( input , context ) , Action : "GetTransitGatewayRouteTablePropagations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetVpnConnectionDeviceSampleConfigurationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetVpnConnectionDeviceSampleConfigurationRequest ( input , context ) , Action : "GetVpnConnectionDeviceSampleConfiguration" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2GetVpnConnectionDeviceTypesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2GetVpnConnectionDeviceTypesRequest ( input , context ) , Action : "GetVpnConnectionDeviceTypes" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ImportClientVpnClientCertificateRevocationListCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ImportClientVpnClientCertificateRevocationListRequest ( input , context ) , Action : "ImportClientVpnClientCertificateRevocationList" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ImportImageCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ImportImageRequest ( input , context ) , Action : "ImportImage" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ImportInstanceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ImportInstanceRequest ( input , context ) , Action : "ImportInstance" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ImportKeyPairCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ImportKeyPairRequest ( input , context ) , Action : "ImportKeyPair" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ImportSnapshotCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ImportSnapshotRequest ( input , context ) , Action : "ImportSnapshot" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ImportVolumeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ImportVolumeRequest ( input , context ) , Action : "ImportVolume" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ListSnapshotsInRecycleBinCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ListSnapshotsInRecycleBinRequest ( input , context ) , Action : "ListSnapshotsInRecycleBin" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyAddressAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyAddressAttributeRequest ( input , context ) , Action : "ModifyAddressAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyAvailabilityZoneGroupCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyAvailabilityZoneGroupRequest ( input , context ) , Action : "ModifyAvailabilityZoneGroup" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyCapacityReservationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyCapacityReservationRequest ( input , context ) , Action : "ModifyCapacityReservation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyCapacityReservationFleetCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyCapacityReservationFleetRequest ( input , context ) , Action : "ModifyCapacityReservationFleet" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyClientVpnEndpointCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyClientVpnEndpointRequest ( input , context ) , Action : "ModifyClientVpnEndpoint" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyDefaultCreditSpecificationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyDefaultCreditSpecificationRequest ( input , context ) , Action : "ModifyDefaultCreditSpecification" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyEbsDefaultKmsKeyIdCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyEbsDefaultKmsKeyIdRequest ( input , context ) , Action : "ModifyEbsDefaultKmsKeyId" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyFleetCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyFleetRequest ( input , context ) , Action : "ModifyFleet" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyFpgaImageAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyFpgaImageAttributeRequest ( input , context ) , Action : "ModifyFpgaImageAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyHostsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyHostsRequest ( input , context ) , Action : "ModifyHosts" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyIdentityIdFormatCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyIdentityIdFormatRequest ( input , context ) , Action : "ModifyIdentityIdFormat" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyIdFormatCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyIdFormatRequest ( input , context ) , Action : "ModifyIdFormat" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyImageAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyImageAttributeRequest ( input , context ) , Action : "ModifyImageAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyInstanceAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyInstanceAttributeRequest ( input , context ) , Action : "ModifyInstanceAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyInstanceCapacityReservationAttributesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyInstanceCapacityReservationAttributesRequest ( input , context ) , Action : "ModifyInstanceCapacityReservationAttributes" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyInstanceCreditSpecificationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyInstanceCreditSpecificationRequest ( input , context ) , Action : "ModifyInstanceCreditSpecification" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyInstanceEventStartTimeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyInstanceEventStartTimeRequest ( input , context ) , Action : "ModifyInstanceEventStartTime" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyInstanceEventWindowCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyInstanceEventWindowRequest ( input , context ) , Action : "ModifyInstanceEventWindow" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyInstanceMetadataOptionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyInstanceMetadataOptionsRequest ( input , context ) , Action : "ModifyInstanceMetadataOptions" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyInstancePlacementCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyInstancePlacementRequest ( input , context ) , Action : "ModifyInstancePlacement" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyIpamCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyIpamRequest ( input , context ) , Action : "ModifyIpam" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyIpamPoolCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyIpamPoolRequest ( input , context ) , Action : "ModifyIpamPool" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyIpamResourceCidrCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyIpamResourceCidrRequest ( input , context ) , Action : "ModifyIpamResourceCidr" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyIpamScopeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyIpamScopeRequest ( input , context ) , Action : "ModifyIpamScope" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyLaunchTemplateCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyLaunchTemplateRequest ( input , context ) , Action : "ModifyLaunchTemplate" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyManagedPrefixListCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyManagedPrefixListRequest ( input , context ) , Action : "ModifyManagedPrefixList" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyNetworkInterfaceAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyNetworkInterfaceAttributeRequest ( input , context ) , Action : "ModifyNetworkInterfaceAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyPrivateDnsNameOptionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyPrivateDnsNameOptionsRequest ( input , context ) , Action : "ModifyPrivateDnsNameOptions" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyReservedInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyReservedInstancesRequest ( input , context ) , Action : "ModifyReservedInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifySecurityGroupRulesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifySecurityGroupRulesRequest ( input , context ) , Action : "ModifySecurityGroupRules" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifySnapshotAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifySnapshotAttributeRequest ( input , context ) , Action : "ModifySnapshotAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifySnapshotTierCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifySnapshotTierRequest ( input , context ) , Action : "ModifySnapshotTier" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifySpotFleetRequestCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifySpotFleetRequestRequest ( input , context ) , Action : "ModifySpotFleetRequest" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifySubnetAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifySubnetAttributeRequest ( input , context ) , Action : "ModifySubnetAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyTrafficMirrorFilterNetworkServicesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyTrafficMirrorFilterNetworkServicesRequest ( input , context ) , Action : "ModifyTrafficMirrorFilterNetworkServices" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyTrafficMirrorFilterRuleCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyTrafficMirrorFilterRuleRequest ( input , context ) , Action : "ModifyTrafficMirrorFilterRule" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyTrafficMirrorSessionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyTrafficMirrorSessionRequest ( input , context ) , Action : "ModifyTrafficMirrorSession" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyTransitGatewayCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyTransitGatewayRequest ( input , context ) , Action : "ModifyTransitGateway" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyTransitGatewayPrefixListReferenceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyTransitGatewayPrefixListReferenceRequest ( input , context ) , Action : "ModifyTransitGatewayPrefixListReference" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyTransitGatewayVpcAttachmentCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyTransitGatewayVpcAttachmentRequest ( input , context ) , Action : "ModifyTransitGatewayVpcAttachment" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyVolumeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyVolumeRequest ( input , context ) , Action : "ModifyVolume" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyVolumeAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyVolumeAttributeRequest ( input , context ) , Action : "ModifyVolumeAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyVpcAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyVpcAttributeRequest ( input , context ) , Action : "ModifyVpcAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyVpcEndpointCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyVpcEndpointRequest ( input , context ) , Action : "ModifyVpcEndpoint" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyVpcEndpointConnectionNotificationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyVpcEndpointConnectionNotificationRequest ( input , context ) , Action : "ModifyVpcEndpointConnectionNotification" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyVpcEndpointServiceConfigurationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyVpcEndpointServiceConfigurationRequest ( input , context ) , Action : "ModifyVpcEndpointServiceConfiguration" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyVpcEndpointServicePayerResponsibilityCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyVpcEndpointServicePayerResponsibilityRequest ( input , context ) , Action : "ModifyVpcEndpointServicePayerResponsibility" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyVpcEndpointServicePermissionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyVpcEndpointServicePermissionsRequest ( input , context ) , Action : "ModifyVpcEndpointServicePermissions" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyVpcPeeringConnectionOptionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyVpcPeeringConnectionOptionsRequest ( input , context ) , Action : "ModifyVpcPeeringConnectionOptions" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyVpcTenancyCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyVpcTenancyRequest ( input , context ) , Action : "ModifyVpcTenancy" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyVpnConnectionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyVpnConnectionRequest ( input , context ) , Action : "ModifyVpnConnection" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyVpnConnectionOptionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyVpnConnectionOptionsRequest ( input , context ) , Action : "ModifyVpnConnectionOptions" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyVpnTunnelCertificateCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyVpnTunnelCertificateRequest ( input , context ) , Action : "ModifyVpnTunnelCertificate" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ModifyVpnTunnelOptionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ModifyVpnTunnelOptionsRequest ( input , context ) , Action : "ModifyVpnTunnelOptions" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2MonitorInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2MonitorInstancesRequest ( input , context ) , Action : "MonitorInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2MoveAddressToVpcCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2MoveAddressToVpcRequest ( input , context ) , Action : "MoveAddressToVpc" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2MoveByoipCidrToIpamCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2MoveByoipCidrToIpamRequest ( input , context ) , Action : "MoveByoipCidrToIpam" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ProvisionByoipCidrCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ProvisionByoipCidrRequest ( input , context ) , Action : "ProvisionByoipCidr" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ProvisionIpamPoolCidrCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ProvisionIpamPoolCidrRequest ( input , context ) , Action : "ProvisionIpamPoolCidr" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ProvisionPublicIpv4PoolCidrCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ProvisionPublicIpv4PoolCidrRequest ( input , context ) , Action : "ProvisionPublicIpv4PoolCidr" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2PurchaseHostReservationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2PurchaseHostReservationRequest ( input , context ) , Action : "PurchaseHostReservation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2PurchaseReservedInstancesOfferingCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2PurchaseReservedInstancesOfferingRequest ( input , context ) , Action : "PurchaseReservedInstancesOffering" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2PurchaseScheduledInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2PurchaseScheduledInstancesRequest ( input , context ) , Action : "PurchaseScheduledInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RebootInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RebootInstancesRequest ( input , context ) , Action : "RebootInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RegisterImageCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RegisterImageRequest ( input , context ) , Action : "RegisterImage" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RegisterInstanceEventNotificationAttributesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RegisterInstanceEventNotificationAttributesRequest ( input , context ) , Action : "RegisterInstanceEventNotificationAttributes" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RegisterTransitGatewayMulticastGroupMembersCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RegisterTransitGatewayMulticastGroupMembersRequest ( input , context ) , Action : "RegisterTransitGatewayMulticastGroupMembers" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RegisterTransitGatewayMulticastGroupSourcesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RegisterTransitGatewayMulticastGroupSourcesRequest ( input , context ) , Action : "RegisterTransitGatewayMulticastGroupSources" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RejectTransitGatewayMulticastDomainAssociationsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RejectTransitGatewayMulticastDomainAssociationsRequest ( input , context ) , Action : "RejectTransitGatewayMulticastDomainAssociations" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RejectTransitGatewayPeeringAttachmentCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RejectTransitGatewayPeeringAttachmentRequest ( input , context ) , Action : "RejectTransitGatewayPeeringAttachment" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RejectTransitGatewayVpcAttachmentCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RejectTransitGatewayVpcAttachmentRequest ( input , context ) , Action : "RejectTransitGatewayVpcAttachment" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RejectVpcEndpointConnectionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RejectVpcEndpointConnectionsRequest ( input , context ) , Action : "RejectVpcEndpointConnections" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RejectVpcPeeringConnectionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RejectVpcPeeringConnectionRequest ( input , context ) , Action : "RejectVpcPeeringConnection" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ReleaseAddressCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ReleaseAddressRequest ( input , context ) , Action : "ReleaseAddress" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ReleaseHostsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ReleaseHostsRequest ( input , context ) , Action : "ReleaseHosts" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ReleaseIpamPoolAllocationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ReleaseIpamPoolAllocationRequest ( input , context ) , Action : "ReleaseIpamPoolAllocation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ReplaceIamInstanceProfileAssociationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ReplaceIamInstanceProfileAssociationRequest ( input , context ) , Action : "ReplaceIamInstanceProfileAssociation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ReplaceNetworkAclAssociationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ReplaceNetworkAclAssociationRequest ( input , context ) , Action : "ReplaceNetworkAclAssociation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ReplaceNetworkAclEntryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ReplaceNetworkAclEntryRequest ( input , context ) , Action : "ReplaceNetworkAclEntry" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ReplaceRouteCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ReplaceRouteRequest ( input , context ) , Action : "ReplaceRoute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ReplaceRouteTableAssociationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ReplaceRouteTableAssociationRequest ( input , context ) , Action : "ReplaceRouteTableAssociation" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ReplaceTransitGatewayRouteCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ReplaceTransitGatewayRouteRequest ( input , context ) , Action : "ReplaceTransitGatewayRoute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ReportInstanceStatusCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ReportInstanceStatusRequest ( input , context ) , Action : "ReportInstanceStatus" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RequestSpotFleetCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RequestSpotFleetRequest ( input , context ) , Action : "RequestSpotFleet" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RequestSpotInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RequestSpotInstancesRequest ( input , context ) , Action : "RequestSpotInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ResetAddressAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ResetAddressAttributeRequest ( input , context ) , Action : "ResetAddressAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ResetEbsDefaultKmsKeyIdCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ResetEbsDefaultKmsKeyIdRequest ( input , context ) , Action : "ResetEbsDefaultKmsKeyId" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ResetFpgaImageAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ResetFpgaImageAttributeRequest ( input , context ) , Action : "ResetFpgaImageAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ResetImageAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ResetImageAttributeRequest ( input , context ) , Action : "ResetImageAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ResetInstanceAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ResetInstanceAttributeRequest ( input , context ) , Action : "ResetInstanceAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ResetNetworkInterfaceAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ResetNetworkInterfaceAttributeRequest ( input , context ) , Action : "ResetNetworkInterfaceAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2ResetSnapshotAttributeCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2ResetSnapshotAttributeRequest ( input , context ) , Action : "ResetSnapshotAttribute" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RestoreAddressToClassicCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RestoreAddressToClassicRequest ( input , context ) , Action : "RestoreAddressToClassic" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RestoreManagedPrefixListVersionCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RestoreManagedPrefixListVersionRequest ( input , context ) , Action : "RestoreManagedPrefixListVersion" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RestoreSnapshotFromRecycleBinCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RestoreSnapshotFromRecycleBinRequest ( input , context ) , Action : "RestoreSnapshotFromRecycleBin" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RestoreSnapshotTierCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RestoreSnapshotTierRequest ( input , context ) , Action : "RestoreSnapshotTier" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RevokeClientVpnIngressCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RevokeClientVpnIngressRequest ( input , context ) , Action : "RevokeClientVpnIngress" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RevokeSecurityGroupEgressCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RevokeSecurityGroupEgressRequest ( input , context ) , Action : "RevokeSecurityGroupEgress" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RevokeSecurityGroupIngressCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RevokeSecurityGroupIngressRequest ( input , context ) , Action : "RevokeSecurityGroupIngress" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RunInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RunInstancesRequest ( input , context ) , Action : "RunInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2RunScheduledInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2RunScheduledInstancesRequest ( input , context ) , Action : "RunScheduledInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2SearchLocalGatewayRoutesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2SearchLocalGatewayRoutesRequest ( input , context ) , Action : "SearchLocalGatewayRoutes" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2SearchTransitGatewayMulticastGroupsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2SearchTransitGatewayMulticastGroupsRequest ( input , context ) , Action : "SearchTransitGatewayMulticastGroups" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2SearchTransitGatewayRoutesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2SearchTransitGatewayRoutesRequest ( input , context ) , Action : "SearchTransitGatewayRoutes" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2SendDiagnosticInterruptCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2SendDiagnosticInterruptRequest ( input , context ) , Action : "SendDiagnosticInterrupt" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2StartInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2StartInstancesRequest ( input , context ) , Action : "StartInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2StartNetworkInsightsAccessScopeAnalysisCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2StartNetworkInsightsAccessScopeAnalysisRequest ( input , context ) , Action : "StartNetworkInsightsAccessScopeAnalysis" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2StartNetworkInsightsAnalysisCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2StartNetworkInsightsAnalysisRequest ( input , context ) , Action : "StartNetworkInsightsAnalysis" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2StartVpcEndpointServicePrivateDnsVerificationCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2StartVpcEndpointServicePrivateDnsVerificationRequest ( input , context ) , Action : "StartVpcEndpointServicePrivateDnsVerification" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2StopInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2StopInstancesRequest ( input , context ) , Action : "StopInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2TerminateClientVpnConnectionsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2TerminateClientVpnConnectionsRequest ( input , context ) , Action : "TerminateClientVpnConnections" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2TerminateInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2TerminateInstancesRequest ( input , context ) , Action : "TerminateInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2UnassignIpv6AddressesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2UnassignIpv6AddressesRequest ( input , context ) , Action : "UnassignIpv6Addresses" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2UnassignPrivateIpAddressesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2UnassignPrivateIpAddressesRequest ( input , context ) , Action : "UnassignPrivateIpAddresses" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2UnmonitorInstancesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2UnmonitorInstancesRequest ( input , context ) , Action : "UnmonitorInstances" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2UpdateSecurityGroupRuleDescriptionsEgressCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2UpdateSecurityGroupRuleDescriptionsEgressRequest ( input , context ) , Action : "UpdateSecurityGroupRuleDescriptionsEgress" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2UpdateSecurityGroupRuleDescriptionsIngressCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2UpdateSecurityGroupRuleDescriptionsIngressRequest ( input , context ) , Action : "UpdateSecurityGroupRuleDescriptionsIngress" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_ec2WithdrawByoipCidrCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-www-form-urlencoded" , } ; let body ; body = buildFormUrlencodedString ( { ... serializeAws_ec2WithdrawByoipCidrRequest ( input , context ) , Action : "WithdrawByoipCidr" , Version : "2016-11-15" , } ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const deserializeAws_ec2AcceptReservedInstancesExchangeQuoteCommand = async ( output , context ) : Promise < AcceptReservedInstancesExchangeQuoteCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AcceptReservedInstancesExchangeQuoteCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AcceptReservedInstancesExchangeQuoteResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AcceptReservedInstancesExchangeQuoteCommandError = async ( output , context ) : Promise < AcceptReservedInstancesExchangeQuoteCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AcceptTransitGatewayMulticastDomainAssociationsCommand = async ( output , context ) : Promise < AcceptTransitGatewayMulticastDomainAssociationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AcceptTransitGatewayMulticastDomainAssociationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AcceptTransitGatewayMulticastDomainAssociationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AcceptTransitGatewayMulticastDomainAssociationsCommandError = async ( output , context ) : Promise < AcceptTransitGatewayMulticastDomainAssociationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AcceptTransitGatewayPeeringAttachmentCommand = async ( output , context ) : Promise < AcceptTransitGatewayPeeringAttachmentCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AcceptTransitGatewayPeeringAttachmentCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AcceptTransitGatewayPeeringAttachmentResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AcceptTransitGatewayPeeringAttachmentCommandError = async ( output , context ) : Promise < AcceptTransitGatewayPeeringAttachmentCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AcceptTransitGatewayVpcAttachmentCommand = async ( output , context ) : Promise < AcceptTransitGatewayVpcAttachmentCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AcceptTransitGatewayVpcAttachmentCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AcceptTransitGatewayVpcAttachmentResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AcceptTransitGatewayVpcAttachmentCommandError = async ( output , context ) : Promise < AcceptTransitGatewayVpcAttachmentCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AcceptVpcEndpointConnectionsCommand = async ( output , context ) : Promise < AcceptVpcEndpointConnectionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AcceptVpcEndpointConnectionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AcceptVpcEndpointConnectionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AcceptVpcEndpointConnectionsCommandError = async ( output , context ) : Promise < AcceptVpcEndpointConnectionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AcceptVpcPeeringConnectionCommand = async ( output , context ) : Promise < AcceptVpcPeeringConnectionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AcceptVpcPeeringConnectionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AcceptVpcPeeringConnectionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AcceptVpcPeeringConnectionCommandError = async ( output , context ) : Promise < AcceptVpcPeeringConnectionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AdvertiseByoipCidrCommand = async ( output , context ) : Promise < AdvertiseByoipCidrCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AdvertiseByoipCidrCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AdvertiseByoipCidrResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AdvertiseByoipCidrCommandError = async ( output , context ) : Promise < AdvertiseByoipCidrCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AllocateAddressCommand = async ( output , context ) : Promise < AllocateAddressCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AllocateAddressCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AllocateAddressResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AllocateAddressCommandError = async ( output , context ) : Promise < AllocateAddressCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AllocateHostsCommand = async ( output , context ) : Promise < AllocateHostsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AllocateHostsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AllocateHostsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AllocateHostsCommandError = async ( output , context ) : Promise < AllocateHostsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AllocateIpamPoolCidrCommand = async ( output , context ) : Promise < AllocateIpamPoolCidrCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AllocateIpamPoolCidrCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AllocateIpamPoolCidrResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AllocateIpamPoolCidrCommandError = async ( output , context ) : Promise < AllocateIpamPoolCidrCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ApplySecurityGroupsToClientVpnTargetNetworkCommand = async ( output , context ) : Promise < ApplySecurityGroupsToClientVpnTargetNetworkCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ApplySecurityGroupsToClientVpnTargetNetworkCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ApplySecurityGroupsToClientVpnTargetNetworkResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ApplySecurityGroupsToClientVpnTargetNetworkCommandError = async ( output , context ) : Promise < ApplySecurityGroupsToClientVpnTargetNetworkCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AssignIpv6AddressesCommand = async ( output , context ) : Promise < AssignIpv6AddressesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AssignIpv6AddressesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AssignIpv6AddressesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AssignIpv6AddressesCommandError = async ( output , context ) : Promise < AssignIpv6AddressesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AssignPrivateIpAddressesCommand = async ( output , context ) : Promise < AssignPrivateIpAddressesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AssignPrivateIpAddressesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AssignPrivateIpAddressesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AssignPrivateIpAddressesCommandError = async ( output , context ) : Promise < AssignPrivateIpAddressesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AssociateAddressCommand = async ( output , context ) : Promise < AssociateAddressCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AssociateAddressCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AssociateAddressResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AssociateAddressCommandError = async ( output , context ) : Promise < AssociateAddressCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AssociateClientVpnTargetNetworkCommand = async ( output , context ) : Promise < AssociateClientVpnTargetNetworkCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AssociateClientVpnTargetNetworkCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AssociateClientVpnTargetNetworkResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AssociateClientVpnTargetNetworkCommandError = async ( output , context ) : Promise < AssociateClientVpnTargetNetworkCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AssociateDhcpOptionsCommand = async ( output , context ) : Promise < AssociateDhcpOptionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AssociateDhcpOptionsCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AssociateDhcpOptionsCommandError = async ( output , context ) : Promise < AssociateDhcpOptionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AssociateEnclaveCertificateIamRoleCommand = async ( output , context ) : Promise < AssociateEnclaveCertificateIamRoleCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AssociateEnclaveCertificateIamRoleCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AssociateEnclaveCertificateIamRoleResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AssociateEnclaveCertificateIamRoleCommandError = async ( output , context ) : Promise < AssociateEnclaveCertificateIamRoleCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AssociateIamInstanceProfileCommand = async ( output , context ) : Promise < AssociateIamInstanceProfileCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AssociateIamInstanceProfileCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AssociateIamInstanceProfileResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AssociateIamInstanceProfileCommandError = async ( output , context ) : Promise < AssociateIamInstanceProfileCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AssociateInstanceEventWindowCommand = async ( output , context ) : Promise < AssociateInstanceEventWindowCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AssociateInstanceEventWindowCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AssociateInstanceEventWindowResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AssociateInstanceEventWindowCommandError = async ( output , context ) : Promise < AssociateInstanceEventWindowCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AssociateRouteTableCommand = async ( output , context ) : Promise < AssociateRouteTableCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AssociateRouteTableCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AssociateRouteTableResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AssociateRouteTableCommandError = async ( output , context ) : Promise < AssociateRouteTableCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AssociateSubnetCidrBlockCommand = async ( output , context ) : Promise < AssociateSubnetCidrBlockCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AssociateSubnetCidrBlockCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AssociateSubnetCidrBlockResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AssociateSubnetCidrBlockCommandError = async ( output , context ) : Promise < AssociateSubnetCidrBlockCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AssociateTransitGatewayMulticastDomainCommand = async ( output , context ) : Promise < AssociateTransitGatewayMulticastDomainCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AssociateTransitGatewayMulticastDomainCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AssociateTransitGatewayMulticastDomainResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AssociateTransitGatewayMulticastDomainCommandError = async ( output , context ) : Promise < AssociateTransitGatewayMulticastDomainCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AssociateTransitGatewayRouteTableCommand = async ( output , context ) : Promise < AssociateTransitGatewayRouteTableCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AssociateTransitGatewayRouteTableCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AssociateTransitGatewayRouteTableResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AssociateTransitGatewayRouteTableCommandError = async ( output , context ) : Promise < AssociateTransitGatewayRouteTableCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AssociateTrunkInterfaceCommand = async ( output , context ) : Promise < AssociateTrunkInterfaceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AssociateTrunkInterfaceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AssociateTrunkInterfaceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AssociateTrunkInterfaceCommandError = async ( output , context ) : Promise < AssociateTrunkInterfaceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AssociateVpcCidrBlockCommand = async ( output , context ) : Promise < AssociateVpcCidrBlockCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AssociateVpcCidrBlockCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AssociateVpcCidrBlockResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AssociateVpcCidrBlockCommandError = async ( output , context ) : Promise < AssociateVpcCidrBlockCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AttachClassicLinkVpcCommand = async ( output , context ) : Promise < AttachClassicLinkVpcCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AttachClassicLinkVpcCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AttachClassicLinkVpcResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AttachClassicLinkVpcCommandError = async ( output , context ) : Promise < AttachClassicLinkVpcCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AttachInternetGatewayCommand = async ( output , context ) : Promise < AttachInternetGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AttachInternetGatewayCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AttachInternetGatewayCommandError = async ( output , context ) : Promise < AttachInternetGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AttachNetworkInterfaceCommand = async ( output , context ) : Promise < AttachNetworkInterfaceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AttachNetworkInterfaceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AttachNetworkInterfaceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AttachNetworkInterfaceCommandError = async ( output , context ) : Promise < AttachNetworkInterfaceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AttachVolumeCommand = async ( output , context ) : Promise < AttachVolumeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AttachVolumeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2VolumeAttachment ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AttachVolumeCommandError = async ( output , context ) : Promise < AttachVolumeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AttachVpnGatewayCommand = async ( output , context ) : Promise < AttachVpnGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AttachVpnGatewayCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AttachVpnGatewayResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AttachVpnGatewayCommandError = async ( output , context ) : Promise < AttachVpnGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AuthorizeClientVpnIngressCommand = async ( output , context ) : Promise < AuthorizeClientVpnIngressCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AuthorizeClientVpnIngressCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AuthorizeClientVpnIngressResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AuthorizeClientVpnIngressCommandError = async ( output , context ) : Promise < AuthorizeClientVpnIngressCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AuthorizeSecurityGroupEgressCommand = async ( output , context ) : Promise < AuthorizeSecurityGroupEgressCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AuthorizeSecurityGroupEgressCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AuthorizeSecurityGroupEgressResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AuthorizeSecurityGroupEgressCommandError = async ( output , context ) : Promise < AuthorizeSecurityGroupEgressCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2AuthorizeSecurityGroupIngressCommand = async ( output , context ) : Promise < AuthorizeSecurityGroupIngressCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2AuthorizeSecurityGroupIngressCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2AuthorizeSecurityGroupIngressResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2AuthorizeSecurityGroupIngressCommandError = async ( output , context ) : Promise < AuthorizeSecurityGroupIngressCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2BundleInstanceCommand = async ( output , context ) : Promise < BundleInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2BundleInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2BundleInstanceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2BundleInstanceCommandError = async ( output , context ) : Promise < BundleInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CancelBundleTaskCommand = async ( output , context ) : Promise < CancelBundleTaskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CancelBundleTaskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CancelBundleTaskResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CancelBundleTaskCommandError = async ( output , context ) : Promise < CancelBundleTaskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CancelCapacityReservationCommand = async ( output , context ) : Promise < CancelCapacityReservationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CancelCapacityReservationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CancelCapacityReservationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CancelCapacityReservationCommandError = async ( output , context ) : Promise < CancelCapacityReservationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CancelCapacityReservationFleetsCommand = async ( output , context ) : Promise < CancelCapacityReservationFleetsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CancelCapacityReservationFleetsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CancelCapacityReservationFleetsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CancelCapacityReservationFleetsCommandError = async ( output , context ) : Promise < CancelCapacityReservationFleetsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CancelConversionTaskCommand = async ( output , context ) : Promise < CancelConversionTaskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CancelConversionTaskCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CancelConversionTaskCommandError = async ( output , context ) : Promise < CancelConversionTaskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CancelExportTaskCommand = async ( output , context ) : Promise < CancelExportTaskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CancelExportTaskCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CancelExportTaskCommandError = async ( output , context ) : Promise < CancelExportTaskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CancelImportTaskCommand = async ( output , context ) : Promise < CancelImportTaskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CancelImportTaskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CancelImportTaskResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CancelImportTaskCommandError = async ( output , context ) : Promise < CancelImportTaskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CancelReservedInstancesListingCommand = async ( output , context ) : Promise < CancelReservedInstancesListingCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CancelReservedInstancesListingCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CancelReservedInstancesListingResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CancelReservedInstancesListingCommandError = async ( output , context ) : Promise < CancelReservedInstancesListingCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CancelSpotFleetRequestsCommand = async ( output , context ) : Promise < CancelSpotFleetRequestsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CancelSpotFleetRequestsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CancelSpotFleetRequestsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CancelSpotFleetRequestsCommandError = async ( output , context ) : Promise < CancelSpotFleetRequestsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CancelSpotInstanceRequestsCommand = async ( output , context ) : Promise < CancelSpotInstanceRequestsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CancelSpotInstanceRequestsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CancelSpotInstanceRequestsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CancelSpotInstanceRequestsCommandError = async ( output , context ) : Promise < CancelSpotInstanceRequestsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ConfirmProductInstanceCommand = async ( output , context ) : Promise < ConfirmProductInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ConfirmProductInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ConfirmProductInstanceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ConfirmProductInstanceCommandError = async ( output , context ) : Promise < ConfirmProductInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CopyFpgaImageCommand = async ( output , context ) : Promise < CopyFpgaImageCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CopyFpgaImageCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CopyFpgaImageResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CopyFpgaImageCommandError = async ( output , context ) : Promise < CopyFpgaImageCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CopyImageCommand = async ( output , context ) : Promise < CopyImageCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CopyImageCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CopyImageResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CopyImageCommandError = async ( output , context ) : Promise < CopyImageCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CopySnapshotCommand = async ( output , context ) : Promise < CopySnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CopySnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CopySnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CopySnapshotCommandError = async ( output , context ) : Promise < CopySnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateCapacityReservationCommand = async ( output , context ) : Promise < CreateCapacityReservationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateCapacityReservationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateCapacityReservationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateCapacityReservationCommandError = async ( output , context ) : Promise < CreateCapacityReservationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateCapacityReservationFleetCommand = async ( output , context ) : Promise < CreateCapacityReservationFleetCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateCapacityReservationFleetCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateCapacityReservationFleetResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateCapacityReservationFleetCommandError = async ( output , context ) : Promise < CreateCapacityReservationFleetCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateCarrierGatewayCommand = async ( output , context ) : Promise < CreateCarrierGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateCarrierGatewayCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateCarrierGatewayResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateCarrierGatewayCommandError = async ( output , context ) : Promise < CreateCarrierGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateClientVpnEndpointCommand = async ( output , context ) : Promise < CreateClientVpnEndpointCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateClientVpnEndpointCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateClientVpnEndpointResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateClientVpnEndpointCommandError = async ( output , context ) : Promise < CreateClientVpnEndpointCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateClientVpnRouteCommand = async ( output , context ) : Promise < CreateClientVpnRouteCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateClientVpnRouteCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateClientVpnRouteResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateClientVpnRouteCommandError = async ( output , context ) : Promise < CreateClientVpnRouteCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateCustomerGatewayCommand = async ( output , context ) : Promise < CreateCustomerGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateCustomerGatewayCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateCustomerGatewayResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateCustomerGatewayCommandError = async ( output , context ) : Promise < CreateCustomerGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateDefaultSubnetCommand = async ( output , context ) : Promise < CreateDefaultSubnetCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateDefaultSubnetCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateDefaultSubnetResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateDefaultSubnetCommandError = async ( output , context ) : Promise < CreateDefaultSubnetCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateDefaultVpcCommand = async ( output , context ) : Promise < CreateDefaultVpcCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateDefaultVpcCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateDefaultVpcResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateDefaultVpcCommandError = async ( output , context ) : Promise < CreateDefaultVpcCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateDhcpOptionsCommand = async ( output , context ) : Promise < CreateDhcpOptionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateDhcpOptionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateDhcpOptionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateDhcpOptionsCommandError = async ( output , context ) : Promise < CreateDhcpOptionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateEgressOnlyInternetGatewayCommand = async ( output , context ) : Promise < CreateEgressOnlyInternetGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateEgressOnlyInternetGatewayCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateEgressOnlyInternetGatewayResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateEgressOnlyInternetGatewayCommandError = async ( output , context ) : Promise < CreateEgressOnlyInternetGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateFleetCommand = async ( output , context ) : Promise < CreateFleetCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateFleetCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateFleetResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateFleetCommandError = async ( output , context ) : Promise < CreateFleetCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateFlowLogsCommand = async ( output , context ) : Promise < CreateFlowLogsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateFlowLogsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateFlowLogsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateFlowLogsCommandError = async ( output , context ) : Promise < CreateFlowLogsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateFpgaImageCommand = async ( output , context ) : Promise < CreateFpgaImageCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateFpgaImageCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateFpgaImageResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateFpgaImageCommandError = async ( output , context ) : Promise < CreateFpgaImageCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateImageCommand = async ( output , context ) : Promise < CreateImageCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateImageCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateImageResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateImageCommandError = async ( output , context ) : Promise < CreateImageCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateInstanceEventWindowCommand = async ( output , context ) : Promise < CreateInstanceEventWindowCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateInstanceEventWindowCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateInstanceEventWindowResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateInstanceEventWindowCommandError = async ( output , context ) : Promise < CreateInstanceEventWindowCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateInstanceExportTaskCommand = async ( output , context ) : Promise < CreateInstanceExportTaskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateInstanceExportTaskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateInstanceExportTaskResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateInstanceExportTaskCommandError = async ( output , context ) : Promise < CreateInstanceExportTaskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateInternetGatewayCommand = async ( output , context ) : Promise < CreateInternetGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateInternetGatewayCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateInternetGatewayResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateInternetGatewayCommandError = async ( output , context ) : Promise < CreateInternetGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateIpamCommand = async ( output , context ) : Promise < CreateIpamCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateIpamCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateIpamResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateIpamCommandError = async ( output , context ) : Promise < CreateIpamCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateIpamPoolCommand = async ( output , context ) : Promise < CreateIpamPoolCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateIpamPoolCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateIpamPoolResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateIpamPoolCommandError = async ( output , context ) : Promise < CreateIpamPoolCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateIpamScopeCommand = async ( output , context ) : Promise < CreateIpamScopeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateIpamScopeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateIpamScopeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateIpamScopeCommandError = async ( output , context ) : Promise < CreateIpamScopeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateKeyPairCommand = async ( output , context ) : Promise < CreateKeyPairCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateKeyPairCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2KeyPair ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateKeyPairCommandError = async ( output , context ) : Promise < CreateKeyPairCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateLaunchTemplateCommand = async ( output , context ) : Promise < CreateLaunchTemplateCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateLaunchTemplateCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateLaunchTemplateResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateLaunchTemplateCommandError = async ( output , context ) : Promise < CreateLaunchTemplateCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateLaunchTemplateVersionCommand = async ( output , context ) : Promise < CreateLaunchTemplateVersionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateLaunchTemplateVersionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateLaunchTemplateVersionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateLaunchTemplateVersionCommandError = async ( output , context ) : Promise < CreateLaunchTemplateVersionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateLocalGatewayRouteCommand = async ( output , context ) : Promise < CreateLocalGatewayRouteCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateLocalGatewayRouteCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateLocalGatewayRouteResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateLocalGatewayRouteCommandError = async ( output , context ) : Promise < CreateLocalGatewayRouteCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateLocalGatewayRouteTableVpcAssociationCommand = async ( output , context ) : Promise < CreateLocalGatewayRouteTableVpcAssociationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateLocalGatewayRouteTableVpcAssociationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateLocalGatewayRouteTableVpcAssociationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateLocalGatewayRouteTableVpcAssociationCommandError = async ( output , context ) : Promise < CreateLocalGatewayRouteTableVpcAssociationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateManagedPrefixListCommand = async ( output , context ) : Promise < CreateManagedPrefixListCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateManagedPrefixListCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateManagedPrefixListResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateManagedPrefixListCommandError = async ( output , context ) : Promise < CreateManagedPrefixListCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateNatGatewayCommand = async ( output , context ) : Promise < CreateNatGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateNatGatewayCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateNatGatewayResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateNatGatewayCommandError = async ( output , context ) : Promise < CreateNatGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateNetworkAclCommand = async ( output , context ) : Promise < CreateNetworkAclCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateNetworkAclCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateNetworkAclResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateNetworkAclCommandError = async ( output , context ) : Promise < CreateNetworkAclCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateNetworkAclEntryCommand = async ( output , context ) : Promise < CreateNetworkAclEntryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateNetworkAclEntryCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateNetworkAclEntryCommandError = async ( output , context ) : Promise < CreateNetworkAclEntryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateNetworkInsightsAccessScopeCommand = async ( output , context ) : Promise < CreateNetworkInsightsAccessScopeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateNetworkInsightsAccessScopeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateNetworkInsightsAccessScopeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateNetworkInsightsAccessScopeCommandError = async ( output , context ) : Promise < CreateNetworkInsightsAccessScopeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateNetworkInsightsPathCommand = async ( output , context ) : Promise < CreateNetworkInsightsPathCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateNetworkInsightsPathCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateNetworkInsightsPathResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateNetworkInsightsPathCommandError = async ( output , context ) : Promise < CreateNetworkInsightsPathCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateNetworkInterfaceCommand = async ( output , context ) : Promise < CreateNetworkInterfaceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateNetworkInterfaceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateNetworkInterfaceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateNetworkInterfaceCommandError = async ( output , context ) : Promise < CreateNetworkInterfaceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateNetworkInterfacePermissionCommand = async ( output , context ) : Promise < CreateNetworkInterfacePermissionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateNetworkInterfacePermissionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateNetworkInterfacePermissionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateNetworkInterfacePermissionCommandError = async ( output , context ) : Promise < CreateNetworkInterfacePermissionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreatePlacementGroupCommand = async ( output , context ) : Promise < CreatePlacementGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreatePlacementGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreatePlacementGroupResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreatePlacementGroupCommandError = async ( output , context ) : Promise < CreatePlacementGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreatePublicIpv4PoolCommand = async ( output , context ) : Promise < CreatePublicIpv4PoolCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreatePublicIpv4PoolCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreatePublicIpv4PoolResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreatePublicIpv4PoolCommandError = async ( output , context ) : Promise < CreatePublicIpv4PoolCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateReplaceRootVolumeTaskCommand = async ( output , context ) : Promise < CreateReplaceRootVolumeTaskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateReplaceRootVolumeTaskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateReplaceRootVolumeTaskResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateReplaceRootVolumeTaskCommandError = async ( output , context ) : Promise < CreateReplaceRootVolumeTaskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateReservedInstancesListingCommand = async ( output , context ) : Promise < CreateReservedInstancesListingCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateReservedInstancesListingCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateReservedInstancesListingResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateReservedInstancesListingCommandError = async ( output , context ) : Promise < CreateReservedInstancesListingCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateRestoreImageTaskCommand = async ( output , context ) : Promise < CreateRestoreImageTaskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateRestoreImageTaskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateRestoreImageTaskResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateRestoreImageTaskCommandError = async ( output , context ) : Promise < CreateRestoreImageTaskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateRouteCommand = async ( output , context ) : Promise < CreateRouteCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateRouteCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateRouteResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateRouteCommandError = async ( output , context ) : Promise < CreateRouteCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateRouteTableCommand = async ( output , context ) : Promise < CreateRouteTableCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateRouteTableCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateRouteTableResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateRouteTableCommandError = async ( output , context ) : Promise < CreateRouteTableCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateSecurityGroupCommand = async ( output , context ) : Promise < CreateSecurityGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateSecurityGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateSecurityGroupResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateSecurityGroupCommandError = async ( output , context ) : Promise < CreateSecurityGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateSnapshotCommand = async ( output , context ) : Promise < CreateSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2Snapshot ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateSnapshotCommandError = async ( output , context ) : Promise < CreateSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateSnapshotsCommand = async ( output , context ) : Promise < CreateSnapshotsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateSnapshotsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateSnapshotsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateSnapshotsCommandError = async ( output , context ) : Promise < CreateSnapshotsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateSpotDatafeedSubscriptionCommand = async ( output , context ) : Promise < CreateSpotDatafeedSubscriptionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateSpotDatafeedSubscriptionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateSpotDatafeedSubscriptionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateSpotDatafeedSubscriptionCommandError = async ( output , context ) : Promise < CreateSpotDatafeedSubscriptionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateStoreImageTaskCommand = async ( output , context ) : Promise < CreateStoreImageTaskCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateStoreImageTaskCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateStoreImageTaskResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateStoreImageTaskCommandError = async ( output , context ) : Promise < CreateStoreImageTaskCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateSubnetCommand = async ( output , context ) : Promise < CreateSubnetCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateSubnetCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateSubnetResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateSubnetCommandError = async ( output , context ) : Promise < CreateSubnetCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateSubnetCidrReservationCommand = async ( output , context ) : Promise < CreateSubnetCidrReservationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateSubnetCidrReservationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateSubnetCidrReservationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateSubnetCidrReservationCommandError = async ( output , context ) : Promise < CreateSubnetCidrReservationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateTagsCommand = async ( output , context ) : Promise < CreateTagsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateTagsCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateTagsCommandError = async ( output , context ) : Promise < CreateTagsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateTrafficMirrorFilterCommand = async ( output , context ) : Promise < CreateTrafficMirrorFilterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateTrafficMirrorFilterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateTrafficMirrorFilterResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateTrafficMirrorFilterCommandError = async ( output , context ) : Promise < CreateTrafficMirrorFilterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateTrafficMirrorFilterRuleCommand = async ( output , context ) : Promise < CreateTrafficMirrorFilterRuleCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateTrafficMirrorFilterRuleCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateTrafficMirrorFilterRuleResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateTrafficMirrorFilterRuleCommandError = async ( output , context ) : Promise < CreateTrafficMirrorFilterRuleCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateTrafficMirrorSessionCommand = async ( output , context ) : Promise < CreateTrafficMirrorSessionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateTrafficMirrorSessionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateTrafficMirrorSessionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateTrafficMirrorSessionCommandError = async ( output , context ) : Promise < CreateTrafficMirrorSessionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateTrafficMirrorTargetCommand = async ( output , context ) : Promise < CreateTrafficMirrorTargetCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateTrafficMirrorTargetCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateTrafficMirrorTargetResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateTrafficMirrorTargetCommandError = async ( output , context ) : Promise < CreateTrafficMirrorTargetCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateTransitGatewayCommand = async ( output , context ) : Promise < CreateTransitGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateTransitGatewayCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateTransitGatewayResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateTransitGatewayCommandError = async ( output , context ) : Promise < CreateTransitGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateTransitGatewayConnectCommand = async ( output , context ) : Promise < CreateTransitGatewayConnectCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateTransitGatewayConnectCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateTransitGatewayConnectResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateTransitGatewayConnectCommandError = async ( output , context ) : Promise < CreateTransitGatewayConnectCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateTransitGatewayConnectPeerCommand = async ( output , context ) : Promise < CreateTransitGatewayConnectPeerCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateTransitGatewayConnectPeerCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateTransitGatewayConnectPeerResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateTransitGatewayConnectPeerCommandError = async ( output , context ) : Promise < CreateTransitGatewayConnectPeerCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateTransitGatewayMulticastDomainCommand = async ( output , context ) : Promise < CreateTransitGatewayMulticastDomainCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateTransitGatewayMulticastDomainCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateTransitGatewayMulticastDomainResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateTransitGatewayMulticastDomainCommandError = async ( output , context ) : Promise < CreateTransitGatewayMulticastDomainCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateTransitGatewayPeeringAttachmentCommand = async ( output , context ) : Promise < CreateTransitGatewayPeeringAttachmentCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateTransitGatewayPeeringAttachmentCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateTransitGatewayPeeringAttachmentResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateTransitGatewayPeeringAttachmentCommandError = async ( output , context ) : Promise < CreateTransitGatewayPeeringAttachmentCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateTransitGatewayPrefixListReferenceCommand = async ( output , context ) : Promise < CreateTransitGatewayPrefixListReferenceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateTransitGatewayPrefixListReferenceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateTransitGatewayPrefixListReferenceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateTransitGatewayPrefixListReferenceCommandError = async ( output , context ) : Promise < CreateTransitGatewayPrefixListReferenceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateTransitGatewayRouteCommand = async ( output , context ) : Promise < CreateTransitGatewayRouteCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateTransitGatewayRouteCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateTransitGatewayRouteResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateTransitGatewayRouteCommandError = async ( output , context ) : Promise < CreateTransitGatewayRouteCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateTransitGatewayRouteTableCommand = async ( output , context ) : Promise < CreateTransitGatewayRouteTableCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateTransitGatewayRouteTableCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateTransitGatewayRouteTableResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateTransitGatewayRouteTableCommandError = async ( output , context ) : Promise < CreateTransitGatewayRouteTableCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateTransitGatewayVpcAttachmentCommand = async ( output , context ) : Promise < CreateTransitGatewayVpcAttachmentCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateTransitGatewayVpcAttachmentCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateTransitGatewayVpcAttachmentResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateTransitGatewayVpcAttachmentCommandError = async ( output , context ) : Promise < CreateTransitGatewayVpcAttachmentCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateVolumeCommand = async ( output , context ) : Promise < CreateVolumeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateVolumeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2Volume ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateVolumeCommandError = async ( output , context ) : Promise < CreateVolumeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateVpcCommand = async ( output , context ) : Promise < CreateVpcCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateVpcCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateVpcResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateVpcCommandError = async ( output , context ) : Promise < CreateVpcCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateVpcEndpointCommand = async ( output , context ) : Promise < CreateVpcEndpointCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateVpcEndpointCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateVpcEndpointResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateVpcEndpointCommandError = async ( output , context ) : Promise < CreateVpcEndpointCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateVpcEndpointConnectionNotificationCommand = async ( output , context ) : Promise < CreateVpcEndpointConnectionNotificationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateVpcEndpointConnectionNotificationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateVpcEndpointConnectionNotificationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateVpcEndpointConnectionNotificationCommandError = async ( output , context ) : Promise < CreateVpcEndpointConnectionNotificationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateVpcEndpointServiceConfigurationCommand = async ( output , context ) : Promise < CreateVpcEndpointServiceConfigurationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateVpcEndpointServiceConfigurationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateVpcEndpointServiceConfigurationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateVpcEndpointServiceConfigurationCommandError = async ( output , context ) : Promise < CreateVpcEndpointServiceConfigurationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateVpcPeeringConnectionCommand = async ( output , context ) : Promise < CreateVpcPeeringConnectionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateVpcPeeringConnectionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateVpcPeeringConnectionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateVpcPeeringConnectionCommandError = async ( output , context ) : Promise < CreateVpcPeeringConnectionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateVpnConnectionCommand = async ( output , context ) : Promise < CreateVpnConnectionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateVpnConnectionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateVpnConnectionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateVpnConnectionCommandError = async ( output , context ) : Promise < CreateVpnConnectionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateVpnConnectionRouteCommand = async ( output , context ) : Promise < CreateVpnConnectionRouteCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateVpnConnectionRouteCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateVpnConnectionRouteCommandError = async ( output , context ) : Promise < CreateVpnConnectionRouteCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2CreateVpnGatewayCommand = async ( output , context ) : Promise < CreateVpnGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2CreateVpnGatewayCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2CreateVpnGatewayResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2CreateVpnGatewayCommandError = async ( output , context ) : Promise < CreateVpnGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteCarrierGatewayCommand = async ( output , context ) : Promise < DeleteCarrierGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteCarrierGatewayCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteCarrierGatewayResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteCarrierGatewayCommandError = async ( output , context ) : Promise < DeleteCarrierGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteClientVpnEndpointCommand = async ( output , context ) : Promise < DeleteClientVpnEndpointCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteClientVpnEndpointCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteClientVpnEndpointResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteClientVpnEndpointCommandError = async ( output , context ) : Promise < DeleteClientVpnEndpointCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteClientVpnRouteCommand = async ( output , context ) : Promise < DeleteClientVpnRouteCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteClientVpnRouteCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteClientVpnRouteResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteClientVpnRouteCommandError = async ( output , context ) : Promise < DeleteClientVpnRouteCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteCustomerGatewayCommand = async ( output , context ) : Promise < DeleteCustomerGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteCustomerGatewayCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteCustomerGatewayCommandError = async ( output , context ) : Promise < DeleteCustomerGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteDhcpOptionsCommand = async ( output , context ) : Promise < DeleteDhcpOptionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteDhcpOptionsCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteDhcpOptionsCommandError = async ( output , context ) : Promise < DeleteDhcpOptionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteEgressOnlyInternetGatewayCommand = async ( output , context ) : Promise < DeleteEgressOnlyInternetGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteEgressOnlyInternetGatewayCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteEgressOnlyInternetGatewayResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteEgressOnlyInternetGatewayCommandError = async ( output , context ) : Promise < DeleteEgressOnlyInternetGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteFleetsCommand = async ( output , context ) : Promise < DeleteFleetsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteFleetsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteFleetsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteFleetsCommandError = async ( output , context ) : Promise < DeleteFleetsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteFlowLogsCommand = async ( output , context ) : Promise < DeleteFlowLogsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteFlowLogsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteFlowLogsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteFlowLogsCommandError = async ( output , context ) : Promise < DeleteFlowLogsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteFpgaImageCommand = async ( output , context ) : Promise < DeleteFpgaImageCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteFpgaImageCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteFpgaImageResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteFpgaImageCommandError = async ( output , context ) : Promise < DeleteFpgaImageCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteInstanceEventWindowCommand = async ( output , context ) : Promise < DeleteInstanceEventWindowCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteInstanceEventWindowCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteInstanceEventWindowResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteInstanceEventWindowCommandError = async ( output , context ) : Promise < DeleteInstanceEventWindowCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteInternetGatewayCommand = async ( output , context ) : Promise < DeleteInternetGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteInternetGatewayCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteInternetGatewayCommandError = async ( output , context ) : Promise < DeleteInternetGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteIpamCommand = async ( output , context ) : Promise < DeleteIpamCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteIpamCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteIpamResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteIpamCommandError = async ( output , context ) : Promise < DeleteIpamCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteIpamPoolCommand = async ( output , context ) : Promise < DeleteIpamPoolCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteIpamPoolCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteIpamPoolResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteIpamPoolCommandError = async ( output , context ) : Promise < DeleteIpamPoolCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteIpamScopeCommand = async ( output , context ) : Promise < DeleteIpamScopeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteIpamScopeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteIpamScopeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteIpamScopeCommandError = async ( output , context ) : Promise < DeleteIpamScopeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteKeyPairCommand = async ( output , context ) : Promise < DeleteKeyPairCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteKeyPairCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteKeyPairCommandError = async ( output , context ) : Promise < DeleteKeyPairCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteLaunchTemplateCommand = async ( output , context ) : Promise < DeleteLaunchTemplateCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteLaunchTemplateCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteLaunchTemplateResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteLaunchTemplateCommandError = async ( output , context ) : Promise < DeleteLaunchTemplateCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteLaunchTemplateVersionsCommand = async ( output , context ) : Promise < DeleteLaunchTemplateVersionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteLaunchTemplateVersionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteLaunchTemplateVersionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteLaunchTemplateVersionsCommandError = async ( output , context ) : Promise < DeleteLaunchTemplateVersionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteLocalGatewayRouteCommand = async ( output , context ) : Promise < DeleteLocalGatewayRouteCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteLocalGatewayRouteCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteLocalGatewayRouteResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteLocalGatewayRouteCommandError = async ( output , context ) : Promise < DeleteLocalGatewayRouteCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteLocalGatewayRouteTableVpcAssociationCommand = async ( output , context ) : Promise < DeleteLocalGatewayRouteTableVpcAssociationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteLocalGatewayRouteTableVpcAssociationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteLocalGatewayRouteTableVpcAssociationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteLocalGatewayRouteTableVpcAssociationCommandError = async ( output , context ) : Promise < DeleteLocalGatewayRouteTableVpcAssociationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteManagedPrefixListCommand = async ( output , context ) : Promise < DeleteManagedPrefixListCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteManagedPrefixListCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteManagedPrefixListResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteManagedPrefixListCommandError = async ( output , context ) : Promise < DeleteManagedPrefixListCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteNatGatewayCommand = async ( output , context ) : Promise < DeleteNatGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteNatGatewayCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteNatGatewayResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteNatGatewayCommandError = async ( output , context ) : Promise < DeleteNatGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteNetworkAclCommand = async ( output , context ) : Promise < DeleteNetworkAclCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteNetworkAclCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteNetworkAclCommandError = async ( output , context ) : Promise < DeleteNetworkAclCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteNetworkAclEntryCommand = async ( output , context ) : Promise < DeleteNetworkAclEntryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteNetworkAclEntryCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteNetworkAclEntryCommandError = async ( output , context ) : Promise < DeleteNetworkAclEntryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteNetworkInsightsAccessScopeCommand = async ( output , context ) : Promise < DeleteNetworkInsightsAccessScopeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteNetworkInsightsAccessScopeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteNetworkInsightsAccessScopeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteNetworkInsightsAccessScopeCommandError = async ( output , context ) : Promise < DeleteNetworkInsightsAccessScopeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteNetworkInsightsAccessScopeAnalysisCommand = async ( output , context ) : Promise < DeleteNetworkInsightsAccessScopeAnalysisCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteNetworkInsightsAccessScopeAnalysisCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteNetworkInsightsAccessScopeAnalysisResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteNetworkInsightsAccessScopeAnalysisCommandError = async ( output , context ) : Promise < DeleteNetworkInsightsAccessScopeAnalysisCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteNetworkInsightsAnalysisCommand = async ( output , context ) : Promise < DeleteNetworkInsightsAnalysisCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteNetworkInsightsAnalysisCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteNetworkInsightsAnalysisResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteNetworkInsightsAnalysisCommandError = async ( output , context ) : Promise < DeleteNetworkInsightsAnalysisCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteNetworkInsightsPathCommand = async ( output , context ) : Promise < DeleteNetworkInsightsPathCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteNetworkInsightsPathCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteNetworkInsightsPathResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteNetworkInsightsPathCommandError = async ( output , context ) : Promise < DeleteNetworkInsightsPathCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteNetworkInterfaceCommand = async ( output , context ) : Promise < DeleteNetworkInterfaceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteNetworkInterfaceCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteNetworkInterfaceCommandError = async ( output , context ) : Promise < DeleteNetworkInterfaceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteNetworkInterfacePermissionCommand = async ( output , context ) : Promise < DeleteNetworkInterfacePermissionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteNetworkInterfacePermissionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteNetworkInterfacePermissionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteNetworkInterfacePermissionCommandError = async ( output , context ) : Promise < DeleteNetworkInterfacePermissionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeletePlacementGroupCommand = async ( output , context ) : Promise < DeletePlacementGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeletePlacementGroupCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeletePlacementGroupCommandError = async ( output , context ) : Promise < DeletePlacementGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeletePublicIpv4PoolCommand = async ( output , context ) : Promise < DeletePublicIpv4PoolCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeletePublicIpv4PoolCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeletePublicIpv4PoolResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeletePublicIpv4PoolCommandError = async ( output , context ) : Promise < DeletePublicIpv4PoolCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteQueuedReservedInstancesCommand = async ( output , context ) : Promise < DeleteQueuedReservedInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteQueuedReservedInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteQueuedReservedInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteQueuedReservedInstancesCommandError = async ( output , context ) : Promise < DeleteQueuedReservedInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteRouteCommand = async ( output , context ) : Promise < DeleteRouteCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteRouteCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteRouteCommandError = async ( output , context ) : Promise < DeleteRouteCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteRouteTableCommand = async ( output , context ) : Promise < DeleteRouteTableCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteRouteTableCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteRouteTableCommandError = async ( output , context ) : Promise < DeleteRouteTableCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteSecurityGroupCommand = async ( output , context ) : Promise < DeleteSecurityGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteSecurityGroupCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteSecurityGroupCommandError = async ( output , context ) : Promise < DeleteSecurityGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteSnapshotCommand = async ( output , context ) : Promise < DeleteSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteSnapshotCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteSnapshotCommandError = async ( output , context ) : Promise < DeleteSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteSpotDatafeedSubscriptionCommand = async ( output , context ) : Promise < DeleteSpotDatafeedSubscriptionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteSpotDatafeedSubscriptionCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteSpotDatafeedSubscriptionCommandError = async ( output , context ) : Promise < DeleteSpotDatafeedSubscriptionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteSubnetCommand = async ( output , context ) : Promise < DeleteSubnetCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteSubnetCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteSubnetCommandError = async ( output , context ) : Promise < DeleteSubnetCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteSubnetCidrReservationCommand = async ( output , context ) : Promise < DeleteSubnetCidrReservationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteSubnetCidrReservationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteSubnetCidrReservationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteSubnetCidrReservationCommandError = async ( output , context ) : Promise < DeleteSubnetCidrReservationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteTagsCommand = async ( output , context ) : Promise < DeleteTagsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteTagsCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteTagsCommandError = async ( output , context ) : Promise < DeleteTagsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteTrafficMirrorFilterCommand = async ( output , context ) : Promise < DeleteTrafficMirrorFilterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteTrafficMirrorFilterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteTrafficMirrorFilterResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteTrafficMirrorFilterCommandError = async ( output , context ) : Promise < DeleteTrafficMirrorFilterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteTrafficMirrorFilterRuleCommand = async ( output , context ) : Promise < DeleteTrafficMirrorFilterRuleCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteTrafficMirrorFilterRuleCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteTrafficMirrorFilterRuleResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteTrafficMirrorFilterRuleCommandError = async ( output , context ) : Promise < DeleteTrafficMirrorFilterRuleCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteTrafficMirrorSessionCommand = async ( output , context ) : Promise < DeleteTrafficMirrorSessionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteTrafficMirrorSessionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteTrafficMirrorSessionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteTrafficMirrorSessionCommandError = async ( output , context ) : Promise < DeleteTrafficMirrorSessionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteTrafficMirrorTargetCommand = async ( output , context ) : Promise < DeleteTrafficMirrorTargetCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteTrafficMirrorTargetCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteTrafficMirrorTargetResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteTrafficMirrorTargetCommandError = async ( output , context ) : Promise < DeleteTrafficMirrorTargetCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteTransitGatewayCommand = async ( output , context ) : Promise < DeleteTransitGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteTransitGatewayCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteTransitGatewayResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteTransitGatewayCommandError = async ( output , context ) : Promise < DeleteTransitGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteTransitGatewayConnectCommand = async ( output , context ) : Promise < DeleteTransitGatewayConnectCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteTransitGatewayConnectCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteTransitGatewayConnectResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteTransitGatewayConnectCommandError = async ( output , context ) : Promise < DeleteTransitGatewayConnectCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteTransitGatewayConnectPeerCommand = async ( output , context ) : Promise < DeleteTransitGatewayConnectPeerCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteTransitGatewayConnectPeerCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteTransitGatewayConnectPeerResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteTransitGatewayConnectPeerCommandError = async ( output , context ) : Promise < DeleteTransitGatewayConnectPeerCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteTransitGatewayMulticastDomainCommand = async ( output , context ) : Promise < DeleteTransitGatewayMulticastDomainCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteTransitGatewayMulticastDomainCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteTransitGatewayMulticastDomainResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteTransitGatewayMulticastDomainCommandError = async ( output , context ) : Promise < DeleteTransitGatewayMulticastDomainCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteTransitGatewayPeeringAttachmentCommand = async ( output , context ) : Promise < DeleteTransitGatewayPeeringAttachmentCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteTransitGatewayPeeringAttachmentCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteTransitGatewayPeeringAttachmentResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteTransitGatewayPeeringAttachmentCommandError = async ( output , context ) : Promise < DeleteTransitGatewayPeeringAttachmentCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteTransitGatewayPrefixListReferenceCommand = async ( output , context ) : Promise < DeleteTransitGatewayPrefixListReferenceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteTransitGatewayPrefixListReferenceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteTransitGatewayPrefixListReferenceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteTransitGatewayPrefixListReferenceCommandError = async ( output , context ) : Promise < DeleteTransitGatewayPrefixListReferenceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteTransitGatewayRouteCommand = async ( output , context ) : Promise < DeleteTransitGatewayRouteCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteTransitGatewayRouteCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteTransitGatewayRouteResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteTransitGatewayRouteCommandError = async ( output , context ) : Promise < DeleteTransitGatewayRouteCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteTransitGatewayRouteTableCommand = async ( output , context ) : Promise < DeleteTransitGatewayRouteTableCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteTransitGatewayRouteTableCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteTransitGatewayRouteTableResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteTransitGatewayRouteTableCommandError = async ( output , context ) : Promise < DeleteTransitGatewayRouteTableCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteTransitGatewayVpcAttachmentCommand = async ( output , context ) : Promise < DeleteTransitGatewayVpcAttachmentCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteTransitGatewayVpcAttachmentCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteTransitGatewayVpcAttachmentResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteTransitGatewayVpcAttachmentCommandError = async ( output , context ) : Promise < DeleteTransitGatewayVpcAttachmentCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteVolumeCommand = async ( output , context ) : Promise < DeleteVolumeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteVolumeCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteVolumeCommandError = async ( output , context ) : Promise < DeleteVolumeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteVpcCommand = async ( output , context ) : Promise < DeleteVpcCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteVpcCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteVpcCommandError = async ( output , context ) : Promise < DeleteVpcCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteVpcEndpointConnectionNotificationsCommand = async ( output , context ) : Promise < DeleteVpcEndpointConnectionNotificationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteVpcEndpointConnectionNotificationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteVpcEndpointConnectionNotificationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteVpcEndpointConnectionNotificationsCommandError = async ( output , context ) : Promise < DeleteVpcEndpointConnectionNotificationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteVpcEndpointsCommand = async ( output , context ) : Promise < DeleteVpcEndpointsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteVpcEndpointsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteVpcEndpointsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteVpcEndpointsCommandError = async ( output , context ) : Promise < DeleteVpcEndpointsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteVpcEndpointServiceConfigurationsCommand = async ( output , context ) : Promise < DeleteVpcEndpointServiceConfigurationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteVpcEndpointServiceConfigurationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteVpcEndpointServiceConfigurationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteVpcEndpointServiceConfigurationsCommandError = async ( output , context ) : Promise < DeleteVpcEndpointServiceConfigurationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteVpcPeeringConnectionCommand = async ( output , context ) : Promise < DeleteVpcPeeringConnectionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteVpcPeeringConnectionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeleteVpcPeeringConnectionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteVpcPeeringConnectionCommandError = async ( output , context ) : Promise < DeleteVpcPeeringConnectionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteVpnConnectionCommand = async ( output , context ) : Promise < DeleteVpnConnectionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteVpnConnectionCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteVpnConnectionCommandError = async ( output , context ) : Promise < DeleteVpnConnectionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteVpnConnectionRouteCommand = async ( output , context ) : Promise < DeleteVpnConnectionRouteCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteVpnConnectionRouteCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteVpnConnectionRouteCommandError = async ( output , context ) : Promise < DeleteVpnConnectionRouteCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeleteVpnGatewayCommand = async ( output , context ) : Promise < DeleteVpnGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeleteVpnGatewayCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeleteVpnGatewayCommandError = async ( output , context ) : Promise < DeleteVpnGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeprovisionByoipCidrCommand = async ( output , context ) : Promise < DeprovisionByoipCidrCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeprovisionByoipCidrCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeprovisionByoipCidrResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeprovisionByoipCidrCommandError = async ( output , context ) : Promise < DeprovisionByoipCidrCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeprovisionIpamPoolCidrCommand = async ( output , context ) : Promise < DeprovisionIpamPoolCidrCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeprovisionIpamPoolCidrCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeprovisionIpamPoolCidrResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeprovisionIpamPoolCidrCommandError = async ( output , context ) : Promise < DeprovisionIpamPoolCidrCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeprovisionPublicIpv4PoolCidrCommand = async ( output , context ) : Promise < DeprovisionPublicIpv4PoolCidrCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeprovisionPublicIpv4PoolCidrCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeprovisionPublicIpv4PoolCidrResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeprovisionPublicIpv4PoolCidrCommandError = async ( output , context ) : Promise < DeprovisionPublicIpv4PoolCidrCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeregisterImageCommand = async ( output , context ) : Promise < DeregisterImageCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeregisterImageCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeregisterImageCommandError = async ( output , context ) : Promise < DeregisterImageCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeregisterInstanceEventNotificationAttributesCommand = async ( output , context ) : Promise < DeregisterInstanceEventNotificationAttributesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeregisterInstanceEventNotificationAttributesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeregisterInstanceEventNotificationAttributesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeregisterInstanceEventNotificationAttributesCommandError = async ( output , context ) : Promise < DeregisterInstanceEventNotificationAttributesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeregisterTransitGatewayMulticastGroupMembersCommand = async ( output , context ) : Promise < DeregisterTransitGatewayMulticastGroupMembersCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeregisterTransitGatewayMulticastGroupMembersCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeregisterTransitGatewayMulticastGroupMembersResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeregisterTransitGatewayMulticastGroupMembersCommandError = async ( output , context ) : Promise < DeregisterTransitGatewayMulticastGroupMembersCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DeregisterTransitGatewayMulticastGroupSourcesCommand = async ( output , context ) : Promise < DeregisterTransitGatewayMulticastGroupSourcesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DeregisterTransitGatewayMulticastGroupSourcesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DeregisterTransitGatewayMulticastGroupSourcesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DeregisterTransitGatewayMulticastGroupSourcesCommandError = async ( output , context ) : Promise < DeregisterTransitGatewayMulticastGroupSourcesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeAccountAttributesCommand = async ( output , context ) : Promise < DescribeAccountAttributesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeAccountAttributesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeAccountAttributesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeAccountAttributesCommandError = async ( output , context ) : Promise < DescribeAccountAttributesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeAddressesCommand = async ( output , context ) : Promise < DescribeAddressesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeAddressesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeAddressesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeAddressesCommandError = async ( output , context ) : Promise < DescribeAddressesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeAddressesAttributeCommand = async ( output , context ) : Promise < DescribeAddressesAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeAddressesAttributeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeAddressesAttributeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeAddressesAttributeCommandError = async ( output , context ) : Promise < DescribeAddressesAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeAggregateIdFormatCommand = async ( output , context ) : Promise < DescribeAggregateIdFormatCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeAggregateIdFormatCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeAggregateIdFormatResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeAggregateIdFormatCommandError = async ( output , context ) : Promise < DescribeAggregateIdFormatCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeAvailabilityZonesCommand = async ( output , context ) : Promise < DescribeAvailabilityZonesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeAvailabilityZonesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeAvailabilityZonesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeAvailabilityZonesCommandError = async ( output , context ) : Promise < DescribeAvailabilityZonesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeBundleTasksCommand = async ( output , context ) : Promise < DescribeBundleTasksCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeBundleTasksCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeBundleTasksResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeBundleTasksCommandError = async ( output , context ) : Promise < DescribeBundleTasksCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeByoipCidrsCommand = async ( output , context ) : Promise < DescribeByoipCidrsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeByoipCidrsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeByoipCidrsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeByoipCidrsCommandError = async ( output , context ) : Promise < DescribeByoipCidrsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeCapacityReservationFleetsCommand = async ( output , context ) : Promise < DescribeCapacityReservationFleetsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeCapacityReservationFleetsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeCapacityReservationFleetsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeCapacityReservationFleetsCommandError = async ( output , context ) : Promise < DescribeCapacityReservationFleetsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeCapacityReservationsCommand = async ( output , context ) : Promise < DescribeCapacityReservationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeCapacityReservationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeCapacityReservationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeCapacityReservationsCommandError = async ( output , context ) : Promise < DescribeCapacityReservationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeCarrierGatewaysCommand = async ( output , context ) : Promise < DescribeCarrierGatewaysCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeCarrierGatewaysCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeCarrierGatewaysResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeCarrierGatewaysCommandError = async ( output , context ) : Promise < DescribeCarrierGatewaysCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeClassicLinkInstancesCommand = async ( output , context ) : Promise < DescribeClassicLinkInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeClassicLinkInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeClassicLinkInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeClassicLinkInstancesCommandError = async ( output , context ) : Promise < DescribeClassicLinkInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeClientVpnAuthorizationRulesCommand = async ( output , context ) : Promise < DescribeClientVpnAuthorizationRulesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeClientVpnAuthorizationRulesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeClientVpnAuthorizationRulesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeClientVpnAuthorizationRulesCommandError = async ( output , context ) : Promise < DescribeClientVpnAuthorizationRulesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeClientVpnConnectionsCommand = async ( output , context ) : Promise < DescribeClientVpnConnectionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeClientVpnConnectionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeClientVpnConnectionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeClientVpnConnectionsCommandError = async ( output , context ) : Promise < DescribeClientVpnConnectionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeClientVpnEndpointsCommand = async ( output , context ) : Promise < DescribeClientVpnEndpointsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeClientVpnEndpointsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeClientVpnEndpointsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeClientVpnEndpointsCommandError = async ( output , context ) : Promise < DescribeClientVpnEndpointsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeClientVpnRoutesCommand = async ( output , context ) : Promise < DescribeClientVpnRoutesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeClientVpnRoutesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeClientVpnRoutesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeClientVpnRoutesCommandError = async ( output , context ) : Promise < DescribeClientVpnRoutesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeClientVpnTargetNetworksCommand = async ( output , context ) : Promise < DescribeClientVpnTargetNetworksCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeClientVpnTargetNetworksCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeClientVpnTargetNetworksResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeClientVpnTargetNetworksCommandError = async ( output , context ) : Promise < DescribeClientVpnTargetNetworksCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeCoipPoolsCommand = async ( output , context ) : Promise < DescribeCoipPoolsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeCoipPoolsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeCoipPoolsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeCoipPoolsCommandError = async ( output , context ) : Promise < DescribeCoipPoolsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeConversionTasksCommand = async ( output , context ) : Promise < DescribeConversionTasksCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeConversionTasksCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeConversionTasksResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeConversionTasksCommandError = async ( output , context ) : Promise < DescribeConversionTasksCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeCustomerGatewaysCommand = async ( output , context ) : Promise < DescribeCustomerGatewaysCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeCustomerGatewaysCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeCustomerGatewaysResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeCustomerGatewaysCommandError = async ( output , context ) : Promise < DescribeCustomerGatewaysCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeDhcpOptionsCommand = async ( output , context ) : Promise < DescribeDhcpOptionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeDhcpOptionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeDhcpOptionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeDhcpOptionsCommandError = async ( output , context ) : Promise < DescribeDhcpOptionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeEgressOnlyInternetGatewaysCommand = async ( output , context ) : Promise < DescribeEgressOnlyInternetGatewaysCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeEgressOnlyInternetGatewaysCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeEgressOnlyInternetGatewaysResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeEgressOnlyInternetGatewaysCommandError = async ( output , context ) : Promise < DescribeEgressOnlyInternetGatewaysCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeElasticGpusCommand = async ( output , context ) : Promise < DescribeElasticGpusCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeElasticGpusCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeElasticGpusResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeElasticGpusCommandError = async ( output , context ) : Promise < DescribeElasticGpusCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeExportImageTasksCommand = async ( output , context ) : Promise < DescribeExportImageTasksCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeExportImageTasksCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeExportImageTasksResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeExportImageTasksCommandError = async ( output , context ) : Promise < DescribeExportImageTasksCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeExportTasksCommand = async ( output , context ) : Promise < DescribeExportTasksCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeExportTasksCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeExportTasksResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeExportTasksCommandError = async ( output , context ) : Promise < DescribeExportTasksCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeFastSnapshotRestoresCommand = async ( output , context ) : Promise < DescribeFastSnapshotRestoresCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeFastSnapshotRestoresCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeFastSnapshotRestoresResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeFastSnapshotRestoresCommandError = async ( output , context ) : Promise < DescribeFastSnapshotRestoresCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeFleetHistoryCommand = async ( output , context ) : Promise < DescribeFleetHistoryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeFleetHistoryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeFleetHistoryResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeFleetHistoryCommandError = async ( output , context ) : Promise < DescribeFleetHistoryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeFleetInstancesCommand = async ( output , context ) : Promise < DescribeFleetInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeFleetInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeFleetInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeFleetInstancesCommandError = async ( output , context ) : Promise < DescribeFleetInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeFleetsCommand = async ( output , context ) : Promise < DescribeFleetsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeFleetsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeFleetsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeFleetsCommandError = async ( output , context ) : Promise < DescribeFleetsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeFlowLogsCommand = async ( output , context ) : Promise < DescribeFlowLogsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeFlowLogsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeFlowLogsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeFlowLogsCommandError = async ( output , context ) : Promise < DescribeFlowLogsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeFpgaImageAttributeCommand = async ( output , context ) : Promise < DescribeFpgaImageAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeFpgaImageAttributeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeFpgaImageAttributeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeFpgaImageAttributeCommandError = async ( output , context ) : Promise < DescribeFpgaImageAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeFpgaImagesCommand = async ( output , context ) : Promise < DescribeFpgaImagesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeFpgaImagesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeFpgaImagesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeFpgaImagesCommandError = async ( output , context ) : Promise < DescribeFpgaImagesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeHostReservationOfferingsCommand = async ( output , context ) : Promise < DescribeHostReservationOfferingsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeHostReservationOfferingsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeHostReservationOfferingsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeHostReservationOfferingsCommandError = async ( output , context ) : Promise < DescribeHostReservationOfferingsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeHostReservationsCommand = async ( output , context ) : Promise < DescribeHostReservationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeHostReservationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeHostReservationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeHostReservationsCommandError = async ( output , context ) : Promise < DescribeHostReservationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeHostsCommand = async ( output , context ) : Promise < DescribeHostsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeHostsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeHostsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeHostsCommandError = async ( output , context ) : Promise < DescribeHostsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeIamInstanceProfileAssociationsCommand = async ( output , context ) : Promise < DescribeIamInstanceProfileAssociationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeIamInstanceProfileAssociationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeIamInstanceProfileAssociationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeIamInstanceProfileAssociationsCommandError = async ( output , context ) : Promise < DescribeIamInstanceProfileAssociationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeIdentityIdFormatCommand = async ( output , context ) : Promise < DescribeIdentityIdFormatCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeIdentityIdFormatCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeIdentityIdFormatResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeIdentityIdFormatCommandError = async ( output , context ) : Promise < DescribeIdentityIdFormatCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeIdFormatCommand = async ( output , context ) : Promise < DescribeIdFormatCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeIdFormatCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeIdFormatResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeIdFormatCommandError = async ( output , context ) : Promise < DescribeIdFormatCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeImageAttributeCommand = async ( output , context ) : Promise < DescribeImageAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeImageAttributeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ImageAttribute ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeImageAttributeCommandError = async ( output , context ) : Promise < DescribeImageAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeImagesCommand = async ( output , context ) : Promise < DescribeImagesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeImagesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeImagesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeImagesCommandError = async ( output , context ) : Promise < DescribeImagesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeImportImageTasksCommand = async ( output , context ) : Promise < DescribeImportImageTasksCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeImportImageTasksCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeImportImageTasksResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeImportImageTasksCommandError = async ( output , context ) : Promise < DescribeImportImageTasksCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeImportSnapshotTasksCommand = async ( output , context ) : Promise < DescribeImportSnapshotTasksCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeImportSnapshotTasksCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeImportSnapshotTasksResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeImportSnapshotTasksCommandError = async ( output , context ) : Promise < DescribeImportSnapshotTasksCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeInstanceAttributeCommand = async ( output , context ) : Promise < DescribeInstanceAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeInstanceAttributeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2InstanceAttribute ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeInstanceAttributeCommandError = async ( output , context ) : Promise < DescribeInstanceAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeInstanceCreditSpecificationsCommand = async ( output , context ) : Promise < DescribeInstanceCreditSpecificationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeInstanceCreditSpecificationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeInstanceCreditSpecificationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeInstanceCreditSpecificationsCommandError = async ( output , context ) : Promise < DescribeInstanceCreditSpecificationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeInstanceEventNotificationAttributesCommand = async ( output , context ) : Promise < DescribeInstanceEventNotificationAttributesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeInstanceEventNotificationAttributesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeInstanceEventNotificationAttributesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeInstanceEventNotificationAttributesCommandError = async ( output , context ) : Promise < DescribeInstanceEventNotificationAttributesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeInstanceEventWindowsCommand = async ( output , context ) : Promise < DescribeInstanceEventWindowsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeInstanceEventWindowsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeInstanceEventWindowsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeInstanceEventWindowsCommandError = async ( output , context ) : Promise < DescribeInstanceEventWindowsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeInstancesCommand = async ( output , context ) : Promise < DescribeInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeInstancesCommandError = async ( output , context ) : Promise < DescribeInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeInstanceStatusCommand = async ( output , context ) : Promise < DescribeInstanceStatusCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeInstanceStatusCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeInstanceStatusResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeInstanceStatusCommandError = async ( output , context ) : Promise < DescribeInstanceStatusCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeInstanceTypeOfferingsCommand = async ( output , context ) : Promise < DescribeInstanceTypeOfferingsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeInstanceTypeOfferingsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeInstanceTypeOfferingsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeInstanceTypeOfferingsCommandError = async ( output , context ) : Promise < DescribeInstanceTypeOfferingsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeInstanceTypesCommand = async ( output , context ) : Promise < DescribeInstanceTypesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeInstanceTypesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeInstanceTypesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeInstanceTypesCommandError = async ( output , context ) : Promise < DescribeInstanceTypesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeInternetGatewaysCommand = async ( output , context ) : Promise < DescribeInternetGatewaysCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeInternetGatewaysCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeInternetGatewaysResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeInternetGatewaysCommandError = async ( output , context ) : Promise < DescribeInternetGatewaysCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeIpamPoolsCommand = async ( output , context ) : Promise < DescribeIpamPoolsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeIpamPoolsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeIpamPoolsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeIpamPoolsCommandError = async ( output , context ) : Promise < DescribeIpamPoolsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeIpamsCommand = async ( output , context ) : Promise < DescribeIpamsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeIpamsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeIpamsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeIpamsCommandError = async ( output , context ) : Promise < DescribeIpamsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeIpamScopesCommand = async ( output , context ) : Promise < DescribeIpamScopesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeIpamScopesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeIpamScopesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeIpamScopesCommandError = async ( output , context ) : Promise < DescribeIpamScopesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeIpv6PoolsCommand = async ( output , context ) : Promise < DescribeIpv6PoolsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeIpv6PoolsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeIpv6PoolsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeIpv6PoolsCommandError = async ( output , context ) : Promise < DescribeIpv6PoolsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeKeyPairsCommand = async ( output , context ) : Promise < DescribeKeyPairsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeKeyPairsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeKeyPairsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeKeyPairsCommandError = async ( output , context ) : Promise < DescribeKeyPairsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeLaunchTemplatesCommand = async ( output , context ) : Promise < DescribeLaunchTemplatesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeLaunchTemplatesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeLaunchTemplatesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeLaunchTemplatesCommandError = async ( output , context ) : Promise < DescribeLaunchTemplatesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeLaunchTemplateVersionsCommand = async ( output , context ) : Promise < DescribeLaunchTemplateVersionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeLaunchTemplateVersionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeLaunchTemplateVersionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeLaunchTemplateVersionsCommandError = async ( output , context ) : Promise < DescribeLaunchTemplateVersionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeLocalGatewayRouteTablesCommand = async ( output , context ) : Promise < DescribeLocalGatewayRouteTablesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeLocalGatewayRouteTablesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeLocalGatewayRouteTablesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeLocalGatewayRouteTablesCommandError = async ( output , context ) : Promise < DescribeLocalGatewayRouteTablesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsCommand = async ( output , context ) : Promise < DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsCommandError = async ( output , context ) : Promise < DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeLocalGatewayRouteTableVpcAssociationsCommand = async ( output , context ) : Promise < DescribeLocalGatewayRouteTableVpcAssociationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeLocalGatewayRouteTableVpcAssociationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeLocalGatewayRouteTableVpcAssociationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeLocalGatewayRouteTableVpcAssociationsCommandError = async ( output , context ) : Promise < DescribeLocalGatewayRouteTableVpcAssociationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeLocalGatewaysCommand = async ( output , context ) : Promise < DescribeLocalGatewaysCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeLocalGatewaysCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeLocalGatewaysResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeLocalGatewaysCommandError = async ( output , context ) : Promise < DescribeLocalGatewaysCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeLocalGatewayVirtualInterfaceGroupsCommand = async ( output , context ) : Promise < DescribeLocalGatewayVirtualInterfaceGroupsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeLocalGatewayVirtualInterfaceGroupsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeLocalGatewayVirtualInterfaceGroupsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeLocalGatewayVirtualInterfaceGroupsCommandError = async ( output , context ) : Promise < DescribeLocalGatewayVirtualInterfaceGroupsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeLocalGatewayVirtualInterfacesCommand = async ( output , context ) : Promise < DescribeLocalGatewayVirtualInterfacesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeLocalGatewayVirtualInterfacesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeLocalGatewayVirtualInterfacesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeLocalGatewayVirtualInterfacesCommandError = async ( output , context ) : Promise < DescribeLocalGatewayVirtualInterfacesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeManagedPrefixListsCommand = async ( output , context ) : Promise < DescribeManagedPrefixListsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeManagedPrefixListsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeManagedPrefixListsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeManagedPrefixListsCommandError = async ( output , context ) : Promise < DescribeManagedPrefixListsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeMovingAddressesCommand = async ( output , context ) : Promise < DescribeMovingAddressesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeMovingAddressesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeMovingAddressesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeMovingAddressesCommandError = async ( output , context ) : Promise < DescribeMovingAddressesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeNatGatewaysCommand = async ( output , context ) : Promise < DescribeNatGatewaysCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeNatGatewaysCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeNatGatewaysResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeNatGatewaysCommandError = async ( output , context ) : Promise < DescribeNatGatewaysCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeNetworkAclsCommand = async ( output , context ) : Promise < DescribeNetworkAclsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeNetworkAclsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeNetworkAclsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeNetworkAclsCommandError = async ( output , context ) : Promise < DescribeNetworkAclsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeNetworkInsightsAccessScopeAnalysesCommand = async ( output , context ) : Promise < DescribeNetworkInsightsAccessScopeAnalysesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeNetworkInsightsAccessScopeAnalysesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeNetworkInsightsAccessScopeAnalysesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeNetworkInsightsAccessScopeAnalysesCommandError = async ( output , context ) : Promise < DescribeNetworkInsightsAccessScopeAnalysesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeNetworkInsightsAccessScopesCommand = async ( output , context ) : Promise < DescribeNetworkInsightsAccessScopesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeNetworkInsightsAccessScopesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeNetworkInsightsAccessScopesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeNetworkInsightsAccessScopesCommandError = async ( output , context ) : Promise < DescribeNetworkInsightsAccessScopesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeNetworkInsightsAnalysesCommand = async ( output , context ) : Promise < DescribeNetworkInsightsAnalysesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeNetworkInsightsAnalysesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeNetworkInsightsAnalysesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeNetworkInsightsAnalysesCommandError = async ( output , context ) : Promise < DescribeNetworkInsightsAnalysesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeNetworkInsightsPathsCommand = async ( output , context ) : Promise < DescribeNetworkInsightsPathsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeNetworkInsightsPathsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeNetworkInsightsPathsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeNetworkInsightsPathsCommandError = async ( output , context ) : Promise < DescribeNetworkInsightsPathsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeNetworkInterfaceAttributeCommand = async ( output , context ) : Promise < DescribeNetworkInterfaceAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeNetworkInterfaceAttributeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeNetworkInterfaceAttributeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeNetworkInterfaceAttributeCommandError = async ( output , context ) : Promise < DescribeNetworkInterfaceAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeNetworkInterfacePermissionsCommand = async ( output , context ) : Promise < DescribeNetworkInterfacePermissionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeNetworkInterfacePermissionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeNetworkInterfacePermissionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeNetworkInterfacePermissionsCommandError = async ( output , context ) : Promise < DescribeNetworkInterfacePermissionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeNetworkInterfacesCommand = async ( output , context ) : Promise < DescribeNetworkInterfacesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeNetworkInterfacesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeNetworkInterfacesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeNetworkInterfacesCommandError = async ( output , context ) : Promise < DescribeNetworkInterfacesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribePlacementGroupsCommand = async ( output , context ) : Promise < DescribePlacementGroupsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribePlacementGroupsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribePlacementGroupsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribePlacementGroupsCommandError = async ( output , context ) : Promise < DescribePlacementGroupsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribePrefixListsCommand = async ( output , context ) : Promise < DescribePrefixListsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribePrefixListsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribePrefixListsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribePrefixListsCommandError = async ( output , context ) : Promise < DescribePrefixListsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribePrincipalIdFormatCommand = async ( output , context ) : Promise < DescribePrincipalIdFormatCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribePrincipalIdFormatCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribePrincipalIdFormatResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribePrincipalIdFormatCommandError = async ( output , context ) : Promise < DescribePrincipalIdFormatCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribePublicIpv4PoolsCommand = async ( output , context ) : Promise < DescribePublicIpv4PoolsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribePublicIpv4PoolsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribePublicIpv4PoolsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribePublicIpv4PoolsCommandError = async ( output , context ) : Promise < DescribePublicIpv4PoolsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeRegionsCommand = async ( output , context ) : Promise < DescribeRegionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeRegionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeRegionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeRegionsCommandError = async ( output , context ) : Promise < DescribeRegionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeReplaceRootVolumeTasksCommand = async ( output , context ) : Promise < DescribeReplaceRootVolumeTasksCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeReplaceRootVolumeTasksCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeReplaceRootVolumeTasksResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeReplaceRootVolumeTasksCommandError = async ( output , context ) : Promise < DescribeReplaceRootVolumeTasksCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeReservedInstancesCommand = async ( output , context ) : Promise < DescribeReservedInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeReservedInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeReservedInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeReservedInstancesCommandError = async ( output , context ) : Promise < DescribeReservedInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeReservedInstancesListingsCommand = async ( output , context ) : Promise < DescribeReservedInstancesListingsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeReservedInstancesListingsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeReservedInstancesListingsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeReservedInstancesListingsCommandError = async ( output , context ) : Promise < DescribeReservedInstancesListingsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeReservedInstancesModificationsCommand = async ( output , context ) : Promise < DescribeReservedInstancesModificationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeReservedInstancesModificationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeReservedInstancesModificationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeReservedInstancesModificationsCommandError = async ( output , context ) : Promise < DescribeReservedInstancesModificationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeReservedInstancesOfferingsCommand = async ( output , context ) : Promise < DescribeReservedInstancesOfferingsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeReservedInstancesOfferingsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeReservedInstancesOfferingsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeReservedInstancesOfferingsCommandError = async ( output , context ) : Promise < DescribeReservedInstancesOfferingsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeRouteTablesCommand = async ( output , context ) : Promise < DescribeRouteTablesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeRouteTablesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeRouteTablesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeRouteTablesCommandError = async ( output , context ) : Promise < DescribeRouteTablesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeScheduledInstanceAvailabilityCommand = async ( output , context ) : Promise < DescribeScheduledInstanceAvailabilityCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeScheduledInstanceAvailabilityCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeScheduledInstanceAvailabilityResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeScheduledInstanceAvailabilityCommandError = async ( output , context ) : Promise < DescribeScheduledInstanceAvailabilityCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeScheduledInstancesCommand = async ( output , context ) : Promise < DescribeScheduledInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeScheduledInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeScheduledInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeScheduledInstancesCommandError = async ( output , context ) : Promise < DescribeScheduledInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeSecurityGroupReferencesCommand = async ( output , context ) : Promise < DescribeSecurityGroupReferencesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeSecurityGroupReferencesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeSecurityGroupReferencesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeSecurityGroupReferencesCommandError = async ( output , context ) : Promise < DescribeSecurityGroupReferencesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeSecurityGroupRulesCommand = async ( output , context ) : Promise < DescribeSecurityGroupRulesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeSecurityGroupRulesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeSecurityGroupRulesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeSecurityGroupRulesCommandError = async ( output , context ) : Promise < DescribeSecurityGroupRulesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeSecurityGroupsCommand = async ( output , context ) : Promise < DescribeSecurityGroupsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeSecurityGroupsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeSecurityGroupsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeSecurityGroupsCommandError = async ( output , context ) : Promise < DescribeSecurityGroupsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeSnapshotAttributeCommand = async ( output , context ) : Promise < DescribeSnapshotAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeSnapshotAttributeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeSnapshotAttributeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeSnapshotAttributeCommandError = async ( output , context ) : Promise < DescribeSnapshotAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeSnapshotsCommand = async ( output , context ) : Promise < DescribeSnapshotsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeSnapshotsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeSnapshotsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeSnapshotsCommandError = async ( output , context ) : Promise < DescribeSnapshotsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeSnapshotTierStatusCommand = async ( output , context ) : Promise < DescribeSnapshotTierStatusCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeSnapshotTierStatusCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeSnapshotTierStatusResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeSnapshotTierStatusCommandError = async ( output , context ) : Promise < DescribeSnapshotTierStatusCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeSpotDatafeedSubscriptionCommand = async ( output , context ) : Promise < DescribeSpotDatafeedSubscriptionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeSpotDatafeedSubscriptionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeSpotDatafeedSubscriptionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeSpotDatafeedSubscriptionCommandError = async ( output , context ) : Promise < DescribeSpotDatafeedSubscriptionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeSpotFleetInstancesCommand = async ( output , context ) : Promise < DescribeSpotFleetInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeSpotFleetInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeSpotFleetInstancesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeSpotFleetInstancesCommandError = async ( output , context ) : Promise < DescribeSpotFleetInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeSpotFleetRequestHistoryCommand = async ( output , context ) : Promise < DescribeSpotFleetRequestHistoryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeSpotFleetRequestHistoryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeSpotFleetRequestHistoryResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeSpotFleetRequestHistoryCommandError = async ( output , context ) : Promise < DescribeSpotFleetRequestHistoryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeSpotFleetRequestsCommand = async ( output , context ) : Promise < DescribeSpotFleetRequestsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeSpotFleetRequestsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeSpotFleetRequestsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeSpotFleetRequestsCommandError = async ( output , context ) : Promise < DescribeSpotFleetRequestsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeSpotInstanceRequestsCommand = async ( output , context ) : Promise < DescribeSpotInstanceRequestsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeSpotInstanceRequestsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeSpotInstanceRequestsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeSpotInstanceRequestsCommandError = async ( output , context ) : Promise < DescribeSpotInstanceRequestsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeSpotPriceHistoryCommand = async ( output , context ) : Promise < DescribeSpotPriceHistoryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeSpotPriceHistoryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeSpotPriceHistoryResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeSpotPriceHistoryCommandError = async ( output , context ) : Promise < DescribeSpotPriceHistoryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeStaleSecurityGroupsCommand = async ( output , context ) : Promise < DescribeStaleSecurityGroupsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeStaleSecurityGroupsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeStaleSecurityGroupsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeStaleSecurityGroupsCommandError = async ( output , context ) : Promise < DescribeStaleSecurityGroupsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeStoreImageTasksCommand = async ( output , context ) : Promise < DescribeStoreImageTasksCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeStoreImageTasksCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeStoreImageTasksResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeStoreImageTasksCommandError = async ( output , context ) : Promise < DescribeStoreImageTasksCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeSubnetsCommand = async ( output , context ) : Promise < DescribeSubnetsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeSubnetsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeSubnetsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeSubnetsCommandError = async ( output , context ) : Promise < DescribeSubnetsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeTagsCommand = async ( output , context ) : Promise < DescribeTagsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeTagsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeTagsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeTagsCommandError = async ( output , context ) : Promise < DescribeTagsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeTrafficMirrorFiltersCommand = async ( output , context ) : Promise < DescribeTrafficMirrorFiltersCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeTrafficMirrorFiltersCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeTrafficMirrorFiltersResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeTrafficMirrorFiltersCommandError = async ( output , context ) : Promise < DescribeTrafficMirrorFiltersCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeTrafficMirrorSessionsCommand = async ( output , context ) : Promise < DescribeTrafficMirrorSessionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeTrafficMirrorSessionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeTrafficMirrorSessionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeTrafficMirrorSessionsCommandError = async ( output , context ) : Promise < DescribeTrafficMirrorSessionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeTrafficMirrorTargetsCommand = async ( output , context ) : Promise < DescribeTrafficMirrorTargetsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeTrafficMirrorTargetsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeTrafficMirrorTargetsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeTrafficMirrorTargetsCommandError = async ( output , context ) : Promise < DescribeTrafficMirrorTargetsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeTransitGatewayAttachmentsCommand = async ( output , context ) : Promise < DescribeTransitGatewayAttachmentsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeTransitGatewayAttachmentsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeTransitGatewayAttachmentsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeTransitGatewayAttachmentsCommandError = async ( output , context ) : Promise < DescribeTransitGatewayAttachmentsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeTransitGatewayConnectPeersCommand = async ( output , context ) : Promise < DescribeTransitGatewayConnectPeersCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeTransitGatewayConnectPeersCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeTransitGatewayConnectPeersResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeTransitGatewayConnectPeersCommandError = async ( output , context ) : Promise < DescribeTransitGatewayConnectPeersCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeTransitGatewayConnectsCommand = async ( output , context ) : Promise < DescribeTransitGatewayConnectsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeTransitGatewayConnectsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeTransitGatewayConnectsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeTransitGatewayConnectsCommandError = async ( output , context ) : Promise < DescribeTransitGatewayConnectsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeTransitGatewayMulticastDomainsCommand = async ( output , context ) : Promise < DescribeTransitGatewayMulticastDomainsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeTransitGatewayMulticastDomainsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeTransitGatewayMulticastDomainsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeTransitGatewayMulticastDomainsCommandError = async ( output , context ) : Promise < DescribeTransitGatewayMulticastDomainsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeTransitGatewayPeeringAttachmentsCommand = async ( output , context ) : Promise < DescribeTransitGatewayPeeringAttachmentsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeTransitGatewayPeeringAttachmentsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeTransitGatewayPeeringAttachmentsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeTransitGatewayPeeringAttachmentsCommandError = async ( output , context ) : Promise < DescribeTransitGatewayPeeringAttachmentsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeTransitGatewayRouteTablesCommand = async ( output , context ) : Promise < DescribeTransitGatewayRouteTablesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeTransitGatewayRouteTablesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeTransitGatewayRouteTablesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeTransitGatewayRouteTablesCommandError = async ( output , context ) : Promise < DescribeTransitGatewayRouteTablesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeTransitGatewaysCommand = async ( output , context ) : Promise < DescribeTransitGatewaysCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeTransitGatewaysCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeTransitGatewaysResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeTransitGatewaysCommandError = async ( output , context ) : Promise < DescribeTransitGatewaysCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeTransitGatewayVpcAttachmentsCommand = async ( output , context ) : Promise < DescribeTransitGatewayVpcAttachmentsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeTransitGatewayVpcAttachmentsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeTransitGatewayVpcAttachmentsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeTransitGatewayVpcAttachmentsCommandError = async ( output , context ) : Promise < DescribeTransitGatewayVpcAttachmentsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeTrunkInterfaceAssociationsCommand = async ( output , context ) : Promise < DescribeTrunkInterfaceAssociationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeTrunkInterfaceAssociationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeTrunkInterfaceAssociationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeTrunkInterfaceAssociationsCommandError = async ( output , context ) : Promise < DescribeTrunkInterfaceAssociationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVolumeAttributeCommand = async ( output , context ) : Promise < DescribeVolumeAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVolumeAttributeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVolumeAttributeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVolumeAttributeCommandError = async ( output , context ) : Promise < DescribeVolumeAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVolumesCommand = async ( output , context ) : Promise < DescribeVolumesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVolumesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVolumesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVolumesCommandError = async ( output , context ) : Promise < DescribeVolumesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVolumesModificationsCommand = async ( output , context ) : Promise < DescribeVolumesModificationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVolumesModificationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVolumesModificationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVolumesModificationsCommandError = async ( output , context ) : Promise < DescribeVolumesModificationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVolumeStatusCommand = async ( output , context ) : Promise < DescribeVolumeStatusCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVolumeStatusCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVolumeStatusResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVolumeStatusCommandError = async ( output , context ) : Promise < DescribeVolumeStatusCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVpcAttributeCommand = async ( output , context ) : Promise < DescribeVpcAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVpcAttributeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVpcAttributeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVpcAttributeCommandError = async ( output , context ) : Promise < DescribeVpcAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVpcClassicLinkCommand = async ( output , context ) : Promise < DescribeVpcClassicLinkCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVpcClassicLinkCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVpcClassicLinkResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVpcClassicLinkCommandError = async ( output , context ) : Promise < DescribeVpcClassicLinkCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVpcClassicLinkDnsSupportCommand = async ( output , context ) : Promise < DescribeVpcClassicLinkDnsSupportCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVpcClassicLinkDnsSupportCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVpcClassicLinkDnsSupportResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVpcClassicLinkDnsSupportCommandError = async ( output , context ) : Promise < DescribeVpcClassicLinkDnsSupportCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVpcEndpointConnectionNotificationsCommand = async ( output , context ) : Promise < DescribeVpcEndpointConnectionNotificationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVpcEndpointConnectionNotificationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVpcEndpointConnectionNotificationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVpcEndpointConnectionNotificationsCommandError = async ( output , context ) : Promise < DescribeVpcEndpointConnectionNotificationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVpcEndpointConnectionsCommand = async ( output , context ) : Promise < DescribeVpcEndpointConnectionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVpcEndpointConnectionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVpcEndpointConnectionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVpcEndpointConnectionsCommandError = async ( output , context ) : Promise < DescribeVpcEndpointConnectionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVpcEndpointsCommand = async ( output , context ) : Promise < DescribeVpcEndpointsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVpcEndpointsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVpcEndpointsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVpcEndpointsCommandError = async ( output , context ) : Promise < DescribeVpcEndpointsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVpcEndpointServiceConfigurationsCommand = async ( output , context ) : Promise < DescribeVpcEndpointServiceConfigurationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVpcEndpointServiceConfigurationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVpcEndpointServiceConfigurationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVpcEndpointServiceConfigurationsCommandError = async ( output , context ) : Promise < DescribeVpcEndpointServiceConfigurationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVpcEndpointServicePermissionsCommand = async ( output , context ) : Promise < DescribeVpcEndpointServicePermissionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVpcEndpointServicePermissionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVpcEndpointServicePermissionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVpcEndpointServicePermissionsCommandError = async ( output , context ) : Promise < DescribeVpcEndpointServicePermissionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVpcEndpointServicesCommand = async ( output , context ) : Promise < DescribeVpcEndpointServicesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVpcEndpointServicesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVpcEndpointServicesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVpcEndpointServicesCommandError = async ( output , context ) : Promise < DescribeVpcEndpointServicesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVpcPeeringConnectionsCommand = async ( output , context ) : Promise < DescribeVpcPeeringConnectionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVpcPeeringConnectionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVpcPeeringConnectionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVpcPeeringConnectionsCommandError = async ( output , context ) : Promise < DescribeVpcPeeringConnectionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVpcsCommand = async ( output , context ) : Promise < DescribeVpcsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVpcsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVpcsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVpcsCommandError = async ( output , context ) : Promise < DescribeVpcsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVpnConnectionsCommand = async ( output , context ) : Promise < DescribeVpnConnectionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVpnConnectionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVpnConnectionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVpnConnectionsCommandError = async ( output , context ) : Promise < DescribeVpnConnectionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DescribeVpnGatewaysCommand = async ( output , context ) : Promise < DescribeVpnGatewaysCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DescribeVpnGatewaysCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DescribeVpnGatewaysResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DescribeVpnGatewaysCommandError = async ( output , context ) : Promise < DescribeVpnGatewaysCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DetachClassicLinkVpcCommand = async ( output , context ) : Promise < DetachClassicLinkVpcCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DetachClassicLinkVpcCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DetachClassicLinkVpcResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DetachClassicLinkVpcCommandError = async ( output , context ) : Promise < DetachClassicLinkVpcCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DetachInternetGatewayCommand = async ( output , context ) : Promise < DetachInternetGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DetachInternetGatewayCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DetachInternetGatewayCommandError = async ( output , context ) : Promise < DetachInternetGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DetachNetworkInterfaceCommand = async ( output , context ) : Promise < DetachNetworkInterfaceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DetachNetworkInterfaceCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DetachNetworkInterfaceCommandError = async ( output , context ) : Promise < DetachNetworkInterfaceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DetachVolumeCommand = async ( output , context ) : Promise < DetachVolumeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DetachVolumeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2VolumeAttachment ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DetachVolumeCommandError = async ( output , context ) : Promise < DetachVolumeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DetachVpnGatewayCommand = async ( output , context ) : Promise < DetachVpnGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DetachVpnGatewayCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DetachVpnGatewayCommandError = async ( output , context ) : Promise < DetachVpnGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisableEbsEncryptionByDefaultCommand = async ( output , context ) : Promise < DisableEbsEncryptionByDefaultCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisableEbsEncryptionByDefaultCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisableEbsEncryptionByDefaultResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisableEbsEncryptionByDefaultCommandError = async ( output , context ) : Promise < DisableEbsEncryptionByDefaultCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisableFastSnapshotRestoresCommand = async ( output , context ) : Promise < DisableFastSnapshotRestoresCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisableFastSnapshotRestoresCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisableFastSnapshotRestoresResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisableFastSnapshotRestoresCommandError = async ( output , context ) : Promise < DisableFastSnapshotRestoresCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisableImageDeprecationCommand = async ( output , context ) : Promise < DisableImageDeprecationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisableImageDeprecationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisableImageDeprecationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisableImageDeprecationCommandError = async ( output , context ) : Promise < DisableImageDeprecationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisableIpamOrganizationAdminAccountCommand = async ( output , context ) : Promise < DisableIpamOrganizationAdminAccountCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisableIpamOrganizationAdminAccountCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisableIpamOrganizationAdminAccountResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisableIpamOrganizationAdminAccountCommandError = async ( output , context ) : Promise < DisableIpamOrganizationAdminAccountCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisableSerialConsoleAccessCommand = async ( output , context ) : Promise < DisableSerialConsoleAccessCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisableSerialConsoleAccessCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisableSerialConsoleAccessResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisableSerialConsoleAccessCommandError = async ( output , context ) : Promise < DisableSerialConsoleAccessCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisableTransitGatewayRouteTablePropagationCommand = async ( output , context ) : Promise < DisableTransitGatewayRouteTablePropagationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisableTransitGatewayRouteTablePropagationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisableTransitGatewayRouteTablePropagationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisableTransitGatewayRouteTablePropagationCommandError = async ( output , context ) : Promise < DisableTransitGatewayRouteTablePropagationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisableVgwRoutePropagationCommand = async ( output , context ) : Promise < DisableVgwRoutePropagationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisableVgwRoutePropagationCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisableVgwRoutePropagationCommandError = async ( output , context ) : Promise < DisableVgwRoutePropagationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisableVpcClassicLinkCommand = async ( output , context ) : Promise < DisableVpcClassicLinkCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisableVpcClassicLinkCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisableVpcClassicLinkResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisableVpcClassicLinkCommandError = async ( output , context ) : Promise < DisableVpcClassicLinkCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisableVpcClassicLinkDnsSupportCommand = async ( output , context ) : Promise < DisableVpcClassicLinkDnsSupportCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisableVpcClassicLinkDnsSupportCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisableVpcClassicLinkDnsSupportResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisableVpcClassicLinkDnsSupportCommandError = async ( output , context ) : Promise < DisableVpcClassicLinkDnsSupportCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisassociateAddressCommand = async ( output , context ) : Promise < DisassociateAddressCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisassociateAddressCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisassociateAddressCommandError = async ( output , context ) : Promise < DisassociateAddressCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisassociateClientVpnTargetNetworkCommand = async ( output , context ) : Promise < DisassociateClientVpnTargetNetworkCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisassociateClientVpnTargetNetworkCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisassociateClientVpnTargetNetworkResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisassociateClientVpnTargetNetworkCommandError = async ( output , context ) : Promise < DisassociateClientVpnTargetNetworkCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisassociateEnclaveCertificateIamRoleCommand = async ( output , context ) : Promise < DisassociateEnclaveCertificateIamRoleCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisassociateEnclaveCertificateIamRoleCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisassociateEnclaveCertificateIamRoleResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisassociateEnclaveCertificateIamRoleCommandError = async ( output , context ) : Promise < DisassociateEnclaveCertificateIamRoleCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisassociateIamInstanceProfileCommand = async ( output , context ) : Promise < DisassociateIamInstanceProfileCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisassociateIamInstanceProfileCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisassociateIamInstanceProfileResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisassociateIamInstanceProfileCommandError = async ( output , context ) : Promise < DisassociateIamInstanceProfileCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisassociateInstanceEventWindowCommand = async ( output , context ) : Promise < DisassociateInstanceEventWindowCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisassociateInstanceEventWindowCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisassociateInstanceEventWindowResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisassociateInstanceEventWindowCommandError = async ( output , context ) : Promise < DisassociateInstanceEventWindowCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisassociateRouteTableCommand = async ( output , context ) : Promise < DisassociateRouteTableCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisassociateRouteTableCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisassociateRouteTableCommandError = async ( output , context ) : Promise < DisassociateRouteTableCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisassociateSubnetCidrBlockCommand = async ( output , context ) : Promise < DisassociateSubnetCidrBlockCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisassociateSubnetCidrBlockCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisassociateSubnetCidrBlockResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisassociateSubnetCidrBlockCommandError = async ( output , context ) : Promise < DisassociateSubnetCidrBlockCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisassociateTransitGatewayMulticastDomainCommand = async ( output , context ) : Promise < DisassociateTransitGatewayMulticastDomainCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisassociateTransitGatewayMulticastDomainCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisassociateTransitGatewayMulticastDomainResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisassociateTransitGatewayMulticastDomainCommandError = async ( output , context ) : Promise < DisassociateTransitGatewayMulticastDomainCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisassociateTransitGatewayRouteTableCommand = async ( output , context ) : Promise < DisassociateTransitGatewayRouteTableCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisassociateTransitGatewayRouteTableCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisassociateTransitGatewayRouteTableResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisassociateTransitGatewayRouteTableCommandError = async ( output , context ) : Promise < DisassociateTransitGatewayRouteTableCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisassociateTrunkInterfaceCommand = async ( output , context ) : Promise < DisassociateTrunkInterfaceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisassociateTrunkInterfaceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisassociateTrunkInterfaceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisassociateTrunkInterfaceCommandError = async ( output , context ) : Promise < DisassociateTrunkInterfaceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2DisassociateVpcCidrBlockCommand = async ( output , context ) : Promise < DisassociateVpcCidrBlockCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2DisassociateVpcCidrBlockCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2DisassociateVpcCidrBlockResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2DisassociateVpcCidrBlockCommandError = async ( output , context ) : Promise < DisassociateVpcCidrBlockCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2EnableEbsEncryptionByDefaultCommand = async ( output , context ) : Promise < EnableEbsEncryptionByDefaultCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2EnableEbsEncryptionByDefaultCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2EnableEbsEncryptionByDefaultResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2EnableEbsEncryptionByDefaultCommandError = async ( output , context ) : Promise < EnableEbsEncryptionByDefaultCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2EnableFastSnapshotRestoresCommand = async ( output , context ) : Promise < EnableFastSnapshotRestoresCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2EnableFastSnapshotRestoresCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2EnableFastSnapshotRestoresResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2EnableFastSnapshotRestoresCommandError = async ( output , context ) : Promise < EnableFastSnapshotRestoresCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2EnableImageDeprecationCommand = async ( output , context ) : Promise < EnableImageDeprecationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2EnableImageDeprecationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2EnableImageDeprecationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2EnableImageDeprecationCommandError = async ( output , context ) : Promise < EnableImageDeprecationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2EnableIpamOrganizationAdminAccountCommand = async ( output , context ) : Promise < EnableIpamOrganizationAdminAccountCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2EnableIpamOrganizationAdminAccountCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2EnableIpamOrganizationAdminAccountResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2EnableIpamOrganizationAdminAccountCommandError = async ( output , context ) : Promise < EnableIpamOrganizationAdminAccountCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2EnableSerialConsoleAccessCommand = async ( output , context ) : Promise < EnableSerialConsoleAccessCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2EnableSerialConsoleAccessCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2EnableSerialConsoleAccessResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2EnableSerialConsoleAccessCommandError = async ( output , context ) : Promise < EnableSerialConsoleAccessCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2EnableTransitGatewayRouteTablePropagationCommand = async ( output , context ) : Promise < EnableTransitGatewayRouteTablePropagationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2EnableTransitGatewayRouteTablePropagationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2EnableTransitGatewayRouteTablePropagationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2EnableTransitGatewayRouteTablePropagationCommandError = async ( output , context ) : Promise < EnableTransitGatewayRouteTablePropagationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2EnableVgwRoutePropagationCommand = async ( output , context ) : Promise < EnableVgwRoutePropagationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2EnableVgwRoutePropagationCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2EnableVgwRoutePropagationCommandError = async ( output , context ) : Promise < EnableVgwRoutePropagationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2EnableVolumeIOCommand = async ( output , context ) : Promise < EnableVolumeIOCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2EnableVolumeIOCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2EnableVolumeIOCommandError = async ( output , context ) : Promise < EnableVolumeIOCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2EnableVpcClassicLinkCommand = async ( output , context ) : Promise < EnableVpcClassicLinkCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2EnableVpcClassicLinkCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2EnableVpcClassicLinkResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2EnableVpcClassicLinkCommandError = async ( output , context ) : Promise < EnableVpcClassicLinkCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2EnableVpcClassicLinkDnsSupportCommand = async ( output , context ) : Promise < EnableVpcClassicLinkDnsSupportCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2EnableVpcClassicLinkDnsSupportCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2EnableVpcClassicLinkDnsSupportResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2EnableVpcClassicLinkDnsSupportCommandError = async ( output , context ) : Promise < EnableVpcClassicLinkDnsSupportCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ExportClientVpnClientCertificateRevocationListCommand = async ( output , context ) : Promise < ExportClientVpnClientCertificateRevocationListCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ExportClientVpnClientCertificateRevocationListCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ExportClientVpnClientCertificateRevocationListResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ExportClientVpnClientCertificateRevocationListCommandError = async ( output , context ) : Promise < ExportClientVpnClientCertificateRevocationListCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ExportClientVpnClientConfigurationCommand = async ( output , context ) : Promise < ExportClientVpnClientConfigurationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ExportClientVpnClientConfigurationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ExportClientVpnClientConfigurationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ExportClientVpnClientConfigurationCommandError = async ( output , context ) : Promise < ExportClientVpnClientConfigurationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ExportImageCommand = async ( output , context ) : Promise < ExportImageCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ExportImageCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ExportImageResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ExportImageCommandError = async ( output , context ) : Promise < ExportImageCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ExportTransitGatewayRoutesCommand = async ( output , context ) : Promise < ExportTransitGatewayRoutesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ExportTransitGatewayRoutesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ExportTransitGatewayRoutesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ExportTransitGatewayRoutesCommandError = async ( output , context ) : Promise < ExportTransitGatewayRoutesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetAssociatedEnclaveCertificateIamRolesCommand = async ( output , context ) : Promise < GetAssociatedEnclaveCertificateIamRolesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetAssociatedEnclaveCertificateIamRolesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetAssociatedEnclaveCertificateIamRolesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetAssociatedEnclaveCertificateIamRolesCommandError = async ( output , context ) : Promise < GetAssociatedEnclaveCertificateIamRolesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetAssociatedIpv6PoolCidrsCommand = async ( output , context ) : Promise < GetAssociatedIpv6PoolCidrsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetAssociatedIpv6PoolCidrsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetAssociatedIpv6PoolCidrsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetAssociatedIpv6PoolCidrsCommandError = async ( output , context ) : Promise < GetAssociatedIpv6PoolCidrsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetCapacityReservationUsageCommand = async ( output , context ) : Promise < GetCapacityReservationUsageCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetCapacityReservationUsageCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetCapacityReservationUsageResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetCapacityReservationUsageCommandError = async ( output , context ) : Promise < GetCapacityReservationUsageCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetCoipPoolUsageCommand = async ( output , context ) : Promise < GetCoipPoolUsageCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetCoipPoolUsageCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetCoipPoolUsageResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetCoipPoolUsageCommandError = async ( output , context ) : Promise < GetCoipPoolUsageCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetConsoleOutputCommand = async ( output , context ) : Promise < GetConsoleOutputCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetConsoleOutputCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetConsoleOutputResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetConsoleOutputCommandError = async ( output , context ) : Promise < GetConsoleOutputCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetConsoleScreenshotCommand = async ( output , context ) : Promise < GetConsoleScreenshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetConsoleScreenshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetConsoleScreenshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetConsoleScreenshotCommandError = async ( output , context ) : Promise < GetConsoleScreenshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetDefaultCreditSpecificationCommand = async ( output , context ) : Promise < GetDefaultCreditSpecificationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetDefaultCreditSpecificationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetDefaultCreditSpecificationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetDefaultCreditSpecificationCommandError = async ( output , context ) : Promise < GetDefaultCreditSpecificationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetEbsDefaultKmsKeyIdCommand = async ( output , context ) : Promise < GetEbsDefaultKmsKeyIdCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetEbsDefaultKmsKeyIdCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetEbsDefaultKmsKeyIdResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetEbsDefaultKmsKeyIdCommandError = async ( output , context ) : Promise < GetEbsDefaultKmsKeyIdCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetEbsEncryptionByDefaultCommand = async ( output , context ) : Promise < GetEbsEncryptionByDefaultCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetEbsEncryptionByDefaultCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetEbsEncryptionByDefaultResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetEbsEncryptionByDefaultCommandError = async ( output , context ) : Promise < GetEbsEncryptionByDefaultCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetFlowLogsIntegrationTemplateCommand = async ( output , context ) : Promise < GetFlowLogsIntegrationTemplateCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetFlowLogsIntegrationTemplateCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetFlowLogsIntegrationTemplateResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetFlowLogsIntegrationTemplateCommandError = async ( output , context ) : Promise < GetFlowLogsIntegrationTemplateCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetGroupsForCapacityReservationCommand = async ( output , context ) : Promise < GetGroupsForCapacityReservationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetGroupsForCapacityReservationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetGroupsForCapacityReservationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetGroupsForCapacityReservationCommandError = async ( output , context ) : Promise < GetGroupsForCapacityReservationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetHostReservationPurchasePreviewCommand = async ( output , context ) : Promise < GetHostReservationPurchasePreviewCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetHostReservationPurchasePreviewCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetHostReservationPurchasePreviewResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetHostReservationPurchasePreviewCommandError = async ( output , context ) : Promise < GetHostReservationPurchasePreviewCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetInstanceTypesFromInstanceRequirementsCommand = async ( output , context ) : Promise < GetInstanceTypesFromInstanceRequirementsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetInstanceTypesFromInstanceRequirementsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetInstanceTypesFromInstanceRequirementsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetInstanceTypesFromInstanceRequirementsCommandError = async ( output , context ) : Promise < GetInstanceTypesFromInstanceRequirementsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetIpamAddressHistoryCommand = async ( output , context ) : Promise < GetIpamAddressHistoryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetIpamAddressHistoryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetIpamAddressHistoryResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetIpamAddressHistoryCommandError = async ( output , context ) : Promise < GetIpamAddressHistoryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetIpamPoolAllocationsCommand = async ( output , context ) : Promise < GetIpamPoolAllocationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetIpamPoolAllocationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetIpamPoolAllocationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetIpamPoolAllocationsCommandError = async ( output , context ) : Promise < GetIpamPoolAllocationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetIpamPoolCidrsCommand = async ( output , context ) : Promise < GetIpamPoolCidrsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetIpamPoolCidrsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetIpamPoolCidrsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetIpamPoolCidrsCommandError = async ( output , context ) : Promise < GetIpamPoolCidrsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetIpamResourceCidrsCommand = async ( output , context ) : Promise < GetIpamResourceCidrsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetIpamResourceCidrsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetIpamResourceCidrsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetIpamResourceCidrsCommandError = async ( output , context ) : Promise < GetIpamResourceCidrsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetLaunchTemplateDataCommand = async ( output , context ) : Promise < GetLaunchTemplateDataCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetLaunchTemplateDataCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetLaunchTemplateDataResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetLaunchTemplateDataCommandError = async ( output , context ) : Promise < GetLaunchTemplateDataCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetManagedPrefixListAssociationsCommand = async ( output , context ) : Promise < GetManagedPrefixListAssociationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetManagedPrefixListAssociationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetManagedPrefixListAssociationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetManagedPrefixListAssociationsCommandError = async ( output , context ) : Promise < GetManagedPrefixListAssociationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetManagedPrefixListEntriesCommand = async ( output , context ) : Promise < GetManagedPrefixListEntriesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetManagedPrefixListEntriesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetManagedPrefixListEntriesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetManagedPrefixListEntriesCommandError = async ( output , context ) : Promise < GetManagedPrefixListEntriesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetNetworkInsightsAccessScopeAnalysisFindingsCommand = async ( output , context ) : Promise < GetNetworkInsightsAccessScopeAnalysisFindingsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetNetworkInsightsAccessScopeAnalysisFindingsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetNetworkInsightsAccessScopeAnalysisFindingsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetNetworkInsightsAccessScopeAnalysisFindingsCommandError = async ( output , context ) : Promise < GetNetworkInsightsAccessScopeAnalysisFindingsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetNetworkInsightsAccessScopeContentCommand = async ( output , context ) : Promise < GetNetworkInsightsAccessScopeContentCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetNetworkInsightsAccessScopeContentCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetNetworkInsightsAccessScopeContentResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetNetworkInsightsAccessScopeContentCommandError = async ( output , context ) : Promise < GetNetworkInsightsAccessScopeContentCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetPasswordDataCommand = async ( output , context ) : Promise < GetPasswordDataCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetPasswordDataCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetPasswordDataResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetPasswordDataCommandError = async ( output , context ) : Promise < GetPasswordDataCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetReservedInstancesExchangeQuoteCommand = async ( output , context ) : Promise < GetReservedInstancesExchangeQuoteCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetReservedInstancesExchangeQuoteCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetReservedInstancesExchangeQuoteResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetReservedInstancesExchangeQuoteCommandError = async ( output , context ) : Promise < GetReservedInstancesExchangeQuoteCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetSerialConsoleAccessStatusCommand = async ( output , context ) : Promise < GetSerialConsoleAccessStatusCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetSerialConsoleAccessStatusCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetSerialConsoleAccessStatusResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetSerialConsoleAccessStatusCommandError = async ( output , context ) : Promise < GetSerialConsoleAccessStatusCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetSpotPlacementScoresCommand = async ( output , context ) : Promise < GetSpotPlacementScoresCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetSpotPlacementScoresCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetSpotPlacementScoresResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetSpotPlacementScoresCommandError = async ( output , context ) : Promise < GetSpotPlacementScoresCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetSubnetCidrReservationsCommand = async ( output , context ) : Promise < GetSubnetCidrReservationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetSubnetCidrReservationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetSubnetCidrReservationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetSubnetCidrReservationsCommandError = async ( output , context ) : Promise < GetSubnetCidrReservationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetTransitGatewayAttachmentPropagationsCommand = async ( output , context ) : Promise < GetTransitGatewayAttachmentPropagationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetTransitGatewayAttachmentPropagationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetTransitGatewayAttachmentPropagationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetTransitGatewayAttachmentPropagationsCommandError = async ( output , context ) : Promise < GetTransitGatewayAttachmentPropagationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetTransitGatewayMulticastDomainAssociationsCommand = async ( output , context ) : Promise < GetTransitGatewayMulticastDomainAssociationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetTransitGatewayMulticastDomainAssociationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetTransitGatewayMulticastDomainAssociationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetTransitGatewayMulticastDomainAssociationsCommandError = async ( output , context ) : Promise < GetTransitGatewayMulticastDomainAssociationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetTransitGatewayPrefixListReferencesCommand = async ( output , context ) : Promise < GetTransitGatewayPrefixListReferencesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetTransitGatewayPrefixListReferencesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetTransitGatewayPrefixListReferencesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetTransitGatewayPrefixListReferencesCommandError = async ( output , context ) : Promise < GetTransitGatewayPrefixListReferencesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetTransitGatewayRouteTableAssociationsCommand = async ( output , context ) : Promise < GetTransitGatewayRouteTableAssociationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetTransitGatewayRouteTableAssociationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetTransitGatewayRouteTableAssociationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetTransitGatewayRouteTableAssociationsCommandError = async ( output , context ) : Promise < GetTransitGatewayRouteTableAssociationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetTransitGatewayRouteTablePropagationsCommand = async ( output , context ) : Promise < GetTransitGatewayRouteTablePropagationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetTransitGatewayRouteTablePropagationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetTransitGatewayRouteTablePropagationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetTransitGatewayRouteTablePropagationsCommandError = async ( output , context ) : Promise < GetTransitGatewayRouteTablePropagationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetVpnConnectionDeviceSampleConfigurationCommand = async ( output , context ) : Promise < GetVpnConnectionDeviceSampleConfigurationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetVpnConnectionDeviceSampleConfigurationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetVpnConnectionDeviceSampleConfigurationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetVpnConnectionDeviceSampleConfigurationCommandError = async ( output , context ) : Promise < GetVpnConnectionDeviceSampleConfigurationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2GetVpnConnectionDeviceTypesCommand = async ( output , context ) : Promise < GetVpnConnectionDeviceTypesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2GetVpnConnectionDeviceTypesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2GetVpnConnectionDeviceTypesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2GetVpnConnectionDeviceTypesCommandError = async ( output , context ) : Promise < GetVpnConnectionDeviceTypesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ImportClientVpnClientCertificateRevocationListCommand = async ( output , context ) : Promise < ImportClientVpnClientCertificateRevocationListCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ImportClientVpnClientCertificateRevocationListCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ImportClientVpnClientCertificateRevocationListResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ImportClientVpnClientCertificateRevocationListCommandError = async ( output , context ) : Promise < ImportClientVpnClientCertificateRevocationListCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ImportImageCommand = async ( output , context ) : Promise < ImportImageCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ImportImageCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ImportImageResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ImportImageCommandError = async ( output , context ) : Promise < ImportImageCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ImportInstanceCommand = async ( output , context ) : Promise < ImportInstanceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ImportInstanceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ImportInstanceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ImportInstanceCommandError = async ( output , context ) : Promise < ImportInstanceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ImportKeyPairCommand = async ( output , context ) : Promise < ImportKeyPairCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ImportKeyPairCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ImportKeyPairResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ImportKeyPairCommandError = async ( output , context ) : Promise < ImportKeyPairCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ImportSnapshotCommand = async ( output , context ) : Promise < ImportSnapshotCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ImportSnapshotCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ImportSnapshotResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ImportSnapshotCommandError = async ( output , context ) : Promise < ImportSnapshotCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ImportVolumeCommand = async ( output , context ) : Promise < ImportVolumeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ImportVolumeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ImportVolumeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ImportVolumeCommandError = async ( output , context ) : Promise < ImportVolumeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ListSnapshotsInRecycleBinCommand = async ( output , context ) : Promise < ListSnapshotsInRecycleBinCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ListSnapshotsInRecycleBinCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ListSnapshotsInRecycleBinResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ListSnapshotsInRecycleBinCommandError = async ( output , context ) : Promise < ListSnapshotsInRecycleBinCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyAddressAttributeCommand = async ( output , context ) : Promise < ModifyAddressAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyAddressAttributeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyAddressAttributeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyAddressAttributeCommandError = async ( output , context ) : Promise < ModifyAddressAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyAvailabilityZoneGroupCommand = async ( output , context ) : Promise < ModifyAvailabilityZoneGroupCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyAvailabilityZoneGroupCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyAvailabilityZoneGroupResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyAvailabilityZoneGroupCommandError = async ( output , context ) : Promise < ModifyAvailabilityZoneGroupCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyCapacityReservationCommand = async ( output , context ) : Promise < ModifyCapacityReservationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyCapacityReservationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyCapacityReservationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyCapacityReservationCommandError = async ( output , context ) : Promise < ModifyCapacityReservationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyCapacityReservationFleetCommand = async ( output , context ) : Promise < ModifyCapacityReservationFleetCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyCapacityReservationFleetCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyCapacityReservationFleetResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyCapacityReservationFleetCommandError = async ( output , context ) : Promise < ModifyCapacityReservationFleetCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyClientVpnEndpointCommand = async ( output , context ) : Promise < ModifyClientVpnEndpointCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyClientVpnEndpointCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyClientVpnEndpointResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyClientVpnEndpointCommandError = async ( output , context ) : Promise < ModifyClientVpnEndpointCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyDefaultCreditSpecificationCommand = async ( output , context ) : Promise < ModifyDefaultCreditSpecificationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyDefaultCreditSpecificationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyDefaultCreditSpecificationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyDefaultCreditSpecificationCommandError = async ( output , context ) : Promise < ModifyDefaultCreditSpecificationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyEbsDefaultKmsKeyIdCommand = async ( output , context ) : Promise < ModifyEbsDefaultKmsKeyIdCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyEbsDefaultKmsKeyIdCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyEbsDefaultKmsKeyIdResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyEbsDefaultKmsKeyIdCommandError = async ( output , context ) : Promise < ModifyEbsDefaultKmsKeyIdCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyFleetCommand = async ( output , context ) : Promise < ModifyFleetCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyFleetCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyFleetResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyFleetCommandError = async ( output , context ) : Promise < ModifyFleetCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyFpgaImageAttributeCommand = async ( output , context ) : Promise < ModifyFpgaImageAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyFpgaImageAttributeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyFpgaImageAttributeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyFpgaImageAttributeCommandError = async ( output , context ) : Promise < ModifyFpgaImageAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyHostsCommand = async ( output , context ) : Promise < ModifyHostsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyHostsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyHostsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyHostsCommandError = async ( output , context ) : Promise < ModifyHostsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyIdentityIdFormatCommand = async ( output , context ) : Promise < ModifyIdentityIdFormatCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyIdentityIdFormatCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyIdentityIdFormatCommandError = async ( output , context ) : Promise < ModifyIdentityIdFormatCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyIdFormatCommand = async ( output , context ) : Promise < ModifyIdFormatCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyIdFormatCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyIdFormatCommandError = async ( output , context ) : Promise < ModifyIdFormatCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyImageAttributeCommand = async ( output , context ) : Promise < ModifyImageAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyImageAttributeCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyImageAttributeCommandError = async ( output , context ) : Promise < ModifyImageAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyInstanceAttributeCommand = async ( output , context ) : Promise < ModifyInstanceAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyInstanceAttributeCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyInstanceAttributeCommandError = async ( output , context ) : Promise < ModifyInstanceAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyInstanceCapacityReservationAttributesCommand = async ( output , context ) : Promise < ModifyInstanceCapacityReservationAttributesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyInstanceCapacityReservationAttributesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyInstanceCapacityReservationAttributesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyInstanceCapacityReservationAttributesCommandError = async ( output , context ) : Promise < ModifyInstanceCapacityReservationAttributesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyInstanceCreditSpecificationCommand = async ( output , context ) : Promise < ModifyInstanceCreditSpecificationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyInstanceCreditSpecificationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyInstanceCreditSpecificationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyInstanceCreditSpecificationCommandError = async ( output , context ) : Promise < ModifyInstanceCreditSpecificationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyInstanceEventStartTimeCommand = async ( output , context ) : Promise < ModifyInstanceEventStartTimeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyInstanceEventStartTimeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyInstanceEventStartTimeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyInstanceEventStartTimeCommandError = async ( output , context ) : Promise < ModifyInstanceEventStartTimeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyInstanceEventWindowCommand = async ( output , context ) : Promise < ModifyInstanceEventWindowCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyInstanceEventWindowCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyInstanceEventWindowResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyInstanceEventWindowCommandError = async ( output , context ) : Promise < ModifyInstanceEventWindowCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyInstanceMetadataOptionsCommand = async ( output , context ) : Promise < ModifyInstanceMetadataOptionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyInstanceMetadataOptionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyInstanceMetadataOptionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyInstanceMetadataOptionsCommandError = async ( output , context ) : Promise < ModifyInstanceMetadataOptionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyInstancePlacementCommand = async ( output , context ) : Promise < ModifyInstancePlacementCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyInstancePlacementCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyInstancePlacementResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyInstancePlacementCommandError = async ( output , context ) : Promise < ModifyInstancePlacementCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyIpamCommand = async ( output , context ) : Promise < ModifyIpamCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyIpamCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyIpamResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyIpamCommandError = async ( output , context ) : Promise < ModifyIpamCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyIpamPoolCommand = async ( output , context ) : Promise < ModifyIpamPoolCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyIpamPoolCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyIpamPoolResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyIpamPoolCommandError = async ( output , context ) : Promise < ModifyIpamPoolCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyIpamResourceCidrCommand = async ( output , context ) : Promise < ModifyIpamResourceCidrCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyIpamResourceCidrCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyIpamResourceCidrResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyIpamResourceCidrCommandError = async ( output , context ) : Promise < ModifyIpamResourceCidrCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyIpamScopeCommand = async ( output , context ) : Promise < ModifyIpamScopeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyIpamScopeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyIpamScopeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyIpamScopeCommandError = async ( output , context ) : Promise < ModifyIpamScopeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyLaunchTemplateCommand = async ( output , context ) : Promise < ModifyLaunchTemplateCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyLaunchTemplateCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyLaunchTemplateResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyLaunchTemplateCommandError = async ( output , context ) : Promise < ModifyLaunchTemplateCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyManagedPrefixListCommand = async ( output , context ) : Promise < ModifyManagedPrefixListCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyManagedPrefixListCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyManagedPrefixListResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyManagedPrefixListCommandError = async ( output , context ) : Promise < ModifyManagedPrefixListCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyNetworkInterfaceAttributeCommand = async ( output , context ) : Promise < ModifyNetworkInterfaceAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyNetworkInterfaceAttributeCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyNetworkInterfaceAttributeCommandError = async ( output , context ) : Promise < ModifyNetworkInterfaceAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyPrivateDnsNameOptionsCommand = async ( output , context ) : Promise < ModifyPrivateDnsNameOptionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyPrivateDnsNameOptionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyPrivateDnsNameOptionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyPrivateDnsNameOptionsCommandError = async ( output , context ) : Promise < ModifyPrivateDnsNameOptionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyReservedInstancesCommand = async ( output , context ) : Promise < ModifyReservedInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyReservedInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyReservedInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyReservedInstancesCommandError = async ( output , context ) : Promise < ModifyReservedInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifySecurityGroupRulesCommand = async ( output , context ) : Promise < ModifySecurityGroupRulesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifySecurityGroupRulesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifySecurityGroupRulesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifySecurityGroupRulesCommandError = async ( output , context ) : Promise < ModifySecurityGroupRulesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifySnapshotAttributeCommand = async ( output , context ) : Promise < ModifySnapshotAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifySnapshotAttributeCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifySnapshotAttributeCommandError = async ( output , context ) : Promise < ModifySnapshotAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifySnapshotTierCommand = async ( output , context ) : Promise < ModifySnapshotTierCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifySnapshotTierCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifySnapshotTierResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifySnapshotTierCommandError = async ( output , context ) : Promise < ModifySnapshotTierCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifySpotFleetRequestCommand = async ( output , context ) : Promise < ModifySpotFleetRequestCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifySpotFleetRequestCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifySpotFleetRequestResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifySpotFleetRequestCommandError = async ( output , context ) : Promise < ModifySpotFleetRequestCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifySubnetAttributeCommand = async ( output , context ) : Promise < ModifySubnetAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifySubnetAttributeCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifySubnetAttributeCommandError = async ( output , context ) : Promise < ModifySubnetAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyTrafficMirrorFilterNetworkServicesCommand = async ( output , context ) : Promise < ModifyTrafficMirrorFilterNetworkServicesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyTrafficMirrorFilterNetworkServicesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyTrafficMirrorFilterNetworkServicesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyTrafficMirrorFilterNetworkServicesCommandError = async ( output , context ) : Promise < ModifyTrafficMirrorFilterNetworkServicesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyTrafficMirrorFilterRuleCommand = async ( output , context ) : Promise < ModifyTrafficMirrorFilterRuleCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyTrafficMirrorFilterRuleCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyTrafficMirrorFilterRuleResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyTrafficMirrorFilterRuleCommandError = async ( output , context ) : Promise < ModifyTrafficMirrorFilterRuleCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyTrafficMirrorSessionCommand = async ( output , context ) : Promise < ModifyTrafficMirrorSessionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyTrafficMirrorSessionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyTrafficMirrorSessionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyTrafficMirrorSessionCommandError = async ( output , context ) : Promise < ModifyTrafficMirrorSessionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyTransitGatewayCommand = async ( output , context ) : Promise < ModifyTransitGatewayCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyTransitGatewayCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyTransitGatewayResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyTransitGatewayCommandError = async ( output , context ) : Promise < ModifyTransitGatewayCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyTransitGatewayPrefixListReferenceCommand = async ( output , context ) : Promise < ModifyTransitGatewayPrefixListReferenceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyTransitGatewayPrefixListReferenceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyTransitGatewayPrefixListReferenceResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyTransitGatewayPrefixListReferenceCommandError = async ( output , context ) : Promise < ModifyTransitGatewayPrefixListReferenceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyTransitGatewayVpcAttachmentCommand = async ( output , context ) : Promise < ModifyTransitGatewayVpcAttachmentCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyTransitGatewayVpcAttachmentCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyTransitGatewayVpcAttachmentResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyTransitGatewayVpcAttachmentCommandError = async ( output , context ) : Promise < ModifyTransitGatewayVpcAttachmentCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyVolumeCommand = async ( output , context ) : Promise < ModifyVolumeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyVolumeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyVolumeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyVolumeCommandError = async ( output , context ) : Promise < ModifyVolumeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyVolumeAttributeCommand = async ( output , context ) : Promise < ModifyVolumeAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyVolumeAttributeCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyVolumeAttributeCommandError = async ( output , context ) : Promise < ModifyVolumeAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyVpcAttributeCommand = async ( output , context ) : Promise < ModifyVpcAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyVpcAttributeCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyVpcAttributeCommandError = async ( output , context ) : Promise < ModifyVpcAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyVpcEndpointCommand = async ( output , context ) : Promise < ModifyVpcEndpointCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyVpcEndpointCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyVpcEndpointResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyVpcEndpointCommandError = async ( output , context ) : Promise < ModifyVpcEndpointCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyVpcEndpointConnectionNotificationCommand = async ( output , context ) : Promise < ModifyVpcEndpointConnectionNotificationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyVpcEndpointConnectionNotificationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyVpcEndpointConnectionNotificationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyVpcEndpointConnectionNotificationCommandError = async ( output , context ) : Promise < ModifyVpcEndpointConnectionNotificationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyVpcEndpointServiceConfigurationCommand = async ( output , context ) : Promise < ModifyVpcEndpointServiceConfigurationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyVpcEndpointServiceConfigurationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyVpcEndpointServiceConfigurationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyVpcEndpointServiceConfigurationCommandError = async ( output , context ) : Promise < ModifyVpcEndpointServiceConfigurationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyVpcEndpointServicePayerResponsibilityCommand = async ( output , context ) : Promise < ModifyVpcEndpointServicePayerResponsibilityCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyVpcEndpointServicePayerResponsibilityCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyVpcEndpointServicePayerResponsibilityResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyVpcEndpointServicePayerResponsibilityCommandError = async ( output , context ) : Promise < ModifyVpcEndpointServicePayerResponsibilityCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyVpcEndpointServicePermissionsCommand = async ( output , context ) : Promise < ModifyVpcEndpointServicePermissionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyVpcEndpointServicePermissionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyVpcEndpointServicePermissionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyVpcEndpointServicePermissionsCommandError = async ( output , context ) : Promise < ModifyVpcEndpointServicePermissionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyVpcPeeringConnectionOptionsCommand = async ( output , context ) : Promise < ModifyVpcPeeringConnectionOptionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyVpcPeeringConnectionOptionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyVpcPeeringConnectionOptionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyVpcPeeringConnectionOptionsCommandError = async ( output , context ) : Promise < ModifyVpcPeeringConnectionOptionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyVpcTenancyCommand = async ( output , context ) : Promise < ModifyVpcTenancyCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyVpcTenancyCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyVpcTenancyResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyVpcTenancyCommandError = async ( output , context ) : Promise < ModifyVpcTenancyCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyVpnConnectionCommand = async ( output , context ) : Promise < ModifyVpnConnectionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyVpnConnectionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyVpnConnectionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyVpnConnectionCommandError = async ( output , context ) : Promise < ModifyVpnConnectionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyVpnConnectionOptionsCommand = async ( output , context ) : Promise < ModifyVpnConnectionOptionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyVpnConnectionOptionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyVpnConnectionOptionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyVpnConnectionOptionsCommandError = async ( output , context ) : Promise < ModifyVpnConnectionOptionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyVpnTunnelCertificateCommand = async ( output , context ) : Promise < ModifyVpnTunnelCertificateCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyVpnTunnelCertificateCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyVpnTunnelCertificateResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyVpnTunnelCertificateCommandError = async ( output , context ) : Promise < ModifyVpnTunnelCertificateCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ModifyVpnTunnelOptionsCommand = async ( output , context ) : Promise < ModifyVpnTunnelOptionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ModifyVpnTunnelOptionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ModifyVpnTunnelOptionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ModifyVpnTunnelOptionsCommandError = async ( output , context ) : Promise < ModifyVpnTunnelOptionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2MonitorInstancesCommand = async ( output , context ) : Promise < MonitorInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2MonitorInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2MonitorInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2MonitorInstancesCommandError = async ( output , context ) : Promise < MonitorInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2MoveAddressToVpcCommand = async ( output , context ) : Promise < MoveAddressToVpcCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2MoveAddressToVpcCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2MoveAddressToVpcResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2MoveAddressToVpcCommandError = async ( output , context ) : Promise < MoveAddressToVpcCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2MoveByoipCidrToIpamCommand = async ( output , context ) : Promise < MoveByoipCidrToIpamCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2MoveByoipCidrToIpamCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2MoveByoipCidrToIpamResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2MoveByoipCidrToIpamCommandError = async ( output , context ) : Promise < MoveByoipCidrToIpamCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ProvisionByoipCidrCommand = async ( output , context ) : Promise < ProvisionByoipCidrCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ProvisionByoipCidrCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ProvisionByoipCidrResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ProvisionByoipCidrCommandError = async ( output , context ) : Promise < ProvisionByoipCidrCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ProvisionIpamPoolCidrCommand = async ( output , context ) : Promise < ProvisionIpamPoolCidrCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ProvisionIpamPoolCidrCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ProvisionIpamPoolCidrResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ProvisionIpamPoolCidrCommandError = async ( output , context ) : Promise < ProvisionIpamPoolCidrCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ProvisionPublicIpv4PoolCidrCommand = async ( output , context ) : Promise < ProvisionPublicIpv4PoolCidrCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ProvisionPublicIpv4PoolCidrCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ProvisionPublicIpv4PoolCidrResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ProvisionPublicIpv4PoolCidrCommandError = async ( output , context ) : Promise < ProvisionPublicIpv4PoolCidrCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2PurchaseHostReservationCommand = async ( output , context ) : Promise < PurchaseHostReservationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2PurchaseHostReservationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2PurchaseHostReservationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2PurchaseHostReservationCommandError = async ( output , context ) : Promise < PurchaseHostReservationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2PurchaseReservedInstancesOfferingCommand = async ( output , context ) : Promise < PurchaseReservedInstancesOfferingCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2PurchaseReservedInstancesOfferingCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2PurchaseReservedInstancesOfferingResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2PurchaseReservedInstancesOfferingCommandError = async ( output , context ) : Promise < PurchaseReservedInstancesOfferingCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2PurchaseScheduledInstancesCommand = async ( output , context ) : Promise < PurchaseScheduledInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2PurchaseScheduledInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2PurchaseScheduledInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2PurchaseScheduledInstancesCommandError = async ( output , context ) : Promise < PurchaseScheduledInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RebootInstancesCommand = async ( output , context ) : Promise < RebootInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RebootInstancesCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RebootInstancesCommandError = async ( output , context ) : Promise < RebootInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RegisterImageCommand = async ( output , context ) : Promise < RegisterImageCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RegisterImageCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RegisterImageResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RegisterImageCommandError = async ( output , context ) : Promise < RegisterImageCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RegisterInstanceEventNotificationAttributesCommand = async ( output , context ) : Promise < RegisterInstanceEventNotificationAttributesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RegisterInstanceEventNotificationAttributesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RegisterInstanceEventNotificationAttributesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RegisterInstanceEventNotificationAttributesCommandError = async ( output , context ) : Promise < RegisterInstanceEventNotificationAttributesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RegisterTransitGatewayMulticastGroupMembersCommand = async ( output , context ) : Promise < RegisterTransitGatewayMulticastGroupMembersCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RegisterTransitGatewayMulticastGroupMembersCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RegisterTransitGatewayMulticastGroupMembersResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RegisterTransitGatewayMulticastGroupMembersCommandError = async ( output , context ) : Promise < RegisterTransitGatewayMulticastGroupMembersCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RegisterTransitGatewayMulticastGroupSourcesCommand = async ( output , context ) : Promise < RegisterTransitGatewayMulticastGroupSourcesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RegisterTransitGatewayMulticastGroupSourcesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RegisterTransitGatewayMulticastGroupSourcesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RegisterTransitGatewayMulticastGroupSourcesCommandError = async ( output , context ) : Promise < RegisterTransitGatewayMulticastGroupSourcesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RejectTransitGatewayMulticastDomainAssociationsCommand = async ( output , context ) : Promise < RejectTransitGatewayMulticastDomainAssociationsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RejectTransitGatewayMulticastDomainAssociationsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RejectTransitGatewayMulticastDomainAssociationsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RejectTransitGatewayMulticastDomainAssociationsCommandError = async ( output , context ) : Promise < RejectTransitGatewayMulticastDomainAssociationsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RejectTransitGatewayPeeringAttachmentCommand = async ( output , context ) : Promise < RejectTransitGatewayPeeringAttachmentCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RejectTransitGatewayPeeringAttachmentCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RejectTransitGatewayPeeringAttachmentResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RejectTransitGatewayPeeringAttachmentCommandError = async ( output , context ) : Promise < RejectTransitGatewayPeeringAttachmentCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RejectTransitGatewayVpcAttachmentCommand = async ( output , context ) : Promise < RejectTransitGatewayVpcAttachmentCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RejectTransitGatewayVpcAttachmentCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RejectTransitGatewayVpcAttachmentResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RejectTransitGatewayVpcAttachmentCommandError = async ( output , context ) : Promise < RejectTransitGatewayVpcAttachmentCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RejectVpcEndpointConnectionsCommand = async ( output , context ) : Promise < RejectVpcEndpointConnectionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RejectVpcEndpointConnectionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RejectVpcEndpointConnectionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RejectVpcEndpointConnectionsCommandError = async ( output , context ) : Promise < RejectVpcEndpointConnectionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RejectVpcPeeringConnectionCommand = async ( output , context ) : Promise < RejectVpcPeeringConnectionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RejectVpcPeeringConnectionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RejectVpcPeeringConnectionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RejectVpcPeeringConnectionCommandError = async ( output , context ) : Promise < RejectVpcPeeringConnectionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ReleaseAddressCommand = async ( output , context ) : Promise < ReleaseAddressCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ReleaseAddressCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ReleaseAddressCommandError = async ( output , context ) : Promise < ReleaseAddressCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ReleaseHostsCommand = async ( output , context ) : Promise < ReleaseHostsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ReleaseHostsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ReleaseHostsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ReleaseHostsCommandError = async ( output , context ) : Promise < ReleaseHostsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ReleaseIpamPoolAllocationCommand = async ( output , context ) : Promise < ReleaseIpamPoolAllocationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ReleaseIpamPoolAllocationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ReleaseIpamPoolAllocationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ReleaseIpamPoolAllocationCommandError = async ( output , context ) : Promise < ReleaseIpamPoolAllocationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ReplaceIamInstanceProfileAssociationCommand = async ( output , context ) : Promise < ReplaceIamInstanceProfileAssociationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ReplaceIamInstanceProfileAssociationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ReplaceIamInstanceProfileAssociationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ReplaceIamInstanceProfileAssociationCommandError = async ( output , context ) : Promise < ReplaceIamInstanceProfileAssociationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ReplaceNetworkAclAssociationCommand = async ( output , context ) : Promise < ReplaceNetworkAclAssociationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ReplaceNetworkAclAssociationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ReplaceNetworkAclAssociationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ReplaceNetworkAclAssociationCommandError = async ( output , context ) : Promise < ReplaceNetworkAclAssociationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ReplaceNetworkAclEntryCommand = async ( output , context ) : Promise < ReplaceNetworkAclEntryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ReplaceNetworkAclEntryCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ReplaceNetworkAclEntryCommandError = async ( output , context ) : Promise < ReplaceNetworkAclEntryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ReplaceRouteCommand = async ( output , context ) : Promise < ReplaceRouteCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ReplaceRouteCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ReplaceRouteCommandError = async ( output , context ) : Promise < ReplaceRouteCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ReplaceRouteTableAssociationCommand = async ( output , context ) : Promise < ReplaceRouteTableAssociationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ReplaceRouteTableAssociationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ReplaceRouteTableAssociationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ReplaceRouteTableAssociationCommandError = async ( output , context ) : Promise < ReplaceRouteTableAssociationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ReplaceTransitGatewayRouteCommand = async ( output , context ) : Promise < ReplaceTransitGatewayRouteCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ReplaceTransitGatewayRouteCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ReplaceTransitGatewayRouteResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ReplaceTransitGatewayRouteCommandError = async ( output , context ) : Promise < ReplaceTransitGatewayRouteCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ReportInstanceStatusCommand = async ( output , context ) : Promise < ReportInstanceStatusCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ReportInstanceStatusCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ReportInstanceStatusCommandError = async ( output , context ) : Promise < ReportInstanceStatusCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RequestSpotFleetCommand = async ( output , context ) : Promise < RequestSpotFleetCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RequestSpotFleetCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RequestSpotFleetResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RequestSpotFleetCommandError = async ( output , context ) : Promise < RequestSpotFleetCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RequestSpotInstancesCommand = async ( output , context ) : Promise < RequestSpotInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RequestSpotInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RequestSpotInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RequestSpotInstancesCommandError = async ( output , context ) : Promise < RequestSpotInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ResetAddressAttributeCommand = async ( output , context ) : Promise < ResetAddressAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ResetAddressAttributeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ResetAddressAttributeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ResetAddressAttributeCommandError = async ( output , context ) : Promise < ResetAddressAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ResetEbsDefaultKmsKeyIdCommand = async ( output , context ) : Promise < ResetEbsDefaultKmsKeyIdCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ResetEbsDefaultKmsKeyIdCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ResetEbsDefaultKmsKeyIdResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ResetEbsDefaultKmsKeyIdCommandError = async ( output , context ) : Promise < ResetEbsDefaultKmsKeyIdCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ResetFpgaImageAttributeCommand = async ( output , context ) : Promise < ResetFpgaImageAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ResetFpgaImageAttributeCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2ResetFpgaImageAttributeResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ResetFpgaImageAttributeCommandError = async ( output , context ) : Promise < ResetFpgaImageAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ResetImageAttributeCommand = async ( output , context ) : Promise < ResetImageAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ResetImageAttributeCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ResetImageAttributeCommandError = async ( output , context ) : Promise < ResetImageAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ResetInstanceAttributeCommand = async ( output , context ) : Promise < ResetInstanceAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ResetInstanceAttributeCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ResetInstanceAttributeCommandError = async ( output , context ) : Promise < ResetInstanceAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ResetNetworkInterfaceAttributeCommand = async ( output , context ) : Promise < ResetNetworkInterfaceAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ResetNetworkInterfaceAttributeCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ResetNetworkInterfaceAttributeCommandError = async ( output , context ) : Promise < ResetNetworkInterfaceAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2ResetSnapshotAttributeCommand = async ( output , context ) : Promise < ResetSnapshotAttributeCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2ResetSnapshotAttributeCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2ResetSnapshotAttributeCommandError = async ( output , context ) : Promise < ResetSnapshotAttributeCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RestoreAddressToClassicCommand = async ( output , context ) : Promise < RestoreAddressToClassicCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RestoreAddressToClassicCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RestoreAddressToClassicResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RestoreAddressToClassicCommandError = async ( output , context ) : Promise < RestoreAddressToClassicCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RestoreManagedPrefixListVersionCommand = async ( output , context ) : Promise < RestoreManagedPrefixListVersionCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RestoreManagedPrefixListVersionCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RestoreManagedPrefixListVersionResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RestoreManagedPrefixListVersionCommandError = async ( output , context ) : Promise < RestoreManagedPrefixListVersionCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RestoreSnapshotFromRecycleBinCommand = async ( output , context ) : Promise < RestoreSnapshotFromRecycleBinCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RestoreSnapshotFromRecycleBinCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RestoreSnapshotFromRecycleBinResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RestoreSnapshotFromRecycleBinCommandError = async ( output , context ) : Promise < RestoreSnapshotFromRecycleBinCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RestoreSnapshotTierCommand = async ( output , context ) : Promise < RestoreSnapshotTierCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RestoreSnapshotTierCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RestoreSnapshotTierResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RestoreSnapshotTierCommandError = async ( output , context ) : Promise < RestoreSnapshotTierCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RevokeClientVpnIngressCommand = async ( output , context ) : Promise < RevokeClientVpnIngressCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RevokeClientVpnIngressCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RevokeClientVpnIngressResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RevokeClientVpnIngressCommandError = async ( output , context ) : Promise < RevokeClientVpnIngressCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RevokeSecurityGroupEgressCommand = async ( output , context ) : Promise < RevokeSecurityGroupEgressCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RevokeSecurityGroupEgressCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RevokeSecurityGroupEgressResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RevokeSecurityGroupEgressCommandError = async ( output , context ) : Promise < RevokeSecurityGroupEgressCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RevokeSecurityGroupIngressCommand = async ( output , context ) : Promise < RevokeSecurityGroupIngressCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RevokeSecurityGroupIngressCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RevokeSecurityGroupIngressResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RevokeSecurityGroupIngressCommandError = async ( output , context ) : Promise < RevokeSecurityGroupIngressCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RunInstancesCommand = async ( output , context ) : Promise < RunInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RunInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2Reservation ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RunInstancesCommandError = async ( output , context ) : Promise < RunInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2RunScheduledInstancesCommand = async ( output , context ) : Promise < RunScheduledInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2RunScheduledInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2RunScheduledInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2RunScheduledInstancesCommandError = async ( output , context ) : Promise < RunScheduledInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2SearchLocalGatewayRoutesCommand = async ( output , context ) : Promise < SearchLocalGatewayRoutesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2SearchLocalGatewayRoutesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2SearchLocalGatewayRoutesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2SearchLocalGatewayRoutesCommandError = async ( output , context ) : Promise < SearchLocalGatewayRoutesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2SearchTransitGatewayMulticastGroupsCommand = async ( output , context ) : Promise < SearchTransitGatewayMulticastGroupsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2SearchTransitGatewayMulticastGroupsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2SearchTransitGatewayMulticastGroupsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2SearchTransitGatewayMulticastGroupsCommandError = async ( output , context ) : Promise < SearchTransitGatewayMulticastGroupsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2SearchTransitGatewayRoutesCommand = async ( output , context ) : Promise < SearchTransitGatewayRoutesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2SearchTransitGatewayRoutesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2SearchTransitGatewayRoutesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2SearchTransitGatewayRoutesCommandError = async ( output , context ) : Promise < SearchTransitGatewayRoutesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2SendDiagnosticInterruptCommand = async ( output , context ) : Promise < SendDiagnosticInterruptCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2SendDiagnosticInterruptCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2SendDiagnosticInterruptCommandError = async ( output , context ) : Promise < SendDiagnosticInterruptCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2StartInstancesCommand = async ( output , context ) : Promise < StartInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2StartInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2StartInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2StartInstancesCommandError = async ( output , context ) : Promise < StartInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2StartNetworkInsightsAccessScopeAnalysisCommand = async ( output , context ) : Promise < StartNetworkInsightsAccessScopeAnalysisCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2StartNetworkInsightsAccessScopeAnalysisCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2StartNetworkInsightsAccessScopeAnalysisResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2StartNetworkInsightsAccessScopeAnalysisCommandError = async ( output , context ) : Promise < StartNetworkInsightsAccessScopeAnalysisCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2StartNetworkInsightsAnalysisCommand = async ( output , context ) : Promise < StartNetworkInsightsAnalysisCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2StartNetworkInsightsAnalysisCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2StartNetworkInsightsAnalysisResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2StartNetworkInsightsAnalysisCommandError = async ( output , context ) : Promise < StartNetworkInsightsAnalysisCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2StartVpcEndpointServicePrivateDnsVerificationCommand = async ( output , context ) : Promise < StartVpcEndpointServicePrivateDnsVerificationCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2StartVpcEndpointServicePrivateDnsVerificationCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2StartVpcEndpointServicePrivateDnsVerificationResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2StartVpcEndpointServicePrivateDnsVerificationCommandError = async ( output , context ) : Promise < StartVpcEndpointServicePrivateDnsVerificationCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2StopInstancesCommand = async ( output , context ) : Promise < StopInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2StopInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2StopInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2StopInstancesCommandError = async ( output , context ) : Promise < StopInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2TerminateClientVpnConnectionsCommand = async ( output , context ) : Promise < TerminateClientVpnConnectionsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2TerminateClientVpnConnectionsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2TerminateClientVpnConnectionsResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2TerminateClientVpnConnectionsCommandError = async ( output , context ) : Promise < TerminateClientVpnConnectionsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2TerminateInstancesCommand = async ( output , context ) : Promise < TerminateInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2TerminateInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2TerminateInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2TerminateInstancesCommandError = async ( output , context ) : Promise < TerminateInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2UnassignIpv6AddressesCommand = async ( output , context ) : Promise < UnassignIpv6AddressesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2UnassignIpv6AddressesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2UnassignIpv6AddressesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2UnassignIpv6AddressesCommandError = async ( output , context ) : Promise < UnassignIpv6AddressesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2UnassignPrivateIpAddressesCommand = async ( output , context ) : Promise < UnassignPrivateIpAddressesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2UnassignPrivateIpAddressesCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2UnassignPrivateIpAddressesCommandError = async ( output , context ) : Promise < UnassignPrivateIpAddressesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2UnmonitorInstancesCommand = async ( output , context ) : Promise < UnmonitorInstancesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2UnmonitorInstancesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2UnmonitorInstancesResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2UnmonitorInstancesCommandError = async ( output , context ) : Promise < UnmonitorInstancesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2UpdateSecurityGroupRuleDescriptionsEgressCommand = async ( output , context ) : Promise < UpdateSecurityGroupRuleDescriptionsEgressCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2UpdateSecurityGroupRuleDescriptionsEgressCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2UpdateSecurityGroupRuleDescriptionsEgressResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2UpdateSecurityGroupRuleDescriptionsEgressCommandError = async ( output , context ) : Promise < UpdateSecurityGroupRuleDescriptionsEgressCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2UpdateSecurityGroupRuleDescriptionsIngressCommand = async ( output , context ) : Promise < UpdateSecurityGroupRuleDescriptionsIngressCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2UpdateSecurityGroupRuleDescriptionsIngressCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2UpdateSecurityGroupRuleDescriptionsIngressResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2UpdateSecurityGroupRuleDescriptionsIngressCommandError = async ( output , context ) : Promise < UpdateSecurityGroupRuleDescriptionsIngressCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_ec2WithdrawByoipCidrCommand = async ( output , context ) : Promise < WithdrawByoipCidrCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_ec2WithdrawByoipCidrCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_ec2WithdrawByoipCidrResult ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_ec2WithdrawByoipCidrCommandError = async ( output , context ) : Promise < WithdrawByoipCidrCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadEc2ErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . Errors . Error . code || parsedBody . Errors . Error . Code || errorCode ; response = { ... parsedBody . Errors . Error , name : `${ errorCode }` , message : parsedBody . Errors . Error . message || parsedBody . Errors . Error . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; const serializeAws_ec2AcceleratorCount = ( input , context ) : any => { const entries = { } ; if ( input . Min !== undefined && input . Min !== null ) { entries [ "Min" ] = input . Min ; } if ( input . Max !== undefined && input . Max !== null ) { entries [ "Max" ] = input . Max ; } return entries ; } ; const serializeAws_ec2AcceleratorCountRequest = ( input , context ) : any => { const entries = { } ; if ( input . Min !== undefined && input . Min !== null ) { entries [ "Min" ] = input . Min ; } if ( input . Max !== undefined && input . Max !== null ) { entries [ "Max" ] = input . Max ; } return entries ; } ; const serializeAws_ec2AcceleratorManufacturerSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2AcceleratorNameSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2AcceleratorTotalMemoryMiB = ( input , context ) : any => { const entries = { } ; if ( input . Min !== undefined && input . Min !== null ) { entries [ "Min" ] = input . Min ; } if ( input . Max !== undefined && input . Max !== null ) { entries [ "Max" ] = input . Max ; } return entries ; } ; const serializeAws_ec2AcceleratorTotalMemoryMiBRequest = ( input , context ) : any => { const entries = { } ; if ( input . Min !== undefined && input . Min !== null ) { entries [ "Min" ] = input . Min ; } if ( input . Max !== undefined && input . Max !== null ) { entries [ "Max" ] = input . Max ; } return entries ; } ; const serializeAws_ec2AcceleratorTypeSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2AcceptReservedInstancesExchangeQuoteRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ReservedInstanceIds !== undefined && input . ReservedInstanceIds !== null ) { const memberEntries = serializeAws_ec2ReservedInstanceIdSet ( input . ReservedInstanceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ReservedInstanceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . TargetConfigurations !== undefined && input . TargetConfigurations !== null ) { const memberEntries = serializeAws_ec2TargetConfigurationRequestSet ( input . TargetConfigurations , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TargetConfiguration.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2AcceptTransitGatewayMulticastDomainAssociationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayMulticastDomainId !== undefined && input . TransitGatewayMulticastDomainId !== null ) { entries [ "TransitGatewayMulticastDomainId" ] = input . TransitGatewayMulticastDomainId ; } if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . SubnetIds !== undefined && input . SubnetIds !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . SubnetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SubnetIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2AcceptTransitGatewayPeeringAttachmentRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2AcceptTransitGatewayVpcAttachmentRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2AcceptVpcEndpointConnectionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ServiceId !== undefined && input . ServiceId !== null ) { entries [ "ServiceId" ] = input . ServiceId ; } if ( input . VpcEndpointIds !== undefined && input . VpcEndpointIds !== null ) { const memberEntries = serializeAws_ec2VpcEndpointIdList ( input . VpcEndpointIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcEndpointId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2AcceptVpcPeeringConnectionRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VpcPeeringConnectionId !== undefined && input . VpcPeeringConnectionId !== null ) { entries [ "VpcPeeringConnectionId" ] = input . VpcPeeringConnectionId ; } return entries ; } ; const serializeAws_ec2AccessScopePathListRequest = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2AccessScopePathRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2AccessScopePathRequest = ( input , context ) : any => { const entries = { } ; if ( input . Source !== undefined && input . Source !== null ) { const memberEntries = serializeAws_ec2PathStatementRequest ( input . Source , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Source.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Destination !== undefined && input . Destination !== null ) { const memberEntries = serializeAws_ec2PathStatementRequest ( input . Destination , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Destination.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ThroughResources !== undefined && input . ThroughResources !== null ) { const memberEntries = serializeAws_ec2ThroughResourcesStatementRequestList ( input . ThroughResources , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ThroughResource.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2AccountAttributeNameStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `AttributeName.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2AddIpamOperatingRegion = ( input , context ) : any => { const entries = { } ; if ( input . RegionName !== undefined && input . RegionName !== null ) { entries [ "RegionName" ] = input . RegionName ; } return entries ; } ; const serializeAws_ec2AddIpamOperatingRegionSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2AddIpamOperatingRegion ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Member.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2AddPrefixListEntries = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2AddPrefixListEntry ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Member.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2AddPrefixListEntry = ( input , context ) : any => { const entries = { } ; if ( input . Cidr !== undefined && input . Cidr !== null ) { entries [ "Cidr" ] = input . Cidr ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } return entries ; } ; const serializeAws_ec2AdvertiseByoipCidrRequest = ( input , context ) : any => { const entries = { } ; if ( input . Cidr !== undefined && input . Cidr !== null ) { entries [ "Cidr" ] = input . Cidr ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2AllocateAddressRequest = ( input , context ) : any => { const entries = { } ; if ( input . Domain !== undefined && input . Domain !== null ) { entries [ "Domain" ] = input . Domain ; } if ( input . Address !== undefined && input . Address !== null ) { entries [ "Address" ] = input . Address ; } if ( input . PublicIpv4Pool !== undefined && input . PublicIpv4Pool !== null ) { entries [ "PublicIpv4Pool" ] = input . PublicIpv4Pool ; } if ( input . NetworkBorderGroup !== undefined && input . NetworkBorderGroup !== null ) { entries [ "NetworkBorderGroup" ] = input . NetworkBorderGroup ; } if ( input . CustomerOwnedIpv4Pool !== undefined && input . CustomerOwnedIpv4Pool !== null ) { entries [ "CustomerOwnedIpv4Pool" ] = input . CustomerOwnedIpv4Pool ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2AllocateHostsRequest = ( input , context ) : any => { const entries = { } ; if ( input . AutoPlacement !== undefined && input . AutoPlacement !== null ) { entries [ "AutoPlacement" ] = input . AutoPlacement ; } if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . InstanceType !== undefined && input . InstanceType !== null ) { entries [ "InstanceType" ] = input . InstanceType ; } if ( input . InstanceFamily !== undefined && input . InstanceFamily !== null ) { entries [ "InstanceFamily" ] = input . InstanceFamily ; } if ( input . Quantity !== undefined && input . Quantity !== null ) { entries [ "Quantity" ] = input . Quantity ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . HostRecovery !== undefined && input . HostRecovery !== null ) { entries [ "HostRecovery" ] = input . HostRecovery ; } return entries ; } ; const serializeAws_ec2AllocateIpamPoolCidrRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . IpamPoolId !== undefined && input . IpamPoolId !== null ) { entries [ "IpamPoolId" ] = input . IpamPoolId ; } if ( input . Cidr !== undefined && input . Cidr !== null ) { entries [ "Cidr" ] = input . Cidr ; } if ( input . NetmaskLength !== undefined && input . NetmaskLength !== null ) { entries [ "NetmaskLength" ] = input . NetmaskLength ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . PreviewNextCidr !== undefined && input . PreviewNextCidr !== null ) { entries [ "PreviewNextCidr" ] = input . PreviewNextCidr ; } if ( input . DisallowedCidrs !== undefined && input . DisallowedCidrs !== null ) { const memberEntries = serializeAws_ec2IpamPoolAllocationDisallowedCidrs ( input . DisallowedCidrs , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DisallowedCidr.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2AllocationIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `AllocationId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2AllocationIds = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ApplySecurityGroupsToClientVpnTargetNetworkRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . SecurityGroupIds !== undefined && input . SecurityGroupIds !== null ) { const memberEntries = serializeAws_ec2ClientVpnSecurityGroupIdSet ( input . SecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ArchitectureTypeSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ArnList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2AssignIpv6AddressesRequest = ( input , context ) : any => { const entries = { } ; if ( input . Ipv6AddressCount !== undefined && input . Ipv6AddressCount !== null ) { entries [ "Ipv6AddressCount" ] = input . Ipv6AddressCount ; } if ( input . Ipv6Addresses !== undefined && input . Ipv6Addresses !== null ) { const memberEntries = serializeAws_ec2Ipv6AddressList ( input . Ipv6Addresses , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv6Addresses.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Ipv6PrefixCount !== undefined && input . Ipv6PrefixCount !== null ) { entries [ "Ipv6PrefixCount" ] = input . Ipv6PrefixCount ; } if ( input . Ipv6Prefixes !== undefined && input . Ipv6Prefixes !== null ) { const memberEntries = serializeAws_ec2IpPrefixList ( input . Ipv6Prefixes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv6Prefix.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } return entries ; } ; const serializeAws_ec2AssignPrivateIpAddressesRequest = ( input , context ) : any => { const entries = { } ; if ( input . AllowReassignment !== undefined && input . AllowReassignment !== null ) { entries [ "AllowReassignment" ] = input . AllowReassignment ; } if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } if ( input . PrivateIpAddresses !== undefined && input . PrivateIpAddresses !== null ) { const memberEntries = serializeAws_ec2PrivateIpAddressStringList ( input . PrivateIpAddresses , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PrivateIpAddress.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SecondaryPrivateIpAddressCount !== undefined && input . SecondaryPrivateIpAddressCount !== null ) { entries [ "SecondaryPrivateIpAddressCount" ] = input . SecondaryPrivateIpAddressCount ; } if ( input . Ipv4Prefixes !== undefined && input . Ipv4Prefixes !== null ) { const memberEntries = serializeAws_ec2IpPrefixList ( input . Ipv4Prefixes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv4Prefix.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Ipv4PrefixCount !== undefined && input . Ipv4PrefixCount !== null ) { entries [ "Ipv4PrefixCount" ] = input . Ipv4PrefixCount ; } return entries ; } ; const serializeAws_ec2AssociateAddressRequest = ( input , context ) : any => { const entries = { } ; if ( input . AllocationId !== undefined && input . AllocationId !== null ) { entries [ "AllocationId" ] = input . AllocationId ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . PublicIp !== undefined && input . PublicIp !== null ) { entries [ "PublicIp" ] = input . PublicIp ; } if ( input . AllowReassociation !== undefined && input . AllowReassociation !== null ) { entries [ "AllowReassociation" ] = input . AllowReassociation ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } if ( input . PrivateIpAddress !== undefined && input . PrivateIpAddress !== null ) { entries [ "PrivateIpAddress" ] = input . PrivateIpAddress ; } return entries ; } ; const serializeAws_ec2AssociateClientVpnTargetNetworkRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2AssociateDhcpOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DhcpOptionsId !== undefined && input . DhcpOptionsId !== null ) { entries [ "DhcpOptionsId" ] = input . DhcpOptionsId ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2AssociateEnclaveCertificateIamRoleRequest = ( input , context ) : any => { const entries = { } ; if ( input . CertificateArn !== undefined && input . CertificateArn !== null ) { entries [ "CertificateArn" ] = input . CertificateArn ; } if ( input . RoleArn !== undefined && input . RoleArn !== null ) { entries [ "RoleArn" ] = input . RoleArn ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2AssociateIamInstanceProfileRequest = ( input , context ) : any => { const entries = { } ; if ( input . IamInstanceProfile !== undefined && input . IamInstanceProfile !== null ) { const memberEntries = serializeAws_ec2IamInstanceProfileSpecification ( input . IamInstanceProfile , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IamInstanceProfile.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } return entries ; } ; const serializeAws_ec2AssociateInstanceEventWindowRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceEventWindowId !== undefined && input . InstanceEventWindowId !== null ) { entries [ "InstanceEventWindowId" ] = input . InstanceEventWindowId ; } if ( input . AssociationTarget !== undefined && input . AssociationTarget !== null ) { const memberEntries = serializeAws_ec2InstanceEventWindowAssociationRequest ( input . AssociationTarget , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AssociationTarget.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2AssociateRouteTableRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . RouteTableId !== undefined && input . RouteTableId !== null ) { entries [ "RouteTableId" ] = input . RouteTableId ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . GatewayId !== undefined && input . GatewayId !== null ) { entries [ "GatewayId" ] = input . GatewayId ; } return entries ; } ; const serializeAws_ec2AssociateSubnetCidrBlockRequest = ( input , context ) : any => { const entries = { } ; if ( input . Ipv6CidrBlock !== undefined && input . Ipv6CidrBlock !== null ) { entries [ "Ipv6CidrBlock" ] = input . Ipv6CidrBlock ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } return entries ; } ; const serializeAws_ec2AssociateTransitGatewayMulticastDomainRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayMulticastDomainId !== undefined && input . TransitGatewayMulticastDomainId !== null ) { entries [ "TransitGatewayMulticastDomainId" ] = input . TransitGatewayMulticastDomainId ; } if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . SubnetIds !== undefined && input . SubnetIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewaySubnetIdList ( input . SubnetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SubnetIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2AssociateTransitGatewayRouteTableRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayRouteTableId !== undefined && input . TransitGatewayRouteTableId !== null ) { entries [ "TransitGatewayRouteTableId" ] = input . TransitGatewayRouteTableId ; } if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2AssociateTrunkInterfaceRequest = ( input , context ) : any => { const entries = { } ; if ( input . BranchInterfaceId !== undefined && input . BranchInterfaceId !== null ) { entries [ "BranchInterfaceId" ] = input . BranchInterfaceId ; } if ( input . TrunkInterfaceId !== undefined && input . TrunkInterfaceId !== null ) { entries [ "TrunkInterfaceId" ] = input . TrunkInterfaceId ; } if ( input . VlanId !== undefined && input . VlanId !== null ) { entries [ "VlanId" ] = input . VlanId ; } if ( input . GreKey !== undefined && input . GreKey !== null ) { entries [ "GreKey" ] = input . GreKey ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2AssociateVpcCidrBlockRequest = ( input , context ) : any => { const entries = { } ; if ( input . AmazonProvidedIpv6CidrBlock !== undefined && input . AmazonProvidedIpv6CidrBlock !== null ) { entries [ "AmazonProvidedIpv6CidrBlock" ] = input . AmazonProvidedIpv6CidrBlock ; } if ( input . CidrBlock !== undefined && input . CidrBlock !== null ) { entries [ "CidrBlock" ] = input . CidrBlock ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . Ipv6CidrBlockNetworkBorderGroup !== undefined && input . Ipv6CidrBlockNetworkBorderGroup !== null ) { entries [ "Ipv6CidrBlockNetworkBorderGroup" ] = input . Ipv6CidrBlockNetworkBorderGroup ; } if ( input . Ipv6Pool !== undefined && input . Ipv6Pool !== null ) { entries [ "Ipv6Pool" ] = input . Ipv6Pool ; } if ( input . Ipv6CidrBlock !== undefined && input . Ipv6CidrBlock !== null ) { entries [ "Ipv6CidrBlock" ] = input . Ipv6CidrBlock ; } if ( input . Ipv4IpamPoolId !== undefined && input . Ipv4IpamPoolId !== null ) { entries [ "Ipv4IpamPoolId" ] = input . Ipv4IpamPoolId ; } if ( input . Ipv4NetmaskLength !== undefined && input . Ipv4NetmaskLength !== null ) { entries [ "Ipv4NetmaskLength" ] = input . Ipv4NetmaskLength ; } if ( input . Ipv6IpamPoolId !== undefined && input . Ipv6IpamPoolId !== null ) { entries [ "Ipv6IpamPoolId" ] = input . Ipv6IpamPoolId ; } if ( input . Ipv6NetmaskLength !== undefined && input . Ipv6NetmaskLength !== null ) { entries [ "Ipv6NetmaskLength" ] = input . Ipv6NetmaskLength ; } return entries ; } ; const serializeAws_ec2AssociationIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `AssociationId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2AthenaIntegration = ( input , context ) : any => { const entries = { } ; if ( input . IntegrationResultS3DestinationArn !== undefined && input . IntegrationResultS3DestinationArn !== null ) { entries [ "IntegrationResultS3DestinationArn" ] = input . IntegrationResultS3DestinationArn ; } if ( input . PartitionLoadFrequency !== undefined && input . PartitionLoadFrequency !== null ) { entries [ "PartitionLoadFrequency" ] = input . PartitionLoadFrequency ; } if ( input . PartitionStartDate !== undefined && input . PartitionStartDate !== null ) { entries [ "PartitionStartDate" ] = input . PartitionStartDate . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . PartitionEndDate !== undefined && input . PartitionEndDate !== null ) { entries [ "PartitionEndDate" ] = input . PartitionEndDate . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } return entries ; } ; const serializeAws_ec2AthenaIntegrationsSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2AthenaIntegration ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2AttachClassicLinkVpcRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Groups !== undefined && input . Groups !== null ) { const memberEntries = serializeAws_ec2GroupIdStringList ( input . Groups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } return entries ; } ; const serializeAws_ec2AttachInternetGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InternetGatewayId !== undefined && input . InternetGatewayId !== null ) { entries [ "InternetGatewayId" ] = input . InternetGatewayId ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } return entries ; } ; const serializeAws_ec2AttachNetworkInterfaceRequest = ( input , context ) : any => { const entries = { } ; if ( input . DeviceIndex !== undefined && input . DeviceIndex !== null ) { entries [ "DeviceIndex" ] = input . DeviceIndex ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } if ( input . NetworkCardIndex !== undefined && input . NetworkCardIndex !== null ) { entries [ "NetworkCardIndex" ] = input . NetworkCardIndex ; } return entries ; } ; const serializeAws_ec2AttachVolumeRequest = ( input , context ) : any => { const entries = { } ; if ( input . Device !== undefined && input . Device !== null ) { entries [ "Device" ] = input . Device ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . VolumeId !== undefined && input . VolumeId !== null ) { entries [ "VolumeId" ] = input . VolumeId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2AttachVpnGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . VpnGatewayId !== undefined && input . VpnGatewayId !== null ) { entries [ "VpnGatewayId" ] = input . VpnGatewayId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2AttributeBooleanValue = ( input , context ) : any => { const entries = { } ; if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } return entries ; } ; const serializeAws_ec2AttributeValue = ( input , context ) : any => { const entries = { } ; if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } return entries ; } ; const serializeAws_ec2AuthorizeClientVpnIngressRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . TargetNetworkCidr !== undefined && input . TargetNetworkCidr !== null ) { entries [ "TargetNetworkCidr" ] = input . TargetNetworkCidr ; } if ( input . AccessGroupId !== undefined && input . AccessGroupId !== null ) { entries [ "AccessGroupId" ] = input . AccessGroupId ; } if ( input . AuthorizeAllGroups !== undefined && input . AuthorizeAllGroups !== null ) { entries [ "AuthorizeAllGroups" ] = input . AuthorizeAllGroups ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2AuthorizeSecurityGroupEgressRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . GroupId !== undefined && input . GroupId !== null ) { entries [ "GroupId" ] = input . GroupId ; } if ( input . IpPermissions !== undefined && input . IpPermissions !== null ) { const memberEntries = serializeAws_ec2IpPermissionList ( input . IpPermissions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IpPermissions.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . CidrIp !== undefined && input . CidrIp !== null ) { entries [ "CidrIp" ] = input . CidrIp ; } if ( input . FromPort !== undefined && input . FromPort !== null ) { entries [ "FromPort" ] = input . FromPort ; } if ( input . IpProtocol !== undefined && input . IpProtocol !== null ) { entries [ "IpProtocol" ] = input . IpProtocol ; } if ( input . ToPort !== undefined && input . ToPort !== null ) { entries [ "ToPort" ] = input . ToPort ; } if ( input . SourceSecurityGroupName !== undefined && input . SourceSecurityGroupName !== null ) { entries [ "SourceSecurityGroupName" ] = input . SourceSecurityGroupName ; } if ( input . SourceSecurityGroupOwnerId !== undefined && input . SourceSecurityGroupOwnerId !== null ) { entries [ "SourceSecurityGroupOwnerId" ] = input . SourceSecurityGroupOwnerId ; } return entries ; } ; const serializeAws_ec2AuthorizeSecurityGroupIngressRequest = ( input , context ) : any => { const entries = { } ; if ( input . CidrIp !== undefined && input . CidrIp !== null ) { entries [ "CidrIp" ] = input . CidrIp ; } if ( input . FromPort !== undefined && input . FromPort !== null ) { entries [ "FromPort" ] = input . FromPort ; } if ( input . GroupId !== undefined && input . GroupId !== null ) { entries [ "GroupId" ] = input . GroupId ; } if ( input . GroupName !== undefined && input . GroupName !== null ) { entries [ "GroupName" ] = input . GroupName ; } if ( input . IpPermissions !== undefined && input . IpPermissions !== null ) { const memberEntries = serializeAws_ec2IpPermissionList ( input . IpPermissions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IpPermissions.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . IpProtocol !== undefined && input . IpProtocol !== null ) { entries [ "IpProtocol" ] = input . IpProtocol ; } if ( input . SourceSecurityGroupName !== undefined && input . SourceSecurityGroupName !== null ) { entries [ "SourceSecurityGroupName" ] = input . SourceSecurityGroupName ; } if ( input . SourceSecurityGroupOwnerId !== undefined && input . SourceSecurityGroupOwnerId !== null ) { entries [ "SourceSecurityGroupOwnerId" ] = input . SourceSecurityGroupOwnerId ; } if ( input . ToPort !== undefined && input . ToPort !== null ) { entries [ "ToPort" ] = input . ToPort ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2AvailabilityZoneStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `AvailabilityZone.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2BaselineEbsBandwidthMbps = ( input , context ) : any => { const entries = { } ; if ( input . Min !== undefined && input . Min !== null ) { entries [ "Min" ] = input . Min ; } if ( input . Max !== undefined && input . Max !== null ) { entries [ "Max" ] = input . Max ; } return entries ; } ; const serializeAws_ec2BaselineEbsBandwidthMbpsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Min !== undefined && input . Min !== null ) { entries [ "Min" ] = input . Min ; } if ( input . Max !== undefined && input . Max !== null ) { entries [ "Max" ] = input . Max ; } return entries ; } ; const serializeAws_ec2BillingProductList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2BlobAttributeValue = ( input , context ) : any => { const entries = { } ; if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = context . base64Encoder ( input . Value ) ; } return entries ; } ; const serializeAws_ec2BlockDeviceMapping = ( input , context ) : any => { const entries = { } ; if ( input . DeviceName !== undefined && input . DeviceName !== null ) { entries [ "DeviceName" ] = input . DeviceName ; } if ( input . VirtualName !== undefined && input . VirtualName !== null ) { entries [ "VirtualName" ] = input . VirtualName ; } if ( input . Ebs !== undefined && input . Ebs !== null ) { const memberEntries = serializeAws_ec2EbsBlockDevice ( input . Ebs , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ebs.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . NoDevice !== undefined && input . NoDevice !== null ) { entries [ "NoDevice" ] = input . NoDevice ; } return entries ; } ; const serializeAws_ec2BlockDeviceMappingList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2BlockDeviceMapping ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2BlockDeviceMappingRequestList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2BlockDeviceMapping ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `BlockDeviceMapping.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2BundleIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `BundleId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2BundleInstanceRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . Storage !== undefined && input . Storage !== null ) { const memberEntries = serializeAws_ec2Storage ( input . Storage , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Storage.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CancelBundleTaskRequest = ( input , context ) : any => { const entries = { } ; if ( input . BundleId !== undefined && input . BundleId !== null ) { entries [ "BundleId" ] = input . BundleId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CancelCapacityReservationFleetsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . CapacityReservationFleetIds !== undefined && input . CapacityReservationFleetIds !== null ) { const memberEntries = serializeAws_ec2CapacityReservationFleetIdSet ( input . CapacityReservationFleetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CapacityReservationFleetId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CancelCapacityReservationRequest = ( input , context ) : any => { const entries = { } ; if ( input . CapacityReservationId !== undefined && input . CapacityReservationId !== null ) { entries [ "CapacityReservationId" ] = input . CapacityReservationId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CancelConversionRequest = ( input , context ) : any => { const entries = { } ; if ( input . ConversionTaskId !== undefined && input . ConversionTaskId !== null ) { entries [ "ConversionTaskId" ] = input . ConversionTaskId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ReasonMessage !== undefined && input . ReasonMessage !== null ) { entries [ "ReasonMessage" ] = input . ReasonMessage ; } return entries ; } ; const serializeAws_ec2CancelExportTaskRequest = ( input , context ) : any => { const entries = { } ; if ( input . ExportTaskId !== undefined && input . ExportTaskId !== null ) { entries [ "ExportTaskId" ] = input . ExportTaskId ; } return entries ; } ; const serializeAws_ec2CancelImportTaskRequest = ( input , context ) : any => { const entries = { } ; if ( input . CancelReason !== undefined && input . CancelReason !== null ) { entries [ "CancelReason" ] = input . CancelReason ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ImportTaskId !== undefined && input . ImportTaskId !== null ) { entries [ "ImportTaskId" ] = input . ImportTaskId ; } return entries ; } ; const serializeAws_ec2CancelReservedInstancesListingRequest = ( input , context ) : any => { const entries = { } ; if ( input . ReservedInstancesListingId !== undefined && input . ReservedInstancesListingId !== null ) { entries [ "ReservedInstancesListingId" ] = input . ReservedInstancesListingId ; } return entries ; } ; const serializeAws_ec2CancelSpotFleetRequestsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . SpotFleetRequestIds !== undefined && input . SpotFleetRequestIds !== null ) { const memberEntries = serializeAws_ec2SpotFleetRequestIdList ( input . SpotFleetRequestIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SpotFleetRequestId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . TerminateInstances !== undefined && input . TerminateInstances !== null ) { entries [ "TerminateInstances" ] = input . TerminateInstances ; } return entries ; } ; const serializeAws_ec2CancelSpotInstanceRequestsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . SpotInstanceRequestIds !== undefined && input . SpotInstanceRequestIds !== null ) { const memberEntries = serializeAws_ec2SpotInstanceRequestIdList ( input . SpotInstanceRequestIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SpotInstanceRequestId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CapacityReservationFleetIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2CapacityReservationIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2CapacityReservationOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . UsageStrategy !== undefined && input . UsageStrategy !== null ) { entries [ "UsageStrategy" ] = input . UsageStrategy ; } return entries ; } ; const serializeAws_ec2CapacityReservationSpecification = ( input , context ) : any => { const entries = { } ; if ( input . CapacityReservationPreference !== undefined && input . CapacityReservationPreference !== null ) { entries [ "CapacityReservationPreference" ] = input . CapacityReservationPreference ; } if ( input . CapacityReservationTarget !== undefined && input . CapacityReservationTarget !== null ) { const memberEntries = serializeAws_ec2CapacityReservationTarget ( input . CapacityReservationTarget , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CapacityReservationTarget.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CapacityReservationTarget = ( input , context ) : any => { const entries = { } ; if ( input . CapacityReservationId !== undefined && input . CapacityReservationId !== null ) { entries [ "CapacityReservationId" ] = input . CapacityReservationId ; } if ( input . CapacityReservationResourceGroupArn !== undefined && input . CapacityReservationResourceGroupArn !== null ) { entries [ "CapacityReservationResourceGroupArn" ] = input . CapacityReservationResourceGroupArn ; } return entries ; } ; const serializeAws_ec2CarrierGatewayIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2CertificateAuthenticationRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientRootCertificateChainArn !== undefined && input . ClientRootCertificateChainArn !== null ) { entries [ "ClientRootCertificateChainArn" ] = input . ClientRootCertificateChainArn ; } return entries ; } ; const serializeAws_ec2CidrAuthorizationContext = ( input , context ) : any => { const entries = { } ; if ( input . Message !== undefined && input . Message !== null ) { entries [ "Message" ] = input . Message ; } if ( input . Signature !== undefined && input . Signature !== null ) { entries [ "Signature" ] = input . Signature ; } return entries ; } ; const serializeAws_ec2ClassicLoadBalancer = ( input , context ) : any => { const entries = { } ; if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } return entries ; } ; const serializeAws_ec2ClassicLoadBalancers = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2ClassicLoadBalancer ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2ClassicLoadBalancersConfig = ( input , context ) : any => { const entries = { } ; if ( input . ClassicLoadBalancers !== undefined && input . ClassicLoadBalancers !== null ) { const memberEntries = serializeAws_ec2ClassicLoadBalancers ( input . ClassicLoadBalancers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ClassicLoadBalancers.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ClientConnectOptions = ( input , context ) : any => { const entries = { } ; if ( input . Enabled !== undefined && input . Enabled !== null ) { entries [ "Enabled" ] = input . Enabled ; } if ( input . LambdaFunctionArn !== undefined && input . LambdaFunctionArn !== null ) { entries [ "LambdaFunctionArn" ] = input . LambdaFunctionArn ; } return entries ; } ; const serializeAws_ec2ClientData = ( input , context ) : any => { const entries = { } ; if ( input . Comment !== undefined && input . Comment !== null ) { entries [ "Comment" ] = input . Comment ; } if ( input . UploadEnd !== undefined && input . UploadEnd !== null ) { entries [ "UploadEnd" ] = input . UploadEnd . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . UploadSize !== undefined && input . UploadSize !== null ) { entries [ "UploadSize" ] = __serializeFloat ( input . UploadSize ) ; } if ( input . UploadStart !== undefined && input . UploadStart !== null ) { entries [ "UploadStart" ] = input . UploadStart . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } return entries ; } ; const serializeAws_ec2ClientVpnAuthenticationRequest = ( input , context ) : any => { const entries = { } ; if ( input . Type !== undefined && input . Type !== null ) { entries [ "Type" ] = input . Type ; } if ( input . ActiveDirectory !== undefined && input . ActiveDirectory !== null ) { const memberEntries = serializeAws_ec2DirectoryServiceAuthenticationRequest ( input . ActiveDirectory , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ActiveDirectory.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MutualAuthentication !== undefined && input . MutualAuthentication !== null ) { const memberEntries = serializeAws_ec2CertificateAuthenticationRequest ( input . MutualAuthentication , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `MutualAuthentication.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . FederatedAuthentication !== undefined && input . FederatedAuthentication !== null ) { const memberEntries = serializeAws_ec2FederatedAuthenticationRequest ( input . FederatedAuthentication , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `FederatedAuthentication.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ClientVpnAuthenticationRequestList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2ClientVpnAuthenticationRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Member.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2ClientVpnEndpointIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ClientVpnSecurityGroupIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2CoipPoolIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ConfirmProductInstanceRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . ProductCode !== undefined && input . ProductCode !== null ) { entries [ "ProductCode" ] = input . ProductCode ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ConnectionLogOptions = ( input , context ) : any => { const entries = { } ; if ( input . Enabled !== undefined && input . Enabled !== null ) { entries [ "Enabled" ] = input . Enabled ; } if ( input . CloudwatchLogGroup !== undefined && input . CloudwatchLogGroup !== null ) { entries [ "CloudwatchLogGroup" ] = input . CloudwatchLogGroup ; } if ( input . CloudwatchLogStream !== undefined && input . CloudwatchLogStream !== null ) { entries [ "CloudwatchLogStream" ] = input . CloudwatchLogStream ; } return entries ; } ; const serializeAws_ec2ConnectionNotificationIdsList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ConversionIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2CopyFpgaImageRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . SourceFpgaImageId !== undefined && input . SourceFpgaImageId !== null ) { entries [ "SourceFpgaImageId" ] = input . SourceFpgaImageId ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } if ( input . SourceRegion !== undefined && input . SourceRegion !== null ) { entries [ "SourceRegion" ] = input . SourceRegion ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } return entries ; } ; const serializeAws_ec2CopyImageRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . Encrypted !== undefined && input . Encrypted !== null ) { entries [ "Encrypted" ] = input . Encrypted ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } if ( input . SourceImageId !== undefined && input . SourceImageId !== null ) { entries [ "SourceImageId" ] = input . SourceImageId ; } if ( input . SourceRegion !== undefined && input . SourceRegion !== null ) { entries [ "SourceRegion" ] = input . SourceRegion ; } if ( input . DestinationOutpostArn !== undefined && input . DestinationOutpostArn !== null ) { entries [ "DestinationOutpostArn" ] = input . DestinationOutpostArn ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CopySnapshotRequest = ( input , context ) : any => { const entries = { } ; if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DestinationOutpostArn !== undefined && input . DestinationOutpostArn !== null ) { entries [ "DestinationOutpostArn" ] = input . DestinationOutpostArn ; } if ( input . DestinationRegion !== undefined && input . DestinationRegion !== null ) { entries [ "DestinationRegion" ] = input . DestinationRegion ; } if ( input . Encrypted !== undefined && input . Encrypted !== null ) { entries [ "Encrypted" ] = input . Encrypted ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . PresignedUrl !== undefined && input . PresignedUrl !== null ) { entries [ "PresignedUrl" ] = input . PresignedUrl ; } if ( input . SourceRegion !== undefined && input . SourceRegion !== null ) { entries [ "SourceRegion" ] = input . SourceRegion ; } if ( input . SourceSnapshotId !== undefined && input . SourceSnapshotId !== null ) { entries [ "SourceSnapshotId" ] = input . SourceSnapshotId ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CpuManufacturerSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2CpuOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . CoreCount !== undefined && input . CoreCount !== null ) { entries [ "CoreCount" ] = input . CoreCount ; } if ( input . ThreadsPerCore !== undefined && input . ThreadsPerCore !== null ) { entries [ "ThreadsPerCore" ] = input . ThreadsPerCore ; } return entries ; } ; const serializeAws_ec2CreateCapacityReservationFleetRequest = ( input , context ) : any => { const entries = { } ; if ( input . AllocationStrategy !== undefined && input . AllocationStrategy !== null ) { entries [ "AllocationStrategy" ] = input . AllocationStrategy ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . InstanceTypeSpecifications !== undefined && input . InstanceTypeSpecifications !== null ) { const memberEntries = serializeAws_ec2ReservationFleetInstanceSpecificationList ( input . InstanceTypeSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceTypeSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Tenancy !== undefined && input . Tenancy !== null ) { entries [ "Tenancy" ] = input . Tenancy ; } if ( input . TotalTargetCapacity !== undefined && input . TotalTargetCapacity !== null ) { entries [ "TotalTargetCapacity" ] = input . TotalTargetCapacity ; } if ( input . EndDate !== undefined && input . EndDate !== null ) { entries [ "EndDate" ] = input . EndDate . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . InstanceMatchCriteria !== undefined && input . InstanceMatchCriteria !== null ) { entries [ "InstanceMatchCriteria" ] = input . InstanceMatchCriteria ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateCapacityReservationRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . InstanceType !== undefined && input . InstanceType !== null ) { entries [ "InstanceType" ] = input . InstanceType ; } if ( input . InstancePlatform !== undefined && input . InstancePlatform !== null ) { entries [ "InstancePlatform" ] = input . InstancePlatform ; } if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . AvailabilityZoneId !== undefined && input . AvailabilityZoneId !== null ) { entries [ "AvailabilityZoneId" ] = input . AvailabilityZoneId ; } if ( input . Tenancy !== undefined && input . Tenancy !== null ) { entries [ "Tenancy" ] = input . Tenancy ; } if ( input . InstanceCount !== undefined && input . InstanceCount !== null ) { entries [ "InstanceCount" ] = input . InstanceCount ; } if ( input . EbsOptimized !== undefined && input . EbsOptimized !== null ) { entries [ "EbsOptimized" ] = input . EbsOptimized ; } if ( input . EphemeralStorage !== undefined && input . EphemeralStorage !== null ) { entries [ "EphemeralStorage" ] = input . EphemeralStorage ; } if ( input . EndDate !== undefined && input . EndDate !== null ) { entries [ "EndDate" ] = input . EndDate . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . EndDateType !== undefined && input . EndDateType !== null ) { entries [ "EndDateType" ] = input . EndDateType ; } if ( input . InstanceMatchCriteria !== undefined && input . InstanceMatchCriteria !== null ) { entries [ "InstanceMatchCriteria" ] = input . InstanceMatchCriteria ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecifications.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . OutpostArn !== undefined && input . OutpostArn !== null ) { entries [ "OutpostArn" ] = input . OutpostArn ; } if ( input . PlacementGroupArn !== undefined && input . PlacementGroupArn !== null ) { entries [ "PlacementGroupArn" ] = input . PlacementGroupArn ; } return entries ; } ; const serializeAws_ec2CreateCarrierGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } return entries ; } ; const serializeAws_ec2CreateClientVpnEndpointRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientCidrBlock !== undefined && input . ClientCidrBlock !== null ) { entries [ "ClientCidrBlock" ] = input . ClientCidrBlock ; } if ( input . ServerCertificateArn !== undefined && input . ServerCertificateArn !== null ) { entries [ "ServerCertificateArn" ] = input . ServerCertificateArn ; } if ( input . AuthenticationOptions !== undefined && input . AuthenticationOptions !== null ) { const memberEntries = serializeAws_ec2ClientVpnAuthenticationRequestList ( input . AuthenticationOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Authentication.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ConnectionLogOptions !== undefined && input . ConnectionLogOptions !== null ) { const memberEntries = serializeAws_ec2ConnectionLogOptions ( input . ConnectionLogOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ConnectionLogOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DnsServers !== undefined && input . DnsServers !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . DnsServers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DnsServers.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . TransportProtocol !== undefined && input . TransportProtocol !== null ) { entries [ "TransportProtocol" ] = input . TransportProtocol ; } if ( input . VpnPort !== undefined && input . VpnPort !== null ) { entries [ "VpnPort" ] = input . VpnPort ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . SplitTunnel !== undefined && input . SplitTunnel !== null ) { entries [ "SplitTunnel" ] = input . SplitTunnel ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SecurityGroupIds !== undefined && input . SecurityGroupIds !== null ) { const memberEntries = serializeAws_ec2ClientVpnSecurityGroupIdSet ( input . SecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . SelfServicePortal !== undefined && input . SelfServicePortal !== null ) { entries [ "SelfServicePortal" ] = input . SelfServicePortal ; } if ( input . ClientConnectOptions !== undefined && input . ClientConnectOptions !== null ) { const memberEntries = serializeAws_ec2ClientConnectOptions ( input . ClientConnectOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ClientConnectOptions.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateClientVpnRouteRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . DestinationCidrBlock !== undefined && input . DestinationCidrBlock !== null ) { entries [ "DestinationCidrBlock" ] = input . DestinationCidrBlock ; } if ( input . TargetVpcSubnetId !== undefined && input . TargetVpcSubnetId !== null ) { entries [ "TargetVpcSubnetId" ] = input . TargetVpcSubnetId ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateCustomerGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . BgpAsn !== undefined && input . BgpAsn !== null ) { entries [ "BgpAsn" ] = input . BgpAsn ; } if ( input . PublicIp !== undefined && input . PublicIp !== null ) { entries [ "IpAddress" ] = input . PublicIp ; } if ( input . CertificateArn !== undefined && input . CertificateArn !== null ) { entries [ "CertificateArn" ] = input . CertificateArn ; } if ( input . Type !== undefined && input . Type !== null ) { entries [ "Type" ] = input . Type ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DeviceName !== undefined && input . DeviceName !== null ) { entries [ "DeviceName" ] = input . DeviceName ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateDefaultSubnetRequest = ( input , context ) : any => { const entries = { } ; if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Ipv6Native !== undefined && input . Ipv6Native !== null ) { entries [ "Ipv6Native" ] = input . Ipv6Native ; } return entries ; } ; const serializeAws_ec2CreateDefaultVpcRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateDhcpOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DhcpConfigurations !== undefined && input . DhcpConfigurations !== null ) { const memberEntries = serializeAws_ec2NewDhcpConfigurationList ( input . DhcpConfigurations , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DhcpConfiguration.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateEgressOnlyInternetGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateFleetRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . SpotOptions !== undefined && input . SpotOptions !== null ) { const memberEntries = serializeAws_ec2SpotOptionsRequest ( input . SpotOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SpotOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . OnDemandOptions !== undefined && input . OnDemandOptions !== null ) { const memberEntries = serializeAws_ec2OnDemandOptionsRequest ( input . OnDemandOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `OnDemandOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ExcessCapacityTerminationPolicy !== undefined && input . ExcessCapacityTerminationPolicy !== null ) { entries [ "ExcessCapacityTerminationPolicy" ] = input . ExcessCapacityTerminationPolicy ; } if ( input . LaunchTemplateConfigs !== undefined && input . LaunchTemplateConfigs !== null ) { const memberEntries = serializeAws_ec2FleetLaunchTemplateConfigListRequest ( input . LaunchTemplateConfigs , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchTemplateConfigs.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . TargetCapacitySpecification !== undefined && input . TargetCapacitySpecification !== null ) { const memberEntries = serializeAws_ec2TargetCapacitySpecificationRequest ( input . TargetCapacitySpecification , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TargetCapacitySpecification.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . TerminateInstancesWithExpiration !== undefined && input . TerminateInstancesWithExpiration !== null ) { entries [ "TerminateInstancesWithExpiration" ] = input . TerminateInstancesWithExpiration ; } if ( input . Type !== undefined && input . Type !== null ) { entries [ "Type" ] = input . Type ; } if ( input . ValidFrom !== undefined && input . ValidFrom !== null ) { entries [ "ValidFrom" ] = input . ValidFrom . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . ValidUntil !== undefined && input . ValidUntil !== null ) { entries [ "ValidUntil" ] = input . ValidUntil . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . ReplaceUnhealthyInstances !== undefined && input . ReplaceUnhealthyInstances !== null ) { entries [ "ReplaceUnhealthyInstances" ] = input . ReplaceUnhealthyInstances ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Context !== undefined && input . Context !== null ) { entries [ "Context" ] = input . Context ; } return entries ; } ; const serializeAws_ec2CreateFlowLogsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . DeliverLogsPermissionArn !== undefined && input . DeliverLogsPermissionArn !== null ) { entries [ "DeliverLogsPermissionArn" ] = input . DeliverLogsPermissionArn ; } if ( input . LogGroupName !== undefined && input . LogGroupName !== null ) { entries [ "LogGroupName" ] = input . LogGroupName ; } if ( input . ResourceIds !== undefined && input . ResourceIds !== null ) { const memberEntries = serializeAws_ec2FlowLogResourceIds ( input . ResourceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ResourceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ResourceType !== undefined && input . ResourceType !== null ) { entries [ "ResourceType" ] = input . ResourceType ; } if ( input . TrafficType !== undefined && input . TrafficType !== null ) { entries [ "TrafficType" ] = input . TrafficType ; } if ( input . LogDestinationType !== undefined && input . LogDestinationType !== null ) { entries [ "LogDestinationType" ] = input . LogDestinationType ; } if ( input . LogDestination !== undefined && input . LogDestination !== null ) { entries [ "LogDestination" ] = input . LogDestination ; } if ( input . LogFormat !== undefined && input . LogFormat !== null ) { entries [ "LogFormat" ] = input . LogFormat ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxAggregationInterval !== undefined && input . MaxAggregationInterval !== null ) { entries [ "MaxAggregationInterval" ] = input . MaxAggregationInterval ; } if ( input . DestinationOptions !== undefined && input . DestinationOptions !== null ) { const memberEntries = serializeAws_ec2DestinationOptionsRequest ( input . DestinationOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DestinationOptions.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateFpgaImageRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InputStorageLocation !== undefined && input . InputStorageLocation !== null ) { const memberEntries = serializeAws_ec2StorageLocation ( input . InputStorageLocation , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InputStorageLocation.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . LogsStorageLocation !== undefined && input . LogsStorageLocation !== null ) { const memberEntries = serializeAws_ec2StorageLocation ( input . LogsStorageLocation , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LogsStorageLocation.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateImageRequest = ( input , context ) : any => { const entries = { } ; if ( input . BlockDeviceMappings !== undefined && input . BlockDeviceMappings !== null ) { const memberEntries = serializeAws_ec2BlockDeviceMappingRequestList ( input . BlockDeviceMappings , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `BlockDeviceMapping.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } if ( input . NoReboot !== undefined && input . NoReboot !== null ) { entries [ "NoReboot" ] = input . NoReboot ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateInstanceEventWindowRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } if ( input . TimeRanges !== undefined && input . TimeRanges !== null ) { const memberEntries = serializeAws_ec2InstanceEventWindowTimeRangeRequestSet ( input . TimeRanges , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TimeRange.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . CronExpression !== undefined && input . CronExpression !== null ) { entries [ "CronExpression" ] = input . CronExpression ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateInstanceExportTaskRequest = ( input , context ) : any => { const entries = { } ; if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . ExportToS3Task !== undefined && input . ExportToS3Task !== null ) { const memberEntries = serializeAws_ec2ExportToS3TaskSpecification ( input . ExportToS3Task , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ExportToS3.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . TargetEnvironment !== undefined && input . TargetEnvironment !== null ) { entries [ "TargetEnvironment" ] = input . TargetEnvironment ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateInternetGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateIpamPoolRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . IpamScopeId !== undefined && input . IpamScopeId !== null ) { entries [ "IpamScopeId" ] = input . IpamScopeId ; } if ( input . Locale !== undefined && input . Locale !== null ) { entries [ "Locale" ] = input . Locale ; } if ( input . SourceIpamPoolId !== undefined && input . SourceIpamPoolId !== null ) { entries [ "SourceIpamPoolId" ] = input . SourceIpamPoolId ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . AddressFamily !== undefined && input . AddressFamily !== null ) { entries [ "AddressFamily" ] = input . AddressFamily ; } if ( input . AutoImport !== undefined && input . AutoImport !== null ) { entries [ "AutoImport" ] = input . AutoImport ; } if ( input . PubliclyAdvertisable !== undefined && input . PubliclyAdvertisable !== null ) { entries [ "PubliclyAdvertisable" ] = input . PubliclyAdvertisable ; } if ( input . AllocationMinNetmaskLength !== undefined && input . AllocationMinNetmaskLength !== null ) { entries [ "AllocationMinNetmaskLength" ] = input . AllocationMinNetmaskLength ; } if ( input . AllocationMaxNetmaskLength !== undefined && input . AllocationMaxNetmaskLength !== null ) { entries [ "AllocationMaxNetmaskLength" ] = input . AllocationMaxNetmaskLength ; } if ( input . AllocationDefaultNetmaskLength !== undefined && input . AllocationDefaultNetmaskLength !== null ) { entries [ "AllocationDefaultNetmaskLength" ] = input . AllocationDefaultNetmaskLength ; } if ( input . AllocationResourceTags !== undefined && input . AllocationResourceTags !== null ) { const memberEntries = serializeAws_ec2RequestIpamResourceTagList ( input . AllocationResourceTags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AllocationResourceTag.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . AwsService !== undefined && input . AwsService !== null ) { entries [ "AwsService" ] = input . AwsService ; } return entries ; } ; const serializeAws_ec2CreateIpamRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . OperatingRegions !== undefined && input . OperatingRegions !== null ) { const memberEntries = serializeAws_ec2AddIpamOperatingRegionSet ( input . OperatingRegions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `OperatingRegion.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } return entries ; } ; const serializeAws_ec2CreateIpamScopeRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . IpamId !== undefined && input . IpamId !== null ) { entries [ "IpamId" ] = input . IpamId ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } return entries ; } ; const serializeAws_ec2CreateKeyPairRequest = ( input , context ) : any => { const entries = { } ; if ( input . KeyName !== undefined && input . KeyName !== null ) { entries [ "KeyName" ] = input . KeyName ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . KeyType !== undefined && input . KeyType !== null ) { entries [ "KeyType" ] = input . KeyType ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateLaunchTemplateRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . LaunchTemplateName !== undefined && input . LaunchTemplateName !== null ) { entries [ "LaunchTemplateName" ] = input . LaunchTemplateName ; } if ( input . VersionDescription !== undefined && input . VersionDescription !== null ) { entries [ "VersionDescription" ] = input . VersionDescription ; } if ( input . LaunchTemplateData !== undefined && input . LaunchTemplateData !== null ) { const memberEntries = serializeAws_ec2RequestLaunchTemplateData ( input . LaunchTemplateData , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchTemplateData.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateLaunchTemplateVersionRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . LaunchTemplateId !== undefined && input . LaunchTemplateId !== null ) { entries [ "LaunchTemplateId" ] = input . LaunchTemplateId ; } if ( input . LaunchTemplateName !== undefined && input . LaunchTemplateName !== null ) { entries [ "LaunchTemplateName" ] = input . LaunchTemplateName ; } if ( input . SourceVersion !== undefined && input . SourceVersion !== null ) { entries [ "SourceVersion" ] = input . SourceVersion ; } if ( input . VersionDescription !== undefined && input . VersionDescription !== null ) { entries [ "VersionDescription" ] = input . VersionDescription ; } if ( input . LaunchTemplateData !== undefined && input . LaunchTemplateData !== null ) { const memberEntries = serializeAws_ec2RequestLaunchTemplateData ( input . LaunchTemplateData , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchTemplateData.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateLocalGatewayRouteRequest = ( input , context ) : any => { const entries = { } ; if ( input . DestinationCidrBlock !== undefined && input . DestinationCidrBlock !== null ) { entries [ "DestinationCidrBlock" ] = input . DestinationCidrBlock ; } if ( input . LocalGatewayRouteTableId !== undefined && input . LocalGatewayRouteTableId !== null ) { entries [ "LocalGatewayRouteTableId" ] = input . LocalGatewayRouteTableId ; } if ( input . LocalGatewayVirtualInterfaceGroupId !== undefined && input . LocalGatewayVirtualInterfaceGroupId !== null ) { entries [ "LocalGatewayVirtualInterfaceGroupId" ] = input . LocalGatewayVirtualInterfaceGroupId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateLocalGatewayRouteTableVpcAssociationRequest = ( input , context ) : any => { const entries = { } ; if ( input . LocalGatewayRouteTableId !== undefined && input . LocalGatewayRouteTableId !== null ) { entries [ "LocalGatewayRouteTableId" ] = input . LocalGatewayRouteTableId ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateManagedPrefixListRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . PrefixListName !== undefined && input . PrefixListName !== null ) { entries [ "PrefixListName" ] = input . PrefixListName ; } if ( input . Entries !== undefined && input . Entries !== null ) { const memberEntries = serializeAws_ec2AddPrefixListEntries ( input . Entries , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Entry.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxEntries !== undefined && input . MaxEntries !== null ) { entries [ "MaxEntries" ] = input . MaxEntries ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AddressFamily !== undefined && input . AddressFamily !== null ) { entries [ "AddressFamily" ] = input . AddressFamily ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } return entries ; } ; const serializeAws_ec2CreateNatGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . AllocationId !== undefined && input . AllocationId !== null ) { entries [ "AllocationId" ] = input . AllocationId ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ConnectivityType !== undefined && input . ConnectivityType !== null ) { entries [ "ConnectivityType" ] = input . ConnectivityType ; } return entries ; } ; const serializeAws_ec2CreateNetworkAclEntryRequest = ( input , context ) : any => { const entries = { } ; if ( input . CidrBlock !== undefined && input . CidrBlock !== null ) { entries [ "CidrBlock" ] = input . CidrBlock ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Egress !== undefined && input . Egress !== null ) { entries [ "Egress" ] = input . Egress ; } if ( input . IcmpTypeCode !== undefined && input . IcmpTypeCode !== null ) { const memberEntries = serializeAws_ec2IcmpTypeCode ( input . IcmpTypeCode , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Icmp.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Ipv6CidrBlock !== undefined && input . Ipv6CidrBlock !== null ) { entries [ "Ipv6CidrBlock" ] = input . Ipv6CidrBlock ; } if ( input . NetworkAclId !== undefined && input . NetworkAclId !== null ) { entries [ "NetworkAclId" ] = input . NetworkAclId ; } if ( input . PortRange !== undefined && input . PortRange !== null ) { const memberEntries = serializeAws_ec2PortRange ( input . PortRange , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PortRange.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Protocol !== undefined && input . Protocol !== null ) { entries [ "Protocol" ] = input . Protocol ; } if ( input . RuleAction !== undefined && input . RuleAction !== null ) { entries [ "RuleAction" ] = input . RuleAction ; } if ( input . RuleNumber !== undefined && input . RuleNumber !== null ) { entries [ "RuleNumber" ] = input . RuleNumber ; } return entries ; } ; const serializeAws_ec2CreateNetworkAclRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateNetworkInsightsAccessScopeRequest = ( input , context ) : any => { const entries = { } ; if ( input . MatchPaths !== undefined && input . MatchPaths !== null ) { const memberEntries = serializeAws_ec2AccessScopePathListRequest ( input . MatchPaths , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `MatchPath.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ExcludePaths !== undefined && input . ExcludePaths !== null ) { const memberEntries = serializeAws_ec2AccessScopePathListRequest ( input . ExcludePaths , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ExcludePath.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateNetworkInsightsPathRequest = ( input , context ) : any => { const entries = { } ; if ( input . SourceIp !== undefined && input . SourceIp !== null ) { entries [ "SourceIp" ] = input . SourceIp ; } if ( input . DestinationIp !== undefined && input . DestinationIp !== null ) { entries [ "DestinationIp" ] = input . DestinationIp ; } if ( input . Source !== undefined && input . Source !== null ) { entries [ "Source" ] = input . Source ; } if ( input . Destination !== undefined && input . Destination !== null ) { entries [ "Destination" ] = input . Destination ; } if ( input . Protocol !== undefined && input . Protocol !== null ) { entries [ "Protocol" ] = input . Protocol ; } if ( input . DestinationPort !== undefined && input . DestinationPort !== null ) { entries [ "DestinationPort" ] = input . DestinationPort ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } return entries ; } ; const serializeAws_ec2CreateNetworkInterfacePermissionRequest = ( input , context ) : any => { const entries = { } ; if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } if ( input . AwsAccountId !== undefined && input . AwsAccountId !== null ) { entries [ "AwsAccountId" ] = input . AwsAccountId ; } if ( input . AwsService !== undefined && input . AwsService !== null ) { entries [ "AwsService" ] = input . AwsService ; } if ( input . Permission !== undefined && input . Permission !== null ) { entries [ "Permission" ] = input . Permission ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateNetworkInterfaceRequest = ( input , context ) : any => { const entries = { } ; if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Groups !== undefined && input . Groups !== null ) { const memberEntries = serializeAws_ec2SecurityGroupIdStringList ( input . Groups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Ipv6AddressCount !== undefined && input . Ipv6AddressCount !== null ) { entries [ "Ipv6AddressCount" ] = input . Ipv6AddressCount ; } if ( input . Ipv6Addresses !== undefined && input . Ipv6Addresses !== null ) { const memberEntries = serializeAws_ec2InstanceIpv6AddressList ( input . Ipv6Addresses , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv6Addresses.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . PrivateIpAddress !== undefined && input . PrivateIpAddress !== null ) { entries [ "PrivateIpAddress" ] = input . PrivateIpAddress ; } if ( input . PrivateIpAddresses !== undefined && input . PrivateIpAddresses !== null ) { const memberEntries = serializeAws_ec2PrivateIpAddressSpecificationList ( input . PrivateIpAddresses , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PrivateIpAddresses.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SecondaryPrivateIpAddressCount !== undefined && input . SecondaryPrivateIpAddressCount !== null ) { entries [ "SecondaryPrivateIpAddressCount" ] = input . SecondaryPrivateIpAddressCount ; } if ( input . Ipv4Prefixes !== undefined && input . Ipv4Prefixes !== null ) { const memberEntries = serializeAws_ec2Ipv4PrefixList ( input . Ipv4Prefixes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv4Prefix.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Ipv4PrefixCount !== undefined && input . Ipv4PrefixCount !== null ) { entries [ "Ipv4PrefixCount" ] = input . Ipv4PrefixCount ; } if ( input . Ipv6Prefixes !== undefined && input . Ipv6Prefixes !== null ) { const memberEntries = serializeAws_ec2Ipv6PrefixList ( input . Ipv6Prefixes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv6Prefix.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Ipv6PrefixCount !== undefined && input . Ipv6PrefixCount !== null ) { entries [ "Ipv6PrefixCount" ] = input . Ipv6PrefixCount ; } if ( input . InterfaceType !== undefined && input . InterfaceType !== null ) { entries [ "InterfaceType" ] = input . InterfaceType ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } return entries ; } ; const serializeAws_ec2CreatePlacementGroupRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . GroupName !== undefined && input . GroupName !== null ) { entries [ "GroupName" ] = input . GroupName ; } if ( input . Strategy !== undefined && input . Strategy !== null ) { entries [ "Strategy" ] = input . Strategy ; } if ( input . PartitionCount !== undefined && input . PartitionCount !== null ) { entries [ "PartitionCount" ] = input . PartitionCount ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreatePublicIpv4PoolRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateReplaceRootVolumeTaskRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . SnapshotId !== undefined && input . SnapshotId !== null ) { entries [ "SnapshotId" ] = input . SnapshotId ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateReservedInstancesListingRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . InstanceCount !== undefined && input . InstanceCount !== null ) { entries [ "InstanceCount" ] = input . InstanceCount ; } if ( input . PriceSchedules !== undefined && input . PriceSchedules !== null ) { const memberEntries = serializeAws_ec2PriceScheduleSpecificationList ( input . PriceSchedules , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PriceSchedules.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ReservedInstancesId !== undefined && input . ReservedInstancesId !== null ) { entries [ "ReservedInstancesId" ] = input . ReservedInstancesId ; } return entries ; } ; const serializeAws_ec2CreateRestoreImageTaskRequest = ( input , context ) : any => { const entries = { } ; if ( input . Bucket !== undefined && input . Bucket !== null ) { entries [ "Bucket" ] = input . Bucket ; } if ( input . ObjectKey !== undefined && input . ObjectKey !== null ) { entries [ "ObjectKey" ] = input . ObjectKey ; } if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateRouteRequest = ( input , context ) : any => { const entries = { } ; if ( input . DestinationCidrBlock !== undefined && input . DestinationCidrBlock !== null ) { entries [ "DestinationCidrBlock" ] = input . DestinationCidrBlock ; } if ( input . DestinationIpv6CidrBlock !== undefined && input . DestinationIpv6CidrBlock !== null ) { entries [ "DestinationIpv6CidrBlock" ] = input . DestinationIpv6CidrBlock ; } if ( input . DestinationPrefixListId !== undefined && input . DestinationPrefixListId !== null ) { entries [ "DestinationPrefixListId" ] = input . DestinationPrefixListId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VpcEndpointId !== undefined && input . VpcEndpointId !== null ) { entries [ "VpcEndpointId" ] = input . VpcEndpointId ; } if ( input . EgressOnlyInternetGatewayId !== undefined && input . EgressOnlyInternetGatewayId !== null ) { entries [ "EgressOnlyInternetGatewayId" ] = input . EgressOnlyInternetGatewayId ; } if ( input . GatewayId !== undefined && input . GatewayId !== null ) { entries [ "GatewayId" ] = input . GatewayId ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . NatGatewayId !== undefined && input . NatGatewayId !== null ) { entries [ "NatGatewayId" ] = input . NatGatewayId ; } if ( input . TransitGatewayId !== undefined && input . TransitGatewayId !== null ) { entries [ "TransitGatewayId" ] = input . TransitGatewayId ; } if ( input . LocalGatewayId !== undefined && input . LocalGatewayId !== null ) { entries [ "LocalGatewayId" ] = input . LocalGatewayId ; } if ( input . CarrierGatewayId !== undefined && input . CarrierGatewayId !== null ) { entries [ "CarrierGatewayId" ] = input . CarrierGatewayId ; } if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } if ( input . RouteTableId !== undefined && input . RouteTableId !== null ) { entries [ "RouteTableId" ] = input . RouteTableId ; } if ( input . VpcPeeringConnectionId !== undefined && input . VpcPeeringConnectionId !== null ) { entries [ "VpcPeeringConnectionId" ] = input . VpcPeeringConnectionId ; } if ( input . CoreNetworkArn !== undefined && input . CoreNetworkArn !== null ) { entries [ "CoreNetworkArn" ] = input . CoreNetworkArn ; } return entries ; } ; const serializeAws_ec2CreateRouteTableRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateSecurityGroupRequest = ( input , context ) : any => { const entries = { } ; if ( input . Description !== undefined && input . Description !== null ) { entries [ "GroupDescription" ] = input . Description ; } if ( input . GroupName !== undefined && input . GroupName !== null ) { entries [ "GroupName" ] = input . GroupName ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateSnapshotRequest = ( input , context ) : any => { const entries = { } ; if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . OutpostArn !== undefined && input . OutpostArn !== null ) { entries [ "OutpostArn" ] = input . OutpostArn ; } if ( input . VolumeId !== undefined && input . VolumeId !== null ) { entries [ "VolumeId" ] = input . VolumeId ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateSnapshotsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . InstanceSpecification !== undefined && input . InstanceSpecification !== null ) { const memberEntries = serializeAws_ec2InstanceSpecification ( input . InstanceSpecification , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceSpecification.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . OutpostArn !== undefined && input . OutpostArn !== null ) { entries [ "OutpostArn" ] = input . OutpostArn ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . CopyTagsFromSource !== undefined && input . CopyTagsFromSource !== null ) { entries [ "CopyTagsFromSource" ] = input . CopyTagsFromSource ; } return entries ; } ; const serializeAws_ec2CreateSpotDatafeedSubscriptionRequest = ( input , context ) : any => { const entries = { } ; if ( input . Bucket !== undefined && input . Bucket !== null ) { entries [ "Bucket" ] = input . Bucket ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Prefix !== undefined && input . Prefix !== null ) { entries [ "Prefix" ] = input . Prefix ; } return entries ; } ; const serializeAws_ec2CreateStoreImageTaskRequest = ( input , context ) : any => { const entries = { } ; if ( input . ImageId !== undefined && input . ImageId !== null ) { entries [ "ImageId" ] = input . ImageId ; } if ( input . Bucket !== undefined && input . Bucket !== null ) { entries [ "Bucket" ] = input . Bucket ; } if ( input . S3ObjectTags !== undefined && input . S3ObjectTags !== null ) { const memberEntries = serializeAws_ec2S3ObjectTagList ( input . S3ObjectTags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `S3ObjectTag.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateSubnetCidrReservationRequest = ( input , context ) : any => { const entries = { } ; if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . Cidr !== undefined && input . Cidr !== null ) { entries [ "Cidr" ] = input . Cidr ; } if ( input . ReservationType !== undefined && input . ReservationType !== null ) { entries [ "ReservationType" ] = input . ReservationType ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateSubnetRequest = ( input , context ) : any => { const entries = { } ; if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . AvailabilityZoneId !== undefined && input . AvailabilityZoneId !== null ) { entries [ "AvailabilityZoneId" ] = input . AvailabilityZoneId ; } if ( input . CidrBlock !== undefined && input . CidrBlock !== null ) { entries [ "CidrBlock" ] = input . CidrBlock ; } if ( input . Ipv6CidrBlock !== undefined && input . Ipv6CidrBlock !== null ) { entries [ "Ipv6CidrBlock" ] = input . Ipv6CidrBlock ; } if ( input . OutpostArn !== undefined && input . OutpostArn !== null ) { entries [ "OutpostArn" ] = input . OutpostArn ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Ipv6Native !== undefined && input . Ipv6Native !== null ) { entries [ "Ipv6Native" ] = input . Ipv6Native ; } return entries ; } ; const serializeAws_ec2CreateTagsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Resources !== undefined && input . Resources !== null ) { const memberEntries = serializeAws_ec2ResourceIdList ( input . Resources , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ResourceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_ec2TagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tag.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateTrafficMirrorFilterRequest = ( input , context ) : any => { const entries = { } ; if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } return entries ; } ; const serializeAws_ec2CreateTrafficMirrorFilterRuleRequest = ( input , context ) : any => { const entries = { } ; if ( input . TrafficMirrorFilterId !== undefined && input . TrafficMirrorFilterId !== null ) { entries [ "TrafficMirrorFilterId" ] = input . TrafficMirrorFilterId ; } if ( input . TrafficDirection !== undefined && input . TrafficDirection !== null ) { entries [ "TrafficDirection" ] = input . TrafficDirection ; } if ( input . RuleNumber !== undefined && input . RuleNumber !== null ) { entries [ "RuleNumber" ] = input . RuleNumber ; } if ( input . RuleAction !== undefined && input . RuleAction !== null ) { entries [ "RuleAction" ] = input . RuleAction ; } if ( input . DestinationPortRange !== undefined && input . DestinationPortRange !== null ) { const memberEntries = serializeAws_ec2TrafficMirrorPortRangeRequest ( input . DestinationPortRange , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DestinationPortRange.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . SourcePortRange !== undefined && input . SourcePortRange !== null ) { const memberEntries = serializeAws_ec2TrafficMirrorPortRangeRequest ( input . SourcePortRange , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SourcePortRange.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Protocol !== undefined && input . Protocol !== null ) { entries [ "Protocol" ] = input . Protocol ; } if ( input . DestinationCidrBlock !== undefined && input . DestinationCidrBlock !== null ) { entries [ "DestinationCidrBlock" ] = input . DestinationCidrBlock ; } if ( input . SourceCidrBlock !== undefined && input . SourceCidrBlock !== null ) { entries [ "SourceCidrBlock" ] = input . SourceCidrBlock ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } return entries ; } ; const serializeAws_ec2CreateTrafficMirrorSessionRequest = ( input , context ) : any => { const entries = { } ; if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } if ( input . TrafficMirrorTargetId !== undefined && input . TrafficMirrorTargetId !== null ) { entries [ "TrafficMirrorTargetId" ] = input . TrafficMirrorTargetId ; } if ( input . TrafficMirrorFilterId !== undefined && input . TrafficMirrorFilterId !== null ) { entries [ "TrafficMirrorFilterId" ] = input . TrafficMirrorFilterId ; } if ( input . PacketLength !== undefined && input . PacketLength !== null ) { entries [ "PacketLength" ] = input . PacketLength ; } if ( input . SessionNumber !== undefined && input . SessionNumber !== null ) { entries [ "SessionNumber" ] = input . SessionNumber ; } if ( input . VirtualNetworkId !== undefined && input . VirtualNetworkId !== null ) { entries [ "VirtualNetworkId" ] = input . VirtualNetworkId ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } return entries ; } ; const serializeAws_ec2CreateTrafficMirrorTargetRequest = ( input , context ) : any => { const entries = { } ; if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } if ( input . NetworkLoadBalancerArn !== undefined && input . NetworkLoadBalancerArn !== null ) { entries [ "NetworkLoadBalancerArn" ] = input . NetworkLoadBalancerArn ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } return entries ; } ; const serializeAws_ec2CreateTransitGatewayConnectPeerRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . TransitGatewayAddress !== undefined && input . TransitGatewayAddress !== null ) { entries [ "TransitGatewayAddress" ] = input . TransitGatewayAddress ; } if ( input . PeerAddress !== undefined && input . PeerAddress !== null ) { entries [ "PeerAddress" ] = input . PeerAddress ; } if ( input . BgpOptions !== undefined && input . BgpOptions !== null ) { const memberEntries = serializeAws_ec2TransitGatewayConnectRequestBgpOptions ( input . BgpOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `BgpOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . InsideCidrBlocks !== undefined && input . InsideCidrBlocks !== null ) { const memberEntries = serializeAws_ec2InsideCidrBlocksStringList ( input . InsideCidrBlocks , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InsideCidrBlocks.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateTransitGatewayConnectRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransportTransitGatewayAttachmentId !== undefined && input . TransportTransitGatewayAttachmentId !== null ) { entries [ "TransportTransitGatewayAttachmentId" ] = input . TransportTransitGatewayAttachmentId ; } if ( input . Options !== undefined && input . Options !== null ) { const memberEntries = serializeAws_ec2CreateTransitGatewayConnectRequestOptions ( input . Options , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Options.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateTransitGatewayConnectRequestOptions = ( input , context ) : any => { const entries = { } ; if ( input . Protocol !== undefined && input . Protocol !== null ) { entries [ "Protocol" ] = input . Protocol ; } return entries ; } ; const serializeAws_ec2CreateTransitGatewayMulticastDomainRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayId !== undefined && input . TransitGatewayId !== null ) { entries [ "TransitGatewayId" ] = input . TransitGatewayId ; } if ( input . Options !== undefined && input . Options !== null ) { const memberEntries = serializeAws_ec2CreateTransitGatewayMulticastDomainRequestOptions ( input . Options , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Options.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateTransitGatewayMulticastDomainRequestOptions = ( input , context ) : any => { const entries = { } ; if ( input . Igmpv2Support !== undefined && input . Igmpv2Support !== null ) { entries [ "Igmpv2Support" ] = input . Igmpv2Support ; } if ( input . StaticSourcesSupport !== undefined && input . StaticSourcesSupport !== null ) { entries [ "StaticSourcesSupport" ] = input . StaticSourcesSupport ; } if ( input . AutoAcceptSharedAssociations !== undefined && input . AutoAcceptSharedAssociations !== null ) { entries [ "AutoAcceptSharedAssociations" ] = input . AutoAcceptSharedAssociations ; } return entries ; } ; const serializeAws_ec2CreateTransitGatewayPeeringAttachmentRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayId !== undefined && input . TransitGatewayId !== null ) { entries [ "TransitGatewayId" ] = input . TransitGatewayId ; } if ( input . PeerTransitGatewayId !== undefined && input . PeerTransitGatewayId !== null ) { entries [ "PeerTransitGatewayId" ] = input . PeerTransitGatewayId ; } if ( input . PeerAccountId !== undefined && input . PeerAccountId !== null ) { entries [ "PeerAccountId" ] = input . PeerAccountId ; } if ( input . PeerRegion !== undefined && input . PeerRegion !== null ) { entries [ "PeerRegion" ] = input . PeerRegion ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateTransitGatewayPrefixListReferenceRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayRouteTableId !== undefined && input . TransitGatewayRouteTableId !== null ) { entries [ "TransitGatewayRouteTableId" ] = input . TransitGatewayRouteTableId ; } if ( input . PrefixListId !== undefined && input . PrefixListId !== null ) { entries [ "PrefixListId" ] = input . PrefixListId ; } if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . Blackhole !== undefined && input . Blackhole !== null ) { entries [ "Blackhole" ] = input . Blackhole ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateTransitGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . Options !== undefined && input . Options !== null ) { const memberEntries = serializeAws_ec2TransitGatewayRequestOptions ( input . Options , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Options.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateTransitGatewayRouteRequest = ( input , context ) : any => { const entries = { } ; if ( input . DestinationCidrBlock !== undefined && input . DestinationCidrBlock !== null ) { entries [ "DestinationCidrBlock" ] = input . DestinationCidrBlock ; } if ( input . TransitGatewayRouteTableId !== undefined && input . TransitGatewayRouteTableId !== null ) { entries [ "TransitGatewayRouteTableId" ] = input . TransitGatewayRouteTableId ; } if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . Blackhole !== undefined && input . Blackhole !== null ) { entries [ "Blackhole" ] = input . Blackhole ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateTransitGatewayRouteTableRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayId !== undefined && input . TransitGatewayId !== null ) { entries [ "TransitGatewayId" ] = input . TransitGatewayId ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecifications.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateTransitGatewayVpcAttachmentRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayId !== undefined && input . TransitGatewayId !== null ) { entries [ "TransitGatewayId" ] = input . TransitGatewayId ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . SubnetIds !== undefined && input . SubnetIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewaySubnetIdList ( input . SubnetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SubnetIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Options !== undefined && input . Options !== null ) { const memberEntries = serializeAws_ec2CreateTransitGatewayVpcAttachmentRequestOptions ( input . Options , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Options.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecifications.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreateTransitGatewayVpcAttachmentRequestOptions = ( input , context ) : any => { const entries = { } ; if ( input . DnsSupport !== undefined && input . DnsSupport !== null ) { entries [ "DnsSupport" ] = input . DnsSupport ; } if ( input . Ipv6Support !== undefined && input . Ipv6Support !== null ) { entries [ "Ipv6Support" ] = input . Ipv6Support ; } if ( input . ApplianceModeSupport !== undefined && input . ApplianceModeSupport !== null ) { entries [ "ApplianceModeSupport" ] = input . ApplianceModeSupport ; } return entries ; } ; const serializeAws_ec2CreateVolumePermission = ( input , context ) : any => { const entries = { } ; if ( input . Group !== undefined && input . Group !== null ) { entries [ "Group" ] = input . Group ; } if ( input . UserId !== undefined && input . UserId !== null ) { entries [ "UserId" ] = input . UserId ; } return entries ; } ; const serializeAws_ec2CreateVolumePermissionList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2CreateVolumePermission ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2CreateVolumePermissionModifications = ( input , context ) : any => { const entries = { } ; if ( input . Add !== undefined && input . Add !== null ) { const memberEntries = serializeAws_ec2CreateVolumePermissionList ( input . Add , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Add.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Remove !== undefined && input . Remove !== null ) { const memberEntries = serializeAws_ec2CreateVolumePermissionList ( input . Remove , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Remove.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateVolumeRequest = ( input , context ) : any => { const entries = { } ; if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . Encrypted !== undefined && input . Encrypted !== null ) { entries [ "Encrypted" ] = input . Encrypted ; } if ( input . Iops !== undefined && input . Iops !== null ) { entries [ "Iops" ] = input . Iops ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . OutpostArn !== undefined && input . OutpostArn !== null ) { entries [ "OutpostArn" ] = input . OutpostArn ; } if ( input . Size !== undefined && input . Size !== null ) { entries [ "Size" ] = input . Size ; } if ( input . SnapshotId !== undefined && input . SnapshotId !== null ) { entries [ "SnapshotId" ] = input . SnapshotId ; } if ( input . VolumeType !== undefined && input . VolumeType !== null ) { entries [ "VolumeType" ] = input . VolumeType ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MultiAttachEnabled !== undefined && input . MultiAttachEnabled !== null ) { entries [ "MultiAttachEnabled" ] = input . MultiAttachEnabled ; } if ( input . Throughput !== undefined && input . Throughput !== null ) { entries [ "Throughput" ] = input . Throughput ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } return entries ; } ; const serializeAws_ec2CreateVpcEndpointConnectionNotificationRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ServiceId !== undefined && input . ServiceId !== null ) { entries [ "ServiceId" ] = input . ServiceId ; } if ( input . VpcEndpointId !== undefined && input . VpcEndpointId !== null ) { entries [ "VpcEndpointId" ] = input . VpcEndpointId ; } if ( input . ConnectionNotificationArn !== undefined && input . ConnectionNotificationArn !== null ) { entries [ "ConnectionNotificationArn" ] = input . ConnectionNotificationArn ; } if ( input . ConnectionEvents !== undefined && input . ConnectionEvents !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . ConnectionEvents , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ConnectionEvents.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } return entries ; } ; const serializeAws_ec2CreateVpcEndpointRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VpcEndpointType !== undefined && input . VpcEndpointType !== null ) { entries [ "VpcEndpointType" ] = input . VpcEndpointType ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . ServiceName !== undefined && input . ServiceName !== null ) { entries [ "ServiceName" ] = input . ServiceName ; } if ( input . PolicyDocument !== undefined && input . PolicyDocument !== null ) { entries [ "PolicyDocument" ] = input . PolicyDocument ; } if ( input . RouteTableIds !== undefined && input . RouteTableIds !== null ) { const memberEntries = serializeAws_ec2VpcEndpointRouteTableIdList ( input . RouteTableIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RouteTableId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SubnetIds !== undefined && input . SubnetIds !== null ) { const memberEntries = serializeAws_ec2VpcEndpointSubnetIdList ( input . SubnetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SubnetId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SecurityGroupIds !== undefined && input . SecurityGroupIds !== null ) { const memberEntries = serializeAws_ec2VpcEndpointSecurityGroupIdList ( input . SecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . PrivateDnsEnabled !== undefined && input . PrivateDnsEnabled !== null ) { entries [ "PrivateDnsEnabled" ] = input . PrivateDnsEnabled ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateVpcEndpointServiceConfigurationRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . AcceptanceRequired !== undefined && input . AcceptanceRequired !== null ) { entries [ "AcceptanceRequired" ] = input . AcceptanceRequired ; } if ( input . PrivateDnsName !== undefined && input . PrivateDnsName !== null ) { entries [ "PrivateDnsName" ] = input . PrivateDnsName ; } if ( input . NetworkLoadBalancerArns !== undefined && input . NetworkLoadBalancerArns !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . NetworkLoadBalancerArns , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkLoadBalancerArn.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . GatewayLoadBalancerArns !== undefined && input . GatewayLoadBalancerArns !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . GatewayLoadBalancerArns , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `GatewayLoadBalancerArn.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateVpcPeeringConnectionRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . PeerOwnerId !== undefined && input . PeerOwnerId !== null ) { entries [ "PeerOwnerId" ] = input . PeerOwnerId ; } if ( input . PeerVpcId !== undefined && input . PeerVpcId !== null ) { entries [ "PeerVpcId" ] = input . PeerVpcId ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . PeerRegion !== undefined && input . PeerRegion !== null ) { entries [ "PeerRegion" ] = input . PeerRegion ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateVpcRequest = ( input , context ) : any => { const entries = { } ; if ( input . CidrBlock !== undefined && input . CidrBlock !== null ) { entries [ "CidrBlock" ] = input . CidrBlock ; } if ( input . AmazonProvidedIpv6CidrBlock !== undefined && input . AmazonProvidedIpv6CidrBlock !== null ) { entries [ "AmazonProvidedIpv6CidrBlock" ] = input . AmazonProvidedIpv6CidrBlock ; } if ( input . Ipv6Pool !== undefined && input . Ipv6Pool !== null ) { entries [ "Ipv6Pool" ] = input . Ipv6Pool ; } if ( input . Ipv6CidrBlock !== undefined && input . Ipv6CidrBlock !== null ) { entries [ "Ipv6CidrBlock" ] = input . Ipv6CidrBlock ; } if ( input . Ipv4IpamPoolId !== undefined && input . Ipv4IpamPoolId !== null ) { entries [ "Ipv4IpamPoolId" ] = input . Ipv4IpamPoolId ; } if ( input . Ipv4NetmaskLength !== undefined && input . Ipv4NetmaskLength !== null ) { entries [ "Ipv4NetmaskLength" ] = input . Ipv4NetmaskLength ; } if ( input . Ipv6IpamPoolId !== undefined && input . Ipv6IpamPoolId !== null ) { entries [ "Ipv6IpamPoolId" ] = input . Ipv6IpamPoolId ; } if ( input . Ipv6NetmaskLength !== undefined && input . Ipv6NetmaskLength !== null ) { entries [ "Ipv6NetmaskLength" ] = input . Ipv6NetmaskLength ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceTenancy !== undefined && input . InstanceTenancy !== null ) { entries [ "InstanceTenancy" ] = input . InstanceTenancy ; } if ( input . Ipv6CidrBlockNetworkBorderGroup !== undefined && input . Ipv6CidrBlockNetworkBorderGroup !== null ) { entries [ "Ipv6CidrBlockNetworkBorderGroup" ] = input . Ipv6CidrBlockNetworkBorderGroup ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateVpnConnectionRequest = ( input , context ) : any => { const entries = { } ; if ( input . CustomerGatewayId !== undefined && input . CustomerGatewayId !== null ) { entries [ "CustomerGatewayId" ] = input . CustomerGatewayId ; } if ( input . Type !== undefined && input . Type !== null ) { entries [ "Type" ] = input . Type ; } if ( input . VpnGatewayId !== undefined && input . VpnGatewayId !== null ) { entries [ "VpnGatewayId" ] = input . VpnGatewayId ; } if ( input . TransitGatewayId !== undefined && input . TransitGatewayId !== null ) { entries [ "TransitGatewayId" ] = input . TransitGatewayId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Options !== undefined && input . Options !== null ) { const memberEntries = serializeAws_ec2VpnConnectionOptionsSpecification ( input . Options , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Options.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2CreateVpnConnectionRouteRequest = ( input , context ) : any => { const entries = { } ; if ( input . DestinationCidrBlock !== undefined && input . DestinationCidrBlock !== null ) { entries [ "DestinationCidrBlock" ] = input . DestinationCidrBlock ; } if ( input . VpnConnectionId !== undefined && input . VpnConnectionId !== null ) { entries [ "VpnConnectionId" ] = input . VpnConnectionId ; } return entries ; } ; const serializeAws_ec2CreateVpnGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . Type !== undefined && input . Type !== null ) { entries [ "Type" ] = input . Type ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AmazonSideAsn !== undefined && input . AmazonSideAsn !== null ) { entries [ "AmazonSideAsn" ] = input . AmazonSideAsn ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2CreditSpecificationRequest = ( input , context ) : any => { const entries = { } ; if ( input . CpuCredits !== undefined && input . CpuCredits !== null ) { entries [ "CpuCredits" ] = input . CpuCredits ; } return entries ; } ; const serializeAws_ec2CustomerGatewayIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `CustomerGatewayId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2DedicatedHostIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2DeleteCarrierGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . CarrierGatewayId !== undefined && input . CarrierGatewayId !== null ) { entries [ "CarrierGatewayId" ] = input . CarrierGatewayId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteClientVpnEndpointRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteClientVpnRouteRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . TargetVpcSubnetId !== undefined && input . TargetVpcSubnetId !== null ) { entries [ "TargetVpcSubnetId" ] = input . TargetVpcSubnetId ; } if ( input . DestinationCidrBlock !== undefined && input . DestinationCidrBlock !== null ) { entries [ "DestinationCidrBlock" ] = input . DestinationCidrBlock ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteCustomerGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . CustomerGatewayId !== undefined && input . CustomerGatewayId !== null ) { entries [ "CustomerGatewayId" ] = input . CustomerGatewayId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteDhcpOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DhcpOptionsId !== undefined && input . DhcpOptionsId !== null ) { entries [ "DhcpOptionsId" ] = input . DhcpOptionsId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteEgressOnlyInternetGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . EgressOnlyInternetGatewayId !== undefined && input . EgressOnlyInternetGatewayId !== null ) { entries [ "EgressOnlyInternetGatewayId" ] = input . EgressOnlyInternetGatewayId ; } return entries ; } ; const serializeAws_ec2DeleteFleetsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . FleetIds !== undefined && input . FleetIds !== null ) { const memberEntries = serializeAws_ec2FleetIdSet ( input . FleetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `FleetId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . TerminateInstances !== undefined && input . TerminateInstances !== null ) { entries [ "TerminateInstances" ] = input . TerminateInstances ; } return entries ; } ; const serializeAws_ec2DeleteFlowLogsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . FlowLogIds !== undefined && input . FlowLogIds !== null ) { const memberEntries = serializeAws_ec2FlowLogIdList ( input . FlowLogIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `FlowLogId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DeleteFpgaImageRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . FpgaImageId !== undefined && input . FpgaImageId !== null ) { entries [ "FpgaImageId" ] = input . FpgaImageId ; } return entries ; } ; const serializeAws_ec2DeleteInstanceEventWindowRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ForceDelete !== undefined && input . ForceDelete !== null ) { entries [ "ForceDelete" ] = input . ForceDelete ; } if ( input . InstanceEventWindowId !== undefined && input . InstanceEventWindowId !== null ) { entries [ "InstanceEventWindowId" ] = input . InstanceEventWindowId ; } return entries ; } ; const serializeAws_ec2DeleteInternetGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InternetGatewayId !== undefined && input . InternetGatewayId !== null ) { entries [ "InternetGatewayId" ] = input . InternetGatewayId ; } return entries ; } ; const serializeAws_ec2DeleteIpamPoolRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . IpamPoolId !== undefined && input . IpamPoolId !== null ) { entries [ "IpamPoolId" ] = input . IpamPoolId ; } return entries ; } ; const serializeAws_ec2DeleteIpamRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . IpamId !== undefined && input . IpamId !== null ) { entries [ "IpamId" ] = input . IpamId ; } return entries ; } ; const serializeAws_ec2DeleteIpamScopeRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . IpamScopeId !== undefined && input . IpamScopeId !== null ) { entries [ "IpamScopeId" ] = input . IpamScopeId ; } return entries ; } ; const serializeAws_ec2DeleteKeyPairRequest = ( input , context ) : any => { const entries = { } ; if ( input . KeyName !== undefined && input . KeyName !== null ) { entries [ "KeyName" ] = input . KeyName ; } if ( input . KeyPairId !== undefined && input . KeyPairId !== null ) { entries [ "KeyPairId" ] = input . KeyPairId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteLaunchTemplateRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . LaunchTemplateId !== undefined && input . LaunchTemplateId !== null ) { entries [ "LaunchTemplateId" ] = input . LaunchTemplateId ; } if ( input . LaunchTemplateName !== undefined && input . LaunchTemplateName !== null ) { entries [ "LaunchTemplateName" ] = input . LaunchTemplateName ; } return entries ; } ; const serializeAws_ec2DeleteLaunchTemplateVersionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . LaunchTemplateId !== undefined && input . LaunchTemplateId !== null ) { entries [ "LaunchTemplateId" ] = input . LaunchTemplateId ; } if ( input . LaunchTemplateName !== undefined && input . LaunchTemplateName !== null ) { entries [ "LaunchTemplateName" ] = input . LaunchTemplateName ; } if ( input . Versions !== undefined && input . Versions !== null ) { const memberEntries = serializeAws_ec2VersionStringList ( input . Versions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchTemplateVersion.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DeleteLocalGatewayRouteRequest = ( input , context ) : any => { const entries = { } ; if ( input . DestinationCidrBlock !== undefined && input . DestinationCidrBlock !== null ) { entries [ "DestinationCidrBlock" ] = input . DestinationCidrBlock ; } if ( input . LocalGatewayRouteTableId !== undefined && input . LocalGatewayRouteTableId !== null ) { entries [ "LocalGatewayRouteTableId" ] = input . LocalGatewayRouteTableId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteLocalGatewayRouteTableVpcAssociationRequest = ( input , context ) : any => { const entries = { } ; if ( input . LocalGatewayRouteTableVpcAssociationId !== undefined && input . LocalGatewayRouteTableVpcAssociationId !== null ) { entries [ "LocalGatewayRouteTableVpcAssociationId" ] = input . LocalGatewayRouteTableVpcAssociationId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteManagedPrefixListRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . PrefixListId !== undefined && input . PrefixListId !== null ) { entries [ "PrefixListId" ] = input . PrefixListId ; } return entries ; } ; const serializeAws_ec2DeleteNatGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NatGatewayId !== undefined && input . NatGatewayId !== null ) { entries [ "NatGatewayId" ] = input . NatGatewayId ; } return entries ; } ; const serializeAws_ec2DeleteNetworkAclEntryRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Egress !== undefined && input . Egress !== null ) { entries [ "Egress" ] = input . Egress ; } if ( input . NetworkAclId !== undefined && input . NetworkAclId !== null ) { entries [ "NetworkAclId" ] = input . NetworkAclId ; } if ( input . RuleNumber !== undefined && input . RuleNumber !== null ) { entries [ "RuleNumber" ] = input . RuleNumber ; } return entries ; } ; const serializeAws_ec2DeleteNetworkAclRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NetworkAclId !== undefined && input . NetworkAclId !== null ) { entries [ "NetworkAclId" ] = input . NetworkAclId ; } return entries ; } ; const serializeAws_ec2DeleteNetworkInsightsAccessScopeAnalysisRequest = ( input , context ) : any => { const entries = { } ; if ( input . NetworkInsightsAccessScopeAnalysisId !== undefined && input . NetworkInsightsAccessScopeAnalysisId !== null ) { entries [ "NetworkInsightsAccessScopeAnalysisId" ] = input . NetworkInsightsAccessScopeAnalysisId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteNetworkInsightsAccessScopeRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NetworkInsightsAccessScopeId !== undefined && input . NetworkInsightsAccessScopeId !== null ) { entries [ "NetworkInsightsAccessScopeId" ] = input . NetworkInsightsAccessScopeId ; } return entries ; } ; const serializeAws_ec2DeleteNetworkInsightsAnalysisRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NetworkInsightsAnalysisId !== undefined && input . NetworkInsightsAnalysisId !== null ) { entries [ "NetworkInsightsAnalysisId" ] = input . NetworkInsightsAnalysisId ; } return entries ; } ; const serializeAws_ec2DeleteNetworkInsightsPathRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NetworkInsightsPathId !== undefined && input . NetworkInsightsPathId !== null ) { entries [ "NetworkInsightsPathId" ] = input . NetworkInsightsPathId ; } return entries ; } ; const serializeAws_ec2DeleteNetworkInterfacePermissionRequest = ( input , context ) : any => { const entries = { } ; if ( input . NetworkInterfacePermissionId !== undefined && input . NetworkInterfacePermissionId !== null ) { entries [ "NetworkInterfacePermissionId" ] = input . NetworkInterfacePermissionId ; } if ( input . Force !== undefined && input . Force !== null ) { entries [ "Force" ] = input . Force ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteNetworkInterfaceRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } return entries ; } ; const serializeAws_ec2DeletePlacementGroupRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . GroupName !== undefined && input . GroupName !== null ) { entries [ "GroupName" ] = input . GroupName ; } return entries ; } ; const serializeAws_ec2DeletePublicIpv4PoolRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . PoolId !== undefined && input . PoolId !== null ) { entries [ "PoolId" ] = input . PoolId ; } return entries ; } ; const serializeAws_ec2DeleteQueuedReservedInstancesIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2DeleteQueuedReservedInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ReservedInstancesIds !== undefined && input . ReservedInstancesIds !== null ) { const memberEntries = serializeAws_ec2DeleteQueuedReservedInstancesIdList ( input . ReservedInstancesIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ReservedInstancesId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DeleteRouteRequest = ( input , context ) : any => { const entries = { } ; if ( input . DestinationCidrBlock !== undefined && input . DestinationCidrBlock !== null ) { entries [ "DestinationCidrBlock" ] = input . DestinationCidrBlock ; } if ( input . DestinationIpv6CidrBlock !== undefined && input . DestinationIpv6CidrBlock !== null ) { entries [ "DestinationIpv6CidrBlock" ] = input . DestinationIpv6CidrBlock ; } if ( input . DestinationPrefixListId !== undefined && input . DestinationPrefixListId !== null ) { entries [ "DestinationPrefixListId" ] = input . DestinationPrefixListId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . RouteTableId !== undefined && input . RouteTableId !== null ) { entries [ "RouteTableId" ] = input . RouteTableId ; } return entries ; } ; const serializeAws_ec2DeleteRouteTableRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . RouteTableId !== undefined && input . RouteTableId !== null ) { entries [ "RouteTableId" ] = input . RouteTableId ; } return entries ; } ; const serializeAws_ec2DeleteSecurityGroupRequest = ( input , context ) : any => { const entries = { } ; if ( input . GroupId !== undefined && input . GroupId !== null ) { entries [ "GroupId" ] = input . GroupId ; } if ( input . GroupName !== undefined && input . GroupName !== null ) { entries [ "GroupName" ] = input . GroupName ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteSnapshotRequest = ( input , context ) : any => { const entries = { } ; if ( input . SnapshotId !== undefined && input . SnapshotId !== null ) { entries [ "SnapshotId" ] = input . SnapshotId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteSpotDatafeedSubscriptionRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteSubnetCidrReservationRequest = ( input , context ) : any => { const entries = { } ; if ( input . SubnetCidrReservationId !== undefined && input . SubnetCidrReservationId !== null ) { entries [ "SubnetCidrReservationId" ] = input . SubnetCidrReservationId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteSubnetRequest = ( input , context ) : any => { const entries = { } ; if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteTagsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Resources !== undefined && input . Resources !== null ) { const memberEntries = serializeAws_ec2ResourceIdList ( input . Resources , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ResourceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_ec2TagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tag.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DeleteTrafficMirrorFilterRequest = ( input , context ) : any => { const entries = { } ; if ( input . TrafficMirrorFilterId !== undefined && input . TrafficMirrorFilterId !== null ) { entries [ "TrafficMirrorFilterId" ] = input . TrafficMirrorFilterId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteTrafficMirrorFilterRuleRequest = ( input , context ) : any => { const entries = { } ; if ( input . TrafficMirrorFilterRuleId !== undefined && input . TrafficMirrorFilterRuleId !== null ) { entries [ "TrafficMirrorFilterRuleId" ] = input . TrafficMirrorFilterRuleId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteTrafficMirrorSessionRequest = ( input , context ) : any => { const entries = { } ; if ( input . TrafficMirrorSessionId !== undefined && input . TrafficMirrorSessionId !== null ) { entries [ "TrafficMirrorSessionId" ] = input . TrafficMirrorSessionId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteTrafficMirrorTargetRequest = ( input , context ) : any => { const entries = { } ; if ( input . TrafficMirrorTargetId !== undefined && input . TrafficMirrorTargetId !== null ) { entries [ "TrafficMirrorTargetId" ] = input . TrafficMirrorTargetId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteTransitGatewayConnectPeerRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayConnectPeerId !== undefined && input . TransitGatewayConnectPeerId !== null ) { entries [ "TransitGatewayConnectPeerId" ] = input . TransitGatewayConnectPeerId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteTransitGatewayConnectRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteTransitGatewayMulticastDomainRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayMulticastDomainId !== undefined && input . TransitGatewayMulticastDomainId !== null ) { entries [ "TransitGatewayMulticastDomainId" ] = input . TransitGatewayMulticastDomainId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteTransitGatewayPeeringAttachmentRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteTransitGatewayPrefixListReferenceRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayRouteTableId !== undefined && input . TransitGatewayRouteTableId !== null ) { entries [ "TransitGatewayRouteTableId" ] = input . TransitGatewayRouteTableId ; } if ( input . PrefixListId !== undefined && input . PrefixListId !== null ) { entries [ "PrefixListId" ] = input . PrefixListId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteTransitGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayId !== undefined && input . TransitGatewayId !== null ) { entries [ "TransitGatewayId" ] = input . TransitGatewayId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteTransitGatewayRouteRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayRouteTableId !== undefined && input . TransitGatewayRouteTableId !== null ) { entries [ "TransitGatewayRouteTableId" ] = input . TransitGatewayRouteTableId ; } if ( input . DestinationCidrBlock !== undefined && input . DestinationCidrBlock !== null ) { entries [ "DestinationCidrBlock" ] = input . DestinationCidrBlock ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteTransitGatewayRouteTableRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayRouteTableId !== undefined && input . TransitGatewayRouteTableId !== null ) { entries [ "TransitGatewayRouteTableId" ] = input . TransitGatewayRouteTableId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteTransitGatewayVpcAttachmentRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteVolumeRequest = ( input , context ) : any => { const entries = { } ; if ( input . VolumeId !== undefined && input . VolumeId !== null ) { entries [ "VolumeId" ] = input . VolumeId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteVpcEndpointConnectionNotificationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ConnectionNotificationIds !== undefined && input . ConnectionNotificationIds !== null ) { const memberEntries = serializeAws_ec2ConnectionNotificationIdsList ( input . ConnectionNotificationIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ConnectionNotificationId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DeleteVpcEndpointServiceConfigurationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ServiceIds !== undefined && input . ServiceIds !== null ) { const memberEntries = serializeAws_ec2VpcEndpointServiceIdList ( input . ServiceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ServiceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DeleteVpcEndpointsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VpcEndpointIds !== undefined && input . VpcEndpointIds !== null ) { const memberEntries = serializeAws_ec2VpcEndpointIdList ( input . VpcEndpointIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcEndpointId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DeleteVpcPeeringConnectionRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VpcPeeringConnectionId !== undefined && input . VpcPeeringConnectionId !== null ) { entries [ "VpcPeeringConnectionId" ] = input . VpcPeeringConnectionId ; } return entries ; } ; const serializeAws_ec2DeleteVpcRequest = ( input , context ) : any => { const entries = { } ; if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteVpnConnectionRequest = ( input , context ) : any => { const entries = { } ; if ( input . VpnConnectionId !== undefined && input . VpnConnectionId !== null ) { entries [ "VpnConnectionId" ] = input . VpnConnectionId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeleteVpnConnectionRouteRequest = ( input , context ) : any => { const entries = { } ; if ( input . DestinationCidrBlock !== undefined && input . DestinationCidrBlock !== null ) { entries [ "DestinationCidrBlock" ] = input . DestinationCidrBlock ; } if ( input . VpnConnectionId !== undefined && input . VpnConnectionId !== null ) { entries [ "VpnConnectionId" ] = input . VpnConnectionId ; } return entries ; } ; const serializeAws_ec2DeleteVpnGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . VpnGatewayId !== undefined && input . VpnGatewayId !== null ) { entries [ "VpnGatewayId" ] = input . VpnGatewayId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeprovisionByoipCidrRequest = ( input , context ) : any => { const entries = { } ; if ( input . Cidr !== undefined && input . Cidr !== null ) { entries [ "Cidr" ] = input . Cidr ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeprovisionIpamPoolCidrRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . IpamPoolId !== undefined && input . IpamPoolId !== null ) { entries [ "IpamPoolId" ] = input . IpamPoolId ; } if ( input . Cidr !== undefined && input . Cidr !== null ) { entries [ "Cidr" ] = input . Cidr ; } return entries ; } ; const serializeAws_ec2DeprovisionPublicIpv4PoolCidrRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . PoolId !== undefined && input . PoolId !== null ) { entries [ "PoolId" ] = input . PoolId ; } if ( input . Cidr !== undefined && input . Cidr !== null ) { entries [ "Cidr" ] = input . Cidr ; } return entries ; } ; const serializeAws_ec2DeregisterImageRequest = ( input , context ) : any => { const entries = { } ; if ( input . ImageId !== undefined && input . ImageId !== null ) { entries [ "ImageId" ] = input . ImageId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeregisterInstanceEventNotificationAttributesRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceTagAttribute !== undefined && input . InstanceTagAttribute !== null ) { const memberEntries = serializeAws_ec2DeregisterInstanceTagAttributeRequest ( input . InstanceTagAttribute , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceTagAttribute.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DeregisterInstanceTagAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . IncludeAllTagsOfInstance !== undefined && input . IncludeAllTagsOfInstance !== null ) { entries [ "IncludeAllTagsOfInstance" ] = input . IncludeAllTagsOfInstance ; } if ( input . InstanceTagKeys !== undefined && input . InstanceTagKeys !== null ) { const memberEntries = serializeAws_ec2InstanceTagKeySet ( input . InstanceTagKeys , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceTagKey.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DeregisterTransitGatewayMulticastGroupMembersRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayMulticastDomainId !== undefined && input . TransitGatewayMulticastDomainId !== null ) { entries [ "TransitGatewayMulticastDomainId" ] = input . TransitGatewayMulticastDomainId ; } if ( input . GroupIpAddress !== undefined && input . GroupIpAddress !== null ) { entries [ "GroupIpAddress" ] = input . GroupIpAddress ; } if ( input . NetworkInterfaceIds !== undefined && input . NetworkInterfaceIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewayNetworkInterfaceIdList ( input . NetworkInterfaceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInterfaceIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DeregisterTransitGatewayMulticastGroupSourcesRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayMulticastDomainId !== undefined && input . TransitGatewayMulticastDomainId !== null ) { entries [ "TransitGatewayMulticastDomainId" ] = input . TransitGatewayMulticastDomainId ; } if ( input . GroupIpAddress !== undefined && input . GroupIpAddress !== null ) { entries [ "GroupIpAddress" ] = input . GroupIpAddress ; } if ( input . NetworkInterfaceIds !== undefined && input . NetworkInterfaceIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewayNetworkInterfaceIdList ( input . NetworkInterfaceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInterfaceIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeAccountAttributesRequest = ( input , context ) : any => { const entries = { } ; if ( input . AttributeNames !== undefined && input . AttributeNames !== null ) { const memberEntries = serializeAws_ec2AccountAttributeNameStringList ( input . AttributeNames , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AttributeName.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeAddressesAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . AllocationIds !== undefined && input . AllocationIds !== null ) { const memberEntries = serializeAws_ec2AllocationIds ( input . AllocationIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AllocationId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeAddressesRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . PublicIps !== undefined && input . PublicIps !== null ) { const memberEntries = serializeAws_ec2PublicIpStringList ( input . PublicIps , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PublicIp.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AllocationIds !== undefined && input . AllocationIds !== null ) { const memberEntries = serializeAws_ec2AllocationIdList ( input . AllocationIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AllocationId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeAggregateIdFormatRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeAvailabilityZonesRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ZoneNames !== undefined && input . ZoneNames !== null ) { const memberEntries = serializeAws_ec2ZoneNameStringList ( input . ZoneNames , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ZoneName.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ZoneIds !== undefined && input . ZoneIds !== null ) { const memberEntries = serializeAws_ec2ZoneIdStringList ( input . ZoneIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ZoneId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AllAvailabilityZones !== undefined && input . AllAvailabilityZones !== null ) { entries [ "AllAvailabilityZones" ] = input . AllAvailabilityZones ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeBundleTasksRequest = ( input , context ) : any => { const entries = { } ; if ( input . BundleIds !== undefined && input . BundleIds !== null ) { const memberEntries = serializeAws_ec2BundleIdStringList ( input . BundleIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `BundleId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeByoipCidrsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeCapacityReservationFleetsRequest = ( input , context ) : any => { const entries = { } ; if ( input . CapacityReservationFleetIds !== undefined && input . CapacityReservationFleetIds !== null ) { const memberEntries = serializeAws_ec2CapacityReservationFleetIdSet ( input . CapacityReservationFleetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CapacityReservationFleetId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeCapacityReservationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . CapacityReservationIds !== undefined && input . CapacityReservationIds !== null ) { const memberEntries = serializeAws_ec2CapacityReservationIdSet ( input . CapacityReservationIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CapacityReservationId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeCarrierGatewaysRequest = ( input , context ) : any => { const entries = { } ; if ( input . CarrierGatewayIds !== undefined && input . CarrierGatewayIds !== null ) { const memberEntries = serializeAws_ec2CarrierGatewayIdSet ( input . CarrierGatewayIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CarrierGatewayId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeClassicLinkInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceIds !== undefined && input . InstanceIds !== null ) { const memberEntries = serializeAws_ec2InstanceIdStringList ( input . InstanceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeClientVpnAuthorizationRulesRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeClientVpnConnectionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeClientVpnEndpointsRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointIds !== undefined && input . ClientVpnEndpointIds !== null ) { const memberEntries = serializeAws_ec2ClientVpnEndpointIdList ( input . ClientVpnEndpointIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ClientVpnEndpointId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeClientVpnRoutesRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeClientVpnTargetNetworksRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . AssociationIds !== undefined && input . AssociationIds !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . AssociationIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AssociationIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeCoipPoolsRequest = ( input , context ) : any => { const entries = { } ; if ( input . PoolIds !== undefined && input . PoolIds !== null ) { const memberEntries = serializeAws_ec2CoipPoolIdSet ( input . PoolIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PoolId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeConversionTasksRequest = ( input , context ) : any => { const entries = { } ; if ( input . ConversionTaskIds !== undefined && input . ConversionTaskIds !== null ) { const memberEntries = serializeAws_ec2ConversionIdStringList ( input . ConversionTaskIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ConversionTaskId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeCustomerGatewaysRequest = ( input , context ) : any => { const entries = { } ; if ( input . CustomerGatewayIds !== undefined && input . CustomerGatewayIds !== null ) { const memberEntries = serializeAws_ec2CustomerGatewayIdStringList ( input . CustomerGatewayIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CustomerGatewayId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeDhcpOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DhcpOptionsIds !== undefined && input . DhcpOptionsIds !== null ) { const memberEntries = serializeAws_ec2DhcpOptionsIdStringList ( input . DhcpOptionsIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DhcpOptionsId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeEgressOnlyInternetGatewaysRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . EgressOnlyInternetGatewayIds !== undefined && input . EgressOnlyInternetGatewayIds !== null ) { const memberEntries = serializeAws_ec2EgressOnlyInternetGatewayIdList ( input . EgressOnlyInternetGatewayIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EgressOnlyInternetGatewayId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeElasticGpusRequest = ( input , context ) : any => { const entries = { } ; if ( input . ElasticGpuIds !== undefined && input . ElasticGpuIds !== null ) { const memberEntries = serializeAws_ec2ElasticGpuIdSet ( input . ElasticGpuIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ElasticGpuId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeExportImageTasksRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ExportImageTaskIds !== undefined && input . ExportImageTaskIds !== null ) { const memberEntries = serializeAws_ec2ExportImageTaskIdList ( input . ExportImageTaskIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ExportImageTaskId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeExportTasksRequest = ( input , context ) : any => { const entries = { } ; if ( input . ExportTaskIds !== undefined && input . ExportTaskIds !== null ) { const memberEntries = serializeAws_ec2ExportTaskIdStringList ( input . ExportTaskIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ExportTaskId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeFastSnapshotRestoresRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeFleetHistoryRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . EventType !== undefined && input . EventType !== null ) { entries [ "EventType" ] = input . EventType ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . FleetId !== undefined && input . FleetId !== null ) { entries [ "FleetId" ] = input . FleetId ; } if ( input . StartTime !== undefined && input . StartTime !== null ) { entries [ "StartTime" ] = input . StartTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } return entries ; } ; const serializeAws_ec2DescribeFleetInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . FleetId !== undefined && input . FleetId !== null ) { entries [ "FleetId" ] = input . FleetId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeFleetsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . FleetIds !== undefined && input . FleetIds !== null ) { const memberEntries = serializeAws_ec2FleetIdSet ( input . FleetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `FleetId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeFlowLogsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filter !== undefined && input . Filter !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filter , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . FlowLogIds !== undefined && input . FlowLogIds !== null ) { const memberEntries = serializeAws_ec2FlowLogIdList ( input . FlowLogIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `FlowLogId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeFpgaImageAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . FpgaImageId !== undefined && input . FpgaImageId !== null ) { entries [ "FpgaImageId" ] = input . FpgaImageId ; } if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } return entries ; } ; const serializeAws_ec2DescribeFpgaImagesRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . FpgaImageIds !== undefined && input . FpgaImageIds !== null ) { const memberEntries = serializeAws_ec2FpgaImageIdList ( input . FpgaImageIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `FpgaImageId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Owners !== undefined && input . Owners !== null ) { const memberEntries = serializeAws_ec2OwnerStringList ( input . Owners , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Owner.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeHostReservationOfferingsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filter !== undefined && input . Filter !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filter , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxDuration !== undefined && input . MaxDuration !== null ) { entries [ "MaxDuration" ] = input . MaxDuration ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . MinDuration !== undefined && input . MinDuration !== null ) { entries [ "MinDuration" ] = input . MinDuration ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . OfferingId !== undefined && input . OfferingId !== null ) { entries [ "OfferingId" ] = input . OfferingId ; } return entries ; } ; const serializeAws_ec2DescribeHostReservationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filter !== undefined && input . Filter !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filter , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . HostReservationIdSet !== undefined && input . HostReservationIdSet !== null ) { const memberEntries = serializeAws_ec2HostReservationIdSet ( input . HostReservationIdSet , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `HostReservationIdSet.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeHostsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filter !== undefined && input . Filter !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filter , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . HostIds !== undefined && input . HostIds !== null ) { const memberEntries = serializeAws_ec2RequestHostIdList ( input . HostIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `HostId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeIamInstanceProfileAssociationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . AssociationIds !== undefined && input . AssociationIds !== null ) { const memberEntries = serializeAws_ec2AssociationIdList ( input . AssociationIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AssociationId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeIdentityIdFormatRequest = ( input , context ) : any => { const entries = { } ; if ( input . PrincipalArn !== undefined && input . PrincipalArn !== null ) { entries [ "PrincipalArn" ] = input . PrincipalArn ; } if ( input . Resource !== undefined && input . Resource !== null ) { entries [ "Resource" ] = input . Resource ; } return entries ; } ; const serializeAws_ec2DescribeIdFormatRequest = ( input , context ) : any => { const entries = { } ; if ( input . Resource !== undefined && input . Resource !== null ) { entries [ "Resource" ] = input . Resource ; } return entries ; } ; const serializeAws_ec2DescribeImageAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } if ( input . ImageId !== undefined && input . ImageId !== null ) { entries [ "ImageId" ] = input . ImageId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeImagesRequest = ( input , context ) : any => { const entries = { } ; if ( input . ExecutableUsers !== undefined && input . ExecutableUsers !== null ) { const memberEntries = serializeAws_ec2ExecutableByStringList ( input . ExecutableUsers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ExecutableBy.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ImageIds !== undefined && input . ImageIds !== null ) { const memberEntries = serializeAws_ec2ImageIdStringList ( input . ImageIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ImageId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Owners !== undefined && input . Owners !== null ) { const memberEntries = serializeAws_ec2OwnerStringList ( input . Owners , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Owner.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . IncludeDeprecated !== undefined && input . IncludeDeprecated !== null ) { entries [ "IncludeDeprecated" ] = input . IncludeDeprecated ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeImportImageTasksRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ImportTaskIds !== undefined && input . ImportTaskIds !== null ) { const memberEntries = serializeAws_ec2ImportTaskIdList ( input . ImportTaskIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ImportTaskId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeImportSnapshotTasksRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filters.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ImportTaskIds !== undefined && input . ImportTaskIds !== null ) { const memberEntries = serializeAws_ec2ImportSnapshotTaskIdList ( input . ImportTaskIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ImportTaskId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeInstanceAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } return entries ; } ; const serializeAws_ec2DescribeInstanceCreditSpecificationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceIds !== undefined && input . InstanceIds !== null ) { const memberEntries = serializeAws_ec2InstanceIdStringList ( input . InstanceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeInstanceEventNotificationAttributesRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeInstanceEventWindowsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceEventWindowIds !== undefined && input . InstanceEventWindowIds !== null ) { const memberEntries = serializeAws_ec2InstanceEventWindowIdSet ( input . InstanceEventWindowIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceEventWindowId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceIds !== undefined && input . InstanceIds !== null ) { const memberEntries = serializeAws_ec2InstanceIdStringList ( input . InstanceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeInstanceStatusRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceIds !== undefined && input . InstanceIds !== null ) { const memberEntries = serializeAws_ec2InstanceIdStringList ( input . InstanceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . IncludeAllInstances !== undefined && input . IncludeAllInstances !== null ) { entries [ "IncludeAllInstances" ] = input . IncludeAllInstances ; } return entries ; } ; const serializeAws_ec2DescribeInstanceTypeOfferingsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . LocationType !== undefined && input . LocationType !== null ) { entries [ "LocationType" ] = input . LocationType ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeInstanceTypesRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceTypes !== undefined && input . InstanceTypes !== null ) { const memberEntries = serializeAws_ec2RequestInstanceTypeList ( input . InstanceTypes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceType.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeInternetGatewaysRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InternetGatewayIds !== undefined && input . InternetGatewayIds !== null ) { const memberEntries = serializeAws_ec2InternetGatewayIdList ( input . InternetGatewayIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InternetGatewayId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeIpamPoolsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . IpamPoolIds !== undefined && input . IpamPoolIds !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . IpamPoolIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IpamPoolId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeIpamScopesRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . IpamScopeIds !== undefined && input . IpamScopeIds !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . IpamScopeIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IpamScopeId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeIpamsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . IpamIds !== undefined && input . IpamIds !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . IpamIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IpamId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeIpv6PoolsRequest = ( input , context ) : any => { const entries = { } ; if ( input . PoolIds !== undefined && input . PoolIds !== null ) { const memberEntries = serializeAws_ec2Ipv6PoolIdList ( input . PoolIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PoolId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeKeyPairsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . KeyNames !== undefined && input . KeyNames !== null ) { const memberEntries = serializeAws_ec2KeyNameStringList ( input . KeyNames , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `KeyName.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . KeyPairIds !== undefined && input . KeyPairIds !== null ) { const memberEntries = serializeAws_ec2KeyPairIdStringList ( input . KeyPairIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `KeyPairId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeLaunchTemplatesRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . LaunchTemplateIds !== undefined && input . LaunchTemplateIds !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateIdStringList ( input . LaunchTemplateIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchTemplateId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . LaunchTemplateNames !== undefined && input . LaunchTemplateNames !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateNameStringList ( input . LaunchTemplateNames , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchTemplateName.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeLaunchTemplateVersionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . LaunchTemplateId !== undefined && input . LaunchTemplateId !== null ) { entries [ "LaunchTemplateId" ] = input . LaunchTemplateId ; } if ( input . LaunchTemplateName !== undefined && input . LaunchTemplateName !== null ) { entries [ "LaunchTemplateName" ] = input . LaunchTemplateName ; } if ( input . Versions !== undefined && input . Versions !== null ) { const memberEntries = serializeAws_ec2VersionStringList ( input . Versions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchTemplateVersion.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MinVersion !== undefined && input . MinVersion !== null ) { entries [ "MinVersion" ] = input . MinVersion ; } if ( input . MaxVersion !== undefined && input . MaxVersion !== null ) { entries [ "MaxVersion" ] = input . MaxVersion ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeLocalGatewayRouteTablesRequest = ( input , context ) : any => { const entries = { } ; if ( input . LocalGatewayRouteTableIds !== undefined && input . LocalGatewayRouteTableIds !== null ) { const memberEntries = serializeAws_ec2LocalGatewayRouteTableIdSet ( input . LocalGatewayRouteTableIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LocalGatewayRouteTableId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds !== undefined && input . LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds !== null ) { const memberEntries = serializeAws_ec2LocalGatewayRouteTableVirtualInterfaceGroupAssociationIdSet ( input . LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LocalGatewayRouteTableVirtualInterfaceGroupAssociationId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeLocalGatewayRouteTableVpcAssociationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . LocalGatewayRouteTableVpcAssociationIds !== undefined && input . LocalGatewayRouteTableVpcAssociationIds !== null ) { const memberEntries = serializeAws_ec2LocalGatewayRouteTableVpcAssociationIdSet ( input . LocalGatewayRouteTableVpcAssociationIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LocalGatewayRouteTableVpcAssociationId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeLocalGatewaysRequest = ( input , context ) : any => { const entries = { } ; if ( input . LocalGatewayIds !== undefined && input . LocalGatewayIds !== null ) { const memberEntries = serializeAws_ec2LocalGatewayIdSet ( input . LocalGatewayIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LocalGatewayId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeLocalGatewayVirtualInterfaceGroupsRequest = ( input , context ) : any => { const entries = { } ; if ( input . LocalGatewayVirtualInterfaceGroupIds !== undefined && input . LocalGatewayVirtualInterfaceGroupIds !== null ) { const memberEntries = serializeAws_ec2LocalGatewayVirtualInterfaceGroupIdSet ( input . LocalGatewayVirtualInterfaceGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LocalGatewayVirtualInterfaceGroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeLocalGatewayVirtualInterfacesRequest = ( input , context ) : any => { const entries = { } ; if ( input . LocalGatewayVirtualInterfaceIds !== undefined && input . LocalGatewayVirtualInterfaceIds !== null ) { const memberEntries = serializeAws_ec2LocalGatewayVirtualInterfaceIdSet ( input . LocalGatewayVirtualInterfaceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LocalGatewayVirtualInterfaceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeManagedPrefixListsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . PrefixListIds !== undefined && input . PrefixListIds !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . PrefixListIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PrefixListId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeMovingAddressesRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . PublicIps !== undefined && input . PublicIps !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . PublicIps , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PublicIp.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeNatGatewaysRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filter !== undefined && input . Filter !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filter , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NatGatewayIds !== undefined && input . NatGatewayIds !== null ) { const memberEntries = serializeAws_ec2NatGatewayIdStringList ( input . NatGatewayIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NatGatewayId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeNetworkAclsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NetworkAclIds !== undefined && input . NetworkAclIds !== null ) { const memberEntries = serializeAws_ec2NetworkAclIdStringList ( input . NetworkAclIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkAclId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeNetworkInsightsAccessScopeAnalysesRequest = ( input , context ) : any => { const entries = { } ; if ( input . NetworkInsightsAccessScopeAnalysisIds !== undefined && input . NetworkInsightsAccessScopeAnalysisIds !== null ) { const memberEntries = serializeAws_ec2NetworkInsightsAccessScopeAnalysisIdList ( input . NetworkInsightsAccessScopeAnalysisIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInsightsAccessScopeAnalysisId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NetworkInsightsAccessScopeId !== undefined && input . NetworkInsightsAccessScopeId !== null ) { entries [ "NetworkInsightsAccessScopeId" ] = input . NetworkInsightsAccessScopeId ; } if ( input . AnalysisStartTimeBegin !== undefined && input . AnalysisStartTimeBegin !== null ) { entries [ "AnalysisStartTimeBegin" ] = input . AnalysisStartTimeBegin . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . AnalysisStartTimeEnd !== undefined && input . AnalysisStartTimeEnd !== null ) { entries [ "AnalysisStartTimeEnd" ] = input . AnalysisStartTimeEnd . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeNetworkInsightsAccessScopesRequest = ( input , context ) : any => { const entries = { } ; if ( input . NetworkInsightsAccessScopeIds !== undefined && input . NetworkInsightsAccessScopeIds !== null ) { const memberEntries = serializeAws_ec2NetworkInsightsAccessScopeIdList ( input . NetworkInsightsAccessScopeIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInsightsAccessScopeId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeNetworkInsightsAnalysesRequest = ( input , context ) : any => { const entries = { } ; if ( input . NetworkInsightsAnalysisIds !== undefined && input . NetworkInsightsAnalysisIds !== null ) { const memberEntries = serializeAws_ec2NetworkInsightsAnalysisIdList ( input . NetworkInsightsAnalysisIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInsightsAnalysisId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NetworkInsightsPathId !== undefined && input . NetworkInsightsPathId !== null ) { entries [ "NetworkInsightsPathId" ] = input . NetworkInsightsPathId ; } if ( input . AnalysisStartTime !== undefined && input . AnalysisStartTime !== null ) { entries [ "AnalysisStartTime" ] = input . AnalysisStartTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . AnalysisEndTime !== undefined && input . AnalysisEndTime !== null ) { entries [ "AnalysisEndTime" ] = input . AnalysisEndTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeNetworkInsightsPathsRequest = ( input , context ) : any => { const entries = { } ; if ( input . NetworkInsightsPathIds !== undefined && input . NetworkInsightsPathIds !== null ) { const memberEntries = serializeAws_ec2NetworkInsightsPathIdList ( input . NetworkInsightsPathIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInsightsPathId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeNetworkInterfaceAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } return entries ; } ; const serializeAws_ec2DescribeNetworkInterfacePermissionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . NetworkInterfacePermissionIds !== undefined && input . NetworkInterfacePermissionIds !== null ) { const memberEntries = serializeAws_ec2NetworkInterfacePermissionIdList ( input . NetworkInterfacePermissionIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInterfacePermissionId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeNetworkInterfacesRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NetworkInterfaceIds !== undefined && input . NetworkInterfaceIds !== null ) { const memberEntries = serializeAws_ec2NetworkInterfaceIdList ( input . NetworkInterfaceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInterfaceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribePlacementGroupsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . GroupNames !== undefined && input . GroupNames !== null ) { const memberEntries = serializeAws_ec2PlacementGroupStringList ( input . GroupNames , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `GroupName.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . GroupIds !== undefined && input . GroupIds !== null ) { const memberEntries = serializeAws_ec2PlacementGroupIdStringList ( input . GroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `GroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribePrefixListsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . PrefixListIds !== undefined && input . PrefixListIds !== null ) { const memberEntries = serializeAws_ec2PrefixListResourceIdStringList ( input . PrefixListIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PrefixListId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribePrincipalIdFormatRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Resources !== undefined && input . Resources !== null ) { const memberEntries = serializeAws_ec2ResourceList ( input . Resources , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Resource.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribePublicIpv4PoolsRequest = ( input , context ) : any => { const entries = { } ; if ( input . PoolIds !== undefined && input . PoolIds !== null ) { const memberEntries = serializeAws_ec2PublicIpv4PoolIdStringList ( input . PoolIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PoolId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeRegionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . RegionNames !== undefined && input . RegionNames !== null ) { const memberEntries = serializeAws_ec2RegionNameStringList ( input . RegionNames , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RegionName.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . AllRegions !== undefined && input . AllRegions !== null ) { entries [ "AllRegions" ] = input . AllRegions ; } return entries ; } ; const serializeAws_ec2DescribeReplaceRootVolumeTasksRequest = ( input , context ) : any => { const entries = { } ; if ( input . ReplaceRootVolumeTaskIds !== undefined && input . ReplaceRootVolumeTaskIds !== null ) { const memberEntries = serializeAws_ec2ReplaceRootVolumeTaskIds ( input . ReplaceRootVolumeTaskIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ReplaceRootVolumeTaskId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeReservedInstancesListingsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ReservedInstancesId !== undefined && input . ReservedInstancesId !== null ) { entries [ "ReservedInstancesId" ] = input . ReservedInstancesId ; } if ( input . ReservedInstancesListingId !== undefined && input . ReservedInstancesListingId !== null ) { entries [ "ReservedInstancesListingId" ] = input . ReservedInstancesListingId ; } return entries ; } ; const serializeAws_ec2DescribeReservedInstancesModificationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ReservedInstancesModificationIds !== undefined && input . ReservedInstancesModificationIds !== null ) { const memberEntries = serializeAws_ec2ReservedInstancesModificationIdStringList ( input . ReservedInstancesModificationIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ReservedInstancesModificationId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeReservedInstancesOfferingsRequest = ( input , context ) : any => { const entries = { } ; if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . IncludeMarketplace !== undefined && input . IncludeMarketplace !== null ) { entries [ "IncludeMarketplace" ] = input . IncludeMarketplace ; } if ( input . InstanceType !== undefined && input . InstanceType !== null ) { entries [ "InstanceType" ] = input . InstanceType ; } if ( input . MaxDuration !== undefined && input . MaxDuration !== null ) { entries [ "MaxDuration" ] = input . MaxDuration ; } if ( input . MaxInstanceCount !== undefined && input . MaxInstanceCount !== null ) { entries [ "MaxInstanceCount" ] = input . MaxInstanceCount ; } if ( input . MinDuration !== undefined && input . MinDuration !== null ) { entries [ "MinDuration" ] = input . MinDuration ; } if ( input . OfferingClass !== undefined && input . OfferingClass !== null ) { entries [ "OfferingClass" ] = input . OfferingClass ; } if ( input . ProductDescription !== undefined && input . ProductDescription !== null ) { entries [ "ProductDescription" ] = input . ProductDescription ; } if ( input . ReservedInstancesOfferingIds !== undefined && input . ReservedInstancesOfferingIds !== null ) { const memberEntries = serializeAws_ec2ReservedInstancesOfferingIdStringList ( input . ReservedInstancesOfferingIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ReservedInstancesOfferingId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceTenancy !== undefined && input . InstanceTenancy !== null ) { entries [ "InstanceTenancy" ] = input . InstanceTenancy ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . OfferingType !== undefined && input . OfferingType !== null ) { entries [ "OfferingType" ] = input . OfferingType ; } return entries ; } ; const serializeAws_ec2DescribeReservedInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . OfferingClass !== undefined && input . OfferingClass !== null ) { entries [ "OfferingClass" ] = input . OfferingClass ; } if ( input . ReservedInstancesIds !== undefined && input . ReservedInstancesIds !== null ) { const memberEntries = serializeAws_ec2ReservedInstancesIdStringList ( input . ReservedInstancesIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ReservedInstancesId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . OfferingType !== undefined && input . OfferingType !== null ) { entries [ "OfferingType" ] = input . OfferingType ; } return entries ; } ; const serializeAws_ec2DescribeRouteTablesRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . RouteTableIds !== undefined && input . RouteTableIds !== null ) { const memberEntries = serializeAws_ec2RouteTableIdStringList ( input . RouteTableIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RouteTableId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeScheduledInstanceAvailabilityRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . FirstSlotStartTimeRange !== undefined && input . FirstSlotStartTimeRange !== null ) { const memberEntries = serializeAws_ec2SlotDateTimeRangeRequest ( input . FirstSlotStartTimeRange , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `FirstSlotStartTimeRange.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . MaxSlotDurationInHours !== undefined && input . MaxSlotDurationInHours !== null ) { entries [ "MaxSlotDurationInHours" ] = input . MaxSlotDurationInHours ; } if ( input . MinSlotDurationInHours !== undefined && input . MinSlotDurationInHours !== null ) { entries [ "MinSlotDurationInHours" ] = input . MinSlotDurationInHours ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . Recurrence !== undefined && input . Recurrence !== null ) { const memberEntries = serializeAws_ec2ScheduledInstanceRecurrenceRequest ( input . Recurrence , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Recurrence.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeScheduledInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . ScheduledInstanceIds !== undefined && input . ScheduledInstanceIds !== null ) { const memberEntries = serializeAws_ec2ScheduledInstanceIdRequestSet ( input . ScheduledInstanceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ScheduledInstanceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SlotStartTimeRange !== undefined && input . SlotStartTimeRange !== null ) { const memberEntries = serializeAws_ec2SlotStartTimeRangeRequest ( input . SlotStartTimeRange , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SlotStartTimeRange.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeSecurityGroupReferencesRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . GroupId !== undefined && input . GroupId !== null ) { const memberEntries = serializeAws_ec2GroupIds ( input . GroupId , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `GroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeSecurityGroupRulesRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SecurityGroupRuleIds !== undefined && input . SecurityGroupRuleIds !== null ) { const memberEntries = serializeAws_ec2SecurityGroupRuleIdList ( input . SecurityGroupRuleIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupRuleId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeSecurityGroupsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . GroupIds !== undefined && input . GroupIds !== null ) { const memberEntries = serializeAws_ec2GroupIdStringList ( input . GroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `GroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . GroupNames !== undefined && input . GroupNames !== null ) { const memberEntries = serializeAws_ec2GroupNameStringList ( input . GroupNames , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `GroupName.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeSnapshotAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } if ( input . SnapshotId !== undefined && input . SnapshotId !== null ) { entries [ "SnapshotId" ] = input . SnapshotId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeSnapshotsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . OwnerIds !== undefined && input . OwnerIds !== null ) { const memberEntries = serializeAws_ec2OwnerStringList ( input . OwnerIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Owner.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . RestorableByUserIds !== undefined && input . RestorableByUserIds !== null ) { const memberEntries = serializeAws_ec2RestorableByStringList ( input . RestorableByUserIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RestorableBy.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SnapshotIds !== undefined && input . SnapshotIds !== null ) { const memberEntries = serializeAws_ec2SnapshotIdStringList ( input . SnapshotIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SnapshotId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeSnapshotTierStatusRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeSpotDatafeedSubscriptionRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeSpotFleetInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . SpotFleetRequestId !== undefined && input . SpotFleetRequestId !== null ) { entries [ "SpotFleetRequestId" ] = input . SpotFleetRequestId ; } return entries ; } ; const serializeAws_ec2DescribeSpotFleetRequestHistoryRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . EventType !== undefined && input . EventType !== null ) { entries [ "EventType" ] = input . EventType ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . SpotFleetRequestId !== undefined && input . SpotFleetRequestId !== null ) { entries [ "SpotFleetRequestId" ] = input . SpotFleetRequestId ; } if ( input . StartTime !== undefined && input . StartTime !== null ) { entries [ "StartTime" ] = input . StartTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } return entries ; } ; const serializeAws_ec2DescribeSpotFleetRequestsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . SpotFleetRequestIds !== undefined && input . SpotFleetRequestIds !== null ) { const memberEntries = serializeAws_ec2SpotFleetRequestIdList ( input . SpotFleetRequestIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SpotFleetRequestId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeSpotInstanceRequestsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . SpotInstanceRequestIds !== undefined && input . SpotInstanceRequestIds !== null ) { const memberEntries = serializeAws_ec2SpotInstanceRequestIdList ( input . SpotInstanceRequestIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SpotInstanceRequestId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeSpotPriceHistoryRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . EndTime !== undefined && input . EndTime !== null ) { entries [ "EndTime" ] = input . EndTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . InstanceTypes !== undefined && input . InstanceTypes !== null ) { const memberEntries = serializeAws_ec2InstanceTypeList ( input . InstanceTypes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceType.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . ProductDescriptions !== undefined && input . ProductDescriptions !== null ) { const memberEntries = serializeAws_ec2ProductDescriptionList ( input . ProductDescriptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ProductDescription.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . StartTime !== undefined && input . StartTime !== null ) { entries [ "StartTime" ] = input . StartTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } return entries ; } ; const serializeAws_ec2DescribeStaleSecurityGroupsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } return entries ; } ; const serializeAws_ec2DescribeStoreImageTasksRequest = ( input , context ) : any => { const entries = { } ; if ( input . ImageIds !== undefined && input . ImageIds !== null ) { const memberEntries = serializeAws_ec2ImageIdList ( input . ImageIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ImageId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeSubnetsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SubnetIds !== undefined && input . SubnetIds !== null ) { const memberEntries = serializeAws_ec2SubnetIdStringList ( input . SubnetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SubnetId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeTagsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeTrafficMirrorFiltersRequest = ( input , context ) : any => { const entries = { } ; if ( input . TrafficMirrorFilterIds !== undefined && input . TrafficMirrorFilterIds !== null ) { const memberEntries = serializeAws_ec2TrafficMirrorFilterIdList ( input . TrafficMirrorFilterIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TrafficMirrorFilterId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeTrafficMirrorSessionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . TrafficMirrorSessionIds !== undefined && input . TrafficMirrorSessionIds !== null ) { const memberEntries = serializeAws_ec2TrafficMirrorSessionIdList ( input . TrafficMirrorSessionIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TrafficMirrorSessionId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeTrafficMirrorTargetsRequest = ( input , context ) : any => { const entries = { } ; if ( input . TrafficMirrorTargetIds !== undefined && input . TrafficMirrorTargetIds !== null ) { const memberEntries = serializeAws_ec2TrafficMirrorTargetIdList ( input . TrafficMirrorTargetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TrafficMirrorTargetId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeTransitGatewayAttachmentsRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayAttachmentIds !== undefined && input . TransitGatewayAttachmentIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewayAttachmentIdStringList ( input . TransitGatewayAttachmentIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TransitGatewayAttachmentIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeTransitGatewayConnectPeersRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayConnectPeerIds !== undefined && input . TransitGatewayConnectPeerIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewayConnectPeerIdStringList ( input . TransitGatewayConnectPeerIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TransitGatewayConnectPeerIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeTransitGatewayConnectsRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayAttachmentIds !== undefined && input . TransitGatewayAttachmentIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewayAttachmentIdStringList ( input . TransitGatewayAttachmentIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TransitGatewayAttachmentIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeTransitGatewayMulticastDomainsRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayMulticastDomainIds !== undefined && input . TransitGatewayMulticastDomainIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewayMulticastDomainIdStringList ( input . TransitGatewayMulticastDomainIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TransitGatewayMulticastDomainIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeTransitGatewayPeeringAttachmentsRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayAttachmentIds !== undefined && input . TransitGatewayAttachmentIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewayAttachmentIdStringList ( input . TransitGatewayAttachmentIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TransitGatewayAttachmentIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeTransitGatewayRouteTablesRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayRouteTableIds !== undefined && input . TransitGatewayRouteTableIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewayRouteTableIdStringList ( input . TransitGatewayRouteTableIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TransitGatewayRouteTableIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeTransitGatewaysRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayIds !== undefined && input . TransitGatewayIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewayIdStringList ( input . TransitGatewayIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TransitGatewayIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeTransitGatewayVpcAttachmentsRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayAttachmentIds !== undefined && input . TransitGatewayAttachmentIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewayAttachmentIdStringList ( input . TransitGatewayAttachmentIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TransitGatewayAttachmentIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeTrunkInterfaceAssociationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . AssociationIds !== undefined && input . AssociationIds !== null ) { const memberEntries = serializeAws_ec2TrunkInterfaceAssociationIdList ( input . AssociationIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AssociationId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeVolumeAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } if ( input . VolumeId !== undefined && input . VolumeId !== null ) { entries [ "VolumeId" ] = input . VolumeId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeVolumesModificationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VolumeIds !== undefined && input . VolumeIds !== null ) { const memberEntries = serializeAws_ec2VolumeIdStringList ( input . VolumeIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VolumeId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeVolumesRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . VolumeIds !== undefined && input . VolumeIds !== null ) { const memberEntries = serializeAws_ec2VolumeIdStringList ( input . VolumeIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VolumeId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeVolumeStatusRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . VolumeIds !== undefined && input . VolumeIds !== null ) { const memberEntries = serializeAws_ec2VolumeIdStringList ( input . VolumeIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VolumeId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeVpcAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeVpcClassicLinkDnsSupportRequest = ( input , context ) : any => { const entries = { } ; if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . VpcIds !== undefined && input . VpcIds !== null ) { const memberEntries = serializeAws_ec2VpcClassicLinkIdList ( input . VpcIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeVpcClassicLinkRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VpcIds !== undefined && input . VpcIds !== null ) { const memberEntries = serializeAws_ec2VpcClassicLinkIdList ( input . VpcIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DescribeVpcEndpointConnectionNotificationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ConnectionNotificationId !== undefined && input . ConnectionNotificationId !== null ) { entries [ "ConnectionNotificationId" ] = input . ConnectionNotificationId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeVpcEndpointConnectionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeVpcEndpointServiceConfigurationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ServiceIds !== undefined && input . ServiceIds !== null ) { const memberEntries = serializeAws_ec2VpcEndpointServiceIdList ( input . ServiceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ServiceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeVpcEndpointServicePermissionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ServiceId !== undefined && input . ServiceId !== null ) { entries [ "ServiceId" ] = input . ServiceId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeVpcEndpointServicesRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ServiceNames !== undefined && input . ServiceNames !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . ServiceNames , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ServiceName.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeVpcEndpointsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VpcEndpointIds !== undefined && input . VpcEndpointIds !== null ) { const memberEntries = serializeAws_ec2VpcEndpointIdList ( input . VpcEndpointIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcEndpointId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2DescribeVpcPeeringConnectionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VpcPeeringConnectionIds !== undefined && input . VpcPeeringConnectionIds !== null ) { const memberEntries = serializeAws_ec2VpcPeeringConnectionIdList ( input . VpcPeeringConnectionIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcPeeringConnectionId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeVpcsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . VpcIds !== undefined && input . VpcIds !== null ) { const memberEntries = serializeAws_ec2VpcIdStringList ( input . VpcIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2DescribeVpnConnectionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . VpnConnectionIds !== undefined && input . VpnConnectionIds !== null ) { const memberEntries = serializeAws_ec2VpnConnectionIdStringList ( input . VpnConnectionIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpnConnectionId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DescribeVpnGatewaysRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . VpnGatewayIds !== undefined && input . VpnGatewayIds !== null ) { const memberEntries = serializeAws_ec2VpnGatewayIdStringList ( input . VpnGatewayIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpnGatewayId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DestinationOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . FileFormat !== undefined && input . FileFormat !== null ) { entries [ "FileFormat" ] = input . FileFormat ; } if ( input . HiveCompatiblePartitions !== undefined && input . HiveCompatiblePartitions !== null ) { entries [ "HiveCompatiblePartitions" ] = input . HiveCompatiblePartitions ; } if ( input . PerHourPartition !== undefined && input . PerHourPartition !== null ) { entries [ "PerHourPartition" ] = input . PerHourPartition ; } return entries ; } ; const serializeAws_ec2DetachClassicLinkVpcRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } return entries ; } ; const serializeAws_ec2DetachInternetGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InternetGatewayId !== undefined && input . InternetGatewayId !== null ) { entries [ "InternetGatewayId" ] = input . InternetGatewayId ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } return entries ; } ; const serializeAws_ec2DetachNetworkInterfaceRequest = ( input , context ) : any => { const entries = { } ; if ( input . AttachmentId !== undefined && input . AttachmentId !== null ) { entries [ "AttachmentId" ] = input . AttachmentId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Force !== undefined && input . Force !== null ) { entries [ "Force" ] = input . Force ; } return entries ; } ; const serializeAws_ec2DetachVolumeRequest = ( input , context ) : any => { const entries = { } ; if ( input . Device !== undefined && input . Device !== null ) { entries [ "Device" ] = input . Device ; } if ( input . Force !== undefined && input . Force !== null ) { entries [ "Force" ] = input . Force ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . VolumeId !== undefined && input . VolumeId !== null ) { entries [ "VolumeId" ] = input . VolumeId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DetachVpnGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . VpnGatewayId !== undefined && input . VpnGatewayId !== null ) { entries [ "VpnGatewayId" ] = input . VpnGatewayId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DhcpOptionsIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `DhcpOptionsId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2DirectoryServiceAuthenticationRequest = ( input , context ) : any => { const entries = { } ; if ( input . DirectoryId !== undefined && input . DirectoryId !== null ) { entries [ "DirectoryId" ] = input . DirectoryId ; } return entries ; } ; const serializeAws_ec2DisableEbsEncryptionByDefaultRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DisableFastSnapshotRestoresRequest = ( input , context ) : any => { const entries = { } ; if ( input . AvailabilityZones !== undefined && input . AvailabilityZones !== null ) { const memberEntries = serializeAws_ec2AvailabilityZoneStringList ( input . AvailabilityZones , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AvailabilityZone.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SourceSnapshotIds !== undefined && input . SourceSnapshotIds !== null ) { const memberEntries = serializeAws_ec2SnapshotIdStringList ( input . SourceSnapshotIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SourceSnapshotId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DisableImageDeprecationRequest = ( input , context ) : any => { const entries = { } ; if ( input . ImageId !== undefined && input . ImageId !== null ) { entries [ "ImageId" ] = input . ImageId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DisableIpamOrganizationAdminAccountRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . DelegatedAdminAccountId !== undefined && input . DelegatedAdminAccountId !== null ) { entries [ "DelegatedAdminAccountId" ] = input . DelegatedAdminAccountId ; } return entries ; } ; const serializeAws_ec2DisableSerialConsoleAccessRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DisableTransitGatewayRouteTablePropagationRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayRouteTableId !== undefined && input . TransitGatewayRouteTableId !== null ) { entries [ "TransitGatewayRouteTableId" ] = input . TransitGatewayRouteTableId ; } if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DisableVgwRoutePropagationRequest = ( input , context ) : any => { const entries = { } ; if ( input . GatewayId !== undefined && input . GatewayId !== null ) { entries [ "GatewayId" ] = input . GatewayId ; } if ( input . RouteTableId !== undefined && input . RouteTableId !== null ) { entries [ "RouteTableId" ] = input . RouteTableId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DisableVpcClassicLinkDnsSupportRequest = ( input , context ) : any => { const entries = { } ; if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } return entries ; } ; const serializeAws_ec2DisableVpcClassicLinkRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } return entries ; } ; const serializeAws_ec2DisassociateAddressRequest = ( input , context ) : any => { const entries = { } ; if ( input . AssociationId !== undefined && input . AssociationId !== null ) { entries [ "AssociationId" ] = input . AssociationId ; } if ( input . PublicIp !== undefined && input . PublicIp !== null ) { entries [ "PublicIp" ] = input . PublicIp ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DisassociateClientVpnTargetNetworkRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . AssociationId !== undefined && input . AssociationId !== null ) { entries [ "AssociationId" ] = input . AssociationId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DisassociateEnclaveCertificateIamRoleRequest = ( input , context ) : any => { const entries = { } ; if ( input . CertificateArn !== undefined && input . CertificateArn !== null ) { entries [ "CertificateArn" ] = input . CertificateArn ; } if ( input . RoleArn !== undefined && input . RoleArn !== null ) { entries [ "RoleArn" ] = input . RoleArn ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DisassociateIamInstanceProfileRequest = ( input , context ) : any => { const entries = { } ; if ( input . AssociationId !== undefined && input . AssociationId !== null ) { entries [ "AssociationId" ] = input . AssociationId ; } return entries ; } ; const serializeAws_ec2DisassociateInstanceEventWindowRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceEventWindowId !== undefined && input . InstanceEventWindowId !== null ) { entries [ "InstanceEventWindowId" ] = input . InstanceEventWindowId ; } if ( input . AssociationTarget !== undefined && input . AssociationTarget !== null ) { const memberEntries = serializeAws_ec2InstanceEventWindowDisassociationRequest ( input . AssociationTarget , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AssociationTarget.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DisassociateRouteTableRequest = ( input , context ) : any => { const entries = { } ; if ( input . AssociationId !== undefined && input . AssociationId !== null ) { entries [ "AssociationId" ] = input . AssociationId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DisassociateSubnetCidrBlockRequest = ( input , context ) : any => { const entries = { } ; if ( input . AssociationId !== undefined && input . AssociationId !== null ) { entries [ "AssociationId" ] = input . AssociationId ; } return entries ; } ; const serializeAws_ec2DisassociateTransitGatewayMulticastDomainRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayMulticastDomainId !== undefined && input . TransitGatewayMulticastDomainId !== null ) { entries [ "TransitGatewayMulticastDomainId" ] = input . TransitGatewayMulticastDomainId ; } if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . SubnetIds !== undefined && input . SubnetIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewaySubnetIdList ( input . SubnetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SubnetIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DisassociateTransitGatewayRouteTableRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayRouteTableId !== undefined && input . TransitGatewayRouteTableId !== null ) { entries [ "TransitGatewayRouteTableId" ] = input . TransitGatewayRouteTableId ; } if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DisassociateTrunkInterfaceRequest = ( input , context ) : any => { const entries = { } ; if ( input . AssociationId !== undefined && input . AssociationId !== null ) { entries [ "AssociationId" ] = input . AssociationId ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2DisassociateVpcCidrBlockRequest = ( input , context ) : any => { const entries = { } ; if ( input . AssociationId !== undefined && input . AssociationId !== null ) { entries [ "AssociationId" ] = input . AssociationId ; } return entries ; } ; const serializeAws_ec2DiskImage = ( input , context ) : any => { const entries = { } ; if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . Image !== undefined && input . Image !== null ) { const memberEntries = serializeAws_ec2DiskImageDetail ( input . Image , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Image.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Volume !== undefined && input . Volume !== null ) { const memberEntries = serializeAws_ec2VolumeDetail ( input . Volume , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Volume.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2DiskImageDetail = ( input , context ) : any => { const entries = { } ; if ( input . Bytes !== undefined && input . Bytes !== null ) { entries [ "Bytes" ] = input . Bytes ; } if ( input . Format !== undefined && input . Format !== null ) { entries [ "Format" ] = input . Format ; } if ( input . ImportManifestUrl !== undefined && input . ImportManifestUrl !== null ) { entries [ "ImportManifestUrl" ] = input . ImportManifestUrl ; } return entries ; } ; const serializeAws_ec2DiskImageList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2DiskImage ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Member.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2DnsServersOptionsModifyStructure = ( input , context ) : any => { const entries = { } ; if ( input . CustomDnsServers !== undefined && input . CustomDnsServers !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . CustomDnsServers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CustomDnsServers.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Enabled !== undefined && input . Enabled !== null ) { entries [ "Enabled" ] = input . Enabled ; } return entries ; } ; const serializeAws_ec2EbsBlockDevice = ( input , context ) : any => { const entries = { } ; if ( input . DeleteOnTermination !== undefined && input . DeleteOnTermination !== null ) { entries [ "DeleteOnTermination" ] = input . DeleteOnTermination ; } if ( input . Iops !== undefined && input . Iops !== null ) { entries [ "Iops" ] = input . Iops ; } if ( input . SnapshotId !== undefined && input . SnapshotId !== null ) { entries [ "SnapshotId" ] = input . SnapshotId ; } if ( input . VolumeSize !== undefined && input . VolumeSize !== null ) { entries [ "VolumeSize" ] = input . VolumeSize ; } if ( input . VolumeType !== undefined && input . VolumeType !== null ) { entries [ "VolumeType" ] = input . VolumeType ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . Throughput !== undefined && input . Throughput !== null ) { entries [ "Throughput" ] = input . Throughput ; } if ( input . OutpostArn !== undefined && input . OutpostArn !== null ) { entries [ "OutpostArn" ] = input . OutpostArn ; } if ( input . Encrypted !== undefined && input . Encrypted !== null ) { entries [ "Encrypted" ] = input . Encrypted ; } return entries ; } ; const serializeAws_ec2EbsInstanceBlockDeviceSpecification = ( input , context ) : any => { const entries = { } ; if ( input . DeleteOnTermination !== undefined && input . DeleteOnTermination !== null ) { entries [ "DeleteOnTermination" ] = input . DeleteOnTermination ; } if ( input . VolumeId !== undefined && input . VolumeId !== null ) { entries [ "VolumeId" ] = input . VolumeId ; } return entries ; } ; const serializeAws_ec2EgressOnlyInternetGatewayIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ElasticGpuIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ElasticGpuSpecification = ( input , context ) : any => { const entries = { } ; if ( input . Type !== undefined && input . Type !== null ) { entries [ "Type" ] = input . Type ; } return entries ; } ; const serializeAws_ec2ElasticGpuSpecificationList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2ElasticGpuSpecification ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `ElasticGpuSpecification.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2ElasticGpuSpecifications = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2ElasticGpuSpecification ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2ElasticInferenceAccelerator = ( input , context ) : any => { const entries = { } ; if ( input . Type !== undefined && input . Type !== null ) { entries [ "Type" ] = input . Type ; } if ( input . Count !== undefined && input . Count !== null ) { entries [ "Count" ] = input . Count ; } return entries ; } ; const serializeAws_ec2ElasticInferenceAccelerators = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2ElasticInferenceAccelerator ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2EnableEbsEncryptionByDefaultRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2EnableFastSnapshotRestoresRequest = ( input , context ) : any => { const entries = { } ; if ( input . AvailabilityZones !== undefined && input . AvailabilityZones !== null ) { const memberEntries = serializeAws_ec2AvailabilityZoneStringList ( input . AvailabilityZones , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AvailabilityZone.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SourceSnapshotIds !== undefined && input . SourceSnapshotIds !== null ) { const memberEntries = serializeAws_ec2SnapshotIdStringList ( input . SourceSnapshotIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SourceSnapshotId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2EnableImageDeprecationRequest = ( input , context ) : any => { const entries = { } ; if ( input . ImageId !== undefined && input . ImageId !== null ) { entries [ "ImageId" ] = input . ImageId ; } if ( input . DeprecateAt !== undefined && input . DeprecateAt !== null ) { entries [ "DeprecateAt" ] = input . DeprecateAt . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2EnableIpamOrganizationAdminAccountRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . DelegatedAdminAccountId !== undefined && input . DelegatedAdminAccountId !== null ) { entries [ "DelegatedAdminAccountId" ] = input . DelegatedAdminAccountId ; } return entries ; } ; const serializeAws_ec2EnableSerialConsoleAccessRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2EnableTransitGatewayRouteTablePropagationRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayRouteTableId !== undefined && input . TransitGatewayRouteTableId !== null ) { entries [ "TransitGatewayRouteTableId" ] = input . TransitGatewayRouteTableId ; } if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2EnableVgwRoutePropagationRequest = ( input , context ) : any => { const entries = { } ; if ( input . GatewayId !== undefined && input . GatewayId !== null ) { entries [ "GatewayId" ] = input . GatewayId ; } if ( input . RouteTableId !== undefined && input . RouteTableId !== null ) { entries [ "RouteTableId" ] = input . RouteTableId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2EnableVolumeIORequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VolumeId !== undefined && input . VolumeId !== null ) { entries [ "VolumeId" ] = input . VolumeId ; } return entries ; } ; const serializeAws_ec2EnableVpcClassicLinkDnsSupportRequest = ( input , context ) : any => { const entries = { } ; if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } return entries ; } ; const serializeAws_ec2EnableVpcClassicLinkRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } return entries ; } ; const serializeAws_ec2EnclaveOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Enabled !== undefined && input . Enabled !== null ) { entries [ "Enabled" ] = input . Enabled ; } return entries ; } ; const serializeAws_ec2ExcludedInstanceTypeSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ExecutableByStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `ExecutableBy.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ExportClientVpnClientCertificateRevocationListRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ExportClientVpnClientConfigurationRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ExportImageRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DiskImageFormat !== undefined && input . DiskImageFormat !== null ) { entries [ "DiskImageFormat" ] = input . DiskImageFormat ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ImageId !== undefined && input . ImageId !== null ) { entries [ "ImageId" ] = input . ImageId ; } if ( input . S3ExportLocation !== undefined && input . S3ExportLocation !== null ) { const memberEntries = serializeAws_ec2ExportTaskS3LocationRequest ( input . S3ExportLocation , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `S3ExportLocation.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . RoleName !== undefined && input . RoleName !== null ) { entries [ "RoleName" ] = input . RoleName ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ExportImageTaskIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `ExportImageTaskId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ExportTaskIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `ExportTaskId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ExportTaskS3LocationRequest = ( input , context ) : any => { const entries = { } ; if ( input . S3Bucket !== undefined && input . S3Bucket !== null ) { entries [ "S3Bucket" ] = input . S3Bucket ; } if ( input . S3Prefix !== undefined && input . S3Prefix !== null ) { entries [ "S3Prefix" ] = input . S3Prefix ; } return entries ; } ; const serializeAws_ec2ExportToS3TaskSpecification = ( input , context ) : any => { const entries = { } ; if ( input . ContainerFormat !== undefined && input . ContainerFormat !== null ) { entries [ "ContainerFormat" ] = input . ContainerFormat ; } if ( input . DiskImageFormat !== undefined && input . DiskImageFormat !== null ) { entries [ "DiskImageFormat" ] = input . DiskImageFormat ; } if ( input . S3Bucket !== undefined && input . S3Bucket !== null ) { entries [ "S3Bucket" ] = input . S3Bucket ; } if ( input . S3Prefix !== undefined && input . S3Prefix !== null ) { entries [ "S3Prefix" ] = input . S3Prefix ; } return entries ; } ; const serializeAws_ec2ExportTransitGatewayRoutesRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayRouteTableId !== undefined && input . TransitGatewayRouteTableId !== null ) { entries [ "TransitGatewayRouteTableId" ] = input . TransitGatewayRouteTableId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . S3Bucket !== undefined && input . S3Bucket !== null ) { entries [ "S3Bucket" ] = input . S3Bucket ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2FederatedAuthenticationRequest = ( input , context ) : any => { const entries = { } ; if ( input . SAMLProviderArn !== undefined && input . SAMLProviderArn !== null ) { entries [ "SAMLProviderArn" ] = input . SAMLProviderArn ; } if ( input . SelfServiceSAMLProviderArn !== undefined && input . SelfServiceSAMLProviderArn !== null ) { entries [ "SelfServiceSAMLProviderArn" ] = input . SelfServiceSAMLProviderArn ; } return entries ; } ; const serializeAws_ec2Filter = ( input , context ) : any => { const entries = { } ; if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } if ( input . Values !== undefined && input . Values !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . Values , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Value.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2FilterList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2Filter ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Filter.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2FleetIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2FleetLaunchTemplateConfigListRequest = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2FleetLaunchTemplateConfigRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2FleetLaunchTemplateConfigRequest = ( input , context ) : any => { const entries = { } ; if ( input . LaunchTemplateSpecification !== undefined && input . LaunchTemplateSpecification !== null ) { const memberEntries = serializeAws_ec2FleetLaunchTemplateSpecificationRequest ( input . LaunchTemplateSpecification , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchTemplateSpecification.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Overrides !== undefined && input . Overrides !== null ) { const memberEntries = serializeAws_ec2FleetLaunchTemplateOverridesListRequest ( input . Overrides , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Overrides.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2FleetLaunchTemplateOverridesListRequest = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2FleetLaunchTemplateOverridesRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2FleetLaunchTemplateOverridesRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceType !== undefined && input . InstanceType !== null ) { entries [ "InstanceType" ] = input . InstanceType ; } if ( input . MaxPrice !== undefined && input . MaxPrice !== null ) { entries [ "MaxPrice" ] = input . MaxPrice ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . WeightedCapacity !== undefined && input . WeightedCapacity !== null ) { entries [ "WeightedCapacity" ] = __serializeFloat ( input . WeightedCapacity ) ; } if ( input . Priority !== undefined && input . Priority !== null ) { entries [ "Priority" ] = __serializeFloat ( input . Priority ) ; } if ( input . Placement !== undefined && input . Placement !== null ) { const memberEntries = serializeAws_ec2Placement ( input . Placement , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Placement.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceRequirements !== undefined && input . InstanceRequirements !== null ) { const memberEntries = serializeAws_ec2InstanceRequirementsRequest ( input . InstanceRequirements , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceRequirements.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2FleetLaunchTemplateSpecification = ( input , context ) : any => { const entries = { } ; if ( input . LaunchTemplateId !== undefined && input . LaunchTemplateId !== null ) { entries [ "LaunchTemplateId" ] = input . LaunchTemplateId ; } if ( input . LaunchTemplateName !== undefined && input . LaunchTemplateName !== null ) { entries [ "LaunchTemplateName" ] = input . LaunchTemplateName ; } if ( input . Version !== undefined && input . Version !== null ) { entries [ "Version" ] = input . Version ; } return entries ; } ; const serializeAws_ec2FleetLaunchTemplateSpecificationRequest = ( input , context ) : any => { const entries = { } ; if ( input . LaunchTemplateId !== undefined && input . LaunchTemplateId !== null ) { entries [ "LaunchTemplateId" ] = input . LaunchTemplateId ; } if ( input . LaunchTemplateName !== undefined && input . LaunchTemplateName !== null ) { entries [ "LaunchTemplateName" ] = input . LaunchTemplateName ; } if ( input . Version !== undefined && input . Version !== null ) { entries [ "Version" ] = input . Version ; } return entries ; } ; const serializeAws_ec2FleetSpotCapacityRebalanceRequest = ( input , context ) : any => { const entries = { } ; if ( input . ReplacementStrategy !== undefined && input . ReplacementStrategy !== null ) { entries [ "ReplacementStrategy" ] = input . ReplacementStrategy ; } if ( input . TerminationDelay !== undefined && input . TerminationDelay !== null ) { entries [ "TerminationDelay" ] = input . TerminationDelay ; } return entries ; } ; const serializeAws_ec2FleetSpotMaintenanceStrategiesRequest = ( input , context ) : any => { const entries = { } ; if ( input . CapacityRebalance !== undefined && input . CapacityRebalance !== null ) { const memberEntries = serializeAws_ec2FleetSpotCapacityRebalanceRequest ( input . CapacityRebalance , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CapacityRebalance.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2FlowLogIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2FlowLogResourceIds = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2FpgaImageIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2GetAssociatedEnclaveCertificateIamRolesRequest = ( input , context ) : any => { const entries = { } ; if ( input . CertificateArn !== undefined && input . CertificateArn !== null ) { entries [ "CertificateArn" ] = input . CertificateArn ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetAssociatedIpv6PoolCidrsRequest = ( input , context ) : any => { const entries = { } ; if ( input . PoolId !== undefined && input . PoolId !== null ) { entries [ "PoolId" ] = input . PoolId ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetCapacityReservationUsageRequest = ( input , context ) : any => { const entries = { } ; if ( input . CapacityReservationId !== undefined && input . CapacityReservationId !== null ) { entries [ "CapacityReservationId" ] = input . CapacityReservationId ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetCoipPoolUsageRequest = ( input , context ) : any => { const entries = { } ; if ( input . PoolId !== undefined && input . PoolId !== null ) { entries [ "PoolId" ] = input . PoolId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetConsoleOutputRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Latest !== undefined && input . Latest !== null ) { entries [ "Latest" ] = input . Latest ; } return entries ; } ; const serializeAws_ec2GetConsoleScreenshotRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . WakeUp !== undefined && input . WakeUp !== null ) { entries [ "WakeUp" ] = input . WakeUp ; } return entries ; } ; const serializeAws_ec2GetDefaultCreditSpecificationRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceFamily !== undefined && input . InstanceFamily !== null ) { entries [ "InstanceFamily" ] = input . InstanceFamily ; } return entries ; } ; const serializeAws_ec2GetEbsDefaultKmsKeyIdRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetEbsEncryptionByDefaultRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetFlowLogsIntegrationTemplateRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . FlowLogId !== undefined && input . FlowLogId !== null ) { entries [ "FlowLogId" ] = input . FlowLogId ; } if ( input . ConfigDeliveryS3DestinationArn !== undefined && input . ConfigDeliveryS3DestinationArn !== null ) { entries [ "ConfigDeliveryS3DestinationArn" ] = input . ConfigDeliveryS3DestinationArn ; } if ( input . IntegrateServices !== undefined && input . IntegrateServices !== null ) { const memberEntries = serializeAws_ec2IntegrateServices ( input . IntegrateServices , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IntegrateService.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2GetGroupsForCapacityReservationRequest = ( input , context ) : any => { const entries = { } ; if ( input . CapacityReservationId !== undefined && input . CapacityReservationId !== null ) { entries [ "CapacityReservationId" ] = input . CapacityReservationId ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetHostReservationPurchasePreviewRequest = ( input , context ) : any => { const entries = { } ; if ( input . HostIdSet !== undefined && input . HostIdSet !== null ) { const memberEntries = serializeAws_ec2RequestHostIdSet ( input . HostIdSet , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `HostIdSet.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . OfferingId !== undefined && input . OfferingId !== null ) { entries [ "OfferingId" ] = input . OfferingId ; } return entries ; } ; const serializeAws_ec2GetInstanceTypesFromInstanceRequirementsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ArchitectureTypes !== undefined && input . ArchitectureTypes !== null ) { const memberEntries = serializeAws_ec2ArchitectureTypeSet ( input . ArchitectureTypes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ArchitectureType.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . VirtualizationTypes !== undefined && input . VirtualizationTypes !== null ) { const memberEntries = serializeAws_ec2VirtualizationTypeSet ( input . VirtualizationTypes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VirtualizationType.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceRequirements !== undefined && input . InstanceRequirements !== null ) { const memberEntries = serializeAws_ec2InstanceRequirementsRequest ( input . InstanceRequirements , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceRequirements.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2GetIpamAddressHistoryRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Cidr !== undefined && input . Cidr !== null ) { entries [ "Cidr" ] = input . Cidr ; } if ( input . IpamScopeId !== undefined && input . IpamScopeId !== null ) { entries [ "IpamScopeId" ] = input . IpamScopeId ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . StartTime !== undefined && input . StartTime !== null ) { entries [ "StartTime" ] = input . StartTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . EndTime !== undefined && input . EndTime !== null ) { entries [ "EndTime" ] = input . EndTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2GetIpamPoolAllocationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . IpamPoolId !== undefined && input . IpamPoolId !== null ) { entries [ "IpamPoolId" ] = input . IpamPoolId ; } if ( input . IpamPoolAllocationId !== undefined && input . IpamPoolAllocationId !== null ) { entries [ "IpamPoolAllocationId" ] = input . IpamPoolAllocationId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2GetIpamPoolCidrsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . IpamPoolId !== undefined && input . IpamPoolId !== null ) { entries [ "IpamPoolId" ] = input . IpamPoolId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2GetIpamResourceCidrsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . IpamScopeId !== undefined && input . IpamScopeId !== null ) { entries [ "IpamScopeId" ] = input . IpamScopeId ; } if ( input . IpamPoolId !== undefined && input . IpamPoolId !== null ) { entries [ "IpamPoolId" ] = input . IpamPoolId ; } if ( input . ResourceId !== undefined && input . ResourceId !== null ) { entries [ "ResourceId" ] = input . ResourceId ; } if ( input . ResourceType !== undefined && input . ResourceType !== null ) { entries [ "ResourceType" ] = input . ResourceType ; } if ( input . ResourceTag !== undefined && input . ResourceTag !== null ) { const memberEntries = serializeAws_ec2RequestIpamResourceTag ( input . ResourceTag , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ResourceTag.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ResourceOwner !== undefined && input . ResourceOwner !== null ) { entries [ "ResourceOwner" ] = input . ResourceOwner ; } return entries ; } ; const serializeAws_ec2GetLaunchTemplateDataRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } return entries ; } ; const serializeAws_ec2GetManagedPrefixListAssociationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . PrefixListId !== undefined && input . PrefixListId !== null ) { entries [ "PrefixListId" ] = input . PrefixListId ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2GetManagedPrefixListEntriesRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . PrefixListId !== undefined && input . PrefixListId !== null ) { entries [ "PrefixListId" ] = input . PrefixListId ; } if ( input . TargetVersion !== undefined && input . TargetVersion !== null ) { entries [ "TargetVersion" ] = input . TargetVersion ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2GetNetworkInsightsAccessScopeAnalysisFindingsRequest = ( input , context ) : any => { const entries = { } ; if ( input . NetworkInsightsAccessScopeAnalysisId !== undefined && input . NetworkInsightsAccessScopeAnalysisId !== null ) { entries [ "NetworkInsightsAccessScopeAnalysisId" ] = input . NetworkInsightsAccessScopeAnalysisId ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetNetworkInsightsAccessScopeContentRequest = ( input , context ) : any => { const entries = { } ; if ( input . NetworkInsightsAccessScopeId !== undefined && input . NetworkInsightsAccessScopeId !== null ) { entries [ "NetworkInsightsAccessScopeId" ] = input . NetworkInsightsAccessScopeId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetPasswordDataRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetReservedInstancesExchangeQuoteRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ReservedInstanceIds !== undefined && input . ReservedInstanceIds !== null ) { const memberEntries = serializeAws_ec2ReservedInstanceIdSet ( input . ReservedInstanceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ReservedInstanceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . TargetConfigurations !== undefined && input . TargetConfigurations !== null ) { const memberEntries = serializeAws_ec2TargetConfigurationRequestSet ( input . TargetConfigurations , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TargetConfiguration.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2GetSerialConsoleAccessStatusRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetSpotPlacementScoresRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceTypes !== undefined && input . InstanceTypes !== null ) { const memberEntries = serializeAws_ec2InstanceTypes ( input . InstanceTypes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceType.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . TargetCapacity !== undefined && input . TargetCapacity !== null ) { entries [ "TargetCapacity" ] = input . TargetCapacity ; } if ( input . TargetCapacityUnitType !== undefined && input . TargetCapacityUnitType !== null ) { entries [ "TargetCapacityUnitType" ] = input . TargetCapacityUnitType ; } if ( input . SingleAvailabilityZone !== undefined && input . SingleAvailabilityZone !== null ) { entries [ "SingleAvailabilityZone" ] = input . SingleAvailabilityZone ; } if ( input . RegionNames !== undefined && input . RegionNames !== null ) { const memberEntries = serializeAws_ec2RegionNames ( input . RegionNames , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RegionName.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceRequirementsWithMetadata !== undefined && input . InstanceRequirementsWithMetadata !== null ) { const memberEntries = serializeAws_ec2InstanceRequirementsWithMetadataRequest ( input . InstanceRequirementsWithMetadata , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceRequirementsWithMetadata.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } return entries ; } ; const serializeAws_ec2GetSubnetCidrReservationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } return entries ; } ; const serializeAws_ec2GetTransitGatewayAttachmentPropagationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetTransitGatewayMulticastDomainAssociationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayMulticastDomainId !== undefined && input . TransitGatewayMulticastDomainId !== null ) { entries [ "TransitGatewayMulticastDomainId" ] = input . TransitGatewayMulticastDomainId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetTransitGatewayPrefixListReferencesRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayRouteTableId !== undefined && input . TransitGatewayRouteTableId !== null ) { entries [ "TransitGatewayRouteTableId" ] = input . TransitGatewayRouteTableId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetTransitGatewayRouteTableAssociationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayRouteTableId !== undefined && input . TransitGatewayRouteTableId !== null ) { entries [ "TransitGatewayRouteTableId" ] = input . TransitGatewayRouteTableId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetTransitGatewayRouteTablePropagationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayRouteTableId !== undefined && input . TransitGatewayRouteTableId !== null ) { entries [ "TransitGatewayRouteTableId" ] = input . TransitGatewayRouteTableId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetVpnConnectionDeviceSampleConfigurationRequest = ( input , context ) : any => { const entries = { } ; if ( input . VpnConnectionId !== undefined && input . VpnConnectionId !== null ) { entries [ "VpnConnectionId" ] = input . VpnConnectionId ; } if ( input . VpnConnectionDeviceTypeId !== undefined && input . VpnConnectionDeviceTypeId !== null ) { entries [ "VpnConnectionDeviceTypeId" ] = input . VpnConnectionDeviceTypeId ; } if ( input . InternetKeyExchangeVersion !== undefined && input . InternetKeyExchangeVersion !== null ) { entries [ "InternetKeyExchangeVersion" ] = input . InternetKeyExchangeVersion ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GetVpnConnectionDeviceTypesRequest = ( input , context ) : any => { const entries = { } ; if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2GroupIdentifier = ( input , context ) : any => { const entries = { } ; if ( input . GroupName !== undefined && input . GroupName !== null ) { entries [ "GroupName" ] = input . GroupName ; } if ( input . GroupId !== undefined && input . GroupId !== null ) { entries [ "GroupId" ] = input . GroupId ; } return entries ; } ; const serializeAws_ec2GroupIdentifierList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2GroupIdentifier ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2GroupIds = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2GroupIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `GroupId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2GroupNameStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `GroupName.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2HibernationOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Configured !== undefined && input . Configured !== null ) { entries [ "Configured" ] = input . Configured ; } return entries ; } ; const serializeAws_ec2HostReservationIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2IamInstanceProfileSpecification = ( input , context ) : any => { const entries = { } ; if ( input . Arn !== undefined && input . Arn !== null ) { entries [ "Arn" ] = input . Arn ; } if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } return entries ; } ; const serializeAws_ec2IcmpTypeCode = ( input , context ) : any => { const entries = { } ; if ( input . Code !== undefined && input . Code !== null ) { entries [ "Code" ] = input . Code ; } if ( input . Type !== undefined && input . Type !== null ) { entries [ "Type" ] = input . Type ; } return entries ; } ; const serializeAws_ec2IKEVersionsRequestList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2IKEVersionsRequestListValue ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2IKEVersionsRequestListValue = ( input , context ) : any => { const entries = { } ; if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } return entries ; } ; const serializeAws_ec2ImageDiskContainer = ( input , context ) : any => { const entries = { } ; if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DeviceName !== undefined && input . DeviceName !== null ) { entries [ "DeviceName" ] = input . DeviceName ; } if ( input . Format !== undefined && input . Format !== null ) { entries [ "Format" ] = input . Format ; } if ( input . SnapshotId !== undefined && input . SnapshotId !== null ) { entries [ "SnapshotId" ] = input . SnapshotId ; } if ( input . Url !== undefined && input . Url !== null ) { entries [ "Url" ] = input . Url ; } if ( input . UserBucket !== undefined && input . UserBucket !== null ) { const memberEntries = serializeAws_ec2UserBucket ( input . UserBucket , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `UserBucket.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ImageDiskContainerList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2ImageDiskContainer ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2ImageIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ImageIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `ImageId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ImportClientVpnClientCertificateRevocationListRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . CertificateRevocationList !== undefined && input . CertificateRevocationList !== null ) { entries [ "CertificateRevocationList" ] = input . CertificateRevocationList ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ImportImageLicenseConfigurationRequest = ( input , context ) : any => { const entries = { } ; if ( input . LicenseConfigurationArn !== undefined && input . LicenseConfigurationArn !== null ) { entries [ "LicenseConfigurationArn" ] = input . LicenseConfigurationArn ; } return entries ; } ; const serializeAws_ec2ImportImageLicenseSpecificationListRequest = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2ImportImageLicenseConfigurationRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2ImportImageRequest = ( input , context ) : any => { const entries = { } ; if ( input . Architecture !== undefined && input . Architecture !== null ) { entries [ "Architecture" ] = input . Architecture ; } if ( input . ClientData !== undefined && input . ClientData !== null ) { const memberEntries = serializeAws_ec2ClientData ( input . ClientData , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ClientData.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DiskContainers !== undefined && input . DiskContainers !== null ) { const memberEntries = serializeAws_ec2ImageDiskContainerList ( input . DiskContainers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DiskContainer.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Encrypted !== undefined && input . Encrypted !== null ) { entries [ "Encrypted" ] = input . Encrypted ; } if ( input . Hypervisor !== undefined && input . Hypervisor !== null ) { entries [ "Hypervisor" ] = input . Hypervisor ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . LicenseType !== undefined && input . LicenseType !== null ) { entries [ "LicenseType" ] = input . LicenseType ; } if ( input . Platform !== undefined && input . Platform !== null ) { entries [ "Platform" ] = input . Platform ; } if ( input . RoleName !== undefined && input . RoleName !== null ) { entries [ "RoleName" ] = input . RoleName ; } if ( input . LicenseSpecifications !== undefined && input . LicenseSpecifications !== null ) { const memberEntries = serializeAws_ec2ImportImageLicenseSpecificationListRequest ( input . LicenseSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LicenseSpecifications.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . UsageOperation !== undefined && input . UsageOperation !== null ) { entries [ "UsageOperation" ] = input . UsageOperation ; } if ( input . BootMode !== undefined && input . BootMode !== null ) { entries [ "BootMode" ] = input . BootMode ; } return entries ; } ; const serializeAws_ec2ImportInstanceLaunchSpecification = ( input , context ) : any => { const entries = { } ; if ( input . AdditionalInfo !== undefined && input . AdditionalInfo !== null ) { entries [ "AdditionalInfo" ] = input . AdditionalInfo ; } if ( input . Architecture !== undefined && input . Architecture !== null ) { entries [ "Architecture" ] = input . Architecture ; } if ( input . GroupIds !== undefined && input . GroupIds !== null ) { const memberEntries = serializeAws_ec2SecurityGroupIdStringList ( input . GroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `GroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . GroupNames !== undefined && input . GroupNames !== null ) { const memberEntries = serializeAws_ec2SecurityGroupStringList ( input . GroupNames , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `GroupName.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceInitiatedShutdownBehavior !== undefined && input . InstanceInitiatedShutdownBehavior !== null ) { entries [ "InstanceInitiatedShutdownBehavior" ] = input . InstanceInitiatedShutdownBehavior ; } if ( input . InstanceType !== undefined && input . InstanceType !== null ) { entries [ "InstanceType" ] = input . InstanceType ; } if ( input . Monitoring !== undefined && input . Monitoring !== null ) { entries [ "Monitoring" ] = input . Monitoring ; } if ( input . Placement !== undefined && input . Placement !== null ) { const memberEntries = serializeAws_ec2Placement ( input . Placement , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Placement.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . PrivateIpAddress !== undefined && input . PrivateIpAddress !== null ) { entries [ "PrivateIpAddress" ] = input . PrivateIpAddress ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . UserData !== undefined && input . UserData !== null ) { const memberEntries = serializeAws_ec2UserData ( input . UserData , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `UserData.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ImportInstanceRequest = ( input , context ) : any => { const entries = { } ; if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DiskImages !== undefined && input . DiskImages !== null ) { const memberEntries = serializeAws_ec2DiskImageList ( input . DiskImages , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DiskImage.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . LaunchSpecification !== undefined && input . LaunchSpecification !== null ) { const memberEntries = serializeAws_ec2ImportInstanceLaunchSpecification ( input . LaunchSpecification , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchSpecification.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Platform !== undefined && input . Platform !== null ) { entries [ "Platform" ] = input . Platform ; } return entries ; } ; const serializeAws_ec2ImportKeyPairRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . KeyName !== undefined && input . KeyName !== null ) { entries [ "KeyName" ] = input . KeyName ; } if ( input . PublicKeyMaterial !== undefined && input . PublicKeyMaterial !== null ) { entries [ "PublicKeyMaterial" ] = context . base64Encoder ( input . PublicKeyMaterial ) ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ImportSnapshotRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientData !== undefined && input . ClientData !== null ) { const memberEntries = serializeAws_ec2ClientData ( input . ClientData , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ClientData.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DiskContainer !== undefined && input . DiskContainer !== null ) { const memberEntries = serializeAws_ec2SnapshotDiskContainer ( input . DiskContainer , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DiskContainer.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Encrypted !== undefined && input . Encrypted !== null ) { entries [ "Encrypted" ] = input . Encrypted ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . RoleName !== undefined && input . RoleName !== null ) { entries [ "RoleName" ] = input . RoleName ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ImportSnapshotTaskIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `ImportTaskId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ImportTaskIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `ImportTaskId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ImportVolumeRequest = ( input , context ) : any => { const entries = { } ; if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Image !== undefined && input . Image !== null ) { const memberEntries = serializeAws_ec2DiskImageDetail ( input . Image , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Image.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Volume !== undefined && input . Volume !== null ) { const memberEntries = serializeAws_ec2VolumeDetail ( input . Volume , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Volume.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2InsideCidrBlocksStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2InstanceBlockDeviceMappingSpecification = ( input , context ) : any => { const entries = { } ; if ( input . DeviceName !== undefined && input . DeviceName !== null ) { entries [ "DeviceName" ] = input . DeviceName ; } if ( input . Ebs !== undefined && input . Ebs !== null ) { const memberEntries = serializeAws_ec2EbsInstanceBlockDeviceSpecification ( input . Ebs , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ebs.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . NoDevice !== undefined && input . NoDevice !== null ) { entries [ "NoDevice" ] = input . NoDevice ; } if ( input . VirtualName !== undefined && input . VirtualName !== null ) { entries [ "VirtualName" ] = input . VirtualName ; } return entries ; } ; const serializeAws_ec2InstanceBlockDeviceMappingSpecificationList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2InstanceBlockDeviceMappingSpecification ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2InstanceCreditSpecificationListRequest = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2InstanceCreditSpecificationRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2InstanceCreditSpecificationRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . CpuCredits !== undefined && input . CpuCredits !== null ) { entries [ "CpuCredits" ] = input . CpuCredits ; } return entries ; } ; const serializeAws_ec2InstanceEventWindowAssociationRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceIds !== undefined && input . InstanceIds !== null ) { const memberEntries = serializeAws_ec2InstanceIdList ( input . InstanceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceTags !== undefined && input . InstanceTags !== null ) { const memberEntries = serializeAws_ec2TagList ( input . InstanceTags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceTag.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DedicatedHostIds !== undefined && input . DedicatedHostIds !== null ) { const memberEntries = serializeAws_ec2DedicatedHostIdList ( input . DedicatedHostIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DedicatedHostId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2InstanceEventWindowDisassociationRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceIds !== undefined && input . InstanceIds !== null ) { const memberEntries = serializeAws_ec2InstanceIdList ( input . InstanceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceTags !== undefined && input . InstanceTags !== null ) { const memberEntries = serializeAws_ec2TagList ( input . InstanceTags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceTag.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DedicatedHostIds !== undefined && input . DedicatedHostIds !== null ) { const memberEntries = serializeAws_ec2DedicatedHostIdList ( input . DedicatedHostIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DedicatedHostId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2InstanceEventWindowIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `InstanceEventWindowId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2InstanceEventWindowTimeRangeRequest = ( input , context ) : any => { const entries = { } ; if ( input . StartWeekDay !== undefined && input . StartWeekDay !== null ) { entries [ "StartWeekDay" ] = input . StartWeekDay ; } if ( input . StartHour !== undefined && input . StartHour !== null ) { entries [ "StartHour" ] = input . StartHour ; } if ( input . EndWeekDay !== undefined && input . EndWeekDay !== null ) { entries [ "EndWeekDay" ] = input . EndWeekDay ; } if ( input . EndHour !== undefined && input . EndHour !== null ) { entries [ "EndHour" ] = input . EndHour ; } return entries ; } ; const serializeAws_ec2InstanceEventWindowTimeRangeRequestSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2InstanceEventWindowTimeRangeRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Member.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2InstanceGenerationSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2InstanceIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2InstanceIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `InstanceId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2InstanceIpv6Address = ( input , context ) : any => { const entries = { } ; if ( input . Ipv6Address !== undefined && input . Ipv6Address !== null ) { entries [ "Ipv6Address" ] = input . Ipv6Address ; } return entries ; } ; const serializeAws_ec2InstanceIpv6AddressList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2InstanceIpv6Address ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2InstanceIpv6AddressListRequest = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2InstanceIpv6AddressRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `InstanceIpv6Address.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2InstanceIpv6AddressRequest = ( input , context ) : any => { const entries = { } ; if ( input . Ipv6Address !== undefined && input . Ipv6Address !== null ) { entries [ "Ipv6Address" ] = input . Ipv6Address ; } return entries ; } ; const serializeAws_ec2InstanceMarketOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . MarketType !== undefined && input . MarketType !== null ) { entries [ "MarketType" ] = input . MarketType ; } if ( input . SpotOptions !== undefined && input . SpotOptions !== null ) { const memberEntries = serializeAws_ec2SpotMarketOptions ( input . SpotOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SpotOptions.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2InstanceMetadataOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . HttpTokens !== undefined && input . HttpTokens !== null ) { entries [ "HttpTokens" ] = input . HttpTokens ; } if ( input . HttpPutResponseHopLimit !== undefined && input . HttpPutResponseHopLimit !== null ) { entries [ "HttpPutResponseHopLimit" ] = input . HttpPutResponseHopLimit ; } if ( input . HttpEndpoint !== undefined && input . HttpEndpoint !== null ) { entries [ "HttpEndpoint" ] = input . HttpEndpoint ; } if ( input . HttpProtocolIpv6 !== undefined && input . HttpProtocolIpv6 !== null ) { entries [ "HttpProtocolIpv6" ] = input . HttpProtocolIpv6 ; } if ( input . InstanceMetadataTags !== undefined && input . InstanceMetadataTags !== null ) { entries [ "InstanceMetadataTags" ] = input . InstanceMetadataTags ; } return entries ; } ; const serializeAws_ec2InstanceNetworkInterfaceSpecification = ( input , context ) : any => { const entries = { } ; if ( input . AssociatePublicIpAddress !== undefined && input . AssociatePublicIpAddress !== null ) { entries [ "AssociatePublicIpAddress" ] = input . AssociatePublicIpAddress ; } if ( input . DeleteOnTermination !== undefined && input . DeleteOnTermination !== null ) { entries [ "DeleteOnTermination" ] = input . DeleteOnTermination ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DeviceIndex !== undefined && input . DeviceIndex !== null ) { entries [ "DeviceIndex" ] = input . DeviceIndex ; } if ( input . Groups !== undefined && input . Groups !== null ) { const memberEntries = serializeAws_ec2SecurityGroupIdStringList ( input . Groups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Ipv6AddressCount !== undefined && input . Ipv6AddressCount !== null ) { entries [ "Ipv6AddressCount" ] = input . Ipv6AddressCount ; } if ( input . Ipv6Addresses !== undefined && input . Ipv6Addresses !== null ) { const memberEntries = serializeAws_ec2InstanceIpv6AddressList ( input . Ipv6Addresses , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv6Addresses.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } if ( input . PrivateIpAddress !== undefined && input . PrivateIpAddress !== null ) { entries [ "PrivateIpAddress" ] = input . PrivateIpAddress ; } if ( input . PrivateIpAddresses !== undefined && input . PrivateIpAddresses !== null ) { const memberEntries = serializeAws_ec2PrivateIpAddressSpecificationList ( input . PrivateIpAddresses , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PrivateIpAddresses.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SecondaryPrivateIpAddressCount !== undefined && input . SecondaryPrivateIpAddressCount !== null ) { entries [ "SecondaryPrivateIpAddressCount" ] = input . SecondaryPrivateIpAddressCount ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . AssociateCarrierIpAddress !== undefined && input . AssociateCarrierIpAddress !== null ) { entries [ "AssociateCarrierIpAddress" ] = input . AssociateCarrierIpAddress ; } if ( input . InterfaceType !== undefined && input . InterfaceType !== null ) { entries [ "InterfaceType" ] = input . InterfaceType ; } if ( input . NetworkCardIndex !== undefined && input . NetworkCardIndex !== null ) { entries [ "NetworkCardIndex" ] = input . NetworkCardIndex ; } if ( input . Ipv4Prefixes !== undefined && input . Ipv4Prefixes !== null ) { const memberEntries = serializeAws_ec2Ipv4PrefixList ( input . Ipv4Prefixes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv4Prefix.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Ipv4PrefixCount !== undefined && input . Ipv4PrefixCount !== null ) { entries [ "Ipv4PrefixCount" ] = input . Ipv4PrefixCount ; } if ( input . Ipv6Prefixes !== undefined && input . Ipv6Prefixes !== null ) { const memberEntries = serializeAws_ec2Ipv6PrefixList ( input . Ipv6Prefixes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv6Prefix.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Ipv6PrefixCount !== undefined && input . Ipv6PrefixCount !== null ) { entries [ "Ipv6PrefixCount" ] = input . Ipv6PrefixCount ; } return entries ; } ; const serializeAws_ec2InstanceNetworkInterfaceSpecificationList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2InstanceNetworkInterfaceSpecification ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2InstanceRequirements = ( input , context ) : any => { const entries = { } ; if ( input . VCpuCount !== undefined && input . VCpuCount !== null ) { const memberEntries = serializeAws_ec2VCpuCountRange ( input . VCpuCount , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VCpuCount.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MemoryMiB !== undefined && input . MemoryMiB !== null ) { const memberEntries = serializeAws_ec2MemoryMiB ( input . MemoryMiB , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `MemoryMiB.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . CpuManufacturers !== undefined && input . CpuManufacturers !== null ) { const memberEntries = serializeAws_ec2CpuManufacturerSet ( input . CpuManufacturers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CpuManufacturerSet.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MemoryGiBPerVCpu !== undefined && input . MemoryGiBPerVCpu !== null ) { const memberEntries = serializeAws_ec2MemoryGiBPerVCpu ( input . MemoryGiBPerVCpu , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `MemoryGiBPerVCpu.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ExcludedInstanceTypes !== undefined && input . ExcludedInstanceTypes !== null ) { const memberEntries = serializeAws_ec2ExcludedInstanceTypeSet ( input . ExcludedInstanceTypes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ExcludedInstanceTypeSet.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceGenerations !== undefined && input . InstanceGenerations !== null ) { const memberEntries = serializeAws_ec2InstanceGenerationSet ( input . InstanceGenerations , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceGenerationSet.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SpotMaxPricePercentageOverLowestPrice !== undefined && input . SpotMaxPricePercentageOverLowestPrice !== null ) { entries [ "SpotMaxPricePercentageOverLowestPrice" ] = input . SpotMaxPricePercentageOverLowestPrice ; } if ( input . OnDemandMaxPricePercentageOverLowestPrice !== undefined && input . OnDemandMaxPricePercentageOverLowestPrice !== null ) { entries [ "OnDemandMaxPricePercentageOverLowestPrice" ] = input . OnDemandMaxPricePercentageOverLowestPrice ; } if ( input . BareMetal !== undefined && input . BareMetal !== null ) { entries [ "BareMetal" ] = input . BareMetal ; } if ( input . BurstablePerformance !== undefined && input . BurstablePerformance !== null ) { entries [ "BurstablePerformance" ] = input . BurstablePerformance ; } if ( input . RequireHibernateSupport !== undefined && input . RequireHibernateSupport !== null ) { entries [ "RequireHibernateSupport" ] = input . RequireHibernateSupport ; } if ( input . NetworkInterfaceCount !== undefined && input . NetworkInterfaceCount !== null ) { const memberEntries = serializeAws_ec2NetworkInterfaceCount ( input . NetworkInterfaceCount , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInterfaceCount.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . LocalStorage !== undefined && input . LocalStorage !== null ) { entries [ "LocalStorage" ] = input . LocalStorage ; } if ( input . LocalStorageTypes !== undefined && input . LocalStorageTypes !== null ) { const memberEntries = serializeAws_ec2LocalStorageTypeSet ( input . LocalStorageTypes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LocalStorageTypeSet.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . TotalLocalStorageGB !== undefined && input . TotalLocalStorageGB !== null ) { const memberEntries = serializeAws_ec2TotalLocalStorageGB ( input . TotalLocalStorageGB , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TotalLocalStorageGB.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . BaselineEbsBandwidthMbps !== undefined && input . BaselineEbsBandwidthMbps !== null ) { const memberEntries = serializeAws_ec2BaselineEbsBandwidthMbps ( input . BaselineEbsBandwidthMbps , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `BaselineEbsBandwidthMbps.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . AcceleratorTypes !== undefined && input . AcceleratorTypes !== null ) { const memberEntries = serializeAws_ec2AcceleratorTypeSet ( input . AcceleratorTypes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AcceleratorTypeSet.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AcceleratorCount !== undefined && input . AcceleratorCount !== null ) { const memberEntries = serializeAws_ec2AcceleratorCount ( input . AcceleratorCount , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AcceleratorCount.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . AcceleratorManufacturers !== undefined && input . AcceleratorManufacturers !== null ) { const memberEntries = serializeAws_ec2AcceleratorManufacturerSet ( input . AcceleratorManufacturers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AcceleratorManufacturerSet.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AcceleratorNames !== undefined && input . AcceleratorNames !== null ) { const memberEntries = serializeAws_ec2AcceleratorNameSet ( input . AcceleratorNames , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AcceleratorNameSet.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AcceleratorTotalMemoryMiB !== undefined && input . AcceleratorTotalMemoryMiB !== null ) { const memberEntries = serializeAws_ec2AcceleratorTotalMemoryMiB ( input . AcceleratorTotalMemoryMiB , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AcceleratorTotalMemoryMiB.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2InstanceRequirementsRequest = ( input , context ) : any => { const entries = { } ; if ( input . VCpuCount !== undefined && input . VCpuCount !== null ) { const memberEntries = serializeAws_ec2VCpuCountRangeRequest ( input . VCpuCount , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VCpuCount.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MemoryMiB !== undefined && input . MemoryMiB !== null ) { const memberEntries = serializeAws_ec2MemoryMiBRequest ( input . MemoryMiB , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `MemoryMiB.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . CpuManufacturers !== undefined && input . CpuManufacturers !== null ) { const memberEntries = serializeAws_ec2CpuManufacturerSet ( input . CpuManufacturers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CpuManufacturer.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MemoryGiBPerVCpu !== undefined && input . MemoryGiBPerVCpu !== null ) { const memberEntries = serializeAws_ec2MemoryGiBPerVCpuRequest ( input . MemoryGiBPerVCpu , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `MemoryGiBPerVCpu.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ExcludedInstanceTypes !== undefined && input . ExcludedInstanceTypes !== null ) { const memberEntries = serializeAws_ec2ExcludedInstanceTypeSet ( input . ExcludedInstanceTypes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ExcludedInstanceType.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceGenerations !== undefined && input . InstanceGenerations !== null ) { const memberEntries = serializeAws_ec2InstanceGenerationSet ( input . InstanceGenerations , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceGeneration.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SpotMaxPricePercentageOverLowestPrice !== undefined && input . SpotMaxPricePercentageOverLowestPrice !== null ) { entries [ "SpotMaxPricePercentageOverLowestPrice" ] = input . SpotMaxPricePercentageOverLowestPrice ; } if ( input . OnDemandMaxPricePercentageOverLowestPrice !== undefined && input . OnDemandMaxPricePercentageOverLowestPrice !== null ) { entries [ "OnDemandMaxPricePercentageOverLowestPrice" ] = input . OnDemandMaxPricePercentageOverLowestPrice ; } if ( input . BareMetal !== undefined && input . BareMetal !== null ) { entries [ "BareMetal" ] = input . BareMetal ; } if ( input . BurstablePerformance !== undefined && input . BurstablePerformance !== null ) { entries [ "BurstablePerformance" ] = input . BurstablePerformance ; } if ( input . RequireHibernateSupport !== undefined && input . RequireHibernateSupport !== null ) { entries [ "RequireHibernateSupport" ] = input . RequireHibernateSupport ; } if ( input . NetworkInterfaceCount !== undefined && input . NetworkInterfaceCount !== null ) { const memberEntries = serializeAws_ec2NetworkInterfaceCountRequest ( input . NetworkInterfaceCount , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInterfaceCount.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . LocalStorage !== undefined && input . LocalStorage !== null ) { entries [ "LocalStorage" ] = input . LocalStorage ; } if ( input . LocalStorageTypes !== undefined && input . LocalStorageTypes !== null ) { const memberEntries = serializeAws_ec2LocalStorageTypeSet ( input . LocalStorageTypes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LocalStorageType.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . TotalLocalStorageGB !== undefined && input . TotalLocalStorageGB !== null ) { const memberEntries = serializeAws_ec2TotalLocalStorageGBRequest ( input . TotalLocalStorageGB , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TotalLocalStorageGB.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . BaselineEbsBandwidthMbps !== undefined && input . BaselineEbsBandwidthMbps !== null ) { const memberEntries = serializeAws_ec2BaselineEbsBandwidthMbpsRequest ( input . BaselineEbsBandwidthMbps , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `BaselineEbsBandwidthMbps.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . AcceleratorTypes !== undefined && input . AcceleratorTypes !== null ) { const memberEntries = serializeAws_ec2AcceleratorTypeSet ( input . AcceleratorTypes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AcceleratorType.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AcceleratorCount !== undefined && input . AcceleratorCount !== null ) { const memberEntries = serializeAws_ec2AcceleratorCountRequest ( input . AcceleratorCount , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AcceleratorCount.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . AcceleratorManufacturers !== undefined && input . AcceleratorManufacturers !== null ) { const memberEntries = serializeAws_ec2AcceleratorManufacturerSet ( input . AcceleratorManufacturers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AcceleratorManufacturer.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AcceleratorNames !== undefined && input . AcceleratorNames !== null ) { const memberEntries = serializeAws_ec2AcceleratorNameSet ( input . AcceleratorNames , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AcceleratorName.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AcceleratorTotalMemoryMiB !== undefined && input . AcceleratorTotalMemoryMiB !== null ) { const memberEntries = serializeAws_ec2AcceleratorTotalMemoryMiBRequest ( input . AcceleratorTotalMemoryMiB , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AcceleratorTotalMemoryMiB.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2InstanceRequirementsWithMetadataRequest = ( input , context ) : any => { const entries = { } ; if ( input . ArchitectureTypes !== undefined && input . ArchitectureTypes !== null ) { const memberEntries = serializeAws_ec2ArchitectureTypeSet ( input . ArchitectureTypes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ArchitectureType.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . VirtualizationTypes !== undefined && input . VirtualizationTypes !== null ) { const memberEntries = serializeAws_ec2VirtualizationTypeSet ( input . VirtualizationTypes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VirtualizationType.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceRequirements !== undefined && input . InstanceRequirements !== null ) { const memberEntries = serializeAws_ec2InstanceRequirementsRequest ( input . InstanceRequirements , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceRequirements.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2InstanceSpecification = ( input , context ) : any => { const entries = { } ; if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . ExcludeBootVolume !== undefined && input . ExcludeBootVolume !== null ) { entries [ "ExcludeBootVolume" ] = input . ExcludeBootVolume ; } return entries ; } ; const serializeAws_ec2InstanceTagKeySet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2InstanceTypeList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2InstanceTypes = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2IntegrateServices = ( input , context ) : any => { const entries = { } ; if ( input . AthenaIntegrations !== undefined && input . AthenaIntegrations !== null ) { const memberEntries = serializeAws_ec2AthenaIntegrationsSet ( input . AthenaIntegrations , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AthenaIntegration.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2InternetGatewayIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2IpamCidrAuthorizationContext = ( input , context ) : any => { const entries = { } ; if ( input . Message !== undefined && input . Message !== null ) { entries [ "Message" ] = input . Message ; } if ( input . Signature !== undefined && input . Signature !== null ) { entries [ "Signature" ] = input . Signature ; } return entries ; } ; const serializeAws_ec2IpamPoolAllocationDisallowedCidrs = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2IpPermission = ( input , context ) : any => { const entries = { } ; if ( input . FromPort !== undefined && input . FromPort !== null ) { entries [ "FromPort" ] = input . FromPort ; } if ( input . IpProtocol !== undefined && input . IpProtocol !== null ) { entries [ "IpProtocol" ] = input . IpProtocol ; } if ( input . IpRanges !== undefined && input . IpRanges !== null ) { const memberEntries = serializeAws_ec2IpRangeList ( input . IpRanges , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IpRanges.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Ipv6Ranges !== undefined && input . Ipv6Ranges !== null ) { const memberEntries = serializeAws_ec2Ipv6RangeList ( input . Ipv6Ranges , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv6Ranges.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . PrefixListIds !== undefined && input . PrefixListIds !== null ) { const memberEntries = serializeAws_ec2PrefixListIdList ( input . PrefixListIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PrefixListIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ToPort !== undefined && input . ToPort !== null ) { entries [ "ToPort" ] = input . ToPort ; } if ( input . UserIdGroupPairs !== undefined && input . UserIdGroupPairs !== null ) { const memberEntries = serializeAws_ec2UserIdGroupPairList ( input . UserIdGroupPairs , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Groups.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2IpPermissionList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2IpPermission ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2IpPrefixList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2IpRange = ( input , context ) : any => { const entries = { } ; if ( input . CidrIp !== undefined && input . CidrIp !== null ) { entries [ "CidrIp" ] = input . CidrIp ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } return entries ; } ; const serializeAws_ec2IpRangeList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2IpRange ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2Ipv4PrefixList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2Ipv4PrefixSpecificationRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2Ipv4PrefixSpecificationRequest = ( input , context ) : any => { const entries = { } ; if ( input . Ipv4Prefix !== undefined && input . Ipv4Prefix !== null ) { entries [ "Ipv4Prefix" ] = input . Ipv4Prefix ; } return entries ; } ; const serializeAws_ec2Ipv6AddressList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2Ipv6PoolIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2Ipv6PrefixList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2Ipv6PrefixSpecificationRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2Ipv6PrefixSpecificationRequest = ( input , context ) : any => { const entries = { } ; if ( input . Ipv6Prefix !== undefined && input . Ipv6Prefix !== null ) { entries [ "Ipv6Prefix" ] = input . Ipv6Prefix ; } return entries ; } ; const serializeAws_ec2Ipv6Range = ( input , context ) : any => { const entries = { } ; if ( input . CidrIpv6 !== undefined && input . CidrIpv6 !== null ) { entries [ "CidrIpv6" ] = input . CidrIpv6 ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } return entries ; } ; const serializeAws_ec2Ipv6RangeList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2Ipv6Range ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2KeyNameStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `KeyName.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2KeyPairIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `KeyPairId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2LaunchPermission = ( input , context ) : any => { const entries = { } ; if ( input . Group !== undefined && input . Group !== null ) { entries [ "Group" ] = input . Group ; } if ( input . UserId !== undefined && input . UserId !== null ) { entries [ "UserId" ] = input . UserId ; } if ( input . OrganizationArn !== undefined && input . OrganizationArn !== null ) { entries [ "OrganizationArn" ] = input . OrganizationArn ; } if ( input . OrganizationalUnitArn !== undefined && input . OrganizationalUnitArn !== null ) { entries [ "OrganizationalUnitArn" ] = input . OrganizationalUnitArn ; } return entries ; } ; const serializeAws_ec2LaunchPermissionList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2LaunchPermission ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2LaunchPermissionModifications = ( input , context ) : any => { const entries = { } ; if ( input . Add !== undefined && input . Add !== null ) { const memberEntries = serializeAws_ec2LaunchPermissionList ( input . Add , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Add.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Remove !== undefined && input . Remove !== null ) { const memberEntries = serializeAws_ec2LaunchPermissionList ( input . Remove , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Remove.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2LaunchSpecsList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2SpotFleetLaunchSpecification ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2LaunchTemplateBlockDeviceMappingRequest = ( input , context ) : any => { const entries = { } ; if ( input . DeviceName !== undefined && input . DeviceName !== null ) { entries [ "DeviceName" ] = input . DeviceName ; } if ( input . VirtualName !== undefined && input . VirtualName !== null ) { entries [ "VirtualName" ] = input . VirtualName ; } if ( input . Ebs !== undefined && input . Ebs !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateEbsBlockDeviceRequest ( input . Ebs , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ebs.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . NoDevice !== undefined && input . NoDevice !== null ) { entries [ "NoDevice" ] = input . NoDevice ; } return entries ; } ; const serializeAws_ec2LaunchTemplateBlockDeviceMappingRequestList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2LaunchTemplateBlockDeviceMappingRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `BlockDeviceMapping.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2LaunchTemplateCapacityReservationSpecificationRequest = ( input , context ) : any => { const entries = { } ; if ( input . CapacityReservationPreference !== undefined && input . CapacityReservationPreference !== null ) { entries [ "CapacityReservationPreference" ] = input . CapacityReservationPreference ; } if ( input . CapacityReservationTarget !== undefined && input . CapacityReservationTarget !== null ) { const memberEntries = serializeAws_ec2CapacityReservationTarget ( input . CapacityReservationTarget , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CapacityReservationTarget.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2LaunchTemplateConfig = ( input , context ) : any => { const entries = { } ; if ( input . LaunchTemplateSpecification !== undefined && input . LaunchTemplateSpecification !== null ) { const memberEntries = serializeAws_ec2FleetLaunchTemplateSpecification ( input . LaunchTemplateSpecification , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchTemplateSpecification.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Overrides !== undefined && input . Overrides !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateOverridesList ( input . Overrides , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Overrides.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2LaunchTemplateConfigList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2LaunchTemplateConfig ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2LaunchTemplateCpuOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . CoreCount !== undefined && input . CoreCount !== null ) { entries [ "CoreCount" ] = input . CoreCount ; } if ( input . ThreadsPerCore !== undefined && input . ThreadsPerCore !== null ) { entries [ "ThreadsPerCore" ] = input . ThreadsPerCore ; } return entries ; } ; const serializeAws_ec2LaunchTemplateEbsBlockDeviceRequest = ( input , context ) : any => { const entries = { } ; if ( input . Encrypted !== undefined && input . Encrypted !== null ) { entries [ "Encrypted" ] = input . Encrypted ; } if ( input . DeleteOnTermination !== undefined && input . DeleteOnTermination !== null ) { entries [ "DeleteOnTermination" ] = input . DeleteOnTermination ; } if ( input . Iops !== undefined && input . Iops !== null ) { entries [ "Iops" ] = input . Iops ; } if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . SnapshotId !== undefined && input . SnapshotId !== null ) { entries [ "SnapshotId" ] = input . SnapshotId ; } if ( input . VolumeSize !== undefined && input . VolumeSize !== null ) { entries [ "VolumeSize" ] = input . VolumeSize ; } if ( input . VolumeType !== undefined && input . VolumeType !== null ) { entries [ "VolumeType" ] = input . VolumeType ; } if ( input . Throughput !== undefined && input . Throughput !== null ) { entries [ "Throughput" ] = input . Throughput ; } return entries ; } ; const serializeAws_ec2LaunchTemplateElasticInferenceAccelerator = ( input , context ) : any => { const entries = { } ; if ( input . Type !== undefined && input . Type !== null ) { entries [ "Type" ] = input . Type ; } if ( input . Count !== undefined && input . Count !== null ) { entries [ "Count" ] = input . Count ; } return entries ; } ; const serializeAws_ec2LaunchTemplateElasticInferenceAcceleratorList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2LaunchTemplateElasticInferenceAccelerator ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2LaunchTemplateEnclaveOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Enabled !== undefined && input . Enabled !== null ) { entries [ "Enabled" ] = input . Enabled ; } return entries ; } ; const serializeAws_ec2LaunchTemplateHibernationOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . Configured !== undefined && input . Configured !== null ) { entries [ "Configured" ] = input . Configured ; } return entries ; } ; const serializeAws_ec2LaunchTemplateIamInstanceProfileSpecificationRequest = ( input , context ) : any => { const entries = { } ; if ( input . Arn !== undefined && input . Arn !== null ) { entries [ "Arn" ] = input . Arn ; } if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } return entries ; } ; const serializeAws_ec2LaunchTemplateIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2LaunchTemplateInstanceMarketOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . MarketType !== undefined && input . MarketType !== null ) { entries [ "MarketType" ] = input . MarketType ; } if ( input . SpotOptions !== undefined && input . SpotOptions !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateSpotMarketOptionsRequest ( input . SpotOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SpotOptions.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2LaunchTemplateInstanceMetadataOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . HttpTokens !== undefined && input . HttpTokens !== null ) { entries [ "HttpTokens" ] = input . HttpTokens ; } if ( input . HttpPutResponseHopLimit !== undefined && input . HttpPutResponseHopLimit !== null ) { entries [ "HttpPutResponseHopLimit" ] = input . HttpPutResponseHopLimit ; } if ( input . HttpEndpoint !== undefined && input . HttpEndpoint !== null ) { entries [ "HttpEndpoint" ] = input . HttpEndpoint ; } if ( input . HttpProtocolIpv6 !== undefined && input . HttpProtocolIpv6 !== null ) { entries [ "HttpProtocolIpv6" ] = input . HttpProtocolIpv6 ; } if ( input . InstanceMetadataTags !== undefined && input . InstanceMetadataTags !== null ) { entries [ "InstanceMetadataTags" ] = input . InstanceMetadataTags ; } return entries ; } ; const serializeAws_ec2LaunchTemplateInstanceNetworkInterfaceSpecificationRequest = ( input , context ) : any => { const entries = { } ; if ( input . AssociateCarrierIpAddress !== undefined && input . AssociateCarrierIpAddress !== null ) { entries [ "AssociateCarrierIpAddress" ] = input . AssociateCarrierIpAddress ; } if ( input . AssociatePublicIpAddress !== undefined && input . AssociatePublicIpAddress !== null ) { entries [ "AssociatePublicIpAddress" ] = input . AssociatePublicIpAddress ; } if ( input . DeleteOnTermination !== undefined && input . DeleteOnTermination !== null ) { entries [ "DeleteOnTermination" ] = input . DeleteOnTermination ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DeviceIndex !== undefined && input . DeviceIndex !== null ) { entries [ "DeviceIndex" ] = input . DeviceIndex ; } if ( input . Groups !== undefined && input . Groups !== null ) { const memberEntries = serializeAws_ec2SecurityGroupIdStringList ( input . Groups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InterfaceType !== undefined && input . InterfaceType !== null ) { entries [ "InterfaceType" ] = input . InterfaceType ; } if ( input . Ipv6AddressCount !== undefined && input . Ipv6AddressCount !== null ) { entries [ "Ipv6AddressCount" ] = input . Ipv6AddressCount ; } if ( input . Ipv6Addresses !== undefined && input . Ipv6Addresses !== null ) { const memberEntries = serializeAws_ec2InstanceIpv6AddressListRequest ( input . Ipv6Addresses , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv6Addresses.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } if ( input . PrivateIpAddress !== undefined && input . PrivateIpAddress !== null ) { entries [ "PrivateIpAddress" ] = input . PrivateIpAddress ; } if ( input . PrivateIpAddresses !== undefined && input . PrivateIpAddresses !== null ) { const memberEntries = serializeAws_ec2PrivateIpAddressSpecificationList ( input . PrivateIpAddresses , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PrivateIpAddresses.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SecondaryPrivateIpAddressCount !== undefined && input . SecondaryPrivateIpAddressCount !== null ) { entries [ "SecondaryPrivateIpAddressCount" ] = input . SecondaryPrivateIpAddressCount ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . NetworkCardIndex !== undefined && input . NetworkCardIndex !== null ) { entries [ "NetworkCardIndex" ] = input . NetworkCardIndex ; } if ( input . Ipv4Prefixes !== undefined && input . Ipv4Prefixes !== null ) { const memberEntries = serializeAws_ec2Ipv4PrefixList ( input . Ipv4Prefixes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv4Prefix.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Ipv4PrefixCount !== undefined && input . Ipv4PrefixCount !== null ) { entries [ "Ipv4PrefixCount" ] = input . Ipv4PrefixCount ; } if ( input . Ipv6Prefixes !== undefined && input . Ipv6Prefixes !== null ) { const memberEntries = serializeAws_ec2Ipv6PrefixList ( input . Ipv6Prefixes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv6Prefix.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Ipv6PrefixCount !== undefined && input . Ipv6PrefixCount !== null ) { entries [ "Ipv6PrefixCount" ] = input . Ipv6PrefixCount ; } return entries ; } ; const serializeAws_ec2LaunchTemplateInstanceNetworkInterfaceSpecificationRequestList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2LaunchTemplateInstanceNetworkInterfaceSpecificationRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `InstanceNetworkInterfaceSpecification.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2LaunchTemplateLicenseConfigurationRequest = ( input , context ) : any => { const entries = { } ; if ( input . LicenseConfigurationArn !== undefined && input . LicenseConfigurationArn !== null ) { entries [ "LicenseConfigurationArn" ] = input . LicenseConfigurationArn ; } return entries ; } ; const serializeAws_ec2LaunchTemplateLicenseSpecificationListRequest = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2LaunchTemplateLicenseConfigurationRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2LaunchTemplateNameStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2LaunchTemplateOverrides = ( input , context ) : any => { const entries = { } ; if ( input . InstanceType !== undefined && input . InstanceType !== null ) { entries [ "InstanceType" ] = input . InstanceType ; } if ( input . SpotPrice !== undefined && input . SpotPrice !== null ) { entries [ "SpotPrice" ] = input . SpotPrice ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . WeightedCapacity !== undefined && input . WeightedCapacity !== null ) { entries [ "WeightedCapacity" ] = __serializeFloat ( input . WeightedCapacity ) ; } if ( input . Priority !== undefined && input . Priority !== null ) { entries [ "Priority" ] = __serializeFloat ( input . Priority ) ; } if ( input . InstanceRequirements !== undefined && input . InstanceRequirements !== null ) { const memberEntries = serializeAws_ec2InstanceRequirements ( input . InstanceRequirements , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceRequirements.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2LaunchTemplateOverridesList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2LaunchTemplateOverrides ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2LaunchTemplatePlacementRequest = ( input , context ) : any => { const entries = { } ; if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . Affinity !== undefined && input . Affinity !== null ) { entries [ "Affinity" ] = input . Affinity ; } if ( input . GroupName !== undefined && input . GroupName !== null ) { entries [ "GroupName" ] = input . GroupName ; } if ( input . HostId !== undefined && input . HostId !== null ) { entries [ "HostId" ] = input . HostId ; } if ( input . Tenancy !== undefined && input . Tenancy !== null ) { entries [ "Tenancy" ] = input . Tenancy ; } if ( input . SpreadDomain !== undefined && input . SpreadDomain !== null ) { entries [ "SpreadDomain" ] = input . SpreadDomain ; } if ( input . HostResourceGroupArn !== undefined && input . HostResourceGroupArn !== null ) { entries [ "HostResourceGroupArn" ] = input . HostResourceGroupArn ; } if ( input . PartitionNumber !== undefined && input . PartitionNumber !== null ) { entries [ "PartitionNumber" ] = input . PartitionNumber ; } return entries ; } ; const serializeAws_ec2LaunchTemplatePrivateDnsNameOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . HostnameType !== undefined && input . HostnameType !== null ) { entries [ "HostnameType" ] = input . HostnameType ; } if ( input . EnableResourceNameDnsARecord !== undefined && input . EnableResourceNameDnsARecord !== null ) { entries [ "EnableResourceNameDnsARecord" ] = input . EnableResourceNameDnsARecord ; } if ( input . EnableResourceNameDnsAAAARecord !== undefined && input . EnableResourceNameDnsAAAARecord !== null ) { entries [ "EnableResourceNameDnsAAAARecord" ] = input . EnableResourceNameDnsAAAARecord ; } return entries ; } ; const serializeAws_ec2LaunchTemplatesMonitoringRequest = ( input , context ) : any => { const entries = { } ; if ( input . Enabled !== undefined && input . Enabled !== null ) { entries [ "Enabled" ] = input . Enabled ; } return entries ; } ; const serializeAws_ec2LaunchTemplateSpecification = ( input , context ) : any => { const entries = { } ; if ( input . LaunchTemplateId !== undefined && input . LaunchTemplateId !== null ) { entries [ "LaunchTemplateId" ] = input . LaunchTemplateId ; } if ( input . LaunchTemplateName !== undefined && input . LaunchTemplateName !== null ) { entries [ "LaunchTemplateName" ] = input . LaunchTemplateName ; } if ( input . Version !== undefined && input . Version !== null ) { entries [ "Version" ] = input . Version ; } return entries ; } ; const serializeAws_ec2LaunchTemplateSpotMarketOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . MaxPrice !== undefined && input . MaxPrice !== null ) { entries [ "MaxPrice" ] = input . MaxPrice ; } if ( input . SpotInstanceType !== undefined && input . SpotInstanceType !== null ) { entries [ "SpotInstanceType" ] = input . SpotInstanceType ; } if ( input . BlockDurationMinutes !== undefined && input . BlockDurationMinutes !== null ) { entries [ "BlockDurationMinutes" ] = input . BlockDurationMinutes ; } if ( input . ValidUntil !== undefined && input . ValidUntil !== null ) { entries [ "ValidUntil" ] = input . ValidUntil . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . InstanceInterruptionBehavior !== undefined && input . InstanceInterruptionBehavior !== null ) { entries [ "InstanceInterruptionBehavior" ] = input . InstanceInterruptionBehavior ; } return entries ; } ; const serializeAws_ec2LaunchTemplateTagSpecificationRequest = ( input , context ) : any => { const entries = { } ; if ( input . ResourceType !== undefined && input . ResourceType !== null ) { entries [ "ResourceType" ] = input . ResourceType ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_ec2TagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tag.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2LaunchTemplateTagSpecificationRequestList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2LaunchTemplateTagSpecificationRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `LaunchTemplateTagSpecificationRequest.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2LicenseConfigurationRequest = ( input , context ) : any => { const entries = { } ; if ( input . LicenseConfigurationArn !== undefined && input . LicenseConfigurationArn !== null ) { entries [ "LicenseConfigurationArn" ] = input . LicenseConfigurationArn ; } return entries ; } ; const serializeAws_ec2LicenseSpecificationListRequest = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2LicenseConfigurationRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2ListSnapshotsInRecycleBinRequest = ( input , context ) : any => { const entries = { } ; if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . SnapshotIds !== undefined && input . SnapshotIds !== null ) { const memberEntries = serializeAws_ec2SnapshotIdStringList ( input . SnapshotIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SnapshotId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2LoadBalancersConfig = ( input , context ) : any => { const entries = { } ; if ( input . ClassicLoadBalancersConfig !== undefined && input . ClassicLoadBalancersConfig !== null ) { const memberEntries = serializeAws_ec2ClassicLoadBalancersConfig ( input . ClassicLoadBalancersConfig , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ClassicLoadBalancersConfig.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . TargetGroupsConfig !== undefined && input . TargetGroupsConfig !== null ) { const memberEntries = serializeAws_ec2TargetGroupsConfig ( input . TargetGroupsConfig , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TargetGroupsConfig.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2LoadPermissionListRequest = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2LoadPermissionRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2LoadPermissionModifications = ( input , context ) : any => { const entries = { } ; if ( input . Add !== undefined && input . Add !== null ) { const memberEntries = serializeAws_ec2LoadPermissionListRequest ( input . Add , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Add.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Remove !== undefined && input . Remove !== null ) { const memberEntries = serializeAws_ec2LoadPermissionListRequest ( input . Remove , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Remove.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2LoadPermissionRequest = ( input , context ) : any => { const entries = { } ; if ( input . Group !== undefined && input . Group !== null ) { entries [ "Group" ] = input . Group ; } if ( input . UserId !== undefined && input . UserId !== null ) { entries [ "UserId" ] = input . UserId ; } return entries ; } ; const serializeAws_ec2LocalGatewayIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2LocalGatewayRouteTableIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2LocalGatewayRouteTableVirtualInterfaceGroupAssociationIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2LocalGatewayRouteTableVpcAssociationIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2LocalGatewayVirtualInterfaceGroupIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2LocalGatewayVirtualInterfaceIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2LocalStorageTypeSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2MemoryGiBPerVCpu = ( input , context ) : any => { const entries = { } ; if ( input . Min !== undefined && input . Min !== null ) { entries [ "Min" ] = __serializeFloat ( input . Min ) ; } if ( input . Max !== undefined && input . Max !== null ) { entries [ "Max" ] = __serializeFloat ( input . Max ) ; } return entries ; } ; const serializeAws_ec2MemoryGiBPerVCpuRequest = ( input , context ) : any => { const entries = { } ; if ( input . Min !== undefined && input . Min !== null ) { entries [ "Min" ] = __serializeFloat ( input . Min ) ; } if ( input . Max !== undefined && input . Max !== null ) { entries [ "Max" ] = __serializeFloat ( input . Max ) ; } return entries ; } ; const serializeAws_ec2MemoryMiB = ( input , context ) : any => { const entries = { } ; if ( input . Min !== undefined && input . Min !== null ) { entries [ "Min" ] = input . Min ; } if ( input . Max !== undefined && input . Max !== null ) { entries [ "Max" ] = input . Max ; } return entries ; } ; const serializeAws_ec2MemoryMiBRequest = ( input , context ) : any => { const entries = { } ; if ( input . Min !== undefined && input . Min !== null ) { entries [ "Min" ] = input . Min ; } if ( input . Max !== undefined && input . Max !== null ) { entries [ "Max" ] = input . Max ; } return entries ; } ; const serializeAws_ec2ModifyAddressAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . AllocationId !== undefined && input . AllocationId !== null ) { entries [ "AllocationId" ] = input . AllocationId ; } if ( input . DomainName !== undefined && input . DomainName !== null ) { entries [ "DomainName" ] = input . DomainName ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifyAvailabilityZoneGroupRequest = ( input , context ) : any => { const entries = { } ; if ( input . GroupName !== undefined && input . GroupName !== null ) { entries [ "GroupName" ] = input . GroupName ; } if ( input . OptInStatus !== undefined && input . OptInStatus !== null ) { entries [ "OptInStatus" ] = input . OptInStatus ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifyCapacityReservationFleetRequest = ( input , context ) : any => { const entries = { } ; if ( input . CapacityReservationFleetId !== undefined && input . CapacityReservationFleetId !== null ) { entries [ "CapacityReservationFleetId" ] = input . CapacityReservationFleetId ; } if ( input . TotalTargetCapacity !== undefined && input . TotalTargetCapacity !== null ) { entries [ "TotalTargetCapacity" ] = input . TotalTargetCapacity ; } if ( input . EndDate !== undefined && input . EndDate !== null ) { entries [ "EndDate" ] = input . EndDate . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . RemoveEndDate !== undefined && input . RemoveEndDate !== null ) { entries [ "RemoveEndDate" ] = input . RemoveEndDate ; } return entries ; } ; const serializeAws_ec2ModifyCapacityReservationRequest = ( input , context ) : any => { const entries = { } ; if ( input . CapacityReservationId !== undefined && input . CapacityReservationId !== null ) { entries [ "CapacityReservationId" ] = input . CapacityReservationId ; } if ( input . InstanceCount !== undefined && input . InstanceCount !== null ) { entries [ "InstanceCount" ] = input . InstanceCount ; } if ( input . EndDate !== undefined && input . EndDate !== null ) { entries [ "EndDate" ] = input . EndDate . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . EndDateType !== undefined && input . EndDateType !== null ) { entries [ "EndDateType" ] = input . EndDateType ; } if ( input . Accept !== undefined && input . Accept !== null ) { entries [ "Accept" ] = input . Accept ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . AdditionalInfo !== undefined && input . AdditionalInfo !== null ) { entries [ "AdditionalInfo" ] = input . AdditionalInfo ; } return entries ; } ; const serializeAws_ec2ModifyClientVpnEndpointRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . ServerCertificateArn !== undefined && input . ServerCertificateArn !== null ) { entries [ "ServerCertificateArn" ] = input . ServerCertificateArn ; } if ( input . ConnectionLogOptions !== undefined && input . ConnectionLogOptions !== null ) { const memberEntries = serializeAws_ec2ConnectionLogOptions ( input . ConnectionLogOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ConnectionLogOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DnsServers !== undefined && input . DnsServers !== null ) { const memberEntries = serializeAws_ec2DnsServersOptionsModifyStructure ( input . DnsServers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DnsServers.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . VpnPort !== undefined && input . VpnPort !== null ) { entries [ "VpnPort" ] = input . VpnPort ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . SplitTunnel !== undefined && input . SplitTunnel !== null ) { entries [ "SplitTunnel" ] = input . SplitTunnel ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . SecurityGroupIds !== undefined && input . SecurityGroupIds !== null ) { const memberEntries = serializeAws_ec2ClientVpnSecurityGroupIdSet ( input . SecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . SelfServicePortal !== undefined && input . SelfServicePortal !== null ) { entries [ "SelfServicePortal" ] = input . SelfServicePortal ; } if ( input . ClientConnectOptions !== undefined && input . ClientConnectOptions !== null ) { const memberEntries = serializeAws_ec2ClientConnectOptions ( input . ClientConnectOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ClientConnectOptions.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ModifyDefaultCreditSpecificationRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceFamily !== undefined && input . InstanceFamily !== null ) { entries [ "InstanceFamily" ] = input . InstanceFamily ; } if ( input . CpuCredits !== undefined && input . CpuCredits !== null ) { entries [ "CpuCredits" ] = input . CpuCredits ; } return entries ; } ; const serializeAws_ec2ModifyEbsDefaultKmsKeyIdRequest = ( input , context ) : any => { const entries = { } ; if ( input . KmsKeyId !== undefined && input . KmsKeyId !== null ) { entries [ "KmsKeyId" ] = input . KmsKeyId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifyFleetRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ExcessCapacityTerminationPolicy !== undefined && input . ExcessCapacityTerminationPolicy !== null ) { entries [ "ExcessCapacityTerminationPolicy" ] = input . ExcessCapacityTerminationPolicy ; } if ( input . LaunchTemplateConfigs !== undefined && input . LaunchTemplateConfigs !== null ) { const memberEntries = serializeAws_ec2FleetLaunchTemplateConfigListRequest ( input . LaunchTemplateConfigs , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchTemplateConfig.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . FleetId !== undefined && input . FleetId !== null ) { entries [ "FleetId" ] = input . FleetId ; } if ( input . TargetCapacitySpecification !== undefined && input . TargetCapacitySpecification !== null ) { const memberEntries = serializeAws_ec2TargetCapacitySpecificationRequest ( input . TargetCapacitySpecification , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TargetCapacitySpecification.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Context !== undefined && input . Context !== null ) { entries [ "Context" ] = input . Context ; } return entries ; } ; const serializeAws_ec2ModifyFpgaImageAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . FpgaImageId !== undefined && input . FpgaImageId !== null ) { entries [ "FpgaImageId" ] = input . FpgaImageId ; } if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } if ( input . OperationType !== undefined && input . OperationType !== null ) { entries [ "OperationType" ] = input . OperationType ; } if ( input . UserIds !== undefined && input . UserIds !== null ) { const memberEntries = serializeAws_ec2UserIdStringList ( input . UserIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `UserId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . UserGroups !== undefined && input . UserGroups !== null ) { const memberEntries = serializeAws_ec2UserGroupStringList ( input . UserGroups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `UserGroup.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ProductCodes !== undefined && input . ProductCodes !== null ) { const memberEntries = serializeAws_ec2ProductCodeStringList ( input . ProductCodes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ProductCode.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . LoadPermission !== undefined && input . LoadPermission !== null ) { const memberEntries = serializeAws_ec2LoadPermissionModifications ( input . LoadPermission , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LoadPermission.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } return entries ; } ; const serializeAws_ec2ModifyHostsRequest = ( input , context ) : any => { const entries = { } ; if ( input . AutoPlacement !== undefined && input . AutoPlacement !== null ) { entries [ "AutoPlacement" ] = input . AutoPlacement ; } if ( input . HostIds !== undefined && input . HostIds !== null ) { const memberEntries = serializeAws_ec2RequestHostIdList ( input . HostIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `HostId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . HostRecovery !== undefined && input . HostRecovery !== null ) { entries [ "HostRecovery" ] = input . HostRecovery ; } if ( input . InstanceType !== undefined && input . InstanceType !== null ) { entries [ "InstanceType" ] = input . InstanceType ; } if ( input . InstanceFamily !== undefined && input . InstanceFamily !== null ) { entries [ "InstanceFamily" ] = input . InstanceFamily ; } return entries ; } ; const serializeAws_ec2ModifyIdentityIdFormatRequest = ( input , context ) : any => { const entries = { } ; if ( input . PrincipalArn !== undefined && input . PrincipalArn !== null ) { entries [ "PrincipalArn" ] = input . PrincipalArn ; } if ( input . Resource !== undefined && input . Resource !== null ) { entries [ "Resource" ] = input . Resource ; } if ( input . UseLongIds !== undefined && input . UseLongIds !== null ) { entries [ "UseLongIds" ] = input . UseLongIds ; } return entries ; } ; const serializeAws_ec2ModifyIdFormatRequest = ( input , context ) : any => { const entries = { } ; if ( input . Resource !== undefined && input . Resource !== null ) { entries [ "Resource" ] = input . Resource ; } if ( input . UseLongIds !== undefined && input . UseLongIds !== null ) { entries [ "UseLongIds" ] = input . UseLongIds ; } return entries ; } ; const serializeAws_ec2ModifyImageAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } if ( input . Description !== undefined && input . Description !== null ) { const memberEntries = serializeAws_ec2AttributeValue ( input . Description , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Description.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ImageId !== undefined && input . ImageId !== null ) { entries [ "ImageId" ] = input . ImageId ; } if ( input . LaunchPermission !== undefined && input . LaunchPermission !== null ) { const memberEntries = serializeAws_ec2LaunchPermissionModifications ( input . LaunchPermission , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchPermission.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . OperationType !== undefined && input . OperationType !== null ) { entries [ "OperationType" ] = input . OperationType ; } if ( input . ProductCodes !== undefined && input . ProductCodes !== null ) { const memberEntries = serializeAws_ec2ProductCodeStringList ( input . ProductCodes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ProductCode.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . UserGroups !== undefined && input . UserGroups !== null ) { const memberEntries = serializeAws_ec2UserGroupStringList ( input . UserGroups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `UserGroup.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . UserIds !== undefined && input . UserIds !== null ) { const memberEntries = serializeAws_ec2UserIdStringList ( input . UserIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `UserId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . OrganizationArns !== undefined && input . OrganizationArns !== null ) { const memberEntries = serializeAws_ec2OrganizationArnStringList ( input . OrganizationArns , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `OrganizationArn.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . OrganizationalUnitArns !== undefined && input . OrganizationalUnitArns !== null ) { const memberEntries = serializeAws_ec2OrganizationalUnitArnStringList ( input . OrganizationalUnitArns , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `OrganizationalUnitArn.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ModifyInstanceAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . SourceDestCheck !== undefined && input . SourceDestCheck !== null ) { const memberEntries = serializeAws_ec2AttributeBooleanValue ( input . SourceDestCheck , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SourceDestCheck.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } if ( input . BlockDeviceMappings !== undefined && input . BlockDeviceMappings !== null ) { const memberEntries = serializeAws_ec2InstanceBlockDeviceMappingSpecificationList ( input . BlockDeviceMappings , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `BlockDeviceMapping.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DisableApiTermination !== undefined && input . DisableApiTermination !== null ) { const memberEntries = serializeAws_ec2AttributeBooleanValue ( input . DisableApiTermination , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DisableApiTermination.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . EbsOptimized !== undefined && input . EbsOptimized !== null ) { const memberEntries = serializeAws_ec2AttributeBooleanValue ( input . EbsOptimized , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EbsOptimized.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . EnaSupport !== undefined && input . EnaSupport !== null ) { const memberEntries = serializeAws_ec2AttributeBooleanValue ( input . EnaSupport , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnaSupport.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Groups !== undefined && input . Groups !== null ) { const memberEntries = serializeAws_ec2GroupIdStringList ( input . Groups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `GroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . InstanceInitiatedShutdownBehavior !== undefined && input . InstanceInitiatedShutdownBehavior !== null ) { const memberEntries = serializeAws_ec2AttributeValue ( input . InstanceInitiatedShutdownBehavior , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceInitiatedShutdownBehavior.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceType !== undefined && input . InstanceType !== null ) { const memberEntries = serializeAws_ec2AttributeValue ( input . InstanceType , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceType.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Kernel !== undefined && input . Kernel !== null ) { const memberEntries = serializeAws_ec2AttributeValue ( input . Kernel , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Kernel.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Ramdisk !== undefined && input . Ramdisk !== null ) { const memberEntries = serializeAws_ec2AttributeValue ( input . Ramdisk , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ramdisk.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . SriovNetSupport !== undefined && input . SriovNetSupport !== null ) { const memberEntries = serializeAws_ec2AttributeValue ( input . SriovNetSupport , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SriovNetSupport.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . UserData !== undefined && input . UserData !== null ) { const memberEntries = serializeAws_ec2BlobAttributeValue ( input . UserData , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `UserData.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } return entries ; } ; const serializeAws_ec2ModifyInstanceCapacityReservationAttributesRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . CapacityReservationSpecification !== undefined && input . CapacityReservationSpecification !== null ) { const memberEntries = serializeAws_ec2CapacityReservationSpecification ( input . CapacityReservationSpecification , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CapacityReservationSpecification.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifyInstanceCreditSpecificationRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . InstanceCreditSpecifications !== undefined && input . InstanceCreditSpecifications !== null ) { const memberEntries = serializeAws_ec2InstanceCreditSpecificationListRequest ( input . InstanceCreditSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceCreditSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ModifyInstanceEventStartTimeRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . InstanceEventId !== undefined && input . InstanceEventId !== null ) { entries [ "InstanceEventId" ] = input . InstanceEventId ; } if ( input . NotBefore !== undefined && input . NotBefore !== null ) { entries [ "NotBefore" ] = input . NotBefore . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } return entries ; } ; const serializeAws_ec2ModifyInstanceEventWindowRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } if ( input . InstanceEventWindowId !== undefined && input . InstanceEventWindowId !== null ) { entries [ "InstanceEventWindowId" ] = input . InstanceEventWindowId ; } if ( input . TimeRanges !== undefined && input . TimeRanges !== null ) { const memberEntries = serializeAws_ec2InstanceEventWindowTimeRangeRequestSet ( input . TimeRanges , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TimeRange.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . CronExpression !== undefined && input . CronExpression !== null ) { entries [ "CronExpression" ] = input . CronExpression ; } return entries ; } ; const serializeAws_ec2ModifyInstanceMetadataOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . HttpTokens !== undefined && input . HttpTokens !== null ) { entries [ "HttpTokens" ] = input . HttpTokens ; } if ( input . HttpPutResponseHopLimit !== undefined && input . HttpPutResponseHopLimit !== null ) { entries [ "HttpPutResponseHopLimit" ] = input . HttpPutResponseHopLimit ; } if ( input . HttpEndpoint !== undefined && input . HttpEndpoint !== null ) { entries [ "HttpEndpoint" ] = input . HttpEndpoint ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . HttpProtocolIpv6 !== undefined && input . HttpProtocolIpv6 !== null ) { entries [ "HttpProtocolIpv6" ] = input . HttpProtocolIpv6 ; } if ( input . InstanceMetadataTags !== undefined && input . InstanceMetadataTags !== null ) { entries [ "InstanceMetadataTags" ] = input . InstanceMetadataTags ; } return entries ; } ; const serializeAws_ec2ModifyInstancePlacementRequest = ( input , context ) : any => { const entries = { } ; if ( input . Affinity !== undefined && input . Affinity !== null ) { entries [ "Affinity" ] = input . Affinity ; } if ( input . GroupName !== undefined && input . GroupName !== null ) { entries [ "GroupName" ] = input . GroupName ; } if ( input . HostId !== undefined && input . HostId !== null ) { entries [ "HostId" ] = input . HostId ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . Tenancy !== undefined && input . Tenancy !== null ) { entries [ "Tenancy" ] = input . Tenancy ; } if ( input . PartitionNumber !== undefined && input . PartitionNumber !== null ) { entries [ "PartitionNumber" ] = input . PartitionNumber ; } if ( input . HostResourceGroupArn !== undefined && input . HostResourceGroupArn !== null ) { entries [ "HostResourceGroupArn" ] = input . HostResourceGroupArn ; } return entries ; } ; const serializeAws_ec2ModifyIpamPoolRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . IpamPoolId !== undefined && input . IpamPoolId !== null ) { entries [ "IpamPoolId" ] = input . IpamPoolId ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . AutoImport !== undefined && input . AutoImport !== null ) { entries [ "AutoImport" ] = input . AutoImport ; } if ( input . AllocationMinNetmaskLength !== undefined && input . AllocationMinNetmaskLength !== null ) { entries [ "AllocationMinNetmaskLength" ] = input . AllocationMinNetmaskLength ; } if ( input . AllocationMaxNetmaskLength !== undefined && input . AllocationMaxNetmaskLength !== null ) { entries [ "AllocationMaxNetmaskLength" ] = input . AllocationMaxNetmaskLength ; } if ( input . AllocationDefaultNetmaskLength !== undefined && input . AllocationDefaultNetmaskLength !== null ) { entries [ "AllocationDefaultNetmaskLength" ] = input . AllocationDefaultNetmaskLength ; } if ( input . ClearAllocationDefaultNetmaskLength !== undefined && input . ClearAllocationDefaultNetmaskLength !== null ) { entries [ "ClearAllocationDefaultNetmaskLength" ] = input . ClearAllocationDefaultNetmaskLength ; } if ( input . AddAllocationResourceTags !== undefined && input . AddAllocationResourceTags !== null ) { const memberEntries = serializeAws_ec2RequestIpamResourceTagList ( input . AddAllocationResourceTags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AddAllocationResourceTag.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . RemoveAllocationResourceTags !== undefined && input . RemoveAllocationResourceTags !== null ) { const memberEntries = serializeAws_ec2RequestIpamResourceTagList ( input . RemoveAllocationResourceTags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RemoveAllocationResourceTag.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ModifyIpamRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . IpamId !== undefined && input . IpamId !== null ) { entries [ "IpamId" ] = input . IpamId ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . AddOperatingRegions !== undefined && input . AddOperatingRegions !== null ) { const memberEntries = serializeAws_ec2AddIpamOperatingRegionSet ( input . AddOperatingRegions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AddOperatingRegion.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . RemoveOperatingRegions !== undefined && input . RemoveOperatingRegions !== null ) { const memberEntries = serializeAws_ec2RemoveIpamOperatingRegionSet ( input . RemoveOperatingRegions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RemoveOperatingRegion.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ModifyIpamResourceCidrRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ResourceId !== undefined && input . ResourceId !== null ) { entries [ "ResourceId" ] = input . ResourceId ; } if ( input . ResourceCidr !== undefined && input . ResourceCidr !== null ) { entries [ "ResourceCidr" ] = input . ResourceCidr ; } if ( input . ResourceRegion !== undefined && input . ResourceRegion !== null ) { entries [ "ResourceRegion" ] = input . ResourceRegion ; } if ( input . CurrentIpamScopeId !== undefined && input . CurrentIpamScopeId !== null ) { entries [ "CurrentIpamScopeId" ] = input . CurrentIpamScopeId ; } if ( input . DestinationIpamScopeId !== undefined && input . DestinationIpamScopeId !== null ) { entries [ "DestinationIpamScopeId" ] = input . DestinationIpamScopeId ; } if ( input . Monitored !== undefined && input . Monitored !== null ) { entries [ "Monitored" ] = input . Monitored ; } return entries ; } ; const serializeAws_ec2ModifyIpamScopeRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . IpamScopeId !== undefined && input . IpamScopeId !== null ) { entries [ "IpamScopeId" ] = input . IpamScopeId ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } return entries ; } ; const serializeAws_ec2ModifyLaunchTemplateRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . LaunchTemplateId !== undefined && input . LaunchTemplateId !== null ) { entries [ "LaunchTemplateId" ] = input . LaunchTemplateId ; } if ( input . LaunchTemplateName !== undefined && input . LaunchTemplateName !== null ) { entries [ "LaunchTemplateName" ] = input . LaunchTemplateName ; } if ( input . DefaultVersion !== undefined && input . DefaultVersion !== null ) { entries [ "SetDefaultVersion" ] = input . DefaultVersion ; } return entries ; } ; const serializeAws_ec2ModifyManagedPrefixListRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . PrefixListId !== undefined && input . PrefixListId !== null ) { entries [ "PrefixListId" ] = input . PrefixListId ; } if ( input . CurrentVersion !== undefined && input . CurrentVersion !== null ) { entries [ "CurrentVersion" ] = input . CurrentVersion ; } if ( input . PrefixListName !== undefined && input . PrefixListName !== null ) { entries [ "PrefixListName" ] = input . PrefixListName ; } if ( input . AddEntries !== undefined && input . AddEntries !== null ) { const memberEntries = serializeAws_ec2AddPrefixListEntries ( input . AddEntries , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AddEntry.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . RemoveEntries !== undefined && input . RemoveEntries !== null ) { const memberEntries = serializeAws_ec2RemovePrefixListEntries ( input . RemoveEntries , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RemoveEntry.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxEntries !== undefined && input . MaxEntries !== null ) { entries [ "MaxEntries" ] = input . MaxEntries ; } return entries ; } ; const serializeAws_ec2ModifyNetworkInterfaceAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . Attachment !== undefined && input . Attachment !== null ) { const memberEntries = serializeAws_ec2NetworkInterfaceAttachmentChanges ( input . Attachment , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Attachment.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Description !== undefined && input . Description !== null ) { const memberEntries = serializeAws_ec2AttributeValue ( input . Description , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Description.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Groups !== undefined && input . Groups !== null ) { const memberEntries = serializeAws_ec2SecurityGroupIdStringList ( input . Groups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } if ( input . SourceDestCheck !== undefined && input . SourceDestCheck !== null ) { const memberEntries = serializeAws_ec2AttributeBooleanValue ( input . SourceDestCheck , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SourceDestCheck.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ModifyPrivateDnsNameOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . PrivateDnsHostnameType !== undefined && input . PrivateDnsHostnameType !== null ) { entries [ "PrivateDnsHostnameType" ] = input . PrivateDnsHostnameType ; } if ( input . EnableResourceNameDnsARecord !== undefined && input . EnableResourceNameDnsARecord !== null ) { entries [ "EnableResourceNameDnsARecord" ] = input . EnableResourceNameDnsARecord ; } if ( input . EnableResourceNameDnsAAAARecord !== undefined && input . EnableResourceNameDnsAAAARecord !== null ) { entries [ "EnableResourceNameDnsAAAARecord" ] = input . EnableResourceNameDnsAAAARecord ; } return entries ; } ; const serializeAws_ec2ModifyReservedInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . ReservedInstancesIds !== undefined && input . ReservedInstancesIds !== null ) { const memberEntries = serializeAws_ec2ReservedInstancesIdStringList ( input . ReservedInstancesIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ReservedInstancesId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . TargetConfigurations !== undefined && input . TargetConfigurations !== null ) { const memberEntries = serializeAws_ec2ReservedInstancesConfigurationList ( input . TargetConfigurations , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ReservedInstancesConfigurationSetItemType.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ModifySecurityGroupRulesRequest = ( input , context ) : any => { const entries = { } ; if ( input . GroupId !== undefined && input . GroupId !== null ) { entries [ "GroupId" ] = input . GroupId ; } if ( input . SecurityGroupRules !== undefined && input . SecurityGroupRules !== null ) { const memberEntries = serializeAws_ec2SecurityGroupRuleUpdateList ( input . SecurityGroupRules , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupRule.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifySnapshotAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } if ( input . CreateVolumePermission !== undefined && input . CreateVolumePermission !== null ) { const memberEntries = serializeAws_ec2CreateVolumePermissionModifications ( input . CreateVolumePermission , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CreateVolumePermission.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . GroupNames !== undefined && input . GroupNames !== null ) { const memberEntries = serializeAws_ec2GroupNameStringList ( input . GroupNames , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `UserGroup.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . OperationType !== undefined && input . OperationType !== null ) { entries [ "OperationType" ] = input . OperationType ; } if ( input . SnapshotId !== undefined && input . SnapshotId !== null ) { entries [ "SnapshotId" ] = input . SnapshotId ; } if ( input . UserIds !== undefined && input . UserIds !== null ) { const memberEntries = serializeAws_ec2UserIdStringList ( input . UserIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `UserId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifySnapshotTierRequest = ( input , context ) : any => { const entries = { } ; if ( input . SnapshotId !== undefined && input . SnapshotId !== null ) { entries [ "SnapshotId" ] = input . SnapshotId ; } if ( input . StorageTier !== undefined && input . StorageTier !== null ) { entries [ "StorageTier" ] = input . StorageTier ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifySpotFleetRequestRequest = ( input , context ) : any => { const entries = { } ; if ( input . ExcessCapacityTerminationPolicy !== undefined && input . ExcessCapacityTerminationPolicy !== null ) { entries [ "ExcessCapacityTerminationPolicy" ] = input . ExcessCapacityTerminationPolicy ; } if ( input . LaunchTemplateConfigs !== undefined && input . LaunchTemplateConfigs !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateConfigList ( input . LaunchTemplateConfigs , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchTemplateConfig.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SpotFleetRequestId !== undefined && input . SpotFleetRequestId !== null ) { entries [ "SpotFleetRequestId" ] = input . SpotFleetRequestId ; } if ( input . TargetCapacity !== undefined && input . TargetCapacity !== null ) { entries [ "TargetCapacity" ] = input . TargetCapacity ; } if ( input . OnDemandTargetCapacity !== undefined && input . OnDemandTargetCapacity !== null ) { entries [ "OnDemandTargetCapacity" ] = input . OnDemandTargetCapacity ; } if ( input . Context !== undefined && input . Context !== null ) { entries [ "Context" ] = input . Context ; } return entries ; } ; const serializeAws_ec2ModifySubnetAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . AssignIpv6AddressOnCreation !== undefined && input . AssignIpv6AddressOnCreation !== null ) { const memberEntries = serializeAws_ec2AttributeBooleanValue ( input . AssignIpv6AddressOnCreation , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AssignIpv6AddressOnCreation.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MapPublicIpOnLaunch !== undefined && input . MapPublicIpOnLaunch !== null ) { const memberEntries = serializeAws_ec2AttributeBooleanValue ( input . MapPublicIpOnLaunch , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `MapPublicIpOnLaunch.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . MapCustomerOwnedIpOnLaunch !== undefined && input . MapCustomerOwnedIpOnLaunch !== null ) { const memberEntries = serializeAws_ec2AttributeBooleanValue ( input . MapCustomerOwnedIpOnLaunch , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `MapCustomerOwnedIpOnLaunch.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . CustomerOwnedIpv4Pool !== undefined && input . CustomerOwnedIpv4Pool !== null ) { entries [ "CustomerOwnedIpv4Pool" ] = input . CustomerOwnedIpv4Pool ; } if ( input . EnableDns64 !== undefined && input . EnableDns64 !== null ) { const memberEntries = serializeAws_ec2AttributeBooleanValue ( input . EnableDns64 , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnableDns64.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . PrivateDnsHostnameTypeOnLaunch !== undefined && input . PrivateDnsHostnameTypeOnLaunch !== null ) { entries [ "PrivateDnsHostnameTypeOnLaunch" ] = input . PrivateDnsHostnameTypeOnLaunch ; } if ( input . EnableResourceNameDnsARecordOnLaunch !== undefined && input . EnableResourceNameDnsARecordOnLaunch !== null ) { const memberEntries = serializeAws_ec2AttributeBooleanValue ( input . EnableResourceNameDnsARecordOnLaunch , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnableResourceNameDnsARecordOnLaunch.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . EnableResourceNameDnsAAAARecordOnLaunch !== undefined && input . EnableResourceNameDnsAAAARecordOnLaunch !== null ) { const memberEntries = serializeAws_ec2AttributeBooleanValue ( input . EnableResourceNameDnsAAAARecordOnLaunch , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnableResourceNameDnsAAAARecordOnLaunch.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . EnableLniAtDeviceIndex !== undefined && input . EnableLniAtDeviceIndex !== null ) { entries [ "EnableLniAtDeviceIndex" ] = input . EnableLniAtDeviceIndex ; } if ( input . DisableLniAtDeviceIndex !== undefined && input . DisableLniAtDeviceIndex !== null ) { const memberEntries = serializeAws_ec2AttributeBooleanValue ( input . DisableLniAtDeviceIndex , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DisableLniAtDeviceIndex.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ModifyTrafficMirrorFilterNetworkServicesRequest = ( input , context ) : any => { const entries = { } ; if ( input . TrafficMirrorFilterId !== undefined && input . TrafficMirrorFilterId !== null ) { entries [ "TrafficMirrorFilterId" ] = input . TrafficMirrorFilterId ; } if ( input . AddNetworkServices !== undefined && input . AddNetworkServices !== null ) { const memberEntries = serializeAws_ec2TrafficMirrorNetworkServiceList ( input . AddNetworkServices , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AddNetworkService.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . RemoveNetworkServices !== undefined && input . RemoveNetworkServices !== null ) { const memberEntries = serializeAws_ec2TrafficMirrorNetworkServiceList ( input . RemoveNetworkServices , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RemoveNetworkService.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifyTrafficMirrorFilterRuleRequest = ( input , context ) : any => { const entries = { } ; if ( input . TrafficMirrorFilterRuleId !== undefined && input . TrafficMirrorFilterRuleId !== null ) { entries [ "TrafficMirrorFilterRuleId" ] = input . TrafficMirrorFilterRuleId ; } if ( input . TrafficDirection !== undefined && input . TrafficDirection !== null ) { entries [ "TrafficDirection" ] = input . TrafficDirection ; } if ( input . RuleNumber !== undefined && input . RuleNumber !== null ) { entries [ "RuleNumber" ] = input . RuleNumber ; } if ( input . RuleAction !== undefined && input . RuleAction !== null ) { entries [ "RuleAction" ] = input . RuleAction ; } if ( input . DestinationPortRange !== undefined && input . DestinationPortRange !== null ) { const memberEntries = serializeAws_ec2TrafficMirrorPortRangeRequest ( input . DestinationPortRange , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DestinationPortRange.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . SourcePortRange !== undefined && input . SourcePortRange !== null ) { const memberEntries = serializeAws_ec2TrafficMirrorPortRangeRequest ( input . SourcePortRange , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SourcePortRange.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Protocol !== undefined && input . Protocol !== null ) { entries [ "Protocol" ] = input . Protocol ; } if ( input . DestinationCidrBlock !== undefined && input . DestinationCidrBlock !== null ) { entries [ "DestinationCidrBlock" ] = input . DestinationCidrBlock ; } if ( input . SourceCidrBlock !== undefined && input . SourceCidrBlock !== null ) { entries [ "SourceCidrBlock" ] = input . SourceCidrBlock ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . RemoveFields !== undefined && input . RemoveFields !== null ) { const memberEntries = serializeAws_ec2TrafficMirrorFilterRuleFieldList ( input . RemoveFields , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RemoveField.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifyTrafficMirrorSessionRequest = ( input , context ) : any => { const entries = { } ; if ( input . TrafficMirrorSessionId !== undefined && input . TrafficMirrorSessionId !== null ) { entries [ "TrafficMirrorSessionId" ] = input . TrafficMirrorSessionId ; } if ( input . TrafficMirrorTargetId !== undefined && input . TrafficMirrorTargetId !== null ) { entries [ "TrafficMirrorTargetId" ] = input . TrafficMirrorTargetId ; } if ( input . TrafficMirrorFilterId !== undefined && input . TrafficMirrorFilterId !== null ) { entries [ "TrafficMirrorFilterId" ] = input . TrafficMirrorFilterId ; } if ( input . PacketLength !== undefined && input . PacketLength !== null ) { entries [ "PacketLength" ] = input . PacketLength ; } if ( input . SessionNumber !== undefined && input . SessionNumber !== null ) { entries [ "SessionNumber" ] = input . SessionNumber ; } if ( input . VirtualNetworkId !== undefined && input . VirtualNetworkId !== null ) { entries [ "VirtualNetworkId" ] = input . VirtualNetworkId ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . RemoveFields !== undefined && input . RemoveFields !== null ) { const memberEntries = serializeAws_ec2TrafficMirrorSessionFieldList ( input . RemoveFields , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RemoveField.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifyTransitGatewayOptions = ( input , context ) : any => { const entries = { } ; if ( input . AddTransitGatewayCidrBlocks !== undefined && input . AddTransitGatewayCidrBlocks !== null ) { const memberEntries = serializeAws_ec2TransitGatewayCidrBlockStringList ( input . AddTransitGatewayCidrBlocks , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AddTransitGatewayCidrBlocks.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . RemoveTransitGatewayCidrBlocks !== undefined && input . RemoveTransitGatewayCidrBlocks !== null ) { const memberEntries = serializeAws_ec2TransitGatewayCidrBlockStringList ( input . RemoveTransitGatewayCidrBlocks , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RemoveTransitGatewayCidrBlocks.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . VpnEcmpSupport !== undefined && input . VpnEcmpSupport !== null ) { entries [ "VpnEcmpSupport" ] = input . VpnEcmpSupport ; } if ( input . DnsSupport !== undefined && input . DnsSupport !== null ) { entries [ "DnsSupport" ] = input . DnsSupport ; } if ( input . AutoAcceptSharedAttachments !== undefined && input . AutoAcceptSharedAttachments !== null ) { entries [ "AutoAcceptSharedAttachments" ] = input . AutoAcceptSharedAttachments ; } if ( input . DefaultRouteTableAssociation !== undefined && input . DefaultRouteTableAssociation !== null ) { entries [ "DefaultRouteTableAssociation" ] = input . DefaultRouteTableAssociation ; } if ( input . AssociationDefaultRouteTableId !== undefined && input . AssociationDefaultRouteTableId !== null ) { entries [ "AssociationDefaultRouteTableId" ] = input . AssociationDefaultRouteTableId ; } if ( input . DefaultRouteTablePropagation !== undefined && input . DefaultRouteTablePropagation !== null ) { entries [ "DefaultRouteTablePropagation" ] = input . DefaultRouteTablePropagation ; } if ( input . PropagationDefaultRouteTableId !== undefined && input . PropagationDefaultRouteTableId !== null ) { entries [ "PropagationDefaultRouteTableId" ] = input . PropagationDefaultRouteTableId ; } return entries ; } ; const serializeAws_ec2ModifyTransitGatewayPrefixListReferenceRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayRouteTableId !== undefined && input . TransitGatewayRouteTableId !== null ) { entries [ "TransitGatewayRouteTableId" ] = input . TransitGatewayRouteTableId ; } if ( input . PrefixListId !== undefined && input . PrefixListId !== null ) { entries [ "PrefixListId" ] = input . PrefixListId ; } if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . Blackhole !== undefined && input . Blackhole !== null ) { entries [ "Blackhole" ] = input . Blackhole ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifyTransitGatewayRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayId !== undefined && input . TransitGatewayId !== null ) { entries [ "TransitGatewayId" ] = input . TransitGatewayId ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . Options !== undefined && input . Options !== null ) { const memberEntries = serializeAws_ec2ModifyTransitGatewayOptions ( input . Options , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Options.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifyTransitGatewayVpcAttachmentRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . AddSubnetIds !== undefined && input . AddSubnetIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewaySubnetIdList ( input . AddSubnetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AddSubnetIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . RemoveSubnetIds !== undefined && input . RemoveSubnetIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewaySubnetIdList ( input . RemoveSubnetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RemoveSubnetIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Options !== undefined && input . Options !== null ) { const memberEntries = serializeAws_ec2ModifyTransitGatewayVpcAttachmentRequestOptions ( input . Options , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Options.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifyTransitGatewayVpcAttachmentRequestOptions = ( input , context ) : any => { const entries = { } ; if ( input . DnsSupport !== undefined && input . DnsSupport !== null ) { entries [ "DnsSupport" ] = input . DnsSupport ; } if ( input . Ipv6Support !== undefined && input . Ipv6Support !== null ) { entries [ "Ipv6Support" ] = input . Ipv6Support ; } if ( input . ApplianceModeSupport !== undefined && input . ApplianceModeSupport !== null ) { entries [ "ApplianceModeSupport" ] = input . ApplianceModeSupport ; } return entries ; } ; const serializeAws_ec2ModifyVolumeAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . AutoEnableIO !== undefined && input . AutoEnableIO !== null ) { const memberEntries = serializeAws_ec2AttributeBooleanValue ( input . AutoEnableIO , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AutoEnableIO.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . VolumeId !== undefined && input . VolumeId !== null ) { entries [ "VolumeId" ] = input . VolumeId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifyVolumeRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VolumeId !== undefined && input . VolumeId !== null ) { entries [ "VolumeId" ] = input . VolumeId ; } if ( input . Size !== undefined && input . Size !== null ) { entries [ "Size" ] = input . Size ; } if ( input . VolumeType !== undefined && input . VolumeType !== null ) { entries [ "VolumeType" ] = input . VolumeType ; } if ( input . Iops !== undefined && input . Iops !== null ) { entries [ "Iops" ] = input . Iops ; } if ( input . Throughput !== undefined && input . Throughput !== null ) { entries [ "Throughput" ] = input . Throughput ; } if ( input . MultiAttachEnabled !== undefined && input . MultiAttachEnabled !== null ) { entries [ "MultiAttachEnabled" ] = input . MultiAttachEnabled ; } return entries ; } ; const serializeAws_ec2ModifyVpcAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . EnableDnsHostnames !== undefined && input . EnableDnsHostnames !== null ) { const memberEntries = serializeAws_ec2AttributeBooleanValue ( input . EnableDnsHostnames , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnableDnsHostnames.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . EnableDnsSupport !== undefined && input . EnableDnsSupport !== null ) { const memberEntries = serializeAws_ec2AttributeBooleanValue ( input . EnableDnsSupport , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnableDnsSupport.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } return entries ; } ; const serializeAws_ec2ModifyVpcEndpointConnectionNotificationRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ConnectionNotificationId !== undefined && input . ConnectionNotificationId !== null ) { entries [ "ConnectionNotificationId" ] = input . ConnectionNotificationId ; } if ( input . ConnectionNotificationArn !== undefined && input . ConnectionNotificationArn !== null ) { entries [ "ConnectionNotificationArn" ] = input . ConnectionNotificationArn ; } if ( input . ConnectionEvents !== undefined && input . ConnectionEvents !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . ConnectionEvents , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ConnectionEvents.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ModifyVpcEndpointRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VpcEndpointId !== undefined && input . VpcEndpointId !== null ) { entries [ "VpcEndpointId" ] = input . VpcEndpointId ; } if ( input . ResetPolicy !== undefined && input . ResetPolicy !== null ) { entries [ "ResetPolicy" ] = input . ResetPolicy ; } if ( input . PolicyDocument !== undefined && input . PolicyDocument !== null ) { entries [ "PolicyDocument" ] = input . PolicyDocument ; } if ( input . AddRouteTableIds !== undefined && input . AddRouteTableIds !== null ) { const memberEntries = serializeAws_ec2VpcEndpointRouteTableIdList ( input . AddRouteTableIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AddRouteTableId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . RemoveRouteTableIds !== undefined && input . RemoveRouteTableIds !== null ) { const memberEntries = serializeAws_ec2VpcEndpointRouteTableIdList ( input . RemoveRouteTableIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RemoveRouteTableId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AddSubnetIds !== undefined && input . AddSubnetIds !== null ) { const memberEntries = serializeAws_ec2VpcEndpointSubnetIdList ( input . AddSubnetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AddSubnetId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . RemoveSubnetIds !== undefined && input . RemoveSubnetIds !== null ) { const memberEntries = serializeAws_ec2VpcEndpointSubnetIdList ( input . RemoveSubnetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RemoveSubnetId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AddSecurityGroupIds !== undefined && input . AddSecurityGroupIds !== null ) { const memberEntries = serializeAws_ec2VpcEndpointSecurityGroupIdList ( input . AddSecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AddSecurityGroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . RemoveSecurityGroupIds !== undefined && input . RemoveSecurityGroupIds !== null ) { const memberEntries = serializeAws_ec2VpcEndpointSecurityGroupIdList ( input . RemoveSecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RemoveSecurityGroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . PrivateDnsEnabled !== undefined && input . PrivateDnsEnabled !== null ) { entries [ "PrivateDnsEnabled" ] = input . PrivateDnsEnabled ; } return entries ; } ; const serializeAws_ec2ModifyVpcEndpointServiceConfigurationRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ServiceId !== undefined && input . ServiceId !== null ) { entries [ "ServiceId" ] = input . ServiceId ; } if ( input . PrivateDnsName !== undefined && input . PrivateDnsName !== null ) { entries [ "PrivateDnsName" ] = input . PrivateDnsName ; } if ( input . RemovePrivateDnsName !== undefined && input . RemovePrivateDnsName !== null ) { entries [ "RemovePrivateDnsName" ] = input . RemovePrivateDnsName ; } if ( input . AcceptanceRequired !== undefined && input . AcceptanceRequired !== null ) { entries [ "AcceptanceRequired" ] = input . AcceptanceRequired ; } if ( input . AddNetworkLoadBalancerArns !== undefined && input . AddNetworkLoadBalancerArns !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . AddNetworkLoadBalancerArns , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AddNetworkLoadBalancerArn.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . RemoveNetworkLoadBalancerArns !== undefined && input . RemoveNetworkLoadBalancerArns !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . RemoveNetworkLoadBalancerArns , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RemoveNetworkLoadBalancerArn.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AddGatewayLoadBalancerArns !== undefined && input . AddGatewayLoadBalancerArns !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . AddGatewayLoadBalancerArns , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AddGatewayLoadBalancerArn.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . RemoveGatewayLoadBalancerArns !== undefined && input . RemoveGatewayLoadBalancerArns !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . RemoveGatewayLoadBalancerArns , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RemoveGatewayLoadBalancerArn.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ModifyVpcEndpointServicePayerResponsibilityRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ServiceId !== undefined && input . ServiceId !== null ) { entries [ "ServiceId" ] = input . ServiceId ; } if ( input . PayerResponsibility !== undefined && input . PayerResponsibility !== null ) { entries [ "PayerResponsibility" ] = input . PayerResponsibility ; } return entries ; } ; const serializeAws_ec2ModifyVpcEndpointServicePermissionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ServiceId !== undefined && input . ServiceId !== null ) { entries [ "ServiceId" ] = input . ServiceId ; } if ( input . AddAllowedPrincipals !== undefined && input . AddAllowedPrincipals !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . AddAllowedPrincipals , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AddAllowedPrincipals.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . RemoveAllowedPrincipals !== undefined && input . RemoveAllowedPrincipals !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . RemoveAllowedPrincipals , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RemoveAllowedPrincipals.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ModifyVpcPeeringConnectionOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . AccepterPeeringConnectionOptions !== undefined && input . AccepterPeeringConnectionOptions !== null ) { const memberEntries = serializeAws_ec2PeeringConnectionOptionsRequest ( input . AccepterPeeringConnectionOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `AccepterPeeringConnectionOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . RequesterPeeringConnectionOptions !== undefined && input . RequesterPeeringConnectionOptions !== null ) { const memberEntries = serializeAws_ec2PeeringConnectionOptionsRequest ( input . RequesterPeeringConnectionOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `RequesterPeeringConnectionOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . VpcPeeringConnectionId !== undefined && input . VpcPeeringConnectionId !== null ) { entries [ "VpcPeeringConnectionId" ] = input . VpcPeeringConnectionId ; } return entries ; } ; const serializeAws_ec2ModifyVpcTenancyRequest = ( input , context ) : any => { const entries = { } ; if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . InstanceTenancy !== undefined && input . InstanceTenancy !== null ) { entries [ "InstanceTenancy" ] = input . InstanceTenancy ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifyVpnConnectionOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . VpnConnectionId !== undefined && input . VpnConnectionId !== null ) { entries [ "VpnConnectionId" ] = input . VpnConnectionId ; } if ( input . LocalIpv4NetworkCidr !== undefined && input . LocalIpv4NetworkCidr !== null ) { entries [ "LocalIpv4NetworkCidr" ] = input . LocalIpv4NetworkCidr ; } if ( input . RemoteIpv4NetworkCidr !== undefined && input . RemoteIpv4NetworkCidr !== null ) { entries [ "RemoteIpv4NetworkCidr" ] = input . RemoteIpv4NetworkCidr ; } if ( input . LocalIpv6NetworkCidr !== undefined && input . LocalIpv6NetworkCidr !== null ) { entries [ "LocalIpv6NetworkCidr" ] = input . LocalIpv6NetworkCidr ; } if ( input . RemoteIpv6NetworkCidr !== undefined && input . RemoteIpv6NetworkCidr !== null ) { entries [ "RemoteIpv6NetworkCidr" ] = input . RemoteIpv6NetworkCidr ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifyVpnConnectionRequest = ( input , context ) : any => { const entries = { } ; if ( input . VpnConnectionId !== undefined && input . VpnConnectionId !== null ) { entries [ "VpnConnectionId" ] = input . VpnConnectionId ; } if ( input . TransitGatewayId !== undefined && input . TransitGatewayId !== null ) { entries [ "TransitGatewayId" ] = input . TransitGatewayId ; } if ( input . CustomerGatewayId !== undefined && input . CustomerGatewayId !== null ) { entries [ "CustomerGatewayId" ] = input . CustomerGatewayId ; } if ( input . VpnGatewayId !== undefined && input . VpnGatewayId !== null ) { entries [ "VpnGatewayId" ] = input . VpnGatewayId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifyVpnTunnelCertificateRequest = ( input , context ) : any => { const entries = { } ; if ( input . VpnConnectionId !== undefined && input . VpnConnectionId !== null ) { entries [ "VpnConnectionId" ] = input . VpnConnectionId ; } if ( input . VpnTunnelOutsideIpAddress !== undefined && input . VpnTunnelOutsideIpAddress !== null ) { entries [ "VpnTunnelOutsideIpAddress" ] = input . VpnTunnelOutsideIpAddress ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifyVpnTunnelOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . VpnConnectionId !== undefined && input . VpnConnectionId !== null ) { entries [ "VpnConnectionId" ] = input . VpnConnectionId ; } if ( input . VpnTunnelOutsideIpAddress !== undefined && input . VpnTunnelOutsideIpAddress !== null ) { entries [ "VpnTunnelOutsideIpAddress" ] = input . VpnTunnelOutsideIpAddress ; } if ( input . TunnelOptions !== undefined && input . TunnelOptions !== null ) { const memberEntries = serializeAws_ec2ModifyVpnTunnelOptionsSpecification ( input . TunnelOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TunnelOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ModifyVpnTunnelOptionsSpecification = ( input , context ) : any => { const entries = { } ; if ( input . TunnelInsideCidr !== undefined && input . TunnelInsideCidr !== null ) { entries [ "TunnelInsideCidr" ] = input . TunnelInsideCidr ; } if ( input . TunnelInsideIpv6Cidr !== undefined && input . TunnelInsideIpv6Cidr !== null ) { entries [ "TunnelInsideIpv6Cidr" ] = input . TunnelInsideIpv6Cidr ; } if ( input . PreSharedKey !== undefined && input . PreSharedKey !== null ) { entries [ "PreSharedKey" ] = input . PreSharedKey ; } if ( input . Phase1LifetimeSeconds !== undefined && input . Phase1LifetimeSeconds !== null ) { entries [ "Phase1LifetimeSeconds" ] = input . Phase1LifetimeSeconds ; } if ( input . Phase2LifetimeSeconds !== undefined && input . Phase2LifetimeSeconds !== null ) { entries [ "Phase2LifetimeSeconds" ] = input . Phase2LifetimeSeconds ; } if ( input . RekeyMarginTimeSeconds !== undefined && input . RekeyMarginTimeSeconds !== null ) { entries [ "RekeyMarginTimeSeconds" ] = input . RekeyMarginTimeSeconds ; } if ( input . RekeyFuzzPercentage !== undefined && input . RekeyFuzzPercentage !== null ) { entries [ "RekeyFuzzPercentage" ] = input . RekeyFuzzPercentage ; } if ( input . ReplayWindowSize !== undefined && input . ReplayWindowSize !== null ) { entries [ "ReplayWindowSize" ] = input . ReplayWindowSize ; } if ( input . DPDTimeoutSeconds !== undefined && input . DPDTimeoutSeconds !== null ) { entries [ "DPDTimeoutSeconds" ] = input . DPDTimeoutSeconds ; } if ( input . DPDTimeoutAction !== undefined && input . DPDTimeoutAction !== null ) { entries [ "DPDTimeoutAction" ] = input . DPDTimeoutAction ; } if ( input . Phase1EncryptionAlgorithms !== undefined && input . Phase1EncryptionAlgorithms !== null ) { const memberEntries = serializeAws_ec2Phase1EncryptionAlgorithmsRequestList ( input . Phase1EncryptionAlgorithms , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Phase1EncryptionAlgorithm.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Phase2EncryptionAlgorithms !== undefined && input . Phase2EncryptionAlgorithms !== null ) { const memberEntries = serializeAws_ec2Phase2EncryptionAlgorithmsRequestList ( input . Phase2EncryptionAlgorithms , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Phase2EncryptionAlgorithm.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Phase1IntegrityAlgorithms !== undefined && input . Phase1IntegrityAlgorithms !== null ) { const memberEntries = serializeAws_ec2Phase1IntegrityAlgorithmsRequestList ( input . Phase1IntegrityAlgorithms , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Phase1IntegrityAlgorithm.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Phase2IntegrityAlgorithms !== undefined && input . Phase2IntegrityAlgorithms !== null ) { const memberEntries = serializeAws_ec2Phase2IntegrityAlgorithmsRequestList ( input . Phase2IntegrityAlgorithms , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Phase2IntegrityAlgorithm.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Phase1DHGroupNumbers !== undefined && input . Phase1DHGroupNumbers !== null ) { const memberEntries = serializeAws_ec2Phase1DHGroupNumbersRequestList ( input . Phase1DHGroupNumbers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Phase1DHGroupNumber.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Phase2DHGroupNumbers !== undefined && input . Phase2DHGroupNumbers !== null ) { const memberEntries = serializeAws_ec2Phase2DHGroupNumbersRequestList ( input . Phase2DHGroupNumbers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Phase2DHGroupNumber.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . IKEVersions !== undefined && input . IKEVersions !== null ) { const memberEntries = serializeAws_ec2IKEVersionsRequestList ( input . IKEVersions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IKEVersion.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . StartupAction !== undefined && input . StartupAction !== null ) { entries [ "StartupAction" ] = input . StartupAction ; } return entries ; } ; const serializeAws_ec2MonitorInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceIds !== undefined && input . InstanceIds !== null ) { const memberEntries = serializeAws_ec2InstanceIdStringList ( input . InstanceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2MoveAddressToVpcRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . PublicIp !== undefined && input . PublicIp !== null ) { entries [ "PublicIp" ] = input . PublicIp ; } return entries ; } ; const serializeAws_ec2MoveByoipCidrToIpamRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Cidr !== undefined && input . Cidr !== null ) { entries [ "Cidr" ] = input . Cidr ; } if ( input . IpamPoolId !== undefined && input . IpamPoolId !== null ) { entries [ "IpamPoolId" ] = input . IpamPoolId ; } if ( input . IpamPoolOwner !== undefined && input . IpamPoolOwner !== null ) { entries [ "IpamPoolOwner" ] = input . IpamPoolOwner ; } return entries ; } ; const serializeAws_ec2NatGatewayIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2NetworkAclIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2NetworkInsightsAccessScopeAnalysisIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2NetworkInsightsAccessScopeIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2NetworkInsightsAnalysisIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2NetworkInsightsPathIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2NetworkInterfaceAttachmentChanges = ( input , context ) : any => { const entries = { } ; if ( input . AttachmentId !== undefined && input . AttachmentId !== null ) { entries [ "AttachmentId" ] = input . AttachmentId ; } if ( input . DeleteOnTermination !== undefined && input . DeleteOnTermination !== null ) { entries [ "DeleteOnTermination" ] = input . DeleteOnTermination ; } return entries ; } ; const serializeAws_ec2NetworkInterfaceCount = ( input , context ) : any => { const entries = { } ; if ( input . Min !== undefined && input . Min !== null ) { entries [ "Min" ] = input . Min ; } if ( input . Max !== undefined && input . Max !== null ) { entries [ "Max" ] = input . Max ; } return entries ; } ; const serializeAws_ec2NetworkInterfaceCountRequest = ( input , context ) : any => { const entries = { } ; if ( input . Min !== undefined && input . Min !== null ) { entries [ "Min" ] = input . Min ; } if ( input . Max !== undefined && input . Max !== null ) { entries [ "Max" ] = input . Max ; } return entries ; } ; const serializeAws_ec2NetworkInterfaceIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2NetworkInterfacePermissionIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2NewDhcpConfiguration = ( input , context ) : any => { const entries = { } ; if ( input . Key !== undefined && input . Key !== null ) { entries [ "Key" ] = input . Key ; } if ( input . Values !== undefined && input . Values !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . Values , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Value.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2NewDhcpConfigurationList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2NewDhcpConfiguration ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2OccurrenceDayRequestSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `OccurenceDay.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2OnDemandOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . AllocationStrategy !== undefined && input . AllocationStrategy !== null ) { entries [ "AllocationStrategy" ] = input . AllocationStrategy ; } if ( input . CapacityReservationOptions !== undefined && input . CapacityReservationOptions !== null ) { const memberEntries = serializeAws_ec2CapacityReservationOptionsRequest ( input . CapacityReservationOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CapacityReservationOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . SingleInstanceType !== undefined && input . SingleInstanceType !== null ) { entries [ "SingleInstanceType" ] = input . SingleInstanceType ; } if ( input . SingleAvailabilityZone !== undefined && input . SingleAvailabilityZone !== null ) { entries [ "SingleAvailabilityZone" ] = input . SingleAvailabilityZone ; } if ( input . MinTargetCapacity !== undefined && input . MinTargetCapacity !== null ) { entries [ "MinTargetCapacity" ] = input . MinTargetCapacity ; } if ( input . MaxTotalPrice !== undefined && input . MaxTotalPrice !== null ) { entries [ "MaxTotalPrice" ] = input . MaxTotalPrice ; } return entries ; } ; const serializeAws_ec2OrganizationalUnitArnStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `OrganizationalUnitArn.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2OrganizationArnStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `OrganizationArn.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2OwnerStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Owner.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2PacketHeaderStatementRequest = ( input , context ) : any => { const entries = { } ; if ( input . SourceAddresses !== undefined && input . SourceAddresses !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . SourceAddresses , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SourceAddress.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DestinationAddresses !== undefined && input . DestinationAddresses !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . DestinationAddresses , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DestinationAddress.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SourcePorts !== undefined && input . SourcePorts !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . SourcePorts , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SourcePort.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DestinationPorts !== undefined && input . DestinationPorts !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . DestinationPorts , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DestinationPort.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SourcePrefixLists !== undefined && input . SourcePrefixLists !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . SourcePrefixLists , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SourcePrefixList.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DestinationPrefixLists !== undefined && input . DestinationPrefixLists !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . DestinationPrefixLists , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `DestinationPrefixList.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Protocols !== undefined && input . Protocols !== null ) { const memberEntries = serializeAws_ec2ProtocolList ( input . Protocols , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Protocol.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2PathStatementRequest = ( input , context ) : any => { const entries = { } ; if ( input . PacketHeaderStatement !== undefined && input . PacketHeaderStatement !== null ) { const memberEntries = serializeAws_ec2PacketHeaderStatementRequest ( input . PacketHeaderStatement , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PacketHeaderStatement.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ResourceStatement !== undefined && input . ResourceStatement !== null ) { const memberEntries = serializeAws_ec2ResourceStatementRequest ( input . ResourceStatement , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ResourceStatement.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2PeeringConnectionOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . AllowDnsResolutionFromRemoteVpc !== undefined && input . AllowDnsResolutionFromRemoteVpc !== null ) { entries [ "AllowDnsResolutionFromRemoteVpc" ] = input . AllowDnsResolutionFromRemoteVpc ; } if ( input . AllowEgressFromLocalClassicLinkToRemoteVpc !== undefined && input . AllowEgressFromLocalClassicLinkToRemoteVpc !== null ) { entries [ "AllowEgressFromLocalClassicLinkToRemoteVpc" ] = input . AllowEgressFromLocalClassicLinkToRemoteVpc ; } if ( input . AllowEgressFromLocalVpcToRemoteClassicLink !== undefined && input . AllowEgressFromLocalVpcToRemoteClassicLink !== null ) { entries [ "AllowEgressFromLocalVpcToRemoteClassicLink" ] = input . AllowEgressFromLocalVpcToRemoteClassicLink ; } return entries ; } ; const serializeAws_ec2Phase1DHGroupNumbersRequestList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2Phase1DHGroupNumbersRequestListValue ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2Phase1DHGroupNumbersRequestListValue = ( input , context ) : any => { const entries = { } ; if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } return entries ; } ; const serializeAws_ec2Phase1EncryptionAlgorithmsRequestList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2Phase1EncryptionAlgorithmsRequestListValue ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2Phase1EncryptionAlgorithmsRequestListValue = ( input , context ) : any => { const entries = { } ; if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } return entries ; } ; const serializeAws_ec2Phase1IntegrityAlgorithmsRequestList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2Phase1IntegrityAlgorithmsRequestListValue ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2Phase1IntegrityAlgorithmsRequestListValue = ( input , context ) : any => { const entries = { } ; if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } return entries ; } ; const serializeAws_ec2Phase2DHGroupNumbersRequestList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2Phase2DHGroupNumbersRequestListValue ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2Phase2DHGroupNumbersRequestListValue = ( input , context ) : any => { const entries = { } ; if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } return entries ; } ; const serializeAws_ec2Phase2EncryptionAlgorithmsRequestList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2Phase2EncryptionAlgorithmsRequestListValue ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2Phase2EncryptionAlgorithmsRequestListValue = ( input , context ) : any => { const entries = { } ; if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } return entries ; } ; const serializeAws_ec2Phase2IntegrityAlgorithmsRequestList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2Phase2IntegrityAlgorithmsRequestListValue ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2Phase2IntegrityAlgorithmsRequestListValue = ( input , context ) : any => { const entries = { } ; if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } return entries ; } ; const serializeAws_ec2Placement = ( input , context ) : any => { const entries = { } ; if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . Affinity !== undefined && input . Affinity !== null ) { entries [ "Affinity" ] = input . Affinity ; } if ( input . GroupName !== undefined && input . GroupName !== null ) { entries [ "GroupName" ] = input . GroupName ; } if ( input . PartitionNumber !== undefined && input . PartitionNumber !== null ) { entries [ "PartitionNumber" ] = input . PartitionNumber ; } if ( input . HostId !== undefined && input . HostId !== null ) { entries [ "HostId" ] = input . HostId ; } if ( input . Tenancy !== undefined && input . Tenancy !== null ) { entries [ "Tenancy" ] = input . Tenancy ; } if ( input . SpreadDomain !== undefined && input . SpreadDomain !== null ) { entries [ "SpreadDomain" ] = input . SpreadDomain ; } if ( input . HostResourceGroupArn !== undefined && input . HostResourceGroupArn !== null ) { entries [ "HostResourceGroupArn" ] = input . HostResourceGroupArn ; } return entries ; } ; const serializeAws_ec2PlacementGroupIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `GroupId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2PlacementGroupStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2PortRange = ( input , context ) : any => { const entries = { } ; if ( input . From !== undefined && input . From !== null ) { entries [ "From" ] = input . From ; } if ( input . To !== undefined && input . To !== null ) { entries [ "To" ] = input . To ; } return entries ; } ; const serializeAws_ec2PrefixListId = ( input , context ) : any => { const entries = { } ; if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . PrefixListId !== undefined && input . PrefixListId !== null ) { entries [ "PrefixListId" ] = input . PrefixListId ; } return entries ; } ; const serializeAws_ec2PrefixListIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2PrefixListId ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2PrefixListResourceIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2PriceScheduleSpecification = ( input , context ) : any => { const entries = { } ; if ( input . CurrencyCode !== undefined && input . CurrencyCode !== null ) { entries [ "CurrencyCode" ] = input . CurrencyCode ; } if ( input . Price !== undefined && input . Price !== null ) { entries [ "Price" ] = __serializeFloat ( input . Price ) ; } if ( input . Term !== undefined && input . Term !== null ) { entries [ "Term" ] = input . Term ; } return entries ; } ; const serializeAws_ec2PriceScheduleSpecificationList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2PriceScheduleSpecification ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2PrivateDnsNameOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . HostnameType !== undefined && input . HostnameType !== null ) { entries [ "HostnameType" ] = input . HostnameType ; } if ( input . EnableResourceNameDnsARecord !== undefined && input . EnableResourceNameDnsARecord !== null ) { entries [ "EnableResourceNameDnsARecord" ] = input . EnableResourceNameDnsARecord ; } if ( input . EnableResourceNameDnsAAAARecord !== undefined && input . EnableResourceNameDnsAAAARecord !== null ) { entries [ "EnableResourceNameDnsAAAARecord" ] = input . EnableResourceNameDnsAAAARecord ; } return entries ; } ; const serializeAws_ec2PrivateIpAddressConfigSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2ScheduledInstancesPrivateIpAddressConfig ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `PrivateIpAddressConfigSet.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2PrivateIpAddressSpecification = ( input , context ) : any => { const entries = { } ; if ( input . Primary !== undefined && input . Primary !== null ) { entries [ "Primary" ] = input . Primary ; } if ( input . PrivateIpAddress !== undefined && input . PrivateIpAddress !== null ) { entries [ "PrivateIpAddress" ] = input . PrivateIpAddress ; } return entries ; } ; const serializeAws_ec2PrivateIpAddressSpecificationList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2PrivateIpAddressSpecification ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2PrivateIpAddressStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `PrivateIpAddress.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ProductCodeStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `ProductCode.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ProductDescriptionList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ProtocolList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ProvisionByoipCidrRequest = ( input , context ) : any => { const entries = { } ; if ( input . Cidr !== undefined && input . Cidr !== null ) { entries [ "Cidr" ] = input . Cidr ; } if ( input . CidrAuthorizationContext !== undefined && input . CidrAuthorizationContext !== null ) { const memberEntries = serializeAws_ec2CidrAuthorizationContext ( input . CidrAuthorizationContext , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CidrAuthorizationContext.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . PubliclyAdvertisable !== undefined && input . PubliclyAdvertisable !== null ) { entries [ "PubliclyAdvertisable" ] = input . PubliclyAdvertisable ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . PoolTagSpecifications !== undefined && input . PoolTagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . PoolTagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PoolTagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MultiRegion !== undefined && input . MultiRegion !== null ) { entries [ "MultiRegion" ] = input . MultiRegion ; } return entries ; } ; const serializeAws_ec2ProvisionIpamPoolCidrRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . IpamPoolId !== undefined && input . IpamPoolId !== null ) { entries [ "IpamPoolId" ] = input . IpamPoolId ; } if ( input . Cidr !== undefined && input . Cidr !== null ) { entries [ "Cidr" ] = input . Cidr ; } if ( input . CidrAuthorizationContext !== undefined && input . CidrAuthorizationContext !== null ) { const memberEntries = serializeAws_ec2IpamCidrAuthorizationContext ( input . CidrAuthorizationContext , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CidrAuthorizationContext.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ProvisionPublicIpv4PoolCidrRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . IpamPoolId !== undefined && input . IpamPoolId !== null ) { entries [ "IpamPoolId" ] = input . IpamPoolId ; } if ( input . PoolId !== undefined && input . PoolId !== null ) { entries [ "PoolId" ] = input . PoolId ; } if ( input . NetmaskLength !== undefined && input . NetmaskLength !== null ) { entries [ "NetmaskLength" ] = input . NetmaskLength ; } return entries ; } ; const serializeAws_ec2PublicIpStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `PublicIp.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2PublicIpv4PoolIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2PurchaseHostReservationRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . CurrencyCode !== undefined && input . CurrencyCode !== null ) { entries [ "CurrencyCode" ] = input . CurrencyCode ; } if ( input . HostIdSet !== undefined && input . HostIdSet !== null ) { const memberEntries = serializeAws_ec2RequestHostIdSet ( input . HostIdSet , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `HostIdSet.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . LimitPrice !== undefined && input . LimitPrice !== null ) { entries [ "LimitPrice" ] = input . LimitPrice ; } if ( input . OfferingId !== undefined && input . OfferingId !== null ) { entries [ "OfferingId" ] = input . OfferingId ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2PurchaseRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceCount !== undefined && input . InstanceCount !== null ) { entries [ "InstanceCount" ] = input . InstanceCount ; } if ( input . PurchaseToken !== undefined && input . PurchaseToken !== null ) { entries [ "PurchaseToken" ] = input . PurchaseToken ; } return entries ; } ; const serializeAws_ec2PurchaseRequestSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2PurchaseRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `PurchaseRequest.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2PurchaseReservedInstancesOfferingRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceCount !== undefined && input . InstanceCount !== null ) { entries [ "InstanceCount" ] = input . InstanceCount ; } if ( input . ReservedInstancesOfferingId !== undefined && input . ReservedInstancesOfferingId !== null ) { entries [ "ReservedInstancesOfferingId" ] = input . ReservedInstancesOfferingId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . LimitPrice !== undefined && input . LimitPrice !== null ) { const memberEntries = serializeAws_ec2ReservedInstanceLimitPrice ( input . LimitPrice , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LimitPrice.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . PurchaseTime !== undefined && input . PurchaseTime !== null ) { entries [ "PurchaseTime" ] = input . PurchaseTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } return entries ; } ; const serializeAws_ec2PurchaseScheduledInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . PurchaseRequests !== undefined && input . PurchaseRequests !== null ) { const memberEntries = serializeAws_ec2PurchaseRequestSet ( input . PurchaseRequests , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PurchaseRequest.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ReasonCodesList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2RebootInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceIds !== undefined && input . InstanceIds !== null ) { const memberEntries = serializeAws_ec2InstanceIdStringList ( input . InstanceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2RegionNames = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2RegionNameStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `RegionName.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2RegisterImageRequest = ( input , context ) : any => { const entries = { } ; if ( input . ImageLocation !== undefined && input . ImageLocation !== null ) { entries [ "ImageLocation" ] = input . ImageLocation ; } if ( input . Architecture !== undefined && input . Architecture !== null ) { entries [ "Architecture" ] = input . Architecture ; } if ( input . BlockDeviceMappings !== undefined && input . BlockDeviceMappings !== null ) { const memberEntries = serializeAws_ec2BlockDeviceMappingRequestList ( input . BlockDeviceMappings , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `BlockDeviceMapping.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . EnaSupport !== undefined && input . EnaSupport !== null ) { entries [ "EnaSupport" ] = input . EnaSupport ; } if ( input . KernelId !== undefined && input . KernelId !== null ) { entries [ "KernelId" ] = input . KernelId ; } if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } if ( input . BillingProducts !== undefined && input . BillingProducts !== null ) { const memberEntries = serializeAws_ec2BillingProductList ( input . BillingProducts , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `BillingProduct.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . RamdiskId !== undefined && input . RamdiskId !== null ) { entries [ "RamdiskId" ] = input . RamdiskId ; } if ( input . RootDeviceName !== undefined && input . RootDeviceName !== null ) { entries [ "RootDeviceName" ] = input . RootDeviceName ; } if ( input . SriovNetSupport !== undefined && input . SriovNetSupport !== null ) { entries [ "SriovNetSupport" ] = input . SriovNetSupport ; } if ( input . VirtualizationType !== undefined && input . VirtualizationType !== null ) { entries [ "VirtualizationType" ] = input . VirtualizationType ; } if ( input . BootMode !== undefined && input . BootMode !== null ) { entries [ "BootMode" ] = input . BootMode ; } return entries ; } ; const serializeAws_ec2RegisterInstanceEventNotificationAttributesRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceTagAttribute !== undefined && input . InstanceTagAttribute !== null ) { const memberEntries = serializeAws_ec2RegisterInstanceTagAttributeRequest ( input . InstanceTagAttribute , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceTagAttribute.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2RegisterInstanceTagAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . IncludeAllTagsOfInstance !== undefined && input . IncludeAllTagsOfInstance !== null ) { entries [ "IncludeAllTagsOfInstance" ] = input . IncludeAllTagsOfInstance ; } if ( input . InstanceTagKeys !== undefined && input . InstanceTagKeys !== null ) { const memberEntries = serializeAws_ec2InstanceTagKeySet ( input . InstanceTagKeys , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceTagKey.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2RegisterTransitGatewayMulticastGroupMembersRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayMulticastDomainId !== undefined && input . TransitGatewayMulticastDomainId !== null ) { entries [ "TransitGatewayMulticastDomainId" ] = input . TransitGatewayMulticastDomainId ; } if ( input . GroupIpAddress !== undefined && input . GroupIpAddress !== null ) { entries [ "GroupIpAddress" ] = input . GroupIpAddress ; } if ( input . NetworkInterfaceIds !== undefined && input . NetworkInterfaceIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewayNetworkInterfaceIdList ( input . NetworkInterfaceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInterfaceIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2RegisterTransitGatewayMulticastGroupSourcesRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayMulticastDomainId !== undefined && input . TransitGatewayMulticastDomainId !== null ) { entries [ "TransitGatewayMulticastDomainId" ] = input . TransitGatewayMulticastDomainId ; } if ( input . GroupIpAddress !== undefined && input . GroupIpAddress !== null ) { entries [ "GroupIpAddress" ] = input . GroupIpAddress ; } if ( input . NetworkInterfaceIds !== undefined && input . NetworkInterfaceIds !== null ) { const memberEntries = serializeAws_ec2TransitGatewayNetworkInterfaceIdList ( input . NetworkInterfaceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInterfaceIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2RejectTransitGatewayMulticastDomainAssociationsRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayMulticastDomainId !== undefined && input . TransitGatewayMulticastDomainId !== null ) { entries [ "TransitGatewayMulticastDomainId" ] = input . TransitGatewayMulticastDomainId ; } if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . SubnetIds !== undefined && input . SubnetIds !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . SubnetIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SubnetIds.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2RejectTransitGatewayPeeringAttachmentRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2RejectTransitGatewayVpcAttachmentRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2RejectVpcEndpointConnectionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ServiceId !== undefined && input . ServiceId !== null ) { entries [ "ServiceId" ] = input . ServiceId ; } if ( input . VpcEndpointIds !== undefined && input . VpcEndpointIds !== null ) { const memberEntries = serializeAws_ec2VpcEndpointIdList ( input . VpcEndpointIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `VpcEndpointId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2RejectVpcPeeringConnectionRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VpcPeeringConnectionId !== undefined && input . VpcPeeringConnectionId !== null ) { entries [ "VpcPeeringConnectionId" ] = input . VpcPeeringConnectionId ; } return entries ; } ; const serializeAws_ec2ReleaseAddressRequest = ( input , context ) : any => { const entries = { } ; if ( input . AllocationId !== undefined && input . AllocationId !== null ) { entries [ "AllocationId" ] = input . AllocationId ; } if ( input . PublicIp !== undefined && input . PublicIp !== null ) { entries [ "PublicIp" ] = input . PublicIp ; } if ( input . NetworkBorderGroup !== undefined && input . NetworkBorderGroup !== null ) { entries [ "NetworkBorderGroup" ] = input . NetworkBorderGroup ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ReleaseHostsRequest = ( input , context ) : any => { const entries = { } ; if ( input . HostIds !== undefined && input . HostIds !== null ) { const memberEntries = serializeAws_ec2RequestHostIdList ( input . HostIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `HostId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ReleaseIpamPoolAllocationRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . IpamPoolId !== undefined && input . IpamPoolId !== null ) { entries [ "IpamPoolId" ] = input . IpamPoolId ; } if ( input . Cidr !== undefined && input . Cidr !== null ) { entries [ "Cidr" ] = input . Cidr ; } if ( input . IpamPoolAllocationId !== undefined && input . IpamPoolAllocationId !== null ) { entries [ "IpamPoolAllocationId" ] = input . IpamPoolAllocationId ; } return entries ; } ; const serializeAws_ec2RemoveIpamOperatingRegion = ( input , context ) : any => { const entries = { } ; if ( input . RegionName !== undefined && input . RegionName !== null ) { entries [ "RegionName" ] = input . RegionName ; } return entries ; } ; const serializeAws_ec2RemoveIpamOperatingRegionSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2RemoveIpamOperatingRegion ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Member.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2RemovePrefixListEntries = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2RemovePrefixListEntry ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Member.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2RemovePrefixListEntry = ( input , context ) : any => { const entries = { } ; if ( input . Cidr !== undefined && input . Cidr !== null ) { entries [ "Cidr" ] = input . Cidr ; } return entries ; } ; const serializeAws_ec2ReplaceIamInstanceProfileAssociationRequest = ( input , context ) : any => { const entries = { } ; if ( input . IamInstanceProfile !== undefined && input . IamInstanceProfile !== null ) { const memberEntries = serializeAws_ec2IamInstanceProfileSpecification ( input . IamInstanceProfile , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IamInstanceProfile.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . AssociationId !== undefined && input . AssociationId !== null ) { entries [ "AssociationId" ] = input . AssociationId ; } return entries ; } ; const serializeAws_ec2ReplaceNetworkAclAssociationRequest = ( input , context ) : any => { const entries = { } ; if ( input . AssociationId !== undefined && input . AssociationId !== null ) { entries [ "AssociationId" ] = input . AssociationId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NetworkAclId !== undefined && input . NetworkAclId !== null ) { entries [ "NetworkAclId" ] = input . NetworkAclId ; } return entries ; } ; const serializeAws_ec2ReplaceNetworkAclEntryRequest = ( input , context ) : any => { const entries = { } ; if ( input . CidrBlock !== undefined && input . CidrBlock !== null ) { entries [ "CidrBlock" ] = input . CidrBlock ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Egress !== undefined && input . Egress !== null ) { entries [ "Egress" ] = input . Egress ; } if ( input . IcmpTypeCode !== undefined && input . IcmpTypeCode !== null ) { const memberEntries = serializeAws_ec2IcmpTypeCode ( input . IcmpTypeCode , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Icmp.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Ipv6CidrBlock !== undefined && input . Ipv6CidrBlock !== null ) { entries [ "Ipv6CidrBlock" ] = input . Ipv6CidrBlock ; } if ( input . NetworkAclId !== undefined && input . NetworkAclId !== null ) { entries [ "NetworkAclId" ] = input . NetworkAclId ; } if ( input . PortRange !== undefined && input . PortRange !== null ) { const memberEntries = serializeAws_ec2PortRange ( input . PortRange , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PortRange.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Protocol !== undefined && input . Protocol !== null ) { entries [ "Protocol" ] = input . Protocol ; } if ( input . RuleAction !== undefined && input . RuleAction !== null ) { entries [ "RuleAction" ] = input . RuleAction ; } if ( input . RuleNumber !== undefined && input . RuleNumber !== null ) { entries [ "RuleNumber" ] = input . RuleNumber ; } return entries ; } ; const serializeAws_ec2ReplaceRootVolumeTaskIds = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `ReplaceRootVolumeTaskId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ReplaceRouteRequest = ( input , context ) : any => { const entries = { } ; if ( input . DestinationCidrBlock !== undefined && input . DestinationCidrBlock !== null ) { entries [ "DestinationCidrBlock" ] = input . DestinationCidrBlock ; } if ( input . DestinationIpv6CidrBlock !== undefined && input . DestinationIpv6CidrBlock !== null ) { entries [ "DestinationIpv6CidrBlock" ] = input . DestinationIpv6CidrBlock ; } if ( input . DestinationPrefixListId !== undefined && input . DestinationPrefixListId !== null ) { entries [ "DestinationPrefixListId" ] = input . DestinationPrefixListId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . VpcEndpointId !== undefined && input . VpcEndpointId !== null ) { entries [ "VpcEndpointId" ] = input . VpcEndpointId ; } if ( input . EgressOnlyInternetGatewayId !== undefined && input . EgressOnlyInternetGatewayId !== null ) { entries [ "EgressOnlyInternetGatewayId" ] = input . EgressOnlyInternetGatewayId ; } if ( input . GatewayId !== undefined && input . GatewayId !== null ) { entries [ "GatewayId" ] = input . GatewayId ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . LocalTarget !== undefined && input . LocalTarget !== null ) { entries [ "LocalTarget" ] = input . LocalTarget ; } if ( input . NatGatewayId !== undefined && input . NatGatewayId !== null ) { entries [ "NatGatewayId" ] = input . NatGatewayId ; } if ( input . TransitGatewayId !== undefined && input . TransitGatewayId !== null ) { entries [ "TransitGatewayId" ] = input . TransitGatewayId ; } if ( input . LocalGatewayId !== undefined && input . LocalGatewayId !== null ) { entries [ "LocalGatewayId" ] = input . LocalGatewayId ; } if ( input . CarrierGatewayId !== undefined && input . CarrierGatewayId !== null ) { entries [ "CarrierGatewayId" ] = input . CarrierGatewayId ; } if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } if ( input . RouteTableId !== undefined && input . RouteTableId !== null ) { entries [ "RouteTableId" ] = input . RouteTableId ; } if ( input . VpcPeeringConnectionId !== undefined && input . VpcPeeringConnectionId !== null ) { entries [ "VpcPeeringConnectionId" ] = input . VpcPeeringConnectionId ; } if ( input . CoreNetworkArn !== undefined && input . CoreNetworkArn !== null ) { entries [ "CoreNetworkArn" ] = input . CoreNetworkArn ; } return entries ; } ; const serializeAws_ec2ReplaceRouteTableAssociationRequest = ( input , context ) : any => { const entries = { } ; if ( input . AssociationId !== undefined && input . AssociationId !== null ) { entries [ "AssociationId" ] = input . AssociationId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . RouteTableId !== undefined && input . RouteTableId !== null ) { entries [ "RouteTableId" ] = input . RouteTableId ; } return entries ; } ; const serializeAws_ec2ReplaceTransitGatewayRouteRequest = ( input , context ) : any => { const entries = { } ; if ( input . DestinationCidrBlock !== undefined && input . DestinationCidrBlock !== null ) { entries [ "DestinationCidrBlock" ] = input . DestinationCidrBlock ; } if ( input . TransitGatewayRouteTableId !== undefined && input . TransitGatewayRouteTableId !== null ) { entries [ "TransitGatewayRouteTableId" ] = input . TransitGatewayRouteTableId ; } if ( input . TransitGatewayAttachmentId !== undefined && input . TransitGatewayAttachmentId !== null ) { entries [ "TransitGatewayAttachmentId" ] = input . TransitGatewayAttachmentId ; } if ( input . Blackhole !== undefined && input . Blackhole !== null ) { entries [ "Blackhole" ] = input . Blackhole ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ReportInstanceStatusRequest = ( input , context ) : any => { const entries = { } ; if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . EndTime !== undefined && input . EndTime !== null ) { entries [ "EndTime" ] = input . EndTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . Instances !== undefined && input . Instances !== null ) { const memberEntries = serializeAws_ec2InstanceIdStringList ( input . Instances , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ReasonCodes !== undefined && input . ReasonCodes !== null ) { const memberEntries = serializeAws_ec2ReasonCodesList ( input . ReasonCodes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ReasonCode.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . StartTime !== undefined && input . StartTime !== null ) { entries [ "StartTime" ] = input . StartTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . Status !== undefined && input . Status !== null ) { entries [ "Status" ] = input . Status ; } return entries ; } ; const serializeAws_ec2RequestHostIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2RequestHostIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2RequestInstanceTypeList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2RequestIpamResourceTag = ( input , context ) : any => { const entries = { } ; if ( input . Key !== undefined && input . Key !== null ) { entries [ "Key" ] = input . Key ; } if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } return entries ; } ; const serializeAws_ec2RequestIpamResourceTagList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2RequestIpamResourceTag ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2RequestLaunchTemplateData = ( input , context ) : any => { const entries = { } ; if ( input . KernelId !== undefined && input . KernelId !== null ) { entries [ "KernelId" ] = input . KernelId ; } if ( input . EbsOptimized !== undefined && input . EbsOptimized !== null ) { entries [ "EbsOptimized" ] = input . EbsOptimized ; } if ( input . IamInstanceProfile !== undefined && input . IamInstanceProfile !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateIamInstanceProfileSpecificationRequest ( input . IamInstanceProfile , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IamInstanceProfile.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . BlockDeviceMappings !== undefined && input . BlockDeviceMappings !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateBlockDeviceMappingRequestList ( input . BlockDeviceMappings , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `BlockDeviceMapping.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NetworkInterfaces !== undefined && input . NetworkInterfaces !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateInstanceNetworkInterfaceSpecificationRequestList ( input . NetworkInterfaces , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInterface.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ImageId !== undefined && input . ImageId !== null ) { entries [ "ImageId" ] = input . ImageId ; } if ( input . InstanceType !== undefined && input . InstanceType !== null ) { entries [ "InstanceType" ] = input . InstanceType ; } if ( input . KeyName !== undefined && input . KeyName !== null ) { entries [ "KeyName" ] = input . KeyName ; } if ( input . Monitoring !== undefined && input . Monitoring !== null ) { const memberEntries = serializeAws_ec2LaunchTemplatesMonitoringRequest ( input . Monitoring , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Monitoring.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Placement !== undefined && input . Placement !== null ) { const memberEntries = serializeAws_ec2LaunchTemplatePlacementRequest ( input . Placement , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Placement.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . RamDiskId !== undefined && input . RamDiskId !== null ) { entries [ "RamDiskId" ] = input . RamDiskId ; } if ( input . DisableApiTermination !== undefined && input . DisableApiTermination !== null ) { entries [ "DisableApiTermination" ] = input . DisableApiTermination ; } if ( input . InstanceInitiatedShutdownBehavior !== undefined && input . InstanceInitiatedShutdownBehavior !== null ) { entries [ "InstanceInitiatedShutdownBehavior" ] = input . InstanceInitiatedShutdownBehavior ; } if ( input . UserData !== undefined && input . UserData !== null ) { entries [ "UserData" ] = input . UserData ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateTagSpecificationRequestList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ElasticGpuSpecifications !== undefined && input . ElasticGpuSpecifications !== null ) { const memberEntries = serializeAws_ec2ElasticGpuSpecificationList ( input . ElasticGpuSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ElasticGpuSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ElasticInferenceAccelerators !== undefined && input . ElasticInferenceAccelerators !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateElasticInferenceAcceleratorList ( input . ElasticInferenceAccelerators , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ElasticInferenceAccelerator.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SecurityGroupIds !== undefined && input . SecurityGroupIds !== null ) { const memberEntries = serializeAws_ec2SecurityGroupIdStringList ( input . SecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SecurityGroups !== undefined && input . SecurityGroups !== null ) { const memberEntries = serializeAws_ec2SecurityGroupStringList ( input . SecurityGroups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroup.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceMarketOptions !== undefined && input . InstanceMarketOptions !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateInstanceMarketOptionsRequest ( input . InstanceMarketOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceMarketOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . CreditSpecification !== undefined && input . CreditSpecification !== null ) { const memberEntries = serializeAws_ec2CreditSpecificationRequest ( input . CreditSpecification , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CreditSpecification.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . CpuOptions !== undefined && input . CpuOptions !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateCpuOptionsRequest ( input . CpuOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CpuOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . CapacityReservationSpecification !== undefined && input . CapacityReservationSpecification !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateCapacityReservationSpecificationRequest ( input . CapacityReservationSpecification , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CapacityReservationSpecification.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . LicenseSpecifications !== undefined && input . LicenseSpecifications !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateLicenseSpecificationListRequest ( input . LicenseSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LicenseSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . HibernationOptions !== undefined && input . HibernationOptions !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateHibernationOptionsRequest ( input . HibernationOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `HibernationOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . MetadataOptions !== undefined && input . MetadataOptions !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateInstanceMetadataOptionsRequest ( input . MetadataOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `MetadataOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . EnclaveOptions !== undefined && input . EnclaveOptions !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateEnclaveOptionsRequest ( input . EnclaveOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnclaveOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceRequirements !== undefined && input . InstanceRequirements !== null ) { const memberEntries = serializeAws_ec2InstanceRequirementsRequest ( input . InstanceRequirements , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceRequirements.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . PrivateDnsNameOptions !== undefined && input . PrivateDnsNameOptions !== null ) { const memberEntries = serializeAws_ec2LaunchTemplatePrivateDnsNameOptionsRequest ( input . PrivateDnsNameOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PrivateDnsNameOptions.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2RequestSpotFleetRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . SpotFleetRequestConfig !== undefined && input . SpotFleetRequestConfig !== null ) { const memberEntries = serializeAws_ec2SpotFleetRequestConfigData ( input . SpotFleetRequestConfig , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SpotFleetRequestConfig.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2RequestSpotInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . AvailabilityZoneGroup !== undefined && input . AvailabilityZoneGroup !== null ) { entries [ "AvailabilityZoneGroup" ] = input . AvailabilityZoneGroup ; } if ( input . BlockDurationMinutes !== undefined && input . BlockDurationMinutes !== null ) { entries [ "BlockDurationMinutes" ] = input . BlockDurationMinutes ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceCount !== undefined && input . InstanceCount !== null ) { entries [ "InstanceCount" ] = input . InstanceCount ; } if ( input . LaunchGroup !== undefined && input . LaunchGroup !== null ) { entries [ "LaunchGroup" ] = input . LaunchGroup ; } if ( input . LaunchSpecification !== undefined && input . LaunchSpecification !== null ) { const memberEntries = serializeAws_ec2RequestSpotLaunchSpecification ( input . LaunchSpecification , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchSpecification.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . SpotPrice !== undefined && input . SpotPrice !== null ) { entries [ "SpotPrice" ] = input . SpotPrice ; } if ( input . Type !== undefined && input . Type !== null ) { entries [ "Type" ] = input . Type ; } if ( input . ValidFrom !== undefined && input . ValidFrom !== null ) { entries [ "ValidFrom" ] = input . ValidFrom . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . ValidUntil !== undefined && input . ValidUntil !== null ) { entries [ "ValidUntil" ] = input . ValidUntil . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceInterruptionBehavior !== undefined && input . InstanceInterruptionBehavior !== null ) { entries [ "InstanceInterruptionBehavior" ] = input . InstanceInterruptionBehavior ; } return entries ; } ; const serializeAws_ec2RequestSpotLaunchSpecification = ( input , context ) : any => { const entries = { } ; if ( input . SecurityGroupIds !== undefined && input . SecurityGroupIds !== null ) { const memberEntries = serializeAws_ec2RequestSpotLaunchSpecificationSecurityGroupIdList ( input . SecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SecurityGroups !== undefined && input . SecurityGroups !== null ) { const memberEntries = serializeAws_ec2RequestSpotLaunchSpecificationSecurityGroupList ( input . SecurityGroups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroup.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AddressingType !== undefined && input . AddressingType !== null ) { entries [ "AddressingType" ] = input . AddressingType ; } if ( input . BlockDeviceMappings !== undefined && input . BlockDeviceMappings !== null ) { const memberEntries = serializeAws_ec2BlockDeviceMappingList ( input . BlockDeviceMappings , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `BlockDeviceMapping.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . EbsOptimized !== undefined && input . EbsOptimized !== null ) { entries [ "EbsOptimized" ] = input . EbsOptimized ; } if ( input . IamInstanceProfile !== undefined && input . IamInstanceProfile !== null ) { const memberEntries = serializeAws_ec2IamInstanceProfileSpecification ( input . IamInstanceProfile , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IamInstanceProfile.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ImageId !== undefined && input . ImageId !== null ) { entries [ "ImageId" ] = input . ImageId ; } if ( input . InstanceType !== undefined && input . InstanceType !== null ) { entries [ "InstanceType" ] = input . InstanceType ; } if ( input . KernelId !== undefined && input . KernelId !== null ) { entries [ "KernelId" ] = input . KernelId ; } if ( input . KeyName !== undefined && input . KeyName !== null ) { entries [ "KeyName" ] = input . KeyName ; } if ( input . Monitoring !== undefined && input . Monitoring !== null ) { const memberEntries = serializeAws_ec2RunInstancesMonitoringEnabled ( input . Monitoring , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Monitoring.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . NetworkInterfaces !== undefined && input . NetworkInterfaces !== null ) { const memberEntries = serializeAws_ec2InstanceNetworkInterfaceSpecificationList ( input . NetworkInterfaces , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInterface.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Placement !== undefined && input . Placement !== null ) { const memberEntries = serializeAws_ec2SpotPlacement ( input . Placement , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Placement.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . RamdiskId !== undefined && input . RamdiskId !== null ) { entries [ "RamdiskId" ] = input . RamdiskId ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . UserData !== undefined && input . UserData !== null ) { entries [ "UserData" ] = input . UserData ; } return entries ; } ; const serializeAws_ec2RequestSpotLaunchSpecificationSecurityGroupIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2RequestSpotLaunchSpecificationSecurityGroupList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ReservationFleetInstanceSpecification = ( input , context ) : any => { const entries = { } ; if ( input . InstanceType !== undefined && input . InstanceType !== null ) { entries [ "InstanceType" ] = input . InstanceType ; } if ( input . InstancePlatform !== undefined && input . InstancePlatform !== null ) { entries [ "InstancePlatform" ] = input . InstancePlatform ; } if ( input . Weight !== undefined && input . Weight !== null ) { entries [ "Weight" ] = __serializeFloat ( input . Weight ) ; } if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . AvailabilityZoneId !== undefined && input . AvailabilityZoneId !== null ) { entries [ "AvailabilityZoneId" ] = input . AvailabilityZoneId ; } if ( input . EbsOptimized !== undefined && input . EbsOptimized !== null ) { entries [ "EbsOptimized" ] = input . EbsOptimized ; } if ( input . Priority !== undefined && input . Priority !== null ) { entries [ "Priority" ] = input . Priority ; } return entries ; } ; const serializeAws_ec2ReservationFleetInstanceSpecificationList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2ReservationFleetInstanceSpecification ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Member.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2ReservedInstanceIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `ReservedInstanceId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ReservedInstanceLimitPrice = ( input , context ) : any => { const entries = { } ; if ( input . Amount !== undefined && input . Amount !== null ) { entries [ "Amount" ] = __serializeFloat ( input . Amount ) ; } if ( input . CurrencyCode !== undefined && input . CurrencyCode !== null ) { entries [ "CurrencyCode" ] = input . CurrencyCode ; } return entries ; } ; const serializeAws_ec2ReservedInstancesConfiguration = ( input , context ) : any => { const entries = { } ; if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . InstanceCount !== undefined && input . InstanceCount !== null ) { entries [ "InstanceCount" ] = input . InstanceCount ; } if ( input . InstanceType !== undefined && input . InstanceType !== null ) { entries [ "InstanceType" ] = input . InstanceType ; } if ( input . Platform !== undefined && input . Platform !== null ) { entries [ "Platform" ] = input . Platform ; } if ( input . Scope !== undefined && input . Scope !== null ) { entries [ "Scope" ] = input . Scope ; } return entries ; } ; const serializeAws_ec2ReservedInstancesConfigurationList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2ReservedInstancesConfiguration ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2ReservedInstancesIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `ReservedInstancesId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ReservedInstancesModificationIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `ReservedInstancesModificationId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ReservedInstancesOfferingIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ResetAddressAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . AllocationId !== undefined && input . AllocationId !== null ) { entries [ "AllocationId" ] = input . AllocationId ; } if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ResetEbsDefaultKmsKeyIdRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ResetFpgaImageAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . FpgaImageId !== undefined && input . FpgaImageId !== null ) { entries [ "FpgaImageId" ] = input . FpgaImageId ; } if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } return entries ; } ; const serializeAws_ec2ResetImageAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } if ( input . ImageId !== undefined && input . ImageId !== null ) { entries [ "ImageId" ] = input . ImageId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ResetInstanceAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } return entries ; } ; const serializeAws_ec2ResetNetworkInterfaceAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } if ( input . SourceDestCheck !== undefined && input . SourceDestCheck !== null ) { entries [ "SourceDestCheck" ] = input . SourceDestCheck ; } return entries ; } ; const serializeAws_ec2ResetSnapshotAttributeRequest = ( input , context ) : any => { const entries = { } ; if ( input . Attribute !== undefined && input . Attribute !== null ) { entries [ "Attribute" ] = input . Attribute ; } if ( input . SnapshotId !== undefined && input . SnapshotId !== null ) { entries [ "SnapshotId" ] = input . SnapshotId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ResourceIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ResourceList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ResourceStatementRequest = ( input , context ) : any => { const entries = { } ; if ( input . Resources !== undefined && input . Resources !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . Resources , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Resource.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ResourceTypes !== undefined && input . ResourceTypes !== null ) { const memberEntries = serializeAws_ec2ValueStringList ( input . ResourceTypes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ResourceType.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2RestorableByStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2RestoreAddressToClassicRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . PublicIp !== undefined && input . PublicIp !== null ) { entries [ "PublicIp" ] = input . PublicIp ; } return entries ; } ; const serializeAws_ec2RestoreManagedPrefixListVersionRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . PrefixListId !== undefined && input . PrefixListId !== null ) { entries [ "PrefixListId" ] = input . PrefixListId ; } if ( input . PreviousVersion !== undefined && input . PreviousVersion !== null ) { entries [ "PreviousVersion" ] = input . PreviousVersion ; } if ( input . CurrentVersion !== undefined && input . CurrentVersion !== null ) { entries [ "CurrentVersion" ] = input . CurrentVersion ; } return entries ; } ; const serializeAws_ec2RestoreSnapshotFromRecycleBinRequest = ( input , context ) : any => { const entries = { } ; if ( input . SnapshotId !== undefined && input . SnapshotId !== null ) { entries [ "SnapshotId" ] = input . SnapshotId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2RestoreSnapshotTierRequest = ( input , context ) : any => { const entries = { } ; if ( input . SnapshotId !== undefined && input . SnapshotId !== null ) { entries [ "SnapshotId" ] = input . SnapshotId ; } if ( input . TemporaryRestoreDays !== undefined && input . TemporaryRestoreDays !== null ) { entries [ "TemporaryRestoreDays" ] = input . TemporaryRestoreDays ; } if ( input . PermanentRestore !== undefined && input . PermanentRestore !== null ) { entries [ "PermanentRestore" ] = input . PermanentRestore ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2RevokeClientVpnIngressRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . TargetNetworkCidr !== undefined && input . TargetNetworkCidr !== null ) { entries [ "TargetNetworkCidr" ] = input . TargetNetworkCidr ; } if ( input . AccessGroupId !== undefined && input . AccessGroupId !== null ) { entries [ "AccessGroupId" ] = input . AccessGroupId ; } if ( input . RevokeAllGroups !== undefined && input . RevokeAllGroups !== null ) { entries [ "RevokeAllGroups" ] = input . RevokeAllGroups ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2RevokeSecurityGroupEgressRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . GroupId !== undefined && input . GroupId !== null ) { entries [ "GroupId" ] = input . GroupId ; } if ( input . IpPermissions !== undefined && input . IpPermissions !== null ) { const memberEntries = serializeAws_ec2IpPermissionList ( input . IpPermissions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IpPermissions.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SecurityGroupRuleIds !== undefined && input . SecurityGroupRuleIds !== null ) { const memberEntries = serializeAws_ec2SecurityGroupRuleIdList ( input . SecurityGroupRuleIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupRuleId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . CidrIp !== undefined && input . CidrIp !== null ) { entries [ "CidrIp" ] = input . CidrIp ; } if ( input . FromPort !== undefined && input . FromPort !== null ) { entries [ "FromPort" ] = input . FromPort ; } if ( input . IpProtocol !== undefined && input . IpProtocol !== null ) { entries [ "IpProtocol" ] = input . IpProtocol ; } if ( input . ToPort !== undefined && input . ToPort !== null ) { entries [ "ToPort" ] = input . ToPort ; } if ( input . SourceSecurityGroupName !== undefined && input . SourceSecurityGroupName !== null ) { entries [ "SourceSecurityGroupName" ] = input . SourceSecurityGroupName ; } if ( input . SourceSecurityGroupOwnerId !== undefined && input . SourceSecurityGroupOwnerId !== null ) { entries [ "SourceSecurityGroupOwnerId" ] = input . SourceSecurityGroupOwnerId ; } return entries ; } ; const serializeAws_ec2RevokeSecurityGroupIngressRequest = ( input , context ) : any => { const entries = { } ; if ( input . CidrIp !== undefined && input . CidrIp !== null ) { entries [ "CidrIp" ] = input . CidrIp ; } if ( input . FromPort !== undefined && input . FromPort !== null ) { entries [ "FromPort" ] = input . FromPort ; } if ( input . GroupId !== undefined && input . GroupId !== null ) { entries [ "GroupId" ] = input . GroupId ; } if ( input . GroupName !== undefined && input . GroupName !== null ) { entries [ "GroupName" ] = input . GroupName ; } if ( input . IpPermissions !== undefined && input . IpPermissions !== null ) { const memberEntries = serializeAws_ec2IpPermissionList ( input . IpPermissions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IpPermissions.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . IpProtocol !== undefined && input . IpProtocol !== null ) { entries [ "IpProtocol" ] = input . IpProtocol ; } if ( input . SourceSecurityGroupName !== undefined && input . SourceSecurityGroupName !== null ) { entries [ "SourceSecurityGroupName" ] = input . SourceSecurityGroupName ; } if ( input . SourceSecurityGroupOwnerId !== undefined && input . SourceSecurityGroupOwnerId !== null ) { entries [ "SourceSecurityGroupOwnerId" ] = input . SourceSecurityGroupOwnerId ; } if ( input . ToPort !== undefined && input . ToPort !== null ) { entries [ "ToPort" ] = input . ToPort ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . SecurityGroupRuleIds !== undefined && input . SecurityGroupRuleIds !== null ) { const memberEntries = serializeAws_ec2SecurityGroupRuleIdList ( input . SecurityGroupRuleIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupRuleId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2RouteTableIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2RunInstancesMonitoringEnabled = ( input , context ) : any => { const entries = { } ; if ( input . Enabled !== undefined && input . Enabled !== null ) { entries [ "Enabled" ] = input . Enabled ; } return entries ; } ; const serializeAws_ec2RunInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . BlockDeviceMappings !== undefined && input . BlockDeviceMappings !== null ) { const memberEntries = serializeAws_ec2BlockDeviceMappingRequestList ( input . BlockDeviceMappings , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `BlockDeviceMapping.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ImageId !== undefined && input . ImageId !== null ) { entries [ "ImageId" ] = input . ImageId ; } if ( input . InstanceType !== undefined && input . InstanceType !== null ) { entries [ "InstanceType" ] = input . InstanceType ; } if ( input . Ipv6AddressCount !== undefined && input . Ipv6AddressCount !== null ) { entries [ "Ipv6AddressCount" ] = input . Ipv6AddressCount ; } if ( input . Ipv6Addresses !== undefined && input . Ipv6Addresses !== null ) { const memberEntries = serializeAws_ec2InstanceIpv6AddressList ( input . Ipv6Addresses , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv6Address.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . KernelId !== undefined && input . KernelId !== null ) { entries [ "KernelId" ] = input . KernelId ; } if ( input . KeyName !== undefined && input . KeyName !== null ) { entries [ "KeyName" ] = input . KeyName ; } if ( input . MaxCount !== undefined && input . MaxCount !== null ) { entries [ "MaxCount" ] = input . MaxCount ; } if ( input . MinCount !== undefined && input . MinCount !== null ) { entries [ "MinCount" ] = input . MinCount ; } if ( input . Monitoring !== undefined && input . Monitoring !== null ) { const memberEntries = serializeAws_ec2RunInstancesMonitoringEnabled ( input . Monitoring , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Monitoring.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . Placement !== undefined && input . Placement !== null ) { const memberEntries = serializeAws_ec2Placement ( input . Placement , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Placement.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . RamdiskId !== undefined && input . RamdiskId !== null ) { entries [ "RamdiskId" ] = input . RamdiskId ; } if ( input . SecurityGroupIds !== undefined && input . SecurityGroupIds !== null ) { const memberEntries = serializeAws_ec2SecurityGroupIdStringList ( input . SecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SecurityGroups !== undefined && input . SecurityGroups !== null ) { const memberEntries = serializeAws_ec2SecurityGroupStringList ( input . SecurityGroups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroup.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . UserData !== undefined && input . UserData !== null ) { entries [ "UserData" ] = input . UserData ; } if ( input . AdditionalInfo !== undefined && input . AdditionalInfo !== null ) { entries [ "AdditionalInfo" ] = input . AdditionalInfo ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . DisableApiTermination !== undefined && input . DisableApiTermination !== null ) { entries [ "DisableApiTermination" ] = input . DisableApiTermination ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . EbsOptimized !== undefined && input . EbsOptimized !== null ) { entries [ "EbsOptimized" ] = input . EbsOptimized ; } if ( input . IamInstanceProfile !== undefined && input . IamInstanceProfile !== null ) { const memberEntries = serializeAws_ec2IamInstanceProfileSpecification ( input . IamInstanceProfile , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IamInstanceProfile.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceInitiatedShutdownBehavior !== undefined && input . InstanceInitiatedShutdownBehavior !== null ) { entries [ "InstanceInitiatedShutdownBehavior" ] = input . InstanceInitiatedShutdownBehavior ; } if ( input . NetworkInterfaces !== undefined && input . NetworkInterfaces !== null ) { const memberEntries = serializeAws_ec2InstanceNetworkInterfaceSpecificationList ( input . NetworkInterfaces , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInterface.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . PrivateIpAddress !== undefined && input . PrivateIpAddress !== null ) { entries [ "PrivateIpAddress" ] = input . PrivateIpAddress ; } if ( input . ElasticGpuSpecification !== undefined && input . ElasticGpuSpecification !== null ) { const memberEntries = serializeAws_ec2ElasticGpuSpecifications ( input . ElasticGpuSpecification , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ElasticGpuSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ElasticInferenceAccelerators !== undefined && input . ElasticInferenceAccelerators !== null ) { const memberEntries = serializeAws_ec2ElasticInferenceAccelerators ( input . ElasticInferenceAccelerators , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ElasticInferenceAccelerator.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . LaunchTemplate !== undefined && input . LaunchTemplate !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateSpecification ( input . LaunchTemplate , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchTemplate.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceMarketOptions !== undefined && input . InstanceMarketOptions !== null ) { const memberEntries = serializeAws_ec2InstanceMarketOptionsRequest ( input . InstanceMarketOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceMarketOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . CreditSpecification !== undefined && input . CreditSpecification !== null ) { const memberEntries = serializeAws_ec2CreditSpecificationRequest ( input . CreditSpecification , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CreditSpecification.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . CpuOptions !== undefined && input . CpuOptions !== null ) { const memberEntries = serializeAws_ec2CpuOptionsRequest ( input . CpuOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CpuOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . CapacityReservationSpecification !== undefined && input . CapacityReservationSpecification !== null ) { const memberEntries = serializeAws_ec2CapacityReservationSpecification ( input . CapacityReservationSpecification , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CapacityReservationSpecification.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . HibernationOptions !== undefined && input . HibernationOptions !== null ) { const memberEntries = serializeAws_ec2HibernationOptionsRequest ( input . HibernationOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `HibernationOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . LicenseSpecifications !== undefined && input . LicenseSpecifications !== null ) { const memberEntries = serializeAws_ec2LicenseSpecificationListRequest ( input . LicenseSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LicenseSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MetadataOptions !== undefined && input . MetadataOptions !== null ) { const memberEntries = serializeAws_ec2InstanceMetadataOptionsRequest ( input . MetadataOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `MetadataOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . EnclaveOptions !== undefined && input . EnclaveOptions !== null ) { const memberEntries = serializeAws_ec2EnclaveOptionsRequest ( input . EnclaveOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `EnclaveOptions.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . PrivateDnsNameOptions !== undefined && input . PrivateDnsNameOptions !== null ) { const memberEntries = serializeAws_ec2PrivateDnsNameOptionsRequest ( input . PrivateDnsNameOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PrivateDnsNameOptions.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2RunScheduledInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . InstanceCount !== undefined && input . InstanceCount !== null ) { entries [ "InstanceCount" ] = input . InstanceCount ; } if ( input . LaunchSpecification !== undefined && input . LaunchSpecification !== null ) { const memberEntries = serializeAws_ec2ScheduledInstancesLaunchSpecification ( input . LaunchSpecification , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchSpecification.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ScheduledInstanceId !== undefined && input . ScheduledInstanceId !== null ) { entries [ "ScheduledInstanceId" ] = input . ScheduledInstanceId ; } return entries ; } ; const serializeAws_ec2S3ObjectTag = ( input , context ) : any => { const entries = { } ; if ( input . Key !== undefined && input . Key !== null ) { entries [ "Key" ] = input . Key ; } if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } return entries ; } ; const serializeAws_ec2S3ObjectTagList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2S3ObjectTag ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2S3Storage = ( input , context ) : any => { const entries = { } ; if ( input . AWSAccessKeyId !== undefined && input . AWSAccessKeyId !== null ) { entries [ "AWSAccessKeyId" ] = input . AWSAccessKeyId ; } if ( input . Bucket !== undefined && input . Bucket !== null ) { entries [ "Bucket" ] = input . Bucket ; } if ( input . Prefix !== undefined && input . Prefix !== null ) { entries [ "Prefix" ] = input . Prefix ; } if ( input . UploadPolicy !== undefined && input . UploadPolicy !== null ) { entries [ "UploadPolicy" ] = context . base64Encoder ( input . UploadPolicy ) ; } if ( input . UploadPolicySignature !== undefined && input . UploadPolicySignature !== null ) { entries [ "UploadPolicySignature" ] = input . UploadPolicySignature ; } return entries ; } ; const serializeAws_ec2ScheduledInstanceIdRequestSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `ScheduledInstanceId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ScheduledInstanceRecurrenceRequest = ( input , context ) : any => { const entries = { } ; if ( input . Frequency !== undefined && input . Frequency !== null ) { entries [ "Frequency" ] = input . Frequency ; } if ( input . Interval !== undefined && input . Interval !== null ) { entries [ "Interval" ] = input . Interval ; } if ( input . OccurrenceDays !== undefined && input . OccurrenceDays !== null ) { const memberEntries = serializeAws_ec2OccurrenceDayRequestSet ( input . OccurrenceDays , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `OccurrenceDay.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . OccurrenceRelativeToEnd !== undefined && input . OccurrenceRelativeToEnd !== null ) { entries [ "OccurrenceRelativeToEnd" ] = input . OccurrenceRelativeToEnd ; } if ( input . OccurrenceUnit !== undefined && input . OccurrenceUnit !== null ) { entries [ "OccurrenceUnit" ] = input . OccurrenceUnit ; } return entries ; } ; const serializeAws_ec2ScheduledInstancesBlockDeviceMapping = ( input , context ) : any => { const entries = { } ; if ( input . DeviceName !== undefined && input . DeviceName !== null ) { entries [ "DeviceName" ] = input . DeviceName ; } if ( input . Ebs !== undefined && input . Ebs !== null ) { const memberEntries = serializeAws_ec2ScheduledInstancesEbs ( input . Ebs , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ebs.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . NoDevice !== undefined && input . NoDevice !== null ) { entries [ "NoDevice" ] = input . NoDevice ; } if ( input . VirtualName !== undefined && input . VirtualName !== null ) { entries [ "VirtualName" ] = input . VirtualName ; } return entries ; } ; const serializeAws_ec2ScheduledInstancesBlockDeviceMappingSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2ScheduledInstancesBlockDeviceMapping ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `BlockDeviceMapping.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2ScheduledInstancesEbs = ( input , context ) : any => { const entries = { } ; if ( input . DeleteOnTermination !== undefined && input . DeleteOnTermination !== null ) { entries [ "DeleteOnTermination" ] = input . DeleteOnTermination ; } if ( input . Encrypted !== undefined && input . Encrypted !== null ) { entries [ "Encrypted" ] = input . Encrypted ; } if ( input . Iops !== undefined && input . Iops !== null ) { entries [ "Iops" ] = input . Iops ; } if ( input . SnapshotId !== undefined && input . SnapshotId !== null ) { entries [ "SnapshotId" ] = input . SnapshotId ; } if ( input . VolumeSize !== undefined && input . VolumeSize !== null ) { entries [ "VolumeSize" ] = input . VolumeSize ; } if ( input . VolumeType !== undefined && input . VolumeType !== null ) { entries [ "VolumeType" ] = input . VolumeType ; } return entries ; } ; const serializeAws_ec2ScheduledInstancesIamInstanceProfile = ( input , context ) : any => { const entries = { } ; if ( input . Arn !== undefined && input . Arn !== null ) { entries [ "Arn" ] = input . Arn ; } if ( input . Name !== undefined && input . Name !== null ) { entries [ "Name" ] = input . Name ; } return entries ; } ; const serializeAws_ec2ScheduledInstancesIpv6Address = ( input , context ) : any => { const entries = { } ; if ( input . Ipv6Address !== undefined && input . Ipv6Address !== null ) { entries [ "Ipv6Address" ] = input . Ipv6Address ; } return entries ; } ; const serializeAws_ec2ScheduledInstancesIpv6AddressList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2ScheduledInstancesIpv6Address ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Ipv6Address.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2ScheduledInstancesLaunchSpecification = ( input , context ) : any => { const entries = { } ; if ( input . BlockDeviceMappings !== undefined && input . BlockDeviceMappings !== null ) { const memberEntries = serializeAws_ec2ScheduledInstancesBlockDeviceMappingSet ( input . BlockDeviceMappings , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `BlockDeviceMapping.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . EbsOptimized !== undefined && input . EbsOptimized !== null ) { entries [ "EbsOptimized" ] = input . EbsOptimized ; } if ( input . IamInstanceProfile !== undefined && input . IamInstanceProfile !== null ) { const memberEntries = serializeAws_ec2ScheduledInstancesIamInstanceProfile ( input . IamInstanceProfile , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IamInstanceProfile.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ImageId !== undefined && input . ImageId !== null ) { entries [ "ImageId" ] = input . ImageId ; } if ( input . InstanceType !== undefined && input . InstanceType !== null ) { entries [ "InstanceType" ] = input . InstanceType ; } if ( input . KernelId !== undefined && input . KernelId !== null ) { entries [ "KernelId" ] = input . KernelId ; } if ( input . KeyName !== undefined && input . KeyName !== null ) { entries [ "KeyName" ] = input . KeyName ; } if ( input . Monitoring !== undefined && input . Monitoring !== null ) { const memberEntries = serializeAws_ec2ScheduledInstancesMonitoring ( input . Monitoring , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Monitoring.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . NetworkInterfaces !== undefined && input . NetworkInterfaces !== null ) { const memberEntries = serializeAws_ec2ScheduledInstancesNetworkInterfaceSet ( input . NetworkInterfaces , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInterface.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Placement !== undefined && input . Placement !== null ) { const memberEntries = serializeAws_ec2ScheduledInstancesPlacement ( input . Placement , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Placement.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . RamdiskId !== undefined && input . RamdiskId !== null ) { entries [ "RamdiskId" ] = input . RamdiskId ; } if ( input . SecurityGroupIds !== undefined && input . SecurityGroupIds !== null ) { const memberEntries = serializeAws_ec2ScheduledInstancesSecurityGroupIdSet ( input . SecurityGroupIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . UserData !== undefined && input . UserData !== null ) { entries [ "UserData" ] = input . UserData ; } return entries ; } ; const serializeAws_ec2ScheduledInstancesMonitoring = ( input , context ) : any => { const entries = { } ; if ( input . Enabled !== undefined && input . Enabled !== null ) { entries [ "Enabled" ] = input . Enabled ; } return entries ; } ; const serializeAws_ec2ScheduledInstancesNetworkInterface = ( input , context ) : any => { const entries = { } ; if ( input . AssociatePublicIpAddress !== undefined && input . AssociatePublicIpAddress !== null ) { entries [ "AssociatePublicIpAddress" ] = input . AssociatePublicIpAddress ; } if ( input . DeleteOnTermination !== undefined && input . DeleteOnTermination !== null ) { entries [ "DeleteOnTermination" ] = input . DeleteOnTermination ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . DeviceIndex !== undefined && input . DeviceIndex !== null ) { entries [ "DeviceIndex" ] = input . DeviceIndex ; } if ( input . Groups !== undefined && input . Groups !== null ) { const memberEntries = serializeAws_ec2ScheduledInstancesSecurityGroupIdSet ( input . Groups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Group.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Ipv6AddressCount !== undefined && input . Ipv6AddressCount !== null ) { entries [ "Ipv6AddressCount" ] = input . Ipv6AddressCount ; } if ( input . Ipv6Addresses !== undefined && input . Ipv6Addresses !== null ) { const memberEntries = serializeAws_ec2ScheduledInstancesIpv6AddressList ( input . Ipv6Addresses , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv6Address.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } if ( input . PrivateIpAddress !== undefined && input . PrivateIpAddress !== null ) { entries [ "PrivateIpAddress" ] = input . PrivateIpAddress ; } if ( input . PrivateIpAddressConfigs !== undefined && input . PrivateIpAddressConfigs !== null ) { const memberEntries = serializeAws_ec2PrivateIpAddressConfigSet ( input . PrivateIpAddressConfigs , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PrivateIpAddressConfig.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SecondaryPrivateIpAddressCount !== undefined && input . SecondaryPrivateIpAddressCount !== null ) { entries [ "SecondaryPrivateIpAddressCount" ] = input . SecondaryPrivateIpAddressCount ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } return entries ; } ; const serializeAws_ec2ScheduledInstancesNetworkInterfaceSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2ScheduledInstancesNetworkInterface ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `NetworkInterface.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2ScheduledInstancesPlacement = ( input , context ) : any => { const entries = { } ; if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . GroupName !== undefined && input . GroupName !== null ) { entries [ "GroupName" ] = input . GroupName ; } return entries ; } ; const serializeAws_ec2ScheduledInstancesPrivateIpAddressConfig = ( input , context ) : any => { const entries = { } ; if ( input . Primary !== undefined && input . Primary !== null ) { entries [ "Primary" ] = input . Primary ; } if ( input . PrivateIpAddress !== undefined && input . PrivateIpAddress !== null ) { entries [ "PrivateIpAddress" ] = input . PrivateIpAddress ; } return entries ; } ; const serializeAws_ec2ScheduledInstancesSecurityGroupIdSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `SecurityGroupId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2SearchLocalGatewayRoutesRequest = ( input , context ) : any => { const entries = { } ; if ( input . LocalGatewayRouteTableId !== undefined && input . LocalGatewayRouteTableId !== null ) { entries [ "LocalGatewayRouteTableId" ] = input . LocalGatewayRouteTableId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2SearchTransitGatewayMulticastGroupsRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayMulticastDomainId !== undefined && input . TransitGatewayMulticastDomainId !== null ) { entries [ "TransitGatewayMulticastDomainId" ] = input . TransitGatewayMulticastDomainId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . NextToken !== undefined && input . NextToken !== null ) { entries [ "NextToken" ] = input . NextToken ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2SearchTransitGatewayRoutesRequest = ( input , context ) : any => { const entries = { } ; if ( input . TransitGatewayRouteTableId !== undefined && input . TransitGatewayRouteTableId !== null ) { entries [ "TransitGatewayRouteTableId" ] = input . TransitGatewayRouteTableId ; } if ( input . Filters !== undefined && input . Filters !== null ) { const memberEntries = serializeAws_ec2FilterList ( input . Filters , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Filter.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . MaxResults !== undefined && input . MaxResults !== null ) { entries [ "MaxResults" ] = input . MaxResults ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2SecurityGroupIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `SecurityGroupId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2SecurityGroupRuleDescription = ( input , context ) : any => { const entries = { } ; if ( input . SecurityGroupRuleId !== undefined && input . SecurityGroupRuleId !== null ) { entries [ "SecurityGroupRuleId" ] = input . SecurityGroupRuleId ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } return entries ; } ; const serializeAws_ec2SecurityGroupRuleDescriptionList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2SecurityGroupRuleDescription ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2SecurityGroupRuleIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2SecurityGroupRuleRequest = ( input , context ) : any => { const entries = { } ; if ( input . IpProtocol !== undefined && input . IpProtocol !== null ) { entries [ "IpProtocol" ] = input . IpProtocol ; } if ( input . FromPort !== undefined && input . FromPort !== null ) { entries [ "FromPort" ] = input . FromPort ; } if ( input . ToPort !== undefined && input . ToPort !== null ) { entries [ "ToPort" ] = input . ToPort ; } if ( input . CidrIpv4 !== undefined && input . CidrIpv4 !== null ) { entries [ "CidrIpv4" ] = input . CidrIpv4 ; } if ( input . CidrIpv6 !== undefined && input . CidrIpv6 !== null ) { entries [ "CidrIpv6" ] = input . CidrIpv6 ; } if ( input . PrefixListId !== undefined && input . PrefixListId !== null ) { entries [ "PrefixListId" ] = input . PrefixListId ; } if ( input . ReferencedGroupId !== undefined && input . ReferencedGroupId !== null ) { entries [ "ReferencedGroupId" ] = input . ReferencedGroupId ; } if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } return entries ; } ; const serializeAws_ec2SecurityGroupRuleUpdate = ( input , context ) : any => { const entries = { } ; if ( input . SecurityGroupRuleId !== undefined && input . SecurityGroupRuleId !== null ) { entries [ "SecurityGroupRuleId" ] = input . SecurityGroupRuleId ; } if ( input . SecurityGroupRule !== undefined && input . SecurityGroupRule !== null ) { const memberEntries = serializeAws_ec2SecurityGroupRuleRequest ( input . SecurityGroupRule , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupRule.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2SecurityGroupRuleUpdateList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2SecurityGroupRuleUpdate ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2SecurityGroupStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `SecurityGroup.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2SendDiagnosticInterruptRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceId !== undefined && input . InstanceId !== null ) { entries [ "InstanceId" ] = input . InstanceId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2SlotDateTimeRangeRequest = ( input , context ) : any => { const entries = { } ; if ( input . EarliestTime !== undefined && input . EarliestTime !== null ) { entries [ "EarliestTime" ] = input . EarliestTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . LatestTime !== undefined && input . LatestTime !== null ) { entries [ "LatestTime" ] = input . LatestTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } return entries ; } ; const serializeAws_ec2SlotStartTimeRangeRequest = ( input , context ) : any => { const entries = { } ; if ( input . EarliestTime !== undefined && input . EarliestTime !== null ) { entries [ "EarliestTime" ] = input . EarliestTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . LatestTime !== undefined && input . LatestTime !== null ) { entries [ "LatestTime" ] = input . LatestTime . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } return entries ; } ; const serializeAws_ec2SnapshotDiskContainer = ( input , context ) : any => { const entries = { } ; if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . Format !== undefined && input . Format !== null ) { entries [ "Format" ] = input . Format ; } if ( input . Url !== undefined && input . Url !== null ) { entries [ "Url" ] = input . Url ; } if ( input . UserBucket !== undefined && input . UserBucket !== null ) { const memberEntries = serializeAws_ec2UserBucket ( input . UserBucket , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `UserBucket.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2SnapshotIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `SnapshotId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2SpotCapacityRebalance = ( input , context ) : any => { const entries = { } ; if ( input . ReplacementStrategy !== undefined && input . ReplacementStrategy !== null ) { entries [ "ReplacementStrategy" ] = input . ReplacementStrategy ; } if ( input . TerminationDelay !== undefined && input . TerminationDelay !== null ) { entries [ "TerminationDelay" ] = input . TerminationDelay ; } return entries ; } ; const serializeAws_ec2SpotFleetLaunchSpecification = ( input , context ) : any => { const entries = { } ; if ( input . SecurityGroups !== undefined && input . SecurityGroups !== null ) { const memberEntries = serializeAws_ec2GroupIdentifierList ( input . SecurityGroups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `GroupSet.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AddressingType !== undefined && input . AddressingType !== null ) { entries [ "AddressingType" ] = input . AddressingType ; } if ( input . BlockDeviceMappings !== undefined && input . BlockDeviceMappings !== null ) { const memberEntries = serializeAws_ec2BlockDeviceMappingList ( input . BlockDeviceMappings , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `BlockDeviceMapping.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . EbsOptimized !== undefined && input . EbsOptimized !== null ) { entries [ "EbsOptimized" ] = input . EbsOptimized ; } if ( input . IamInstanceProfile !== undefined && input . IamInstanceProfile !== null ) { const memberEntries = serializeAws_ec2IamInstanceProfileSpecification ( input . IamInstanceProfile , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IamInstanceProfile.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ImageId !== undefined && input . ImageId !== null ) { entries [ "ImageId" ] = input . ImageId ; } if ( input . InstanceType !== undefined && input . InstanceType !== null ) { entries [ "InstanceType" ] = input . InstanceType ; } if ( input . KernelId !== undefined && input . KernelId !== null ) { entries [ "KernelId" ] = input . KernelId ; } if ( input . KeyName !== undefined && input . KeyName !== null ) { entries [ "KeyName" ] = input . KeyName ; } if ( input . Monitoring !== undefined && input . Monitoring !== null ) { const memberEntries = serializeAws_ec2SpotFleetMonitoring ( input . Monitoring , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Monitoring.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . NetworkInterfaces !== undefined && input . NetworkInterfaces !== null ) { const memberEntries = serializeAws_ec2InstanceNetworkInterfaceSpecificationList ( input . NetworkInterfaces , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `NetworkInterfaceSet.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Placement !== undefined && input . Placement !== null ) { const memberEntries = serializeAws_ec2SpotPlacement ( input . Placement , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Placement.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . RamdiskId !== undefined && input . RamdiskId !== null ) { entries [ "RamdiskId" ] = input . RamdiskId ; } if ( input . SpotPrice !== undefined && input . SpotPrice !== null ) { entries [ "SpotPrice" ] = input . SpotPrice ; } if ( input . SubnetId !== undefined && input . SubnetId !== null ) { entries [ "SubnetId" ] = input . SubnetId ; } if ( input . UserData !== undefined && input . UserData !== null ) { entries [ "UserData" ] = input . UserData ; } if ( input . WeightedCapacity !== undefined && input . WeightedCapacity !== null ) { entries [ "WeightedCapacity" ] = __serializeFloat ( input . WeightedCapacity ) ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2SpotFleetTagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecificationSet.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceRequirements !== undefined && input . InstanceRequirements !== null ) { const memberEntries = serializeAws_ec2InstanceRequirements ( input . InstanceRequirements , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceRequirements.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2SpotFleetMonitoring = ( input , context ) : any => { const entries = { } ; if ( input . Enabled !== undefined && input . Enabled !== null ) { entries [ "Enabled" ] = input . Enabled ; } return entries ; } ; const serializeAws_ec2SpotFleetRequestConfigData = ( input , context ) : any => { const entries = { } ; if ( input . AllocationStrategy !== undefined && input . AllocationStrategy !== null ) { entries [ "AllocationStrategy" ] = input . AllocationStrategy ; } if ( input . OnDemandAllocationStrategy !== undefined && input . OnDemandAllocationStrategy !== null ) { entries [ "OnDemandAllocationStrategy" ] = input . OnDemandAllocationStrategy ; } if ( input . SpotMaintenanceStrategies !== undefined && input . SpotMaintenanceStrategies !== null ) { const memberEntries = serializeAws_ec2SpotMaintenanceStrategies ( input . SpotMaintenanceStrategies , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SpotMaintenanceStrategies.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } if ( input . ExcessCapacityTerminationPolicy !== undefined && input . ExcessCapacityTerminationPolicy !== null ) { entries [ "ExcessCapacityTerminationPolicy" ] = input . ExcessCapacityTerminationPolicy ; } if ( input . FulfilledCapacity !== undefined && input . FulfilledCapacity !== null ) { entries [ "FulfilledCapacity" ] = __serializeFloat ( input . FulfilledCapacity ) ; } if ( input . OnDemandFulfilledCapacity !== undefined && input . OnDemandFulfilledCapacity !== null ) { entries [ "OnDemandFulfilledCapacity" ] = __serializeFloat ( input . OnDemandFulfilledCapacity ) ; } if ( input . IamFleetRole !== undefined && input . IamFleetRole !== null ) { entries [ "IamFleetRole" ] = input . IamFleetRole ; } if ( input . LaunchSpecifications !== undefined && input . LaunchSpecifications !== null ) { const memberEntries = serializeAws_ec2LaunchSpecsList ( input . LaunchSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchSpecifications.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . LaunchTemplateConfigs !== undefined && input . LaunchTemplateConfigs !== null ) { const memberEntries = serializeAws_ec2LaunchTemplateConfigList ( input . LaunchTemplateConfigs , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LaunchTemplateConfigs.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SpotPrice !== undefined && input . SpotPrice !== null ) { entries [ "SpotPrice" ] = input . SpotPrice ; } if ( input . TargetCapacity !== undefined && input . TargetCapacity !== null ) { entries [ "TargetCapacity" ] = input . TargetCapacity ; } if ( input . OnDemandTargetCapacity !== undefined && input . OnDemandTargetCapacity !== null ) { entries [ "OnDemandTargetCapacity" ] = input . OnDemandTargetCapacity ; } if ( input . OnDemandMaxTotalPrice !== undefined && input . OnDemandMaxTotalPrice !== null ) { entries [ "OnDemandMaxTotalPrice" ] = input . OnDemandMaxTotalPrice ; } if ( input . SpotMaxTotalPrice !== undefined && input . SpotMaxTotalPrice !== null ) { entries [ "SpotMaxTotalPrice" ] = input . SpotMaxTotalPrice ; } if ( input . TerminateInstancesWithExpiration !== undefined && input . TerminateInstancesWithExpiration !== null ) { entries [ "TerminateInstancesWithExpiration" ] = input . TerminateInstancesWithExpiration ; } if ( input . Type !== undefined && input . Type !== null ) { entries [ "Type" ] = input . Type ; } if ( input . ValidFrom !== undefined && input . ValidFrom !== null ) { entries [ "ValidFrom" ] = input . ValidFrom . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . ValidUntil !== undefined && input . ValidUntil !== null ) { entries [ "ValidUntil" ] = input . ValidUntil . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . ReplaceUnhealthyInstances !== undefined && input . ReplaceUnhealthyInstances !== null ) { entries [ "ReplaceUnhealthyInstances" ] = input . ReplaceUnhealthyInstances ; } if ( input . InstanceInterruptionBehavior !== undefined && input . InstanceInterruptionBehavior !== null ) { entries [ "InstanceInterruptionBehavior" ] = input . InstanceInterruptionBehavior ; } if ( input . LoadBalancersConfig !== undefined && input . LoadBalancersConfig !== null ) { const memberEntries = serializeAws_ec2LoadBalancersConfig ( input . LoadBalancersConfig , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `LoadBalancersConfig.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . InstancePoolsToUseCount !== undefined && input . InstancePoolsToUseCount !== null ) { entries [ "InstancePoolsToUseCount" ] = input . InstancePoolsToUseCount ; } if ( input . Context !== undefined && input . Context !== null ) { entries [ "Context" ] = input . Context ; } if ( input . TargetCapacityUnitType !== undefined && input . TargetCapacityUnitType !== null ) { entries [ "TargetCapacityUnitType" ] = input . TargetCapacityUnitType ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2SpotFleetRequestIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2SpotFleetTagSpecification = ( input , context ) : any => { const entries = { } ; if ( input . ResourceType !== undefined && input . ResourceType !== null ) { entries [ "ResourceType" ] = input . ResourceType ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_ec2TagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tag.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2SpotFleetTagSpecificationList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2SpotFleetTagSpecification ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2SpotInstanceRequestIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `SpotInstanceRequestId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2SpotMaintenanceStrategies = ( input , context ) : any => { const entries = { } ; if ( input . CapacityRebalance !== undefined && input . CapacityRebalance !== null ) { const memberEntries = serializeAws_ec2SpotCapacityRebalance ( input . CapacityRebalance , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `CapacityRebalance.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2SpotMarketOptions = ( input , context ) : any => { const entries = { } ; if ( input . MaxPrice !== undefined && input . MaxPrice !== null ) { entries [ "MaxPrice" ] = input . MaxPrice ; } if ( input . SpotInstanceType !== undefined && input . SpotInstanceType !== null ) { entries [ "SpotInstanceType" ] = input . SpotInstanceType ; } if ( input . BlockDurationMinutes !== undefined && input . BlockDurationMinutes !== null ) { entries [ "BlockDurationMinutes" ] = input . BlockDurationMinutes ; } if ( input . ValidUntil !== undefined && input . ValidUntil !== null ) { entries [ "ValidUntil" ] = input . ValidUntil . toISOString ( ) . split ( "." ) [ 0 ] + "Z" ; } if ( input . InstanceInterruptionBehavior !== undefined && input . InstanceInterruptionBehavior !== null ) { entries [ "InstanceInterruptionBehavior" ] = input . InstanceInterruptionBehavior ; } return entries ; } ; const serializeAws_ec2SpotOptionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . AllocationStrategy !== undefined && input . AllocationStrategy !== null ) { entries [ "AllocationStrategy" ] = input . AllocationStrategy ; } if ( input . MaintenanceStrategies !== undefined && input . MaintenanceStrategies !== null ) { const memberEntries = serializeAws_ec2FleetSpotMaintenanceStrategiesRequest ( input . MaintenanceStrategies , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `MaintenanceStrategies.${ key }` ; entries [ loc ] = value ; } ) ; } if ( input . InstanceInterruptionBehavior !== undefined && input . InstanceInterruptionBehavior !== null ) { entries [ "InstanceInterruptionBehavior" ] = input . InstanceInterruptionBehavior ; } if ( input . InstancePoolsToUseCount !== undefined && input . InstancePoolsToUseCount !== null ) { entries [ "InstancePoolsToUseCount" ] = input . InstancePoolsToUseCount ; } if ( input . SingleInstanceType !== undefined && input . SingleInstanceType !== null ) { entries [ "SingleInstanceType" ] = input . SingleInstanceType ; } if ( input . SingleAvailabilityZone !== undefined && input . SingleAvailabilityZone !== null ) { entries [ "SingleAvailabilityZone" ] = input . SingleAvailabilityZone ; } if ( input . MinTargetCapacity !== undefined && input . MinTargetCapacity !== null ) { entries [ "MinTargetCapacity" ] = input . MinTargetCapacity ; } if ( input . MaxTotalPrice !== undefined && input . MaxTotalPrice !== null ) { entries [ "MaxTotalPrice" ] = input . MaxTotalPrice ; } return entries ; } ; const serializeAws_ec2SpotPlacement = ( input , context ) : any => { const entries = { } ; if ( input . AvailabilityZone !== undefined && input . AvailabilityZone !== null ) { entries [ "AvailabilityZone" ] = input . AvailabilityZone ; } if ( input . GroupName !== undefined && input . GroupName !== null ) { entries [ "GroupName" ] = input . GroupName ; } if ( input . Tenancy !== undefined && input . Tenancy !== null ) { entries [ "Tenancy" ] = input . Tenancy ; } return entries ; } ; const serializeAws_ec2StartInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceIds !== undefined && input . InstanceIds !== null ) { const memberEntries = serializeAws_ec2InstanceIdStringList ( input . InstanceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . AdditionalInfo !== undefined && input . AdditionalInfo !== null ) { entries [ "AdditionalInfo" ] = input . AdditionalInfo ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2StartNetworkInsightsAccessScopeAnalysisRequest = ( input , context ) : any => { const entries = { } ; if ( input . NetworkInsightsAccessScopeId !== undefined && input . NetworkInsightsAccessScopeId !== null ) { entries [ "NetworkInsightsAccessScopeId" ] = input . NetworkInsightsAccessScopeId ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } return entries ; } ; const serializeAws_ec2StartNetworkInsightsAnalysisRequest = ( input , context ) : any => { const entries = { } ; if ( input . NetworkInsightsPathId !== undefined && input . NetworkInsightsPathId !== null ) { entries [ "NetworkInsightsPathId" ] = input . NetworkInsightsPathId ; } if ( input . FilterInArns !== undefined && input . FilterInArns !== null ) { const memberEntries = serializeAws_ec2ArnList ( input . FilterInArns , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `FilterInArn.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . TagSpecifications !== undefined && input . TagSpecifications !== null ) { const memberEntries = serializeAws_ec2TagSpecificationList ( input . TagSpecifications , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TagSpecification.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . ClientToken === undefined ) { input . ClientToken = generateIdempotencyToken ( ) ; } if ( input . ClientToken !== undefined && input . ClientToken !== null ) { entries [ "ClientToken" ] = input . ClientToken ; } return entries ; } ; const serializeAws_ec2StartVpcEndpointServicePrivateDnsVerificationRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . ServiceId !== undefined && input . ServiceId !== null ) { entries [ "ServiceId" ] = input . ServiceId ; } return entries ; } ; const serializeAws_ec2StopInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceIds !== undefined && input . InstanceIds !== null ) { const memberEntries = serializeAws_ec2InstanceIdStringList ( input . InstanceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Hibernate !== undefined && input . Hibernate !== null ) { entries [ "Hibernate" ] = input . Hibernate ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . Force !== undefined && input . Force !== null ) { entries [ "Force" ] = input . Force ; } return entries ; } ; const serializeAws_ec2Storage = ( input , context ) : any => { const entries = { } ; if ( input . S3 !== undefined && input . S3 !== null ) { const memberEntries = serializeAws_ec2S3Storage ( input . S3 , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `S3.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2StorageLocation = ( input , context ) : any => { const entries = { } ; if ( input . Bucket !== undefined && input . Bucket !== null ) { entries [ "Bucket" ] = input . Bucket ; } if ( input . Key !== undefined && input . Key !== null ) { entries [ "Key" ] = input . Key ; } return entries ; } ; const serializeAws_ec2SubnetIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `SubnetId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2Tag = ( input , context ) : any => { const entries = { } ; if ( input . Key !== undefined && input . Key !== null ) { entries [ "Key" ] = input . Key ; } if ( input . Value !== undefined && input . Value !== null ) { entries [ "Value" ] = input . Value ; } return entries ; } ; const serializeAws_ec2TagList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2Tag ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2TagSpecification = ( input , context ) : any => { const entries = { } ; if ( input . ResourceType !== undefined && input . ResourceType !== null ) { entries [ "ResourceType" ] = input . ResourceType ; } if ( input . Tags !== undefined && input . Tags !== null ) { const memberEntries = serializeAws_ec2TagList ( input . Tags , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Tag.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2TagSpecificationList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2TagSpecification ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2TargetCapacitySpecificationRequest = ( input , context ) : any => { const entries = { } ; if ( input . TotalTargetCapacity !== undefined && input . TotalTargetCapacity !== null ) { entries [ "TotalTargetCapacity" ] = input . TotalTargetCapacity ; } if ( input . OnDemandTargetCapacity !== undefined && input . OnDemandTargetCapacity !== null ) { entries [ "OnDemandTargetCapacity" ] = input . OnDemandTargetCapacity ; } if ( input . SpotTargetCapacity !== undefined && input . SpotTargetCapacity !== null ) { entries [ "SpotTargetCapacity" ] = input . SpotTargetCapacity ; } if ( input . DefaultTargetCapacityType !== undefined && input . DefaultTargetCapacityType !== null ) { entries [ "DefaultTargetCapacityType" ] = input . DefaultTargetCapacityType ; } if ( input . TargetCapacityUnitType !== undefined && input . TargetCapacityUnitType !== null ) { entries [ "TargetCapacityUnitType" ] = input . TargetCapacityUnitType ; } return entries ; } ; const serializeAws_ec2TargetConfigurationRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceCount !== undefined && input . InstanceCount !== null ) { entries [ "InstanceCount" ] = input . InstanceCount ; } if ( input . OfferingId !== undefined && input . OfferingId !== null ) { entries [ "OfferingId" ] = input . OfferingId ; } return entries ; } ; const serializeAws_ec2TargetConfigurationRequestSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2TargetConfigurationRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `TargetConfigurationRequest.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2TargetGroup = ( input , context ) : any => { const entries = { } ; if ( input . Arn !== undefined && input . Arn !== null ) { entries [ "Arn" ] = input . Arn ; } return entries ; } ; const serializeAws_ec2TargetGroups = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2TargetGroup ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2TargetGroupsConfig = ( input , context ) : any => { const entries = { } ; if ( input . TargetGroups !== undefined && input . TargetGroups !== null ) { const memberEntries = serializeAws_ec2TargetGroups ( input . TargetGroups , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TargetGroups.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2TerminateClientVpnConnectionsRequest = ( input , context ) : any => { const entries = { } ; if ( input . ClientVpnEndpointId !== undefined && input . ClientVpnEndpointId !== null ) { entries [ "ClientVpnEndpointId" ] = input . ClientVpnEndpointId ; } if ( input . ConnectionId !== undefined && input . ConnectionId !== null ) { entries [ "ConnectionId" ] = input . ConnectionId ; } if ( input . Username !== undefined && input . Username !== null ) { entries [ "Username" ] = input . Username ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2TerminateInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceIds !== undefined && input . InstanceIds !== null ) { const memberEntries = serializeAws_ec2InstanceIdStringList ( input . InstanceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ThroughResourcesStatementRequest = ( input , context ) : any => { const entries = { } ; if ( input . ResourceStatement !== undefined && input . ResourceStatement !== null ) { const memberEntries = serializeAws_ec2ResourceStatementRequest ( input . ResourceStatement , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `ResourceStatement.${ key }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2ThroughResourcesStatementRequestList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2ThroughResourcesStatementRequest ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2TotalLocalStorageGB = ( input , context ) : any => { const entries = { } ; if ( input . Min !== undefined && input . Min !== null ) { entries [ "Min" ] = __serializeFloat ( input . Min ) ; } if ( input . Max !== undefined && input . Max !== null ) { entries [ "Max" ] = __serializeFloat ( input . Max ) ; } return entries ; } ; const serializeAws_ec2TotalLocalStorageGBRequest = ( input , context ) : any => { const entries = { } ; if ( input . Min !== undefined && input . Min !== null ) { entries [ "Min" ] = __serializeFloat ( input . Min ) ; } if ( input . Max !== undefined && input . Max !== null ) { entries [ "Max" ] = __serializeFloat ( input . Max ) ; } return entries ; } ; const serializeAws_ec2TrafficMirrorFilterIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2TrafficMirrorFilterRuleFieldList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2TrafficMirrorNetworkServiceList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2TrafficMirrorPortRangeRequest = ( input , context ) : any => { const entries = { } ; if ( input . FromPort !== undefined && input . FromPort !== null ) { entries [ "FromPort" ] = input . FromPort ; } if ( input . ToPort !== undefined && input . ToPort !== null ) { entries [ "ToPort" ] = input . ToPort ; } return entries ; } ; const serializeAws_ec2TrafficMirrorSessionFieldList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2TrafficMirrorSessionIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2TrafficMirrorTargetIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2TransitGatewayAttachmentIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Member.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2TransitGatewayCidrBlockStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2TransitGatewayConnectPeerIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2TransitGatewayConnectRequestBgpOptions = ( input , context ) : any => { const entries = { } ; if ( input . PeerAsn !== undefined && input . PeerAsn !== null ) { entries [ "PeerAsn" ] = input . PeerAsn ; } return entries ; } ; const serializeAws_ec2TransitGatewayIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2TransitGatewayMulticastDomainIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2TransitGatewayNetworkInterfaceIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2TransitGatewayRequestOptions = ( input , context ) : any => { const entries = { } ; if ( input . AmazonSideAsn !== undefined && input . AmazonSideAsn !== null ) { entries [ "AmazonSideAsn" ] = input . AmazonSideAsn ; } if ( input . AutoAcceptSharedAttachments !== undefined && input . AutoAcceptSharedAttachments !== null ) { entries [ "AutoAcceptSharedAttachments" ] = input . AutoAcceptSharedAttachments ; } if ( input . DefaultRouteTableAssociation !== undefined && input . DefaultRouteTableAssociation !== null ) { entries [ "DefaultRouteTableAssociation" ] = input . DefaultRouteTableAssociation ; } if ( input . DefaultRouteTablePropagation !== undefined && input . DefaultRouteTablePropagation !== null ) { entries [ "DefaultRouteTablePropagation" ] = input . DefaultRouteTablePropagation ; } if ( input . VpnEcmpSupport !== undefined && input . VpnEcmpSupport !== null ) { entries [ "VpnEcmpSupport" ] = input . VpnEcmpSupport ; } if ( input . DnsSupport !== undefined && input . DnsSupport !== null ) { entries [ "DnsSupport" ] = input . DnsSupport ; } if ( input . MulticastSupport !== undefined && input . MulticastSupport !== null ) { entries [ "MulticastSupport" ] = input . MulticastSupport ; } if ( input . TransitGatewayCidrBlocks !== undefined && input . TransitGatewayCidrBlocks !== null ) { const memberEntries = serializeAws_ec2TransitGatewayCidrBlockStringList ( input . TransitGatewayCidrBlocks , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TransitGatewayCidrBlocks.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2TransitGatewayRouteTableIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2TransitGatewaySubnetIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2TrunkInterfaceAssociationIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2UnassignIpv6AddressesRequest = ( input , context ) : any => { const entries = { } ; if ( input . Ipv6Addresses !== undefined && input . Ipv6Addresses !== null ) { const memberEntries = serializeAws_ec2Ipv6AddressList ( input . Ipv6Addresses , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv6Addresses.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Ipv6Prefixes !== undefined && input . Ipv6Prefixes !== null ) { const memberEntries = serializeAws_ec2IpPrefixList ( input . Ipv6Prefixes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv6Prefix.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } return entries ; } ; const serializeAws_ec2UnassignPrivateIpAddressesRequest = ( input , context ) : any => { const entries = { } ; if ( input . NetworkInterfaceId !== undefined && input . NetworkInterfaceId !== null ) { entries [ "NetworkInterfaceId" ] = input . NetworkInterfaceId ; } if ( input . PrivateIpAddresses !== undefined && input . PrivateIpAddresses !== null ) { const memberEntries = serializeAws_ec2PrivateIpAddressStringList ( input . PrivateIpAddresses , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `PrivateIpAddress.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Ipv4Prefixes !== undefined && input . Ipv4Prefixes !== null ) { const memberEntries = serializeAws_ec2IpPrefixList ( input . Ipv4Prefixes , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Ipv4Prefix.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2UnmonitorInstancesRequest = ( input , context ) : any => { const entries = { } ; if ( input . InstanceIds !== undefined && input . InstanceIds !== null ) { const memberEntries = serializeAws_ec2InstanceIdStringList ( input . InstanceIds , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `InstanceId.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2UpdateSecurityGroupRuleDescriptionsEgressRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . GroupId !== undefined && input . GroupId !== null ) { entries [ "GroupId" ] = input . GroupId ; } if ( input . GroupName !== undefined && input . GroupName !== null ) { entries [ "GroupName" ] = input . GroupName ; } if ( input . IpPermissions !== undefined && input . IpPermissions !== null ) { const memberEntries = serializeAws_ec2IpPermissionList ( input . IpPermissions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IpPermissions.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SecurityGroupRuleDescriptions !== undefined && input . SecurityGroupRuleDescriptions !== null ) { const memberEntries = serializeAws_ec2SecurityGroupRuleDescriptionList ( input . SecurityGroupRuleDescriptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupRuleDescription.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2UpdateSecurityGroupRuleDescriptionsIngressRequest = ( input , context ) : any => { const entries = { } ; if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } if ( input . GroupId !== undefined && input . GroupId !== null ) { entries [ "GroupId" ] = input . GroupId ; } if ( input . GroupName !== undefined && input . GroupName !== null ) { entries [ "GroupName" ] = input . GroupName ; } if ( input . IpPermissions !== undefined && input . IpPermissions !== null ) { const memberEntries = serializeAws_ec2IpPermissionList ( input . IpPermissions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IpPermissions.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . SecurityGroupRuleDescriptions !== undefined && input . SecurityGroupRuleDescriptions !== null ) { const memberEntries = serializeAws_ec2SecurityGroupRuleDescriptionList ( input . SecurityGroupRuleDescriptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `SecurityGroupRuleDescription.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } return entries ; } ; const serializeAws_ec2UserBucket = ( input , context ) : any => { const entries = { } ; if ( input . S3Bucket !== undefined && input . S3Bucket !== null ) { entries [ "S3Bucket" ] = input . S3Bucket ; } if ( input . S3Key !== undefined && input . S3Key !== null ) { entries [ "S3Key" ] = input . S3Key ; } return entries ; } ; const serializeAws_ec2UserData = ( input , context ) : any => { const entries = { } ; if ( input . Data !== undefined && input . Data !== null ) { entries [ "Data" ] = input . Data ; } return entries ; } ; const serializeAws_ec2UserGroupStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `UserGroup.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2UserIdGroupPair = ( input , context ) : any => { const entries = { } ; if ( input . Description !== undefined && input . Description !== null ) { entries [ "Description" ] = input . Description ; } if ( input . GroupId !== undefined && input . GroupId !== null ) { entries [ "GroupId" ] = input . GroupId ; } if ( input . GroupName !== undefined && input . GroupName !== null ) { entries [ "GroupName" ] = input . GroupName ; } if ( input . PeeringStatus !== undefined && input . PeeringStatus !== null ) { entries [ "PeeringStatus" ] = input . PeeringStatus ; } if ( input . UserId !== undefined && input . UserId !== null ) { entries [ "UserId" ] = input . UserId ; } if ( input . VpcId !== undefined && input . VpcId !== null ) { entries [ "VpcId" ] = input . VpcId ; } if ( input . VpcPeeringConnectionId !== undefined && input . VpcPeeringConnectionId !== null ) { entries [ "VpcPeeringConnectionId" ] = input . VpcPeeringConnectionId ; } return entries ; } ; const serializeAws_ec2UserIdGroupPairList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2UserIdGroupPair ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Item.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2UserIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `UserId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ValueStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2VCpuCountRange = ( input , context ) : any => { const entries = { } ; if ( input . Min !== undefined && input . Min !== null ) { entries [ "Min" ] = input . Min ; } if ( input . Max !== undefined && input . Max !== null ) { entries [ "Max" ] = input . Max ; } return entries ; } ; const serializeAws_ec2VCpuCountRangeRequest = ( input , context ) : any => { const entries = { } ; if ( input . Min !== undefined && input . Min !== null ) { entries [ "Min" ] = input . Min ; } if ( input . Max !== undefined && input . Max !== null ) { entries [ "Max" ] = input . Max ; } return entries ; } ; const serializeAws_ec2VersionStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2VirtualizationTypeSet = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2VolumeDetail = ( input , context ) : any => { const entries = { } ; if ( input . Size !== undefined && input . Size !== null ) { entries [ "Size" ] = input . Size ; } return entries ; } ; const serializeAws_ec2VolumeIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `VolumeId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2VpcClassicLinkIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `VpcId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2VpcEndpointIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2VpcEndpointRouteTableIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2VpcEndpointSecurityGroupIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2VpcEndpointServiceIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2VpcEndpointSubnetIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2VpcIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `VpcId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2VpcPeeringConnectionIdList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `Item.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2VpnConnectionIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `VpnConnectionId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2VpnConnectionOptionsSpecification = ( input , context ) : any => { const entries = { } ; if ( input . EnableAcceleration !== undefined && input . EnableAcceleration !== null ) { entries [ "EnableAcceleration" ] = input . EnableAcceleration ; } if ( input . StaticRoutesOnly !== undefined && input . StaticRoutesOnly !== null ) { entries [ "StaticRoutesOnly" ] = input . StaticRoutesOnly ; } if ( input . TunnelInsideIpVersion !== undefined && input . TunnelInsideIpVersion !== null ) { entries [ "TunnelInsideIpVersion" ] = input . TunnelInsideIpVersion ; } if ( input . TunnelOptions !== undefined && input . TunnelOptions !== null ) { const memberEntries = serializeAws_ec2VpnTunnelOptionsSpecificationsList ( input . TunnelOptions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `TunnelOptions.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . LocalIpv4NetworkCidr !== undefined && input . LocalIpv4NetworkCidr !== null ) { entries [ "LocalIpv4NetworkCidr" ] = input . LocalIpv4NetworkCidr ; } if ( input . RemoteIpv4NetworkCidr !== undefined && input . RemoteIpv4NetworkCidr !== null ) { entries [ "RemoteIpv4NetworkCidr" ] = input . RemoteIpv4NetworkCidr ; } if ( input . LocalIpv6NetworkCidr !== undefined && input . LocalIpv6NetworkCidr !== null ) { entries [ "LocalIpv6NetworkCidr" ] = input . LocalIpv6NetworkCidr ; } if ( input . RemoteIpv6NetworkCidr !== undefined && input . RemoteIpv6NetworkCidr !== null ) { entries [ "RemoteIpv6NetworkCidr" ] = input . RemoteIpv6NetworkCidr ; } return entries ; } ; const serializeAws_ec2VpnGatewayIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `VpnGatewayId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2VpnTunnelOptionsSpecification = ( input , context ) : any => { const entries = { } ; if ( input . TunnelInsideCidr !== undefined && input . TunnelInsideCidr !== null ) { entries [ "TunnelInsideCidr" ] = input . TunnelInsideCidr ; } if ( input . TunnelInsideIpv6Cidr !== undefined && input . TunnelInsideIpv6Cidr !== null ) { entries [ "TunnelInsideIpv6Cidr" ] = input . TunnelInsideIpv6Cidr ; } if ( input . PreSharedKey !== undefined && input . PreSharedKey !== null ) { entries [ "PreSharedKey" ] = input . PreSharedKey ; } if ( input . Phase1LifetimeSeconds !== undefined && input . Phase1LifetimeSeconds !== null ) { entries [ "Phase1LifetimeSeconds" ] = input . Phase1LifetimeSeconds ; } if ( input . Phase2LifetimeSeconds !== undefined && input . Phase2LifetimeSeconds !== null ) { entries [ "Phase2LifetimeSeconds" ] = input . Phase2LifetimeSeconds ; } if ( input . RekeyMarginTimeSeconds !== undefined && input . RekeyMarginTimeSeconds !== null ) { entries [ "RekeyMarginTimeSeconds" ] = input . RekeyMarginTimeSeconds ; } if ( input . RekeyFuzzPercentage !== undefined && input . RekeyFuzzPercentage !== null ) { entries [ "RekeyFuzzPercentage" ] = input . RekeyFuzzPercentage ; } if ( input . ReplayWindowSize !== undefined && input . ReplayWindowSize !== null ) { entries [ "ReplayWindowSize" ] = input . ReplayWindowSize ; } if ( input . DPDTimeoutSeconds !== undefined && input . DPDTimeoutSeconds !== null ) { entries [ "DPDTimeoutSeconds" ] = input . DPDTimeoutSeconds ; } if ( input . DPDTimeoutAction !== undefined && input . DPDTimeoutAction !== null ) { entries [ "DPDTimeoutAction" ] = input . DPDTimeoutAction ; } if ( input . Phase1EncryptionAlgorithms !== undefined && input . Phase1EncryptionAlgorithms !== null ) { const memberEntries = serializeAws_ec2Phase1EncryptionAlgorithmsRequestList ( input . Phase1EncryptionAlgorithms , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Phase1EncryptionAlgorithm.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Phase2EncryptionAlgorithms !== undefined && input . Phase2EncryptionAlgorithms !== null ) { const memberEntries = serializeAws_ec2Phase2EncryptionAlgorithmsRequestList ( input . Phase2EncryptionAlgorithms , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Phase2EncryptionAlgorithm.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Phase1IntegrityAlgorithms !== undefined && input . Phase1IntegrityAlgorithms !== null ) { const memberEntries = serializeAws_ec2Phase1IntegrityAlgorithmsRequestList ( input . Phase1IntegrityAlgorithms , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Phase1IntegrityAlgorithm.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Phase2IntegrityAlgorithms !== undefined && input . Phase2IntegrityAlgorithms !== null ) { const memberEntries = serializeAws_ec2Phase2IntegrityAlgorithmsRequestList ( input . Phase2IntegrityAlgorithms , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Phase2IntegrityAlgorithm.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Phase1DHGroupNumbers !== undefined && input . Phase1DHGroupNumbers !== null ) { const memberEntries = serializeAws_ec2Phase1DHGroupNumbersRequestList ( input . Phase1DHGroupNumbers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Phase1DHGroupNumber.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . Phase2DHGroupNumbers !== undefined && input . Phase2DHGroupNumbers !== null ) { const memberEntries = serializeAws_ec2Phase2DHGroupNumbersRequestList ( input . Phase2DHGroupNumbers , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `Phase2DHGroupNumber.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . IKEVersions !== undefined && input . IKEVersions !== null ) { const memberEntries = serializeAws_ec2IKEVersionsRequestList ( input . IKEVersions , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { const loc = `IKEVersion.${ key . substring ( key . indexOf ( "." ) + 1 ) }` ; entries [ loc ] = value ; } ) ; } if ( input . StartupAction !== undefined && input . StartupAction !== null ) { entries [ "StartupAction" ] = input . StartupAction ; } return entries ; } ; const serializeAws_ec2VpnTunnelOptionsSpecificationsList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } const memberEntries = serializeAws_ec2VpnTunnelOptionsSpecification ( entry , context ) ; Object . entries ( memberEntries ) . forEach ( ( [ key , value ] ) => { entries [ `Member.${ counter }.${ key }` ] = value ; } ) ; counter ++ ; } return entries ; } ; const serializeAws_ec2WithdrawByoipCidrRequest = ( input , context ) : any => { const entries = { } ; if ( input . Cidr !== undefined && input . Cidr !== null ) { entries [ "Cidr" ] = input . Cidr ; } if ( input . DryRun !== undefined && input . DryRun !== null ) { entries [ "DryRun" ] = input . DryRun ; } return entries ; } ; const serializeAws_ec2ZoneIdStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `ZoneId.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const serializeAws_ec2ZoneNameStringList = ( input , context ) : any => { const entries = { } ; let counter = 1 ; for ( const entry of input ) { if ( entry === null ) { continue ; } entries [ `ZoneName.${ counter }` ] = entry ; counter ++ ; } return entries ; } ; const deserializeAws_ec2AcceleratorCount = ( output , context ) : AcceleratorCount => { const contents = { Min : undefined , Max : undefined , } ; if ( output [ "min" ] !== undefined ) { contents . Min = __strictParseInt32 ( output [ "min" ] ) as number ; } if ( output [ "max" ] !== undefined ) { contents . Max = __strictParseInt32 ( output [ "max" ] ) as number ; } return contents ; } ; const deserializeAws_ec2AcceleratorManufacturerSet = ( output , context ) : ( AcceleratorManufacturer | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_ec2AcceleratorNameSet = ( output , context ) : ( AcceleratorName | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_ec2AcceleratorTotalMemoryMiB = ( output , context ) : AcceleratorTotalMemoryMiB => { const contents = { Min : undefined , Max : undefined , } ; if ( output [ "min" ] !== undefined ) { contents . Min = __strictParseInt32 ( output [ "min" ] ) as number ; } if ( output [ "max" ] !== undefined ) { contents . Max = __strictParseInt32 ( output [ "max" ] ) as number ; } return contents ; } ; const deserializeAws_ec2AcceleratorTypeSet = ( output , context ) : ( AcceleratorType | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_ec2AcceptReservedInstancesExchangeQuoteResult = ( output , context ) : AcceptReservedInstancesExchangeQuoteResult => { const contents = { ExchangeId : undefined , } ; if ( output [ "exchangeId" ] !== undefined ) { contents . ExchangeId = __expectString ( output [ "exchangeId" ] ) ; } return contents ; } ; const deserializeAws_ec2AcceptTransitGatewayMulticastDomainAssociationsResult = ( output , context ) : AcceptTransitGatewayMulticastDomainAssociationsResult => { const contents = { Associations : undefined , } ; if ( output [ "associations" ] !== undefined ) { contents . Associations = deserializeAws_ec2TransitGatewayMulticastDomainAssociations ( output [ "associations" ] , context ) ; } return contents ; } ; const deserializeAws_ec2AcceptTransitGatewayPeeringAttachmentResult = ( output , context ) : AcceptTransitGatewayPeeringAttachmentResult => { const contents = { TransitGatewayPeeringAttachment : undefined , } ; if ( output [ "transitGatewayPeeringAttachment" ] !== undefined ) { contents . TransitGatewayPeeringAttachment = deserializeAws_ec2TransitGatewayPeeringAttachment ( output [ "transitGatewayPeeringAttachment" ] , context ) ; } return contents ; } ; const deserializeAws_ec2AcceptTransitGatewayVpcAttachmentResult = ( output , context ) : AcceptTransitGatewayVpcAttachmentResult => { const contents = { TransitGatewayVpcAttachment : undefined , } ; if ( output [ "transitGatewayVpcAttachment" ] !== undefined ) { contents . TransitGatewayVpcAttachment = deserializeAws_ec2TransitGatewayVpcAttachment ( output [ "transitGatewayVpcAttachment" ] , context ) ; } return contents ; } ; const deserializeAws_ec2AcceptVpcEndpointConnectionsResult = ( output , context ) : AcceptVpcEndpointConnectionsResult => { const contents = { Unsuccessful : undefined , } ; if ( output . unsuccessful === "" ) { contents . Unsuccessful = [ ] ; } if ( output [ "unsuccessful" ] !== undefined && output [ "unsuccessful" ] [ "item" ] !== undefined ) { contents . Unsuccessful = deserializeAws_ec2UnsuccessfulItemSet ( __getArrayIfSingleItem ( output [ "unsuccessful" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2AcceptVpcPeeringConnectionResult = ( output , context ) : AcceptVpcPeeringConnectionResult => { const contents = { VpcPeeringConnection : undefined , } ; if ( output [ "vpcPeeringConnection" ] !== undefined ) { contents . VpcPeeringConnection = deserializeAws_ec2VpcPeeringConnection ( output [ "vpcPeeringConnection" ] , context ) ; } return contents ; } ; const deserializeAws_ec2AccessScopeAnalysisFinding = ( output , context ) : AccessScopeAnalysisFinding => { const contents = { NetworkInsightsAccessScopeAnalysisId : undefined , NetworkInsightsAccessScopeId : undefined , FindingId : undefined , FindingComponents : undefined , } ; if ( output [ "networkInsightsAccessScopeAnalysisId" ] !== undefined ) { contents . NetworkInsightsAccessScopeAnalysisId = __expectString ( output [ "networkInsightsAccessScopeAnalysisId" ] ) ; } if ( output [ "networkInsightsAccessScopeId" ] !== undefined ) { contents . NetworkInsightsAccessScopeId = __expectString ( output [ "networkInsightsAccessScopeId" ] ) ; } if ( output [ "findingId" ] !== undefined ) { contents . FindingId = __expectString ( output [ "findingId" ] ) ; } if ( output . findingComponentSet === "" ) { contents . FindingComponents = [ ] ; } if ( output [ "findingComponentSet" ] !== undefined && output [ "findingComponentSet" ] [ "item" ] !== undefined ) { contents . FindingComponents = deserializeAws_ec2PathComponentList ( __getArrayIfSingleItem ( output [ "findingComponentSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2AccessScopeAnalysisFindingList = ( output , context ) : AccessScopeAnalysisFinding [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2AccessScopeAnalysisFinding ( entry , context ) ; } ) ; } ; const deserializeAws_ec2AccessScopePath = ( output , context ) : AccessScopePath => { const contents = { Source : undefined , Destination : undefined , ThroughResources : undefined , } ; if ( output [ "source" ] !== undefined ) { contents . Source = deserializeAws_ec2PathStatement ( output [ "source" ] , context ) ; } if ( output [ "destination" ] !== undefined ) { contents . Destination = deserializeAws_ec2PathStatement ( output [ "destination" ] , context ) ; } if ( output . throughResourceSet === "" ) { contents . ThroughResources = [ ] ; } if ( output [ "throughResourceSet" ] !== undefined && output [ "throughResourceSet" ] [ "item" ] !== undefined ) { contents . ThroughResources = deserializeAws_ec2ThroughResourcesStatementList ( __getArrayIfSingleItem ( output [ "throughResourceSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2AccessScopePathList = ( output , context ) : AccessScopePath [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2AccessScopePath ( entry , context ) ; } ) ; } ; const deserializeAws_ec2AccountAttribute = ( output , context ) : AccountAttribute => { const contents = { AttributeName : undefined , AttributeValues : undefined , } ; if ( output [ "attributeName" ] !== undefined ) { contents . AttributeName = __expectString ( output [ "attributeName" ] ) ; } if ( output . attributeValueSet === "" ) { contents . AttributeValues = [ ] ; } if ( output [ "attributeValueSet" ] !== undefined && output [ "attributeValueSet" ] [ "item" ] !== undefined ) { contents . AttributeValues = deserializeAws_ec2AccountAttributeValueList ( __getArrayIfSingleItem ( output [ "attributeValueSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2AccountAttributeList = ( output , context ) : AccountAttribute [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2AccountAttribute ( entry , context ) ; } ) ; } ; const deserializeAws_ec2AccountAttributeValue = ( output , context ) : AccountAttributeValue => { const contents = { AttributeValue : undefined , } ; if ( output [ "attributeValue" ] !== undefined ) { contents . AttributeValue = __expectString ( output [ "attributeValue" ] ) ; } return contents ; } ; const deserializeAws_ec2AccountAttributeValueList = ( output , context ) : AccountAttributeValue [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2AccountAttributeValue ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ActiveInstance = ( output , context ) : ActiveInstance => { const contents = { InstanceId : undefined , InstanceType : undefined , SpotInstanceRequestId : undefined , InstanceHealth : undefined , } ; if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "spotInstanceRequestId" ] !== undefined ) { contents . SpotInstanceRequestId = __expectString ( output [ "spotInstanceRequestId" ] ) ; } if ( output [ "instanceHealth" ] !== undefined ) { contents . InstanceHealth = __expectString ( output [ "instanceHealth" ] ) ; } return contents ; } ; const deserializeAws_ec2ActiveInstanceSet = ( output , context ) : ActiveInstance [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ActiveInstance ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Address = ( output , context ) : Address => { const contents = { InstanceId : undefined , PublicIp : undefined , AllocationId : undefined , AssociationId : undefined , Domain : undefined , NetworkInterfaceId : undefined , NetworkInterfaceOwnerId : undefined , PrivateIpAddress : undefined , Tags : undefined , PublicIpv4Pool : undefined , NetworkBorderGroup : undefined , CustomerOwnedIp : undefined , CustomerOwnedIpv4Pool : undefined , CarrierIp : undefined , } ; if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "publicIp" ] !== undefined ) { contents . PublicIp = __expectString ( output [ "publicIp" ] ) ; } if ( output [ "allocationId" ] !== undefined ) { contents . AllocationId = __expectString ( output [ "allocationId" ] ) ; } if ( output [ "associationId" ] !== undefined ) { contents . AssociationId = __expectString ( output [ "associationId" ] ) ; } if ( output [ "domain" ] !== undefined ) { contents . Domain = __expectString ( output [ "domain" ] ) ; } if ( output [ "networkInterfaceId" ] !== undefined ) { contents . NetworkInterfaceId = __expectString ( output [ "networkInterfaceId" ] ) ; } if ( output [ "networkInterfaceOwnerId" ] !== undefined ) { contents . NetworkInterfaceOwnerId = __expectString ( output [ "networkInterfaceOwnerId" ] ) ; } if ( output [ "privateIpAddress" ] !== undefined ) { contents . PrivateIpAddress = __expectString ( output [ "privateIpAddress" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "publicIpv4Pool" ] !== undefined ) { contents . PublicIpv4Pool = __expectString ( output [ "publicIpv4Pool" ] ) ; } if ( output [ "networkBorderGroup" ] !== undefined ) { contents . NetworkBorderGroup = __expectString ( output [ "networkBorderGroup" ] ) ; } if ( output [ "customerOwnedIp" ] !== undefined ) { contents . CustomerOwnedIp = __expectString ( output [ "customerOwnedIp" ] ) ; } if ( output [ "customerOwnedIpv4Pool" ] !== undefined ) { contents . CustomerOwnedIpv4Pool = __expectString ( output [ "customerOwnedIpv4Pool" ] ) ; } if ( output [ "carrierIp" ] !== undefined ) { contents . CarrierIp = __expectString ( output [ "carrierIp" ] ) ; } return contents ; } ; const deserializeAws_ec2AddressAttribute = ( output , context ) : AddressAttribute => { const contents = { PublicIp : undefined , AllocationId : undefined , PtrRecord : undefined , PtrRecordUpdate : undefined , } ; if ( output [ "publicIp" ] !== undefined ) { contents . PublicIp = __expectString ( output [ "publicIp" ] ) ; } if ( output [ "allocationId" ] !== undefined ) { contents . AllocationId = __expectString ( output [ "allocationId" ] ) ; } if ( output [ "ptrRecord" ] !== undefined ) { contents . PtrRecord = __expectString ( output [ "ptrRecord" ] ) ; } if ( output [ "ptrRecordUpdate" ] !== undefined ) { contents . PtrRecordUpdate = deserializeAws_ec2PtrUpdateStatus ( output [ "ptrRecordUpdate" ] , context ) ; } return contents ; } ; const deserializeAws_ec2AddressList = ( output , context ) : Address [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Address ( entry , context ) ; } ) ; } ; const deserializeAws_ec2AddressSet = ( output , context ) : AddressAttribute [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2AddressAttribute ( entry , context ) ; } ) ; } ; const deserializeAws_ec2AdvertiseByoipCidrResult = ( output , context ) : AdvertiseByoipCidrResult => { const contents = { ByoipCidr : undefined , } ; if ( output [ "byoipCidr" ] !== undefined ) { contents . ByoipCidr = deserializeAws_ec2ByoipCidr ( output [ "byoipCidr" ] , context ) ; } return contents ; } ; const deserializeAws_ec2AllocateAddressResult = ( output , context ) : AllocateAddressResult => { const contents = { PublicIp : undefined , AllocationId : undefined , PublicIpv4Pool : undefined , NetworkBorderGroup : undefined , Domain : undefined , CustomerOwnedIp : undefined , CustomerOwnedIpv4Pool : undefined , CarrierIp : undefined , } ; if ( output [ "publicIp" ] !== undefined ) { contents . PublicIp = __expectString ( output [ "publicIp" ] ) ; } if ( output [ "allocationId" ] !== undefined ) { contents . AllocationId = __expectString ( output [ "allocationId" ] ) ; } if ( output [ "publicIpv4Pool" ] !== undefined ) { contents . PublicIpv4Pool = __expectString ( output [ "publicIpv4Pool" ] ) ; } if ( output [ "networkBorderGroup" ] !== undefined ) { contents . NetworkBorderGroup = __expectString ( output [ "networkBorderGroup" ] ) ; } if ( output [ "domain" ] !== undefined ) { contents . Domain = __expectString ( output [ "domain" ] ) ; } if ( output [ "customerOwnedIp" ] !== undefined ) { contents . CustomerOwnedIp = __expectString ( output [ "customerOwnedIp" ] ) ; } if ( output [ "customerOwnedIpv4Pool" ] !== undefined ) { contents . CustomerOwnedIpv4Pool = __expectString ( output [ "customerOwnedIpv4Pool" ] ) ; } if ( output [ "carrierIp" ] !== undefined ) { contents . CarrierIp = __expectString ( output [ "carrierIp" ] ) ; } return contents ; } ; const deserializeAws_ec2AllocateHostsResult = ( output , context ) : AllocateHostsResult => { const contents = { HostIds : undefined , } ; if ( output . hostIdSet === "" ) { contents . HostIds = [ ] ; } if ( output [ "hostIdSet" ] !== undefined && output [ "hostIdSet" ] [ "item" ] !== undefined ) { contents . HostIds = deserializeAws_ec2ResponseHostIdList ( __getArrayIfSingleItem ( output [ "hostIdSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2AllocateIpamPoolCidrResult = ( output , context ) : AllocateIpamPoolCidrResult => { const contents = { IpamPoolAllocation : undefined , } ; if ( output [ "ipamPoolAllocation" ] !== undefined ) { contents . IpamPoolAllocation = deserializeAws_ec2IpamPoolAllocation ( output [ "ipamPoolAllocation" ] , context ) ; } return contents ; } ; const deserializeAws_ec2AllowedPrincipal = ( output , context ) : AllowedPrincipal => { const contents = { PrincipalType : undefined , Principal : undefined , } ; if ( output [ "principalType" ] !== undefined ) { contents . PrincipalType = __expectString ( output [ "principalType" ] ) ; } if ( output [ "principal" ] !== undefined ) { contents . Principal = __expectString ( output [ "principal" ] ) ; } return contents ; } ; const deserializeAws_ec2AllowedPrincipalSet = ( output , context ) : AllowedPrincipal [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2AllowedPrincipal ( entry , context ) ; } ) ; } ; const deserializeAws_ec2AlternatePathHint = ( output , context ) : AlternatePathHint => { const contents = { ComponentId : undefined , ComponentArn : undefined , } ; if ( output [ "componentId" ] !== undefined ) { contents . ComponentId = __expectString ( output [ "componentId" ] ) ; } if ( output [ "componentArn" ] !== undefined ) { contents . ComponentArn = __expectString ( output [ "componentArn" ] ) ; } return contents ; } ; const deserializeAws_ec2AlternatePathHintList = ( output , context ) : AlternatePathHint [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2AlternatePathHint ( entry , context ) ; } ) ; } ; const deserializeAws_ec2AnalysisAclRule = ( output , context ) : AnalysisAclRule => { const contents = { Cidr : undefined , Egress : undefined , PortRange : undefined , Protocol : undefined , RuleAction : undefined , RuleNumber : undefined , } ; if ( output [ "cidr" ] !== undefined ) { contents . Cidr = __expectString ( output [ "cidr" ] ) ; } if ( output [ "egress" ] !== undefined ) { contents . Egress = __parseBoolean ( output [ "egress" ] ) ; } if ( output [ "portRange" ] !== undefined ) { contents . PortRange = deserializeAws_ec2PortRange ( output [ "portRange" ] , context ) ; } if ( output [ "protocol" ] !== undefined ) { contents . Protocol = __expectString ( output [ "protocol" ] ) ; } if ( output [ "ruleAction" ] !== undefined ) { contents . RuleAction = __expectString ( output [ "ruleAction" ] ) ; } if ( output [ "ruleNumber" ] !== undefined ) { contents . RuleNumber = __strictParseInt32 ( output [ "ruleNumber" ] ) as number ; } return contents ; } ; const deserializeAws_ec2AnalysisComponent = ( output , context ) : AnalysisComponent => { const contents = { Id : undefined , Arn : undefined , Name : undefined , } ; if ( output [ "id" ] !== undefined ) { contents . Id = __expectString ( output [ "id" ] ) ; } if ( output [ "arn" ] !== undefined ) { contents . Arn = __expectString ( output [ "arn" ] ) ; } if ( output [ "name" ] !== undefined ) { contents . Name = __expectString ( output [ "name" ] ) ; } return contents ; } ; const deserializeAws_ec2AnalysisComponentList = ( output , context ) : AnalysisComponent [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2AnalysisComponent ( entry , context ) ; } ) ; } ; const deserializeAws_ec2AnalysisLoadBalancerListener = ( output , context ) : AnalysisLoadBalancerListener => { const contents = { LoadBalancerPort : undefined , InstancePort : undefined , } ; if ( output [ "loadBalancerPort" ] !== undefined ) { contents . LoadBalancerPort = __strictParseInt32 ( output [ "loadBalancerPort" ] ) as number ; } if ( output [ "instancePort" ] !== undefined ) { contents . InstancePort = __strictParseInt32 ( output [ "instancePort" ] ) as number ; } return contents ; } ; const deserializeAws_ec2AnalysisLoadBalancerTarget = ( output , context ) : AnalysisLoadBalancerTarget => { const contents = { Address : undefined , AvailabilityZone : undefined , Instance : undefined , Port : undefined , } ; if ( output [ "address" ] !== undefined ) { contents . Address = __expectString ( output [ "address" ] ) ; } if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "instance" ] !== undefined ) { contents . Instance = deserializeAws_ec2AnalysisComponent ( output [ "instance" ] , context ) ; } if ( output [ "port" ] !== undefined ) { contents . Port = __strictParseInt32 ( output [ "port" ] ) as number ; } return contents ; } ; const deserializeAws_ec2AnalysisPacketHeader = ( output , context ) : AnalysisPacketHeader => { const contents = { DestinationAddresses : undefined , DestinationPortRanges : undefined , Protocol : undefined , SourceAddresses : undefined , SourcePortRanges : undefined , } ; if ( output . destinationAddressSet === "" ) { contents . DestinationAddresses = [ ] ; } if ( output [ "destinationAddressSet" ] !== undefined && output [ "destinationAddressSet" ] [ "item" ] !== undefined ) { contents . DestinationAddresses = deserializeAws_ec2IpAddressList ( __getArrayIfSingleItem ( output [ "destinationAddressSet" ] [ "item" ] ) , context ) ; } if ( output . destinationPortRangeSet === "" ) { contents . DestinationPortRanges = [ ] ; } if ( output [ "destinationPortRangeSet" ] !== undefined && output [ "destinationPortRangeSet" ] [ "item" ] !== undefined ) { contents . DestinationPortRanges = deserializeAws_ec2PortRangeList ( __getArrayIfSingleItem ( output [ "destinationPortRangeSet" ] [ "item" ] ) , context ) ; } if ( output [ "protocol" ] !== undefined ) { contents . Protocol = __expectString ( output [ "protocol" ] ) ; } if ( output . sourceAddressSet === "" ) { contents . SourceAddresses = [ ] ; } if ( output [ "sourceAddressSet" ] !== undefined && output [ "sourceAddressSet" ] [ "item" ] !== undefined ) { contents . SourceAddresses = deserializeAws_ec2IpAddressList ( __getArrayIfSingleItem ( output [ "sourceAddressSet" ] [ "item" ] ) , context ) ; } if ( output . sourcePortRangeSet === "" ) { contents . SourcePortRanges = [ ] ; } if ( output [ "sourcePortRangeSet" ] !== undefined && output [ "sourcePortRangeSet" ] [ "item" ] !== undefined ) { contents . SourcePortRanges = deserializeAws_ec2PortRangeList ( __getArrayIfSingleItem ( output [ "sourcePortRangeSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2AnalysisRouteTableRoute = ( output , context ) : AnalysisRouteTableRoute => { const contents = { DestinationCidr : undefined , DestinationPrefixListId : undefined , EgressOnlyInternetGatewayId : undefined , GatewayId : undefined , InstanceId : undefined , NatGatewayId : undefined , NetworkInterfaceId : undefined , Origin : undefined , TransitGatewayId : undefined , VpcPeeringConnectionId : undefined , } ; if ( output [ "destinationCidr" ] !== undefined ) { contents . DestinationCidr = __expectString ( output [ "destinationCidr" ] ) ; } if ( output [ "destinationPrefixListId" ] !== undefined ) { contents . DestinationPrefixListId = __expectString ( output [ "destinationPrefixListId" ] ) ; } if ( output [ "egressOnlyInternetGatewayId" ] !== undefined ) { contents . EgressOnlyInternetGatewayId = __expectString ( output [ "egressOnlyInternetGatewayId" ] ) ; } if ( output [ "gatewayId" ] !== undefined ) { contents . GatewayId = __expectString ( output [ "gatewayId" ] ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "natGatewayId" ] !== undefined ) { contents . NatGatewayId = __expectString ( output [ "natGatewayId" ] ) ; } if ( output [ "networkInterfaceId" ] !== undefined ) { contents . NetworkInterfaceId = __expectString ( output [ "networkInterfaceId" ] ) ; } if ( output [ "origin" ] !== undefined ) { contents . Origin = __expectString ( output [ "origin" ] ) ; } if ( output [ "transitGatewayId" ] !== undefined ) { contents . TransitGatewayId = __expectString ( output [ "transitGatewayId" ] ) ; } if ( output [ "vpcPeeringConnectionId" ] !== undefined ) { contents . VpcPeeringConnectionId = __expectString ( output [ "vpcPeeringConnectionId" ] ) ; } return contents ; } ; const deserializeAws_ec2AnalysisSecurityGroupRule = ( output , context ) : AnalysisSecurityGroupRule => { const contents = { Cidr : undefined , Direction : undefined , SecurityGroupId : undefined , PortRange : undefined , PrefixListId : undefined , Protocol : undefined , } ; if ( output [ "cidr" ] !== undefined ) { contents . Cidr = __expectString ( output [ "cidr" ] ) ; } if ( output [ "direction" ] !== undefined ) { contents . Direction = __expectString ( output [ "direction" ] ) ; } if ( output [ "securityGroupId" ] !== undefined ) { contents . SecurityGroupId = __expectString ( output [ "securityGroupId" ] ) ; } if ( output [ "portRange" ] !== undefined ) { contents . PortRange = deserializeAws_ec2PortRange ( output [ "portRange" ] , context ) ; } if ( output [ "prefixListId" ] !== undefined ) { contents . PrefixListId = __expectString ( output [ "prefixListId" ] ) ; } if ( output [ "protocol" ] !== undefined ) { contents . Protocol = __expectString ( output [ "protocol" ] ) ; } return contents ; } ; const deserializeAws_ec2ApplySecurityGroupsToClientVpnTargetNetworkResult = ( output , context ) : ApplySecurityGroupsToClientVpnTargetNetworkResult => { const contents = { SecurityGroupIds : undefined , } ; if ( output . securityGroupIds === "" ) { contents . SecurityGroupIds = [ ] ; } if ( output [ "securityGroupIds" ] !== undefined && output [ "securityGroupIds" ] [ "item" ] !== undefined ) { contents . SecurityGroupIds = deserializeAws_ec2ClientVpnSecurityGroupIdSet ( __getArrayIfSingleItem ( output [ "securityGroupIds" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ArchitectureTypeList = ( output , context ) : ( ArchitectureType | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_ec2ArnList = ( 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_ec2AssignedPrivateIpAddress = ( output , context ) : AssignedPrivateIpAddress => { const contents = { PrivateIpAddress : undefined , } ; if ( output [ "privateIpAddress" ] !== undefined ) { contents . PrivateIpAddress = __expectString ( output [ "privateIpAddress" ] ) ; } return contents ; } ; const deserializeAws_ec2AssignedPrivateIpAddressList = ( output , context ) : AssignedPrivateIpAddress [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2AssignedPrivateIpAddress ( entry , context ) ; } ) ; } ; const deserializeAws_ec2AssignIpv6AddressesResult = ( output , context ) : AssignIpv6AddressesResult => { const contents = { AssignedIpv6Addresses : undefined , AssignedIpv6Prefixes : undefined , NetworkInterfaceId : undefined , } ; if ( output . assignedIpv6Addresses === "" ) { contents . AssignedIpv6Addresses = [ ] ; } if ( output [ "assignedIpv6Addresses" ] !== undefined && output [ "assignedIpv6Addresses" ] [ "item" ] !== undefined ) { contents . AssignedIpv6Addresses = deserializeAws_ec2Ipv6AddressList ( __getArrayIfSingleItem ( output [ "assignedIpv6Addresses" ] [ "item" ] ) , context ) ; } if ( output . assignedIpv6PrefixSet === "" ) { contents . AssignedIpv6Prefixes = [ ] ; } if ( output [ "assignedIpv6PrefixSet" ] !== undefined && output [ "assignedIpv6PrefixSet" ] [ "item" ] !== undefined ) { contents . AssignedIpv6Prefixes = deserializeAws_ec2IpPrefixList ( __getArrayIfSingleItem ( output [ "assignedIpv6PrefixSet" ] [ "item" ] ) , context ) ; } if ( output [ "networkInterfaceId" ] !== undefined ) { contents . NetworkInterfaceId = __expectString ( output [ "networkInterfaceId" ] ) ; } return contents ; } ; const deserializeAws_ec2AssignPrivateIpAddressesResult = ( output , context ) : AssignPrivateIpAddressesResult => { const contents = { NetworkInterfaceId : undefined , AssignedPrivateIpAddresses : undefined , AssignedIpv4Prefixes : undefined , } ; if ( output [ "networkInterfaceId" ] !== undefined ) { contents . NetworkInterfaceId = __expectString ( output [ "networkInterfaceId" ] ) ; } if ( output . assignedPrivateIpAddressesSet === "" ) { contents . AssignedPrivateIpAddresses = [ ] ; } if ( output [ "assignedPrivateIpAddressesSet" ] !== undefined && output [ "assignedPrivateIpAddressesSet" ] [ "item" ] !== undefined ) { contents . AssignedPrivateIpAddresses = deserializeAws_ec2AssignedPrivateIpAddressList ( __getArrayIfSingleItem ( output [ "assignedPrivateIpAddressesSet" ] [ "item" ] ) , context ) ; } if ( output . assignedIpv4PrefixSet === "" ) { contents . AssignedIpv4Prefixes = [ ] ; } if ( output [ "assignedIpv4PrefixSet" ] !== undefined && output [ "assignedIpv4PrefixSet" ] [ "item" ] !== undefined ) { contents . AssignedIpv4Prefixes = deserializeAws_ec2Ipv4PrefixesList ( __getArrayIfSingleItem ( output [ "assignedIpv4PrefixSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2AssociateAddressResult = ( output , context ) : AssociateAddressResult => { const contents = { AssociationId : undefined , } ; if ( output [ "associationId" ] !== undefined ) { contents . AssociationId = __expectString ( output [ "associationId" ] ) ; } return contents ; } ; const deserializeAws_ec2AssociateClientVpnTargetNetworkResult = ( output , context ) : AssociateClientVpnTargetNetworkResult => { const contents = { AssociationId : undefined , Status : undefined , } ; if ( output [ "associationId" ] !== undefined ) { contents . AssociationId = __expectString ( output [ "associationId" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2AssociationStatus ( output [ "status" ] , context ) ; } return contents ; } ; const deserializeAws_ec2AssociatedRole = ( output , context ) : AssociatedRole => { const contents = { AssociatedRoleArn : undefined , CertificateS3BucketName : undefined , CertificateS3ObjectKey : undefined , EncryptionKmsKeyId : undefined , } ; if ( output [ "associatedRoleArn" ] !== undefined ) { contents . AssociatedRoleArn = __expectString ( output [ "associatedRoleArn" ] ) ; } if ( output [ "certificateS3BucketName" ] !== undefined ) { contents . CertificateS3BucketName = __expectString ( output [ "certificateS3BucketName" ] ) ; } if ( output [ "certificateS3ObjectKey" ] !== undefined ) { contents . CertificateS3ObjectKey = __expectString ( output [ "certificateS3ObjectKey" ] ) ; } if ( output [ "encryptionKmsKeyId" ] !== undefined ) { contents . EncryptionKmsKeyId = __expectString ( output [ "encryptionKmsKeyId" ] ) ; } return contents ; } ; const deserializeAws_ec2AssociatedRolesList = ( output , context ) : AssociatedRole [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2AssociatedRole ( entry , context ) ; } ) ; } ; const deserializeAws_ec2AssociatedTargetNetwork = ( output , context ) : AssociatedTargetNetwork => { const contents = { NetworkId : undefined , NetworkType : undefined , } ; if ( output [ "networkId" ] !== undefined ) { contents . NetworkId = __expectString ( output [ "networkId" ] ) ; } if ( output [ "networkType" ] !== undefined ) { contents . NetworkType = __expectString ( output [ "networkType" ] ) ; } return contents ; } ; const deserializeAws_ec2AssociatedTargetNetworkSet = ( output , context ) : AssociatedTargetNetwork [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2AssociatedTargetNetwork ( entry , context ) ; } ) ; } ; const deserializeAws_ec2AssociateEnclaveCertificateIamRoleResult = ( output , context ) : AssociateEnclaveCertificateIamRoleResult => { const contents = { CertificateS3BucketName : undefined , CertificateS3ObjectKey : undefined , EncryptionKmsKeyId : undefined , } ; if ( output [ "certificateS3BucketName" ] !== undefined ) { contents . CertificateS3BucketName = __expectString ( output [ "certificateS3BucketName" ] ) ; } if ( output [ "certificateS3ObjectKey" ] !== undefined ) { contents . CertificateS3ObjectKey = __expectString ( output [ "certificateS3ObjectKey" ] ) ; } if ( output [ "encryptionKmsKeyId" ] !== undefined ) { contents . EncryptionKmsKeyId = __expectString ( output [ "encryptionKmsKeyId" ] ) ; } return contents ; } ; const deserializeAws_ec2AssociateIamInstanceProfileResult = ( output , context ) : AssociateIamInstanceProfileResult => { const contents = { IamInstanceProfileAssociation : undefined , } ; if ( output [ "iamInstanceProfileAssociation" ] !== undefined ) { contents . IamInstanceProfileAssociation = deserializeAws_ec2IamInstanceProfileAssociation ( output [ "iamInstanceProfileAssociation" ] , context ) ; } return contents ; } ; const deserializeAws_ec2AssociateInstanceEventWindowResult = ( output , context ) : AssociateInstanceEventWindowResult => { const contents = { InstanceEventWindow : undefined , } ; if ( output [ "instanceEventWindow" ] !== undefined ) { contents . InstanceEventWindow = deserializeAws_ec2InstanceEventWindow ( output [ "instanceEventWindow" ] , context ) ; } return contents ; } ; const deserializeAws_ec2AssociateRouteTableResult = ( output , context ) : AssociateRouteTableResult => { const contents = { AssociationId : undefined , AssociationState : undefined , } ; if ( output [ "associationId" ] !== undefined ) { contents . AssociationId = __expectString ( output [ "associationId" ] ) ; } if ( output [ "associationState" ] !== undefined ) { contents . AssociationState = deserializeAws_ec2RouteTableAssociationState ( output [ "associationState" ] , context ) ; } return contents ; } ; const deserializeAws_ec2AssociateSubnetCidrBlockResult = ( output , context ) : AssociateSubnetCidrBlockResult => { const contents = { Ipv6CidrBlockAssociation : undefined , SubnetId : undefined , } ; if ( output [ "ipv6CidrBlockAssociation" ] !== undefined ) { contents . Ipv6CidrBlockAssociation = deserializeAws_ec2SubnetIpv6CidrBlockAssociation ( output [ "ipv6CidrBlockAssociation" ] , context ) ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } return contents ; } ; const deserializeAws_ec2AssociateTransitGatewayMulticastDomainResult = ( output , context ) : AssociateTransitGatewayMulticastDomainResult => { const contents = { Associations : undefined , } ; if ( output [ "associations" ] !== undefined ) { contents . Associations = deserializeAws_ec2TransitGatewayMulticastDomainAssociations ( output [ "associations" ] , context ) ; } return contents ; } ; const deserializeAws_ec2AssociateTransitGatewayRouteTableResult = ( output , context ) : AssociateTransitGatewayRouteTableResult => { const contents = { Association : undefined , } ; if ( output [ "association" ] !== undefined ) { contents . Association = deserializeAws_ec2TransitGatewayAssociation ( output [ "association" ] , context ) ; } return contents ; } ; const deserializeAws_ec2AssociateTrunkInterfaceResult = ( output , context ) : AssociateTrunkInterfaceResult => { const contents = { InterfaceAssociation : undefined , ClientToken : undefined , } ; if ( output [ "interfaceAssociation" ] !== undefined ) { contents . InterfaceAssociation = deserializeAws_ec2TrunkInterfaceAssociation ( output [ "interfaceAssociation" ] , context ) ; } if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } return contents ; } ; const deserializeAws_ec2AssociateVpcCidrBlockResult = ( output , context ) : AssociateVpcCidrBlockResult => { const contents = { Ipv6CidrBlockAssociation : undefined , CidrBlockAssociation : undefined , VpcId : undefined , } ; if ( output [ "ipv6CidrBlockAssociation" ] !== undefined ) { contents . Ipv6CidrBlockAssociation = deserializeAws_ec2VpcIpv6CidrBlockAssociation ( output [ "ipv6CidrBlockAssociation" ] , context ) ; } if ( output [ "cidrBlockAssociation" ] !== undefined ) { contents . CidrBlockAssociation = deserializeAws_ec2VpcCidrBlockAssociation ( output [ "cidrBlockAssociation" ] , context ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } return contents ; } ; const deserializeAws_ec2AssociationStatus = ( output , context ) : AssociationStatus => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2AttachClassicLinkVpcResult = ( output , context ) : AttachClassicLinkVpcResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2AttachNetworkInterfaceResult = ( output , context ) : AttachNetworkInterfaceResult => { const contents = { AttachmentId : undefined , NetworkCardIndex : undefined , } ; if ( output [ "attachmentId" ] !== undefined ) { contents . AttachmentId = __expectString ( output [ "attachmentId" ] ) ; } if ( output [ "networkCardIndex" ] !== undefined ) { contents . NetworkCardIndex = __strictParseInt32 ( output [ "networkCardIndex" ] ) as number ; } return contents ; } ; const deserializeAws_ec2AttachVpnGatewayResult = ( output , context ) : AttachVpnGatewayResult => { const contents = { VpcAttachment : undefined , } ; if ( output [ "attachment" ] !== undefined ) { contents . VpcAttachment = deserializeAws_ec2VpcAttachment ( output [ "attachment" ] , context ) ; } return contents ; } ; const deserializeAws_ec2AttributeBooleanValue = ( output , context ) : AttributeBooleanValue => { const contents = { Value : undefined , } ; if ( output [ "value" ] !== undefined ) { contents . Value = __parseBoolean ( output [ "value" ] ) ; } return contents ; } ; const deserializeAws_ec2AttributeValue = ( output , context ) : AttributeValue => { const contents = { Value : undefined , } ; if ( output [ "value" ] !== undefined ) { contents . Value = __expectString ( output [ "value" ] ) ; } return contents ; } ; const deserializeAws_ec2AuthorizationRule = ( output , context ) : AuthorizationRule => { const contents = { ClientVpnEndpointId : undefined , Description : undefined , GroupId : undefined , AccessAll : undefined , DestinationCidr : undefined , Status : undefined , } ; if ( output [ "clientVpnEndpointId" ] !== undefined ) { contents . ClientVpnEndpointId = __expectString ( output [ "clientVpnEndpointId" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "groupId" ] !== undefined ) { contents . GroupId = __expectString ( output [ "groupId" ] ) ; } if ( output [ "accessAll" ] !== undefined ) { contents . AccessAll = __parseBoolean ( output [ "accessAll" ] ) ; } if ( output [ "destinationCidr" ] !== undefined ) { contents . DestinationCidr = __expectString ( output [ "destinationCidr" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2ClientVpnAuthorizationRuleStatus ( output [ "status" ] , context ) ; } return contents ; } ; const deserializeAws_ec2AuthorizationRuleSet = ( output , context ) : AuthorizationRule [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2AuthorizationRule ( entry , context ) ; } ) ; } ; const deserializeAws_ec2AuthorizeClientVpnIngressResult = ( output , context ) : AuthorizeClientVpnIngressResult => { const contents = { Status : undefined , } ; if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2ClientVpnAuthorizationRuleStatus ( output [ "status" ] , context ) ; } return contents ; } ; const deserializeAws_ec2AuthorizeSecurityGroupEgressResult = ( output , context ) : AuthorizeSecurityGroupEgressResult => { const contents = { Return : undefined , SecurityGroupRules : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } if ( output . securityGroupRuleSet === "" ) { contents . SecurityGroupRules = [ ] ; } if ( output [ "securityGroupRuleSet" ] !== undefined && output [ "securityGroupRuleSet" ] [ "item" ] !== undefined ) { contents . SecurityGroupRules = deserializeAws_ec2SecurityGroupRuleList ( __getArrayIfSingleItem ( output [ "securityGroupRuleSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2AuthorizeSecurityGroupIngressResult = ( output , context ) : AuthorizeSecurityGroupIngressResult => { const contents = { Return : undefined , SecurityGroupRules : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } if ( output . securityGroupRuleSet === "" ) { contents . SecurityGroupRules = [ ] ; } if ( output [ "securityGroupRuleSet" ] !== undefined && output [ "securityGroupRuleSet" ] [ "item" ] !== undefined ) { contents . SecurityGroupRules = deserializeAws_ec2SecurityGroupRuleList ( __getArrayIfSingleItem ( output [ "securityGroupRuleSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2AvailabilityZone = ( output , context ) : AvailabilityZone => { const contents = { State : undefined , OptInStatus : undefined , Messages : undefined , RegionName : undefined , ZoneName : undefined , ZoneId : undefined , GroupName : undefined , NetworkBorderGroup : undefined , ZoneType : undefined , ParentZoneName : undefined , ParentZoneId : undefined , } ; if ( output [ "zoneState" ] !== undefined ) { contents . State = __expectString ( output [ "zoneState" ] ) ; } if ( output [ "optInStatus" ] !== undefined ) { contents . OptInStatus = __expectString ( output [ "optInStatus" ] ) ; } if ( output . messageSet === "" ) { contents . Messages = [ ] ; } if ( output [ "messageSet" ] !== undefined && output [ "messageSet" ] [ "item" ] !== undefined ) { contents . Messages = deserializeAws_ec2AvailabilityZoneMessageList ( __getArrayIfSingleItem ( output [ "messageSet" ] [ "item" ] ) , context ) ; } if ( output [ "regionName" ] !== undefined ) { contents . RegionName = __expectString ( output [ "regionName" ] ) ; } if ( output [ "zoneName" ] !== undefined ) { contents . ZoneName = __expectString ( output [ "zoneName" ] ) ; } if ( output [ "zoneId" ] !== undefined ) { contents . ZoneId = __expectString ( output [ "zoneId" ] ) ; } if ( output [ "groupName" ] !== undefined ) { contents . GroupName = __expectString ( output [ "groupName" ] ) ; } if ( output [ "networkBorderGroup" ] !== undefined ) { contents . NetworkBorderGroup = __expectString ( output [ "networkBorderGroup" ] ) ; } if ( output [ "zoneType" ] !== undefined ) { contents . ZoneType = __expectString ( output [ "zoneType" ] ) ; } if ( output [ "parentZoneName" ] !== undefined ) { contents . ParentZoneName = __expectString ( output [ "parentZoneName" ] ) ; } if ( output [ "parentZoneId" ] !== undefined ) { contents . ParentZoneId = __expectString ( output [ "parentZoneId" ] ) ; } return contents ; } ; const deserializeAws_ec2AvailabilityZoneList = ( output , context ) : AvailabilityZone [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2AvailabilityZone ( entry , context ) ; } ) ; } ; const deserializeAws_ec2AvailabilityZoneMessage = ( output , context ) : AvailabilityZoneMessage => { const contents = { Message : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2AvailabilityZoneMessageList = ( output , context ) : AvailabilityZoneMessage [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2AvailabilityZoneMessage ( entry , context ) ; } ) ; } ; const deserializeAws_ec2AvailableCapacity = ( output , context ) : AvailableCapacity => { const contents = { AvailableInstanceCapacity : undefined , AvailableVCpus : undefined , } ; if ( output . availableInstanceCapacity === "" ) { contents . AvailableInstanceCapacity = [ ] ; } if ( output [ "availableInstanceCapacity" ] !== undefined && output [ "availableInstanceCapacity" ] [ "item" ] !== undefined ) { contents . AvailableInstanceCapacity = deserializeAws_ec2AvailableInstanceCapacityList ( __getArrayIfSingleItem ( output [ "availableInstanceCapacity" ] [ "item" ] ) , context ) ; } if ( output [ "availableVCpus" ] !== undefined ) { contents . AvailableVCpus = __strictParseInt32 ( output [ "availableVCpus" ] ) as number ; } return contents ; } ; const deserializeAws_ec2AvailableInstanceCapacityList = ( output , context ) : InstanceCapacity [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceCapacity ( entry , context ) ; } ) ; } ; const deserializeAws_ec2BaselineEbsBandwidthMbps = ( output , context ) : BaselineEbsBandwidthMbps => { const contents = { Min : undefined , Max : undefined , } ; if ( output [ "min" ] !== undefined ) { contents . Min = __strictParseInt32 ( output [ "min" ] ) as number ; } if ( output [ "max" ] !== undefined ) { contents . Max = __strictParseInt32 ( output [ "max" ] ) as number ; } return contents ; } ; const deserializeAws_ec2BlockDeviceMapping = ( output , context ) : BlockDeviceMapping => { const contents = { DeviceName : undefined , VirtualName : undefined , Ebs : undefined , NoDevice : undefined , } ; if ( output [ "deviceName" ] !== undefined ) { contents . DeviceName = __expectString ( output [ "deviceName" ] ) ; } if ( output [ "virtualName" ] !== undefined ) { contents . VirtualName = __expectString ( output [ "virtualName" ] ) ; } if ( output [ "ebs" ] !== undefined ) { contents . Ebs = deserializeAws_ec2EbsBlockDevice ( output [ "ebs" ] , context ) ; } if ( output [ "noDevice" ] !== undefined ) { contents . NoDevice = __expectString ( output [ "noDevice" ] ) ; } return contents ; } ; const deserializeAws_ec2BlockDeviceMappingList = ( output , context ) : BlockDeviceMapping [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2BlockDeviceMapping ( entry , context ) ; } ) ; } ; const deserializeAws_ec2BootModeTypeList = ( output , context ) : ( BootModeType | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_ec2BundleInstanceResult = ( output , context ) : BundleInstanceResult => { const contents = { BundleTask : undefined , } ; if ( output [ "bundleInstanceTask" ] !== undefined ) { contents . BundleTask = deserializeAws_ec2BundleTask ( output [ "bundleInstanceTask" ] , context ) ; } return contents ; } ; const deserializeAws_ec2BundleTask = ( output , context ) : BundleTask => { const contents = { BundleId : undefined , BundleTaskError : undefined , InstanceId : undefined , Progress : undefined , StartTime : undefined , State : undefined , Storage : undefined , UpdateTime : undefined , } ; if ( output [ "bundleId" ] !== undefined ) { contents . BundleId = __expectString ( output [ "bundleId" ] ) ; } if ( output [ "error" ] !== undefined ) { contents . BundleTaskError = deserializeAws_ec2BundleTaskError ( output [ "error" ] , context ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "progress" ] !== undefined ) { contents . Progress = __expectString ( output [ "progress" ] ) ; } if ( output [ "startTime" ] !== undefined ) { contents . StartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "startTime" ] ) ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "storage" ] !== undefined ) { contents . Storage = deserializeAws_ec2Storage ( output [ "storage" ] , context ) ; } if ( output [ "updateTime" ] !== undefined ) { contents . UpdateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "updateTime" ] ) ) ; } return contents ; } ; const deserializeAws_ec2BundleTaskError = ( output , context ) : BundleTaskError => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2BundleTaskList = ( output , context ) : BundleTask [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2BundleTask ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ByoipCidr = ( output , context ) : ByoipCidr => { const contents = { Cidr : undefined , Description : undefined , StatusMessage : undefined , State : undefined , } ; if ( output [ "cidr" ] !== undefined ) { contents . Cidr = __expectString ( output [ "cidr" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } return contents ; } ; const deserializeAws_ec2ByoipCidrSet = ( output , context ) : ByoipCidr [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ByoipCidr ( entry , context ) ; } ) ; } ; const deserializeAws_ec2CancelBundleTaskResult = ( output , context ) : CancelBundleTaskResult => { const contents = { BundleTask : undefined , } ; if ( output [ "bundleInstanceTask" ] !== undefined ) { contents . BundleTask = deserializeAws_ec2BundleTask ( output [ "bundleInstanceTask" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CancelCapacityReservationFleetError = ( output , context ) : CancelCapacityReservationFleetError => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2CancelCapacityReservationFleetsResult = ( output , context ) : CancelCapacityReservationFleetsResult => { const contents = { SuccessfulFleetCancellations : undefined , FailedFleetCancellations : undefined , } ; if ( output . successfulFleetCancellationSet === "" ) { contents . SuccessfulFleetCancellations = [ ] ; } if ( output [ "successfulFleetCancellationSet" ] !== undefined && output [ "successfulFleetCancellationSet" ] [ "item" ] !== undefined ) { contents . SuccessfulFleetCancellations = deserializeAws_ec2CapacityReservationFleetCancellationStateSet ( __getArrayIfSingleItem ( output [ "successfulFleetCancellationSet" ] [ "item" ] ) , context ) ; } if ( output . failedFleetCancellationSet === "" ) { contents . FailedFleetCancellations = [ ] ; } if ( output [ "failedFleetCancellationSet" ] !== undefined && output [ "failedFleetCancellationSet" ] [ "item" ] !== undefined ) { contents . FailedFleetCancellations = deserializeAws_ec2FailedCapacityReservationFleetCancellationResultSet ( __getArrayIfSingleItem ( output [ "failedFleetCancellationSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2CancelCapacityReservationResult = ( output , context ) : CancelCapacityReservationResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2CancelImportTaskResult = ( output , context ) : CancelImportTaskResult => { const contents = { ImportTaskId : undefined , PreviousState : undefined , State : undefined , } ; if ( output [ "importTaskId" ] !== undefined ) { contents . ImportTaskId = __expectString ( output [ "importTaskId" ] ) ; } if ( output [ "previousState" ] !== undefined ) { contents . PreviousState = __expectString ( output [ "previousState" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } return contents ; } ; const deserializeAws_ec2CancelledSpotInstanceRequest = ( output , context ) : CancelledSpotInstanceRequest => { const contents = { SpotInstanceRequestId : undefined , State : undefined , } ; if ( output [ "spotInstanceRequestId" ] !== undefined ) { contents . SpotInstanceRequestId = __expectString ( output [ "spotInstanceRequestId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } return contents ; } ; const deserializeAws_ec2CancelledSpotInstanceRequestList = ( output , context ) : CancelledSpotInstanceRequest [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2CancelledSpotInstanceRequest ( entry , context ) ; } ) ; } ; const deserializeAws_ec2CancelReservedInstancesListingResult = ( output , context ) : CancelReservedInstancesListingResult => { const contents = { ReservedInstancesListings : undefined , } ; if ( output . reservedInstancesListingsSet === "" ) { contents . ReservedInstancesListings = [ ] ; } if ( output [ "reservedInstancesListingsSet" ] !== undefined && output [ "reservedInstancesListingsSet" ] [ "item" ] !== undefined ) { contents . ReservedInstancesListings = deserializeAws_ec2ReservedInstancesListingList ( __getArrayIfSingleItem ( output [ "reservedInstancesListingsSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2CancelSpotFleetRequestsError = ( output , context ) : CancelSpotFleetRequestsError => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2CancelSpotFleetRequestsErrorItem = ( output , context ) : CancelSpotFleetRequestsErrorItem => { const contents = { Error : undefined , SpotFleetRequestId : undefined , } ; if ( output [ "error" ] !== undefined ) { contents . Error = deserializeAws_ec2CancelSpotFleetRequestsError ( output [ "error" ] , context ) ; } if ( output [ "spotFleetRequestId" ] !== undefined ) { contents . SpotFleetRequestId = __expectString ( output [ "spotFleetRequestId" ] ) ; } return contents ; } ; const deserializeAws_ec2CancelSpotFleetRequestsErrorSet = ( output , context ) : CancelSpotFleetRequestsErrorItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2CancelSpotFleetRequestsErrorItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2CancelSpotFleetRequestsResponse = ( output , context ) : CancelSpotFleetRequestsResponse => { const contents = { SuccessfulFleetRequests : undefined , UnsuccessfulFleetRequests : undefined , } ; if ( output . successfulFleetRequestSet === "" ) { contents . SuccessfulFleetRequests = [ ] ; } if ( output [ "successfulFleetRequestSet" ] !== undefined && output [ "successfulFleetRequestSet" ] [ "item" ] !== undefined ) { contents . SuccessfulFleetRequests = deserializeAws_ec2CancelSpotFleetRequestsSuccessSet ( __getArrayIfSingleItem ( output [ "successfulFleetRequestSet" ] [ "item" ] ) , context ) ; } if ( output . unsuccessfulFleetRequestSet === "" ) { contents . UnsuccessfulFleetRequests = [ ] ; } if ( output [ "unsuccessfulFleetRequestSet" ] !== undefined && output [ "unsuccessfulFleetRequestSet" ] [ "item" ] !== undefined ) { contents . UnsuccessfulFleetRequests = deserializeAws_ec2CancelSpotFleetRequestsErrorSet ( __getArrayIfSingleItem ( output [ "unsuccessfulFleetRequestSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2CancelSpotFleetRequestsSuccessItem = ( output , context ) : CancelSpotFleetRequestsSuccessItem => { const contents = { CurrentSpotFleetRequestState : undefined , PreviousSpotFleetRequestState : undefined , SpotFleetRequestId : undefined , } ; if ( output [ "currentSpotFleetRequestState" ] !== undefined ) { contents . CurrentSpotFleetRequestState = __expectString ( output [ "currentSpotFleetRequestState" ] ) ; } if ( output [ "previousSpotFleetRequestState" ] !== undefined ) { contents . PreviousSpotFleetRequestState = __expectString ( output [ "previousSpotFleetRequestState" ] ) ; } if ( output [ "spotFleetRequestId" ] !== undefined ) { contents . SpotFleetRequestId = __expectString ( output [ "spotFleetRequestId" ] ) ; } return contents ; } ; const deserializeAws_ec2CancelSpotFleetRequestsSuccessSet = ( output , context ) : CancelSpotFleetRequestsSuccessItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2CancelSpotFleetRequestsSuccessItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2CancelSpotInstanceRequestsResult = ( output , context ) : CancelSpotInstanceRequestsResult => { const contents = { CancelledSpotInstanceRequests : undefined , } ; if ( output . spotInstanceRequestSet === "" ) { contents . CancelledSpotInstanceRequests = [ ] ; } if ( output [ "spotInstanceRequestSet" ] !== undefined && output [ "spotInstanceRequestSet" ] [ "item" ] !== undefined ) { contents . CancelledSpotInstanceRequests = deserializeAws_ec2CancelledSpotInstanceRequestList ( __getArrayIfSingleItem ( output [ "spotInstanceRequestSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2CapacityReservation = ( output , context ) : CapacityReservation => { const contents = { CapacityReservationId : undefined , OwnerId : undefined , CapacityReservationArn : undefined , AvailabilityZoneId : undefined , InstanceType : undefined , InstancePlatform : undefined , AvailabilityZone : undefined , Tenancy : undefined , TotalInstanceCount : undefined , AvailableInstanceCount : undefined , EbsOptimized : undefined , EphemeralStorage : undefined , State : undefined , StartDate : undefined , EndDate : undefined , EndDateType : undefined , InstanceMatchCriteria : undefined , CreateDate : undefined , Tags : undefined , OutpostArn : undefined , CapacityReservationFleetId : undefined , PlacementGroupArn : undefined , } ; if ( output [ "capacityReservationId" ] !== undefined ) { contents . CapacityReservationId = __expectString ( output [ "capacityReservationId" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "capacityReservationArn" ] !== undefined ) { contents . CapacityReservationArn = __expectString ( output [ "capacityReservationArn" ] ) ; } if ( output [ "availabilityZoneId" ] !== undefined ) { contents . AvailabilityZoneId = __expectString ( output [ "availabilityZoneId" ] ) ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "instancePlatform" ] !== undefined ) { contents . InstancePlatform = __expectString ( output [ "instancePlatform" ] ) ; } if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "tenancy" ] !== undefined ) { contents . Tenancy = __expectString ( output [ "tenancy" ] ) ; } if ( output [ "totalInstanceCount" ] !== undefined ) { contents . TotalInstanceCount = __strictParseInt32 ( output [ "totalInstanceCount" ] ) as number ; } if ( output [ "availableInstanceCount" ] !== undefined ) { contents . AvailableInstanceCount = __strictParseInt32 ( output [ "availableInstanceCount" ] ) as number ; } if ( output [ "ebsOptimized" ] !== undefined ) { contents . EbsOptimized = __parseBoolean ( output [ "ebsOptimized" ] ) ; } if ( output [ "ephemeralStorage" ] !== undefined ) { contents . EphemeralStorage = __parseBoolean ( output [ "ephemeralStorage" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "startDate" ] !== undefined ) { contents . StartDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "startDate" ] ) ) ; } if ( output [ "endDate" ] !== undefined ) { contents . EndDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "endDate" ] ) ) ; } if ( output [ "endDateType" ] !== undefined ) { contents . EndDateType = __expectString ( output [ "endDateType" ] ) ; } if ( output [ "instanceMatchCriteria" ] !== undefined ) { contents . InstanceMatchCriteria = __expectString ( output [ "instanceMatchCriteria" ] ) ; } if ( output [ "createDate" ] !== undefined ) { contents . CreateDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "createDate" ] ) ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "outpostArn" ] !== undefined ) { contents . OutpostArn = __expectString ( output [ "outpostArn" ] ) ; } if ( output [ "capacityReservationFleetId" ] !== undefined ) { contents . CapacityReservationFleetId = __expectString ( output [ "capacityReservationFleetId" ] ) ; } if ( output [ "placementGroupArn" ] !== undefined ) { contents . PlacementGroupArn = __expectString ( output [ "placementGroupArn" ] ) ; } return contents ; } ; const deserializeAws_ec2CapacityReservationFleet = ( output , context ) : CapacityReservationFleet => { const contents = { CapacityReservationFleetId : undefined , CapacityReservationFleetArn : undefined , State : undefined , TotalTargetCapacity : undefined , TotalFulfilledCapacity : undefined , Tenancy : undefined , EndDate : undefined , CreateTime : undefined , InstanceMatchCriteria : undefined , AllocationStrategy : undefined , InstanceTypeSpecifications : undefined , Tags : undefined , } ; if ( output [ "capacityReservationFleetId" ] !== undefined ) { contents . CapacityReservationFleetId = __expectString ( output [ "capacityReservationFleetId" ] ) ; } if ( output [ "capacityReservationFleetArn" ] !== undefined ) { contents . CapacityReservationFleetArn = __expectString ( output [ "capacityReservationFleetArn" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "totalTargetCapacity" ] !== undefined ) { contents . TotalTargetCapacity = __strictParseInt32 ( output [ "totalTargetCapacity" ] ) as number ; } if ( output [ "totalFulfilledCapacity" ] !== undefined ) { contents . TotalFulfilledCapacity = __strictParseFloat ( output [ "totalFulfilledCapacity" ] ) as number ; } if ( output [ "tenancy" ] !== undefined ) { contents . Tenancy = __expectString ( output [ "tenancy" ] ) ; } if ( output [ "endDate" ] !== undefined ) { contents . EndDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "endDate" ] ) ) ; } if ( output [ "createTime" ] !== undefined ) { contents . CreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "createTime" ] ) ) ; } if ( output [ "instanceMatchCriteria" ] !== undefined ) { contents . InstanceMatchCriteria = __expectString ( output [ "instanceMatchCriteria" ] ) ; } if ( output [ "allocationStrategy" ] !== undefined ) { contents . AllocationStrategy = __expectString ( output [ "allocationStrategy" ] ) ; } if ( output . instanceTypeSpecificationSet === "" ) { contents . InstanceTypeSpecifications = [ ] ; } if ( output [ "instanceTypeSpecificationSet" ] !== undefined && output [ "instanceTypeSpecificationSet" ] [ "item" ] !== undefined ) { contents . InstanceTypeSpecifications = deserializeAws_ec2FleetCapacityReservationSet ( __getArrayIfSingleItem ( output [ "instanceTypeSpecificationSet" ] [ "item" ] ) , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2CapacityReservationFleetCancellationState = ( output , context ) : CapacityReservationFleetCancellationState => { const contents = { CurrentFleetState : undefined , PreviousFleetState : undefined , CapacityReservationFleetId : undefined , } ; if ( output [ "currentFleetState" ] !== undefined ) { contents . CurrentFleetState = __expectString ( output [ "currentFleetState" ] ) ; } if ( output [ "previousFleetState" ] !== undefined ) { contents . PreviousFleetState = __expectString ( output [ "previousFleetState" ] ) ; } if ( output [ "capacityReservationFleetId" ] !== undefined ) { contents . CapacityReservationFleetId = __expectString ( output [ "capacityReservationFleetId" ] ) ; } return contents ; } ; const deserializeAws_ec2CapacityReservationFleetCancellationStateSet = ( output , context ) : CapacityReservationFleetCancellationState [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2CapacityReservationFleetCancellationState ( entry , context ) ; } ) ; } ; const deserializeAws_ec2CapacityReservationFleetSet = ( output , context ) : CapacityReservationFleet [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2CapacityReservationFleet ( entry , context ) ; } ) ; } ; const deserializeAws_ec2CapacityReservationGroup = ( output , context ) : CapacityReservationGroup => { const contents = { GroupArn : undefined , OwnerId : undefined , } ; if ( output [ "groupArn" ] !== undefined ) { contents . GroupArn = __expectString ( output [ "groupArn" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } return contents ; } ; const deserializeAws_ec2CapacityReservationGroupSet = ( output , context ) : CapacityReservationGroup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2CapacityReservationGroup ( entry , context ) ; } ) ; } ; const deserializeAws_ec2CapacityReservationOptions = ( output , context ) : CapacityReservationOptions => { const contents = { UsageStrategy : undefined , } ; if ( output [ "usageStrategy" ] !== undefined ) { contents . UsageStrategy = __expectString ( output [ "usageStrategy" ] ) ; } return contents ; } ; const deserializeAws_ec2CapacityReservationSet = ( output , context ) : CapacityReservation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2CapacityReservation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2CapacityReservationSpecificationResponse = ( output , context ) : CapacityReservationSpecificationResponse => { const contents = { CapacityReservationPreference : undefined , CapacityReservationTarget : undefined , } ; if ( output [ "capacityReservationPreference" ] !== undefined ) { contents . CapacityReservationPreference = __expectString ( output [ "capacityReservationPreference" ] ) ; } if ( output [ "capacityReservationTarget" ] !== undefined ) { contents . CapacityReservationTarget = deserializeAws_ec2CapacityReservationTargetResponse ( output [ "capacityReservationTarget" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CapacityReservationTargetResponse = ( output , context ) : CapacityReservationTargetResponse => { const contents = { CapacityReservationId : undefined , CapacityReservationResourceGroupArn : undefined , } ; if ( output [ "capacityReservationId" ] !== undefined ) { contents . CapacityReservationId = __expectString ( output [ "capacityReservationId" ] ) ; } if ( output [ "capacityReservationResourceGroupArn" ] !== undefined ) { contents . CapacityReservationResourceGroupArn = __expectString ( output [ "capacityReservationResourceGroupArn" ] ) ; } return contents ; } ; const deserializeAws_ec2CarrierGateway = ( output , context ) : CarrierGateway => { const contents = { CarrierGatewayId : undefined , VpcId : undefined , State : undefined , OwnerId : undefined , Tags : undefined , } ; if ( output [ "carrierGatewayId" ] !== undefined ) { contents . CarrierGatewayId = __expectString ( output [ "carrierGatewayId" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2CarrierGatewaySet = ( output , context ) : CarrierGateway [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2CarrierGateway ( entry , context ) ; } ) ; } ; const deserializeAws_ec2CertificateAuthentication = ( output , context ) : CertificateAuthentication => { const contents = { ClientRootCertificateChain : undefined , } ; if ( output [ "clientRootCertificateChain" ] !== undefined ) { contents . ClientRootCertificateChain = __expectString ( output [ "clientRootCertificateChain" ] ) ; } return contents ; } ; const deserializeAws_ec2CidrBlock = ( output , context ) : CidrBlock => { const contents = { CidrBlock : undefined , } ; if ( output [ "cidrBlock" ] !== undefined ) { contents . CidrBlock = __expectString ( output [ "cidrBlock" ] ) ; } return contents ; } ; const deserializeAws_ec2CidrBlockSet = ( output , context ) : CidrBlock [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2CidrBlock ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ClassicLinkDnsSupport = ( output , context ) : ClassicLinkDnsSupport => { const contents = { ClassicLinkDnsSupported : undefined , VpcId : undefined , } ; if ( output [ "classicLinkDnsSupported" ] !== undefined ) { contents . ClassicLinkDnsSupported = __parseBoolean ( output [ "classicLinkDnsSupported" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } return contents ; } ; const deserializeAws_ec2ClassicLinkDnsSupportList = ( output , context ) : ClassicLinkDnsSupport [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ClassicLinkDnsSupport ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ClassicLinkInstance = ( output , context ) : ClassicLinkInstance => { const contents = { Groups : undefined , InstanceId : undefined , Tags : undefined , VpcId : undefined , } ; if ( output . groupSet === "" ) { contents . Groups = [ ] ; } if ( output [ "groupSet" ] !== undefined && output [ "groupSet" ] [ "item" ] !== undefined ) { contents . Groups = deserializeAws_ec2GroupIdentifierList ( __getArrayIfSingleItem ( output [ "groupSet" ] [ "item" ] ) , context ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } return contents ; } ; const deserializeAws_ec2ClassicLinkInstanceList = ( output , context ) : ClassicLinkInstance [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ClassicLinkInstance ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ClassicLoadBalancer = ( output , context ) : ClassicLoadBalancer => { const contents = { Name : undefined , } ; if ( output [ "name" ] !== undefined ) { contents . Name = __expectString ( output [ "name" ] ) ; } return contents ; } ; const deserializeAws_ec2ClassicLoadBalancers = ( output , context ) : ClassicLoadBalancer [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ClassicLoadBalancer ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ClassicLoadBalancersConfig = ( output , context ) : ClassicLoadBalancersConfig => { const contents = { ClassicLoadBalancers : undefined , } ; if ( output . classicLoadBalancers === "" ) { contents . ClassicLoadBalancers = [ ] ; } if ( output [ "classicLoadBalancers" ] !== undefined && output [ "classicLoadBalancers" ] [ "item" ] !== undefined ) { contents . ClassicLoadBalancers = deserializeAws_ec2ClassicLoadBalancers ( __getArrayIfSingleItem ( output [ "classicLoadBalancers" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ClientCertificateRevocationListStatus = ( output , context ) : ClientCertificateRevocationListStatus => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2ClientConnectResponseOptions = ( output , context ) : ClientConnectResponseOptions => { const contents = { Enabled : undefined , LambdaFunctionArn : undefined , Status : undefined , } ; if ( output [ "enabled" ] !== undefined ) { contents . Enabled = __parseBoolean ( output [ "enabled" ] ) ; } if ( output [ "lambdaFunctionArn" ] !== undefined ) { contents . LambdaFunctionArn = __expectString ( output [ "lambdaFunctionArn" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2ClientVpnEndpointAttributeStatus ( output [ "status" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ClientVpnAuthentication = ( output , context ) : ClientVpnAuthentication => { const contents = { Type : undefined , ActiveDirectory : undefined , MutualAuthentication : undefined , FederatedAuthentication : undefined , } ; if ( output [ "type" ] !== undefined ) { contents . Type = __expectString ( output [ "type" ] ) ; } if ( output [ "activeDirectory" ] !== undefined ) { contents . ActiveDirectory = deserializeAws_ec2DirectoryServiceAuthentication ( output [ "activeDirectory" ] , context ) ; } if ( output [ "mutualAuthentication" ] !== undefined ) { contents . MutualAuthentication = deserializeAws_ec2CertificateAuthentication ( output [ "mutualAuthentication" ] , context ) ; } if ( output [ "federatedAuthentication" ] !== undefined ) { contents . FederatedAuthentication = deserializeAws_ec2FederatedAuthentication ( output [ "federatedAuthentication" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ClientVpnAuthenticationList = ( output , context ) : ClientVpnAuthentication [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ClientVpnAuthentication ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ClientVpnAuthorizationRuleStatus = ( output , context ) : ClientVpnAuthorizationRuleStatus => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2ClientVpnConnection = ( output , context ) : ClientVpnConnection => { const contents = { ClientVpnEndpointId : undefined , Timestamp : undefined , ConnectionId : undefined , Username : undefined , ConnectionEstablishedTime : undefined , IngressBytes : undefined , EgressBytes : undefined , IngressPackets : undefined , EgressPackets : undefined , ClientIp : undefined , CommonName : undefined , Status : undefined , ConnectionEndTime : undefined , PostureComplianceStatuses : undefined , } ; if ( output [ "clientVpnEndpointId" ] !== undefined ) { contents . ClientVpnEndpointId = __expectString ( output [ "clientVpnEndpointId" ] ) ; } if ( output [ "timestamp" ] !== undefined ) { contents . Timestamp = __expectString ( output [ "timestamp" ] ) ; } if ( output [ "connectionId" ] !== undefined ) { contents . ConnectionId = __expectString ( output [ "connectionId" ] ) ; } if ( output [ "username" ] !== undefined ) { contents . Username = __expectString ( output [ "username" ] ) ; } if ( output [ "connectionEstablishedTime" ] !== undefined ) { contents . ConnectionEstablishedTime = __expectString ( output [ "connectionEstablishedTime" ] ) ; } if ( output [ "ingressBytes" ] !== undefined ) { contents . IngressBytes = __expectString ( output [ "ingressBytes" ] ) ; } if ( output [ "egressBytes" ] !== undefined ) { contents . EgressBytes = __expectString ( output [ "egressBytes" ] ) ; } if ( output [ "ingressPackets" ] !== undefined ) { contents . IngressPackets = __expectString ( output [ "ingressPackets" ] ) ; } if ( output [ "egressPackets" ] !== undefined ) { contents . EgressPackets = __expectString ( output [ "egressPackets" ] ) ; } if ( output [ "clientIp" ] !== undefined ) { contents . ClientIp = __expectString ( output [ "clientIp" ] ) ; } if ( output [ "commonName" ] !== undefined ) { contents . CommonName = __expectString ( output [ "commonName" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2ClientVpnConnectionStatus ( output [ "status" ] , context ) ; } if ( output [ "connectionEndTime" ] !== undefined ) { contents . ConnectionEndTime = __expectString ( output [ "connectionEndTime" ] ) ; } if ( output . postureComplianceStatusSet === "" ) { contents . PostureComplianceStatuses = [ ] ; } if ( output [ "postureComplianceStatusSet" ] !== undefined && output [ "postureComplianceStatusSet" ] [ "item" ] !== undefined ) { contents . PostureComplianceStatuses = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "postureComplianceStatusSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ClientVpnConnectionSet = ( output , context ) : ClientVpnConnection [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ClientVpnConnection ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ClientVpnConnectionStatus = ( output , context ) : ClientVpnConnectionStatus => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2ClientVpnEndpoint = ( output , context ) : ClientVpnEndpoint => { const contents = { ClientVpnEndpointId : undefined , Description : undefined , Status : undefined , CreationTime : undefined , DeletionTime : undefined , DnsName : undefined , ClientCidrBlock : undefined , DnsServers : undefined , SplitTunnel : undefined , VpnProtocol : undefined , TransportProtocol : undefined , VpnPort : undefined , AssociatedTargetNetworks : undefined , ServerCertificateArn : undefined , AuthenticationOptions : undefined , ConnectionLogOptions : undefined , Tags : undefined , SecurityGroupIds : undefined , VpcId : undefined , SelfServicePortalUrl : undefined , ClientConnectOptions : undefined , } ; if ( output [ "clientVpnEndpointId" ] !== undefined ) { contents . ClientVpnEndpointId = __expectString ( output [ "clientVpnEndpointId" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2ClientVpnEndpointStatus ( output [ "status" ] , context ) ; } if ( output [ "creationTime" ] !== undefined ) { contents . CreationTime = __expectString ( output [ "creationTime" ] ) ; } if ( output [ "deletionTime" ] !== undefined ) { contents . DeletionTime = __expectString ( output [ "deletionTime" ] ) ; } if ( output [ "dnsName" ] !== undefined ) { contents . DnsName = __expectString ( output [ "dnsName" ] ) ; } if ( output [ "clientCidrBlock" ] !== undefined ) { contents . ClientCidrBlock = __expectString ( output [ "clientCidrBlock" ] ) ; } if ( output . dnsServer === "" ) { contents . DnsServers = [ ] ; } if ( output [ "dnsServer" ] !== undefined && output [ "dnsServer" ] [ "item" ] !== undefined ) { contents . DnsServers = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "dnsServer" ] [ "item" ] ) , context ) ; } if ( output [ "splitTunnel" ] !== undefined ) { contents . SplitTunnel = __parseBoolean ( output [ "splitTunnel" ] ) ; } if ( output [ "vpnProtocol" ] !== undefined ) { contents . VpnProtocol = __expectString ( output [ "vpnProtocol" ] ) ; } if ( output [ "transportProtocol" ] !== undefined ) { contents . TransportProtocol = __expectString ( output [ "transportProtocol" ] ) ; } if ( output [ "vpnPort" ] !== undefined ) { contents . VpnPort = __strictParseInt32 ( output [ "vpnPort" ] ) as number ; } if ( output . associatedTargetNetwork === "" ) { contents . AssociatedTargetNetworks = [ ] ; } if ( output [ "associatedTargetNetwork" ] !== undefined && output [ "associatedTargetNetwork" ] [ "item" ] !== undefined ) { contents . AssociatedTargetNetworks = deserializeAws_ec2AssociatedTargetNetworkSet ( __getArrayIfSingleItem ( output [ "associatedTargetNetwork" ] [ "item" ] ) , context ) ; } if ( output [ "serverCertificateArn" ] !== undefined ) { contents . ServerCertificateArn = __expectString ( output [ "serverCertificateArn" ] ) ; } if ( output . authenticationOptions === "" ) { contents . AuthenticationOptions = [ ] ; } if ( output [ "authenticationOptions" ] !== undefined && output [ "authenticationOptions" ] [ "item" ] !== undefined ) { contents . AuthenticationOptions = deserializeAws_ec2ClientVpnAuthenticationList ( __getArrayIfSingleItem ( output [ "authenticationOptions" ] [ "item" ] ) , context ) ; } if ( output [ "connectionLogOptions" ] !== undefined ) { contents . ConnectionLogOptions = deserializeAws_ec2ConnectionLogResponseOptions ( output [ "connectionLogOptions" ] , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output . securityGroupIdSet === "" ) { contents . SecurityGroupIds = [ ] ; } if ( output [ "securityGroupIdSet" ] !== undefined && output [ "securityGroupIdSet" ] [ "item" ] !== undefined ) { contents . SecurityGroupIds = deserializeAws_ec2ClientVpnSecurityGroupIdSet ( __getArrayIfSingleItem ( output [ "securityGroupIdSet" ] [ "item" ] ) , context ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "selfServicePortalUrl" ] !== undefined ) { contents . SelfServicePortalUrl = __expectString ( output [ "selfServicePortalUrl" ] ) ; } if ( output [ "clientConnectOptions" ] !== undefined ) { contents . ClientConnectOptions = deserializeAws_ec2ClientConnectResponseOptions ( output [ "clientConnectOptions" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ClientVpnEndpointAttributeStatus = ( output , context ) : ClientVpnEndpointAttributeStatus => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2ClientVpnEndpointStatus = ( output , context ) : ClientVpnEndpointStatus => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2ClientVpnRoute = ( output , context ) : ClientVpnRoute => { const contents = { ClientVpnEndpointId : undefined , DestinationCidr : undefined , TargetSubnet : undefined , Type : undefined , Origin : undefined , Status : undefined , Description : undefined , } ; if ( output [ "clientVpnEndpointId" ] !== undefined ) { contents . ClientVpnEndpointId = __expectString ( output [ "clientVpnEndpointId" ] ) ; } if ( output [ "destinationCidr" ] !== undefined ) { contents . DestinationCidr = __expectString ( output [ "destinationCidr" ] ) ; } if ( output [ "targetSubnet" ] !== undefined ) { contents . TargetSubnet = __expectString ( output [ "targetSubnet" ] ) ; } if ( output [ "type" ] !== undefined ) { contents . Type = __expectString ( output [ "type" ] ) ; } if ( output [ "origin" ] !== undefined ) { contents . Origin = __expectString ( output [ "origin" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2ClientVpnRouteStatus ( output [ "status" ] , context ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } return contents ; } ; const deserializeAws_ec2ClientVpnRouteSet = ( output , context ) : ClientVpnRoute [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ClientVpnRoute ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ClientVpnRouteStatus = ( output , context ) : ClientVpnRouteStatus => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2ClientVpnSecurityGroupIdSet = ( 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_ec2CoipAddressUsage = ( output , context ) : CoipAddressUsage => { const contents = { AllocationId : undefined , AwsAccountId : undefined , AwsService : undefined , CoIp : undefined , } ; if ( output [ "allocationId" ] !== undefined ) { contents . AllocationId = __expectString ( output [ "allocationId" ] ) ; } if ( output [ "awsAccountId" ] !== undefined ) { contents . AwsAccountId = __expectString ( output [ "awsAccountId" ] ) ; } if ( output [ "awsService" ] !== undefined ) { contents . AwsService = __expectString ( output [ "awsService" ] ) ; } if ( output [ "coIp" ] !== undefined ) { contents . CoIp = __expectString ( output [ "coIp" ] ) ; } return contents ; } ; const deserializeAws_ec2CoipAddressUsageSet = ( output , context ) : CoipAddressUsage [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2CoipAddressUsage ( entry , context ) ; } ) ; } ; const deserializeAws_ec2CoipPool = ( output , context ) : CoipPool => { const contents = { PoolId : undefined , PoolCidrs : undefined , LocalGatewayRouteTableId : undefined , Tags : undefined , PoolArn : undefined , } ; if ( output [ "poolId" ] !== undefined ) { contents . PoolId = __expectString ( output [ "poolId" ] ) ; } if ( output . poolCidrSet === "" ) { contents . PoolCidrs = [ ] ; } if ( output [ "poolCidrSet" ] !== undefined && output [ "poolCidrSet" ] [ "item" ] !== undefined ) { contents . PoolCidrs = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "poolCidrSet" ] [ "item" ] ) , context ) ; } if ( output [ "localGatewayRouteTableId" ] !== undefined ) { contents . LocalGatewayRouteTableId = __expectString ( output [ "localGatewayRouteTableId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "poolArn" ] !== undefined ) { contents . PoolArn = __expectString ( output [ "poolArn" ] ) ; } return contents ; } ; const deserializeAws_ec2CoipPoolSet = ( output , context ) : CoipPool [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2CoipPool ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ConfirmProductInstanceResult = ( output , context ) : ConfirmProductInstanceResult => { const contents = { OwnerId : undefined , Return : undefined , } ; if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ConnectionLogResponseOptions = ( output , context ) : ConnectionLogResponseOptions => { const contents = { Enabled : undefined , CloudwatchLogGroup : undefined , CloudwatchLogStream : undefined , } ; if ( output [ "Enabled" ] !== undefined ) { contents . Enabled = __parseBoolean ( output [ "Enabled" ] ) ; } if ( output [ "CloudwatchLogGroup" ] !== undefined ) { contents . CloudwatchLogGroup = __expectString ( output [ "CloudwatchLogGroup" ] ) ; } if ( output [ "CloudwatchLogStream" ] !== undefined ) { contents . CloudwatchLogStream = __expectString ( output [ "CloudwatchLogStream" ] ) ; } return contents ; } ; const deserializeAws_ec2ConnectionNotification = ( output , context ) : ConnectionNotification => { const contents = { ConnectionNotificationId : undefined , ServiceId : undefined , VpcEndpointId : undefined , ConnectionNotificationType : undefined , ConnectionNotificationArn : undefined , ConnectionEvents : undefined , ConnectionNotificationState : undefined , } ; if ( output [ "connectionNotificationId" ] !== undefined ) { contents . ConnectionNotificationId = __expectString ( output [ "connectionNotificationId" ] ) ; } if ( output [ "serviceId" ] !== undefined ) { contents . ServiceId = __expectString ( output [ "serviceId" ] ) ; } if ( output [ "vpcEndpointId" ] !== undefined ) { contents . VpcEndpointId = __expectString ( output [ "vpcEndpointId" ] ) ; } if ( output [ "connectionNotificationType" ] !== undefined ) { contents . ConnectionNotificationType = __expectString ( output [ "connectionNotificationType" ] ) ; } if ( output [ "connectionNotificationArn" ] !== undefined ) { contents . ConnectionNotificationArn = __expectString ( output [ "connectionNotificationArn" ] ) ; } if ( output . connectionEvents === "" ) { contents . ConnectionEvents = [ ] ; } if ( output [ "connectionEvents" ] !== undefined && output [ "connectionEvents" ] [ "item" ] !== undefined ) { contents . ConnectionEvents = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "connectionEvents" ] [ "item" ] ) , context ) ; } if ( output [ "connectionNotificationState" ] !== undefined ) { contents . ConnectionNotificationState = __expectString ( output [ "connectionNotificationState" ] ) ; } return contents ; } ; const deserializeAws_ec2ConnectionNotificationSet = ( output , context ) : ConnectionNotification [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ConnectionNotification ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ConversionTask = ( output , context ) : ConversionTask => { const contents = { ConversionTaskId : undefined , ExpirationTime : undefined , ImportInstance : undefined , ImportVolume : undefined , State : undefined , StatusMessage : undefined , Tags : undefined , } ; if ( output [ "conversionTaskId" ] !== undefined ) { contents . ConversionTaskId = __expectString ( output [ "conversionTaskId" ] ) ; } if ( output [ "expirationTime" ] !== undefined ) { contents . ExpirationTime = __expectString ( output [ "expirationTime" ] ) ; } if ( output [ "importInstance" ] !== undefined ) { contents . ImportInstance = deserializeAws_ec2ImportInstanceTaskDetails ( output [ "importInstance" ] , context ) ; } if ( output [ "importVolume" ] !== undefined ) { contents . ImportVolume = deserializeAws_ec2ImportVolumeTaskDetails ( output [ "importVolume" ] , context ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2CopyFpgaImageResult = ( output , context ) : CopyFpgaImageResult => { const contents = { FpgaImageId : undefined , } ; if ( output [ "fpgaImageId" ] !== undefined ) { contents . FpgaImageId = __expectString ( output [ "fpgaImageId" ] ) ; } return contents ; } ; const deserializeAws_ec2CopyImageResult = ( output , context ) : CopyImageResult => { const contents = { ImageId : undefined , } ; if ( output [ "imageId" ] !== undefined ) { contents . ImageId = __expectString ( output [ "imageId" ] ) ; } return contents ; } ; const deserializeAws_ec2CopySnapshotResult = ( output , context ) : CopySnapshotResult => { const contents = { SnapshotId : undefined , Tags : undefined , } ; if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2CoreCountList = ( output , context ) : number [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __strictParseInt32 ( entry ) as number ; } ) ; } ; const deserializeAws_ec2CpuManufacturerSet = ( output , context ) : ( CpuManufacturer | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_ec2CpuOptions = ( output , context ) : CpuOptions => { const contents = { CoreCount : undefined , ThreadsPerCore : undefined , } ; if ( output [ "coreCount" ] !== undefined ) { contents . CoreCount = __strictParseInt32 ( output [ "coreCount" ] ) as number ; } if ( output [ "threadsPerCore" ] !== undefined ) { contents . ThreadsPerCore = __strictParseInt32 ( output [ "threadsPerCore" ] ) as number ; } return contents ; } ; const deserializeAws_ec2CreateCapacityReservationFleetResult = ( output , context ) : CreateCapacityReservationFleetResult => { const contents = { CapacityReservationFleetId : undefined , State : undefined , TotalTargetCapacity : undefined , TotalFulfilledCapacity : undefined , InstanceMatchCriteria : undefined , AllocationStrategy : undefined , CreateTime : undefined , EndDate : undefined , Tenancy : undefined , FleetCapacityReservations : undefined , Tags : undefined , } ; if ( output [ "capacityReservationFleetId" ] !== undefined ) { contents . CapacityReservationFleetId = __expectString ( output [ "capacityReservationFleetId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "totalTargetCapacity" ] !== undefined ) { contents . TotalTargetCapacity = __strictParseInt32 ( output [ "totalTargetCapacity" ] ) as number ; } if ( output [ "totalFulfilledCapacity" ] !== undefined ) { contents . TotalFulfilledCapacity = __strictParseFloat ( output [ "totalFulfilledCapacity" ] ) as number ; } if ( output [ "instanceMatchCriteria" ] !== undefined ) { contents . InstanceMatchCriteria = __expectString ( output [ "instanceMatchCriteria" ] ) ; } if ( output [ "allocationStrategy" ] !== undefined ) { contents . AllocationStrategy = __expectString ( output [ "allocationStrategy" ] ) ; } if ( output [ "createTime" ] !== undefined ) { contents . CreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "createTime" ] ) ) ; } if ( output [ "endDate" ] !== undefined ) { contents . EndDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "endDate" ] ) ) ; } if ( output [ "tenancy" ] !== undefined ) { contents . Tenancy = __expectString ( output [ "tenancy" ] ) ; } if ( output . fleetCapacityReservationSet === "" ) { contents . FleetCapacityReservations = [ ] ; } if ( output [ "fleetCapacityReservationSet" ] !== undefined && output [ "fleetCapacityReservationSet" ] [ "item" ] !== undefined ) { contents . FleetCapacityReservations = deserializeAws_ec2FleetCapacityReservationSet ( __getArrayIfSingleItem ( output [ "fleetCapacityReservationSet" ] [ "item" ] ) , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2CreateCapacityReservationResult = ( output , context ) : CreateCapacityReservationResult => { const contents = { CapacityReservation : undefined , } ; if ( output [ "capacityReservation" ] !== undefined ) { contents . CapacityReservation = deserializeAws_ec2CapacityReservation ( output [ "capacityReservation" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateCarrierGatewayResult = ( output , context ) : CreateCarrierGatewayResult => { const contents = { CarrierGateway : undefined , } ; if ( output [ "carrierGateway" ] !== undefined ) { contents . CarrierGateway = deserializeAws_ec2CarrierGateway ( output [ "carrierGateway" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateClientVpnEndpointResult = ( output , context ) : CreateClientVpnEndpointResult => { const contents = { ClientVpnEndpointId : undefined , Status : undefined , DnsName : undefined , } ; if ( output [ "clientVpnEndpointId" ] !== undefined ) { contents . ClientVpnEndpointId = __expectString ( output [ "clientVpnEndpointId" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2ClientVpnEndpointStatus ( output [ "status" ] , context ) ; } if ( output [ "dnsName" ] !== undefined ) { contents . DnsName = __expectString ( output [ "dnsName" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateClientVpnRouteResult = ( output , context ) : CreateClientVpnRouteResult => { const contents = { Status : undefined , } ; if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2ClientVpnRouteStatus ( output [ "status" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateCustomerGatewayResult = ( output , context ) : CreateCustomerGatewayResult => { const contents = { CustomerGateway : undefined , } ; if ( output [ "customerGateway" ] !== undefined ) { contents . CustomerGateway = deserializeAws_ec2CustomerGateway ( output [ "customerGateway" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateDefaultSubnetResult = ( output , context ) : CreateDefaultSubnetResult => { const contents = { Subnet : undefined , } ; if ( output [ "subnet" ] !== undefined ) { contents . Subnet = deserializeAws_ec2Subnet ( output [ "subnet" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateDefaultVpcResult = ( output , context ) : CreateDefaultVpcResult => { const contents = { Vpc : undefined , } ; if ( output [ "vpc" ] !== undefined ) { contents . Vpc = deserializeAws_ec2Vpc ( output [ "vpc" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateDhcpOptionsResult = ( output , context ) : CreateDhcpOptionsResult => { const contents = { DhcpOptions : undefined , } ; if ( output [ "dhcpOptions" ] !== undefined ) { contents . DhcpOptions = deserializeAws_ec2DhcpOptions ( output [ "dhcpOptions" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateEgressOnlyInternetGatewayResult = ( output , context ) : CreateEgressOnlyInternetGatewayResult => { const contents = { ClientToken : undefined , EgressOnlyInternetGateway : undefined , } ; if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } if ( output [ "egressOnlyInternetGateway" ] !== undefined ) { contents . EgressOnlyInternetGateway = deserializeAws_ec2EgressOnlyInternetGateway ( output [ "egressOnlyInternetGateway" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateFleetError = ( output , context ) : CreateFleetError => { const contents = { LaunchTemplateAndOverrides : undefined , Lifecycle : undefined , ErrorCode : undefined , ErrorMessage : undefined , } ; if ( output [ "launchTemplateAndOverrides" ] !== undefined ) { contents . LaunchTemplateAndOverrides = deserializeAws_ec2LaunchTemplateAndOverridesResponse ( output [ "launchTemplateAndOverrides" ] , context ) ; } if ( output [ "lifecycle" ] !== undefined ) { contents . Lifecycle = __expectString ( output [ "lifecycle" ] ) ; } if ( output [ "errorCode" ] !== undefined ) { contents . ErrorCode = __expectString ( output [ "errorCode" ] ) ; } if ( output [ "errorMessage" ] !== undefined ) { contents . ErrorMessage = __expectString ( output [ "errorMessage" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateFleetErrorsSet = ( output , context ) : CreateFleetError [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2CreateFleetError ( entry , context ) ; } ) ; } ; const deserializeAws_ec2CreateFleetInstance = ( output , context ) : CreateFleetInstance => { const contents = { LaunchTemplateAndOverrides : undefined , Lifecycle : undefined , InstanceIds : undefined , InstanceType : undefined , Platform : undefined , } ; if ( output [ "launchTemplateAndOverrides" ] !== undefined ) { contents . LaunchTemplateAndOverrides = deserializeAws_ec2LaunchTemplateAndOverridesResponse ( output [ "launchTemplateAndOverrides" ] , context ) ; } if ( output [ "lifecycle" ] !== undefined ) { contents . Lifecycle = __expectString ( output [ "lifecycle" ] ) ; } if ( output . instanceIds === "" ) { contents . InstanceIds = [ ] ; } if ( output [ "instanceIds" ] !== undefined && output [ "instanceIds" ] [ "item" ] !== undefined ) { contents . InstanceIds = deserializeAws_ec2InstanceIdsSet ( __getArrayIfSingleItem ( output [ "instanceIds" ] [ "item" ] ) , context ) ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "platform" ] !== undefined ) { contents . Platform = __expectString ( output [ "platform" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateFleetInstancesSet = ( output , context ) : CreateFleetInstance [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2CreateFleetInstance ( entry , context ) ; } ) ; } ; const deserializeAws_ec2CreateFleetResult = ( output , context ) : CreateFleetResult => { const contents = { FleetId : undefined , Errors : undefined , Instances : undefined , } ; if ( output [ "fleetId" ] !== undefined ) { contents . FleetId = __expectString ( output [ "fleetId" ] ) ; } if ( output . errorSet === "" ) { contents . Errors = [ ] ; } if ( output [ "errorSet" ] !== undefined && output [ "errorSet" ] [ "item" ] !== undefined ) { contents . Errors = deserializeAws_ec2CreateFleetErrorsSet ( __getArrayIfSingleItem ( output [ "errorSet" ] [ "item" ] ) , context ) ; } if ( output . fleetInstanceSet === "" ) { contents . Instances = [ ] ; } if ( output [ "fleetInstanceSet" ] !== undefined && output [ "fleetInstanceSet" ] [ "item" ] !== undefined ) { contents . Instances = deserializeAws_ec2CreateFleetInstancesSet ( __getArrayIfSingleItem ( output [ "fleetInstanceSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2CreateFlowLogsResult = ( output , context ) : CreateFlowLogsResult => { const contents = { ClientToken : undefined , FlowLogIds : undefined , Unsuccessful : undefined , } ; if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } if ( output . flowLogIdSet === "" ) { contents . FlowLogIds = [ ] ; } if ( output [ "flowLogIdSet" ] !== undefined && output [ "flowLogIdSet" ] [ "item" ] !== undefined ) { contents . FlowLogIds = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "flowLogIdSet" ] [ "item" ] ) , context ) ; } if ( output . unsuccessful === "" ) { contents . Unsuccessful = [ ] ; } if ( output [ "unsuccessful" ] !== undefined && output [ "unsuccessful" ] [ "item" ] !== undefined ) { contents . Unsuccessful = deserializeAws_ec2UnsuccessfulItemSet ( __getArrayIfSingleItem ( output [ "unsuccessful" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2CreateFpgaImageResult = ( output , context ) : CreateFpgaImageResult => { const contents = { FpgaImageId : undefined , FpgaImageGlobalId : undefined , } ; if ( output [ "fpgaImageId" ] !== undefined ) { contents . FpgaImageId = __expectString ( output [ "fpgaImageId" ] ) ; } if ( output [ "fpgaImageGlobalId" ] !== undefined ) { contents . FpgaImageGlobalId = __expectString ( output [ "fpgaImageGlobalId" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateImageResult = ( output , context ) : CreateImageResult => { const contents = { ImageId : undefined , } ; if ( output [ "imageId" ] !== undefined ) { contents . ImageId = __expectString ( output [ "imageId" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateInstanceEventWindowResult = ( output , context ) : CreateInstanceEventWindowResult => { const contents = { InstanceEventWindow : undefined , } ; if ( output [ "instanceEventWindow" ] !== undefined ) { contents . InstanceEventWindow = deserializeAws_ec2InstanceEventWindow ( output [ "instanceEventWindow" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateInstanceExportTaskResult = ( output , context ) : CreateInstanceExportTaskResult => { const contents = { ExportTask : undefined , } ; if ( output [ "exportTask" ] !== undefined ) { contents . ExportTask = deserializeAws_ec2ExportTask ( output [ "exportTask" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateInternetGatewayResult = ( output , context ) : CreateInternetGatewayResult => { const contents = { InternetGateway : undefined , } ; if ( output [ "internetGateway" ] !== undefined ) { contents . InternetGateway = deserializeAws_ec2InternetGateway ( output [ "internetGateway" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateIpamPoolResult = ( output , context ) : CreateIpamPoolResult => { const contents = { IpamPool : undefined , } ; if ( output [ "ipamPool" ] !== undefined ) { contents . IpamPool = deserializeAws_ec2IpamPool ( output [ "ipamPool" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateIpamResult = ( output , context ) : CreateIpamResult => { const contents = { Ipam : undefined , } ; if ( output [ "ipam" ] !== undefined ) { contents . Ipam = deserializeAws_ec2Ipam ( output [ "ipam" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateIpamScopeResult = ( output , context ) : CreateIpamScopeResult => { const contents = { IpamScope : undefined , } ; if ( output [ "ipamScope" ] !== undefined ) { contents . IpamScope = deserializeAws_ec2IpamScope ( output [ "ipamScope" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateLaunchTemplateResult = ( output , context ) : CreateLaunchTemplateResult => { const contents = { LaunchTemplate : undefined , Warning : undefined , } ; if ( output [ "launchTemplate" ] !== undefined ) { contents . LaunchTemplate = deserializeAws_ec2LaunchTemplate ( output [ "launchTemplate" ] , context ) ; } if ( output [ "warning" ] !== undefined ) { contents . Warning = deserializeAws_ec2ValidationWarning ( output [ "warning" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateLaunchTemplateVersionResult = ( output , context ) : CreateLaunchTemplateVersionResult => { const contents = { LaunchTemplateVersion : undefined , Warning : undefined , } ; if ( output [ "launchTemplateVersion" ] !== undefined ) { contents . LaunchTemplateVersion = deserializeAws_ec2LaunchTemplateVersion ( output [ "launchTemplateVersion" ] , context ) ; } if ( output [ "warning" ] !== undefined ) { contents . Warning = deserializeAws_ec2ValidationWarning ( output [ "warning" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateLocalGatewayRouteResult = ( output , context ) : CreateLocalGatewayRouteResult => { const contents = { Route : undefined , } ; if ( output [ "route" ] !== undefined ) { contents . Route = deserializeAws_ec2LocalGatewayRoute ( output [ "route" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateLocalGatewayRouteTableVpcAssociationResult = ( output , context ) : CreateLocalGatewayRouteTableVpcAssociationResult => { const contents = { LocalGatewayRouteTableVpcAssociation : undefined , } ; if ( output [ "localGatewayRouteTableVpcAssociation" ] !== undefined ) { contents . LocalGatewayRouteTableVpcAssociation = deserializeAws_ec2LocalGatewayRouteTableVpcAssociation ( output [ "localGatewayRouteTableVpcAssociation" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateManagedPrefixListResult = ( output , context ) : CreateManagedPrefixListResult => { const contents = { PrefixList : undefined , } ; if ( output [ "prefixList" ] !== undefined ) { contents . PrefixList = deserializeAws_ec2ManagedPrefixList ( output [ "prefixList" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateNatGatewayResult = ( output , context ) : CreateNatGatewayResult => { const contents = { ClientToken : undefined , NatGateway : undefined , } ; if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } if ( output [ "natGateway" ] !== undefined ) { contents . NatGateway = deserializeAws_ec2NatGateway ( output [ "natGateway" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateNetworkAclResult = ( output , context ) : CreateNetworkAclResult => { const contents = { NetworkAcl : undefined , } ; if ( output [ "networkAcl" ] !== undefined ) { contents . NetworkAcl = deserializeAws_ec2NetworkAcl ( output [ "networkAcl" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateNetworkInsightsAccessScopeResult = ( output , context ) : CreateNetworkInsightsAccessScopeResult => { const contents = { NetworkInsightsAccessScope : undefined , NetworkInsightsAccessScopeContent : undefined , } ; if ( output [ "networkInsightsAccessScope" ] !== undefined ) { contents . NetworkInsightsAccessScope = deserializeAws_ec2NetworkInsightsAccessScope ( output [ "networkInsightsAccessScope" ] , context ) ; } if ( output [ "networkInsightsAccessScopeContent" ] !== undefined ) { contents . NetworkInsightsAccessScopeContent = deserializeAws_ec2NetworkInsightsAccessScopeContent ( output [ "networkInsightsAccessScopeContent" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateNetworkInsightsPathResult = ( output , context ) : CreateNetworkInsightsPathResult => { const contents = { NetworkInsightsPath : undefined , } ; if ( output [ "networkInsightsPath" ] !== undefined ) { contents . NetworkInsightsPath = deserializeAws_ec2NetworkInsightsPath ( output [ "networkInsightsPath" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateNetworkInterfacePermissionResult = ( output , context ) : CreateNetworkInterfacePermissionResult => { const contents = { InterfacePermission : undefined , } ; if ( output [ "interfacePermission" ] !== undefined ) { contents . InterfacePermission = deserializeAws_ec2NetworkInterfacePermission ( output [ "interfacePermission" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateNetworkInterfaceResult = ( output , context ) : CreateNetworkInterfaceResult => { const contents = { NetworkInterface : undefined , ClientToken : undefined , } ; if ( output [ "networkInterface" ] !== undefined ) { contents . NetworkInterface = deserializeAws_ec2NetworkInterface ( output [ "networkInterface" ] , context ) ; } if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } return contents ; } ; const deserializeAws_ec2CreatePlacementGroupResult = ( output , context ) : CreatePlacementGroupResult => { const contents = { PlacementGroup : undefined , } ; if ( output [ "placementGroup" ] !== undefined ) { contents . PlacementGroup = deserializeAws_ec2PlacementGroup ( output [ "placementGroup" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreatePublicIpv4PoolResult = ( output , context ) : CreatePublicIpv4PoolResult => { const contents = { PoolId : undefined , } ; if ( output [ "poolId" ] !== undefined ) { contents . PoolId = __expectString ( output [ "poolId" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateReplaceRootVolumeTaskResult = ( output , context ) : CreateReplaceRootVolumeTaskResult => { const contents = { ReplaceRootVolumeTask : undefined , } ; if ( output [ "replaceRootVolumeTask" ] !== undefined ) { contents . ReplaceRootVolumeTask = deserializeAws_ec2ReplaceRootVolumeTask ( output [ "replaceRootVolumeTask" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateReservedInstancesListingResult = ( output , context ) : CreateReservedInstancesListingResult => { const contents = { ReservedInstancesListings : undefined , } ; if ( output . reservedInstancesListingsSet === "" ) { contents . ReservedInstancesListings = [ ] ; } if ( output [ "reservedInstancesListingsSet" ] !== undefined && output [ "reservedInstancesListingsSet" ] [ "item" ] !== undefined ) { contents . ReservedInstancesListings = deserializeAws_ec2ReservedInstancesListingList ( __getArrayIfSingleItem ( output [ "reservedInstancesListingsSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2CreateRestoreImageTaskResult = ( output , context ) : CreateRestoreImageTaskResult => { const contents = { ImageId : undefined , } ; if ( output [ "imageId" ] !== undefined ) { contents . ImageId = __expectString ( output [ "imageId" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateRouteResult = ( output , context ) : CreateRouteResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateRouteTableResult = ( output , context ) : CreateRouteTableResult => { const contents = { RouteTable : undefined , } ; if ( output [ "routeTable" ] !== undefined ) { contents . RouteTable = deserializeAws_ec2RouteTable ( output [ "routeTable" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateSecurityGroupResult = ( output , context ) : CreateSecurityGroupResult => { const contents = { GroupId : undefined , Tags : undefined , } ; if ( output [ "groupId" ] !== undefined ) { contents . GroupId = __expectString ( output [ "groupId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2CreateSnapshotsResult = ( output , context ) : CreateSnapshotsResult => { const contents = { Snapshots : undefined , } ; if ( output . snapshotSet === "" ) { contents . Snapshots = [ ] ; } if ( output [ "snapshotSet" ] !== undefined && output [ "snapshotSet" ] [ "item" ] !== undefined ) { contents . Snapshots = deserializeAws_ec2SnapshotSet ( __getArrayIfSingleItem ( output [ "snapshotSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2CreateSpotDatafeedSubscriptionResult = ( output , context ) : CreateSpotDatafeedSubscriptionResult => { const contents = { SpotDatafeedSubscription : undefined , } ; if ( output [ "spotDatafeedSubscription" ] !== undefined ) { contents . SpotDatafeedSubscription = deserializeAws_ec2SpotDatafeedSubscription ( output [ "spotDatafeedSubscription" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateStoreImageTaskResult = ( output , context ) : CreateStoreImageTaskResult => { const contents = { ObjectKey : undefined , } ; if ( output [ "objectKey" ] !== undefined ) { contents . ObjectKey = __expectString ( output [ "objectKey" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateSubnetCidrReservationResult = ( output , context ) : CreateSubnetCidrReservationResult => { const contents = { SubnetCidrReservation : undefined , } ; if ( output [ "subnetCidrReservation" ] !== undefined ) { contents . SubnetCidrReservation = deserializeAws_ec2SubnetCidrReservation ( output [ "subnetCidrReservation" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateSubnetResult = ( output , context ) : CreateSubnetResult => { const contents = { Subnet : undefined , } ; if ( output [ "subnet" ] !== undefined ) { contents . Subnet = deserializeAws_ec2Subnet ( output [ "subnet" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateTrafficMirrorFilterResult = ( output , context ) : CreateTrafficMirrorFilterResult => { const contents = { TrafficMirrorFilter : undefined , ClientToken : undefined , } ; if ( output [ "trafficMirrorFilter" ] !== undefined ) { contents . TrafficMirrorFilter = deserializeAws_ec2TrafficMirrorFilter ( output [ "trafficMirrorFilter" ] , context ) ; } if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateTrafficMirrorFilterRuleResult = ( output , context ) : CreateTrafficMirrorFilterRuleResult => { const contents = { TrafficMirrorFilterRule : undefined , ClientToken : undefined , } ; if ( output [ "trafficMirrorFilterRule" ] !== undefined ) { contents . TrafficMirrorFilterRule = deserializeAws_ec2TrafficMirrorFilterRule ( output [ "trafficMirrorFilterRule" ] , context ) ; } if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateTrafficMirrorSessionResult = ( output , context ) : CreateTrafficMirrorSessionResult => { const contents = { TrafficMirrorSession : undefined , ClientToken : undefined , } ; if ( output [ "trafficMirrorSession" ] !== undefined ) { contents . TrafficMirrorSession = deserializeAws_ec2TrafficMirrorSession ( output [ "trafficMirrorSession" ] , context ) ; } if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateTrafficMirrorTargetResult = ( output , context ) : CreateTrafficMirrorTargetResult => { const contents = { TrafficMirrorTarget : undefined , ClientToken : undefined , } ; if ( output [ "trafficMirrorTarget" ] !== undefined ) { contents . TrafficMirrorTarget = deserializeAws_ec2TrafficMirrorTarget ( output [ "trafficMirrorTarget" ] , context ) ; } if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateTransitGatewayConnectPeerResult = ( output , context ) : CreateTransitGatewayConnectPeerResult => { const contents = { TransitGatewayConnectPeer : undefined , } ; if ( output [ "transitGatewayConnectPeer" ] !== undefined ) { contents . TransitGatewayConnectPeer = deserializeAws_ec2TransitGatewayConnectPeer ( output [ "transitGatewayConnectPeer" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateTransitGatewayConnectResult = ( output , context ) : CreateTransitGatewayConnectResult => { const contents = { TransitGatewayConnect : undefined , } ; if ( output [ "transitGatewayConnect" ] !== undefined ) { contents . TransitGatewayConnect = deserializeAws_ec2TransitGatewayConnect ( output [ "transitGatewayConnect" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateTransitGatewayMulticastDomainResult = ( output , context ) : CreateTransitGatewayMulticastDomainResult => { const contents = { TransitGatewayMulticastDomain : undefined , } ; if ( output [ "transitGatewayMulticastDomain" ] !== undefined ) { contents . TransitGatewayMulticastDomain = deserializeAws_ec2TransitGatewayMulticastDomain ( output [ "transitGatewayMulticastDomain" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateTransitGatewayPeeringAttachmentResult = ( output , context ) : CreateTransitGatewayPeeringAttachmentResult => { const contents = { TransitGatewayPeeringAttachment : undefined , } ; if ( output [ "transitGatewayPeeringAttachment" ] !== undefined ) { contents . TransitGatewayPeeringAttachment = deserializeAws_ec2TransitGatewayPeeringAttachment ( output [ "transitGatewayPeeringAttachment" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateTransitGatewayPrefixListReferenceResult = ( output , context ) : CreateTransitGatewayPrefixListReferenceResult => { const contents = { TransitGatewayPrefixListReference : undefined , } ; if ( output [ "transitGatewayPrefixListReference" ] !== undefined ) { contents . TransitGatewayPrefixListReference = deserializeAws_ec2TransitGatewayPrefixListReference ( output [ "transitGatewayPrefixListReference" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateTransitGatewayResult = ( output , context ) : CreateTransitGatewayResult => { const contents = { TransitGateway : undefined , } ; if ( output [ "transitGateway" ] !== undefined ) { contents . TransitGateway = deserializeAws_ec2TransitGateway ( output [ "transitGateway" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateTransitGatewayRouteResult = ( output , context ) : CreateTransitGatewayRouteResult => { const contents = { Route : undefined , } ; if ( output [ "route" ] !== undefined ) { contents . Route = deserializeAws_ec2TransitGatewayRoute ( output [ "route" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateTransitGatewayRouteTableResult = ( output , context ) : CreateTransitGatewayRouteTableResult => { const contents = { TransitGatewayRouteTable : undefined , } ; if ( output [ "transitGatewayRouteTable" ] !== undefined ) { contents . TransitGatewayRouteTable = deserializeAws_ec2TransitGatewayRouteTable ( output [ "transitGatewayRouteTable" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateTransitGatewayVpcAttachmentResult = ( output , context ) : CreateTransitGatewayVpcAttachmentResult => { const contents = { TransitGatewayVpcAttachment : undefined , } ; if ( output [ "transitGatewayVpcAttachment" ] !== undefined ) { contents . TransitGatewayVpcAttachment = deserializeAws_ec2TransitGatewayVpcAttachment ( output [ "transitGatewayVpcAttachment" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateVolumePermission = ( output , context ) : CreateVolumePermission => { const contents = { Group : undefined , UserId : undefined , } ; if ( output [ "group" ] !== undefined ) { contents . Group = __expectString ( output [ "group" ] ) ; } if ( output [ "userId" ] !== undefined ) { contents . UserId = __expectString ( output [ "userId" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateVolumePermissionList = ( output , context ) : CreateVolumePermission [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2CreateVolumePermission ( entry , context ) ; } ) ; } ; const deserializeAws_ec2CreateVpcEndpointConnectionNotificationResult = ( output , context ) : CreateVpcEndpointConnectionNotificationResult => { const contents = { ConnectionNotification : undefined , ClientToken : undefined , } ; if ( output [ "connectionNotification" ] !== undefined ) { contents . ConnectionNotification = deserializeAws_ec2ConnectionNotification ( output [ "connectionNotification" ] , context ) ; } if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateVpcEndpointResult = ( output , context ) : CreateVpcEndpointResult => { const contents = { VpcEndpoint : undefined , ClientToken : undefined , } ; if ( output [ "vpcEndpoint" ] !== undefined ) { contents . VpcEndpoint = deserializeAws_ec2VpcEndpoint ( output [ "vpcEndpoint" ] , context ) ; } if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateVpcEndpointServiceConfigurationResult = ( output , context ) : CreateVpcEndpointServiceConfigurationResult => { const contents = { ServiceConfiguration : undefined , ClientToken : undefined , } ; if ( output [ "serviceConfiguration" ] !== undefined ) { contents . ServiceConfiguration = deserializeAws_ec2ServiceConfiguration ( output [ "serviceConfiguration" ] , context ) ; } if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } return contents ; } ; const deserializeAws_ec2CreateVpcPeeringConnectionResult = ( output , context ) : CreateVpcPeeringConnectionResult => { const contents = { VpcPeeringConnection : undefined , } ; if ( output [ "vpcPeeringConnection" ] !== undefined ) { contents . VpcPeeringConnection = deserializeAws_ec2VpcPeeringConnection ( output [ "vpcPeeringConnection" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateVpcResult = ( output , context ) : CreateVpcResult => { const contents = { Vpc : undefined , } ; if ( output [ "vpc" ] !== undefined ) { contents . Vpc = deserializeAws_ec2Vpc ( output [ "vpc" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateVpnConnectionResult = ( output , context ) : CreateVpnConnectionResult => { const contents = { VpnConnection : undefined , } ; if ( output [ "vpnConnection" ] !== undefined ) { contents . VpnConnection = deserializeAws_ec2VpnConnection ( output [ "vpnConnection" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreateVpnGatewayResult = ( output , context ) : CreateVpnGatewayResult => { const contents = { VpnGateway : undefined , } ; if ( output [ "vpnGateway" ] !== undefined ) { contents . VpnGateway = deserializeAws_ec2VpnGateway ( output [ "vpnGateway" ] , context ) ; } return contents ; } ; const deserializeAws_ec2CreditSpecification = ( output , context ) : CreditSpecification => { const contents = { CpuCredits : undefined , } ; if ( output [ "cpuCredits" ] !== undefined ) { contents . CpuCredits = __expectString ( output [ "cpuCredits" ] ) ; } return contents ; } ; const deserializeAws_ec2CustomerGateway = ( output , context ) : CustomerGateway => { const contents = { BgpAsn : undefined , CustomerGatewayId : undefined , IpAddress : undefined , CertificateArn : undefined , State : undefined , Type : undefined , DeviceName : undefined , Tags : undefined , } ; if ( output [ "bgpAsn" ] !== undefined ) { contents . BgpAsn = __expectString ( output [ "bgpAsn" ] ) ; } if ( output [ "customerGatewayId" ] !== undefined ) { contents . CustomerGatewayId = __expectString ( output [ "customerGatewayId" ] ) ; } if ( output [ "ipAddress" ] !== undefined ) { contents . IpAddress = __expectString ( output [ "ipAddress" ] ) ; } if ( output [ "certificateArn" ] !== undefined ) { contents . CertificateArn = __expectString ( output [ "certificateArn" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "type" ] !== undefined ) { contents . Type = __expectString ( output [ "type" ] ) ; } if ( output [ "deviceName" ] !== undefined ) { contents . DeviceName = __expectString ( output [ "deviceName" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2CustomerGatewayList = ( output , context ) : CustomerGateway [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2CustomerGateway ( entry , context ) ; } ) ; } ; const deserializeAws_ec2DedicatedHostIdList = ( 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_ec2DeleteCarrierGatewayResult = ( output , context ) : DeleteCarrierGatewayResult => { const contents = { CarrierGateway : undefined , } ; if ( output [ "carrierGateway" ] !== undefined ) { contents . CarrierGateway = deserializeAws_ec2CarrierGateway ( output [ "carrierGateway" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteClientVpnEndpointResult = ( output , context ) : DeleteClientVpnEndpointResult => { const contents = { Status : undefined , } ; if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2ClientVpnEndpointStatus ( output [ "status" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteClientVpnRouteResult = ( output , context ) : DeleteClientVpnRouteResult => { const contents = { Status : undefined , } ; if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2ClientVpnRouteStatus ( output [ "status" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteEgressOnlyInternetGatewayResult = ( output , context ) : DeleteEgressOnlyInternetGatewayResult => { const contents = { ReturnCode : undefined , } ; if ( output [ "returnCode" ] !== undefined ) { contents . ReturnCode = __parseBoolean ( output [ "returnCode" ] ) ; } return contents ; } ; const deserializeAws_ec2DeleteFleetError = ( output , context ) : DeleteFleetError => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2DeleteFleetErrorItem = ( output , context ) : DeleteFleetErrorItem => { const contents = { Error : undefined , FleetId : undefined , } ; if ( output [ "error" ] !== undefined ) { contents . Error = deserializeAws_ec2DeleteFleetError ( output [ "error" ] , context ) ; } if ( output [ "fleetId" ] !== undefined ) { contents . FleetId = __expectString ( output [ "fleetId" ] ) ; } return contents ; } ; const deserializeAws_ec2DeleteFleetErrorSet = ( output , context ) : DeleteFleetErrorItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2DeleteFleetErrorItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2DeleteFleetsResult = ( output , context ) : DeleteFleetsResult => { const contents = { SuccessfulFleetDeletions : undefined , UnsuccessfulFleetDeletions : undefined , } ; if ( output . successfulFleetDeletionSet === "" ) { contents . SuccessfulFleetDeletions = [ ] ; } if ( output [ "successfulFleetDeletionSet" ] !== undefined && output [ "successfulFleetDeletionSet" ] [ "item" ] !== undefined ) { contents . SuccessfulFleetDeletions = deserializeAws_ec2DeleteFleetSuccessSet ( __getArrayIfSingleItem ( output [ "successfulFleetDeletionSet" ] [ "item" ] ) , context ) ; } if ( output . unsuccessfulFleetDeletionSet === "" ) { contents . UnsuccessfulFleetDeletions = [ ] ; } if ( output [ "unsuccessfulFleetDeletionSet" ] !== undefined && output [ "unsuccessfulFleetDeletionSet" ] [ "item" ] !== undefined ) { contents . UnsuccessfulFleetDeletions = deserializeAws_ec2DeleteFleetErrorSet ( __getArrayIfSingleItem ( output [ "unsuccessfulFleetDeletionSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteFleetSuccessItem = ( output , context ) : DeleteFleetSuccessItem => { const contents = { CurrentFleetState : undefined , PreviousFleetState : undefined , FleetId : undefined , } ; if ( output [ "currentFleetState" ] !== undefined ) { contents . CurrentFleetState = __expectString ( output [ "currentFleetState" ] ) ; } if ( output [ "previousFleetState" ] !== undefined ) { contents . PreviousFleetState = __expectString ( output [ "previousFleetState" ] ) ; } if ( output [ "fleetId" ] !== undefined ) { contents . FleetId = __expectString ( output [ "fleetId" ] ) ; } return contents ; } ; const deserializeAws_ec2DeleteFleetSuccessSet = ( output , context ) : DeleteFleetSuccessItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2DeleteFleetSuccessItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2DeleteFlowLogsResult = ( output , context ) : DeleteFlowLogsResult => { const contents = { Unsuccessful : undefined , } ; if ( output . unsuccessful === "" ) { contents . Unsuccessful = [ ] ; } if ( output [ "unsuccessful" ] !== undefined && output [ "unsuccessful" ] [ "item" ] !== undefined ) { contents . Unsuccessful = deserializeAws_ec2UnsuccessfulItemSet ( __getArrayIfSingleItem ( output [ "unsuccessful" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteFpgaImageResult = ( output , context ) : DeleteFpgaImageResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2DeleteInstanceEventWindowResult = ( output , context ) : DeleteInstanceEventWindowResult => { const contents = { InstanceEventWindowState : undefined , } ; if ( output [ "instanceEventWindowState" ] !== undefined ) { contents . InstanceEventWindowState = deserializeAws_ec2InstanceEventWindowStateChange ( output [ "instanceEventWindowState" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteIpamPoolResult = ( output , context ) : DeleteIpamPoolResult => { const contents = { IpamPool : undefined , } ; if ( output [ "ipamPool" ] !== undefined ) { contents . IpamPool = deserializeAws_ec2IpamPool ( output [ "ipamPool" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteIpamResult = ( output , context ) : DeleteIpamResult => { const contents = { Ipam : undefined , } ; if ( output [ "ipam" ] !== undefined ) { contents . Ipam = deserializeAws_ec2Ipam ( output [ "ipam" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteIpamScopeResult = ( output , context ) : DeleteIpamScopeResult => { const contents = { IpamScope : undefined , } ; if ( output [ "ipamScope" ] !== undefined ) { contents . IpamScope = deserializeAws_ec2IpamScope ( output [ "ipamScope" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteLaunchTemplateResult = ( output , context ) : DeleteLaunchTemplateResult => { const contents = { LaunchTemplate : undefined , } ; if ( output [ "launchTemplate" ] !== undefined ) { contents . LaunchTemplate = deserializeAws_ec2LaunchTemplate ( output [ "launchTemplate" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteLaunchTemplateVersionsResponseErrorItem = ( output , context ) : DeleteLaunchTemplateVersionsResponseErrorItem => { const contents = { LaunchTemplateId : undefined , LaunchTemplateName : undefined , VersionNumber : undefined , ResponseError : undefined , } ; if ( output [ "launchTemplateId" ] !== undefined ) { contents . LaunchTemplateId = __expectString ( output [ "launchTemplateId" ] ) ; } if ( output [ "launchTemplateName" ] !== undefined ) { contents . LaunchTemplateName = __expectString ( output [ "launchTemplateName" ] ) ; } if ( output [ "versionNumber" ] !== undefined ) { contents . VersionNumber = __strictParseLong ( output [ "versionNumber" ] ) as number ; } if ( output [ "responseError" ] !== undefined ) { contents . ResponseError = deserializeAws_ec2ResponseError ( output [ "responseError" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteLaunchTemplateVersionsResponseErrorSet = ( output , context ) : DeleteLaunchTemplateVersionsResponseErrorItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2DeleteLaunchTemplateVersionsResponseErrorItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2DeleteLaunchTemplateVersionsResponseSuccessItem = ( output , context ) : DeleteLaunchTemplateVersionsResponseSuccessItem => { const contents = { LaunchTemplateId : undefined , LaunchTemplateName : undefined , VersionNumber : undefined , } ; if ( output [ "launchTemplateId" ] !== undefined ) { contents . LaunchTemplateId = __expectString ( output [ "launchTemplateId" ] ) ; } if ( output [ "launchTemplateName" ] !== undefined ) { contents . LaunchTemplateName = __expectString ( output [ "launchTemplateName" ] ) ; } if ( output [ "versionNumber" ] !== undefined ) { contents . VersionNumber = __strictParseLong ( output [ "versionNumber" ] ) as number ; } return contents ; } ; const deserializeAws_ec2DeleteLaunchTemplateVersionsResponseSuccessSet = ( output , context ) : DeleteLaunchTemplateVersionsResponseSuccessItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2DeleteLaunchTemplateVersionsResponseSuccessItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2DeleteLaunchTemplateVersionsResult = ( output , context ) : DeleteLaunchTemplateVersionsResult => { const contents = { SuccessfullyDeletedLaunchTemplateVersions : undefined , UnsuccessfullyDeletedLaunchTemplateVersions : undefined , } ; if ( output . successfullyDeletedLaunchTemplateVersionSet === "" ) { contents . SuccessfullyDeletedLaunchTemplateVersions = [ ] ; } if ( output [ "successfullyDeletedLaunchTemplateVersionSet" ] !== undefined && output [ "successfullyDeletedLaunchTemplateVersionSet" ] [ "item" ] !== undefined ) { contents . SuccessfullyDeletedLaunchTemplateVersions = deserializeAws_ec2DeleteLaunchTemplateVersionsResponseSuccessSet ( __getArrayIfSingleItem ( output [ "successfullyDeletedLaunchTemplateVersionSet" ] [ "item" ] ) , context ) ; } if ( output . unsuccessfullyDeletedLaunchTemplateVersionSet === "" ) { contents . UnsuccessfullyDeletedLaunchTemplateVersions = [ ] ; } if ( output [ "unsuccessfullyDeletedLaunchTemplateVersionSet" ] !== undefined && output [ "unsuccessfullyDeletedLaunchTemplateVersionSet" ] [ "item" ] !== undefined ) { contents . UnsuccessfullyDeletedLaunchTemplateVersions = deserializeAws_ec2DeleteLaunchTemplateVersionsResponseErrorSet ( __getArrayIfSingleItem ( output [ "unsuccessfullyDeletedLaunchTemplateVersionSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteLocalGatewayRouteResult = ( output , context ) : DeleteLocalGatewayRouteResult => { const contents = { Route : undefined , } ; if ( output [ "route" ] !== undefined ) { contents . Route = deserializeAws_ec2LocalGatewayRoute ( output [ "route" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteLocalGatewayRouteTableVpcAssociationResult = ( output , context ) : DeleteLocalGatewayRouteTableVpcAssociationResult => { const contents = { LocalGatewayRouteTableVpcAssociation : undefined , } ; if ( output [ "localGatewayRouteTableVpcAssociation" ] !== undefined ) { contents . LocalGatewayRouteTableVpcAssociation = deserializeAws_ec2LocalGatewayRouteTableVpcAssociation ( output [ "localGatewayRouteTableVpcAssociation" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteManagedPrefixListResult = ( output , context ) : DeleteManagedPrefixListResult => { const contents = { PrefixList : undefined , } ; if ( output [ "prefixList" ] !== undefined ) { contents . PrefixList = deserializeAws_ec2ManagedPrefixList ( output [ "prefixList" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteNatGatewayResult = ( output , context ) : DeleteNatGatewayResult => { const contents = { NatGatewayId : undefined , } ; if ( output [ "natGatewayId" ] !== undefined ) { contents . NatGatewayId = __expectString ( output [ "natGatewayId" ] ) ; } return contents ; } ; const deserializeAws_ec2DeleteNetworkInsightsAccessScopeAnalysisResult = ( output , context ) : DeleteNetworkInsightsAccessScopeAnalysisResult => { const contents = { NetworkInsightsAccessScopeAnalysisId : undefined , } ; if ( output [ "networkInsightsAccessScopeAnalysisId" ] !== undefined ) { contents . NetworkInsightsAccessScopeAnalysisId = __expectString ( output [ "networkInsightsAccessScopeAnalysisId" ] ) ; } return contents ; } ; const deserializeAws_ec2DeleteNetworkInsightsAccessScopeResult = ( output , context ) : DeleteNetworkInsightsAccessScopeResult => { const contents = { NetworkInsightsAccessScopeId : undefined , } ; if ( output [ "networkInsightsAccessScopeId" ] !== undefined ) { contents . NetworkInsightsAccessScopeId = __expectString ( output [ "networkInsightsAccessScopeId" ] ) ; } return contents ; } ; const deserializeAws_ec2DeleteNetworkInsightsAnalysisResult = ( output , context ) : DeleteNetworkInsightsAnalysisResult => { const contents = { NetworkInsightsAnalysisId : undefined , } ; if ( output [ "networkInsightsAnalysisId" ] !== undefined ) { contents . NetworkInsightsAnalysisId = __expectString ( output [ "networkInsightsAnalysisId" ] ) ; } return contents ; } ; const deserializeAws_ec2DeleteNetworkInsightsPathResult = ( output , context ) : DeleteNetworkInsightsPathResult => { const contents = { NetworkInsightsPathId : undefined , } ; if ( output [ "networkInsightsPathId" ] !== undefined ) { contents . NetworkInsightsPathId = __expectString ( output [ "networkInsightsPathId" ] ) ; } return contents ; } ; const deserializeAws_ec2DeleteNetworkInterfacePermissionResult = ( output , context ) : DeleteNetworkInterfacePermissionResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2DeletePublicIpv4PoolResult = ( output , context ) : DeletePublicIpv4PoolResult => { const contents = { ReturnValue : undefined , } ; if ( output [ "returnValue" ] !== undefined ) { contents . ReturnValue = __parseBoolean ( output [ "returnValue" ] ) ; } return contents ; } ; const deserializeAws_ec2DeleteQueuedReservedInstancesError = ( output , context ) : DeleteQueuedReservedInstancesError => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2DeleteQueuedReservedInstancesResult = ( output , context ) : DeleteQueuedReservedInstancesResult => { const contents = { SuccessfulQueuedPurchaseDeletions : undefined , FailedQueuedPurchaseDeletions : undefined , } ; if ( output . successfulQueuedPurchaseDeletionSet === "" ) { contents . SuccessfulQueuedPurchaseDeletions = [ ] ; } if ( output [ "successfulQueuedPurchaseDeletionSet" ] !== undefined && output [ "successfulQueuedPurchaseDeletionSet" ] [ "item" ] !== undefined ) { contents . SuccessfulQueuedPurchaseDeletions = deserializeAws_ec2SuccessfulQueuedPurchaseDeletionSet ( __getArrayIfSingleItem ( output [ "successfulQueuedPurchaseDeletionSet" ] [ "item" ] ) , context ) ; } if ( output . failedQueuedPurchaseDeletionSet === "" ) { contents . FailedQueuedPurchaseDeletions = [ ] ; } if ( output [ "failedQueuedPurchaseDeletionSet" ] !== undefined && output [ "failedQueuedPurchaseDeletionSet" ] [ "item" ] !== undefined ) { contents . FailedQueuedPurchaseDeletions = deserializeAws_ec2FailedQueuedPurchaseDeletionSet ( __getArrayIfSingleItem ( output [ "failedQueuedPurchaseDeletionSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteSubnetCidrReservationResult = ( output , context ) : DeleteSubnetCidrReservationResult => { const contents = { DeletedSubnetCidrReservation : undefined , } ; if ( output [ "deletedSubnetCidrReservation" ] !== undefined ) { contents . DeletedSubnetCidrReservation = deserializeAws_ec2SubnetCidrReservation ( output [ "deletedSubnetCidrReservation" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteTrafficMirrorFilterResult = ( output , context ) : DeleteTrafficMirrorFilterResult => { const contents = { TrafficMirrorFilterId : undefined , } ; if ( output [ "trafficMirrorFilterId" ] !== undefined ) { contents . TrafficMirrorFilterId = __expectString ( output [ "trafficMirrorFilterId" ] ) ; } return contents ; } ; const deserializeAws_ec2DeleteTrafficMirrorFilterRuleResult = ( output , context ) : DeleteTrafficMirrorFilterRuleResult => { const contents = { TrafficMirrorFilterRuleId : undefined , } ; if ( output [ "trafficMirrorFilterRuleId" ] !== undefined ) { contents . TrafficMirrorFilterRuleId = __expectString ( output [ "trafficMirrorFilterRuleId" ] ) ; } return contents ; } ; const deserializeAws_ec2DeleteTrafficMirrorSessionResult = ( output , context ) : DeleteTrafficMirrorSessionResult => { const contents = { TrafficMirrorSessionId : undefined , } ; if ( output [ "trafficMirrorSessionId" ] !== undefined ) { contents . TrafficMirrorSessionId = __expectString ( output [ "trafficMirrorSessionId" ] ) ; } return contents ; } ; const deserializeAws_ec2DeleteTrafficMirrorTargetResult = ( output , context ) : DeleteTrafficMirrorTargetResult => { const contents = { TrafficMirrorTargetId : undefined , } ; if ( output [ "trafficMirrorTargetId" ] !== undefined ) { contents . TrafficMirrorTargetId = __expectString ( output [ "trafficMirrorTargetId" ] ) ; } return contents ; } ; const deserializeAws_ec2DeleteTransitGatewayConnectPeerResult = ( output , context ) : DeleteTransitGatewayConnectPeerResult => { const contents = { TransitGatewayConnectPeer : undefined , } ; if ( output [ "transitGatewayConnectPeer" ] !== undefined ) { contents . TransitGatewayConnectPeer = deserializeAws_ec2TransitGatewayConnectPeer ( output [ "transitGatewayConnectPeer" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteTransitGatewayConnectResult = ( output , context ) : DeleteTransitGatewayConnectResult => { const contents = { TransitGatewayConnect : undefined , } ; if ( output [ "transitGatewayConnect" ] !== undefined ) { contents . TransitGatewayConnect = deserializeAws_ec2TransitGatewayConnect ( output [ "transitGatewayConnect" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteTransitGatewayMulticastDomainResult = ( output , context ) : DeleteTransitGatewayMulticastDomainResult => { const contents = { TransitGatewayMulticastDomain : undefined , } ; if ( output [ "transitGatewayMulticastDomain" ] !== undefined ) { contents . TransitGatewayMulticastDomain = deserializeAws_ec2TransitGatewayMulticastDomain ( output [ "transitGatewayMulticastDomain" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteTransitGatewayPeeringAttachmentResult = ( output , context ) : DeleteTransitGatewayPeeringAttachmentResult => { const contents = { TransitGatewayPeeringAttachment : undefined , } ; if ( output [ "transitGatewayPeeringAttachment" ] !== undefined ) { contents . TransitGatewayPeeringAttachment = deserializeAws_ec2TransitGatewayPeeringAttachment ( output [ "transitGatewayPeeringAttachment" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteTransitGatewayPrefixListReferenceResult = ( output , context ) : DeleteTransitGatewayPrefixListReferenceResult => { const contents = { TransitGatewayPrefixListReference : undefined , } ; if ( output [ "transitGatewayPrefixListReference" ] !== undefined ) { contents . TransitGatewayPrefixListReference = deserializeAws_ec2TransitGatewayPrefixListReference ( output [ "transitGatewayPrefixListReference" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteTransitGatewayResult = ( output , context ) : DeleteTransitGatewayResult => { const contents = { TransitGateway : undefined , } ; if ( output [ "transitGateway" ] !== undefined ) { contents . TransitGateway = deserializeAws_ec2TransitGateway ( output [ "transitGateway" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteTransitGatewayRouteResult = ( output , context ) : DeleteTransitGatewayRouteResult => { const contents = { Route : undefined , } ; if ( output [ "route" ] !== undefined ) { contents . Route = deserializeAws_ec2TransitGatewayRoute ( output [ "route" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteTransitGatewayRouteTableResult = ( output , context ) : DeleteTransitGatewayRouteTableResult => { const contents = { TransitGatewayRouteTable : undefined , } ; if ( output [ "transitGatewayRouteTable" ] !== undefined ) { contents . TransitGatewayRouteTable = deserializeAws_ec2TransitGatewayRouteTable ( output [ "transitGatewayRouteTable" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteTransitGatewayVpcAttachmentResult = ( output , context ) : DeleteTransitGatewayVpcAttachmentResult => { const contents = { TransitGatewayVpcAttachment : undefined , } ; if ( output [ "transitGatewayVpcAttachment" ] !== undefined ) { contents . TransitGatewayVpcAttachment = deserializeAws_ec2TransitGatewayVpcAttachment ( output [ "transitGatewayVpcAttachment" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteVpcEndpointConnectionNotificationsResult = ( output , context ) : DeleteVpcEndpointConnectionNotificationsResult => { const contents = { Unsuccessful : undefined , } ; if ( output . unsuccessful === "" ) { contents . Unsuccessful = [ ] ; } if ( output [ "unsuccessful" ] !== undefined && output [ "unsuccessful" ] [ "item" ] !== undefined ) { contents . Unsuccessful = deserializeAws_ec2UnsuccessfulItemSet ( __getArrayIfSingleItem ( output [ "unsuccessful" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteVpcEndpointServiceConfigurationsResult = ( output , context ) : DeleteVpcEndpointServiceConfigurationsResult => { const contents = { Unsuccessful : undefined , } ; if ( output . unsuccessful === "" ) { contents . Unsuccessful = [ ] ; } if ( output [ "unsuccessful" ] !== undefined && output [ "unsuccessful" ] [ "item" ] !== undefined ) { contents . Unsuccessful = deserializeAws_ec2UnsuccessfulItemSet ( __getArrayIfSingleItem ( output [ "unsuccessful" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteVpcEndpointsResult = ( output , context ) : DeleteVpcEndpointsResult => { const contents = { Unsuccessful : undefined , } ; if ( output . unsuccessful === "" ) { contents . Unsuccessful = [ ] ; } if ( output [ "unsuccessful" ] !== undefined && output [ "unsuccessful" ] [ "item" ] !== undefined ) { contents . Unsuccessful = deserializeAws_ec2UnsuccessfulItemSet ( __getArrayIfSingleItem ( output [ "unsuccessful" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DeleteVpcPeeringConnectionResult = ( output , context ) : DeleteVpcPeeringConnectionResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2DeprovisionByoipCidrResult = ( output , context ) : DeprovisionByoipCidrResult => { const contents = { ByoipCidr : undefined , } ; if ( output [ "byoipCidr" ] !== undefined ) { contents . ByoipCidr = deserializeAws_ec2ByoipCidr ( output [ "byoipCidr" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeprovisionedAddressSet = ( 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_ec2DeprovisionIpamPoolCidrResult = ( output , context ) : DeprovisionIpamPoolCidrResult => { const contents = { IpamPoolCidr : undefined , } ; if ( output [ "ipamPoolCidr" ] !== undefined ) { contents . IpamPoolCidr = deserializeAws_ec2IpamPoolCidr ( output [ "ipamPoolCidr" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeprovisionPublicIpv4PoolCidrResult = ( output , context ) : DeprovisionPublicIpv4PoolCidrResult => { const contents = { PoolId : undefined , DeprovisionedAddresses : undefined , } ; if ( output [ "poolId" ] !== undefined ) { contents . PoolId = __expectString ( output [ "poolId" ] ) ; } if ( output . deprovisionedAddressSet === "" ) { contents . DeprovisionedAddresses = [ ] ; } if ( output [ "deprovisionedAddressSet" ] !== undefined && output [ "deprovisionedAddressSet" ] [ "item" ] !== undefined ) { contents . DeprovisionedAddresses = deserializeAws_ec2DeprovisionedAddressSet ( __getArrayIfSingleItem ( output [ "deprovisionedAddressSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DeregisterInstanceEventNotificationAttributesResult = ( output , context ) : DeregisterInstanceEventNotificationAttributesResult => { const contents = { InstanceTagAttribute : undefined , } ; if ( output [ "instanceTagAttribute" ] !== undefined ) { contents . InstanceTagAttribute = deserializeAws_ec2InstanceTagNotificationAttribute ( output [ "instanceTagAttribute" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeregisterTransitGatewayMulticastGroupMembersResult = ( output , context ) : DeregisterTransitGatewayMulticastGroupMembersResult => { const contents = { DeregisteredMulticastGroupMembers : undefined , } ; if ( output [ "deregisteredMulticastGroupMembers" ] !== undefined ) { contents . DeregisteredMulticastGroupMembers = deserializeAws_ec2TransitGatewayMulticastDeregisteredGroupMembers ( output [ "deregisteredMulticastGroupMembers" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DeregisterTransitGatewayMulticastGroupSourcesResult = ( output , context ) : DeregisterTransitGatewayMulticastGroupSourcesResult => { const contents = { DeregisteredMulticastGroupSources : undefined , } ; if ( output [ "deregisteredMulticastGroupSources" ] !== undefined ) { contents . DeregisteredMulticastGroupSources = deserializeAws_ec2TransitGatewayMulticastDeregisteredGroupSources ( output [ "deregisteredMulticastGroupSources" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeAccountAttributesResult = ( output , context ) : DescribeAccountAttributesResult => { const contents = { AccountAttributes : undefined , } ; if ( output . accountAttributeSet === "" ) { contents . AccountAttributes = [ ] ; } if ( output [ "accountAttributeSet" ] !== undefined && output [ "accountAttributeSet" ] [ "item" ] !== undefined ) { contents . AccountAttributes = deserializeAws_ec2AccountAttributeList ( __getArrayIfSingleItem ( output [ "accountAttributeSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeAddressesAttributeResult = ( output , context ) : DescribeAddressesAttributeResult => { const contents = { Addresses : undefined , NextToken : undefined , } ; if ( output . addressSet === "" ) { contents . Addresses = [ ] ; } if ( output [ "addressSet" ] !== undefined && output [ "addressSet" ] [ "item" ] !== undefined ) { contents . Addresses = deserializeAws_ec2AddressSet ( __getArrayIfSingleItem ( output [ "addressSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeAddressesResult = ( output , context ) : DescribeAddressesResult => { const contents = { Addresses : undefined , } ; if ( output . addressesSet === "" ) { contents . Addresses = [ ] ; } if ( output [ "addressesSet" ] !== undefined && output [ "addressesSet" ] [ "item" ] !== undefined ) { contents . Addresses = deserializeAws_ec2AddressList ( __getArrayIfSingleItem ( output [ "addressesSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeAggregateIdFormatResult = ( output , context ) : DescribeAggregateIdFormatResult => { const contents = { UseLongIdsAggregated : undefined , Statuses : undefined , } ; if ( output [ "useLongIdsAggregated" ] !== undefined ) { contents . UseLongIdsAggregated = __parseBoolean ( output [ "useLongIdsAggregated" ] ) ; } if ( output . statusSet === "" ) { contents . Statuses = [ ] ; } if ( output [ "statusSet" ] !== undefined && output [ "statusSet" ] [ "item" ] !== undefined ) { contents . Statuses = deserializeAws_ec2IdFormatList ( __getArrayIfSingleItem ( output [ "statusSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeAvailabilityZonesResult = ( output , context ) : DescribeAvailabilityZonesResult => { const contents = { AvailabilityZones : undefined , } ; if ( output . availabilityZoneInfo === "" ) { contents . AvailabilityZones = [ ] ; } if ( output [ "availabilityZoneInfo" ] !== undefined && output [ "availabilityZoneInfo" ] [ "item" ] !== undefined ) { contents . AvailabilityZones = deserializeAws_ec2AvailabilityZoneList ( __getArrayIfSingleItem ( output [ "availabilityZoneInfo" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeBundleTasksResult = ( output , context ) : DescribeBundleTasksResult => { const contents = { BundleTasks : undefined , } ; if ( output . bundleInstanceTasksSet === "" ) { contents . BundleTasks = [ ] ; } if ( output [ "bundleInstanceTasksSet" ] !== undefined && output [ "bundleInstanceTasksSet" ] [ "item" ] !== undefined ) { contents . BundleTasks = deserializeAws_ec2BundleTaskList ( __getArrayIfSingleItem ( output [ "bundleInstanceTasksSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeByoipCidrsResult = ( output , context ) : DescribeByoipCidrsResult => { const contents = { ByoipCidrs : undefined , NextToken : undefined , } ; if ( output . byoipCidrSet === "" ) { contents . ByoipCidrs = [ ] ; } if ( output [ "byoipCidrSet" ] !== undefined && output [ "byoipCidrSet" ] [ "item" ] !== undefined ) { contents . ByoipCidrs = deserializeAws_ec2ByoipCidrSet ( __getArrayIfSingleItem ( output [ "byoipCidrSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeCapacityReservationFleetsResult = ( output , context ) : DescribeCapacityReservationFleetsResult => { const contents = { CapacityReservationFleets : undefined , NextToken : undefined , } ; if ( output . capacityReservationFleetSet === "" ) { contents . CapacityReservationFleets = [ ] ; } if ( output [ "capacityReservationFleetSet" ] !== undefined && output [ "capacityReservationFleetSet" ] [ "item" ] !== undefined ) { contents . CapacityReservationFleets = deserializeAws_ec2CapacityReservationFleetSet ( __getArrayIfSingleItem ( output [ "capacityReservationFleetSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeCapacityReservationsResult = ( output , context ) : DescribeCapacityReservationsResult => { const contents = { NextToken : undefined , CapacityReservations : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . capacityReservationSet === "" ) { contents . CapacityReservations = [ ] ; } if ( output [ "capacityReservationSet" ] !== undefined && output [ "capacityReservationSet" ] [ "item" ] !== undefined ) { contents . CapacityReservations = deserializeAws_ec2CapacityReservationSet ( __getArrayIfSingleItem ( output [ "capacityReservationSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeCarrierGatewaysResult = ( output , context ) : DescribeCarrierGatewaysResult => { const contents = { CarrierGateways : undefined , NextToken : undefined , } ; if ( output . carrierGatewaySet === "" ) { contents . CarrierGateways = [ ] ; } if ( output [ "carrierGatewaySet" ] !== undefined && output [ "carrierGatewaySet" ] [ "item" ] !== undefined ) { contents . CarrierGateways = deserializeAws_ec2CarrierGatewaySet ( __getArrayIfSingleItem ( output [ "carrierGatewaySet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeClassicLinkInstancesResult = ( output , context ) : DescribeClassicLinkInstancesResult => { const contents = { Instances : undefined , NextToken : undefined , } ; if ( output . instancesSet === "" ) { contents . Instances = [ ] ; } if ( output [ "instancesSet" ] !== undefined && output [ "instancesSet" ] [ "item" ] !== undefined ) { contents . Instances = deserializeAws_ec2ClassicLinkInstanceList ( __getArrayIfSingleItem ( output [ "instancesSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeClientVpnAuthorizationRulesResult = ( output , context ) : DescribeClientVpnAuthorizationRulesResult => { const contents = { AuthorizationRules : undefined , NextToken : undefined , } ; if ( output . authorizationRule === "" ) { contents . AuthorizationRules = [ ] ; } if ( output [ "authorizationRule" ] !== undefined && output [ "authorizationRule" ] [ "item" ] !== undefined ) { contents . AuthorizationRules = deserializeAws_ec2AuthorizationRuleSet ( __getArrayIfSingleItem ( output [ "authorizationRule" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeClientVpnConnectionsResult = ( output , context ) : DescribeClientVpnConnectionsResult => { const contents = { Connections : undefined , NextToken : undefined , } ; if ( output . connections === "" ) { contents . Connections = [ ] ; } if ( output [ "connections" ] !== undefined && output [ "connections" ] [ "item" ] !== undefined ) { contents . Connections = deserializeAws_ec2ClientVpnConnectionSet ( __getArrayIfSingleItem ( output [ "connections" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeClientVpnEndpointsResult = ( output , context ) : DescribeClientVpnEndpointsResult => { const contents = { ClientVpnEndpoints : undefined , NextToken : undefined , } ; if ( output . clientVpnEndpoint === "" ) { contents . ClientVpnEndpoints = [ ] ; } if ( output [ "clientVpnEndpoint" ] !== undefined && output [ "clientVpnEndpoint" ] [ "item" ] !== undefined ) { contents . ClientVpnEndpoints = deserializeAws_ec2EndpointSet ( __getArrayIfSingleItem ( output [ "clientVpnEndpoint" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeClientVpnRoutesResult = ( output , context ) : DescribeClientVpnRoutesResult => { const contents = { Routes : undefined , NextToken : undefined , } ; if ( output . routes === "" ) { contents . Routes = [ ] ; } if ( output [ "routes" ] !== undefined && output [ "routes" ] [ "item" ] !== undefined ) { contents . Routes = deserializeAws_ec2ClientVpnRouteSet ( __getArrayIfSingleItem ( output [ "routes" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeClientVpnTargetNetworksResult = ( output , context ) : DescribeClientVpnTargetNetworksResult => { const contents = { ClientVpnTargetNetworks : undefined , NextToken : undefined , } ; if ( output . clientVpnTargetNetworks === "" ) { contents . ClientVpnTargetNetworks = [ ] ; } if ( output [ "clientVpnTargetNetworks" ] !== undefined && output [ "clientVpnTargetNetworks" ] [ "item" ] !== undefined ) { contents . ClientVpnTargetNetworks = deserializeAws_ec2TargetNetworkSet ( __getArrayIfSingleItem ( output [ "clientVpnTargetNetworks" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeCoipPoolsResult = ( output , context ) : DescribeCoipPoolsResult => { const contents = { CoipPools : undefined , NextToken : undefined , } ; if ( output . coipPoolSet === "" ) { contents . CoipPools = [ ] ; } if ( output [ "coipPoolSet" ] !== undefined && output [ "coipPoolSet" ] [ "item" ] !== undefined ) { contents . CoipPools = deserializeAws_ec2CoipPoolSet ( __getArrayIfSingleItem ( output [ "coipPoolSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeConversionTaskList = ( output , context ) : ConversionTask [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ConversionTask ( entry , context ) ; } ) ; } ; const deserializeAws_ec2DescribeConversionTasksResult = ( output , context ) : DescribeConversionTasksResult => { const contents = { ConversionTasks : undefined , } ; if ( output . conversionTasks === "" ) { contents . ConversionTasks = [ ] ; } if ( output [ "conversionTasks" ] !== undefined && output [ "conversionTasks" ] [ "item" ] !== undefined ) { contents . ConversionTasks = deserializeAws_ec2DescribeConversionTaskList ( __getArrayIfSingleItem ( output [ "conversionTasks" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeCustomerGatewaysResult = ( output , context ) : DescribeCustomerGatewaysResult => { const contents = { CustomerGateways : undefined , } ; if ( output . customerGatewaySet === "" ) { contents . CustomerGateways = [ ] ; } if ( output [ "customerGatewaySet" ] !== undefined && output [ "customerGatewaySet" ] [ "item" ] !== undefined ) { contents . CustomerGateways = deserializeAws_ec2CustomerGatewayList ( __getArrayIfSingleItem ( output [ "customerGatewaySet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeDhcpOptionsResult = ( output , context ) : DescribeDhcpOptionsResult => { const contents = { DhcpOptions : undefined , NextToken : undefined , } ; if ( output . dhcpOptionsSet === "" ) { contents . DhcpOptions = [ ] ; } if ( output [ "dhcpOptionsSet" ] !== undefined && output [ "dhcpOptionsSet" ] [ "item" ] !== undefined ) { contents . DhcpOptions = deserializeAws_ec2DhcpOptionsList ( __getArrayIfSingleItem ( output [ "dhcpOptionsSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeEgressOnlyInternetGatewaysResult = ( output , context ) : DescribeEgressOnlyInternetGatewaysResult => { const contents = { EgressOnlyInternetGateways : undefined , NextToken : undefined , } ; if ( output . egressOnlyInternetGatewaySet === "" ) { contents . EgressOnlyInternetGateways = [ ] ; } if ( output [ "egressOnlyInternetGatewaySet" ] !== undefined && output [ "egressOnlyInternetGatewaySet" ] [ "item" ] !== undefined ) { contents . EgressOnlyInternetGateways = deserializeAws_ec2EgressOnlyInternetGatewayList ( __getArrayIfSingleItem ( output [ "egressOnlyInternetGatewaySet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeElasticGpusResult = ( output , context ) : DescribeElasticGpusResult => { const contents = { ElasticGpuSet : undefined , MaxResults : undefined , NextToken : undefined , } ; if ( output . elasticGpuSet === "" ) { contents . ElasticGpuSet = [ ] ; } if ( output [ "elasticGpuSet" ] !== undefined && output [ "elasticGpuSet" ] [ "item" ] !== undefined ) { contents . ElasticGpuSet = deserializeAws_ec2ElasticGpuSet ( __getArrayIfSingleItem ( output [ "elasticGpuSet" ] [ "item" ] ) , context ) ; } if ( output [ "maxResults" ] !== undefined ) { contents . MaxResults = __strictParseInt32 ( output [ "maxResults" ] ) as number ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeExportImageTasksResult = ( output , context ) : DescribeExportImageTasksResult => { const contents = { ExportImageTasks : undefined , NextToken : undefined , } ; if ( output . exportImageTaskSet === "" ) { contents . ExportImageTasks = [ ] ; } if ( output [ "exportImageTaskSet" ] !== undefined && output [ "exportImageTaskSet" ] [ "item" ] !== undefined ) { contents . ExportImageTasks = deserializeAws_ec2ExportImageTaskList ( __getArrayIfSingleItem ( output [ "exportImageTaskSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeExportTasksResult = ( output , context ) : DescribeExportTasksResult => { const contents = { ExportTasks : undefined , } ; if ( output . exportTaskSet === "" ) { contents . ExportTasks = [ ] ; } if ( output [ "exportTaskSet" ] !== undefined && output [ "exportTaskSet" ] [ "item" ] !== undefined ) { contents . ExportTasks = deserializeAws_ec2ExportTaskList ( __getArrayIfSingleItem ( output [ "exportTaskSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeFastSnapshotRestoresResult = ( output , context ) : DescribeFastSnapshotRestoresResult => { const contents = { FastSnapshotRestores : undefined , NextToken : undefined , } ; if ( output . fastSnapshotRestoreSet === "" ) { contents . FastSnapshotRestores = [ ] ; } if ( output [ "fastSnapshotRestoreSet" ] !== undefined && output [ "fastSnapshotRestoreSet" ] [ "item" ] !== undefined ) { contents . FastSnapshotRestores = deserializeAws_ec2DescribeFastSnapshotRestoreSuccessSet ( __getArrayIfSingleItem ( output [ "fastSnapshotRestoreSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeFastSnapshotRestoreSuccessItem = ( output , context ) : DescribeFastSnapshotRestoreSuccessItem => { const contents = { SnapshotId : undefined , AvailabilityZone : undefined , State : undefined , StateTransitionReason : undefined , OwnerId : undefined , OwnerAlias : undefined , EnablingTime : undefined , OptimizingTime : undefined , EnabledTime : undefined , DisablingTime : undefined , DisabledTime : undefined , } ; if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "stateTransitionReason" ] !== undefined ) { contents . StateTransitionReason = __expectString ( output [ "stateTransitionReason" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "ownerAlias" ] !== undefined ) { contents . OwnerAlias = __expectString ( output [ "ownerAlias" ] ) ; } if ( output [ "enablingTime" ] !== undefined ) { contents . EnablingTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "enablingTime" ] ) ) ; } if ( output [ "optimizingTime" ] !== undefined ) { contents . OptimizingTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "optimizingTime" ] ) ) ; } if ( output [ "enabledTime" ] !== undefined ) { contents . EnabledTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "enabledTime" ] ) ) ; } if ( output [ "disablingTime" ] !== undefined ) { contents . DisablingTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "disablingTime" ] ) ) ; } if ( output [ "disabledTime" ] !== undefined ) { contents . DisabledTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "disabledTime" ] ) ) ; } return contents ; } ; const deserializeAws_ec2DescribeFastSnapshotRestoreSuccessSet = ( output , context ) : DescribeFastSnapshotRestoreSuccessItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2DescribeFastSnapshotRestoreSuccessItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2DescribeFleetError = ( output , context ) : DescribeFleetError => { const contents = { LaunchTemplateAndOverrides : undefined , Lifecycle : undefined , ErrorCode : undefined , ErrorMessage : undefined , } ; if ( output [ "launchTemplateAndOverrides" ] !== undefined ) { contents . LaunchTemplateAndOverrides = deserializeAws_ec2LaunchTemplateAndOverridesResponse ( output [ "launchTemplateAndOverrides" ] , context ) ; } if ( output [ "lifecycle" ] !== undefined ) { contents . Lifecycle = __expectString ( output [ "lifecycle" ] ) ; } if ( output [ "errorCode" ] !== undefined ) { contents . ErrorCode = __expectString ( output [ "errorCode" ] ) ; } if ( output [ "errorMessage" ] !== undefined ) { contents . ErrorMessage = __expectString ( output [ "errorMessage" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeFleetHistoryResult = ( output , context ) : DescribeFleetHistoryResult => { const contents = { HistoryRecords : undefined , LastEvaluatedTime : undefined , NextToken : undefined , FleetId : undefined , StartTime : undefined , } ; if ( output . historyRecordSet === "" ) { contents . HistoryRecords = [ ] ; } if ( output [ "historyRecordSet" ] !== undefined && output [ "historyRecordSet" ] [ "item" ] !== undefined ) { contents . HistoryRecords = deserializeAws_ec2HistoryRecordSet ( __getArrayIfSingleItem ( output [ "historyRecordSet" ] [ "item" ] ) , context ) ; } if ( output [ "lastEvaluatedTime" ] !== undefined ) { contents . LastEvaluatedTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "lastEvaluatedTime" ] ) ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output [ "fleetId" ] !== undefined ) { contents . FleetId = __expectString ( output [ "fleetId" ] ) ; } if ( output [ "startTime" ] !== undefined ) { contents . StartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "startTime" ] ) ) ; } return contents ; } ; const deserializeAws_ec2DescribeFleetInstancesResult = ( output , context ) : DescribeFleetInstancesResult => { const contents = { ActiveInstances : undefined , NextToken : undefined , FleetId : undefined , } ; if ( output . activeInstanceSet === "" ) { contents . ActiveInstances = [ ] ; } if ( output [ "activeInstanceSet" ] !== undefined && output [ "activeInstanceSet" ] [ "item" ] !== undefined ) { contents . ActiveInstances = deserializeAws_ec2ActiveInstanceSet ( __getArrayIfSingleItem ( output [ "activeInstanceSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output [ "fleetId" ] !== undefined ) { contents . FleetId = __expectString ( output [ "fleetId" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeFleetsErrorSet = ( output , context ) : DescribeFleetError [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2DescribeFleetError ( entry , context ) ; } ) ; } ; const deserializeAws_ec2DescribeFleetsInstances = ( output , context ) : DescribeFleetsInstances => { const contents = { LaunchTemplateAndOverrides : undefined , Lifecycle : undefined , InstanceIds : undefined , InstanceType : undefined , Platform : undefined , } ; if ( output [ "launchTemplateAndOverrides" ] !== undefined ) { contents . LaunchTemplateAndOverrides = deserializeAws_ec2LaunchTemplateAndOverridesResponse ( output [ "launchTemplateAndOverrides" ] , context ) ; } if ( output [ "lifecycle" ] !== undefined ) { contents . Lifecycle = __expectString ( output [ "lifecycle" ] ) ; } if ( output . instanceIds === "" ) { contents . InstanceIds = [ ] ; } if ( output [ "instanceIds" ] !== undefined && output [ "instanceIds" ] [ "item" ] !== undefined ) { contents . InstanceIds = deserializeAws_ec2InstanceIdsSet ( __getArrayIfSingleItem ( output [ "instanceIds" ] [ "item" ] ) , context ) ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "platform" ] !== undefined ) { contents . Platform = __expectString ( output [ "platform" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeFleetsInstancesSet = ( output , context ) : DescribeFleetsInstances [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2DescribeFleetsInstances ( entry , context ) ; } ) ; } ; const deserializeAws_ec2DescribeFleetsResult = ( output , context ) : DescribeFleetsResult => { const contents = { NextToken : undefined , Fleets : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . fleetSet === "" ) { contents . Fleets = [ ] ; } if ( output [ "fleetSet" ] !== undefined && output [ "fleetSet" ] [ "item" ] !== undefined ) { contents . Fleets = deserializeAws_ec2FleetSet ( __getArrayIfSingleItem ( output [ "fleetSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeFlowLogsResult = ( output , context ) : DescribeFlowLogsResult => { const contents = { FlowLogs : undefined , NextToken : undefined , } ; if ( output . flowLogSet === "" ) { contents . FlowLogs = [ ] ; } if ( output [ "flowLogSet" ] !== undefined && output [ "flowLogSet" ] [ "item" ] !== undefined ) { contents . FlowLogs = deserializeAws_ec2FlowLogSet ( __getArrayIfSingleItem ( output [ "flowLogSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeFpgaImageAttributeResult = ( output , context ) : DescribeFpgaImageAttributeResult => { const contents = { FpgaImageAttribute : undefined , } ; if ( output [ "fpgaImageAttribute" ] !== undefined ) { contents . FpgaImageAttribute = deserializeAws_ec2FpgaImageAttribute ( output [ "fpgaImageAttribute" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeFpgaImagesResult = ( output , context ) : DescribeFpgaImagesResult => { const contents = { FpgaImages : undefined , NextToken : undefined , } ; if ( output . fpgaImageSet === "" ) { contents . FpgaImages = [ ] ; } if ( output [ "fpgaImageSet" ] !== undefined && output [ "fpgaImageSet" ] [ "item" ] !== undefined ) { contents . FpgaImages = deserializeAws_ec2FpgaImageList ( __getArrayIfSingleItem ( output [ "fpgaImageSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeHostReservationOfferingsResult = ( output , context ) : DescribeHostReservationOfferingsResult => { const contents = { NextToken : undefined , OfferingSet : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . offeringSet === "" ) { contents . OfferingSet = [ ] ; } if ( output [ "offeringSet" ] !== undefined && output [ "offeringSet" ] [ "item" ] !== undefined ) { contents . OfferingSet = deserializeAws_ec2HostOfferingSet ( __getArrayIfSingleItem ( output [ "offeringSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeHostReservationsResult = ( output , context ) : DescribeHostReservationsResult => { const contents = { HostReservationSet : undefined , NextToken : undefined , } ; if ( output . hostReservationSet === "" ) { contents . HostReservationSet = [ ] ; } if ( output [ "hostReservationSet" ] !== undefined && output [ "hostReservationSet" ] [ "item" ] !== undefined ) { contents . HostReservationSet = deserializeAws_ec2HostReservationSet ( __getArrayIfSingleItem ( output [ "hostReservationSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeHostsResult = ( output , context ) : DescribeHostsResult => { const contents = { Hosts : undefined , NextToken : undefined , } ; if ( output . hostSet === "" ) { contents . Hosts = [ ] ; } if ( output [ "hostSet" ] !== undefined && output [ "hostSet" ] [ "item" ] !== undefined ) { contents . Hosts = deserializeAws_ec2HostList ( __getArrayIfSingleItem ( output [ "hostSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeIamInstanceProfileAssociationsResult = ( output , context ) : DescribeIamInstanceProfileAssociationsResult => { const contents = { IamInstanceProfileAssociations : undefined , NextToken : undefined , } ; if ( output . iamInstanceProfileAssociationSet === "" ) { contents . IamInstanceProfileAssociations = [ ] ; } if ( output [ "iamInstanceProfileAssociationSet" ] !== undefined && output [ "iamInstanceProfileAssociationSet" ] [ "item" ] !== undefined ) { contents . IamInstanceProfileAssociations = deserializeAws_ec2IamInstanceProfileAssociationSet ( __getArrayIfSingleItem ( output [ "iamInstanceProfileAssociationSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeIdentityIdFormatResult = ( output , context ) : DescribeIdentityIdFormatResult => { const contents = { Statuses : undefined , } ; if ( output . statusSet === "" ) { contents . Statuses = [ ] ; } if ( output [ "statusSet" ] !== undefined && output [ "statusSet" ] [ "item" ] !== undefined ) { contents . Statuses = deserializeAws_ec2IdFormatList ( __getArrayIfSingleItem ( output [ "statusSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeIdFormatResult = ( output , context ) : DescribeIdFormatResult => { const contents = { Statuses : undefined , } ; if ( output . statusSet === "" ) { contents . Statuses = [ ] ; } if ( output [ "statusSet" ] !== undefined && output [ "statusSet" ] [ "item" ] !== undefined ) { contents . Statuses = deserializeAws_ec2IdFormatList ( __getArrayIfSingleItem ( output [ "statusSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeImagesResult = ( output , context ) : DescribeImagesResult => { const contents = { Images : undefined , } ; if ( output . imagesSet === "" ) { contents . Images = [ ] ; } if ( output [ "imagesSet" ] !== undefined && output [ "imagesSet" ] [ "item" ] !== undefined ) { contents . Images = deserializeAws_ec2ImageList ( __getArrayIfSingleItem ( output [ "imagesSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeImportImageTasksResult = ( output , context ) : DescribeImportImageTasksResult => { const contents = { ImportImageTasks : undefined , NextToken : undefined , } ; if ( output . importImageTaskSet === "" ) { contents . ImportImageTasks = [ ] ; } if ( output [ "importImageTaskSet" ] !== undefined && output [ "importImageTaskSet" ] [ "item" ] !== undefined ) { contents . ImportImageTasks = deserializeAws_ec2ImportImageTaskList ( __getArrayIfSingleItem ( output [ "importImageTaskSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeImportSnapshotTasksResult = ( output , context ) : DescribeImportSnapshotTasksResult => { const contents = { ImportSnapshotTasks : undefined , NextToken : undefined , } ; if ( output . importSnapshotTaskSet === "" ) { contents . ImportSnapshotTasks = [ ] ; } if ( output [ "importSnapshotTaskSet" ] !== undefined && output [ "importSnapshotTaskSet" ] [ "item" ] !== undefined ) { contents . ImportSnapshotTasks = deserializeAws_ec2ImportSnapshotTaskList ( __getArrayIfSingleItem ( output [ "importSnapshotTaskSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeInstanceCreditSpecificationsResult = ( output , context ) : DescribeInstanceCreditSpecificationsResult => { const contents = { InstanceCreditSpecifications : undefined , NextToken : undefined , } ; if ( output . instanceCreditSpecificationSet === "" ) { contents . InstanceCreditSpecifications = [ ] ; } if ( output [ "instanceCreditSpecificationSet" ] !== undefined && output [ "instanceCreditSpecificationSet" ] [ "item" ] !== undefined ) { contents . InstanceCreditSpecifications = deserializeAws_ec2InstanceCreditSpecificationList ( __getArrayIfSingleItem ( output [ "instanceCreditSpecificationSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeInstanceEventNotificationAttributesResult = ( output , context ) : DescribeInstanceEventNotificationAttributesResult => { const contents = { InstanceTagAttribute : undefined , } ; if ( output [ "instanceTagAttribute" ] !== undefined ) { contents . InstanceTagAttribute = deserializeAws_ec2InstanceTagNotificationAttribute ( output [ "instanceTagAttribute" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeInstanceEventWindowsResult = ( output , context ) : DescribeInstanceEventWindowsResult => { const contents = { InstanceEventWindows : undefined , NextToken : undefined , } ; if ( output . instanceEventWindowSet === "" ) { contents . InstanceEventWindows = [ ] ; } if ( output [ "instanceEventWindowSet" ] !== undefined && output [ "instanceEventWindowSet" ] [ "item" ] !== undefined ) { contents . InstanceEventWindows = deserializeAws_ec2InstanceEventWindowSet ( __getArrayIfSingleItem ( output [ "instanceEventWindowSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeInstancesResult = ( output , context ) : DescribeInstancesResult => { const contents = { Reservations : undefined , NextToken : undefined , } ; if ( output . reservationSet === "" ) { contents . Reservations = [ ] ; } if ( output [ "reservationSet" ] !== undefined && output [ "reservationSet" ] [ "item" ] !== undefined ) { contents . Reservations = deserializeAws_ec2ReservationList ( __getArrayIfSingleItem ( output [ "reservationSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeInstanceStatusResult = ( output , context ) : DescribeInstanceStatusResult => { const contents = { InstanceStatuses : undefined , NextToken : undefined , } ; if ( output . instanceStatusSet === "" ) { contents . InstanceStatuses = [ ] ; } if ( output [ "instanceStatusSet" ] !== undefined && output [ "instanceStatusSet" ] [ "item" ] !== undefined ) { contents . InstanceStatuses = deserializeAws_ec2InstanceStatusList ( __getArrayIfSingleItem ( output [ "instanceStatusSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeInstanceTypeOfferingsResult = ( output , context ) : DescribeInstanceTypeOfferingsResult => { const contents = { InstanceTypeOfferings : undefined , NextToken : undefined , } ; if ( output . instanceTypeOfferingSet === "" ) { contents . InstanceTypeOfferings = [ ] ; } if ( output [ "instanceTypeOfferingSet" ] !== undefined && output [ "instanceTypeOfferingSet" ] [ "item" ] !== undefined ) { contents . InstanceTypeOfferings = deserializeAws_ec2InstanceTypeOfferingsList ( __getArrayIfSingleItem ( output [ "instanceTypeOfferingSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeInstanceTypesResult = ( output , context ) : DescribeInstanceTypesResult => { const contents = { InstanceTypes : undefined , NextToken : undefined , } ; if ( output . instanceTypeSet === "" ) { contents . InstanceTypes = [ ] ; } if ( output [ "instanceTypeSet" ] !== undefined && output [ "instanceTypeSet" ] [ "item" ] !== undefined ) { contents . InstanceTypes = deserializeAws_ec2InstanceTypeInfoList ( __getArrayIfSingleItem ( output [ "instanceTypeSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeInternetGatewaysResult = ( output , context ) : DescribeInternetGatewaysResult => { const contents = { InternetGateways : undefined , NextToken : undefined , } ; if ( output . internetGatewaySet === "" ) { contents . InternetGateways = [ ] ; } if ( output [ "internetGatewaySet" ] !== undefined && output [ "internetGatewaySet" ] [ "item" ] !== undefined ) { contents . InternetGateways = deserializeAws_ec2InternetGatewayList ( __getArrayIfSingleItem ( output [ "internetGatewaySet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeIpamPoolsResult = ( output , context ) : DescribeIpamPoolsResult => { const contents = { NextToken : undefined , IpamPools : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . ipamPoolSet === "" ) { contents . IpamPools = [ ] ; } if ( output [ "ipamPoolSet" ] !== undefined && output [ "ipamPoolSet" ] [ "item" ] !== undefined ) { contents . IpamPools = deserializeAws_ec2IpamPoolSet ( __getArrayIfSingleItem ( output [ "ipamPoolSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeIpamScopesResult = ( output , context ) : DescribeIpamScopesResult => { const contents = { NextToken : undefined , IpamScopes : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . ipamScopeSet === "" ) { contents . IpamScopes = [ ] ; } if ( output [ "ipamScopeSet" ] !== undefined && output [ "ipamScopeSet" ] [ "item" ] !== undefined ) { contents . IpamScopes = deserializeAws_ec2IpamScopeSet ( __getArrayIfSingleItem ( output [ "ipamScopeSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeIpamsResult = ( output , context ) : DescribeIpamsResult => { const contents = { NextToken : undefined , Ipams : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . ipamSet === "" ) { contents . Ipams = [ ] ; } if ( output [ "ipamSet" ] !== undefined && output [ "ipamSet" ] [ "item" ] !== undefined ) { contents . Ipams = deserializeAws_ec2IpamSet ( __getArrayIfSingleItem ( output [ "ipamSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeIpv6PoolsResult = ( output , context ) : DescribeIpv6PoolsResult => { const contents = { Ipv6Pools : undefined , NextToken : undefined , } ; if ( output . ipv6PoolSet === "" ) { contents . Ipv6Pools = [ ] ; } if ( output [ "ipv6PoolSet" ] !== undefined && output [ "ipv6PoolSet" ] [ "item" ] !== undefined ) { contents . Ipv6Pools = deserializeAws_ec2Ipv6PoolSet ( __getArrayIfSingleItem ( output [ "ipv6PoolSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeKeyPairsResult = ( output , context ) : DescribeKeyPairsResult => { const contents = { KeyPairs : undefined , } ; if ( output . keySet === "" ) { contents . KeyPairs = [ ] ; } if ( output [ "keySet" ] !== undefined && output [ "keySet" ] [ "item" ] !== undefined ) { contents . KeyPairs = deserializeAws_ec2KeyPairList ( __getArrayIfSingleItem ( output [ "keySet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeLaunchTemplatesResult = ( output , context ) : DescribeLaunchTemplatesResult => { const contents = { LaunchTemplates : undefined , NextToken : undefined , } ; if ( output . launchTemplates === "" ) { contents . LaunchTemplates = [ ] ; } if ( output [ "launchTemplates" ] !== undefined && output [ "launchTemplates" ] [ "item" ] !== undefined ) { contents . LaunchTemplates = deserializeAws_ec2LaunchTemplateSet ( __getArrayIfSingleItem ( output [ "launchTemplates" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeLaunchTemplateVersionsResult = ( output , context ) : DescribeLaunchTemplateVersionsResult => { const contents = { LaunchTemplateVersions : undefined , NextToken : undefined , } ; if ( output . launchTemplateVersionSet === "" ) { contents . LaunchTemplateVersions = [ ] ; } if ( output [ "launchTemplateVersionSet" ] !== undefined && output [ "launchTemplateVersionSet" ] [ "item" ] !== undefined ) { contents . LaunchTemplateVersions = deserializeAws_ec2LaunchTemplateVersionSet ( __getArrayIfSingleItem ( output [ "launchTemplateVersionSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeLocalGatewayRouteTablesResult = ( output , context ) : DescribeLocalGatewayRouteTablesResult => { const contents = { LocalGatewayRouteTables : undefined , NextToken : undefined , } ; if ( output . localGatewayRouteTableSet === "" ) { contents . LocalGatewayRouteTables = [ ] ; } if ( output [ "localGatewayRouteTableSet" ] !== undefined && output [ "localGatewayRouteTableSet" ] [ "item" ] !== undefined ) { contents . LocalGatewayRouteTables = deserializeAws_ec2LocalGatewayRouteTableSet ( __getArrayIfSingleItem ( output [ "localGatewayRouteTableSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsResult = ( output , context ) : DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsResult => { const contents = { LocalGatewayRouteTableVirtualInterfaceGroupAssociations : undefined , NextToken : undefined , } ; if ( output . localGatewayRouteTableVirtualInterfaceGroupAssociationSet === "" ) { contents . LocalGatewayRouteTableVirtualInterfaceGroupAssociations = [ ] ; } if ( output [ "localGatewayRouteTableVirtualInterfaceGroupAssociationSet" ] !== undefined && output [ "localGatewayRouteTableVirtualInterfaceGroupAssociationSet" ] [ "item" ] !== undefined ) { contents . LocalGatewayRouteTableVirtualInterfaceGroupAssociations = deserializeAws_ec2LocalGatewayRouteTableVirtualInterfaceGroupAssociationSet ( __getArrayIfSingleItem ( output [ "localGatewayRouteTableVirtualInterfaceGroupAssociationSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeLocalGatewayRouteTableVpcAssociationsResult = ( output , context ) : DescribeLocalGatewayRouteTableVpcAssociationsResult => { const contents = { LocalGatewayRouteTableVpcAssociations : undefined , NextToken : undefined , } ; if ( output . localGatewayRouteTableVpcAssociationSet === "" ) { contents . LocalGatewayRouteTableVpcAssociations = [ ] ; } if ( output [ "localGatewayRouteTableVpcAssociationSet" ] !== undefined && output [ "localGatewayRouteTableVpcAssociationSet" ] [ "item" ] !== undefined ) { contents . LocalGatewayRouteTableVpcAssociations = deserializeAws_ec2LocalGatewayRouteTableVpcAssociationSet ( __getArrayIfSingleItem ( output [ "localGatewayRouteTableVpcAssociationSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeLocalGatewaysResult = ( output , context ) : DescribeLocalGatewaysResult => { const contents = { LocalGateways : undefined , NextToken : undefined , } ; if ( output . localGatewaySet === "" ) { contents . LocalGateways = [ ] ; } if ( output [ "localGatewaySet" ] !== undefined && output [ "localGatewaySet" ] [ "item" ] !== undefined ) { contents . LocalGateways = deserializeAws_ec2LocalGatewaySet ( __getArrayIfSingleItem ( output [ "localGatewaySet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeLocalGatewayVirtualInterfaceGroupsResult = ( output , context ) : DescribeLocalGatewayVirtualInterfaceGroupsResult => { const contents = { LocalGatewayVirtualInterfaceGroups : undefined , NextToken : undefined , } ; if ( output . localGatewayVirtualInterfaceGroupSet === "" ) { contents . LocalGatewayVirtualInterfaceGroups = [ ] ; } if ( output [ "localGatewayVirtualInterfaceGroupSet" ] !== undefined && output [ "localGatewayVirtualInterfaceGroupSet" ] [ "item" ] !== undefined ) { contents . LocalGatewayVirtualInterfaceGroups = deserializeAws_ec2LocalGatewayVirtualInterfaceGroupSet ( __getArrayIfSingleItem ( output [ "localGatewayVirtualInterfaceGroupSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeLocalGatewayVirtualInterfacesResult = ( output , context ) : DescribeLocalGatewayVirtualInterfacesResult => { const contents = { LocalGatewayVirtualInterfaces : undefined , NextToken : undefined , } ; if ( output . localGatewayVirtualInterfaceSet === "" ) { contents . LocalGatewayVirtualInterfaces = [ ] ; } if ( output [ "localGatewayVirtualInterfaceSet" ] !== undefined && output [ "localGatewayVirtualInterfaceSet" ] [ "item" ] !== undefined ) { contents . LocalGatewayVirtualInterfaces = deserializeAws_ec2LocalGatewayVirtualInterfaceSet ( __getArrayIfSingleItem ( output [ "localGatewayVirtualInterfaceSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeManagedPrefixListsResult = ( output , context ) : DescribeManagedPrefixListsResult => { const contents = { NextToken : undefined , PrefixLists : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . prefixListSet === "" ) { contents . PrefixLists = [ ] ; } if ( output [ "prefixListSet" ] !== undefined && output [ "prefixListSet" ] [ "item" ] !== undefined ) { contents . PrefixLists = deserializeAws_ec2ManagedPrefixListSet ( __getArrayIfSingleItem ( output [ "prefixListSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeMovingAddressesResult = ( output , context ) : DescribeMovingAddressesResult => { const contents = { MovingAddressStatuses : undefined , NextToken : undefined , } ; if ( output . movingAddressStatusSet === "" ) { contents . MovingAddressStatuses = [ ] ; } if ( output [ "movingAddressStatusSet" ] !== undefined && output [ "movingAddressStatusSet" ] [ "item" ] !== undefined ) { contents . MovingAddressStatuses = deserializeAws_ec2MovingAddressStatusSet ( __getArrayIfSingleItem ( output [ "movingAddressStatusSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeNatGatewaysResult = ( output , context ) : DescribeNatGatewaysResult => { const contents = { NatGateways : undefined , NextToken : undefined , } ; if ( output . natGatewaySet === "" ) { contents . NatGateways = [ ] ; } if ( output [ "natGatewaySet" ] !== undefined && output [ "natGatewaySet" ] [ "item" ] !== undefined ) { contents . NatGateways = deserializeAws_ec2NatGatewayList ( __getArrayIfSingleItem ( output [ "natGatewaySet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeNetworkAclsResult = ( output , context ) : DescribeNetworkAclsResult => { const contents = { NetworkAcls : undefined , NextToken : undefined , } ; if ( output . networkAclSet === "" ) { contents . NetworkAcls = [ ] ; } if ( output [ "networkAclSet" ] !== undefined && output [ "networkAclSet" ] [ "item" ] !== undefined ) { contents . NetworkAcls = deserializeAws_ec2NetworkAclList ( __getArrayIfSingleItem ( output [ "networkAclSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeNetworkInsightsAccessScopeAnalysesResult = ( output , context ) : DescribeNetworkInsightsAccessScopeAnalysesResult => { const contents = { NetworkInsightsAccessScopeAnalyses : undefined , NextToken : undefined , } ; if ( output . networkInsightsAccessScopeAnalysisSet === "" ) { contents . NetworkInsightsAccessScopeAnalyses = [ ] ; } if ( output [ "networkInsightsAccessScopeAnalysisSet" ] !== undefined && output [ "networkInsightsAccessScopeAnalysisSet" ] [ "item" ] !== undefined ) { contents . NetworkInsightsAccessScopeAnalyses = deserializeAws_ec2NetworkInsightsAccessScopeAnalysisList ( __getArrayIfSingleItem ( output [ "networkInsightsAccessScopeAnalysisSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeNetworkInsightsAccessScopesResult = ( output , context ) : DescribeNetworkInsightsAccessScopesResult => { const contents = { NetworkInsightsAccessScopes : undefined , NextToken : undefined , } ; if ( output . networkInsightsAccessScopeSet === "" ) { contents . NetworkInsightsAccessScopes = [ ] ; } if ( output [ "networkInsightsAccessScopeSet" ] !== undefined && output [ "networkInsightsAccessScopeSet" ] [ "item" ] !== undefined ) { contents . NetworkInsightsAccessScopes = deserializeAws_ec2NetworkInsightsAccessScopeList ( __getArrayIfSingleItem ( output [ "networkInsightsAccessScopeSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeNetworkInsightsAnalysesResult = ( output , context ) : DescribeNetworkInsightsAnalysesResult => { const contents = { NetworkInsightsAnalyses : undefined , NextToken : undefined , } ; if ( output . networkInsightsAnalysisSet === "" ) { contents . NetworkInsightsAnalyses = [ ] ; } if ( output [ "networkInsightsAnalysisSet" ] !== undefined && output [ "networkInsightsAnalysisSet" ] [ "item" ] !== undefined ) { contents . NetworkInsightsAnalyses = deserializeAws_ec2NetworkInsightsAnalysisList ( __getArrayIfSingleItem ( output [ "networkInsightsAnalysisSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeNetworkInsightsPathsResult = ( output , context ) : DescribeNetworkInsightsPathsResult => { const contents = { NetworkInsightsPaths : undefined , NextToken : undefined , } ; if ( output . networkInsightsPathSet === "" ) { contents . NetworkInsightsPaths = [ ] ; } if ( output [ "networkInsightsPathSet" ] !== undefined && output [ "networkInsightsPathSet" ] [ "item" ] !== undefined ) { contents . NetworkInsightsPaths = deserializeAws_ec2NetworkInsightsPathList ( __getArrayIfSingleItem ( output [ "networkInsightsPathSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeNetworkInterfaceAttributeResult = ( output , context ) : DescribeNetworkInterfaceAttributeResult => { const contents = { Attachment : undefined , Description : undefined , Groups : undefined , NetworkInterfaceId : undefined , SourceDestCheck : undefined , } ; if ( output [ "attachment" ] !== undefined ) { contents . Attachment = deserializeAws_ec2NetworkInterfaceAttachment ( output [ "attachment" ] , context ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = deserializeAws_ec2AttributeValue ( output [ "description" ] , context ) ; } if ( output . groupSet === "" ) { contents . Groups = [ ] ; } if ( output [ "groupSet" ] !== undefined && output [ "groupSet" ] [ "item" ] !== undefined ) { contents . Groups = deserializeAws_ec2GroupIdentifierList ( __getArrayIfSingleItem ( output [ "groupSet" ] [ "item" ] ) , context ) ; } if ( output [ "networkInterfaceId" ] !== undefined ) { contents . NetworkInterfaceId = __expectString ( output [ "networkInterfaceId" ] ) ; } if ( output [ "sourceDestCheck" ] !== undefined ) { contents . SourceDestCheck = deserializeAws_ec2AttributeBooleanValue ( output [ "sourceDestCheck" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeNetworkInterfacePermissionsResult = ( output , context ) : DescribeNetworkInterfacePermissionsResult => { const contents = { NetworkInterfacePermissions : undefined , NextToken : undefined , } ; if ( output . networkInterfacePermissions === "" ) { contents . NetworkInterfacePermissions = [ ] ; } if ( output [ "networkInterfacePermissions" ] !== undefined && output [ "networkInterfacePermissions" ] [ "item" ] !== undefined ) { contents . NetworkInterfacePermissions = deserializeAws_ec2NetworkInterfacePermissionList ( __getArrayIfSingleItem ( output [ "networkInterfacePermissions" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeNetworkInterfacesResult = ( output , context ) : DescribeNetworkInterfacesResult => { const contents = { NetworkInterfaces : undefined , NextToken : undefined , } ; if ( output . networkInterfaceSet === "" ) { contents . NetworkInterfaces = [ ] ; } if ( output [ "networkInterfaceSet" ] !== undefined && output [ "networkInterfaceSet" ] [ "item" ] !== undefined ) { contents . NetworkInterfaces = deserializeAws_ec2NetworkInterfaceList ( __getArrayIfSingleItem ( output [ "networkInterfaceSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribePlacementGroupsResult = ( output , context ) : DescribePlacementGroupsResult => { const contents = { PlacementGroups : undefined , } ; if ( output . placementGroupSet === "" ) { contents . PlacementGroups = [ ] ; } if ( output [ "placementGroupSet" ] !== undefined && output [ "placementGroupSet" ] [ "item" ] !== undefined ) { contents . PlacementGroups = deserializeAws_ec2PlacementGroupList ( __getArrayIfSingleItem ( output [ "placementGroupSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribePrefixListsResult = ( output , context ) : DescribePrefixListsResult => { const contents = { NextToken : undefined , PrefixLists : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . prefixListSet === "" ) { contents . PrefixLists = [ ] ; } if ( output [ "prefixListSet" ] !== undefined && output [ "prefixListSet" ] [ "item" ] !== undefined ) { contents . PrefixLists = deserializeAws_ec2PrefixListSet ( __getArrayIfSingleItem ( output [ "prefixListSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribePrincipalIdFormatResult = ( output , context ) : DescribePrincipalIdFormatResult => { const contents = { Principals : undefined , NextToken : undefined , } ; if ( output . principalSet === "" ) { contents . Principals = [ ] ; } if ( output [ "principalSet" ] !== undefined && output [ "principalSet" ] [ "item" ] !== undefined ) { contents . Principals = deserializeAws_ec2PrincipalIdFormatList ( __getArrayIfSingleItem ( output [ "principalSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribePublicIpv4PoolsResult = ( output , context ) : DescribePublicIpv4PoolsResult => { const contents = { PublicIpv4Pools : undefined , NextToken : undefined , } ; if ( output . publicIpv4PoolSet === "" ) { contents . PublicIpv4Pools = [ ] ; } if ( output [ "publicIpv4PoolSet" ] !== undefined && output [ "publicIpv4PoolSet" ] [ "item" ] !== undefined ) { contents . PublicIpv4Pools = deserializeAws_ec2PublicIpv4PoolSet ( __getArrayIfSingleItem ( output [ "publicIpv4PoolSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeRegionsResult = ( output , context ) : DescribeRegionsResult => { const contents = { Regions : undefined , } ; if ( output . regionInfo === "" ) { contents . Regions = [ ] ; } if ( output [ "regionInfo" ] !== undefined && output [ "regionInfo" ] [ "item" ] !== undefined ) { contents . Regions = deserializeAws_ec2RegionList ( __getArrayIfSingleItem ( output [ "regionInfo" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeReplaceRootVolumeTasksResult = ( output , context ) : DescribeReplaceRootVolumeTasksResult => { const contents = { ReplaceRootVolumeTasks : undefined , NextToken : undefined , } ; if ( output . replaceRootVolumeTaskSet === "" ) { contents . ReplaceRootVolumeTasks = [ ] ; } if ( output [ "replaceRootVolumeTaskSet" ] !== undefined && output [ "replaceRootVolumeTaskSet" ] [ "item" ] !== undefined ) { contents . ReplaceRootVolumeTasks = deserializeAws_ec2ReplaceRootVolumeTasks ( __getArrayIfSingleItem ( output [ "replaceRootVolumeTaskSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeReservedInstancesListingsResult = ( output , context ) : DescribeReservedInstancesListingsResult => { const contents = { ReservedInstancesListings : undefined , } ; if ( output . reservedInstancesListingsSet === "" ) { contents . ReservedInstancesListings = [ ] ; } if ( output [ "reservedInstancesListingsSet" ] !== undefined && output [ "reservedInstancesListingsSet" ] [ "item" ] !== undefined ) { contents . ReservedInstancesListings = deserializeAws_ec2ReservedInstancesListingList ( __getArrayIfSingleItem ( output [ "reservedInstancesListingsSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeReservedInstancesModificationsResult = ( output , context ) : DescribeReservedInstancesModificationsResult => { const contents = { NextToken : undefined , ReservedInstancesModifications : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . reservedInstancesModificationsSet === "" ) { contents . ReservedInstancesModifications = [ ] ; } if ( output [ "reservedInstancesModificationsSet" ] !== undefined && output [ "reservedInstancesModificationsSet" ] [ "item" ] !== undefined ) { contents . ReservedInstancesModifications = deserializeAws_ec2ReservedInstancesModificationList ( __getArrayIfSingleItem ( output [ "reservedInstancesModificationsSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeReservedInstancesOfferingsResult = ( output , context ) : DescribeReservedInstancesOfferingsResult => { const contents = { ReservedInstancesOfferings : undefined , NextToken : undefined , } ; if ( output . reservedInstancesOfferingsSet === "" ) { contents . ReservedInstancesOfferings = [ ] ; } if ( output [ "reservedInstancesOfferingsSet" ] !== undefined && output [ "reservedInstancesOfferingsSet" ] [ "item" ] !== undefined ) { contents . ReservedInstancesOfferings = deserializeAws_ec2ReservedInstancesOfferingList ( __getArrayIfSingleItem ( output [ "reservedInstancesOfferingsSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeReservedInstancesResult = ( output , context ) : DescribeReservedInstancesResult => { const contents = { ReservedInstances : undefined , } ; if ( output . reservedInstancesSet === "" ) { contents . ReservedInstances = [ ] ; } if ( output [ "reservedInstancesSet" ] !== undefined && output [ "reservedInstancesSet" ] [ "item" ] !== undefined ) { contents . ReservedInstances = deserializeAws_ec2ReservedInstancesList ( __getArrayIfSingleItem ( output [ "reservedInstancesSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeRouteTablesResult = ( output , context ) : DescribeRouteTablesResult => { const contents = { RouteTables : undefined , NextToken : undefined , } ; if ( output . routeTableSet === "" ) { contents . RouteTables = [ ] ; } if ( output [ "routeTableSet" ] !== undefined && output [ "routeTableSet" ] [ "item" ] !== undefined ) { contents . RouteTables = deserializeAws_ec2RouteTableList ( __getArrayIfSingleItem ( output [ "routeTableSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeScheduledInstanceAvailabilityResult = ( output , context ) : DescribeScheduledInstanceAvailabilityResult => { const contents = { NextToken : undefined , ScheduledInstanceAvailabilitySet : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . scheduledInstanceAvailabilitySet === "" ) { contents . ScheduledInstanceAvailabilitySet = [ ] ; } if ( output [ "scheduledInstanceAvailabilitySet" ] !== undefined && output [ "scheduledInstanceAvailabilitySet" ] [ "item" ] !== undefined ) { contents . ScheduledInstanceAvailabilitySet = deserializeAws_ec2ScheduledInstanceAvailabilitySet ( __getArrayIfSingleItem ( output [ "scheduledInstanceAvailabilitySet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeScheduledInstancesResult = ( output , context ) : DescribeScheduledInstancesResult => { const contents = { NextToken : undefined , ScheduledInstanceSet : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . scheduledInstanceSet === "" ) { contents . ScheduledInstanceSet = [ ] ; } if ( output [ "scheduledInstanceSet" ] !== undefined && output [ "scheduledInstanceSet" ] [ "item" ] !== undefined ) { contents . ScheduledInstanceSet = deserializeAws_ec2ScheduledInstanceSet ( __getArrayIfSingleItem ( output [ "scheduledInstanceSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeSecurityGroupReferencesResult = ( output , context ) : DescribeSecurityGroupReferencesResult => { const contents = { SecurityGroupReferenceSet : undefined , } ; if ( output . securityGroupReferenceSet === "" ) { contents . SecurityGroupReferenceSet = [ ] ; } if ( output [ "securityGroupReferenceSet" ] !== undefined && output [ "securityGroupReferenceSet" ] [ "item" ] !== undefined ) { contents . SecurityGroupReferenceSet = deserializeAws_ec2SecurityGroupReferences ( __getArrayIfSingleItem ( output [ "securityGroupReferenceSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeSecurityGroupRulesResult = ( output , context ) : DescribeSecurityGroupRulesResult => { const contents = { SecurityGroupRules : undefined , NextToken : undefined , } ; if ( output . securityGroupRuleSet === "" ) { contents . SecurityGroupRules = [ ] ; } if ( output [ "securityGroupRuleSet" ] !== undefined && output [ "securityGroupRuleSet" ] [ "item" ] !== undefined ) { contents . SecurityGroupRules = deserializeAws_ec2SecurityGroupRuleList ( __getArrayIfSingleItem ( output [ "securityGroupRuleSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeSecurityGroupsResult = ( output , context ) : DescribeSecurityGroupsResult => { const contents = { SecurityGroups : undefined , NextToken : undefined , } ; if ( output . securityGroupInfo === "" ) { contents . SecurityGroups = [ ] ; } if ( output [ "securityGroupInfo" ] !== undefined && output [ "securityGroupInfo" ] [ "item" ] !== undefined ) { contents . SecurityGroups = deserializeAws_ec2SecurityGroupList ( __getArrayIfSingleItem ( output [ "securityGroupInfo" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeSnapshotAttributeResult = ( output , context ) : DescribeSnapshotAttributeResult => { const contents = { CreateVolumePermissions : undefined , ProductCodes : undefined , SnapshotId : undefined , } ; if ( output . createVolumePermission === "" ) { contents . CreateVolumePermissions = [ ] ; } if ( output [ "createVolumePermission" ] !== undefined && output [ "createVolumePermission" ] [ "item" ] !== undefined ) { contents . CreateVolumePermissions = deserializeAws_ec2CreateVolumePermissionList ( __getArrayIfSingleItem ( output [ "createVolumePermission" ] [ "item" ] ) , context ) ; } if ( output . productCodes === "" ) { contents . ProductCodes = [ ] ; } if ( output [ "productCodes" ] !== undefined && output [ "productCodes" ] [ "item" ] !== undefined ) { contents . ProductCodes = deserializeAws_ec2ProductCodeList ( __getArrayIfSingleItem ( output [ "productCodes" ] [ "item" ] ) , context ) ; } if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeSnapshotsResult = ( output , context ) : DescribeSnapshotsResult => { const contents = { Snapshots : undefined , NextToken : undefined , } ; if ( output . snapshotSet === "" ) { contents . Snapshots = [ ] ; } if ( output [ "snapshotSet" ] !== undefined && output [ "snapshotSet" ] [ "item" ] !== undefined ) { contents . Snapshots = deserializeAws_ec2SnapshotList ( __getArrayIfSingleItem ( output [ "snapshotSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeSnapshotTierStatusResult = ( output , context ) : DescribeSnapshotTierStatusResult => { const contents = { SnapshotTierStatuses : undefined , NextToken : undefined , } ; if ( output . snapshotTierStatusSet === "" ) { contents . SnapshotTierStatuses = [ ] ; } if ( output [ "snapshotTierStatusSet" ] !== undefined && output [ "snapshotTierStatusSet" ] [ "item" ] !== undefined ) { contents . SnapshotTierStatuses = deserializeAws_ec2snapshotTierStatusSet ( __getArrayIfSingleItem ( output [ "snapshotTierStatusSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeSpotDatafeedSubscriptionResult = ( output , context ) : DescribeSpotDatafeedSubscriptionResult => { const contents = { SpotDatafeedSubscription : undefined , } ; if ( output [ "spotDatafeedSubscription" ] !== undefined ) { contents . SpotDatafeedSubscription = deserializeAws_ec2SpotDatafeedSubscription ( output [ "spotDatafeedSubscription" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeSpotFleetInstancesResponse = ( output , context ) : DescribeSpotFleetInstancesResponse => { const contents = { ActiveInstances : undefined , NextToken : undefined , SpotFleetRequestId : undefined , } ; if ( output . activeInstanceSet === "" ) { contents . ActiveInstances = [ ] ; } if ( output [ "activeInstanceSet" ] !== undefined && output [ "activeInstanceSet" ] [ "item" ] !== undefined ) { contents . ActiveInstances = deserializeAws_ec2ActiveInstanceSet ( __getArrayIfSingleItem ( output [ "activeInstanceSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output [ "spotFleetRequestId" ] !== undefined ) { contents . SpotFleetRequestId = __expectString ( output [ "spotFleetRequestId" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeSpotFleetRequestHistoryResponse = ( output , context ) : DescribeSpotFleetRequestHistoryResponse => { const contents = { HistoryRecords : undefined , LastEvaluatedTime : undefined , NextToken : undefined , SpotFleetRequestId : undefined , StartTime : undefined , } ; if ( output . historyRecordSet === "" ) { contents . HistoryRecords = [ ] ; } if ( output [ "historyRecordSet" ] !== undefined && output [ "historyRecordSet" ] [ "item" ] !== undefined ) { contents . HistoryRecords = deserializeAws_ec2HistoryRecords ( __getArrayIfSingleItem ( output [ "historyRecordSet" ] [ "item" ] ) , context ) ; } if ( output [ "lastEvaluatedTime" ] !== undefined ) { contents . LastEvaluatedTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "lastEvaluatedTime" ] ) ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output [ "spotFleetRequestId" ] !== undefined ) { contents . SpotFleetRequestId = __expectString ( output [ "spotFleetRequestId" ] ) ; } if ( output [ "startTime" ] !== undefined ) { contents . StartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "startTime" ] ) ) ; } return contents ; } ; const deserializeAws_ec2DescribeSpotFleetRequestsResponse = ( output , context ) : DescribeSpotFleetRequestsResponse => { const contents = { NextToken : undefined , SpotFleetRequestConfigs : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . spotFleetRequestConfigSet === "" ) { contents . SpotFleetRequestConfigs = [ ] ; } if ( output [ "spotFleetRequestConfigSet" ] !== undefined && output [ "spotFleetRequestConfigSet" ] [ "item" ] !== undefined ) { contents . SpotFleetRequestConfigs = deserializeAws_ec2SpotFleetRequestConfigSet ( __getArrayIfSingleItem ( output [ "spotFleetRequestConfigSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeSpotInstanceRequestsResult = ( output , context ) : DescribeSpotInstanceRequestsResult => { const contents = { SpotInstanceRequests : undefined , NextToken : undefined , } ; if ( output . spotInstanceRequestSet === "" ) { contents . SpotInstanceRequests = [ ] ; } if ( output [ "spotInstanceRequestSet" ] !== undefined && output [ "spotInstanceRequestSet" ] [ "item" ] !== undefined ) { contents . SpotInstanceRequests = deserializeAws_ec2SpotInstanceRequestList ( __getArrayIfSingleItem ( output [ "spotInstanceRequestSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeSpotPriceHistoryResult = ( output , context ) : DescribeSpotPriceHistoryResult => { const contents = { NextToken : undefined , SpotPriceHistory : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . spotPriceHistorySet === "" ) { contents . SpotPriceHistory = [ ] ; } if ( output [ "spotPriceHistorySet" ] !== undefined && output [ "spotPriceHistorySet" ] [ "item" ] !== undefined ) { contents . SpotPriceHistory = deserializeAws_ec2SpotPriceHistoryList ( __getArrayIfSingleItem ( output [ "spotPriceHistorySet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeStaleSecurityGroupsResult = ( output , context ) : DescribeStaleSecurityGroupsResult => { const contents = { NextToken : undefined , StaleSecurityGroupSet : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . staleSecurityGroupSet === "" ) { contents . StaleSecurityGroupSet = [ ] ; } if ( output [ "staleSecurityGroupSet" ] !== undefined && output [ "staleSecurityGroupSet" ] [ "item" ] !== undefined ) { contents . StaleSecurityGroupSet = deserializeAws_ec2StaleSecurityGroupSet ( __getArrayIfSingleItem ( output [ "staleSecurityGroupSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeStoreImageTasksResult = ( output , context ) : DescribeStoreImageTasksResult => { const contents = { StoreImageTaskResults : undefined , NextToken : undefined , } ; if ( output . storeImageTaskResultSet === "" ) { contents . StoreImageTaskResults = [ ] ; } if ( output [ "storeImageTaskResultSet" ] !== undefined && output [ "storeImageTaskResultSet" ] [ "item" ] !== undefined ) { contents . StoreImageTaskResults = deserializeAws_ec2StoreImageTaskResultSet ( __getArrayIfSingleItem ( output [ "storeImageTaskResultSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeSubnetsResult = ( output , context ) : DescribeSubnetsResult => { const contents = { Subnets : undefined , NextToken : undefined , } ; if ( output . subnetSet === "" ) { contents . Subnets = [ ] ; } if ( output [ "subnetSet" ] !== undefined && output [ "subnetSet" ] [ "item" ] !== undefined ) { contents . Subnets = deserializeAws_ec2SubnetList ( __getArrayIfSingleItem ( output [ "subnetSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeTagsResult = ( output , context ) : DescribeTagsResult => { const contents = { NextToken : undefined , Tags : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagDescriptionList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeTrafficMirrorFiltersResult = ( output , context ) : DescribeTrafficMirrorFiltersResult => { const contents = { TrafficMirrorFilters : undefined , NextToken : undefined , } ; if ( output . trafficMirrorFilterSet === "" ) { contents . TrafficMirrorFilters = [ ] ; } if ( output [ "trafficMirrorFilterSet" ] !== undefined && output [ "trafficMirrorFilterSet" ] [ "item" ] !== undefined ) { contents . TrafficMirrorFilters = deserializeAws_ec2TrafficMirrorFilterSet ( __getArrayIfSingleItem ( output [ "trafficMirrorFilterSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeTrafficMirrorSessionsResult = ( output , context ) : DescribeTrafficMirrorSessionsResult => { const contents = { TrafficMirrorSessions : undefined , NextToken : undefined , } ; if ( output . trafficMirrorSessionSet === "" ) { contents . TrafficMirrorSessions = [ ] ; } if ( output [ "trafficMirrorSessionSet" ] !== undefined && output [ "trafficMirrorSessionSet" ] [ "item" ] !== undefined ) { contents . TrafficMirrorSessions = deserializeAws_ec2TrafficMirrorSessionSet ( __getArrayIfSingleItem ( output [ "trafficMirrorSessionSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeTrafficMirrorTargetsResult = ( output , context ) : DescribeTrafficMirrorTargetsResult => { const contents = { TrafficMirrorTargets : undefined , NextToken : undefined , } ; if ( output . trafficMirrorTargetSet === "" ) { contents . TrafficMirrorTargets = [ ] ; } if ( output [ "trafficMirrorTargetSet" ] !== undefined && output [ "trafficMirrorTargetSet" ] [ "item" ] !== undefined ) { contents . TrafficMirrorTargets = deserializeAws_ec2TrafficMirrorTargetSet ( __getArrayIfSingleItem ( output [ "trafficMirrorTargetSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeTransitGatewayAttachmentsResult = ( output , context ) : DescribeTransitGatewayAttachmentsResult => { const contents = { TransitGatewayAttachments : undefined , NextToken : undefined , } ; if ( output . transitGatewayAttachments === "" ) { contents . TransitGatewayAttachments = [ ] ; } if ( output [ "transitGatewayAttachments" ] !== undefined && output [ "transitGatewayAttachments" ] [ "item" ] !== undefined ) { contents . TransitGatewayAttachments = deserializeAws_ec2TransitGatewayAttachmentList ( __getArrayIfSingleItem ( output [ "transitGatewayAttachments" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeTransitGatewayConnectPeersResult = ( output , context ) : DescribeTransitGatewayConnectPeersResult => { const contents = { TransitGatewayConnectPeers : undefined , NextToken : undefined , } ; if ( output . transitGatewayConnectPeerSet === "" ) { contents . TransitGatewayConnectPeers = [ ] ; } if ( output [ "transitGatewayConnectPeerSet" ] !== undefined && output [ "transitGatewayConnectPeerSet" ] [ "item" ] !== undefined ) { contents . TransitGatewayConnectPeers = deserializeAws_ec2TransitGatewayConnectPeerList ( __getArrayIfSingleItem ( output [ "transitGatewayConnectPeerSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeTransitGatewayConnectsResult = ( output , context ) : DescribeTransitGatewayConnectsResult => { const contents = { TransitGatewayConnects : undefined , NextToken : undefined , } ; if ( output . transitGatewayConnectSet === "" ) { contents . TransitGatewayConnects = [ ] ; } if ( output [ "transitGatewayConnectSet" ] !== undefined && output [ "transitGatewayConnectSet" ] [ "item" ] !== undefined ) { contents . TransitGatewayConnects = deserializeAws_ec2TransitGatewayConnectList ( __getArrayIfSingleItem ( output [ "transitGatewayConnectSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeTransitGatewayMulticastDomainsResult = ( output , context ) : DescribeTransitGatewayMulticastDomainsResult => { const contents = { TransitGatewayMulticastDomains : undefined , NextToken : undefined , } ; if ( output . transitGatewayMulticastDomains === "" ) { contents . TransitGatewayMulticastDomains = [ ] ; } if ( output [ "transitGatewayMulticastDomains" ] !== undefined && output [ "transitGatewayMulticastDomains" ] [ "item" ] !== undefined ) { contents . TransitGatewayMulticastDomains = deserializeAws_ec2TransitGatewayMulticastDomainList ( __getArrayIfSingleItem ( output [ "transitGatewayMulticastDomains" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeTransitGatewayPeeringAttachmentsResult = ( output , context ) : DescribeTransitGatewayPeeringAttachmentsResult => { const contents = { TransitGatewayPeeringAttachments : undefined , NextToken : undefined , } ; if ( output . transitGatewayPeeringAttachments === "" ) { contents . TransitGatewayPeeringAttachments = [ ] ; } if ( output [ "transitGatewayPeeringAttachments" ] !== undefined && output [ "transitGatewayPeeringAttachments" ] [ "item" ] !== undefined ) { contents . TransitGatewayPeeringAttachments = deserializeAws_ec2TransitGatewayPeeringAttachmentList ( __getArrayIfSingleItem ( output [ "transitGatewayPeeringAttachments" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeTransitGatewayRouteTablesResult = ( output , context ) : DescribeTransitGatewayRouteTablesResult => { const contents = { TransitGatewayRouteTables : undefined , NextToken : undefined , } ; if ( output . transitGatewayRouteTables === "" ) { contents . TransitGatewayRouteTables = [ ] ; } if ( output [ "transitGatewayRouteTables" ] !== undefined && output [ "transitGatewayRouteTables" ] [ "item" ] !== undefined ) { contents . TransitGatewayRouteTables = deserializeAws_ec2TransitGatewayRouteTableList ( __getArrayIfSingleItem ( output [ "transitGatewayRouteTables" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeTransitGatewaysResult = ( output , context ) : DescribeTransitGatewaysResult => { const contents = { TransitGateways : undefined , NextToken : undefined , } ; if ( output . transitGatewaySet === "" ) { contents . TransitGateways = [ ] ; } if ( output [ "transitGatewaySet" ] !== undefined && output [ "transitGatewaySet" ] [ "item" ] !== undefined ) { contents . TransitGateways = deserializeAws_ec2TransitGatewayList ( __getArrayIfSingleItem ( output [ "transitGatewaySet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeTransitGatewayVpcAttachmentsResult = ( output , context ) : DescribeTransitGatewayVpcAttachmentsResult => { const contents = { TransitGatewayVpcAttachments : undefined , NextToken : undefined , } ; if ( output . transitGatewayVpcAttachments === "" ) { contents . TransitGatewayVpcAttachments = [ ] ; } if ( output [ "transitGatewayVpcAttachments" ] !== undefined && output [ "transitGatewayVpcAttachments" ] [ "item" ] !== undefined ) { contents . TransitGatewayVpcAttachments = deserializeAws_ec2TransitGatewayVpcAttachmentList ( __getArrayIfSingleItem ( output [ "transitGatewayVpcAttachments" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeTrunkInterfaceAssociationsResult = ( output , context ) : DescribeTrunkInterfaceAssociationsResult => { const contents = { InterfaceAssociations : undefined , NextToken : undefined , } ; if ( output . interfaceAssociationSet === "" ) { contents . InterfaceAssociations = [ ] ; } if ( output [ "interfaceAssociationSet" ] !== undefined && output [ "interfaceAssociationSet" ] [ "item" ] !== undefined ) { contents . InterfaceAssociations = deserializeAws_ec2TrunkInterfaceAssociationList ( __getArrayIfSingleItem ( output [ "interfaceAssociationSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeVolumeAttributeResult = ( output , context ) : DescribeVolumeAttributeResult => { const contents = { AutoEnableIO : undefined , ProductCodes : undefined , VolumeId : undefined , } ; if ( output [ "autoEnableIO" ] !== undefined ) { contents . AutoEnableIO = deserializeAws_ec2AttributeBooleanValue ( output [ "autoEnableIO" ] , context ) ; } if ( output . productCodes === "" ) { contents . ProductCodes = [ ] ; } if ( output [ "productCodes" ] !== undefined && output [ "productCodes" ] [ "item" ] !== undefined ) { contents . ProductCodes = deserializeAws_ec2ProductCodeList ( __getArrayIfSingleItem ( output [ "productCodes" ] [ "item" ] ) , context ) ; } if ( output [ "volumeId" ] !== undefined ) { contents . VolumeId = __expectString ( output [ "volumeId" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeVolumesModificationsResult = ( output , context ) : DescribeVolumesModificationsResult => { const contents = { VolumesModifications : undefined , NextToken : undefined , } ; if ( output . volumeModificationSet === "" ) { contents . VolumesModifications = [ ] ; } if ( output [ "volumeModificationSet" ] !== undefined && output [ "volumeModificationSet" ] [ "item" ] !== undefined ) { contents . VolumesModifications = deserializeAws_ec2VolumeModificationList ( __getArrayIfSingleItem ( output [ "volumeModificationSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeVolumesResult = ( output , context ) : DescribeVolumesResult => { const contents = { Volumes : undefined , NextToken : undefined , } ; if ( output . volumeSet === "" ) { contents . Volumes = [ ] ; } if ( output [ "volumeSet" ] !== undefined && output [ "volumeSet" ] [ "item" ] !== undefined ) { contents . Volumes = deserializeAws_ec2VolumeList ( __getArrayIfSingleItem ( output [ "volumeSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeVolumeStatusResult = ( output , context ) : DescribeVolumeStatusResult => { const contents = { NextToken : undefined , VolumeStatuses : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . volumeStatusSet === "" ) { contents . VolumeStatuses = [ ] ; } if ( output [ "volumeStatusSet" ] !== undefined && output [ "volumeStatusSet" ] [ "item" ] !== undefined ) { contents . VolumeStatuses = deserializeAws_ec2VolumeStatusList ( __getArrayIfSingleItem ( output [ "volumeStatusSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeVpcAttributeResult = ( output , context ) : DescribeVpcAttributeResult => { const contents = { VpcId : undefined , EnableDnsHostnames : undefined , EnableDnsSupport : undefined , } ; if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "enableDnsHostnames" ] !== undefined ) { contents . EnableDnsHostnames = deserializeAws_ec2AttributeBooleanValue ( output [ "enableDnsHostnames" ] , context ) ; } if ( output [ "enableDnsSupport" ] !== undefined ) { contents . EnableDnsSupport = deserializeAws_ec2AttributeBooleanValue ( output [ "enableDnsSupport" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeVpcClassicLinkDnsSupportResult = ( output , context ) : DescribeVpcClassicLinkDnsSupportResult => { const contents = { NextToken : undefined , Vpcs : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . vpcs === "" ) { contents . Vpcs = [ ] ; } if ( output [ "vpcs" ] !== undefined && output [ "vpcs" ] [ "item" ] !== undefined ) { contents . Vpcs = deserializeAws_ec2ClassicLinkDnsSupportList ( __getArrayIfSingleItem ( output [ "vpcs" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeVpcClassicLinkResult = ( output , context ) : DescribeVpcClassicLinkResult => { const contents = { Vpcs : undefined , } ; if ( output . vpcSet === "" ) { contents . Vpcs = [ ] ; } if ( output [ "vpcSet" ] !== undefined && output [ "vpcSet" ] [ "item" ] !== undefined ) { contents . Vpcs = deserializeAws_ec2VpcClassicLinkList ( __getArrayIfSingleItem ( output [ "vpcSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeVpcEndpointConnectionNotificationsResult = ( output , context ) : DescribeVpcEndpointConnectionNotificationsResult => { const contents = { ConnectionNotificationSet : undefined , NextToken : undefined , } ; if ( output . connectionNotificationSet === "" ) { contents . ConnectionNotificationSet = [ ] ; } if ( output [ "connectionNotificationSet" ] !== undefined && output [ "connectionNotificationSet" ] [ "item" ] !== undefined ) { contents . ConnectionNotificationSet = deserializeAws_ec2ConnectionNotificationSet ( __getArrayIfSingleItem ( output [ "connectionNotificationSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeVpcEndpointConnectionsResult = ( output , context ) : DescribeVpcEndpointConnectionsResult => { const contents = { VpcEndpointConnections : undefined , NextToken : undefined , } ; if ( output . vpcEndpointConnectionSet === "" ) { contents . VpcEndpointConnections = [ ] ; } if ( output [ "vpcEndpointConnectionSet" ] !== undefined && output [ "vpcEndpointConnectionSet" ] [ "item" ] !== undefined ) { contents . VpcEndpointConnections = deserializeAws_ec2VpcEndpointConnectionSet ( __getArrayIfSingleItem ( output [ "vpcEndpointConnectionSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeVpcEndpointServiceConfigurationsResult = ( output , context ) : DescribeVpcEndpointServiceConfigurationsResult => { const contents = { ServiceConfigurations : undefined , NextToken : undefined , } ; if ( output . serviceConfigurationSet === "" ) { contents . ServiceConfigurations = [ ] ; } if ( output [ "serviceConfigurationSet" ] !== undefined && output [ "serviceConfigurationSet" ] [ "item" ] !== undefined ) { contents . ServiceConfigurations = deserializeAws_ec2ServiceConfigurationSet ( __getArrayIfSingleItem ( output [ "serviceConfigurationSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeVpcEndpointServicePermissionsResult = ( output , context ) : DescribeVpcEndpointServicePermissionsResult => { const contents = { AllowedPrincipals : undefined , NextToken : undefined , } ; if ( output . allowedPrincipals === "" ) { contents . AllowedPrincipals = [ ] ; } if ( output [ "allowedPrincipals" ] !== undefined && output [ "allowedPrincipals" ] [ "item" ] !== undefined ) { contents . AllowedPrincipals = deserializeAws_ec2AllowedPrincipalSet ( __getArrayIfSingleItem ( output [ "allowedPrincipals" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeVpcEndpointServicesResult = ( output , context ) : DescribeVpcEndpointServicesResult => { const contents = { ServiceNames : undefined , ServiceDetails : undefined , NextToken : undefined , } ; if ( output . serviceNameSet === "" ) { contents . ServiceNames = [ ] ; } if ( output [ "serviceNameSet" ] !== undefined && output [ "serviceNameSet" ] [ "item" ] !== undefined ) { contents . ServiceNames = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "serviceNameSet" ] [ "item" ] ) , context ) ; } if ( output . serviceDetailSet === "" ) { contents . ServiceDetails = [ ] ; } if ( output [ "serviceDetailSet" ] !== undefined && output [ "serviceDetailSet" ] [ "item" ] !== undefined ) { contents . ServiceDetails = deserializeAws_ec2ServiceDetailSet ( __getArrayIfSingleItem ( output [ "serviceDetailSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeVpcEndpointsResult = ( output , context ) : DescribeVpcEndpointsResult => { const contents = { VpcEndpoints : undefined , NextToken : undefined , } ; if ( output . vpcEndpointSet === "" ) { contents . VpcEndpoints = [ ] ; } if ( output [ "vpcEndpointSet" ] !== undefined && output [ "vpcEndpointSet" ] [ "item" ] !== undefined ) { contents . VpcEndpoints = deserializeAws_ec2VpcEndpointSet ( __getArrayIfSingleItem ( output [ "vpcEndpointSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeVpcPeeringConnectionsResult = ( output , context ) : DescribeVpcPeeringConnectionsResult => { const contents = { VpcPeeringConnections : undefined , NextToken : undefined , } ; if ( output . vpcPeeringConnectionSet === "" ) { contents . VpcPeeringConnections = [ ] ; } if ( output [ "vpcPeeringConnectionSet" ] !== undefined && output [ "vpcPeeringConnectionSet" ] [ "item" ] !== undefined ) { contents . VpcPeeringConnections = deserializeAws_ec2VpcPeeringConnectionList ( __getArrayIfSingleItem ( output [ "vpcPeeringConnectionSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeVpcsResult = ( output , context ) : DescribeVpcsResult => { const contents = { Vpcs : undefined , NextToken : undefined , } ; if ( output . vpcSet === "" ) { contents . Vpcs = [ ] ; } if ( output [ "vpcSet" ] !== undefined && output [ "vpcSet" ] [ "item" ] !== undefined ) { contents . Vpcs = deserializeAws_ec2VpcList ( __getArrayIfSingleItem ( output [ "vpcSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DescribeVpnConnectionsResult = ( output , context ) : DescribeVpnConnectionsResult => { const contents = { VpnConnections : undefined , } ; if ( output . vpnConnectionSet === "" ) { contents . VpnConnections = [ ] ; } if ( output [ "vpnConnectionSet" ] !== undefined && output [ "vpnConnectionSet" ] [ "item" ] !== undefined ) { contents . VpnConnections = deserializeAws_ec2VpnConnectionList ( __getArrayIfSingleItem ( output [ "vpnConnectionSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DescribeVpnGatewaysResult = ( output , context ) : DescribeVpnGatewaysResult => { const contents = { VpnGateways : undefined , } ; if ( output . vpnGatewaySet === "" ) { contents . VpnGateways = [ ] ; } if ( output [ "vpnGatewaySet" ] !== undefined && output [ "vpnGatewaySet" ] [ "item" ] !== undefined ) { contents . VpnGateways = deserializeAws_ec2VpnGatewayList ( __getArrayIfSingleItem ( output [ "vpnGatewaySet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DestinationOptionsResponse = ( output , context ) : DestinationOptionsResponse => { const contents = { FileFormat : undefined , HiveCompatiblePartitions : undefined , PerHourPartition : undefined , } ; if ( output [ "fileFormat" ] !== undefined ) { contents . FileFormat = __expectString ( output [ "fileFormat" ] ) ; } if ( output [ "hiveCompatiblePartitions" ] !== undefined ) { contents . HiveCompatiblePartitions = __parseBoolean ( output [ "hiveCompatiblePartitions" ] ) ; } if ( output [ "perHourPartition" ] !== undefined ) { contents . PerHourPartition = __parseBoolean ( output [ "perHourPartition" ] ) ; } return contents ; } ; const deserializeAws_ec2DetachClassicLinkVpcResult = ( output , context ) : DetachClassicLinkVpcResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2DhcpConfiguration = ( output , context ) : DhcpConfiguration => { const contents = { Key : undefined , Values : undefined , } ; if ( output [ "key" ] !== undefined ) { contents . Key = __expectString ( output [ "key" ] ) ; } if ( output . valueSet === "" ) { contents . Values = [ ] ; } if ( output [ "valueSet" ] !== undefined && output [ "valueSet" ] [ "item" ] !== undefined ) { contents . Values = deserializeAws_ec2DhcpConfigurationValueList ( __getArrayIfSingleItem ( output [ "valueSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DhcpConfigurationList = ( output , context ) : DhcpConfiguration [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2DhcpConfiguration ( entry , context ) ; } ) ; } ; const deserializeAws_ec2DhcpConfigurationValueList = ( output , context ) : AttributeValue [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2AttributeValue ( entry , context ) ; } ) ; } ; const deserializeAws_ec2DhcpOptions = ( output , context ) : DhcpOptions => { const contents = { DhcpConfigurations : undefined , DhcpOptionsId : undefined , OwnerId : undefined , Tags : undefined , } ; if ( output . dhcpConfigurationSet === "" ) { contents . DhcpConfigurations = [ ] ; } if ( output [ "dhcpConfigurationSet" ] !== undefined && output [ "dhcpConfigurationSet" ] [ "item" ] !== undefined ) { contents . DhcpConfigurations = deserializeAws_ec2DhcpConfigurationList ( __getArrayIfSingleItem ( output [ "dhcpConfigurationSet" ] [ "item" ] ) , context ) ; } if ( output [ "dhcpOptionsId" ] !== undefined ) { contents . DhcpOptionsId = __expectString ( output [ "dhcpOptionsId" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DhcpOptionsList = ( output , context ) : DhcpOptions [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2DhcpOptions ( entry , context ) ; } ) ; } ; const deserializeAws_ec2DirectoryServiceAuthentication = ( output , context ) : DirectoryServiceAuthentication => { const contents = { DirectoryId : undefined , } ; if ( output [ "directoryId" ] !== undefined ) { contents . DirectoryId = __expectString ( output [ "directoryId" ] ) ; } return contents ; } ; const deserializeAws_ec2DisableEbsEncryptionByDefaultResult = ( output , context ) : DisableEbsEncryptionByDefaultResult => { const contents = { EbsEncryptionByDefault : undefined , } ; if ( output [ "ebsEncryptionByDefault" ] !== undefined ) { contents . EbsEncryptionByDefault = __parseBoolean ( output [ "ebsEncryptionByDefault" ] ) ; } return contents ; } ; const deserializeAws_ec2DisableFastSnapshotRestoreErrorItem = ( output , context ) : DisableFastSnapshotRestoreErrorItem => { const contents = { SnapshotId : undefined , FastSnapshotRestoreStateErrors : undefined , } ; if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output . fastSnapshotRestoreStateErrorSet === "" ) { contents . FastSnapshotRestoreStateErrors = [ ] ; } if ( output [ "fastSnapshotRestoreStateErrorSet" ] !== undefined && output [ "fastSnapshotRestoreStateErrorSet" ] [ "item" ] !== undefined ) { contents . FastSnapshotRestoreStateErrors = deserializeAws_ec2DisableFastSnapshotRestoreStateErrorSet ( __getArrayIfSingleItem ( output [ "fastSnapshotRestoreStateErrorSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DisableFastSnapshotRestoreErrorSet = ( output , context ) : DisableFastSnapshotRestoreErrorItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2DisableFastSnapshotRestoreErrorItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2DisableFastSnapshotRestoresResult = ( output , context ) : DisableFastSnapshotRestoresResult => { const contents = { Successful : undefined , Unsuccessful : undefined , } ; if ( output . successful === "" ) { contents . Successful = [ ] ; } if ( output [ "successful" ] !== undefined && output [ "successful" ] [ "item" ] !== undefined ) { contents . Successful = deserializeAws_ec2DisableFastSnapshotRestoreSuccessSet ( __getArrayIfSingleItem ( output [ "successful" ] [ "item" ] ) , context ) ; } if ( output . unsuccessful === "" ) { contents . Unsuccessful = [ ] ; } if ( output [ "unsuccessful" ] !== undefined && output [ "unsuccessful" ] [ "item" ] !== undefined ) { contents . Unsuccessful = deserializeAws_ec2DisableFastSnapshotRestoreErrorSet ( __getArrayIfSingleItem ( output [ "unsuccessful" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2DisableFastSnapshotRestoreStateError = ( output , context ) : DisableFastSnapshotRestoreStateError => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2DisableFastSnapshotRestoreStateErrorItem = ( output , context ) : DisableFastSnapshotRestoreStateErrorItem => { const contents = { AvailabilityZone : undefined , Error : undefined , } ; if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "error" ] !== undefined ) { contents . Error = deserializeAws_ec2DisableFastSnapshotRestoreStateError ( output [ "error" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DisableFastSnapshotRestoreStateErrorSet = ( output , context ) : DisableFastSnapshotRestoreStateErrorItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2DisableFastSnapshotRestoreStateErrorItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2DisableFastSnapshotRestoreSuccessItem = ( output , context ) : DisableFastSnapshotRestoreSuccessItem => { const contents = { SnapshotId : undefined , AvailabilityZone : undefined , State : undefined , StateTransitionReason : undefined , OwnerId : undefined , OwnerAlias : undefined , EnablingTime : undefined , OptimizingTime : undefined , EnabledTime : undefined , DisablingTime : undefined , DisabledTime : undefined , } ; if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "stateTransitionReason" ] !== undefined ) { contents . StateTransitionReason = __expectString ( output [ "stateTransitionReason" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "ownerAlias" ] !== undefined ) { contents . OwnerAlias = __expectString ( output [ "ownerAlias" ] ) ; } if ( output [ "enablingTime" ] !== undefined ) { contents . EnablingTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "enablingTime" ] ) ) ; } if ( output [ "optimizingTime" ] !== undefined ) { contents . OptimizingTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "optimizingTime" ] ) ) ; } if ( output [ "enabledTime" ] !== undefined ) { contents . EnabledTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "enabledTime" ] ) ) ; } if ( output [ "disablingTime" ] !== undefined ) { contents . DisablingTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "disablingTime" ] ) ) ; } if ( output [ "disabledTime" ] !== undefined ) { contents . DisabledTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "disabledTime" ] ) ) ; } return contents ; } ; const deserializeAws_ec2DisableFastSnapshotRestoreSuccessSet = ( output , context ) : DisableFastSnapshotRestoreSuccessItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2DisableFastSnapshotRestoreSuccessItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2DisableImageDeprecationResult = ( output , context ) : DisableImageDeprecationResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2DisableIpamOrganizationAdminAccountResult = ( output , context ) : DisableIpamOrganizationAdminAccountResult => { const contents = { Success : undefined , } ; if ( output [ "success" ] !== undefined ) { contents . Success = __parseBoolean ( output [ "success" ] ) ; } return contents ; } ; const deserializeAws_ec2DisableSerialConsoleAccessResult = ( output , context ) : DisableSerialConsoleAccessResult => { const contents = { SerialConsoleAccessEnabled : undefined , } ; if ( output [ "serialConsoleAccessEnabled" ] !== undefined ) { contents . SerialConsoleAccessEnabled = __parseBoolean ( output [ "serialConsoleAccessEnabled" ] ) ; } return contents ; } ; const deserializeAws_ec2DisableTransitGatewayRouteTablePropagationResult = ( output , context ) : DisableTransitGatewayRouteTablePropagationResult => { const contents = { Propagation : undefined , } ; if ( output [ "propagation" ] !== undefined ) { contents . Propagation = deserializeAws_ec2TransitGatewayPropagation ( output [ "propagation" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DisableVpcClassicLinkDnsSupportResult = ( output , context ) : DisableVpcClassicLinkDnsSupportResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2DisableVpcClassicLinkResult = ( output , context ) : DisableVpcClassicLinkResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2DisassociateClientVpnTargetNetworkResult = ( output , context ) : DisassociateClientVpnTargetNetworkResult => { const contents = { AssociationId : undefined , Status : undefined , } ; if ( output [ "associationId" ] !== undefined ) { contents . AssociationId = __expectString ( output [ "associationId" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2AssociationStatus ( output [ "status" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DisassociateEnclaveCertificateIamRoleResult = ( output , context ) : DisassociateEnclaveCertificateIamRoleResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2DisassociateIamInstanceProfileResult = ( output , context ) : DisassociateIamInstanceProfileResult => { const contents = { IamInstanceProfileAssociation : undefined , } ; if ( output [ "iamInstanceProfileAssociation" ] !== undefined ) { contents . IamInstanceProfileAssociation = deserializeAws_ec2IamInstanceProfileAssociation ( output [ "iamInstanceProfileAssociation" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DisassociateInstanceEventWindowResult = ( output , context ) : DisassociateInstanceEventWindowResult => { const contents = { InstanceEventWindow : undefined , } ; if ( output [ "instanceEventWindow" ] !== undefined ) { contents . InstanceEventWindow = deserializeAws_ec2InstanceEventWindow ( output [ "instanceEventWindow" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DisassociateSubnetCidrBlockResult = ( output , context ) : DisassociateSubnetCidrBlockResult => { const contents = { Ipv6CidrBlockAssociation : undefined , SubnetId : undefined , } ; if ( output [ "ipv6CidrBlockAssociation" ] !== undefined ) { contents . Ipv6CidrBlockAssociation = deserializeAws_ec2SubnetIpv6CidrBlockAssociation ( output [ "ipv6CidrBlockAssociation" ] , context ) ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } return contents ; } ; const deserializeAws_ec2DisassociateTransitGatewayMulticastDomainResult = ( output , context ) : DisassociateTransitGatewayMulticastDomainResult => { const contents = { Associations : undefined , } ; if ( output [ "associations" ] !== undefined ) { contents . Associations = deserializeAws_ec2TransitGatewayMulticastDomainAssociations ( output [ "associations" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DisassociateTransitGatewayRouteTableResult = ( output , context ) : DisassociateTransitGatewayRouteTableResult => { const contents = { Association : undefined , } ; if ( output [ "association" ] !== undefined ) { contents . Association = deserializeAws_ec2TransitGatewayAssociation ( output [ "association" ] , context ) ; } return contents ; } ; const deserializeAws_ec2DisassociateTrunkInterfaceResult = ( output , context ) : DisassociateTrunkInterfaceResult => { const contents = { Return : undefined , ClientToken : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } return contents ; } ; const deserializeAws_ec2DisassociateVpcCidrBlockResult = ( output , context ) : DisassociateVpcCidrBlockResult => { const contents = { Ipv6CidrBlockAssociation : undefined , CidrBlockAssociation : undefined , VpcId : undefined , } ; if ( output [ "ipv6CidrBlockAssociation" ] !== undefined ) { contents . Ipv6CidrBlockAssociation = deserializeAws_ec2VpcIpv6CidrBlockAssociation ( output [ "ipv6CidrBlockAssociation" ] , context ) ; } if ( output [ "cidrBlockAssociation" ] !== undefined ) { contents . CidrBlockAssociation = deserializeAws_ec2VpcCidrBlockAssociation ( output [ "cidrBlockAssociation" ] , context ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } return contents ; } ; const deserializeAws_ec2DiskImageDescription = ( output , context ) : DiskImageDescription => { const contents = { Checksum : undefined , Format : undefined , ImportManifestUrl : undefined , Size : undefined , } ; if ( output [ "checksum" ] !== undefined ) { contents . Checksum = __expectString ( output [ "checksum" ] ) ; } if ( output [ "format" ] !== undefined ) { contents . Format = __expectString ( output [ "format" ] ) ; } if ( output [ "importManifestUrl" ] !== undefined ) { contents . ImportManifestUrl = __expectString ( output [ "importManifestUrl" ] ) ; } if ( output [ "size" ] !== undefined ) { contents . Size = __strictParseLong ( output [ "size" ] ) as number ; } return contents ; } ; const deserializeAws_ec2DiskImageVolumeDescription = ( output , context ) : DiskImageVolumeDescription => { const contents = { Id : undefined , Size : undefined , } ; if ( output [ "id" ] !== undefined ) { contents . Id = __expectString ( output [ "id" ] ) ; } if ( output [ "size" ] !== undefined ) { contents . Size = __strictParseLong ( output [ "size" ] ) as number ; } return contents ; } ; const deserializeAws_ec2DiskInfo = ( output , context ) : DiskInfo => { const contents = { SizeInGB : undefined , Count : undefined , Type : undefined , } ; if ( output [ "sizeInGB" ] !== undefined ) { contents . SizeInGB = __strictParseLong ( output [ "sizeInGB" ] ) as number ; } if ( output [ "count" ] !== undefined ) { contents . Count = __strictParseInt32 ( output [ "count" ] ) as number ; } if ( output [ "type" ] !== undefined ) { contents . Type = __expectString ( output [ "type" ] ) ; } return contents ; } ; const deserializeAws_ec2DiskInfoList = ( output , context ) : DiskInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2DiskInfo ( entry , context ) ; } ) ; } ; const deserializeAws_ec2DnsEntry = ( output , context ) : DnsEntry => { const contents = { DnsName : undefined , HostedZoneId : undefined , } ; if ( output [ "dnsName" ] !== undefined ) { contents . DnsName = __expectString ( output [ "dnsName" ] ) ; } if ( output [ "hostedZoneId" ] !== undefined ) { contents . HostedZoneId = __expectString ( output [ "hostedZoneId" ] ) ; } return contents ; } ; const deserializeAws_ec2DnsEntrySet = ( output , context ) : DnsEntry [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2DnsEntry ( entry , context ) ; } ) ; } ; const deserializeAws_ec2EbsBlockDevice = ( output , context ) : EbsBlockDevice => { const contents = { DeleteOnTermination : undefined , Iops : undefined , SnapshotId : undefined , VolumeSize : undefined , VolumeType : undefined , KmsKeyId : undefined , Throughput : undefined , OutpostArn : undefined , Encrypted : undefined , } ; if ( output [ "deleteOnTermination" ] !== undefined ) { contents . DeleteOnTermination = __parseBoolean ( output [ "deleteOnTermination" ] ) ; } if ( output [ "iops" ] !== undefined ) { contents . Iops = __strictParseInt32 ( output [ "iops" ] ) as number ; } if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output [ "volumeSize" ] !== undefined ) { contents . VolumeSize = __strictParseInt32 ( output [ "volumeSize" ] ) as number ; } if ( output [ "volumeType" ] !== undefined ) { contents . VolumeType = __expectString ( output [ "volumeType" ] ) ; } if ( output [ "KmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "KmsKeyId" ] ) ; } if ( output [ "throughput" ] !== undefined ) { contents . Throughput = __strictParseInt32 ( output [ "throughput" ] ) as number ; } if ( output [ "outpostArn" ] !== undefined ) { contents . OutpostArn = __expectString ( output [ "outpostArn" ] ) ; } if ( output [ "encrypted" ] !== undefined ) { contents . Encrypted = __parseBoolean ( output [ "encrypted" ] ) ; } return contents ; } ; const deserializeAws_ec2EbsInfo = ( output , context ) : EbsInfo => { const contents = { EbsOptimizedSupport : undefined , EncryptionSupport : undefined , EbsOptimizedInfo : undefined , NvmeSupport : undefined , } ; if ( output [ "ebsOptimizedSupport" ] !== undefined ) { contents . EbsOptimizedSupport = __expectString ( output [ "ebsOptimizedSupport" ] ) ; } if ( output [ "encryptionSupport" ] !== undefined ) { contents . EncryptionSupport = __expectString ( output [ "encryptionSupport" ] ) ; } if ( output [ "ebsOptimizedInfo" ] !== undefined ) { contents . EbsOptimizedInfo = deserializeAws_ec2EbsOptimizedInfo ( output [ "ebsOptimizedInfo" ] , context ) ; } if ( output [ "nvmeSupport" ] !== undefined ) { contents . NvmeSupport = __expectString ( output [ "nvmeSupport" ] ) ; } return contents ; } ; const deserializeAws_ec2EbsInstanceBlockDevice = ( output , context ) : EbsInstanceBlockDevice => { const contents = { AttachTime : undefined , DeleteOnTermination : undefined , Status : undefined , VolumeId : undefined , } ; if ( output [ "attachTime" ] !== undefined ) { contents . AttachTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "attachTime" ] ) ) ; } if ( output [ "deleteOnTermination" ] !== undefined ) { contents . DeleteOnTermination = __parseBoolean ( output [ "deleteOnTermination" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "volumeId" ] !== undefined ) { contents . VolumeId = __expectString ( output [ "volumeId" ] ) ; } return contents ; } ; const deserializeAws_ec2EbsOptimizedInfo = ( output , context ) : EbsOptimizedInfo => { const contents = { BaselineBandwidthInMbps : undefined , BaselineThroughputInMBps : undefined , BaselineIops : undefined , MaximumBandwidthInMbps : undefined , MaximumThroughputInMBps : undefined , MaximumIops : undefined , } ; if ( output [ "baselineBandwidthInMbps" ] !== undefined ) { contents . BaselineBandwidthInMbps = __strictParseInt32 ( output [ "baselineBandwidthInMbps" ] ) as number ; } if ( output [ "baselineThroughputInMBps" ] !== undefined ) { contents . BaselineThroughputInMBps = __strictParseFloat ( output [ "baselineThroughputInMBps" ] ) as number ; } if ( output [ "baselineIops" ] !== undefined ) { contents . BaselineIops = __strictParseInt32 ( output [ "baselineIops" ] ) as number ; } if ( output [ "maximumBandwidthInMbps" ] !== undefined ) { contents . MaximumBandwidthInMbps = __strictParseInt32 ( output [ "maximumBandwidthInMbps" ] ) as number ; } if ( output [ "maximumThroughputInMBps" ] !== undefined ) { contents . MaximumThroughputInMBps = __strictParseFloat ( output [ "maximumThroughputInMBps" ] ) as number ; } if ( output [ "maximumIops" ] !== undefined ) { contents . MaximumIops = __strictParseInt32 ( output [ "maximumIops" ] ) as number ; } return contents ; } ; const deserializeAws_ec2EfaInfo = ( output , context ) : EfaInfo => { const contents = { MaximumEfaInterfaces : undefined , } ; if ( output [ "maximumEfaInterfaces" ] !== undefined ) { contents . MaximumEfaInterfaces = __strictParseInt32 ( output [ "maximumEfaInterfaces" ] ) as number ; } return contents ; } ; const deserializeAws_ec2EgressOnlyInternetGateway = ( output , context ) : EgressOnlyInternetGateway => { const contents = { Attachments : undefined , EgressOnlyInternetGatewayId : undefined , Tags : undefined , } ; if ( output . attachmentSet === "" ) { contents . Attachments = [ ] ; } if ( output [ "attachmentSet" ] !== undefined && output [ "attachmentSet" ] [ "item" ] !== undefined ) { contents . Attachments = deserializeAws_ec2InternetGatewayAttachmentList ( __getArrayIfSingleItem ( output [ "attachmentSet" ] [ "item" ] ) , context ) ; } if ( output [ "egressOnlyInternetGatewayId" ] !== undefined ) { contents . EgressOnlyInternetGatewayId = __expectString ( output [ "egressOnlyInternetGatewayId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2EgressOnlyInternetGatewayList = ( output , context ) : EgressOnlyInternetGateway [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2EgressOnlyInternetGateway ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ElasticGpuAssociation = ( output , context ) : ElasticGpuAssociation => { const contents = { ElasticGpuId : undefined , ElasticGpuAssociationId : undefined , ElasticGpuAssociationState : undefined , ElasticGpuAssociationTime : undefined , } ; if ( output [ "elasticGpuId" ] !== undefined ) { contents . ElasticGpuId = __expectString ( output [ "elasticGpuId" ] ) ; } if ( output [ "elasticGpuAssociationId" ] !== undefined ) { contents . ElasticGpuAssociationId = __expectString ( output [ "elasticGpuAssociationId" ] ) ; } if ( output [ "elasticGpuAssociationState" ] !== undefined ) { contents . ElasticGpuAssociationState = __expectString ( output [ "elasticGpuAssociationState" ] ) ; } if ( output [ "elasticGpuAssociationTime" ] !== undefined ) { contents . ElasticGpuAssociationTime = __expectString ( output [ "elasticGpuAssociationTime" ] ) ; } return contents ; } ; const deserializeAws_ec2ElasticGpuAssociationList = ( output , context ) : ElasticGpuAssociation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ElasticGpuAssociation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ElasticGpuHealth = ( output , context ) : ElasticGpuHealth => { const contents = { Status : undefined , } ; if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } return contents ; } ; const deserializeAws_ec2ElasticGpus = ( output , context ) : ElasticGpus => { const contents = { ElasticGpuId : undefined , AvailabilityZone : undefined , ElasticGpuType : undefined , ElasticGpuHealth : undefined , ElasticGpuState : undefined , InstanceId : undefined , Tags : undefined , } ; if ( output [ "elasticGpuId" ] !== undefined ) { contents . ElasticGpuId = __expectString ( output [ "elasticGpuId" ] ) ; } if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "elasticGpuType" ] !== undefined ) { contents . ElasticGpuType = __expectString ( output [ "elasticGpuType" ] ) ; } if ( output [ "elasticGpuHealth" ] !== undefined ) { contents . ElasticGpuHealth = deserializeAws_ec2ElasticGpuHealth ( output [ "elasticGpuHealth" ] , context ) ; } if ( output [ "elasticGpuState" ] !== undefined ) { contents . ElasticGpuState = __expectString ( output [ "elasticGpuState" ] ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ElasticGpuSet = ( output , context ) : ElasticGpus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ElasticGpus ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ElasticGpuSpecificationResponse = ( output , context ) : ElasticGpuSpecificationResponse => { const contents = { Type : undefined , } ; if ( output [ "type" ] !== undefined ) { contents . Type = __expectString ( output [ "type" ] ) ; } return contents ; } ; const deserializeAws_ec2ElasticGpuSpecificationResponseList = ( output , context ) : ElasticGpuSpecificationResponse [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ElasticGpuSpecificationResponse ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ElasticInferenceAcceleratorAssociation = ( output , context ) : ElasticInferenceAcceleratorAssociation => { const contents = { ElasticInferenceAcceleratorArn : undefined , ElasticInferenceAcceleratorAssociationId : undefined , ElasticInferenceAcceleratorAssociationState : undefined , ElasticInferenceAcceleratorAssociationTime : undefined , } ; if ( output [ "elasticInferenceAcceleratorArn" ] !== undefined ) { contents . ElasticInferenceAcceleratorArn = __expectString ( output [ "elasticInferenceAcceleratorArn" ] ) ; } if ( output [ "elasticInferenceAcceleratorAssociationId" ] !== undefined ) { contents . ElasticInferenceAcceleratorAssociationId = __expectString ( output [ "elasticInferenceAcceleratorAssociationId" ] ) ; } if ( output [ "elasticInferenceAcceleratorAssociationState" ] !== undefined ) { contents . ElasticInferenceAcceleratorAssociationState = __expectString ( output [ "elasticInferenceAcceleratorAssociationState" ] ) ; } if ( output [ "elasticInferenceAcceleratorAssociationTime" ] !== undefined ) { contents . ElasticInferenceAcceleratorAssociationTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "elasticInferenceAcceleratorAssociationTime" ] ) ) ; } return contents ; } ; const deserializeAws_ec2ElasticInferenceAcceleratorAssociationList = ( output , context ) : ElasticInferenceAcceleratorAssociation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ElasticInferenceAcceleratorAssociation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2EnableEbsEncryptionByDefaultResult = ( output , context ) : EnableEbsEncryptionByDefaultResult => { const contents = { EbsEncryptionByDefault : undefined , } ; if ( output [ "ebsEncryptionByDefault" ] !== undefined ) { contents . EbsEncryptionByDefault = __parseBoolean ( output [ "ebsEncryptionByDefault" ] ) ; } return contents ; } ; const deserializeAws_ec2EnableFastSnapshotRestoreErrorItem = ( output , context ) : EnableFastSnapshotRestoreErrorItem => { const contents = { SnapshotId : undefined , FastSnapshotRestoreStateErrors : undefined , } ; if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output . fastSnapshotRestoreStateErrorSet === "" ) { contents . FastSnapshotRestoreStateErrors = [ ] ; } if ( output [ "fastSnapshotRestoreStateErrorSet" ] !== undefined && output [ "fastSnapshotRestoreStateErrorSet" ] [ "item" ] !== undefined ) { contents . FastSnapshotRestoreStateErrors = deserializeAws_ec2EnableFastSnapshotRestoreStateErrorSet ( __getArrayIfSingleItem ( output [ "fastSnapshotRestoreStateErrorSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2EnableFastSnapshotRestoreErrorSet = ( output , context ) : EnableFastSnapshotRestoreErrorItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2EnableFastSnapshotRestoreErrorItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2EnableFastSnapshotRestoresResult = ( output , context ) : EnableFastSnapshotRestoresResult => { const contents = { Successful : undefined , Unsuccessful : undefined , } ; if ( output . successful === "" ) { contents . Successful = [ ] ; } if ( output [ "successful" ] !== undefined && output [ "successful" ] [ "item" ] !== undefined ) { contents . Successful = deserializeAws_ec2EnableFastSnapshotRestoreSuccessSet ( __getArrayIfSingleItem ( output [ "successful" ] [ "item" ] ) , context ) ; } if ( output . unsuccessful === "" ) { contents . Unsuccessful = [ ] ; } if ( output [ "unsuccessful" ] !== undefined && output [ "unsuccessful" ] [ "item" ] !== undefined ) { contents . Unsuccessful = deserializeAws_ec2EnableFastSnapshotRestoreErrorSet ( __getArrayIfSingleItem ( output [ "unsuccessful" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2EnableFastSnapshotRestoreStateError = ( output , context ) : EnableFastSnapshotRestoreStateError => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2EnableFastSnapshotRestoreStateErrorItem = ( output , context ) : EnableFastSnapshotRestoreStateErrorItem => { const contents = { AvailabilityZone : undefined , Error : undefined , } ; if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "error" ] !== undefined ) { contents . Error = deserializeAws_ec2EnableFastSnapshotRestoreStateError ( output [ "error" ] , context ) ; } return contents ; } ; const deserializeAws_ec2EnableFastSnapshotRestoreStateErrorSet = ( output , context ) : EnableFastSnapshotRestoreStateErrorItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2EnableFastSnapshotRestoreStateErrorItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2EnableFastSnapshotRestoreSuccessItem = ( output , context ) : EnableFastSnapshotRestoreSuccessItem => { const contents = { SnapshotId : undefined , AvailabilityZone : undefined , State : undefined , StateTransitionReason : undefined , OwnerId : undefined , OwnerAlias : undefined , EnablingTime : undefined , OptimizingTime : undefined , EnabledTime : undefined , DisablingTime : undefined , DisabledTime : undefined , } ; if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "stateTransitionReason" ] !== undefined ) { contents . StateTransitionReason = __expectString ( output [ "stateTransitionReason" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "ownerAlias" ] !== undefined ) { contents . OwnerAlias = __expectString ( output [ "ownerAlias" ] ) ; } if ( output [ "enablingTime" ] !== undefined ) { contents . EnablingTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "enablingTime" ] ) ) ; } if ( output [ "optimizingTime" ] !== undefined ) { contents . OptimizingTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "optimizingTime" ] ) ) ; } if ( output [ "enabledTime" ] !== undefined ) { contents . EnabledTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "enabledTime" ] ) ) ; } if ( output [ "disablingTime" ] !== undefined ) { contents . DisablingTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "disablingTime" ] ) ) ; } if ( output [ "disabledTime" ] !== undefined ) { contents . DisabledTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "disabledTime" ] ) ) ; } return contents ; } ; const deserializeAws_ec2EnableFastSnapshotRestoreSuccessSet = ( output , context ) : EnableFastSnapshotRestoreSuccessItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2EnableFastSnapshotRestoreSuccessItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2EnableImageDeprecationResult = ( output , context ) : EnableImageDeprecationResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2EnableIpamOrganizationAdminAccountResult = ( output , context ) : EnableIpamOrganizationAdminAccountResult => { const contents = { Success : undefined , } ; if ( output [ "success" ] !== undefined ) { contents . Success = __parseBoolean ( output [ "success" ] ) ; } return contents ; } ; const deserializeAws_ec2EnableSerialConsoleAccessResult = ( output , context ) : EnableSerialConsoleAccessResult => { const contents = { SerialConsoleAccessEnabled : undefined , } ; if ( output [ "serialConsoleAccessEnabled" ] !== undefined ) { contents . SerialConsoleAccessEnabled = __parseBoolean ( output [ "serialConsoleAccessEnabled" ] ) ; } return contents ; } ; const deserializeAws_ec2EnableTransitGatewayRouteTablePropagationResult = ( output , context ) : EnableTransitGatewayRouteTablePropagationResult => { const contents = { Propagation : undefined , } ; if ( output [ "propagation" ] !== undefined ) { contents . Propagation = deserializeAws_ec2TransitGatewayPropagation ( output [ "propagation" ] , context ) ; } return contents ; } ; const deserializeAws_ec2EnableVpcClassicLinkDnsSupportResult = ( output , context ) : EnableVpcClassicLinkDnsSupportResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2EnableVpcClassicLinkResult = ( output , context ) : EnableVpcClassicLinkResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2EnclaveOptions = ( output , context ) : EnclaveOptions => { const contents = { Enabled : undefined , } ; if ( output [ "enabled" ] !== undefined ) { contents . Enabled = __parseBoolean ( output [ "enabled" ] ) ; } return contents ; } ; const deserializeAws_ec2EndpointSet = ( output , context ) : ClientVpnEndpoint [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ClientVpnEndpoint ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ErrorSet = ( output , context ) : ValidationError [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ValidationError ( entry , context ) ; } ) ; } ; const deserializeAws_ec2EventInformation = ( output , context ) : EventInformation => { const contents = { EventDescription : undefined , EventSubType : undefined , InstanceId : undefined , } ; if ( output [ "eventDescription" ] !== undefined ) { contents . EventDescription = __expectString ( output [ "eventDescription" ] ) ; } if ( output [ "eventSubType" ] !== undefined ) { contents . EventSubType = __expectString ( output [ "eventSubType" ] ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } return contents ; } ; const deserializeAws_ec2ExcludedInstanceTypeSet = ( 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_ec2Explanation = ( output , context ) : Explanation => { const contents = { Acl : undefined , AclRule : undefined , Address : undefined , Addresses : undefined , AttachedTo : undefined , AvailabilityZones : undefined , Cidrs : undefined , Component : undefined , CustomerGateway : undefined , Destination : undefined , DestinationVpc : undefined , Direction : undefined , ExplanationCode : undefined , IngressRouteTable : undefined , InternetGateway : undefined , LoadBalancerArn : undefined , ClassicLoadBalancerListener : undefined , LoadBalancerListenerPort : undefined , LoadBalancerTarget : undefined , LoadBalancerTargetGroup : undefined , LoadBalancerTargetGroups : undefined , LoadBalancerTargetPort : undefined , ElasticLoadBalancerListener : undefined , MissingComponent : undefined , NatGateway : undefined , NetworkInterface : undefined , PacketField : undefined , VpcPeeringConnection : undefined , Port : undefined , PortRanges : undefined , PrefixList : undefined , Protocols : undefined , RouteTableRoute : undefined , RouteTable : undefined , SecurityGroup : undefined , SecurityGroupRule : undefined , SecurityGroups : undefined , SourceVpc : undefined , State : undefined , Subnet : undefined , SubnetRouteTable : undefined , Vpc : undefined , VpcEndpoint : undefined , VpnConnection : undefined , VpnGateway : undefined , } ; if ( output [ "acl" ] !== undefined ) { contents . Acl = deserializeAws_ec2AnalysisComponent ( output [ "acl" ] , context ) ; } if ( output [ "aclRule" ] !== undefined ) { contents . AclRule = deserializeAws_ec2AnalysisAclRule ( output [ "aclRule" ] , context ) ; } if ( output [ "address" ] !== undefined ) { contents . Address = __expectString ( output [ "address" ] ) ; } if ( output . addressSet === "" ) { contents . Addresses = [ ] ; } if ( output [ "addressSet" ] !== undefined && output [ "addressSet" ] [ "item" ] !== undefined ) { contents . Addresses = deserializeAws_ec2IpAddressList ( __getArrayIfSingleItem ( output [ "addressSet" ] [ "item" ] ) , context ) ; } if ( output [ "attachedTo" ] !== undefined ) { contents . AttachedTo = deserializeAws_ec2AnalysisComponent ( output [ "attachedTo" ] , context ) ; } if ( output . availabilityZoneSet === "" ) { contents . AvailabilityZones = [ ] ; } if ( output [ "availabilityZoneSet" ] !== undefined && output [ "availabilityZoneSet" ] [ "item" ] !== undefined ) { contents . AvailabilityZones = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "availabilityZoneSet" ] [ "item" ] ) , context ) ; } if ( output . cidrSet === "" ) { contents . Cidrs = [ ] ; } if ( output [ "cidrSet" ] !== undefined && output [ "cidrSet" ] [ "item" ] !== undefined ) { contents . Cidrs = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "cidrSet" ] [ "item" ] ) , context ) ; } if ( output [ "component" ] !== undefined ) { contents . Component = deserializeAws_ec2AnalysisComponent ( output [ "component" ] , context ) ; } if ( output [ "customerGateway" ] !== undefined ) { contents . CustomerGateway = deserializeAws_ec2AnalysisComponent ( output [ "customerGateway" ] , context ) ; } if ( output [ "destination" ] !== undefined ) { contents . Destination = deserializeAws_ec2AnalysisComponent ( output [ "destination" ] , context ) ; } if ( output [ "destinationVpc" ] !== undefined ) { contents . DestinationVpc = deserializeAws_ec2AnalysisComponent ( output [ "destinationVpc" ] , context ) ; } if ( output [ "direction" ] !== undefined ) { contents . Direction = __expectString ( output [ "direction" ] ) ; } if ( output [ "explanationCode" ] !== undefined ) { contents . ExplanationCode = __expectString ( output [ "explanationCode" ] ) ; } if ( output [ "ingressRouteTable" ] !== undefined ) { contents . IngressRouteTable = deserializeAws_ec2AnalysisComponent ( output [ "ingressRouteTable" ] , context ) ; } if ( output [ "internetGateway" ] !== undefined ) { contents . InternetGateway = deserializeAws_ec2AnalysisComponent ( output [ "internetGateway" ] , context ) ; } if ( output [ "loadBalancerArn" ] !== undefined ) { contents . LoadBalancerArn = __expectString ( output [ "loadBalancerArn" ] ) ; } if ( output [ "classicLoadBalancerListener" ] !== undefined ) { contents . ClassicLoadBalancerListener = deserializeAws_ec2AnalysisLoadBalancerListener ( output [ "classicLoadBalancerListener" ] , context ) ; } if ( output [ "loadBalancerListenerPort" ] !== undefined ) { contents . LoadBalancerListenerPort = __strictParseInt32 ( output [ "loadBalancerListenerPort" ] ) as number ; } if ( output [ "loadBalancerTarget" ] !== undefined ) { contents . LoadBalancerTarget = deserializeAws_ec2AnalysisLoadBalancerTarget ( output [ "loadBalancerTarget" ] , context ) ; } if ( output [ "loadBalancerTargetGroup" ] !== undefined ) { contents . LoadBalancerTargetGroup = deserializeAws_ec2AnalysisComponent ( output [ "loadBalancerTargetGroup" ] , context ) ; } if ( output . loadBalancerTargetGroupSet === "" ) { contents . LoadBalancerTargetGroups = [ ] ; } if ( output [ "loadBalancerTargetGroupSet" ] !== undefined && output [ "loadBalancerTargetGroupSet" ] [ "item" ] !== undefined ) { contents . LoadBalancerTargetGroups = deserializeAws_ec2AnalysisComponentList ( __getArrayIfSingleItem ( output [ "loadBalancerTargetGroupSet" ] [ "item" ] ) , context ) ; } if ( output [ "loadBalancerTargetPort" ] !== undefined ) { contents . LoadBalancerTargetPort = __strictParseInt32 ( output [ "loadBalancerTargetPort" ] ) as number ; } if ( output [ "elasticLoadBalancerListener" ] !== undefined ) { contents . ElasticLoadBalancerListener = deserializeAws_ec2AnalysisComponent ( output [ "elasticLoadBalancerListener" ] , context ) ; } if ( output [ "missingComponent" ] !== undefined ) { contents . MissingComponent = __expectString ( output [ "missingComponent" ] ) ; } if ( output [ "natGateway" ] !== undefined ) { contents . NatGateway = deserializeAws_ec2AnalysisComponent ( output [ "natGateway" ] , context ) ; } if ( output [ "networkInterface" ] !== undefined ) { contents . NetworkInterface = deserializeAws_ec2AnalysisComponent ( output [ "networkInterface" ] , context ) ; } if ( output [ "packetField" ] !== undefined ) { contents . PacketField = __expectString ( output [ "packetField" ] ) ; } if ( output [ "vpcPeeringConnection" ] !== undefined ) { contents . VpcPeeringConnection = deserializeAws_ec2AnalysisComponent ( output [ "vpcPeeringConnection" ] , context ) ; } if ( output [ "port" ] !== undefined ) { contents . Port = __strictParseInt32 ( output [ "port" ] ) as number ; } if ( output . portRangeSet === "" ) { contents . PortRanges = [ ] ; } if ( output [ "portRangeSet" ] !== undefined && output [ "portRangeSet" ] [ "item" ] !== undefined ) { contents . PortRanges = deserializeAws_ec2PortRangeList ( __getArrayIfSingleItem ( output [ "portRangeSet" ] [ "item" ] ) , context ) ; } if ( output [ "prefixList" ] !== undefined ) { contents . PrefixList = deserializeAws_ec2AnalysisComponent ( output [ "prefixList" ] , context ) ; } if ( output . protocolSet === "" ) { contents . Protocols = [ ] ; } if ( output [ "protocolSet" ] !== undefined && output [ "protocolSet" ] [ "item" ] !== undefined ) { contents . Protocols = deserializeAws_ec2StringList ( __getArrayIfSingleItem ( output [ "protocolSet" ] [ "item" ] ) , context ) ; } if ( output [ "routeTableRoute" ] !== undefined ) { contents . RouteTableRoute = deserializeAws_ec2AnalysisRouteTableRoute ( output [ "routeTableRoute" ] , context ) ; } if ( output [ "routeTable" ] !== undefined ) { contents . RouteTable = deserializeAws_ec2AnalysisComponent ( output [ "routeTable" ] , context ) ; } if ( output [ "securityGroup" ] !== undefined ) { contents . SecurityGroup = deserializeAws_ec2AnalysisComponent ( output [ "securityGroup" ] , context ) ; } if ( output [ "securityGroupRule" ] !== undefined ) { contents . SecurityGroupRule = deserializeAws_ec2AnalysisSecurityGroupRule ( output [ "securityGroupRule" ] , context ) ; } if ( output . securityGroupSet === "" ) { contents . SecurityGroups = [ ] ; } if ( output [ "securityGroupSet" ] !== undefined && output [ "securityGroupSet" ] [ "item" ] !== undefined ) { contents . SecurityGroups = deserializeAws_ec2AnalysisComponentList ( __getArrayIfSingleItem ( output [ "securityGroupSet" ] [ "item" ] ) , context ) ; } if ( output [ "sourceVpc" ] !== undefined ) { contents . SourceVpc = deserializeAws_ec2AnalysisComponent ( output [ "sourceVpc" ] , context ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "subnet" ] !== undefined ) { contents . Subnet = deserializeAws_ec2AnalysisComponent ( output [ "subnet" ] , context ) ; } if ( output [ "subnetRouteTable" ] !== undefined ) { contents . SubnetRouteTable = deserializeAws_ec2AnalysisComponent ( output [ "subnetRouteTable" ] , context ) ; } if ( output [ "vpc" ] !== undefined ) { contents . Vpc = deserializeAws_ec2AnalysisComponent ( output [ "vpc" ] , context ) ; } if ( output [ "vpcEndpoint" ] !== undefined ) { contents . VpcEndpoint = deserializeAws_ec2AnalysisComponent ( output [ "vpcEndpoint" ] , context ) ; } if ( output [ "vpnConnection" ] !== undefined ) { contents . VpnConnection = deserializeAws_ec2AnalysisComponent ( output [ "vpnConnection" ] , context ) ; } if ( output [ "vpnGateway" ] !== undefined ) { contents . VpnGateway = deserializeAws_ec2AnalysisComponent ( output [ "vpnGateway" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ExplanationList = ( output , context ) : Explanation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Explanation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ExportClientVpnClientCertificateRevocationListResult = ( output , context ) : ExportClientVpnClientCertificateRevocationListResult => { const contents = { CertificateRevocationList : undefined , Status : undefined , } ; if ( output [ "certificateRevocationList" ] !== undefined ) { contents . CertificateRevocationList = __expectString ( output [ "certificateRevocationList" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2ClientCertificateRevocationListStatus ( output [ "status" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ExportClientVpnClientConfigurationResult = ( output , context ) : ExportClientVpnClientConfigurationResult => { const contents = { ClientConfiguration : undefined , } ; if ( output [ "clientConfiguration" ] !== undefined ) { contents . ClientConfiguration = __expectString ( output [ "clientConfiguration" ] ) ; } return contents ; } ; const deserializeAws_ec2ExportImageResult = ( output , context ) : ExportImageResult => { const contents = { Description : undefined , DiskImageFormat : undefined , ExportImageTaskId : undefined , ImageId : undefined , RoleName : undefined , Progress : undefined , S3ExportLocation : undefined , Status : undefined , StatusMessage : undefined , Tags : undefined , } ; if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "diskImageFormat" ] !== undefined ) { contents . DiskImageFormat = __expectString ( output [ "diskImageFormat" ] ) ; } if ( output [ "exportImageTaskId" ] !== undefined ) { contents . ExportImageTaskId = __expectString ( output [ "exportImageTaskId" ] ) ; } if ( output [ "imageId" ] !== undefined ) { contents . ImageId = __expectString ( output [ "imageId" ] ) ; } if ( output [ "roleName" ] !== undefined ) { contents . RoleName = __expectString ( output [ "roleName" ] ) ; } if ( output [ "progress" ] !== undefined ) { contents . Progress = __expectString ( output [ "progress" ] ) ; } if ( output [ "s3ExportLocation" ] !== undefined ) { contents . S3ExportLocation = deserializeAws_ec2ExportTaskS3Location ( output [ "s3ExportLocation" ] , context ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ExportImageTask = ( output , context ) : ExportImageTask => { const contents = { Description : undefined , ExportImageTaskId : undefined , ImageId : undefined , Progress : undefined , S3ExportLocation : undefined , Status : undefined , StatusMessage : undefined , Tags : undefined , } ; if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "exportImageTaskId" ] !== undefined ) { contents . ExportImageTaskId = __expectString ( output [ "exportImageTaskId" ] ) ; } if ( output [ "imageId" ] !== undefined ) { contents . ImageId = __expectString ( output [ "imageId" ] ) ; } if ( output [ "progress" ] !== undefined ) { contents . Progress = __expectString ( output [ "progress" ] ) ; } if ( output [ "s3ExportLocation" ] !== undefined ) { contents . S3ExportLocation = deserializeAws_ec2ExportTaskS3Location ( output [ "s3ExportLocation" ] , context ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ExportImageTaskList = ( output , context ) : ExportImageTask [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ExportImageTask ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ExportTask = ( output , context ) : ExportTask => { const contents = { Description : undefined , ExportTaskId : undefined , ExportToS3Task : undefined , InstanceExportDetails : undefined , State : undefined , StatusMessage : undefined , Tags : undefined , } ; if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "exportTaskId" ] !== undefined ) { contents . ExportTaskId = __expectString ( output [ "exportTaskId" ] ) ; } if ( output [ "exportToS3" ] !== undefined ) { contents . ExportToS3Task = deserializeAws_ec2ExportToS3Task ( output [ "exportToS3" ] , context ) ; } if ( output [ "instanceExport" ] !== undefined ) { contents . InstanceExportDetails = deserializeAws_ec2InstanceExportDetails ( output [ "instanceExport" ] , context ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ExportTaskList = ( output , context ) : ExportTask [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ExportTask ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ExportTaskS3Location = ( output , context ) : ExportTaskS3Location => { const contents = { S3Bucket : undefined , S3Prefix : undefined , } ; if ( output [ "s3Bucket" ] !== undefined ) { contents . S3Bucket = __expectString ( output [ "s3Bucket" ] ) ; } if ( output [ "s3Prefix" ] !== undefined ) { contents . S3Prefix = __expectString ( output [ "s3Prefix" ] ) ; } return contents ; } ; const deserializeAws_ec2ExportToS3Task = ( output , context ) : ExportToS3Task => { const contents = { ContainerFormat : undefined , DiskImageFormat : undefined , S3Bucket : undefined , S3Key : undefined , } ; if ( output [ "containerFormat" ] !== undefined ) { contents . ContainerFormat = __expectString ( output [ "containerFormat" ] ) ; } if ( output [ "diskImageFormat" ] !== undefined ) { contents . DiskImageFormat = __expectString ( output [ "diskImageFormat" ] ) ; } if ( output [ "s3Bucket" ] !== undefined ) { contents . S3Bucket = __expectString ( output [ "s3Bucket" ] ) ; } if ( output [ "s3Key" ] !== undefined ) { contents . S3Key = __expectString ( output [ "s3Key" ] ) ; } return contents ; } ; const deserializeAws_ec2ExportTransitGatewayRoutesResult = ( output , context ) : ExportTransitGatewayRoutesResult => { const contents = { S3Location : undefined , } ; if ( output [ "s3Location" ] !== undefined ) { contents . S3Location = __expectString ( output [ "s3Location" ] ) ; } return contents ; } ; const deserializeAws_ec2FailedCapacityReservationFleetCancellationResult = ( output , context ) : FailedCapacityReservationFleetCancellationResult => { const contents = { CapacityReservationFleetId : undefined , CancelCapacityReservationFleetError : undefined , } ; if ( output [ "capacityReservationFleetId" ] !== undefined ) { contents . CapacityReservationFleetId = __expectString ( output [ "capacityReservationFleetId" ] ) ; } if ( output [ "cancelCapacityReservationFleetError" ] !== undefined ) { contents . CancelCapacityReservationFleetError = deserializeAws_ec2CancelCapacityReservationFleetError ( output [ "cancelCapacityReservationFleetError" ] , context ) ; } return contents ; } ; const deserializeAws_ec2FailedCapacityReservationFleetCancellationResultSet = ( output , context ) : FailedCapacityReservationFleetCancellationResult [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2FailedCapacityReservationFleetCancellationResult ( entry , context ) ; } ) ; } ; const deserializeAws_ec2FailedQueuedPurchaseDeletion = ( output , context ) : FailedQueuedPurchaseDeletion => { const contents = { Error : undefined , ReservedInstancesId : undefined , } ; if ( output [ "error" ] !== undefined ) { contents . Error = deserializeAws_ec2DeleteQueuedReservedInstancesError ( output [ "error" ] , context ) ; } if ( output [ "reservedInstancesId" ] !== undefined ) { contents . ReservedInstancesId = __expectString ( output [ "reservedInstancesId" ] ) ; } return contents ; } ; const deserializeAws_ec2FailedQueuedPurchaseDeletionSet = ( output , context ) : FailedQueuedPurchaseDeletion [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2FailedQueuedPurchaseDeletion ( entry , context ) ; } ) ; } ; const deserializeAws_ec2FederatedAuthentication = ( output , context ) : FederatedAuthentication => { const contents = { SamlProviderArn : undefined , SelfServiceSamlProviderArn : undefined , } ; if ( output [ "samlProviderArn" ] !== undefined ) { contents . SamlProviderArn = __expectString ( output [ "samlProviderArn" ] ) ; } if ( output [ "selfServiceSamlProviderArn" ] !== undefined ) { contents . SelfServiceSamlProviderArn = __expectString ( output [ "selfServiceSamlProviderArn" ] ) ; } return contents ; } ; const deserializeAws_ec2FleetCapacityReservation = ( output , context ) : FleetCapacityReservation => { const contents = { CapacityReservationId : undefined , AvailabilityZoneId : undefined , InstanceType : undefined , InstancePlatform : undefined , AvailabilityZone : undefined , TotalInstanceCount : undefined , FulfilledCapacity : undefined , EbsOptimized : undefined , CreateDate : undefined , Weight : undefined , Priority : undefined , } ; if ( output [ "capacityReservationId" ] !== undefined ) { contents . CapacityReservationId = __expectString ( output [ "capacityReservationId" ] ) ; } if ( output [ "availabilityZoneId" ] !== undefined ) { contents . AvailabilityZoneId = __expectString ( output [ "availabilityZoneId" ] ) ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "instancePlatform" ] !== undefined ) { contents . InstancePlatform = __expectString ( output [ "instancePlatform" ] ) ; } if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "totalInstanceCount" ] !== undefined ) { contents . TotalInstanceCount = __strictParseInt32 ( output [ "totalInstanceCount" ] ) as number ; } if ( output [ "fulfilledCapacity" ] !== undefined ) { contents . FulfilledCapacity = __strictParseFloat ( output [ "fulfilledCapacity" ] ) as number ; } if ( output [ "ebsOptimized" ] !== undefined ) { contents . EbsOptimized = __parseBoolean ( output [ "ebsOptimized" ] ) ; } if ( output [ "createDate" ] !== undefined ) { contents . CreateDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "createDate" ] ) ) ; } if ( output [ "weight" ] !== undefined ) { contents . Weight = __strictParseFloat ( output [ "weight" ] ) as number ; } if ( output [ "priority" ] !== undefined ) { contents . Priority = __strictParseInt32 ( output [ "priority" ] ) as number ; } return contents ; } ; const deserializeAws_ec2FleetCapacityReservationSet = ( output , context ) : FleetCapacityReservation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2FleetCapacityReservation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2FleetData = ( output , context ) : FleetData => { const contents = { ActivityStatus : undefined , CreateTime : undefined , FleetId : undefined , FleetState : undefined , ClientToken : undefined , ExcessCapacityTerminationPolicy : undefined , FulfilledCapacity : undefined , FulfilledOnDemandCapacity : undefined , LaunchTemplateConfigs : undefined , TargetCapacitySpecification : undefined , TerminateInstancesWithExpiration : undefined , Type : undefined , ValidFrom : undefined , ValidUntil : undefined , ReplaceUnhealthyInstances : undefined , SpotOptions : undefined , OnDemandOptions : undefined , Tags : undefined , Errors : undefined , Instances : undefined , Context : undefined , } ; if ( output [ "activityStatus" ] !== undefined ) { contents . ActivityStatus = __expectString ( output [ "activityStatus" ] ) ; } if ( output [ "createTime" ] !== undefined ) { contents . CreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "createTime" ] ) ) ; } if ( output [ "fleetId" ] !== undefined ) { contents . FleetId = __expectString ( output [ "fleetId" ] ) ; } if ( output [ "fleetState" ] !== undefined ) { contents . FleetState = __expectString ( output [ "fleetState" ] ) ; } if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } if ( output [ "excessCapacityTerminationPolicy" ] !== undefined ) { contents . ExcessCapacityTerminationPolicy = __expectString ( output [ "excessCapacityTerminationPolicy" ] ) ; } if ( output [ "fulfilledCapacity" ] !== undefined ) { contents . FulfilledCapacity = __strictParseFloat ( output [ "fulfilledCapacity" ] ) as number ; } if ( output [ "fulfilledOnDemandCapacity" ] !== undefined ) { contents . FulfilledOnDemandCapacity = __strictParseFloat ( output [ "fulfilledOnDemandCapacity" ] ) as number ; } if ( output . launchTemplateConfigs === "" ) { contents . LaunchTemplateConfigs = [ ] ; } if ( output [ "launchTemplateConfigs" ] !== undefined && output [ "launchTemplateConfigs" ] [ "item" ] !== undefined ) { contents . LaunchTemplateConfigs = deserializeAws_ec2FleetLaunchTemplateConfigList ( __getArrayIfSingleItem ( output [ "launchTemplateConfigs" ] [ "item" ] ) , context ) ; } if ( output [ "targetCapacitySpecification" ] !== undefined ) { contents . TargetCapacitySpecification = deserializeAws_ec2TargetCapacitySpecification ( output [ "targetCapacitySpecification" ] , context ) ; } if ( output [ "terminateInstancesWithExpiration" ] !== undefined ) { contents . TerminateInstancesWithExpiration = __parseBoolean ( output [ "terminateInstancesWithExpiration" ] ) ; } if ( output [ "type" ] !== undefined ) { contents . Type = __expectString ( output [ "type" ] ) ; } if ( output [ "validFrom" ] !== undefined ) { contents . ValidFrom = __expectNonNull ( __parseRfc3339DateTime ( output [ "validFrom" ] ) ) ; } if ( output [ "validUntil" ] !== undefined ) { contents . ValidUntil = __expectNonNull ( __parseRfc3339DateTime ( output [ "validUntil" ] ) ) ; } if ( output [ "replaceUnhealthyInstances" ] !== undefined ) { contents . ReplaceUnhealthyInstances = __parseBoolean ( output [ "replaceUnhealthyInstances" ] ) ; } if ( output [ "spotOptions" ] !== undefined ) { contents . SpotOptions = deserializeAws_ec2SpotOptions ( output [ "spotOptions" ] , context ) ; } if ( output [ "onDemandOptions" ] !== undefined ) { contents . OnDemandOptions = deserializeAws_ec2OnDemandOptions ( output [ "onDemandOptions" ] , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output . errorSet === "" ) { contents . Errors = [ ] ; } if ( output [ "errorSet" ] !== undefined && output [ "errorSet" ] [ "item" ] !== undefined ) { contents . Errors = deserializeAws_ec2DescribeFleetsErrorSet ( __getArrayIfSingleItem ( output [ "errorSet" ] [ "item" ] ) , context ) ; } if ( output . fleetInstanceSet === "" ) { contents . Instances = [ ] ; } if ( output [ "fleetInstanceSet" ] !== undefined && output [ "fleetInstanceSet" ] [ "item" ] !== undefined ) { contents . Instances = deserializeAws_ec2DescribeFleetsInstancesSet ( __getArrayIfSingleItem ( output [ "fleetInstanceSet" ] [ "item" ] ) , context ) ; } if ( output [ "context" ] !== undefined ) { contents . Context = __expectString ( output [ "context" ] ) ; } return contents ; } ; const deserializeAws_ec2FleetLaunchTemplateConfig = ( output , context ) : FleetLaunchTemplateConfig => { const contents = { LaunchTemplateSpecification : undefined , Overrides : undefined , } ; if ( output [ "launchTemplateSpecification" ] !== undefined ) { contents . LaunchTemplateSpecification = deserializeAws_ec2FleetLaunchTemplateSpecification ( output [ "launchTemplateSpecification" ] , context ) ; } if ( output . overrides === "" ) { contents . Overrides = [ ] ; } if ( output [ "overrides" ] !== undefined && output [ "overrides" ] [ "item" ] !== undefined ) { contents . Overrides = deserializeAws_ec2FleetLaunchTemplateOverridesList ( __getArrayIfSingleItem ( output [ "overrides" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2FleetLaunchTemplateConfigList = ( output , context ) : FleetLaunchTemplateConfig [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2FleetLaunchTemplateConfig ( entry , context ) ; } ) ; } ; const deserializeAws_ec2FleetLaunchTemplateOverrides = ( output , context ) : FleetLaunchTemplateOverrides => { const contents = { InstanceType : undefined , MaxPrice : undefined , SubnetId : undefined , AvailabilityZone : undefined , WeightedCapacity : undefined , Priority : undefined , Placement : undefined , InstanceRequirements : undefined , } ; if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "maxPrice" ] !== undefined ) { contents . MaxPrice = __expectString ( output [ "maxPrice" ] ) ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "weightedCapacity" ] !== undefined ) { contents . WeightedCapacity = __strictParseFloat ( output [ "weightedCapacity" ] ) as number ; } if ( output [ "priority" ] !== undefined ) { contents . Priority = __strictParseFloat ( output [ "priority" ] ) as number ; } if ( output [ "placement" ] !== undefined ) { contents . Placement = deserializeAws_ec2PlacementResponse ( output [ "placement" ] , context ) ; } if ( output [ "instanceRequirements" ] !== undefined ) { contents . InstanceRequirements = deserializeAws_ec2InstanceRequirements ( output [ "instanceRequirements" ] , context ) ; } return contents ; } ; const deserializeAws_ec2FleetLaunchTemplateOverridesList = ( output , context ) : FleetLaunchTemplateOverrides [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2FleetLaunchTemplateOverrides ( entry , context ) ; } ) ; } ; const deserializeAws_ec2FleetLaunchTemplateSpecification = ( output , context ) : FleetLaunchTemplateSpecification => { const contents = { LaunchTemplateId : undefined , LaunchTemplateName : undefined , Version : undefined , } ; if ( output [ "launchTemplateId" ] !== undefined ) { contents . LaunchTemplateId = __expectString ( output [ "launchTemplateId" ] ) ; } if ( output [ "launchTemplateName" ] !== undefined ) { contents . LaunchTemplateName = __expectString ( output [ "launchTemplateName" ] ) ; } if ( output [ "version" ] !== undefined ) { contents . Version = __expectString ( output [ "version" ] ) ; } return contents ; } ; const deserializeAws_ec2FleetSet = ( output , context ) : FleetData [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2FleetData ( entry , context ) ; } ) ; } ; const deserializeAws_ec2FleetSpotCapacityRebalance = ( output , context ) : FleetSpotCapacityRebalance => { const contents = { ReplacementStrategy : undefined , TerminationDelay : undefined , } ; if ( output [ "replacementStrategy" ] !== undefined ) { contents . ReplacementStrategy = __expectString ( output [ "replacementStrategy" ] ) ; } if ( output [ "terminationDelay" ] !== undefined ) { contents . TerminationDelay = __strictParseInt32 ( output [ "terminationDelay" ] ) as number ; } return contents ; } ; const deserializeAws_ec2FleetSpotMaintenanceStrategies = ( output , context ) : FleetSpotMaintenanceStrategies => { const contents = { CapacityRebalance : undefined , } ; if ( output [ "capacityRebalance" ] !== undefined ) { contents . CapacityRebalance = deserializeAws_ec2FleetSpotCapacityRebalance ( output [ "capacityRebalance" ] , context ) ; } return contents ; } ; const deserializeAws_ec2FlowLog = ( output , context ) : FlowLog => { const contents = { CreationTime : undefined , DeliverLogsErrorMessage : undefined , DeliverLogsPermissionArn : undefined , DeliverLogsStatus : undefined , FlowLogId : undefined , FlowLogStatus : undefined , LogGroupName : undefined , ResourceId : undefined , TrafficType : undefined , LogDestinationType : undefined , LogDestination : undefined , LogFormat : undefined , Tags : undefined , MaxAggregationInterval : undefined , DestinationOptions : undefined , } ; if ( output [ "creationTime" ] !== undefined ) { contents . CreationTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "creationTime" ] ) ) ; } if ( output [ "deliverLogsErrorMessage" ] !== undefined ) { contents . DeliverLogsErrorMessage = __expectString ( output [ "deliverLogsErrorMessage" ] ) ; } if ( output [ "deliverLogsPermissionArn" ] !== undefined ) { contents . DeliverLogsPermissionArn = __expectString ( output [ "deliverLogsPermissionArn" ] ) ; } if ( output [ "deliverLogsStatus" ] !== undefined ) { contents . DeliverLogsStatus = __expectString ( output [ "deliverLogsStatus" ] ) ; } if ( output [ "flowLogId" ] !== undefined ) { contents . FlowLogId = __expectString ( output [ "flowLogId" ] ) ; } if ( output [ "flowLogStatus" ] !== undefined ) { contents . FlowLogStatus = __expectString ( output [ "flowLogStatus" ] ) ; } if ( output [ "logGroupName" ] !== undefined ) { contents . LogGroupName = __expectString ( output [ "logGroupName" ] ) ; } if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } if ( output [ "trafficType" ] !== undefined ) { contents . TrafficType = __expectString ( output [ "trafficType" ] ) ; } if ( output [ "logDestinationType" ] !== undefined ) { contents . LogDestinationType = __expectString ( output [ "logDestinationType" ] ) ; } if ( output [ "logDestination" ] !== undefined ) { contents . LogDestination = __expectString ( output [ "logDestination" ] ) ; } if ( output [ "logFormat" ] !== undefined ) { contents . LogFormat = __expectString ( output [ "logFormat" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "maxAggregationInterval" ] !== undefined ) { contents . MaxAggregationInterval = __strictParseInt32 ( output [ "maxAggregationInterval" ] ) as number ; } if ( output [ "destinationOptions" ] !== undefined ) { contents . DestinationOptions = deserializeAws_ec2DestinationOptionsResponse ( output [ "destinationOptions" ] , context ) ; } return contents ; } ; const deserializeAws_ec2FlowLogSet = ( output , context ) : FlowLog [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2FlowLog ( entry , context ) ; } ) ; } ; const deserializeAws_ec2FpgaDeviceInfo = ( output , context ) : FpgaDeviceInfo => { const contents = { Name : undefined , Manufacturer : undefined , Count : undefined , MemoryInfo : undefined , } ; if ( output [ "name" ] !== undefined ) { contents . Name = __expectString ( output [ "name" ] ) ; } if ( output [ "manufacturer" ] !== undefined ) { contents . Manufacturer = __expectString ( output [ "manufacturer" ] ) ; } if ( output [ "count" ] !== undefined ) { contents . Count = __strictParseInt32 ( output [ "count" ] ) as number ; } if ( output [ "memoryInfo" ] !== undefined ) { contents . MemoryInfo = deserializeAws_ec2FpgaDeviceMemoryInfo ( output [ "memoryInfo" ] , context ) ; } return contents ; } ; const deserializeAws_ec2FpgaDeviceInfoList = ( output , context ) : FpgaDeviceInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2FpgaDeviceInfo ( entry , context ) ; } ) ; } ; const deserializeAws_ec2FpgaDeviceMemoryInfo = ( output , context ) : FpgaDeviceMemoryInfo => { const contents = { SizeInMiB : undefined , } ; if ( output [ "sizeInMiB" ] !== undefined ) { contents . SizeInMiB = __strictParseInt32 ( output [ "sizeInMiB" ] ) as number ; } return contents ; } ; const deserializeAws_ec2FpgaImage = ( output , context ) : FpgaImage => { const contents = { FpgaImageId : undefined , FpgaImageGlobalId : undefined , Name : undefined , Description : undefined , ShellVersion : undefined , PciId : undefined , State : undefined , CreateTime : undefined , UpdateTime : undefined , OwnerId : undefined , OwnerAlias : undefined , ProductCodes : undefined , Tags : undefined , Public : undefined , DataRetentionSupport : undefined , } ; if ( output [ "fpgaImageId" ] !== undefined ) { contents . FpgaImageId = __expectString ( output [ "fpgaImageId" ] ) ; } if ( output [ "fpgaImageGlobalId" ] !== undefined ) { contents . FpgaImageGlobalId = __expectString ( output [ "fpgaImageGlobalId" ] ) ; } if ( output [ "name" ] !== undefined ) { contents . Name = __expectString ( output [ "name" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "shellVersion" ] !== undefined ) { contents . ShellVersion = __expectString ( output [ "shellVersion" ] ) ; } if ( output [ "pciId" ] !== undefined ) { contents . PciId = deserializeAws_ec2PciId ( output [ "pciId" ] , context ) ; } if ( output [ "state" ] !== undefined ) { contents . State = deserializeAws_ec2FpgaImageState ( output [ "state" ] , context ) ; } if ( output [ "createTime" ] !== undefined ) { contents . CreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "createTime" ] ) ) ; } if ( output [ "updateTime" ] !== undefined ) { contents . UpdateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "updateTime" ] ) ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "ownerAlias" ] !== undefined ) { contents . OwnerAlias = __expectString ( output [ "ownerAlias" ] ) ; } if ( output . productCodes === "" ) { contents . ProductCodes = [ ] ; } if ( output [ "productCodes" ] !== undefined && output [ "productCodes" ] [ "item" ] !== undefined ) { contents . ProductCodes = deserializeAws_ec2ProductCodeList ( __getArrayIfSingleItem ( output [ "productCodes" ] [ "item" ] ) , context ) ; } if ( output . tags === "" ) { contents . Tags = [ ] ; } if ( output [ "tags" ] !== undefined && output [ "tags" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tags" ] [ "item" ] ) , context ) ; } if ( output [ "public" ] !== undefined ) { contents . Public = __parseBoolean ( output [ "public" ] ) ; } if ( output [ "dataRetentionSupport" ] !== undefined ) { contents . DataRetentionSupport = __parseBoolean ( output [ "dataRetentionSupport" ] ) ; } return contents ; } ; const deserializeAws_ec2FpgaImageAttribute = ( output , context ) : FpgaImageAttribute => { const contents = { FpgaImageId : undefined , Name : undefined , Description : undefined , LoadPermissions : undefined , ProductCodes : undefined , } ; if ( output [ "fpgaImageId" ] !== undefined ) { contents . FpgaImageId = __expectString ( output [ "fpgaImageId" ] ) ; } if ( output [ "name" ] !== undefined ) { contents . Name = __expectString ( output [ "name" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output . loadPermissions === "" ) { contents . LoadPermissions = [ ] ; } if ( output [ "loadPermissions" ] !== undefined && output [ "loadPermissions" ] [ "item" ] !== undefined ) { contents . LoadPermissions = deserializeAws_ec2LoadPermissionList ( __getArrayIfSingleItem ( output [ "loadPermissions" ] [ "item" ] ) , context ) ; } if ( output . productCodes === "" ) { contents . ProductCodes = [ ] ; } if ( output [ "productCodes" ] !== undefined && output [ "productCodes" ] [ "item" ] !== undefined ) { contents . ProductCodes = deserializeAws_ec2ProductCodeList ( __getArrayIfSingleItem ( output [ "productCodes" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2FpgaImageList = ( output , context ) : FpgaImage [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2FpgaImage ( entry , context ) ; } ) ; } ; const deserializeAws_ec2FpgaImageState = ( output , context ) : FpgaImageState => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2FpgaInfo = ( output , context ) : FpgaInfo => { const contents = { Fpgas : undefined , TotalFpgaMemoryInMiB : undefined , } ; if ( output . fpgas === "" ) { contents . Fpgas = [ ] ; } if ( output [ "fpgas" ] !== undefined && output [ "fpgas" ] [ "item" ] !== undefined ) { contents . Fpgas = deserializeAws_ec2FpgaDeviceInfoList ( __getArrayIfSingleItem ( output [ "fpgas" ] [ "item" ] ) , context ) ; } if ( output [ "totalFpgaMemoryInMiB" ] !== undefined ) { contents . TotalFpgaMemoryInMiB = __strictParseInt32 ( output [ "totalFpgaMemoryInMiB" ] ) as number ; } return contents ; } ; const deserializeAws_ec2GetAssociatedEnclaveCertificateIamRolesResult = ( output , context ) : GetAssociatedEnclaveCertificateIamRolesResult => { const contents = { AssociatedRoles : undefined , } ; if ( output . associatedRoleSet === "" ) { contents . AssociatedRoles = [ ] ; } if ( output [ "associatedRoleSet" ] !== undefined && output [ "associatedRoleSet" ] [ "item" ] !== undefined ) { contents . AssociatedRoles = deserializeAws_ec2AssociatedRolesList ( __getArrayIfSingleItem ( output [ "associatedRoleSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2GetAssociatedIpv6PoolCidrsResult = ( output , context ) : GetAssociatedIpv6PoolCidrsResult => { const contents = { Ipv6CidrAssociations : undefined , NextToken : undefined , } ; if ( output . ipv6CidrAssociationSet === "" ) { contents . Ipv6CidrAssociations = [ ] ; } if ( output [ "ipv6CidrAssociationSet" ] !== undefined && output [ "ipv6CidrAssociationSet" ] [ "item" ] !== undefined ) { contents . Ipv6CidrAssociations = deserializeAws_ec2Ipv6CidrAssociationSet ( __getArrayIfSingleItem ( output [ "ipv6CidrAssociationSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2GetCapacityReservationUsageResult = ( output , context ) : GetCapacityReservationUsageResult => { const contents = { NextToken : undefined , CapacityReservationId : undefined , InstanceType : undefined , TotalInstanceCount : undefined , AvailableInstanceCount : undefined , State : undefined , InstanceUsages : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output [ "capacityReservationId" ] !== undefined ) { contents . CapacityReservationId = __expectString ( output [ "capacityReservationId" ] ) ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "totalInstanceCount" ] !== undefined ) { contents . TotalInstanceCount = __strictParseInt32 ( output [ "totalInstanceCount" ] ) as number ; } if ( output [ "availableInstanceCount" ] !== undefined ) { contents . AvailableInstanceCount = __strictParseInt32 ( output [ "availableInstanceCount" ] ) as number ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output . instanceUsageSet === "" ) { contents . InstanceUsages = [ ] ; } if ( output [ "instanceUsageSet" ] !== undefined && output [ "instanceUsageSet" ] [ "item" ] !== undefined ) { contents . InstanceUsages = deserializeAws_ec2InstanceUsageSet ( __getArrayIfSingleItem ( output [ "instanceUsageSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2GetCoipPoolUsageResult = ( output , context ) : GetCoipPoolUsageResult => { const contents = { CoipPoolId : undefined , CoipAddressUsages : undefined , LocalGatewayRouteTableId : undefined , } ; if ( output [ "coipPoolId" ] !== undefined ) { contents . CoipPoolId = __expectString ( output [ "coipPoolId" ] ) ; } if ( output . coipAddressUsageSet === "" ) { contents . CoipAddressUsages = [ ] ; } if ( output [ "coipAddressUsageSet" ] !== undefined && output [ "coipAddressUsageSet" ] [ "item" ] !== undefined ) { contents . CoipAddressUsages = deserializeAws_ec2CoipAddressUsageSet ( __getArrayIfSingleItem ( output [ "coipAddressUsageSet" ] [ "item" ] ) , context ) ; } if ( output [ "localGatewayRouteTableId" ] !== undefined ) { contents . LocalGatewayRouteTableId = __expectString ( output [ "localGatewayRouteTableId" ] ) ; } return contents ; } ; const deserializeAws_ec2GetConsoleOutputResult = ( output , context ) : GetConsoleOutputResult => { const contents = { InstanceId : undefined , Output : undefined , Timestamp : undefined , } ; if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "output" ] !== undefined ) { contents . Output = __expectString ( output [ "output" ] ) ; } if ( output [ "timestamp" ] !== undefined ) { contents . Timestamp = __expectNonNull ( __parseRfc3339DateTime ( output [ "timestamp" ] ) ) ; } return contents ; } ; const deserializeAws_ec2GetConsoleScreenshotResult = ( output , context ) : GetConsoleScreenshotResult => { const contents = { ImageData : undefined , InstanceId : undefined , } ; if ( output [ "imageData" ] !== undefined ) { contents . ImageData = __expectString ( output [ "imageData" ] ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } return contents ; } ; const deserializeAws_ec2GetDefaultCreditSpecificationResult = ( output , context ) : GetDefaultCreditSpecificationResult => { const contents = { InstanceFamilyCreditSpecification : undefined , } ; if ( output [ "instanceFamilyCreditSpecification" ] !== undefined ) { contents . InstanceFamilyCreditSpecification = deserializeAws_ec2InstanceFamilyCreditSpecification ( output [ "instanceFamilyCreditSpecification" ] , context ) ; } return contents ; } ; const deserializeAws_ec2GetEbsDefaultKmsKeyIdResult = ( output , context ) : GetEbsDefaultKmsKeyIdResult => { const contents = { KmsKeyId : undefined , } ; if ( output [ "kmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "kmsKeyId" ] ) ; } return contents ; } ; const deserializeAws_ec2GetEbsEncryptionByDefaultResult = ( output , context ) : GetEbsEncryptionByDefaultResult => { const contents = { EbsEncryptionByDefault : undefined , } ; if ( output [ "ebsEncryptionByDefault" ] !== undefined ) { contents . EbsEncryptionByDefault = __parseBoolean ( output [ "ebsEncryptionByDefault" ] ) ; } return contents ; } ; const deserializeAws_ec2GetFlowLogsIntegrationTemplateResult = ( output , context ) : GetFlowLogsIntegrationTemplateResult => { const contents = { Result : undefined , } ; if ( output [ "result" ] !== undefined ) { contents . Result = __expectString ( output [ "result" ] ) ; } return contents ; } ; const deserializeAws_ec2GetGroupsForCapacityReservationResult = ( output , context ) : GetGroupsForCapacityReservationResult => { const contents = { NextToken : undefined , CapacityReservationGroups : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . capacityReservationGroupSet === "" ) { contents . CapacityReservationGroups = [ ] ; } if ( output [ "capacityReservationGroupSet" ] !== undefined && output [ "capacityReservationGroupSet" ] [ "item" ] !== undefined ) { contents . CapacityReservationGroups = deserializeAws_ec2CapacityReservationGroupSet ( __getArrayIfSingleItem ( output [ "capacityReservationGroupSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2GetHostReservationPurchasePreviewResult = ( output , context ) : GetHostReservationPurchasePreviewResult => { const contents = { CurrencyCode : undefined , Purchase : undefined , TotalHourlyPrice : undefined , TotalUpfrontPrice : undefined , } ; if ( output [ "currencyCode" ] !== undefined ) { contents . CurrencyCode = __expectString ( output [ "currencyCode" ] ) ; } if ( output . purchase === "" ) { contents . Purchase = [ ] ; } if ( output [ "purchase" ] !== undefined && output [ "purchase" ] [ "item" ] !== undefined ) { contents . Purchase = deserializeAws_ec2PurchaseSet ( __getArrayIfSingleItem ( output [ "purchase" ] [ "item" ] ) , context ) ; } if ( output [ "totalHourlyPrice" ] !== undefined ) { contents . TotalHourlyPrice = __expectString ( output [ "totalHourlyPrice" ] ) ; } if ( output [ "totalUpfrontPrice" ] !== undefined ) { contents . TotalUpfrontPrice = __expectString ( output [ "totalUpfrontPrice" ] ) ; } return contents ; } ; const deserializeAws_ec2GetInstanceTypesFromInstanceRequirementsResult = ( output , context ) : GetInstanceTypesFromInstanceRequirementsResult => { const contents = { InstanceTypes : undefined , NextToken : undefined , } ; if ( output . instanceTypeSet === "" ) { contents . InstanceTypes = [ ] ; } if ( output [ "instanceTypeSet" ] !== undefined && output [ "instanceTypeSet" ] [ "item" ] !== undefined ) { contents . InstanceTypes = deserializeAws_ec2InstanceTypeInfoFromInstanceRequirementsSet ( __getArrayIfSingleItem ( output [ "instanceTypeSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2GetIpamAddressHistoryResult = ( output , context ) : GetIpamAddressHistoryResult => { const contents = { HistoryRecords : undefined , NextToken : undefined , } ; if ( output . historyRecordSet === "" ) { contents . HistoryRecords = [ ] ; } if ( output [ "historyRecordSet" ] !== undefined && output [ "historyRecordSet" ] [ "item" ] !== undefined ) { contents . HistoryRecords = deserializeAws_ec2IpamAddressHistoryRecordSet ( __getArrayIfSingleItem ( output [ "historyRecordSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2GetIpamPoolAllocationsResult = ( output , context ) : GetIpamPoolAllocationsResult => { const contents = { IpamPoolAllocations : undefined , NextToken : undefined , } ; if ( output . ipamPoolAllocationSet === "" ) { contents . IpamPoolAllocations = [ ] ; } if ( output [ "ipamPoolAllocationSet" ] !== undefined && output [ "ipamPoolAllocationSet" ] [ "item" ] !== undefined ) { contents . IpamPoolAllocations = deserializeAws_ec2IpamPoolAllocationSet ( __getArrayIfSingleItem ( output [ "ipamPoolAllocationSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2GetIpamPoolCidrsResult = ( output , context ) : GetIpamPoolCidrsResult => { const contents = { IpamPoolCidrs : undefined , NextToken : undefined , } ; if ( output . ipamPoolCidrSet === "" ) { contents . IpamPoolCidrs = [ ] ; } if ( output [ "ipamPoolCidrSet" ] !== undefined && output [ "ipamPoolCidrSet" ] [ "item" ] !== undefined ) { contents . IpamPoolCidrs = deserializeAws_ec2IpamPoolCidrSet ( __getArrayIfSingleItem ( output [ "ipamPoolCidrSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2GetIpamResourceCidrsResult = ( output , context ) : GetIpamResourceCidrsResult => { const contents = { NextToken : undefined , IpamResourceCidrs : undefined , } ; if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } if ( output . ipamResourceCidrSet === "" ) { contents . IpamResourceCidrs = [ ] ; } if ( output [ "ipamResourceCidrSet" ] !== undefined && output [ "ipamResourceCidrSet" ] [ "item" ] !== undefined ) { contents . IpamResourceCidrs = deserializeAws_ec2IpamResourceCidrSet ( __getArrayIfSingleItem ( output [ "ipamResourceCidrSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2GetLaunchTemplateDataResult = ( output , context ) : GetLaunchTemplateDataResult => { const contents = { LaunchTemplateData : undefined , } ; if ( output [ "launchTemplateData" ] !== undefined ) { contents . LaunchTemplateData = deserializeAws_ec2ResponseLaunchTemplateData ( output [ "launchTemplateData" ] , context ) ; } return contents ; } ; const deserializeAws_ec2GetManagedPrefixListAssociationsResult = ( output , context ) : GetManagedPrefixListAssociationsResult => { const contents = { PrefixListAssociations : undefined , NextToken : undefined , } ; if ( output . prefixListAssociationSet === "" ) { contents . PrefixListAssociations = [ ] ; } if ( output [ "prefixListAssociationSet" ] !== undefined && output [ "prefixListAssociationSet" ] [ "item" ] !== undefined ) { contents . PrefixListAssociations = deserializeAws_ec2PrefixListAssociationSet ( __getArrayIfSingleItem ( output [ "prefixListAssociationSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2GetManagedPrefixListEntriesResult = ( output , context ) : GetManagedPrefixListEntriesResult => { const contents = { Entries : undefined , NextToken : undefined , } ; if ( output . entrySet === "" ) { contents . Entries = [ ] ; } if ( output [ "entrySet" ] !== undefined && output [ "entrySet" ] [ "item" ] !== undefined ) { contents . Entries = deserializeAws_ec2PrefixListEntrySet ( __getArrayIfSingleItem ( output [ "entrySet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2GetNetworkInsightsAccessScopeAnalysisFindingsResult = ( output , context ) : GetNetworkInsightsAccessScopeAnalysisFindingsResult => { const contents = { NetworkInsightsAccessScopeAnalysisId : undefined , AnalysisStatus : undefined , AnalysisFindings : undefined , NextToken : undefined , } ; if ( output [ "networkInsightsAccessScopeAnalysisId" ] !== undefined ) { contents . NetworkInsightsAccessScopeAnalysisId = __expectString ( output [ "networkInsightsAccessScopeAnalysisId" ] ) ; } if ( output [ "analysisStatus" ] !== undefined ) { contents . AnalysisStatus = __expectString ( output [ "analysisStatus" ] ) ; } if ( output . analysisFindingSet === "" ) { contents . AnalysisFindings = [ ] ; } if ( output [ "analysisFindingSet" ] !== undefined && output [ "analysisFindingSet" ] [ "item" ] !== undefined ) { contents . AnalysisFindings = deserializeAws_ec2AccessScopeAnalysisFindingList ( __getArrayIfSingleItem ( output [ "analysisFindingSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2GetNetworkInsightsAccessScopeContentResult = ( output , context ) : GetNetworkInsightsAccessScopeContentResult => { const contents = { NetworkInsightsAccessScopeContent : undefined , } ; if ( output [ "networkInsightsAccessScopeContent" ] !== undefined ) { contents . NetworkInsightsAccessScopeContent = deserializeAws_ec2NetworkInsightsAccessScopeContent ( output [ "networkInsightsAccessScopeContent" ] , context ) ; } return contents ; } ; const deserializeAws_ec2GetPasswordDataResult = ( output , context ) : GetPasswordDataResult => { const contents = { InstanceId : undefined , PasswordData : undefined , Timestamp : undefined , } ; if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "passwordData" ] !== undefined ) { contents . PasswordData = __expectString ( output [ "passwordData" ] ) ; } if ( output [ "timestamp" ] !== undefined ) { contents . Timestamp = __expectNonNull ( __parseRfc3339DateTime ( output [ "timestamp" ] ) ) ; } return contents ; } ; const deserializeAws_ec2GetReservedInstancesExchangeQuoteResult = ( output , context ) : GetReservedInstancesExchangeQuoteResult => { const contents = { CurrencyCode : undefined , IsValidExchange : undefined , OutputReservedInstancesWillExpireAt : undefined , PaymentDue : undefined , ReservedInstanceValueRollup : undefined , ReservedInstanceValueSet : undefined , TargetConfigurationValueRollup : undefined , TargetConfigurationValueSet : undefined , ValidationFailureReason : undefined , } ; if ( output [ "currencyCode" ] !== undefined ) { contents . CurrencyCode = __expectString ( output [ "currencyCode" ] ) ; } if ( output [ "isValidExchange" ] !== undefined ) { contents . IsValidExchange = __parseBoolean ( output [ "isValidExchange" ] ) ; } if ( output [ "outputReservedInstancesWillExpireAt" ] !== undefined ) { contents . OutputReservedInstancesWillExpireAt = __expectNonNull ( __parseRfc3339DateTime ( output [ "outputReservedInstancesWillExpireAt" ] ) ) ; } if ( output [ "paymentDue" ] !== undefined ) { contents . PaymentDue = __expectString ( output [ "paymentDue" ] ) ; } if ( output [ "reservedInstanceValueRollup" ] !== undefined ) { contents . ReservedInstanceValueRollup = deserializeAws_ec2ReservationValue ( output [ "reservedInstanceValueRollup" ] , context ) ; } if ( output . reservedInstanceValueSet === "" ) { contents . ReservedInstanceValueSet = [ ] ; } if ( output [ "reservedInstanceValueSet" ] !== undefined && output [ "reservedInstanceValueSet" ] [ "item" ] !== undefined ) { contents . ReservedInstanceValueSet = deserializeAws_ec2ReservedInstanceReservationValueSet ( __getArrayIfSingleItem ( output [ "reservedInstanceValueSet" ] [ "item" ] ) , context ) ; } if ( output [ "targetConfigurationValueRollup" ] !== undefined ) { contents . TargetConfigurationValueRollup = deserializeAws_ec2ReservationValue ( output [ "targetConfigurationValueRollup" ] , context ) ; } if ( output . targetConfigurationValueSet === "" ) { contents . TargetConfigurationValueSet = [ ] ; } if ( output [ "targetConfigurationValueSet" ] !== undefined && output [ "targetConfigurationValueSet" ] [ "item" ] !== undefined ) { contents . TargetConfigurationValueSet = deserializeAws_ec2TargetReservationValueSet ( __getArrayIfSingleItem ( output [ "targetConfigurationValueSet" ] [ "item" ] ) , context ) ; } if ( output [ "validationFailureReason" ] !== undefined ) { contents . ValidationFailureReason = __expectString ( output [ "validationFailureReason" ] ) ; } return contents ; } ; const deserializeAws_ec2GetSerialConsoleAccessStatusResult = ( output , context ) : GetSerialConsoleAccessStatusResult => { const contents = { SerialConsoleAccessEnabled : undefined , } ; if ( output [ "serialConsoleAccessEnabled" ] !== undefined ) { contents . SerialConsoleAccessEnabled = __parseBoolean ( output [ "serialConsoleAccessEnabled" ] ) ; } return contents ; } ; const deserializeAws_ec2GetSpotPlacementScoresResult = ( output , context ) : GetSpotPlacementScoresResult => { const contents = { SpotPlacementScores : undefined , NextToken : undefined , } ; if ( output . spotPlacementScoreSet === "" ) { contents . SpotPlacementScores = [ ] ; } if ( output [ "spotPlacementScoreSet" ] !== undefined && output [ "spotPlacementScoreSet" ] [ "item" ] !== undefined ) { contents . SpotPlacementScores = deserializeAws_ec2SpotPlacementScores ( __getArrayIfSingleItem ( output [ "spotPlacementScoreSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2GetSubnetCidrReservationsResult = ( output , context ) : GetSubnetCidrReservationsResult => { const contents = { SubnetIpv4CidrReservations : undefined , SubnetIpv6CidrReservations : undefined , NextToken : undefined , } ; if ( output . subnetIpv4CidrReservationSet === "" ) { contents . SubnetIpv4CidrReservations = [ ] ; } if ( output [ "subnetIpv4CidrReservationSet" ] !== undefined && output [ "subnetIpv4CidrReservationSet" ] [ "item" ] !== undefined ) { contents . SubnetIpv4CidrReservations = deserializeAws_ec2SubnetCidrReservationList ( __getArrayIfSingleItem ( output [ "subnetIpv4CidrReservationSet" ] [ "item" ] ) , context ) ; } if ( output . subnetIpv6CidrReservationSet === "" ) { contents . SubnetIpv6CidrReservations = [ ] ; } if ( output [ "subnetIpv6CidrReservationSet" ] !== undefined && output [ "subnetIpv6CidrReservationSet" ] [ "item" ] !== undefined ) { contents . SubnetIpv6CidrReservations = deserializeAws_ec2SubnetCidrReservationList ( __getArrayIfSingleItem ( output [ "subnetIpv6CidrReservationSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2GetTransitGatewayAttachmentPropagationsResult = ( output , context ) : GetTransitGatewayAttachmentPropagationsResult => { const contents = { TransitGatewayAttachmentPropagations : undefined , NextToken : undefined , } ; if ( output . transitGatewayAttachmentPropagations === "" ) { contents . TransitGatewayAttachmentPropagations = [ ] ; } if ( output [ "transitGatewayAttachmentPropagations" ] !== undefined && output [ "transitGatewayAttachmentPropagations" ] [ "item" ] !== undefined ) { contents . TransitGatewayAttachmentPropagations = deserializeAws_ec2TransitGatewayAttachmentPropagationList ( __getArrayIfSingleItem ( output [ "transitGatewayAttachmentPropagations" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2GetTransitGatewayMulticastDomainAssociationsResult = ( output , context ) : GetTransitGatewayMulticastDomainAssociationsResult => { const contents = { MulticastDomainAssociations : undefined , NextToken : undefined , } ; if ( output . multicastDomainAssociations === "" ) { contents . MulticastDomainAssociations = [ ] ; } if ( output [ "multicastDomainAssociations" ] !== undefined && output [ "multicastDomainAssociations" ] [ "item" ] !== undefined ) { contents . MulticastDomainAssociations = deserializeAws_ec2TransitGatewayMulticastDomainAssociationList ( __getArrayIfSingleItem ( output [ "multicastDomainAssociations" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2GetTransitGatewayPrefixListReferencesResult = ( output , context ) : GetTransitGatewayPrefixListReferencesResult => { const contents = { TransitGatewayPrefixListReferences : undefined , NextToken : undefined , } ; if ( output . transitGatewayPrefixListReferenceSet === "" ) { contents . TransitGatewayPrefixListReferences = [ ] ; } if ( output [ "transitGatewayPrefixListReferenceSet" ] !== undefined && output [ "transitGatewayPrefixListReferenceSet" ] [ "item" ] !== undefined ) { contents . TransitGatewayPrefixListReferences = deserializeAws_ec2TransitGatewayPrefixListReferenceSet ( __getArrayIfSingleItem ( output [ "transitGatewayPrefixListReferenceSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2GetTransitGatewayRouteTableAssociationsResult = ( output , context ) : GetTransitGatewayRouteTableAssociationsResult => { const contents = { Associations : undefined , NextToken : undefined , } ; if ( output . associations === "" ) { contents . Associations = [ ] ; } if ( output [ "associations" ] !== undefined && output [ "associations" ] [ "item" ] !== undefined ) { contents . Associations = deserializeAws_ec2TransitGatewayRouteTableAssociationList ( __getArrayIfSingleItem ( output [ "associations" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2GetTransitGatewayRouteTablePropagationsResult = ( output , context ) : GetTransitGatewayRouteTablePropagationsResult => { const contents = { TransitGatewayRouteTablePropagations : undefined , NextToken : undefined , } ; if ( output . transitGatewayRouteTablePropagations === "" ) { contents . TransitGatewayRouteTablePropagations = [ ] ; } if ( output [ "transitGatewayRouteTablePropagations" ] !== undefined && output [ "transitGatewayRouteTablePropagations" ] [ "item" ] !== undefined ) { contents . TransitGatewayRouteTablePropagations = deserializeAws_ec2TransitGatewayRouteTablePropagationList ( __getArrayIfSingleItem ( output [ "transitGatewayRouteTablePropagations" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2GetVpnConnectionDeviceSampleConfigurationResult = ( output , context ) : GetVpnConnectionDeviceSampleConfigurationResult => { const contents = { VpnConnectionDeviceSampleConfiguration : undefined , } ; if ( output [ "vpnConnectionDeviceSampleConfiguration" ] !== undefined ) { contents . VpnConnectionDeviceSampleConfiguration = __expectString ( output [ "vpnConnectionDeviceSampleConfiguration" ] ) ; } return contents ; } ; const deserializeAws_ec2GetVpnConnectionDeviceTypesResult = ( output , context ) : GetVpnConnectionDeviceTypesResult => { const contents = { VpnConnectionDeviceTypes : undefined , NextToken : undefined , } ; if ( output . vpnConnectionDeviceTypeSet === "" ) { contents . VpnConnectionDeviceTypes = [ ] ; } if ( output [ "vpnConnectionDeviceTypeSet" ] !== undefined && output [ "vpnConnectionDeviceTypeSet" ] [ "item" ] !== undefined ) { contents . VpnConnectionDeviceTypes = deserializeAws_ec2VpnConnectionDeviceTypeList ( __getArrayIfSingleItem ( output [ "vpnConnectionDeviceTypeSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2GpuDeviceInfo = ( output , context ) : GpuDeviceInfo => { const contents = { Name : undefined , Manufacturer : undefined , Count : undefined , MemoryInfo : undefined , } ; if ( output [ "name" ] !== undefined ) { contents . Name = __expectString ( output [ "name" ] ) ; } if ( output [ "manufacturer" ] !== undefined ) { contents . Manufacturer = __expectString ( output [ "manufacturer" ] ) ; } if ( output [ "count" ] !== undefined ) { contents . Count = __strictParseInt32 ( output [ "count" ] ) as number ; } if ( output [ "memoryInfo" ] !== undefined ) { contents . MemoryInfo = deserializeAws_ec2GpuDeviceMemoryInfo ( output [ "memoryInfo" ] , context ) ; } return contents ; } ; const deserializeAws_ec2GpuDeviceInfoList = ( output , context ) : GpuDeviceInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2GpuDeviceInfo ( entry , context ) ; } ) ; } ; const deserializeAws_ec2GpuDeviceMemoryInfo = ( output , context ) : GpuDeviceMemoryInfo => { const contents = { SizeInMiB : undefined , } ; if ( output [ "sizeInMiB" ] !== undefined ) { contents . SizeInMiB = __strictParseInt32 ( output [ "sizeInMiB" ] ) as number ; } return contents ; } ; const deserializeAws_ec2GpuInfo = ( output , context ) : GpuInfo => { const contents = { Gpus : undefined , TotalGpuMemoryInMiB : undefined , } ; if ( output . gpus === "" ) { contents . Gpus = [ ] ; } if ( output [ "gpus" ] !== undefined && output [ "gpus" ] [ "item" ] !== undefined ) { contents . Gpus = deserializeAws_ec2GpuDeviceInfoList ( __getArrayIfSingleItem ( output [ "gpus" ] [ "item" ] ) , context ) ; } if ( output [ "totalGpuMemoryInMiB" ] !== undefined ) { contents . TotalGpuMemoryInMiB = __strictParseInt32 ( output [ "totalGpuMemoryInMiB" ] ) as number ; } return contents ; } ; const deserializeAws_ec2GroupIdentifier = ( output , context ) : GroupIdentifier => { const contents = { GroupName : undefined , GroupId : undefined , } ; if ( output [ "groupName" ] !== undefined ) { contents . GroupName = __expectString ( output [ "groupName" ] ) ; } if ( output [ "groupId" ] !== undefined ) { contents . GroupId = __expectString ( output [ "groupId" ] ) ; } return contents ; } ; const deserializeAws_ec2GroupIdentifierList = ( output , context ) : GroupIdentifier [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2GroupIdentifier ( entry , context ) ; } ) ; } ; const deserializeAws_ec2GroupIdentifierSet = ( output , context ) : SecurityGroupIdentifier [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SecurityGroupIdentifier ( entry , context ) ; } ) ; } ; const deserializeAws_ec2GroupIdStringList = ( 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_ec2HibernationOptions = ( output , context ) : HibernationOptions => { const contents = { Configured : undefined , } ; if ( output [ "configured" ] !== undefined ) { contents . Configured = __parseBoolean ( output [ "configured" ] ) ; } return contents ; } ; const deserializeAws_ec2HistoryRecord = ( output , context ) : HistoryRecord => { const contents = { EventInformation : undefined , EventType : undefined , Timestamp : undefined , } ; if ( output [ "eventInformation" ] !== undefined ) { contents . EventInformation = deserializeAws_ec2EventInformation ( output [ "eventInformation" ] , context ) ; } if ( output [ "eventType" ] !== undefined ) { contents . EventType = __expectString ( output [ "eventType" ] ) ; } if ( output [ "timestamp" ] !== undefined ) { contents . Timestamp = __expectNonNull ( __parseRfc3339DateTime ( output [ "timestamp" ] ) ) ; } return contents ; } ; const deserializeAws_ec2HistoryRecordEntry = ( output , context ) : HistoryRecordEntry => { const contents = { EventInformation : undefined , EventType : undefined , Timestamp : undefined , } ; if ( output [ "eventInformation" ] !== undefined ) { contents . EventInformation = deserializeAws_ec2EventInformation ( output [ "eventInformation" ] , context ) ; } if ( output [ "eventType" ] !== undefined ) { contents . EventType = __expectString ( output [ "eventType" ] ) ; } if ( output [ "timestamp" ] !== undefined ) { contents . Timestamp = __expectNonNull ( __parseRfc3339DateTime ( output [ "timestamp" ] ) ) ; } return contents ; } ; const deserializeAws_ec2HistoryRecords = ( output , context ) : HistoryRecord [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2HistoryRecord ( entry , context ) ; } ) ; } ; const deserializeAws_ec2HistoryRecordSet = ( output , context ) : HistoryRecordEntry [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2HistoryRecordEntry ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Host = ( output , context ) : Host => { const contents = { AutoPlacement : undefined , AvailabilityZone : undefined , AvailableCapacity : undefined , ClientToken : undefined , HostId : undefined , HostProperties : undefined , HostReservationId : undefined , Instances : undefined , State : undefined , AllocationTime : undefined , ReleaseTime : undefined , Tags : undefined , HostRecovery : undefined , AllowsMultipleInstanceTypes : undefined , OwnerId : undefined , AvailabilityZoneId : undefined , MemberOfServiceLinkedResourceGroup : undefined , } ; if ( output [ "autoPlacement" ] !== undefined ) { contents . AutoPlacement = __expectString ( output [ "autoPlacement" ] ) ; } if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "availableCapacity" ] !== undefined ) { contents . AvailableCapacity = deserializeAws_ec2AvailableCapacity ( output [ "availableCapacity" ] , context ) ; } if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } if ( output [ "hostId" ] !== undefined ) { contents . HostId = __expectString ( output [ "hostId" ] ) ; } if ( output [ "hostProperties" ] !== undefined ) { contents . HostProperties = deserializeAws_ec2HostProperties ( output [ "hostProperties" ] , context ) ; } if ( output [ "hostReservationId" ] !== undefined ) { contents . HostReservationId = __expectString ( output [ "hostReservationId" ] ) ; } if ( output . instances === "" ) { contents . Instances = [ ] ; } if ( output [ "instances" ] !== undefined && output [ "instances" ] [ "item" ] !== undefined ) { contents . Instances = deserializeAws_ec2HostInstanceList ( __getArrayIfSingleItem ( output [ "instances" ] [ "item" ] ) , context ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "allocationTime" ] !== undefined ) { contents . AllocationTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "allocationTime" ] ) ) ; } if ( output [ "releaseTime" ] !== undefined ) { contents . ReleaseTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "releaseTime" ] ) ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "hostRecovery" ] !== undefined ) { contents . HostRecovery = __expectString ( output [ "hostRecovery" ] ) ; } if ( output [ "allowsMultipleInstanceTypes" ] !== undefined ) { contents . AllowsMultipleInstanceTypes = __expectString ( output [ "allowsMultipleInstanceTypes" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "availabilityZoneId" ] !== undefined ) { contents . AvailabilityZoneId = __expectString ( output [ "availabilityZoneId" ] ) ; } if ( output [ "memberOfServiceLinkedResourceGroup" ] !== undefined ) { contents . MemberOfServiceLinkedResourceGroup = __parseBoolean ( output [ "memberOfServiceLinkedResourceGroup" ] ) ; } return contents ; } ; const deserializeAws_ec2HostInstance = ( output , context ) : HostInstance => { const contents = { InstanceId : undefined , InstanceType : undefined , OwnerId : undefined , } ; if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } return contents ; } ; const deserializeAws_ec2HostInstanceList = ( output , context ) : HostInstance [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2HostInstance ( entry , context ) ; } ) ; } ; const deserializeAws_ec2HostList = ( output , context ) : Host [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Host ( entry , context ) ; } ) ; } ; const deserializeAws_ec2HostOffering = ( output , context ) : HostOffering => { const contents = { CurrencyCode : undefined , Duration : undefined , HourlyPrice : undefined , InstanceFamily : undefined , OfferingId : undefined , PaymentOption : undefined , UpfrontPrice : undefined , } ; if ( output [ "currencyCode" ] !== undefined ) { contents . CurrencyCode = __expectString ( output [ "currencyCode" ] ) ; } if ( output [ "duration" ] !== undefined ) { contents . Duration = __strictParseInt32 ( output [ "duration" ] ) as number ; } if ( output [ "hourlyPrice" ] !== undefined ) { contents . HourlyPrice = __expectString ( output [ "hourlyPrice" ] ) ; } if ( output [ "instanceFamily" ] !== undefined ) { contents . InstanceFamily = __expectString ( output [ "instanceFamily" ] ) ; } if ( output [ "offeringId" ] !== undefined ) { contents . OfferingId = __expectString ( output [ "offeringId" ] ) ; } if ( output [ "paymentOption" ] !== undefined ) { contents . PaymentOption = __expectString ( output [ "paymentOption" ] ) ; } if ( output [ "upfrontPrice" ] !== undefined ) { contents . UpfrontPrice = __expectString ( output [ "upfrontPrice" ] ) ; } return contents ; } ; const deserializeAws_ec2HostOfferingSet = ( output , context ) : HostOffering [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2HostOffering ( entry , context ) ; } ) ; } ; const deserializeAws_ec2HostProperties = ( output , context ) : HostProperties => { const contents = { Cores : undefined , InstanceType : undefined , InstanceFamily : undefined , Sockets : undefined , TotalVCpus : undefined , } ; if ( output [ "cores" ] !== undefined ) { contents . Cores = __strictParseInt32 ( output [ "cores" ] ) as number ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "instanceFamily" ] !== undefined ) { contents . InstanceFamily = __expectString ( output [ "instanceFamily" ] ) ; } if ( output [ "sockets" ] !== undefined ) { contents . Sockets = __strictParseInt32 ( output [ "sockets" ] ) as number ; } if ( output [ "totalVCpus" ] !== undefined ) { contents . TotalVCpus = __strictParseInt32 ( output [ "totalVCpus" ] ) as number ; } return contents ; } ; const deserializeAws_ec2HostReservation = ( output , context ) : HostReservation => { const contents = { Count : undefined , CurrencyCode : undefined , Duration : undefined , End : undefined , HostIdSet : undefined , HostReservationId : undefined , HourlyPrice : undefined , InstanceFamily : undefined , OfferingId : undefined , PaymentOption : undefined , Start : undefined , State : undefined , UpfrontPrice : undefined , Tags : undefined , } ; if ( output [ "count" ] !== undefined ) { contents . Count = __strictParseInt32 ( output [ "count" ] ) as number ; } if ( output [ "currencyCode" ] !== undefined ) { contents . CurrencyCode = __expectString ( output [ "currencyCode" ] ) ; } if ( output [ "duration" ] !== undefined ) { contents . Duration = __strictParseInt32 ( output [ "duration" ] ) as number ; } if ( output [ "end" ] !== undefined ) { contents . End = __expectNonNull ( __parseRfc3339DateTime ( output [ "end" ] ) ) ; } if ( output . hostIdSet === "" ) { contents . HostIdSet = [ ] ; } if ( output [ "hostIdSet" ] !== undefined && output [ "hostIdSet" ] [ "item" ] !== undefined ) { contents . HostIdSet = deserializeAws_ec2ResponseHostIdSet ( __getArrayIfSingleItem ( output [ "hostIdSet" ] [ "item" ] ) , context ) ; } if ( output [ "hostReservationId" ] !== undefined ) { contents . HostReservationId = __expectString ( output [ "hostReservationId" ] ) ; } if ( output [ "hourlyPrice" ] !== undefined ) { contents . HourlyPrice = __expectString ( output [ "hourlyPrice" ] ) ; } if ( output [ "instanceFamily" ] !== undefined ) { contents . InstanceFamily = __expectString ( output [ "instanceFamily" ] ) ; } if ( output [ "offeringId" ] !== undefined ) { contents . OfferingId = __expectString ( output [ "offeringId" ] ) ; } if ( output [ "paymentOption" ] !== undefined ) { contents . PaymentOption = __expectString ( output [ "paymentOption" ] ) ; } if ( output [ "start" ] !== undefined ) { contents . Start = __expectNonNull ( __parseRfc3339DateTime ( output [ "start" ] ) ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "upfrontPrice" ] !== undefined ) { contents . UpfrontPrice = __expectString ( output [ "upfrontPrice" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2HostReservationSet = ( output , context ) : HostReservation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2HostReservation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2IamInstanceProfile = ( output , context ) : IamInstanceProfile => { const contents = { Arn : undefined , Id : undefined , } ; if ( output [ "arn" ] !== undefined ) { contents . Arn = __expectString ( output [ "arn" ] ) ; } if ( output [ "id" ] !== undefined ) { contents . Id = __expectString ( output [ "id" ] ) ; } return contents ; } ; const deserializeAws_ec2IamInstanceProfileAssociation = ( output , context ) : IamInstanceProfileAssociation => { const contents = { AssociationId : undefined , InstanceId : undefined , IamInstanceProfile : undefined , State : undefined , Timestamp : undefined , } ; if ( output [ "associationId" ] !== undefined ) { contents . AssociationId = __expectString ( output [ "associationId" ] ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "iamInstanceProfile" ] !== undefined ) { contents . IamInstanceProfile = deserializeAws_ec2IamInstanceProfile ( output [ "iamInstanceProfile" ] , context ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "timestamp" ] !== undefined ) { contents . Timestamp = __expectNonNull ( __parseRfc3339DateTime ( output [ "timestamp" ] ) ) ; } return contents ; } ; const deserializeAws_ec2IamInstanceProfileAssociationSet = ( output , context ) : IamInstanceProfileAssociation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2IamInstanceProfileAssociation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2IamInstanceProfileSpecification = ( output , context ) : IamInstanceProfileSpecification => { const contents = { Arn : undefined , Name : undefined , } ; if ( output [ "arn" ] !== undefined ) { contents . Arn = __expectString ( output [ "arn" ] ) ; } if ( output [ "name" ] !== undefined ) { contents . Name = __expectString ( output [ "name" ] ) ; } return contents ; } ; const deserializeAws_ec2IcmpTypeCode = ( output , context ) : IcmpTypeCode => { const contents = { Code : undefined , Type : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __strictParseInt32 ( output [ "code" ] ) as number ; } if ( output [ "type" ] !== undefined ) { contents . Type = __strictParseInt32 ( output [ "type" ] ) as number ; } return contents ; } ; const deserializeAws_ec2IdFormat = ( output , context ) : IdFormat => { const contents = { Deadline : undefined , Resource : undefined , UseLongIds : undefined , } ; if ( output [ "deadline" ] !== undefined ) { contents . Deadline = __expectNonNull ( __parseRfc3339DateTime ( output [ "deadline" ] ) ) ; } if ( output [ "resource" ] !== undefined ) { contents . Resource = __expectString ( output [ "resource" ] ) ; } if ( output [ "useLongIds" ] !== undefined ) { contents . UseLongIds = __parseBoolean ( output [ "useLongIds" ] ) ; } return contents ; } ; const deserializeAws_ec2IdFormatList = ( output , context ) : IdFormat [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2IdFormat ( entry , context ) ; } ) ; } ; const deserializeAws_ec2IKEVersionsList = ( output , context ) : IKEVersionsListValue [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2IKEVersionsListValue ( entry , context ) ; } ) ; } ; const deserializeAws_ec2IKEVersionsListValue = ( output , context ) : IKEVersionsListValue => { const contents = { Value : undefined , } ; if ( output [ "value" ] !== undefined ) { contents . Value = __expectString ( output [ "value" ] ) ; } return contents ; } ; const deserializeAws_ec2Image = ( output , context ) : Image => { const contents = { Architecture : undefined , CreationDate : undefined , ImageId : undefined , ImageLocation : undefined , ImageType : undefined , Public : undefined , KernelId : undefined , OwnerId : undefined , Platform : undefined , PlatformDetails : undefined , UsageOperation : undefined , ProductCodes : undefined , RamdiskId : undefined , State : undefined , BlockDeviceMappings : undefined , Description : undefined , EnaSupport : undefined , Hypervisor : undefined , ImageOwnerAlias : undefined , Name : undefined , RootDeviceName : undefined , RootDeviceType : undefined , SriovNetSupport : undefined , StateReason : undefined , Tags : undefined , VirtualizationType : undefined , BootMode : undefined , DeprecationTime : undefined , } ; if ( output [ "architecture" ] !== undefined ) { contents . Architecture = __expectString ( output [ "architecture" ] ) ; } if ( output [ "creationDate" ] !== undefined ) { contents . CreationDate = __expectString ( output [ "creationDate" ] ) ; } if ( output [ "imageId" ] !== undefined ) { contents . ImageId = __expectString ( output [ "imageId" ] ) ; } if ( output [ "imageLocation" ] !== undefined ) { contents . ImageLocation = __expectString ( output [ "imageLocation" ] ) ; } if ( output [ "imageType" ] !== undefined ) { contents . ImageType = __expectString ( output [ "imageType" ] ) ; } if ( output [ "isPublic" ] !== undefined ) { contents . Public = __parseBoolean ( output [ "isPublic" ] ) ; } if ( output [ "kernelId" ] !== undefined ) { contents . KernelId = __expectString ( output [ "kernelId" ] ) ; } if ( output [ "imageOwnerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "imageOwnerId" ] ) ; } if ( output [ "platform" ] !== undefined ) { contents . Platform = __expectString ( output [ "platform" ] ) ; } if ( output [ "platformDetails" ] !== undefined ) { contents . PlatformDetails = __expectString ( output [ "platformDetails" ] ) ; } if ( output [ "usageOperation" ] !== undefined ) { contents . UsageOperation = __expectString ( output [ "usageOperation" ] ) ; } if ( output . productCodes === "" ) { contents . ProductCodes = [ ] ; } if ( output [ "productCodes" ] !== undefined && output [ "productCodes" ] [ "item" ] !== undefined ) { contents . ProductCodes = deserializeAws_ec2ProductCodeList ( __getArrayIfSingleItem ( output [ "productCodes" ] [ "item" ] ) , context ) ; } if ( output [ "ramdiskId" ] !== undefined ) { contents . RamdiskId = __expectString ( output [ "ramdiskId" ] ) ; } if ( output [ "imageState" ] !== undefined ) { contents . State = __expectString ( output [ "imageState" ] ) ; } if ( output . blockDeviceMapping === "" ) { contents . BlockDeviceMappings = [ ] ; } if ( output [ "blockDeviceMapping" ] !== undefined && output [ "blockDeviceMapping" ] [ "item" ] !== undefined ) { contents . BlockDeviceMappings = deserializeAws_ec2BlockDeviceMappingList ( __getArrayIfSingleItem ( output [ "blockDeviceMapping" ] [ "item" ] ) , context ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "enaSupport" ] !== undefined ) { contents . EnaSupport = __parseBoolean ( output [ "enaSupport" ] ) ; } if ( output [ "hypervisor" ] !== undefined ) { contents . Hypervisor = __expectString ( output [ "hypervisor" ] ) ; } if ( output [ "imageOwnerAlias" ] !== undefined ) { contents . ImageOwnerAlias = __expectString ( output [ "imageOwnerAlias" ] ) ; } if ( output [ "name" ] !== undefined ) { contents . Name = __expectString ( output [ "name" ] ) ; } if ( output [ "rootDeviceName" ] !== undefined ) { contents . RootDeviceName = __expectString ( output [ "rootDeviceName" ] ) ; } if ( output [ "rootDeviceType" ] !== undefined ) { contents . RootDeviceType = __expectString ( output [ "rootDeviceType" ] ) ; } if ( output [ "sriovNetSupport" ] !== undefined ) { contents . SriovNetSupport = __expectString ( output [ "sriovNetSupport" ] ) ; } if ( output [ "stateReason" ] !== undefined ) { contents . StateReason = deserializeAws_ec2StateReason ( output [ "stateReason" ] , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "virtualizationType" ] !== undefined ) { contents . VirtualizationType = __expectString ( output [ "virtualizationType" ] ) ; } if ( output [ "bootMode" ] !== undefined ) { contents . BootMode = __expectString ( output [ "bootMode" ] ) ; } if ( output [ "deprecationTime" ] !== undefined ) { contents . DeprecationTime = __expectString ( output [ "deprecationTime" ] ) ; } return contents ; } ; const deserializeAws_ec2ImageAttribute = ( output , context ) : ImageAttribute => { const contents = { BlockDeviceMappings : undefined , ImageId : undefined , LaunchPermissions : undefined , ProductCodes : undefined , Description : undefined , KernelId : undefined , RamdiskId : undefined , SriovNetSupport : undefined , BootMode : undefined , } ; if ( output . blockDeviceMapping === "" ) { contents . BlockDeviceMappings = [ ] ; } if ( output [ "blockDeviceMapping" ] !== undefined && output [ "blockDeviceMapping" ] [ "item" ] !== undefined ) { contents . BlockDeviceMappings = deserializeAws_ec2BlockDeviceMappingList ( __getArrayIfSingleItem ( output [ "blockDeviceMapping" ] [ "item" ] ) , context ) ; } if ( output [ "imageId" ] !== undefined ) { contents . ImageId = __expectString ( output [ "imageId" ] ) ; } if ( output . launchPermission === "" ) { contents . LaunchPermissions = [ ] ; } if ( output [ "launchPermission" ] !== undefined && output [ "launchPermission" ] [ "item" ] !== undefined ) { contents . LaunchPermissions = deserializeAws_ec2LaunchPermissionList ( __getArrayIfSingleItem ( output [ "launchPermission" ] [ "item" ] ) , context ) ; } if ( output . productCodes === "" ) { contents . ProductCodes = [ ] ; } if ( output [ "productCodes" ] !== undefined && output [ "productCodes" ] [ "item" ] !== undefined ) { contents . ProductCodes = deserializeAws_ec2ProductCodeList ( __getArrayIfSingleItem ( output [ "productCodes" ] [ "item" ] ) , context ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = deserializeAws_ec2AttributeValue ( output [ "description" ] , context ) ; } if ( output [ "kernel" ] !== undefined ) { contents . KernelId = deserializeAws_ec2AttributeValue ( output [ "kernel" ] , context ) ; } if ( output [ "ramdisk" ] !== undefined ) { contents . RamdiskId = deserializeAws_ec2AttributeValue ( output [ "ramdisk" ] , context ) ; } if ( output [ "sriovNetSupport" ] !== undefined ) { contents . SriovNetSupport = deserializeAws_ec2AttributeValue ( output [ "sriovNetSupport" ] , context ) ; } if ( output [ "bootMode" ] !== undefined ) { contents . BootMode = deserializeAws_ec2AttributeValue ( output [ "bootMode" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ImageList = ( output , context ) : Image [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Image ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ImportClientVpnClientCertificateRevocationListResult = ( output , context ) : ImportClientVpnClientCertificateRevocationListResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ImportImageLicenseConfigurationResponse = ( output , context ) : ImportImageLicenseConfigurationResponse => { const contents = { LicenseConfigurationArn : undefined , } ; if ( output [ "licenseConfigurationArn" ] !== undefined ) { contents . LicenseConfigurationArn = __expectString ( output [ "licenseConfigurationArn" ] ) ; } return contents ; } ; const deserializeAws_ec2ImportImageLicenseSpecificationListResponse = ( output , context ) : ImportImageLicenseConfigurationResponse [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ImportImageLicenseConfigurationResponse ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ImportImageResult = ( output , context ) : ImportImageResult => { const contents = { Architecture : undefined , Description : undefined , Encrypted : undefined , Hypervisor : undefined , ImageId : undefined , ImportTaskId : undefined , KmsKeyId : undefined , LicenseType : undefined , Platform : undefined , Progress : undefined , SnapshotDetails : undefined , Status : undefined , StatusMessage : undefined , LicenseSpecifications : undefined , Tags : undefined , UsageOperation : undefined , } ; if ( output [ "architecture" ] !== undefined ) { contents . Architecture = __expectString ( output [ "architecture" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "encrypted" ] !== undefined ) { contents . Encrypted = __parseBoolean ( output [ "encrypted" ] ) ; } if ( output [ "hypervisor" ] !== undefined ) { contents . Hypervisor = __expectString ( output [ "hypervisor" ] ) ; } if ( output [ "imageId" ] !== undefined ) { contents . ImageId = __expectString ( output [ "imageId" ] ) ; } if ( output [ "importTaskId" ] !== undefined ) { contents . ImportTaskId = __expectString ( output [ "importTaskId" ] ) ; } if ( output [ "kmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "kmsKeyId" ] ) ; } if ( output [ "licenseType" ] !== undefined ) { contents . LicenseType = __expectString ( output [ "licenseType" ] ) ; } if ( output [ "platform" ] !== undefined ) { contents . Platform = __expectString ( output [ "platform" ] ) ; } if ( output [ "progress" ] !== undefined ) { contents . Progress = __expectString ( output [ "progress" ] ) ; } if ( output . snapshotDetailSet === "" ) { contents . SnapshotDetails = [ ] ; } if ( output [ "snapshotDetailSet" ] !== undefined && output [ "snapshotDetailSet" ] [ "item" ] !== undefined ) { contents . SnapshotDetails = deserializeAws_ec2SnapshotDetailList ( __getArrayIfSingleItem ( output [ "snapshotDetailSet" ] [ "item" ] ) , context ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output . licenseSpecifications === "" ) { contents . LicenseSpecifications = [ ] ; } if ( output [ "licenseSpecifications" ] !== undefined && output [ "licenseSpecifications" ] [ "item" ] !== undefined ) { contents . LicenseSpecifications = deserializeAws_ec2ImportImageLicenseSpecificationListResponse ( __getArrayIfSingleItem ( output [ "licenseSpecifications" ] [ "item" ] ) , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "usageOperation" ] !== undefined ) { contents . UsageOperation = __expectString ( output [ "usageOperation" ] ) ; } return contents ; } ; const deserializeAws_ec2ImportImageTask = ( output , context ) : ImportImageTask => { const contents = { Architecture : undefined , Description : undefined , Encrypted : undefined , Hypervisor : undefined , ImageId : undefined , ImportTaskId : undefined , KmsKeyId : undefined , LicenseType : undefined , Platform : undefined , Progress : undefined , SnapshotDetails : undefined , Status : undefined , StatusMessage : undefined , Tags : undefined , LicenseSpecifications : undefined , UsageOperation : undefined , BootMode : undefined , } ; if ( output [ "architecture" ] !== undefined ) { contents . Architecture = __expectString ( output [ "architecture" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "encrypted" ] !== undefined ) { contents . Encrypted = __parseBoolean ( output [ "encrypted" ] ) ; } if ( output [ "hypervisor" ] !== undefined ) { contents . Hypervisor = __expectString ( output [ "hypervisor" ] ) ; } if ( output [ "imageId" ] !== undefined ) { contents . ImageId = __expectString ( output [ "imageId" ] ) ; } if ( output [ "importTaskId" ] !== undefined ) { contents . ImportTaskId = __expectString ( output [ "importTaskId" ] ) ; } if ( output [ "kmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "kmsKeyId" ] ) ; } if ( output [ "licenseType" ] !== undefined ) { contents . LicenseType = __expectString ( output [ "licenseType" ] ) ; } if ( output [ "platform" ] !== undefined ) { contents . Platform = __expectString ( output [ "platform" ] ) ; } if ( output [ "progress" ] !== undefined ) { contents . Progress = __expectString ( output [ "progress" ] ) ; } if ( output . snapshotDetailSet === "" ) { contents . SnapshotDetails = [ ] ; } if ( output [ "snapshotDetailSet" ] !== undefined && output [ "snapshotDetailSet" ] [ "item" ] !== undefined ) { contents . SnapshotDetails = deserializeAws_ec2SnapshotDetailList ( __getArrayIfSingleItem ( output [ "snapshotDetailSet" ] [ "item" ] ) , context ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output . licenseSpecifications === "" ) { contents . LicenseSpecifications = [ ] ; } if ( output [ "licenseSpecifications" ] !== undefined && output [ "licenseSpecifications" ] [ "item" ] !== undefined ) { contents . LicenseSpecifications = deserializeAws_ec2ImportImageLicenseSpecificationListResponse ( __getArrayIfSingleItem ( output [ "licenseSpecifications" ] [ "item" ] ) , context ) ; } if ( output [ "usageOperation" ] !== undefined ) { contents . UsageOperation = __expectString ( output [ "usageOperation" ] ) ; } if ( output [ "bootMode" ] !== undefined ) { contents . BootMode = __expectString ( output [ "bootMode" ] ) ; } return contents ; } ; const deserializeAws_ec2ImportImageTaskList = ( output , context ) : ImportImageTask [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ImportImageTask ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ImportInstanceResult = ( output , context ) : ImportInstanceResult => { const contents = { ConversionTask : undefined , } ; if ( output [ "conversionTask" ] !== undefined ) { contents . ConversionTask = deserializeAws_ec2ConversionTask ( output [ "conversionTask" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ImportInstanceTaskDetails = ( output , context ) : ImportInstanceTaskDetails => { const contents = { Description : undefined , InstanceId : undefined , Platform : undefined , Volumes : undefined , } ; if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "platform" ] !== undefined ) { contents . Platform = __expectString ( output [ "platform" ] ) ; } if ( output . volumes === "" ) { contents . Volumes = [ ] ; } if ( output [ "volumes" ] !== undefined && output [ "volumes" ] [ "item" ] !== undefined ) { contents . Volumes = deserializeAws_ec2ImportInstanceVolumeDetailSet ( __getArrayIfSingleItem ( output [ "volumes" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ImportInstanceVolumeDetailItem = ( output , context ) : ImportInstanceVolumeDetailItem => { const contents = { AvailabilityZone : undefined , BytesConverted : undefined , Description : undefined , Image : undefined , Status : undefined , StatusMessage : undefined , Volume : undefined , } ; if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "bytesConverted" ] !== undefined ) { contents . BytesConverted = __strictParseLong ( output [ "bytesConverted" ] ) as number ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "image" ] !== undefined ) { contents . Image = deserializeAws_ec2DiskImageDescription ( output [ "image" ] , context ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output [ "volume" ] !== undefined ) { contents . Volume = deserializeAws_ec2DiskImageVolumeDescription ( output [ "volume" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ImportInstanceVolumeDetailSet = ( output , context ) : ImportInstanceVolumeDetailItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ImportInstanceVolumeDetailItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ImportKeyPairResult = ( output , context ) : ImportKeyPairResult => { const contents = { KeyFingerprint : undefined , KeyName : undefined , KeyPairId : undefined , Tags : undefined , } ; if ( output [ "keyFingerprint" ] !== undefined ) { contents . KeyFingerprint = __expectString ( output [ "keyFingerprint" ] ) ; } if ( output [ "keyName" ] !== undefined ) { contents . KeyName = __expectString ( output [ "keyName" ] ) ; } if ( output [ "keyPairId" ] !== undefined ) { contents . KeyPairId = __expectString ( output [ "keyPairId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ImportSnapshotResult = ( output , context ) : ImportSnapshotResult => { const contents = { Description : undefined , ImportTaskId : undefined , SnapshotTaskDetail : undefined , Tags : undefined , } ; if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "importTaskId" ] !== undefined ) { contents . ImportTaskId = __expectString ( output [ "importTaskId" ] ) ; } if ( output [ "snapshotTaskDetail" ] !== undefined ) { contents . SnapshotTaskDetail = deserializeAws_ec2SnapshotTaskDetail ( output [ "snapshotTaskDetail" ] , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ImportSnapshotTask = ( output , context ) : ImportSnapshotTask => { const contents = { Description : undefined , ImportTaskId : undefined , SnapshotTaskDetail : undefined , Tags : undefined , } ; if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "importTaskId" ] !== undefined ) { contents . ImportTaskId = __expectString ( output [ "importTaskId" ] ) ; } if ( output [ "snapshotTaskDetail" ] !== undefined ) { contents . SnapshotTaskDetail = deserializeAws_ec2SnapshotTaskDetail ( output [ "snapshotTaskDetail" ] , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ImportSnapshotTaskList = ( output , context ) : ImportSnapshotTask [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ImportSnapshotTask ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ImportVolumeResult = ( output , context ) : ImportVolumeResult => { const contents = { ConversionTask : undefined , } ; if ( output [ "conversionTask" ] !== undefined ) { contents . ConversionTask = deserializeAws_ec2ConversionTask ( output [ "conversionTask" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ImportVolumeTaskDetails = ( output , context ) : ImportVolumeTaskDetails => { const contents = { AvailabilityZone : undefined , BytesConverted : undefined , Description : undefined , Image : undefined , Volume : undefined , } ; if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "bytesConverted" ] !== undefined ) { contents . BytesConverted = __strictParseLong ( output [ "bytesConverted" ] ) as number ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "image" ] !== undefined ) { contents . Image = deserializeAws_ec2DiskImageDescription ( output [ "image" ] , context ) ; } if ( output [ "volume" ] !== undefined ) { contents . Volume = deserializeAws_ec2DiskImageVolumeDescription ( output [ "volume" ] , context ) ; } return contents ; } ; const deserializeAws_ec2InferenceAcceleratorInfo = ( output , context ) : InferenceAcceleratorInfo => { const contents = { Accelerators : undefined , } ; if ( output . accelerators === "" ) { contents . Accelerators = [ ] ; } if ( output [ "accelerators" ] !== undefined && output [ "accelerators" ] [ "member" ] !== undefined ) { contents . Accelerators = deserializeAws_ec2InferenceDeviceInfoList ( __getArrayIfSingleItem ( output [ "accelerators" ] [ "member" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2InferenceDeviceInfo = ( output , context ) : InferenceDeviceInfo => { const contents = { Count : undefined , Name : undefined , Manufacturer : undefined , } ; if ( output [ "count" ] !== undefined ) { contents . Count = __strictParseInt32 ( output [ "count" ] ) as number ; } if ( output [ "name" ] !== undefined ) { contents . Name = __expectString ( output [ "name" ] ) ; } if ( output [ "manufacturer" ] !== undefined ) { contents . Manufacturer = __expectString ( output [ "manufacturer" ] ) ; } return contents ; } ; const deserializeAws_ec2InferenceDeviceInfoList = ( output , context ) : InferenceDeviceInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InferenceDeviceInfo ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InsideCidrBlocksStringList = ( 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_ec2Instance = ( output , context ) : Instance => { const contents = { AmiLaunchIndex : undefined , ImageId : undefined , InstanceId : undefined , InstanceType : undefined , KernelId : undefined , KeyName : undefined , LaunchTime : undefined , Monitoring : undefined , Placement : undefined , Platform : undefined , PrivateDnsName : undefined , PrivateIpAddress : undefined , ProductCodes : undefined , PublicDnsName : undefined , PublicIpAddress : undefined , RamdiskId : undefined , State : undefined , StateTransitionReason : undefined , SubnetId : undefined , VpcId : undefined , Architecture : undefined , BlockDeviceMappings : undefined , ClientToken : undefined , EbsOptimized : undefined , EnaSupport : undefined , Hypervisor : undefined , IamInstanceProfile : undefined , InstanceLifecycle : undefined , ElasticGpuAssociations : undefined , ElasticInferenceAcceleratorAssociations : undefined , NetworkInterfaces : undefined , OutpostArn : undefined , RootDeviceName : undefined , RootDeviceType : undefined , SecurityGroups : undefined , SourceDestCheck : undefined , SpotInstanceRequestId : undefined , SriovNetSupport : undefined , StateReason : undefined , Tags : undefined , VirtualizationType : undefined , CpuOptions : undefined , CapacityReservationId : undefined , CapacityReservationSpecification : undefined , HibernationOptions : undefined , Licenses : undefined , MetadataOptions : undefined , EnclaveOptions : undefined , BootMode : undefined , PlatformDetails : undefined , UsageOperation : undefined , UsageOperationUpdateTime : undefined , PrivateDnsNameOptions : undefined , Ipv6Address : undefined , } ; if ( output [ "amiLaunchIndex" ] !== undefined ) { contents . AmiLaunchIndex = __strictParseInt32 ( output [ "amiLaunchIndex" ] ) as number ; } if ( output [ "imageId" ] !== undefined ) { contents . ImageId = __expectString ( output [ "imageId" ] ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "kernelId" ] !== undefined ) { contents . KernelId = __expectString ( output [ "kernelId" ] ) ; } if ( output [ "keyName" ] !== undefined ) { contents . KeyName = __expectString ( output [ "keyName" ] ) ; } if ( output [ "launchTime" ] !== undefined ) { contents . LaunchTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "launchTime" ] ) ) ; } if ( output [ "monitoring" ] !== undefined ) { contents . Monitoring = deserializeAws_ec2Monitoring ( output [ "monitoring" ] , context ) ; } if ( output [ "placement" ] !== undefined ) { contents . Placement = deserializeAws_ec2Placement ( output [ "placement" ] , context ) ; } if ( output [ "platform" ] !== undefined ) { contents . Platform = __expectString ( output [ "platform" ] ) ; } if ( output [ "privateDnsName" ] !== undefined ) { contents . PrivateDnsName = __expectString ( output [ "privateDnsName" ] ) ; } if ( output [ "privateIpAddress" ] !== undefined ) { contents . PrivateIpAddress = __expectString ( output [ "privateIpAddress" ] ) ; } if ( output . productCodes === "" ) { contents . ProductCodes = [ ] ; } if ( output [ "productCodes" ] !== undefined && output [ "productCodes" ] [ "item" ] !== undefined ) { contents . ProductCodes = deserializeAws_ec2ProductCodeList ( __getArrayIfSingleItem ( output [ "productCodes" ] [ "item" ] ) , context ) ; } if ( output [ "dnsName" ] !== undefined ) { contents . PublicDnsName = __expectString ( output [ "dnsName" ] ) ; } if ( output [ "ipAddress" ] !== undefined ) { contents . PublicIpAddress = __expectString ( output [ "ipAddress" ] ) ; } if ( output [ "ramdiskId" ] !== undefined ) { contents . RamdiskId = __expectString ( output [ "ramdiskId" ] ) ; } if ( output [ "instanceState" ] !== undefined ) { contents . State = deserializeAws_ec2InstanceState ( output [ "instanceState" ] , context ) ; } if ( output [ "reason" ] !== undefined ) { contents . StateTransitionReason = __expectString ( output [ "reason" ] ) ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "architecture" ] !== undefined ) { contents . Architecture = __expectString ( output [ "architecture" ] ) ; } if ( output . blockDeviceMapping === "" ) { contents . BlockDeviceMappings = [ ] ; } if ( output [ "blockDeviceMapping" ] !== undefined && output [ "blockDeviceMapping" ] [ "item" ] !== undefined ) { contents . BlockDeviceMappings = deserializeAws_ec2InstanceBlockDeviceMappingList ( __getArrayIfSingleItem ( output [ "blockDeviceMapping" ] [ "item" ] ) , context ) ; } if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } if ( output [ "ebsOptimized" ] !== undefined ) { contents . EbsOptimized = __parseBoolean ( output [ "ebsOptimized" ] ) ; } if ( output [ "enaSupport" ] !== undefined ) { contents . EnaSupport = __parseBoolean ( output [ "enaSupport" ] ) ; } if ( output [ "hypervisor" ] !== undefined ) { contents . Hypervisor = __expectString ( output [ "hypervisor" ] ) ; } if ( output [ "iamInstanceProfile" ] !== undefined ) { contents . IamInstanceProfile = deserializeAws_ec2IamInstanceProfile ( output [ "iamInstanceProfile" ] , context ) ; } if ( output [ "instanceLifecycle" ] !== undefined ) { contents . InstanceLifecycle = __expectString ( output [ "instanceLifecycle" ] ) ; } if ( output . elasticGpuAssociationSet === "" ) { contents . ElasticGpuAssociations = [ ] ; } if ( output [ "elasticGpuAssociationSet" ] !== undefined && output [ "elasticGpuAssociationSet" ] [ "item" ] !== undefined ) { contents . ElasticGpuAssociations = deserializeAws_ec2ElasticGpuAssociationList ( __getArrayIfSingleItem ( output [ "elasticGpuAssociationSet" ] [ "item" ] ) , context ) ; } if ( output . elasticInferenceAcceleratorAssociationSet === "" ) { contents . ElasticInferenceAcceleratorAssociations = [ ] ; } if ( output [ "elasticInferenceAcceleratorAssociationSet" ] !== undefined && output [ "elasticInferenceAcceleratorAssociationSet" ] [ "item" ] !== undefined ) { contents . ElasticInferenceAcceleratorAssociations = deserializeAws_ec2ElasticInferenceAcceleratorAssociationList ( __getArrayIfSingleItem ( output [ "elasticInferenceAcceleratorAssociationSet" ] [ "item" ] ) , context ) ; } if ( output . networkInterfaceSet === "" ) { contents . NetworkInterfaces = [ ] ; } if ( output [ "networkInterfaceSet" ] !== undefined && output [ "networkInterfaceSet" ] [ "item" ] !== undefined ) { contents . NetworkInterfaces = deserializeAws_ec2InstanceNetworkInterfaceList ( __getArrayIfSingleItem ( output [ "networkInterfaceSet" ] [ "item" ] ) , context ) ; } if ( output [ "outpostArn" ] !== undefined ) { contents . OutpostArn = __expectString ( output [ "outpostArn" ] ) ; } if ( output [ "rootDeviceName" ] !== undefined ) { contents . RootDeviceName = __expectString ( output [ "rootDeviceName" ] ) ; } if ( output [ "rootDeviceType" ] !== undefined ) { contents . RootDeviceType = __expectString ( output [ "rootDeviceType" ] ) ; } if ( output . groupSet === "" ) { contents . SecurityGroups = [ ] ; } if ( output [ "groupSet" ] !== undefined && output [ "groupSet" ] [ "item" ] !== undefined ) { contents . SecurityGroups = deserializeAws_ec2GroupIdentifierList ( __getArrayIfSingleItem ( output [ "groupSet" ] [ "item" ] ) , context ) ; } if ( output [ "sourceDestCheck" ] !== undefined ) { contents . SourceDestCheck = __parseBoolean ( output [ "sourceDestCheck" ] ) ; } if ( output [ "spotInstanceRequestId" ] !== undefined ) { contents . SpotInstanceRequestId = __expectString ( output [ "spotInstanceRequestId" ] ) ; } if ( output [ "sriovNetSupport" ] !== undefined ) { contents . SriovNetSupport = __expectString ( output [ "sriovNetSupport" ] ) ; } if ( output [ "stateReason" ] !== undefined ) { contents . StateReason = deserializeAws_ec2StateReason ( output [ "stateReason" ] , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "virtualizationType" ] !== undefined ) { contents . VirtualizationType = __expectString ( output [ "virtualizationType" ] ) ; } if ( output [ "cpuOptions" ] !== undefined ) { contents . CpuOptions = deserializeAws_ec2CpuOptions ( output [ "cpuOptions" ] , context ) ; } if ( output [ "capacityReservationId" ] !== undefined ) { contents . CapacityReservationId = __expectString ( output [ "capacityReservationId" ] ) ; } if ( output [ "capacityReservationSpecification" ] !== undefined ) { contents . CapacityReservationSpecification = deserializeAws_ec2CapacityReservationSpecificationResponse ( output [ "capacityReservationSpecification" ] , context ) ; } if ( output [ "hibernationOptions" ] !== undefined ) { contents . HibernationOptions = deserializeAws_ec2HibernationOptions ( output [ "hibernationOptions" ] , context ) ; } if ( output . licenseSet === "" ) { contents . Licenses = [ ] ; } if ( output [ "licenseSet" ] !== undefined && output [ "licenseSet" ] [ "item" ] !== undefined ) { contents . Licenses = deserializeAws_ec2LicenseList ( __getArrayIfSingleItem ( output [ "licenseSet" ] [ "item" ] ) , context ) ; } if ( output [ "metadataOptions" ] !== undefined ) { contents . MetadataOptions = deserializeAws_ec2InstanceMetadataOptionsResponse ( output [ "metadataOptions" ] , context ) ; } if ( output [ "enclaveOptions" ] !== undefined ) { contents . EnclaveOptions = deserializeAws_ec2EnclaveOptions ( output [ "enclaveOptions" ] , context ) ; } if ( output [ "bootMode" ] !== undefined ) { contents . BootMode = __expectString ( output [ "bootMode" ] ) ; } if ( output [ "platformDetails" ] !== undefined ) { contents . PlatformDetails = __expectString ( output [ "platformDetails" ] ) ; } if ( output [ "usageOperation" ] !== undefined ) { contents . UsageOperation = __expectString ( output [ "usageOperation" ] ) ; } if ( output [ "usageOperationUpdateTime" ] !== undefined ) { contents . UsageOperationUpdateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "usageOperationUpdateTime" ] ) ) ; } if ( output [ "privateDnsNameOptions" ] !== undefined ) { contents . PrivateDnsNameOptions = deserializeAws_ec2PrivateDnsNameOptionsResponse ( output [ "privateDnsNameOptions" ] , context ) ; } if ( output [ "ipv6Address" ] !== undefined ) { contents . Ipv6Address = __expectString ( output [ "ipv6Address" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceAttribute = ( output , context ) : InstanceAttribute => { const contents = { Groups : undefined , BlockDeviceMappings : undefined , DisableApiTermination : undefined , EnaSupport : undefined , EnclaveOptions : undefined , EbsOptimized : undefined , InstanceId : undefined , InstanceInitiatedShutdownBehavior : undefined , InstanceType : undefined , KernelId : undefined , ProductCodes : undefined , RamdiskId : undefined , RootDeviceName : undefined , SourceDestCheck : undefined , SriovNetSupport : undefined , UserData : undefined , } ; if ( output . groupSet === "" ) { contents . Groups = [ ] ; } if ( output [ "groupSet" ] !== undefined && output [ "groupSet" ] [ "item" ] !== undefined ) { contents . Groups = deserializeAws_ec2GroupIdentifierList ( __getArrayIfSingleItem ( output [ "groupSet" ] [ "item" ] ) , context ) ; } if ( output . blockDeviceMapping === "" ) { contents . BlockDeviceMappings = [ ] ; } if ( output [ "blockDeviceMapping" ] !== undefined && output [ "blockDeviceMapping" ] [ "item" ] !== undefined ) { contents . BlockDeviceMappings = deserializeAws_ec2InstanceBlockDeviceMappingList ( __getArrayIfSingleItem ( output [ "blockDeviceMapping" ] [ "item" ] ) , context ) ; } if ( output [ "disableApiTermination" ] !== undefined ) { contents . DisableApiTermination = deserializeAws_ec2AttributeBooleanValue ( output [ "disableApiTermination" ] , context ) ; } if ( output [ "enaSupport" ] !== undefined ) { contents . EnaSupport = deserializeAws_ec2AttributeBooleanValue ( output [ "enaSupport" ] , context ) ; } if ( output [ "enclaveOptions" ] !== undefined ) { contents . EnclaveOptions = deserializeAws_ec2EnclaveOptions ( output [ "enclaveOptions" ] , context ) ; } if ( output [ "ebsOptimized" ] !== undefined ) { contents . EbsOptimized = deserializeAws_ec2AttributeBooleanValue ( output [ "ebsOptimized" ] , context ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "instanceInitiatedShutdownBehavior" ] !== undefined ) { contents . InstanceInitiatedShutdownBehavior = deserializeAws_ec2AttributeValue ( output [ "instanceInitiatedShutdownBehavior" ] , context ) ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = deserializeAws_ec2AttributeValue ( output [ "instanceType" ] , context ) ; } if ( output [ "kernel" ] !== undefined ) { contents . KernelId = deserializeAws_ec2AttributeValue ( output [ "kernel" ] , context ) ; } if ( output . productCodes === "" ) { contents . ProductCodes = [ ] ; } if ( output [ "productCodes" ] !== undefined && output [ "productCodes" ] [ "item" ] !== undefined ) { contents . ProductCodes = deserializeAws_ec2ProductCodeList ( __getArrayIfSingleItem ( output [ "productCodes" ] [ "item" ] ) , context ) ; } if ( output [ "ramdisk" ] !== undefined ) { contents . RamdiskId = deserializeAws_ec2AttributeValue ( output [ "ramdisk" ] , context ) ; } if ( output [ "rootDeviceName" ] !== undefined ) { contents . RootDeviceName = deserializeAws_ec2AttributeValue ( output [ "rootDeviceName" ] , context ) ; } if ( output [ "sourceDestCheck" ] !== undefined ) { contents . SourceDestCheck = deserializeAws_ec2AttributeBooleanValue ( output [ "sourceDestCheck" ] , context ) ; } if ( output [ "sriovNetSupport" ] !== undefined ) { contents . SriovNetSupport = deserializeAws_ec2AttributeValue ( output [ "sriovNetSupport" ] , context ) ; } if ( output [ "userData" ] !== undefined ) { contents . UserData = deserializeAws_ec2AttributeValue ( output [ "userData" ] , context ) ; } return contents ; } ; const deserializeAws_ec2InstanceBlockDeviceMapping = ( output , context ) : InstanceBlockDeviceMapping => { const contents = { DeviceName : undefined , Ebs : undefined , } ; if ( output [ "deviceName" ] !== undefined ) { contents . DeviceName = __expectString ( output [ "deviceName" ] ) ; } if ( output [ "ebs" ] !== undefined ) { contents . Ebs = deserializeAws_ec2EbsInstanceBlockDevice ( output [ "ebs" ] , context ) ; } return contents ; } ; const deserializeAws_ec2InstanceBlockDeviceMappingList = ( output , context ) : InstanceBlockDeviceMapping [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceBlockDeviceMapping ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceCapacity = ( output , context ) : InstanceCapacity => { const contents = { AvailableCapacity : undefined , InstanceType : undefined , TotalCapacity : undefined , } ; if ( output [ "availableCapacity" ] !== undefined ) { contents . AvailableCapacity = __strictParseInt32 ( output [ "availableCapacity" ] ) as number ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "totalCapacity" ] !== undefined ) { contents . TotalCapacity = __strictParseInt32 ( output [ "totalCapacity" ] ) as number ; } return contents ; } ; const deserializeAws_ec2InstanceCount = ( output , context ) : InstanceCount => { const contents = { InstanceCount : undefined , State : undefined , } ; if ( output [ "instanceCount" ] !== undefined ) { contents . InstanceCount = __strictParseInt32 ( output [ "instanceCount" ] ) as number ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceCountList = ( output , context ) : InstanceCount [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceCount ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceCreditSpecification = ( output , context ) : InstanceCreditSpecification => { const contents = { InstanceId : undefined , CpuCredits : undefined , } ; if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "cpuCredits" ] !== undefined ) { contents . CpuCredits = __expectString ( output [ "cpuCredits" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceCreditSpecificationList = ( output , context ) : InstanceCreditSpecification [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceCreditSpecification ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceEventWindow = ( output , context ) : InstanceEventWindow => { const contents = { InstanceEventWindowId : undefined , TimeRanges : undefined , Name : undefined , CronExpression : undefined , AssociationTarget : undefined , State : undefined , Tags : undefined , } ; if ( output [ "instanceEventWindowId" ] !== undefined ) { contents . InstanceEventWindowId = __expectString ( output [ "instanceEventWindowId" ] ) ; } if ( output . timeRangeSet === "" ) { contents . TimeRanges = [ ] ; } if ( output [ "timeRangeSet" ] !== undefined && output [ "timeRangeSet" ] [ "item" ] !== undefined ) { contents . TimeRanges = deserializeAws_ec2InstanceEventWindowTimeRangeList ( __getArrayIfSingleItem ( output [ "timeRangeSet" ] [ "item" ] ) , context ) ; } if ( output [ "name" ] !== undefined ) { contents . Name = __expectString ( output [ "name" ] ) ; } if ( output [ "cronExpression" ] !== undefined ) { contents . CronExpression = __expectString ( output [ "cronExpression" ] ) ; } if ( output [ "associationTarget" ] !== undefined ) { contents . AssociationTarget = deserializeAws_ec2InstanceEventWindowAssociationTarget ( output [ "associationTarget" ] , context ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2InstanceEventWindowAssociationTarget = ( output , context ) : InstanceEventWindowAssociationTarget => { const contents = { InstanceIds : undefined , Tags : undefined , DedicatedHostIds : undefined , } ; if ( output . instanceIdSet === "" ) { contents . InstanceIds = [ ] ; } if ( output [ "instanceIdSet" ] !== undefined && output [ "instanceIdSet" ] [ "item" ] !== undefined ) { contents . InstanceIds = deserializeAws_ec2InstanceIdList ( __getArrayIfSingleItem ( output [ "instanceIdSet" ] [ "item" ] ) , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output . dedicatedHostIdSet === "" ) { contents . DedicatedHostIds = [ ] ; } if ( output [ "dedicatedHostIdSet" ] !== undefined && output [ "dedicatedHostIdSet" ] [ "item" ] !== undefined ) { contents . DedicatedHostIds = deserializeAws_ec2DedicatedHostIdList ( __getArrayIfSingleItem ( output [ "dedicatedHostIdSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2InstanceEventWindowSet = ( output , context ) : InstanceEventWindow [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceEventWindow ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceEventWindowStateChange = ( output , context ) : InstanceEventWindowStateChange => { const contents = { InstanceEventWindowId : undefined , State : undefined , } ; if ( output [ "instanceEventWindowId" ] !== undefined ) { contents . InstanceEventWindowId = __expectString ( output [ "instanceEventWindowId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceEventWindowTimeRange = ( output , context ) : InstanceEventWindowTimeRange => { const contents = { StartWeekDay : undefined , StartHour : undefined , EndWeekDay : undefined , EndHour : undefined , } ; if ( output [ "startWeekDay" ] !== undefined ) { contents . StartWeekDay = __expectString ( output [ "startWeekDay" ] ) ; } if ( output [ "startHour" ] !== undefined ) { contents . StartHour = __strictParseInt32 ( output [ "startHour" ] ) as number ; } if ( output [ "endWeekDay" ] !== undefined ) { contents . EndWeekDay = __expectString ( output [ "endWeekDay" ] ) ; } if ( output [ "endHour" ] !== undefined ) { contents . EndHour = __strictParseInt32 ( output [ "endHour" ] ) as number ; } return contents ; } ; const deserializeAws_ec2InstanceEventWindowTimeRangeList = ( output , context ) : InstanceEventWindowTimeRange [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceEventWindowTimeRange ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceExportDetails = ( output , context ) : InstanceExportDetails => { const contents = { InstanceId : undefined , TargetEnvironment : undefined , } ; if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "targetEnvironment" ] !== undefined ) { contents . TargetEnvironment = __expectString ( output [ "targetEnvironment" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceFamilyCreditSpecification = ( output , context ) : InstanceFamilyCreditSpecification => { const contents = { InstanceFamily : undefined , CpuCredits : undefined , } ; if ( output [ "instanceFamily" ] !== undefined ) { contents . InstanceFamily = __expectString ( output [ "instanceFamily" ] ) ; } if ( output [ "cpuCredits" ] !== undefined ) { contents . CpuCredits = __expectString ( output [ "cpuCredits" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceGenerationSet = ( output , context ) : ( InstanceGeneration | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_ec2InstanceIdList = ( 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_ec2InstanceIdSet = ( 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_ec2InstanceIdsSet = ( 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_ec2InstanceIpv4Prefix = ( output , context ) : InstanceIpv4Prefix => { const contents = { Ipv4Prefix : undefined , } ; if ( output [ "ipv4Prefix" ] !== undefined ) { contents . Ipv4Prefix = __expectString ( output [ "ipv4Prefix" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceIpv4PrefixList = ( output , context ) : InstanceIpv4Prefix [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceIpv4Prefix ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceIpv6Address = ( output , context ) : InstanceIpv6Address => { const contents = { Ipv6Address : undefined , } ; if ( output [ "ipv6Address" ] !== undefined ) { contents . Ipv6Address = __expectString ( output [ "ipv6Address" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceIpv6AddressList = ( output , context ) : InstanceIpv6Address [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceIpv6Address ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceIpv6Prefix = ( output , context ) : InstanceIpv6Prefix => { const contents = { Ipv6Prefix : undefined , } ; if ( output [ "ipv6Prefix" ] !== undefined ) { contents . Ipv6Prefix = __expectString ( output [ "ipv6Prefix" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceIpv6PrefixList = ( output , context ) : InstanceIpv6Prefix [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceIpv6Prefix ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceList = ( output , context ) : Instance [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Instance ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceMetadataOptionsResponse = ( output , context ) : InstanceMetadataOptionsResponse => { const contents = { State : undefined , HttpTokens : undefined , HttpPutResponseHopLimit : undefined , HttpEndpoint : undefined , HttpProtocolIpv6 : undefined , InstanceMetadataTags : undefined , } ; if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "httpTokens" ] !== undefined ) { contents . HttpTokens = __expectString ( output [ "httpTokens" ] ) ; } if ( output [ "httpPutResponseHopLimit" ] !== undefined ) { contents . HttpPutResponseHopLimit = __strictParseInt32 ( output [ "httpPutResponseHopLimit" ] ) as number ; } if ( output [ "httpEndpoint" ] !== undefined ) { contents . HttpEndpoint = __expectString ( output [ "httpEndpoint" ] ) ; } if ( output [ "httpProtocolIpv6" ] !== undefined ) { contents . HttpProtocolIpv6 = __expectString ( output [ "httpProtocolIpv6" ] ) ; } if ( output [ "instanceMetadataTags" ] !== undefined ) { contents . InstanceMetadataTags = __expectString ( output [ "instanceMetadataTags" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceMonitoring = ( output , context ) : InstanceMonitoring => { const contents = { InstanceId : undefined , Monitoring : undefined , } ; if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "monitoring" ] !== undefined ) { contents . Monitoring = deserializeAws_ec2Monitoring ( output [ "monitoring" ] , context ) ; } return contents ; } ; const deserializeAws_ec2InstanceMonitoringList = ( output , context ) : InstanceMonitoring [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceMonitoring ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceNetworkInterface = ( output , context ) : InstanceNetworkInterface => { const contents = { Association : undefined , Attachment : undefined , Description : undefined , Groups : undefined , Ipv6Addresses : undefined , MacAddress : undefined , NetworkInterfaceId : undefined , OwnerId : undefined , PrivateDnsName : undefined , PrivateIpAddress : undefined , PrivateIpAddresses : undefined , SourceDestCheck : undefined , Status : undefined , SubnetId : undefined , VpcId : undefined , InterfaceType : undefined , Ipv4Prefixes : undefined , Ipv6Prefixes : undefined , } ; if ( output [ "association" ] !== undefined ) { contents . Association = deserializeAws_ec2InstanceNetworkInterfaceAssociation ( output [ "association" ] , context ) ; } if ( output [ "attachment" ] !== undefined ) { contents . Attachment = deserializeAws_ec2InstanceNetworkInterfaceAttachment ( output [ "attachment" ] , context ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output . groupSet === "" ) { contents . Groups = [ ] ; } if ( output [ "groupSet" ] !== undefined && output [ "groupSet" ] [ "item" ] !== undefined ) { contents . Groups = deserializeAws_ec2GroupIdentifierList ( __getArrayIfSingleItem ( output [ "groupSet" ] [ "item" ] ) , context ) ; } if ( output . ipv6AddressesSet === "" ) { contents . Ipv6Addresses = [ ] ; } if ( output [ "ipv6AddressesSet" ] !== undefined && output [ "ipv6AddressesSet" ] [ "item" ] !== undefined ) { contents . Ipv6Addresses = deserializeAws_ec2InstanceIpv6AddressList ( __getArrayIfSingleItem ( output [ "ipv6AddressesSet" ] [ "item" ] ) , context ) ; } if ( output [ "macAddress" ] !== undefined ) { contents . MacAddress = __expectString ( output [ "macAddress" ] ) ; } if ( output [ "networkInterfaceId" ] !== undefined ) { contents . NetworkInterfaceId = __expectString ( output [ "networkInterfaceId" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "privateDnsName" ] !== undefined ) { contents . PrivateDnsName = __expectString ( output [ "privateDnsName" ] ) ; } if ( output [ "privateIpAddress" ] !== undefined ) { contents . PrivateIpAddress = __expectString ( output [ "privateIpAddress" ] ) ; } if ( output . privateIpAddressesSet === "" ) { contents . PrivateIpAddresses = [ ] ; } if ( output [ "privateIpAddressesSet" ] !== undefined && output [ "privateIpAddressesSet" ] [ "item" ] !== undefined ) { contents . PrivateIpAddresses = deserializeAws_ec2InstancePrivateIpAddressList ( __getArrayIfSingleItem ( output [ "privateIpAddressesSet" ] [ "item" ] ) , context ) ; } if ( output [ "sourceDestCheck" ] !== undefined ) { contents . SourceDestCheck = __parseBoolean ( output [ "sourceDestCheck" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "interfaceType" ] !== undefined ) { contents . InterfaceType = __expectString ( output [ "interfaceType" ] ) ; } if ( output . ipv4PrefixSet === "" ) { contents . Ipv4Prefixes = [ ] ; } if ( output [ "ipv4PrefixSet" ] !== undefined && output [ "ipv4PrefixSet" ] [ "item" ] !== undefined ) { contents . Ipv4Prefixes = deserializeAws_ec2InstanceIpv4PrefixList ( __getArrayIfSingleItem ( output [ "ipv4PrefixSet" ] [ "item" ] ) , context ) ; } if ( output . ipv6PrefixSet === "" ) { contents . Ipv6Prefixes = [ ] ; } if ( output [ "ipv6PrefixSet" ] !== undefined && output [ "ipv6PrefixSet" ] [ "item" ] !== undefined ) { contents . Ipv6Prefixes = deserializeAws_ec2InstanceIpv6PrefixList ( __getArrayIfSingleItem ( output [ "ipv6PrefixSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2InstanceNetworkInterfaceAssociation = ( output , context ) : InstanceNetworkInterfaceAssociation => { const contents = { CarrierIp : undefined , CustomerOwnedIp : undefined , IpOwnerId : undefined , PublicDnsName : undefined , PublicIp : undefined , } ; if ( output [ "carrierIp" ] !== undefined ) { contents . CarrierIp = __expectString ( output [ "carrierIp" ] ) ; } if ( output [ "customerOwnedIp" ] !== undefined ) { contents . CustomerOwnedIp = __expectString ( output [ "customerOwnedIp" ] ) ; } if ( output [ "ipOwnerId" ] !== undefined ) { contents . IpOwnerId = __expectString ( output [ "ipOwnerId" ] ) ; } if ( output [ "publicDnsName" ] !== undefined ) { contents . PublicDnsName = __expectString ( output [ "publicDnsName" ] ) ; } if ( output [ "publicIp" ] !== undefined ) { contents . PublicIp = __expectString ( output [ "publicIp" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceNetworkInterfaceAttachment = ( output , context ) : InstanceNetworkInterfaceAttachment => { const contents = { AttachTime : undefined , AttachmentId : undefined , DeleteOnTermination : undefined , DeviceIndex : undefined , Status : undefined , NetworkCardIndex : undefined , } ; if ( output [ "attachTime" ] !== undefined ) { contents . AttachTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "attachTime" ] ) ) ; } if ( output [ "attachmentId" ] !== undefined ) { contents . AttachmentId = __expectString ( output [ "attachmentId" ] ) ; } if ( output [ "deleteOnTermination" ] !== undefined ) { contents . DeleteOnTermination = __parseBoolean ( output [ "deleteOnTermination" ] ) ; } if ( output [ "deviceIndex" ] !== undefined ) { contents . DeviceIndex = __strictParseInt32 ( output [ "deviceIndex" ] ) as number ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "networkCardIndex" ] !== undefined ) { contents . NetworkCardIndex = __strictParseInt32 ( output [ "networkCardIndex" ] ) as number ; } return contents ; } ; const deserializeAws_ec2InstanceNetworkInterfaceList = ( output , context ) : InstanceNetworkInterface [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceNetworkInterface ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceNetworkInterfaceSpecification = ( output , context ) : InstanceNetworkInterfaceSpecification => { const contents = { AssociatePublicIpAddress : undefined , DeleteOnTermination : undefined , Description : undefined , DeviceIndex : undefined , Groups : undefined , Ipv6AddressCount : undefined , Ipv6Addresses : undefined , NetworkInterfaceId : undefined , PrivateIpAddress : undefined , PrivateIpAddresses : undefined , SecondaryPrivateIpAddressCount : undefined , SubnetId : undefined , AssociateCarrierIpAddress : undefined , InterfaceType : undefined , NetworkCardIndex : undefined , Ipv4Prefixes : undefined , Ipv4PrefixCount : undefined , Ipv6Prefixes : undefined , Ipv6PrefixCount : undefined , } ; if ( output [ "associatePublicIpAddress" ] !== undefined ) { contents . AssociatePublicIpAddress = __parseBoolean ( output [ "associatePublicIpAddress" ] ) ; } if ( output [ "deleteOnTermination" ] !== undefined ) { contents . DeleteOnTermination = __parseBoolean ( output [ "deleteOnTermination" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "deviceIndex" ] !== undefined ) { contents . DeviceIndex = __strictParseInt32 ( output [ "deviceIndex" ] ) as number ; } if ( output . SecurityGroupId === "" ) { contents . Groups = [ ] ; } if ( output [ "SecurityGroupId" ] !== undefined && output [ "SecurityGroupId" ] [ "SecurityGroupId" ] !== undefined ) { contents . Groups = deserializeAws_ec2SecurityGroupIdStringList ( __getArrayIfSingleItem ( output [ "SecurityGroupId" ] [ "SecurityGroupId" ] ) , context ) ; } if ( output [ "ipv6AddressCount" ] !== undefined ) { contents . Ipv6AddressCount = __strictParseInt32 ( output [ "ipv6AddressCount" ] ) as number ; } if ( output . ipv6AddressesSet === "" ) { contents . Ipv6Addresses = [ ] ; } if ( output [ "ipv6AddressesSet" ] !== undefined && output [ "ipv6AddressesSet" ] [ "item" ] !== undefined ) { contents . Ipv6Addresses = deserializeAws_ec2InstanceIpv6AddressList ( __getArrayIfSingleItem ( output [ "ipv6AddressesSet" ] [ "item" ] ) , context ) ; } if ( output [ "networkInterfaceId" ] !== undefined ) { contents . NetworkInterfaceId = __expectString ( output [ "networkInterfaceId" ] ) ; } if ( output [ "privateIpAddress" ] !== undefined ) { contents . PrivateIpAddress = __expectString ( output [ "privateIpAddress" ] ) ; } if ( output . privateIpAddressesSet === "" ) { contents . PrivateIpAddresses = [ ] ; } if ( output [ "privateIpAddressesSet" ] !== undefined && output [ "privateIpAddressesSet" ] [ "item" ] !== undefined ) { contents . PrivateIpAddresses = deserializeAws_ec2PrivateIpAddressSpecificationList ( __getArrayIfSingleItem ( output [ "privateIpAddressesSet" ] [ "item" ] ) , context ) ; } if ( output [ "secondaryPrivateIpAddressCount" ] !== undefined ) { contents . SecondaryPrivateIpAddressCount = __strictParseInt32 ( output [ "secondaryPrivateIpAddressCount" ] ) as number ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } if ( output [ "AssociateCarrierIpAddress" ] !== undefined ) { contents . AssociateCarrierIpAddress = __parseBoolean ( output [ "AssociateCarrierIpAddress" ] ) ; } if ( output [ "InterfaceType" ] !== undefined ) { contents . InterfaceType = __expectString ( output [ "InterfaceType" ] ) ; } if ( output [ "NetworkCardIndex" ] !== undefined ) { contents . NetworkCardIndex = __strictParseInt32 ( output [ "NetworkCardIndex" ] ) as number ; } if ( output . Ipv4Prefix === "" ) { contents . Ipv4Prefixes = [ ] ; } if ( output [ "Ipv4Prefix" ] !== undefined && output [ "Ipv4Prefix" ] [ "item" ] !== undefined ) { contents . Ipv4Prefixes = deserializeAws_ec2Ipv4PrefixList ( __getArrayIfSingleItem ( output [ "Ipv4Prefix" ] [ "item" ] ) , context ) ; } if ( output [ "Ipv4PrefixCount" ] !== undefined ) { contents . Ipv4PrefixCount = __strictParseInt32 ( output [ "Ipv4PrefixCount" ] ) as number ; } if ( output . Ipv6Prefix === "" ) { contents . Ipv6Prefixes = [ ] ; } if ( output [ "Ipv6Prefix" ] !== undefined && output [ "Ipv6Prefix" ] [ "item" ] !== undefined ) { contents . Ipv6Prefixes = deserializeAws_ec2Ipv6PrefixList ( __getArrayIfSingleItem ( output [ "Ipv6Prefix" ] [ "item" ] ) , context ) ; } if ( output [ "Ipv6PrefixCount" ] !== undefined ) { contents . Ipv6PrefixCount = __strictParseInt32 ( output [ "Ipv6PrefixCount" ] ) as number ; } return contents ; } ; const deserializeAws_ec2InstanceNetworkInterfaceSpecificationList = ( output , context ) : InstanceNetworkInterfaceSpecification [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceNetworkInterfaceSpecification ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstancePrivateIpAddress = ( output , context ) : InstancePrivateIpAddress => { const contents = { Association : undefined , Primary : undefined , PrivateDnsName : undefined , PrivateIpAddress : undefined , } ; if ( output [ "association" ] !== undefined ) { contents . Association = deserializeAws_ec2InstanceNetworkInterfaceAssociation ( output [ "association" ] , context ) ; } if ( output [ "primary" ] !== undefined ) { contents . Primary = __parseBoolean ( output [ "primary" ] ) ; } if ( output [ "privateDnsName" ] !== undefined ) { contents . PrivateDnsName = __expectString ( output [ "privateDnsName" ] ) ; } if ( output [ "privateIpAddress" ] !== undefined ) { contents . PrivateIpAddress = __expectString ( output [ "privateIpAddress" ] ) ; } return contents ; } ; const deserializeAws_ec2InstancePrivateIpAddressList = ( output , context ) : InstancePrivateIpAddress [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstancePrivateIpAddress ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceRequirements = ( output , context ) : InstanceRequirements => { const contents = { VCpuCount : undefined , MemoryMiB : undefined , CpuManufacturers : undefined , MemoryGiBPerVCpu : undefined , ExcludedInstanceTypes : undefined , InstanceGenerations : undefined , SpotMaxPricePercentageOverLowestPrice : undefined , OnDemandMaxPricePercentageOverLowestPrice : undefined , BareMetal : undefined , BurstablePerformance : undefined , RequireHibernateSupport : undefined , NetworkInterfaceCount : undefined , LocalStorage : undefined , LocalStorageTypes : undefined , TotalLocalStorageGB : undefined , BaselineEbsBandwidthMbps : undefined , AcceleratorTypes : undefined , AcceleratorCount : undefined , AcceleratorManufacturers : undefined , AcceleratorNames : undefined , AcceleratorTotalMemoryMiB : undefined , } ; if ( output [ "vCpuCount" ] !== undefined ) { contents . VCpuCount = deserializeAws_ec2VCpuCountRange ( output [ "vCpuCount" ] , context ) ; } if ( output [ "memoryMiB" ] !== undefined ) { contents . MemoryMiB = deserializeAws_ec2MemoryMiB ( output [ "memoryMiB" ] , context ) ; } if ( output . cpuManufacturerSet === "" ) { contents . CpuManufacturers = [ ] ; } if ( output [ "cpuManufacturerSet" ] !== undefined && output [ "cpuManufacturerSet" ] [ "item" ] !== undefined ) { contents . CpuManufacturers = deserializeAws_ec2CpuManufacturerSet ( __getArrayIfSingleItem ( output [ "cpuManufacturerSet" ] [ "item" ] ) , context ) ; } if ( output [ "memoryGiBPerVCpu" ] !== undefined ) { contents . MemoryGiBPerVCpu = deserializeAws_ec2MemoryGiBPerVCpu ( output [ "memoryGiBPerVCpu" ] , context ) ; } if ( output . excludedInstanceTypeSet === "" ) { contents . ExcludedInstanceTypes = [ ] ; } if ( output [ "excludedInstanceTypeSet" ] !== undefined && output [ "excludedInstanceTypeSet" ] [ "item" ] !== undefined ) { contents . ExcludedInstanceTypes = deserializeAws_ec2ExcludedInstanceTypeSet ( __getArrayIfSingleItem ( output [ "excludedInstanceTypeSet" ] [ "item" ] ) , context ) ; } if ( output . instanceGenerationSet === "" ) { contents . InstanceGenerations = [ ] ; } if ( output [ "instanceGenerationSet" ] !== undefined && output [ "instanceGenerationSet" ] [ "item" ] !== undefined ) { contents . InstanceGenerations = deserializeAws_ec2InstanceGenerationSet ( __getArrayIfSingleItem ( output [ "instanceGenerationSet" ] [ "item" ] ) , context ) ; } if ( output [ "spotMaxPricePercentageOverLowestPrice" ] !== undefined ) { contents . SpotMaxPricePercentageOverLowestPrice = __strictParseInt32 ( output [ "spotMaxPricePercentageOverLowestPrice" ] ) as number ; } if ( output [ "onDemandMaxPricePercentageOverLowestPrice" ] !== undefined ) { contents . OnDemandMaxPricePercentageOverLowestPrice = __strictParseInt32 ( output [ "onDemandMaxPricePercentageOverLowestPrice" ] ) as number ; } if ( output [ "bareMetal" ] !== undefined ) { contents . BareMetal = __expectString ( output [ "bareMetal" ] ) ; } if ( output [ "burstablePerformance" ] !== undefined ) { contents . BurstablePerformance = __expectString ( output [ "burstablePerformance" ] ) ; } if ( output [ "requireHibernateSupport" ] !== undefined ) { contents . RequireHibernateSupport = __parseBoolean ( output [ "requireHibernateSupport" ] ) ; } if ( output [ "networkInterfaceCount" ] !== undefined ) { contents . NetworkInterfaceCount = deserializeAws_ec2NetworkInterfaceCount ( output [ "networkInterfaceCount" ] , context ) ; } if ( output [ "localStorage" ] !== undefined ) { contents . LocalStorage = __expectString ( output [ "localStorage" ] ) ; } if ( output . localStorageTypeSet === "" ) { contents . LocalStorageTypes = [ ] ; } if ( output [ "localStorageTypeSet" ] !== undefined && output [ "localStorageTypeSet" ] [ "item" ] !== undefined ) { contents . LocalStorageTypes = deserializeAws_ec2LocalStorageTypeSet ( __getArrayIfSingleItem ( output [ "localStorageTypeSet" ] [ "item" ] ) , context ) ; } if ( output [ "totalLocalStorageGB" ] !== undefined ) { contents . TotalLocalStorageGB = deserializeAws_ec2TotalLocalStorageGB ( output [ "totalLocalStorageGB" ] , context ) ; } if ( output [ "baselineEbsBandwidthMbps" ] !== undefined ) { contents . BaselineEbsBandwidthMbps = deserializeAws_ec2BaselineEbsBandwidthMbps ( output [ "baselineEbsBandwidthMbps" ] , context ) ; } if ( output . acceleratorTypeSet === "" ) { contents . AcceleratorTypes = [ ] ; } if ( output [ "acceleratorTypeSet" ] !== undefined && output [ "acceleratorTypeSet" ] [ "item" ] !== undefined ) { contents . AcceleratorTypes = deserializeAws_ec2AcceleratorTypeSet ( __getArrayIfSingleItem ( output [ "acceleratorTypeSet" ] [ "item" ] ) , context ) ; } if ( output [ "acceleratorCount" ] !== undefined ) { contents . AcceleratorCount = deserializeAws_ec2AcceleratorCount ( output [ "acceleratorCount" ] , context ) ; } if ( output . acceleratorManufacturerSet === "" ) { contents . AcceleratorManufacturers = [ ] ; } if ( output [ "acceleratorManufacturerSet" ] !== undefined && output [ "acceleratorManufacturerSet" ] [ "item" ] !== undefined ) { contents . AcceleratorManufacturers = deserializeAws_ec2AcceleratorManufacturerSet ( __getArrayIfSingleItem ( output [ "acceleratorManufacturerSet" ] [ "item" ] ) , context ) ; } if ( output . acceleratorNameSet === "" ) { contents . AcceleratorNames = [ ] ; } if ( output [ "acceleratorNameSet" ] !== undefined && output [ "acceleratorNameSet" ] [ "item" ] !== undefined ) { contents . AcceleratorNames = deserializeAws_ec2AcceleratorNameSet ( __getArrayIfSingleItem ( output [ "acceleratorNameSet" ] [ "item" ] ) , context ) ; } if ( output [ "acceleratorTotalMemoryMiB" ] !== undefined ) { contents . AcceleratorTotalMemoryMiB = deserializeAws_ec2AcceleratorTotalMemoryMiB ( output [ "acceleratorTotalMemoryMiB" ] , context ) ; } return contents ; } ; const deserializeAws_ec2InstanceState = ( output , context ) : InstanceState => { const contents = { Code : undefined , Name : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __strictParseInt32 ( output [ "code" ] ) as number ; } if ( output [ "name" ] !== undefined ) { contents . Name = __expectString ( output [ "name" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceStateChange = ( output , context ) : InstanceStateChange => { const contents = { CurrentState : undefined , InstanceId : undefined , PreviousState : undefined , } ; if ( output [ "currentState" ] !== undefined ) { contents . CurrentState = deserializeAws_ec2InstanceState ( output [ "currentState" ] , context ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "previousState" ] !== undefined ) { contents . PreviousState = deserializeAws_ec2InstanceState ( output [ "previousState" ] , context ) ; } return contents ; } ; const deserializeAws_ec2InstanceStateChangeList = ( output , context ) : InstanceStateChange [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceStateChange ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceStatus = ( output , context ) : InstanceStatus => { const contents = { AvailabilityZone : undefined , OutpostArn : undefined , Events : undefined , InstanceId : undefined , InstanceState : undefined , InstanceStatus : undefined , SystemStatus : undefined , } ; if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "outpostArn" ] !== undefined ) { contents . OutpostArn = __expectString ( output [ "outpostArn" ] ) ; } if ( output . eventsSet === "" ) { contents . Events = [ ] ; } if ( output [ "eventsSet" ] !== undefined && output [ "eventsSet" ] [ "item" ] !== undefined ) { contents . Events = deserializeAws_ec2InstanceStatusEventList ( __getArrayIfSingleItem ( output [ "eventsSet" ] [ "item" ] ) , context ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "instanceState" ] !== undefined ) { contents . InstanceState = deserializeAws_ec2InstanceState ( output [ "instanceState" ] , context ) ; } if ( output [ "instanceStatus" ] !== undefined ) { contents . InstanceStatus = deserializeAws_ec2InstanceStatusSummary ( output [ "instanceStatus" ] , context ) ; } if ( output [ "systemStatus" ] !== undefined ) { contents . SystemStatus = deserializeAws_ec2InstanceStatusSummary ( output [ "systemStatus" ] , context ) ; } return contents ; } ; const deserializeAws_ec2InstanceStatusDetails = ( output , context ) : InstanceStatusDetails => { const contents = { ImpairedSince : undefined , Name : undefined , Status : undefined , } ; if ( output [ "impairedSince" ] !== undefined ) { contents . ImpairedSince = __expectNonNull ( __parseRfc3339DateTime ( output [ "impairedSince" ] ) ) ; } if ( output [ "name" ] !== undefined ) { contents . Name = __expectString ( output [ "name" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceStatusDetailsList = ( output , context ) : InstanceStatusDetails [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceStatusDetails ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceStatusEvent = ( output , context ) : InstanceStatusEvent => { const contents = { InstanceEventId : undefined , Code : undefined , Description : undefined , NotAfter : undefined , NotBefore : undefined , NotBeforeDeadline : undefined , } ; if ( output [ "instanceEventId" ] !== undefined ) { contents . InstanceEventId = __expectString ( output [ "instanceEventId" ] ) ; } if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "notAfter" ] !== undefined ) { contents . NotAfter = __expectNonNull ( __parseRfc3339DateTime ( output [ "notAfter" ] ) ) ; } if ( output [ "notBefore" ] !== undefined ) { contents . NotBefore = __expectNonNull ( __parseRfc3339DateTime ( output [ "notBefore" ] ) ) ; } if ( output [ "notBeforeDeadline" ] !== undefined ) { contents . NotBeforeDeadline = __expectNonNull ( __parseRfc3339DateTime ( output [ "notBeforeDeadline" ] ) ) ; } return contents ; } ; const deserializeAws_ec2InstanceStatusEventList = ( output , context ) : InstanceStatusEvent [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceStatusEvent ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceStatusList = ( output , context ) : InstanceStatus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceStatus ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceStatusSummary = ( output , context ) : InstanceStatusSummary => { const contents = { Details : undefined , Status : undefined , } ; if ( output . details === "" ) { contents . Details = [ ] ; } if ( output [ "details" ] !== undefined && output [ "details" ] [ "item" ] !== undefined ) { contents . Details = deserializeAws_ec2InstanceStatusDetailsList ( __getArrayIfSingleItem ( output [ "details" ] [ "item" ] ) , context ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceStorageInfo = ( output , context ) : InstanceStorageInfo => { const contents = { TotalSizeInGB : undefined , Disks : undefined , NvmeSupport : undefined , EncryptionSupport : undefined , } ; if ( output [ "totalSizeInGB" ] !== undefined ) { contents . TotalSizeInGB = __strictParseLong ( output [ "totalSizeInGB" ] ) as number ; } if ( output . disks === "" ) { contents . Disks = [ ] ; } if ( output [ "disks" ] !== undefined && output [ "disks" ] [ "item" ] !== undefined ) { contents . Disks = deserializeAws_ec2DiskInfoList ( __getArrayIfSingleItem ( output [ "disks" ] [ "item" ] ) , context ) ; } if ( output [ "nvmeSupport" ] !== undefined ) { contents . NvmeSupport = __expectString ( output [ "nvmeSupport" ] ) ; } if ( output [ "encryptionSupport" ] !== undefined ) { contents . EncryptionSupport = __expectString ( output [ "encryptionSupport" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceTagKeySet = ( 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_ec2InstanceTagNotificationAttribute = ( output , context ) : InstanceTagNotificationAttribute => { const contents = { InstanceTagKeys : undefined , IncludeAllTagsOfInstance : undefined , } ; if ( output . instanceTagKeySet === "" ) { contents . InstanceTagKeys = [ ] ; } if ( output [ "instanceTagKeySet" ] !== undefined && output [ "instanceTagKeySet" ] [ "item" ] !== undefined ) { contents . InstanceTagKeys = deserializeAws_ec2InstanceTagKeySet ( __getArrayIfSingleItem ( output [ "instanceTagKeySet" ] [ "item" ] ) , context ) ; } if ( output [ "includeAllTagsOfInstance" ] !== undefined ) { contents . IncludeAllTagsOfInstance = __parseBoolean ( output [ "includeAllTagsOfInstance" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceTypeInfo = ( output , context ) : InstanceTypeInfo => { const contents = { InstanceType : undefined , CurrentGeneration : undefined , FreeTierEligible : undefined , SupportedUsageClasses : undefined , SupportedRootDeviceTypes : undefined , SupportedVirtualizationTypes : undefined , BareMetal : undefined , Hypervisor : undefined , ProcessorInfo : undefined , VCpuInfo : undefined , MemoryInfo : undefined , InstanceStorageSupported : undefined , InstanceStorageInfo : undefined , EbsInfo : undefined , NetworkInfo : undefined , GpuInfo : undefined , FpgaInfo : undefined , PlacementGroupInfo : undefined , InferenceAcceleratorInfo : undefined , HibernationSupported : undefined , BurstablePerformanceSupported : undefined , DedicatedHostsSupported : undefined , AutoRecoverySupported : undefined , SupportedBootModes : undefined , } ; if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "currentGeneration" ] !== undefined ) { contents . CurrentGeneration = __parseBoolean ( output [ "currentGeneration" ] ) ; } if ( output [ "freeTierEligible" ] !== undefined ) { contents . FreeTierEligible = __parseBoolean ( output [ "freeTierEligible" ] ) ; } if ( output . supportedUsageClasses === "" ) { contents . SupportedUsageClasses = [ ] ; } if ( output [ "supportedUsageClasses" ] !== undefined && output [ "supportedUsageClasses" ] [ "item" ] !== undefined ) { contents . SupportedUsageClasses = deserializeAws_ec2UsageClassTypeList ( __getArrayIfSingleItem ( output [ "supportedUsageClasses" ] [ "item" ] ) , context ) ; } if ( output . supportedRootDeviceTypes === "" ) { contents . SupportedRootDeviceTypes = [ ] ; } if ( output [ "supportedRootDeviceTypes" ] !== undefined && output [ "supportedRootDeviceTypes" ] [ "item" ] !== undefined ) { contents . SupportedRootDeviceTypes = deserializeAws_ec2RootDeviceTypeList ( __getArrayIfSingleItem ( output [ "supportedRootDeviceTypes" ] [ "item" ] ) , context ) ; } if ( output . supportedVirtualizationTypes === "" ) { contents . SupportedVirtualizationTypes = [ ] ; } if ( output [ "supportedVirtualizationTypes" ] !== undefined && output [ "supportedVirtualizationTypes" ] [ "item" ] !== undefined ) { contents . SupportedVirtualizationTypes = deserializeAws_ec2VirtualizationTypeList ( __getArrayIfSingleItem ( output [ "supportedVirtualizationTypes" ] [ "item" ] ) , context ) ; } if ( output [ "bareMetal" ] !== undefined ) { contents . BareMetal = __parseBoolean ( output [ "bareMetal" ] ) ; } if ( output [ "hypervisor" ] !== undefined ) { contents . Hypervisor = __expectString ( output [ "hypervisor" ] ) ; } if ( output [ "processorInfo" ] !== undefined ) { contents . ProcessorInfo = deserializeAws_ec2ProcessorInfo ( output [ "processorInfo" ] , context ) ; } if ( output [ "vCpuInfo" ] !== undefined ) { contents . VCpuInfo = deserializeAws_ec2VCpuInfo ( output [ "vCpuInfo" ] , context ) ; } if ( output [ "memoryInfo" ] !== undefined ) { contents . MemoryInfo = deserializeAws_ec2MemoryInfo ( output [ "memoryInfo" ] , context ) ; } if ( output [ "instanceStorageSupported" ] !== undefined ) { contents . InstanceStorageSupported = __parseBoolean ( output [ "instanceStorageSupported" ] ) ; } if ( output [ "instanceStorageInfo" ] !== undefined ) { contents . InstanceStorageInfo = deserializeAws_ec2InstanceStorageInfo ( output [ "instanceStorageInfo" ] , context ) ; } if ( output [ "ebsInfo" ] !== undefined ) { contents . EbsInfo = deserializeAws_ec2EbsInfo ( output [ "ebsInfo" ] , context ) ; } if ( output [ "networkInfo" ] !== undefined ) { contents . NetworkInfo = deserializeAws_ec2NetworkInfo ( output [ "networkInfo" ] , context ) ; } if ( output [ "gpuInfo" ] !== undefined ) { contents . GpuInfo = deserializeAws_ec2GpuInfo ( output [ "gpuInfo" ] , context ) ; } if ( output [ "fpgaInfo" ] !== undefined ) { contents . FpgaInfo = deserializeAws_ec2FpgaInfo ( output [ "fpgaInfo" ] , context ) ; } if ( output [ "placementGroupInfo" ] !== undefined ) { contents . PlacementGroupInfo = deserializeAws_ec2PlacementGroupInfo ( output [ "placementGroupInfo" ] , context ) ; } if ( output [ "inferenceAcceleratorInfo" ] !== undefined ) { contents . InferenceAcceleratorInfo = deserializeAws_ec2InferenceAcceleratorInfo ( output [ "inferenceAcceleratorInfo" ] , context ) ; } if ( output [ "hibernationSupported" ] !== undefined ) { contents . HibernationSupported = __parseBoolean ( output [ "hibernationSupported" ] ) ; } if ( output [ "burstablePerformanceSupported" ] !== undefined ) { contents . BurstablePerformanceSupported = __parseBoolean ( output [ "burstablePerformanceSupported" ] ) ; } if ( output [ "dedicatedHostsSupported" ] !== undefined ) { contents . DedicatedHostsSupported = __parseBoolean ( output [ "dedicatedHostsSupported" ] ) ; } if ( output [ "autoRecoverySupported" ] !== undefined ) { contents . AutoRecoverySupported = __parseBoolean ( output [ "autoRecoverySupported" ] ) ; } if ( output . supportedBootModes === "" ) { contents . SupportedBootModes = [ ] ; } if ( output [ "supportedBootModes" ] !== undefined && output [ "supportedBootModes" ] [ "item" ] !== undefined ) { contents . SupportedBootModes = deserializeAws_ec2BootModeTypeList ( __getArrayIfSingleItem ( output [ "supportedBootModes" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2InstanceTypeInfoFromInstanceRequirements = ( output , context ) : InstanceTypeInfoFromInstanceRequirements => { const contents = { InstanceType : undefined , } ; if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceTypeInfoFromInstanceRequirementsSet = ( output , context ) : InstanceTypeInfoFromInstanceRequirements [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceTypeInfoFromInstanceRequirements ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceTypeInfoList = ( output , context ) : InstanceTypeInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceTypeInfo ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceTypeOffering = ( output , context ) : InstanceTypeOffering => { const contents = { InstanceType : undefined , LocationType : undefined , Location : undefined , } ; if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "locationType" ] !== undefined ) { contents . LocationType = __expectString ( output [ "locationType" ] ) ; } if ( output [ "location" ] !== undefined ) { contents . Location = __expectString ( output [ "location" ] ) ; } return contents ; } ; const deserializeAws_ec2InstanceTypeOfferingsList = ( output , context ) : InstanceTypeOffering [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceTypeOffering ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InstanceUsage = ( output , context ) : InstanceUsage => { const contents = { AccountId : undefined , UsedInstanceCount : undefined , } ; if ( output [ "accountId" ] !== undefined ) { contents . AccountId = __expectString ( output [ "accountId" ] ) ; } if ( output [ "usedInstanceCount" ] !== undefined ) { contents . UsedInstanceCount = __strictParseInt32 ( output [ "usedInstanceCount" ] ) as number ; } return contents ; } ; const deserializeAws_ec2InstanceUsageSet = ( output , context ) : InstanceUsage [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InstanceUsage ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InternetGateway = ( output , context ) : InternetGateway => { const contents = { Attachments : undefined , InternetGatewayId : undefined , OwnerId : undefined , Tags : undefined , } ; if ( output . attachmentSet === "" ) { contents . Attachments = [ ] ; } if ( output [ "attachmentSet" ] !== undefined && output [ "attachmentSet" ] [ "item" ] !== undefined ) { contents . Attachments = deserializeAws_ec2InternetGatewayAttachmentList ( __getArrayIfSingleItem ( output [ "attachmentSet" ] [ "item" ] ) , context ) ; } if ( output [ "internetGatewayId" ] !== undefined ) { contents . InternetGatewayId = __expectString ( output [ "internetGatewayId" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2InternetGatewayAttachment = ( output , context ) : InternetGatewayAttachment => { const contents = { State : undefined , VpcId : undefined , } ; if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } return contents ; } ; const deserializeAws_ec2InternetGatewayAttachmentList = ( output , context ) : InternetGatewayAttachment [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InternetGatewayAttachment ( entry , context ) ; } ) ; } ; const deserializeAws_ec2InternetGatewayList = ( output , context ) : InternetGateway [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2InternetGateway ( entry , context ) ; } ) ; } ; const deserializeAws_ec2IpAddressList = ( 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_ec2Ipam = ( output , context ) : Ipam => { const contents = { OwnerId : undefined , IpamId : undefined , IpamArn : undefined , IpamRegion : undefined , PublicDefaultScopeId : undefined , PrivateDefaultScopeId : undefined , ScopeCount : undefined , Description : undefined , OperatingRegions : undefined , State : undefined , Tags : undefined , } ; if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "ipamId" ] !== undefined ) { contents . IpamId = __expectString ( output [ "ipamId" ] ) ; } if ( output [ "ipamArn" ] !== undefined ) { contents . IpamArn = __expectString ( output [ "ipamArn" ] ) ; } if ( output [ "ipamRegion" ] !== undefined ) { contents . IpamRegion = __expectString ( output [ "ipamRegion" ] ) ; } if ( output [ "publicDefaultScopeId" ] !== undefined ) { contents . PublicDefaultScopeId = __expectString ( output [ "publicDefaultScopeId" ] ) ; } if ( output [ "privateDefaultScopeId" ] !== undefined ) { contents . PrivateDefaultScopeId = __expectString ( output [ "privateDefaultScopeId" ] ) ; } if ( output [ "scopeCount" ] !== undefined ) { contents . ScopeCount = __strictParseInt32 ( output [ "scopeCount" ] ) as number ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output . operatingRegionSet === "" ) { contents . OperatingRegions = [ ] ; } if ( output [ "operatingRegionSet" ] !== undefined && output [ "operatingRegionSet" ] [ "item" ] !== undefined ) { contents . OperatingRegions = deserializeAws_ec2IpamOperatingRegionSet ( __getArrayIfSingleItem ( output [ "operatingRegionSet" ] [ "item" ] ) , context ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2IpamAddressHistoryRecord = ( output , context ) : IpamAddressHistoryRecord => { const contents = { ResourceOwnerId : undefined , ResourceRegion : undefined , ResourceType : undefined , ResourceId : undefined , ResourceCidr : undefined , ResourceName : undefined , ResourceComplianceStatus : undefined , ResourceOverlapStatus : undefined , VpcId : undefined , SampledStartTime : undefined , SampledEndTime : undefined , } ; if ( output [ "resourceOwnerId" ] !== undefined ) { contents . ResourceOwnerId = __expectString ( output [ "resourceOwnerId" ] ) ; } if ( output [ "resourceRegion" ] !== undefined ) { contents . ResourceRegion = __expectString ( output [ "resourceRegion" ] ) ; } if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } if ( output [ "resourceCidr" ] !== undefined ) { contents . ResourceCidr = __expectString ( output [ "resourceCidr" ] ) ; } if ( output [ "resourceName" ] !== undefined ) { contents . ResourceName = __expectString ( output [ "resourceName" ] ) ; } if ( output [ "resourceComplianceStatus" ] !== undefined ) { contents . ResourceComplianceStatus = __expectString ( output [ "resourceComplianceStatus" ] ) ; } if ( output [ "resourceOverlapStatus" ] !== undefined ) { contents . ResourceOverlapStatus = __expectString ( output [ "resourceOverlapStatus" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "sampledStartTime" ] !== undefined ) { contents . SampledStartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "sampledStartTime" ] ) ) ; } if ( output [ "sampledEndTime" ] !== undefined ) { contents . SampledEndTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "sampledEndTime" ] ) ) ; } return contents ; } ; const deserializeAws_ec2IpamAddressHistoryRecordSet = ( output , context ) : IpamAddressHistoryRecord [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2IpamAddressHistoryRecord ( entry , context ) ; } ) ; } ; const deserializeAws_ec2IpamOperatingRegion = ( output , context ) : IpamOperatingRegion => { const contents = { RegionName : undefined , } ; if ( output [ "regionName" ] !== undefined ) { contents . RegionName = __expectString ( output [ "regionName" ] ) ; } return contents ; } ; const deserializeAws_ec2IpamOperatingRegionSet = ( output , context ) : IpamOperatingRegion [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2IpamOperatingRegion ( entry , context ) ; } ) ; } ; const deserializeAws_ec2IpamPool = ( output , context ) : IpamPool => { const contents = { OwnerId : undefined , IpamPoolId : undefined , SourceIpamPoolId : undefined , IpamPoolArn : undefined , IpamScopeArn : undefined , IpamScopeType : undefined , IpamArn : undefined , IpamRegion : undefined , Locale : undefined , PoolDepth : undefined , State : undefined , StateMessage : undefined , Description : undefined , AutoImport : undefined , PubliclyAdvertisable : undefined , AddressFamily : undefined , AllocationMinNetmaskLength : undefined , AllocationMaxNetmaskLength : undefined , AllocationDefaultNetmaskLength : undefined , AllocationResourceTags : undefined , Tags : undefined , AwsService : undefined , } ; if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "ipamPoolId" ] !== undefined ) { contents . IpamPoolId = __expectString ( output [ "ipamPoolId" ] ) ; } if ( output [ "sourceIpamPoolId" ] !== undefined ) { contents . SourceIpamPoolId = __expectString ( output [ "sourceIpamPoolId" ] ) ; } if ( output [ "ipamPoolArn" ] !== undefined ) { contents . IpamPoolArn = __expectString ( output [ "ipamPoolArn" ] ) ; } if ( output [ "ipamScopeArn" ] !== undefined ) { contents . IpamScopeArn = __expectString ( output [ "ipamScopeArn" ] ) ; } if ( output [ "ipamScopeType" ] !== undefined ) { contents . IpamScopeType = __expectString ( output [ "ipamScopeType" ] ) ; } if ( output [ "ipamArn" ] !== undefined ) { contents . IpamArn = __expectString ( output [ "ipamArn" ] ) ; } if ( output [ "ipamRegion" ] !== undefined ) { contents . IpamRegion = __expectString ( output [ "ipamRegion" ] ) ; } if ( output [ "locale" ] !== undefined ) { contents . Locale = __expectString ( output [ "locale" ] ) ; } if ( output [ "poolDepth" ] !== undefined ) { contents . PoolDepth = __strictParseInt32 ( output [ "poolDepth" ] ) as number ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "stateMessage" ] !== undefined ) { contents . StateMessage = __expectString ( output [ "stateMessage" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "autoImport" ] !== undefined ) { contents . AutoImport = __parseBoolean ( output [ "autoImport" ] ) ; } if ( output [ "publiclyAdvertisable" ] !== undefined ) { contents . PubliclyAdvertisable = __parseBoolean ( output [ "publiclyAdvertisable" ] ) ; } if ( output [ "addressFamily" ] !== undefined ) { contents . AddressFamily = __expectString ( output [ "addressFamily" ] ) ; } if ( output [ "allocationMinNetmaskLength" ] !== undefined ) { contents . AllocationMinNetmaskLength = __strictParseInt32 ( output [ "allocationMinNetmaskLength" ] ) as number ; } if ( output [ "allocationMaxNetmaskLength" ] !== undefined ) { contents . AllocationMaxNetmaskLength = __strictParseInt32 ( output [ "allocationMaxNetmaskLength" ] ) as number ; } if ( output [ "allocationDefaultNetmaskLength" ] !== undefined ) { contents . AllocationDefaultNetmaskLength = __strictParseInt32 ( output [ "allocationDefaultNetmaskLength" ] ) as number ; } if ( output . allocationResourceTagSet === "" ) { contents . AllocationResourceTags = [ ] ; } if ( output [ "allocationResourceTagSet" ] !== undefined && output [ "allocationResourceTagSet" ] [ "item" ] !== undefined ) { contents . AllocationResourceTags = deserializeAws_ec2IpamResourceTagList ( __getArrayIfSingleItem ( output [ "allocationResourceTagSet" ] [ "item" ] ) , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "awsService" ] !== undefined ) { contents . AwsService = __expectString ( output [ "awsService" ] ) ; } return contents ; } ; const deserializeAws_ec2IpamPoolAllocation = ( output , context ) : IpamPoolAllocation => { const contents = { Cidr : undefined , IpamPoolAllocationId : undefined , Description : undefined , ResourceId : undefined , ResourceType : undefined , ResourceRegion : undefined , ResourceOwner : undefined , } ; if ( output [ "cidr" ] !== undefined ) { contents . Cidr = __expectString ( output [ "cidr" ] ) ; } if ( output [ "ipamPoolAllocationId" ] !== undefined ) { contents . IpamPoolAllocationId = __expectString ( output [ "ipamPoolAllocationId" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } if ( output [ "resourceRegion" ] !== undefined ) { contents . ResourceRegion = __expectString ( output [ "resourceRegion" ] ) ; } if ( output [ "resourceOwner" ] !== undefined ) { contents . ResourceOwner = __expectString ( output [ "resourceOwner" ] ) ; } return contents ; } ; const deserializeAws_ec2IpamPoolAllocationSet = ( output , context ) : IpamPoolAllocation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2IpamPoolAllocation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2IpamPoolCidr = ( output , context ) : IpamPoolCidr => { const contents = { Cidr : undefined , State : undefined , FailureReason : undefined , } ; if ( output [ "cidr" ] !== undefined ) { contents . Cidr = __expectString ( output [ "cidr" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "failureReason" ] !== undefined ) { contents . FailureReason = deserializeAws_ec2IpamPoolCidrFailureReason ( output [ "failureReason" ] , context ) ; } return contents ; } ; const deserializeAws_ec2IpamPoolCidrFailureReason = ( output , context ) : IpamPoolCidrFailureReason => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2IpamPoolCidrSet = ( output , context ) : IpamPoolCidr [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2IpamPoolCidr ( entry , context ) ; } ) ; } ; const deserializeAws_ec2IpamPoolSet = ( output , context ) : IpamPool [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2IpamPool ( entry , context ) ; } ) ; } ; const deserializeAws_ec2IpamResourceCidr = ( output , context ) : IpamResourceCidr => { const contents = { IpamId : undefined , IpamScopeId : undefined , IpamPoolId : undefined , ResourceRegion : undefined , ResourceOwnerId : undefined , ResourceId : undefined , ResourceName : undefined , ResourceCidr : undefined , ResourceType : undefined , ResourceTags : undefined , IpUsage : undefined , ComplianceStatus : undefined , ManagementState : undefined , OverlapStatus : undefined , VpcId : undefined , } ; if ( output [ "ipamId" ] !== undefined ) { contents . IpamId = __expectString ( output [ "ipamId" ] ) ; } if ( output [ "ipamScopeId" ] !== undefined ) { contents . IpamScopeId = __expectString ( output [ "ipamScopeId" ] ) ; } if ( output [ "ipamPoolId" ] !== undefined ) { contents . IpamPoolId = __expectString ( output [ "ipamPoolId" ] ) ; } if ( output [ "resourceRegion" ] !== undefined ) { contents . ResourceRegion = __expectString ( output [ "resourceRegion" ] ) ; } if ( output [ "resourceOwnerId" ] !== undefined ) { contents . ResourceOwnerId = __expectString ( output [ "resourceOwnerId" ] ) ; } if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } if ( output [ "resourceName" ] !== undefined ) { contents . ResourceName = __expectString ( output [ "resourceName" ] ) ; } if ( output [ "resourceCidr" ] !== undefined ) { contents . ResourceCidr = __expectString ( output [ "resourceCidr" ] ) ; } if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } if ( output . resourceTagSet === "" ) { contents . ResourceTags = [ ] ; } if ( output [ "resourceTagSet" ] !== undefined && output [ "resourceTagSet" ] [ "item" ] !== undefined ) { contents . ResourceTags = deserializeAws_ec2IpamResourceTagList ( __getArrayIfSingleItem ( output [ "resourceTagSet" ] [ "item" ] ) , context ) ; } if ( output [ "ipUsage" ] !== undefined ) { contents . IpUsage = __strictParseFloat ( output [ "ipUsage" ] ) as number ; } if ( output [ "complianceStatus" ] !== undefined ) { contents . ComplianceStatus = __expectString ( output [ "complianceStatus" ] ) ; } if ( output [ "managementState" ] !== undefined ) { contents . ManagementState = __expectString ( output [ "managementState" ] ) ; } if ( output [ "overlapStatus" ] !== undefined ) { contents . OverlapStatus = __expectString ( output [ "overlapStatus" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } return contents ; } ; const deserializeAws_ec2IpamResourceCidrSet = ( output , context ) : IpamResourceCidr [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2IpamResourceCidr ( entry , context ) ; } ) ; } ; const deserializeAws_ec2IpamResourceTag = ( output , context ) : IpamResourceTag => { const contents = { Key : undefined , Value : undefined , } ; if ( output [ "key" ] !== undefined ) { contents . Key = __expectString ( output [ "key" ] ) ; } if ( output [ "value" ] !== undefined ) { contents . Value = __expectString ( output [ "value" ] ) ; } return contents ; } ; const deserializeAws_ec2IpamResourceTagList = ( output , context ) : IpamResourceTag [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2IpamResourceTag ( entry , context ) ; } ) ; } ; const deserializeAws_ec2IpamScope = ( output , context ) : IpamScope => { const contents = { OwnerId : undefined , IpamScopeId : undefined , IpamScopeArn : undefined , IpamArn : undefined , IpamRegion : undefined , IpamScopeType : undefined , IsDefault : undefined , Description : undefined , PoolCount : undefined , State : undefined , Tags : undefined , } ; if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "ipamScopeId" ] !== undefined ) { contents . IpamScopeId = __expectString ( output [ "ipamScopeId" ] ) ; } if ( output [ "ipamScopeArn" ] !== undefined ) { contents . IpamScopeArn = __expectString ( output [ "ipamScopeArn" ] ) ; } if ( output [ "ipamArn" ] !== undefined ) { contents . IpamArn = __expectString ( output [ "ipamArn" ] ) ; } if ( output [ "ipamRegion" ] !== undefined ) { contents . IpamRegion = __expectString ( output [ "ipamRegion" ] ) ; } if ( output [ "ipamScopeType" ] !== undefined ) { contents . IpamScopeType = __expectString ( output [ "ipamScopeType" ] ) ; } if ( output [ "isDefault" ] !== undefined ) { contents . IsDefault = __parseBoolean ( output [ "isDefault" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "poolCount" ] !== undefined ) { contents . PoolCount = __strictParseInt32 ( output [ "poolCount" ] ) as number ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2IpamScopeSet = ( output , context ) : IpamScope [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2IpamScope ( entry , context ) ; } ) ; } ; const deserializeAws_ec2IpamSet = ( output , context ) : Ipam [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Ipam ( entry , context ) ; } ) ; } ; const deserializeAws_ec2IpPermission = ( output , context ) : IpPermission => { const contents = { FromPort : undefined , IpProtocol : undefined , IpRanges : undefined , Ipv6Ranges : undefined , PrefixListIds : undefined , ToPort : undefined , UserIdGroupPairs : undefined , } ; if ( output [ "fromPort" ] !== undefined ) { contents . FromPort = __strictParseInt32 ( output [ "fromPort" ] ) as number ; } if ( output [ "ipProtocol" ] !== undefined ) { contents . IpProtocol = __expectString ( output [ "ipProtocol" ] ) ; } if ( output . ipRanges === "" ) { contents . IpRanges = [ ] ; } if ( output [ "ipRanges" ] !== undefined && output [ "ipRanges" ] [ "item" ] !== undefined ) { contents . IpRanges = deserializeAws_ec2IpRangeList ( __getArrayIfSingleItem ( output [ "ipRanges" ] [ "item" ] ) , context ) ; } if ( output . ipv6Ranges === "" ) { contents . Ipv6Ranges = [ ] ; } if ( output [ "ipv6Ranges" ] !== undefined && output [ "ipv6Ranges" ] [ "item" ] !== undefined ) { contents . Ipv6Ranges = deserializeAws_ec2Ipv6RangeList ( __getArrayIfSingleItem ( output [ "ipv6Ranges" ] [ "item" ] ) , context ) ; } if ( output . prefixListIds === "" ) { contents . PrefixListIds = [ ] ; } if ( output [ "prefixListIds" ] !== undefined && output [ "prefixListIds" ] [ "item" ] !== undefined ) { contents . PrefixListIds = deserializeAws_ec2PrefixListIdList ( __getArrayIfSingleItem ( output [ "prefixListIds" ] [ "item" ] ) , context ) ; } if ( output [ "toPort" ] !== undefined ) { contents . ToPort = __strictParseInt32 ( output [ "toPort" ] ) as number ; } if ( output . groups === "" ) { contents . UserIdGroupPairs = [ ] ; } if ( output [ "groups" ] !== undefined && output [ "groups" ] [ "item" ] !== undefined ) { contents . UserIdGroupPairs = deserializeAws_ec2UserIdGroupPairList ( __getArrayIfSingleItem ( output [ "groups" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2IpPermissionList = ( output , context ) : IpPermission [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2IpPermission ( entry , context ) ; } ) ; } ; const deserializeAws_ec2IpPrefixList = ( 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_ec2IpRange = ( output , context ) : IpRange => { const contents = { CidrIp : undefined , Description : undefined , } ; if ( output [ "cidrIp" ] !== undefined ) { contents . CidrIp = __expectString ( output [ "cidrIp" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } return contents ; } ; const deserializeAws_ec2IpRangeList = ( output , context ) : IpRange [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2IpRange ( entry , context ) ; } ) ; } ; const deserializeAws_ec2IpRanges = ( 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_ec2Ipv4PrefixesList = ( output , context ) : Ipv4PrefixSpecification [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Ipv4PrefixSpecification ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Ipv4PrefixList = ( output , context ) : Ipv4PrefixSpecificationRequest [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Ipv4PrefixSpecificationRequest ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Ipv4PrefixListResponse = ( output , context ) : Ipv4PrefixSpecificationResponse [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Ipv4PrefixSpecificationResponse ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Ipv4PrefixSpecification = ( output , context ) : Ipv4PrefixSpecification => { const contents = { Ipv4Prefix : undefined , } ; if ( output [ "ipv4Prefix" ] !== undefined ) { contents . Ipv4Prefix = __expectString ( output [ "ipv4Prefix" ] ) ; } return contents ; } ; const deserializeAws_ec2Ipv4PrefixSpecificationRequest = ( output , context ) : Ipv4PrefixSpecificationRequest => { const contents = { Ipv4Prefix : undefined , } ; if ( output [ "Ipv4Prefix" ] !== undefined ) { contents . Ipv4Prefix = __expectString ( output [ "Ipv4Prefix" ] ) ; } return contents ; } ; const deserializeAws_ec2Ipv4PrefixSpecificationResponse = ( output , context ) : Ipv4PrefixSpecificationResponse => { const contents = { Ipv4Prefix : undefined , } ; if ( output [ "ipv4Prefix" ] !== undefined ) { contents . Ipv4Prefix = __expectString ( output [ "ipv4Prefix" ] ) ; } return contents ; } ; const deserializeAws_ec2Ipv6AddressList = ( 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_ec2Ipv6CidrAssociation = ( output , context ) : Ipv6CidrAssociation => { const contents = { Ipv6Cidr : undefined , AssociatedResource : undefined , } ; if ( output [ "ipv6Cidr" ] !== undefined ) { contents . Ipv6Cidr = __expectString ( output [ "ipv6Cidr" ] ) ; } if ( output [ "associatedResource" ] !== undefined ) { contents . AssociatedResource = __expectString ( output [ "associatedResource" ] ) ; } return contents ; } ; const deserializeAws_ec2Ipv6CidrAssociationSet = ( output , context ) : Ipv6CidrAssociation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Ipv6CidrAssociation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Ipv6CidrBlock = ( output , context ) : Ipv6CidrBlock => { const contents = { Ipv6CidrBlock : undefined , } ; if ( output [ "ipv6CidrBlock" ] !== undefined ) { contents . Ipv6CidrBlock = __expectString ( output [ "ipv6CidrBlock" ] ) ; } return contents ; } ; const deserializeAws_ec2Ipv6CidrBlockSet = ( output , context ) : Ipv6CidrBlock [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Ipv6CidrBlock ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Ipv6Pool = ( output , context ) : Ipv6Pool => { const contents = { PoolId : undefined , Description : undefined , PoolCidrBlocks : undefined , Tags : undefined , } ; if ( output [ "poolId" ] !== undefined ) { contents . PoolId = __expectString ( output [ "poolId" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output . poolCidrBlockSet === "" ) { contents . PoolCidrBlocks = [ ] ; } if ( output [ "poolCidrBlockSet" ] !== undefined && output [ "poolCidrBlockSet" ] [ "item" ] !== undefined ) { contents . PoolCidrBlocks = deserializeAws_ec2PoolCidrBlocksSet ( __getArrayIfSingleItem ( output [ "poolCidrBlockSet" ] [ "item" ] ) , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2Ipv6PoolSet = ( output , context ) : Ipv6Pool [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Ipv6Pool ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Ipv6PrefixesList = ( output , context ) : Ipv6PrefixSpecification [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Ipv6PrefixSpecification ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Ipv6PrefixList = ( output , context ) : Ipv6PrefixSpecificationRequest [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Ipv6PrefixSpecificationRequest ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Ipv6PrefixListResponse = ( output , context ) : Ipv6PrefixSpecificationResponse [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Ipv6PrefixSpecificationResponse ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Ipv6PrefixSpecification = ( output , context ) : Ipv6PrefixSpecification => { const contents = { Ipv6Prefix : undefined , } ; if ( output [ "ipv6Prefix" ] !== undefined ) { contents . Ipv6Prefix = __expectString ( output [ "ipv6Prefix" ] ) ; } return contents ; } ; const deserializeAws_ec2Ipv6PrefixSpecificationRequest = ( output , context ) : Ipv6PrefixSpecificationRequest => { const contents = { Ipv6Prefix : undefined , } ; if ( output [ "Ipv6Prefix" ] !== undefined ) { contents . Ipv6Prefix = __expectString ( output [ "Ipv6Prefix" ] ) ; } return contents ; } ; const deserializeAws_ec2Ipv6PrefixSpecificationResponse = ( output , context ) : Ipv6PrefixSpecificationResponse => { const contents = { Ipv6Prefix : undefined , } ; if ( output [ "ipv6Prefix" ] !== undefined ) { contents . Ipv6Prefix = __expectString ( output [ "ipv6Prefix" ] ) ; } return contents ; } ; const deserializeAws_ec2Ipv6Range = ( output , context ) : Ipv6Range => { const contents = { CidrIpv6 : undefined , Description : undefined , } ; if ( output [ "cidrIpv6" ] !== undefined ) { contents . CidrIpv6 = __expectString ( output [ "cidrIpv6" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } return contents ; } ; const deserializeAws_ec2Ipv6RangeList = ( output , context ) : Ipv6Range [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Ipv6Range ( entry , context ) ; } ) ; } ; const deserializeAws_ec2KeyPair = ( output , context ) : KeyPair => { const contents = { KeyFingerprint : undefined , KeyMaterial : undefined , KeyName : undefined , KeyPairId : undefined , Tags : undefined , } ; if ( output [ "keyFingerprint" ] !== undefined ) { contents . KeyFingerprint = __expectString ( output [ "keyFingerprint" ] ) ; } if ( output [ "keyMaterial" ] !== undefined ) { contents . KeyMaterial = __expectString ( output [ "keyMaterial" ] ) ; } if ( output [ "keyName" ] !== undefined ) { contents . KeyName = __expectString ( output [ "keyName" ] ) ; } if ( output [ "keyPairId" ] !== undefined ) { contents . KeyPairId = __expectString ( output [ "keyPairId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2KeyPairInfo = ( output , context ) : KeyPairInfo => { const contents = { KeyPairId : undefined , KeyFingerprint : undefined , KeyName : undefined , KeyType : undefined , Tags : undefined , } ; if ( output [ "keyPairId" ] !== undefined ) { contents . KeyPairId = __expectString ( output [ "keyPairId" ] ) ; } if ( output [ "keyFingerprint" ] !== undefined ) { contents . KeyFingerprint = __expectString ( output [ "keyFingerprint" ] ) ; } if ( output [ "keyName" ] !== undefined ) { contents . KeyName = __expectString ( output [ "keyName" ] ) ; } if ( output [ "keyType" ] !== undefined ) { contents . KeyType = __expectString ( output [ "keyType" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2KeyPairList = ( output , context ) : KeyPairInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2KeyPairInfo ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LastError = ( output , context ) : LastError => { const contents = { Message : undefined , Code : undefined , } ; if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } return contents ; } ; const deserializeAws_ec2LaunchPermission = ( output , context ) : LaunchPermission => { const contents = { Group : undefined , UserId : undefined , OrganizationArn : undefined , OrganizationalUnitArn : undefined , } ; if ( output [ "group" ] !== undefined ) { contents . Group = __expectString ( output [ "group" ] ) ; } if ( output [ "userId" ] !== undefined ) { contents . UserId = __expectString ( output [ "userId" ] ) ; } if ( output [ "organizationArn" ] !== undefined ) { contents . OrganizationArn = __expectString ( output [ "organizationArn" ] ) ; } if ( output [ "organizationalUnitArn" ] !== undefined ) { contents . OrganizationalUnitArn = __expectString ( output [ "organizationalUnitArn" ] ) ; } return contents ; } ; const deserializeAws_ec2LaunchPermissionList = ( output , context ) : LaunchPermission [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LaunchPermission ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LaunchSpecification = ( output , context ) : LaunchSpecification => { const contents = { UserData : undefined , SecurityGroups : undefined , AddressingType : undefined , BlockDeviceMappings : undefined , EbsOptimized : undefined , IamInstanceProfile : undefined , ImageId : undefined , InstanceType : undefined , KernelId : undefined , KeyName : undefined , NetworkInterfaces : undefined , Placement : undefined , RamdiskId : undefined , SubnetId : undefined , Monitoring : undefined , } ; if ( output [ "userData" ] !== undefined ) { contents . UserData = __expectString ( output [ "userData" ] ) ; } if ( output . groupSet === "" ) { contents . SecurityGroups = [ ] ; } if ( output [ "groupSet" ] !== undefined && output [ "groupSet" ] [ "item" ] !== undefined ) { contents . SecurityGroups = deserializeAws_ec2GroupIdentifierList ( __getArrayIfSingleItem ( output [ "groupSet" ] [ "item" ] ) , context ) ; } if ( output [ "addressingType" ] !== undefined ) { contents . AddressingType = __expectString ( output [ "addressingType" ] ) ; } if ( output . blockDeviceMapping === "" ) { contents . BlockDeviceMappings = [ ] ; } if ( output [ "blockDeviceMapping" ] !== undefined && output [ "blockDeviceMapping" ] [ "item" ] !== undefined ) { contents . BlockDeviceMappings = deserializeAws_ec2BlockDeviceMappingList ( __getArrayIfSingleItem ( output [ "blockDeviceMapping" ] [ "item" ] ) , context ) ; } if ( output [ "ebsOptimized" ] !== undefined ) { contents . EbsOptimized = __parseBoolean ( output [ "ebsOptimized" ] ) ; } if ( output [ "iamInstanceProfile" ] !== undefined ) { contents . IamInstanceProfile = deserializeAws_ec2IamInstanceProfileSpecification ( output [ "iamInstanceProfile" ] , context ) ; } if ( output [ "imageId" ] !== undefined ) { contents . ImageId = __expectString ( output [ "imageId" ] ) ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "kernelId" ] !== undefined ) { contents . KernelId = __expectString ( output [ "kernelId" ] ) ; } if ( output [ "keyName" ] !== undefined ) { contents . KeyName = __expectString ( output [ "keyName" ] ) ; } if ( output . networkInterfaceSet === "" ) { contents . NetworkInterfaces = [ ] ; } if ( output [ "networkInterfaceSet" ] !== undefined && output [ "networkInterfaceSet" ] [ "item" ] !== undefined ) { contents . NetworkInterfaces = deserializeAws_ec2InstanceNetworkInterfaceSpecificationList ( __getArrayIfSingleItem ( output [ "networkInterfaceSet" ] [ "item" ] ) , context ) ; } if ( output [ "placement" ] !== undefined ) { contents . Placement = deserializeAws_ec2SpotPlacement ( output [ "placement" ] , context ) ; } if ( output [ "ramdiskId" ] !== undefined ) { contents . RamdiskId = __expectString ( output [ "ramdiskId" ] ) ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } if ( output [ "monitoring" ] !== undefined ) { contents . Monitoring = deserializeAws_ec2RunInstancesMonitoringEnabled ( output [ "monitoring" ] , context ) ; } return contents ; } ; const deserializeAws_ec2LaunchSpecsList = ( output , context ) : SpotFleetLaunchSpecification [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SpotFleetLaunchSpecification ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LaunchTemplate = ( output , context ) : LaunchTemplate => { const contents = { LaunchTemplateId : undefined , LaunchTemplateName : undefined , CreateTime : undefined , CreatedBy : undefined , DefaultVersionNumber : undefined , LatestVersionNumber : undefined , Tags : undefined , } ; if ( output [ "launchTemplateId" ] !== undefined ) { contents . LaunchTemplateId = __expectString ( output [ "launchTemplateId" ] ) ; } if ( output [ "launchTemplateName" ] !== undefined ) { contents . LaunchTemplateName = __expectString ( output [ "launchTemplateName" ] ) ; } if ( output [ "createTime" ] !== undefined ) { contents . CreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "createTime" ] ) ) ; } if ( output [ "createdBy" ] !== undefined ) { contents . CreatedBy = __expectString ( output [ "createdBy" ] ) ; } if ( output [ "defaultVersionNumber" ] !== undefined ) { contents . DefaultVersionNumber = __strictParseLong ( output [ "defaultVersionNumber" ] ) as number ; } if ( output [ "latestVersionNumber" ] !== undefined ) { contents . LatestVersionNumber = __strictParseLong ( output [ "latestVersionNumber" ] ) as number ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateAndOverridesResponse = ( output , context ) : LaunchTemplateAndOverridesResponse => { const contents = { LaunchTemplateSpecification : undefined , Overrides : undefined , } ; if ( output [ "launchTemplateSpecification" ] !== undefined ) { contents . LaunchTemplateSpecification = deserializeAws_ec2FleetLaunchTemplateSpecification ( output [ "launchTemplateSpecification" ] , context ) ; } if ( output [ "overrides" ] !== undefined ) { contents . Overrides = deserializeAws_ec2FleetLaunchTemplateOverrides ( output [ "overrides" ] , context ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateBlockDeviceMapping = ( output , context ) : LaunchTemplateBlockDeviceMapping => { const contents = { DeviceName : undefined , VirtualName : undefined , Ebs : undefined , NoDevice : undefined , } ; if ( output [ "deviceName" ] !== undefined ) { contents . DeviceName = __expectString ( output [ "deviceName" ] ) ; } if ( output [ "virtualName" ] !== undefined ) { contents . VirtualName = __expectString ( output [ "virtualName" ] ) ; } if ( output [ "ebs" ] !== undefined ) { contents . Ebs = deserializeAws_ec2LaunchTemplateEbsBlockDevice ( output [ "ebs" ] , context ) ; } if ( output [ "noDevice" ] !== undefined ) { contents . NoDevice = __expectString ( output [ "noDevice" ] ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateBlockDeviceMappingList = ( output , context ) : LaunchTemplateBlockDeviceMapping [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LaunchTemplateBlockDeviceMapping ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LaunchTemplateCapacityReservationSpecificationResponse = ( output , context ) : LaunchTemplateCapacityReservationSpecificationResponse => { const contents = { CapacityReservationPreference : undefined , CapacityReservationTarget : undefined , } ; if ( output [ "capacityReservationPreference" ] !== undefined ) { contents . CapacityReservationPreference = __expectString ( output [ "capacityReservationPreference" ] ) ; } if ( output [ "capacityReservationTarget" ] !== undefined ) { contents . CapacityReservationTarget = deserializeAws_ec2CapacityReservationTargetResponse ( output [ "capacityReservationTarget" ] , context ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateConfig = ( output , context ) : LaunchTemplateConfig => { const contents = { LaunchTemplateSpecification : undefined , Overrides : undefined , } ; if ( output [ "launchTemplateSpecification" ] !== undefined ) { contents . LaunchTemplateSpecification = deserializeAws_ec2FleetLaunchTemplateSpecification ( output [ "launchTemplateSpecification" ] , context ) ; } if ( output . overrides === "" ) { contents . Overrides = [ ] ; } if ( output [ "overrides" ] !== undefined && output [ "overrides" ] [ "item" ] !== undefined ) { contents . Overrides = deserializeAws_ec2LaunchTemplateOverridesList ( __getArrayIfSingleItem ( output [ "overrides" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateConfigList = ( output , context ) : LaunchTemplateConfig [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LaunchTemplateConfig ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LaunchTemplateCpuOptions = ( output , context ) : LaunchTemplateCpuOptions => { const contents = { CoreCount : undefined , ThreadsPerCore : undefined , } ; if ( output [ "coreCount" ] !== undefined ) { contents . CoreCount = __strictParseInt32 ( output [ "coreCount" ] ) as number ; } if ( output [ "threadsPerCore" ] !== undefined ) { contents . ThreadsPerCore = __strictParseInt32 ( output [ "threadsPerCore" ] ) as number ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateEbsBlockDevice = ( output , context ) : LaunchTemplateEbsBlockDevice => { const contents = { Encrypted : undefined , DeleteOnTermination : undefined , Iops : undefined , KmsKeyId : undefined , SnapshotId : undefined , VolumeSize : undefined , VolumeType : undefined , Throughput : undefined , } ; if ( output [ "encrypted" ] !== undefined ) { contents . Encrypted = __parseBoolean ( output [ "encrypted" ] ) ; } if ( output [ "deleteOnTermination" ] !== undefined ) { contents . DeleteOnTermination = __parseBoolean ( output [ "deleteOnTermination" ] ) ; } if ( output [ "iops" ] !== undefined ) { contents . Iops = __strictParseInt32 ( output [ "iops" ] ) as number ; } if ( output [ "kmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "kmsKeyId" ] ) ; } if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output [ "volumeSize" ] !== undefined ) { contents . VolumeSize = __strictParseInt32 ( output [ "volumeSize" ] ) as number ; } if ( output [ "volumeType" ] !== undefined ) { contents . VolumeType = __expectString ( output [ "volumeType" ] ) ; } if ( output [ "throughput" ] !== undefined ) { contents . Throughput = __strictParseInt32 ( output [ "throughput" ] ) as number ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateElasticInferenceAcceleratorResponse = ( output , context ) : LaunchTemplateElasticInferenceAcceleratorResponse => { const contents = { Type : undefined , Count : undefined , } ; if ( output [ "type" ] !== undefined ) { contents . Type = __expectString ( output [ "type" ] ) ; } if ( output [ "count" ] !== undefined ) { contents . Count = __strictParseInt32 ( output [ "count" ] ) as number ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateElasticInferenceAcceleratorResponseList = ( output , context ) : LaunchTemplateElasticInferenceAcceleratorResponse [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LaunchTemplateElasticInferenceAcceleratorResponse ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LaunchTemplateEnclaveOptions = ( output , context ) : LaunchTemplateEnclaveOptions => { const contents = { Enabled : undefined , } ; if ( output [ "enabled" ] !== undefined ) { contents . Enabled = __parseBoolean ( output [ "enabled" ] ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateHibernationOptions = ( output , context ) : LaunchTemplateHibernationOptions => { const contents = { Configured : undefined , } ; if ( output [ "configured" ] !== undefined ) { contents . Configured = __parseBoolean ( output [ "configured" ] ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateIamInstanceProfileSpecification = ( output , context ) : LaunchTemplateIamInstanceProfileSpecification => { const contents = { Arn : undefined , Name : undefined , } ; if ( output [ "arn" ] !== undefined ) { contents . Arn = __expectString ( output [ "arn" ] ) ; } if ( output [ "name" ] !== undefined ) { contents . Name = __expectString ( output [ "name" ] ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateInstanceMarketOptions = ( output , context ) : LaunchTemplateInstanceMarketOptions => { const contents = { MarketType : undefined , SpotOptions : undefined , } ; if ( output [ "marketType" ] !== undefined ) { contents . MarketType = __expectString ( output [ "marketType" ] ) ; } if ( output [ "spotOptions" ] !== undefined ) { contents . SpotOptions = deserializeAws_ec2LaunchTemplateSpotMarketOptions ( output [ "spotOptions" ] , context ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateInstanceMetadataOptions = ( output , context ) : LaunchTemplateInstanceMetadataOptions => { const contents = { State : undefined , HttpTokens : undefined , HttpPutResponseHopLimit : undefined , HttpEndpoint : undefined , HttpProtocolIpv6 : undefined , InstanceMetadataTags : undefined , } ; if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "httpTokens" ] !== undefined ) { contents . HttpTokens = __expectString ( output [ "httpTokens" ] ) ; } if ( output [ "httpPutResponseHopLimit" ] !== undefined ) { contents . HttpPutResponseHopLimit = __strictParseInt32 ( output [ "httpPutResponseHopLimit" ] ) as number ; } if ( output [ "httpEndpoint" ] !== undefined ) { contents . HttpEndpoint = __expectString ( output [ "httpEndpoint" ] ) ; } if ( output [ "httpProtocolIpv6" ] !== undefined ) { contents . HttpProtocolIpv6 = __expectString ( output [ "httpProtocolIpv6" ] ) ; } if ( output [ "instanceMetadataTags" ] !== undefined ) { contents . InstanceMetadataTags = __expectString ( output [ "instanceMetadataTags" ] ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateInstanceNetworkInterfaceSpecification = ( output , context ) : LaunchTemplateInstanceNetworkInterfaceSpecification => { const contents = { AssociateCarrierIpAddress : undefined , AssociatePublicIpAddress : undefined , DeleteOnTermination : undefined , Description : undefined , DeviceIndex : undefined , Groups : undefined , InterfaceType : undefined , Ipv6AddressCount : undefined , Ipv6Addresses : undefined , NetworkInterfaceId : undefined , PrivateIpAddress : undefined , PrivateIpAddresses : undefined , SecondaryPrivateIpAddressCount : undefined , SubnetId : undefined , NetworkCardIndex : undefined , Ipv4Prefixes : undefined , Ipv4PrefixCount : undefined , Ipv6Prefixes : undefined , Ipv6PrefixCount : undefined , } ; if ( output [ "associateCarrierIpAddress" ] !== undefined ) { contents . AssociateCarrierIpAddress = __parseBoolean ( output [ "associateCarrierIpAddress" ] ) ; } if ( output [ "associatePublicIpAddress" ] !== undefined ) { contents . AssociatePublicIpAddress = __parseBoolean ( output [ "associatePublicIpAddress" ] ) ; } if ( output [ "deleteOnTermination" ] !== undefined ) { contents . DeleteOnTermination = __parseBoolean ( output [ "deleteOnTermination" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "deviceIndex" ] !== undefined ) { contents . DeviceIndex = __strictParseInt32 ( output [ "deviceIndex" ] ) as number ; } if ( output . groupSet === "" ) { contents . Groups = [ ] ; } if ( output [ "groupSet" ] !== undefined && output [ "groupSet" ] [ "groupId" ] !== undefined ) { contents . Groups = deserializeAws_ec2GroupIdStringList ( __getArrayIfSingleItem ( output [ "groupSet" ] [ "groupId" ] ) , context ) ; } if ( output [ "interfaceType" ] !== undefined ) { contents . InterfaceType = __expectString ( output [ "interfaceType" ] ) ; } if ( output [ "ipv6AddressCount" ] !== undefined ) { contents . Ipv6AddressCount = __strictParseInt32 ( output [ "ipv6AddressCount" ] ) as number ; } if ( output . ipv6AddressesSet === "" ) { contents . Ipv6Addresses = [ ] ; } if ( output [ "ipv6AddressesSet" ] !== undefined && output [ "ipv6AddressesSet" ] [ "item" ] !== undefined ) { contents . Ipv6Addresses = deserializeAws_ec2InstanceIpv6AddressList ( __getArrayIfSingleItem ( output [ "ipv6AddressesSet" ] [ "item" ] ) , context ) ; } if ( output [ "networkInterfaceId" ] !== undefined ) { contents . NetworkInterfaceId = __expectString ( output [ "networkInterfaceId" ] ) ; } if ( output [ "privateIpAddress" ] !== undefined ) { contents . PrivateIpAddress = __expectString ( output [ "privateIpAddress" ] ) ; } if ( output . privateIpAddressesSet === "" ) { contents . PrivateIpAddresses = [ ] ; } if ( output [ "privateIpAddressesSet" ] !== undefined && output [ "privateIpAddressesSet" ] [ "item" ] !== undefined ) { contents . PrivateIpAddresses = deserializeAws_ec2PrivateIpAddressSpecificationList ( __getArrayIfSingleItem ( output [ "privateIpAddressesSet" ] [ "item" ] ) , context ) ; } if ( output [ "secondaryPrivateIpAddressCount" ] !== undefined ) { contents . SecondaryPrivateIpAddressCount = __strictParseInt32 ( output [ "secondaryPrivateIpAddressCount" ] ) as number ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } if ( output [ "networkCardIndex" ] !== undefined ) { contents . NetworkCardIndex = __strictParseInt32 ( output [ "networkCardIndex" ] ) as number ; } if ( output . ipv4PrefixSet === "" ) { contents . Ipv4Prefixes = [ ] ; } if ( output [ "ipv4PrefixSet" ] !== undefined && output [ "ipv4PrefixSet" ] [ "item" ] !== undefined ) { contents . Ipv4Prefixes = deserializeAws_ec2Ipv4PrefixListResponse ( __getArrayIfSingleItem ( output [ "ipv4PrefixSet" ] [ "item" ] ) , context ) ; } if ( output [ "ipv4PrefixCount" ] !== undefined ) { contents . Ipv4PrefixCount = __strictParseInt32 ( output [ "ipv4PrefixCount" ] ) as number ; } if ( output . ipv6PrefixSet === "" ) { contents . Ipv6Prefixes = [ ] ; } if ( output [ "ipv6PrefixSet" ] !== undefined && output [ "ipv6PrefixSet" ] [ "item" ] !== undefined ) { contents . Ipv6Prefixes = deserializeAws_ec2Ipv6PrefixListResponse ( __getArrayIfSingleItem ( output [ "ipv6PrefixSet" ] [ "item" ] ) , context ) ; } if ( output [ "ipv6PrefixCount" ] !== undefined ) { contents . Ipv6PrefixCount = __strictParseInt32 ( output [ "ipv6PrefixCount" ] ) as number ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateInstanceNetworkInterfaceSpecificationList = ( output , context ) : LaunchTemplateInstanceNetworkInterfaceSpecification [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LaunchTemplateInstanceNetworkInterfaceSpecification ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LaunchTemplateLicenseConfiguration = ( output , context ) : LaunchTemplateLicenseConfiguration => { const contents = { LicenseConfigurationArn : undefined , } ; if ( output [ "licenseConfigurationArn" ] !== undefined ) { contents . LicenseConfigurationArn = __expectString ( output [ "licenseConfigurationArn" ] ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateLicenseList = ( output , context ) : LaunchTemplateLicenseConfiguration [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LaunchTemplateLicenseConfiguration ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LaunchTemplateOverrides = ( output , context ) : LaunchTemplateOverrides => { const contents = { InstanceType : undefined , SpotPrice : undefined , SubnetId : undefined , AvailabilityZone : undefined , WeightedCapacity : undefined , Priority : undefined , InstanceRequirements : undefined , } ; if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "spotPrice" ] !== undefined ) { contents . SpotPrice = __expectString ( output [ "spotPrice" ] ) ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "weightedCapacity" ] !== undefined ) { contents . WeightedCapacity = __strictParseFloat ( output [ "weightedCapacity" ] ) as number ; } if ( output [ "priority" ] !== undefined ) { contents . Priority = __strictParseFloat ( output [ "priority" ] ) as number ; } if ( output [ "instanceRequirements" ] !== undefined ) { contents . InstanceRequirements = deserializeAws_ec2InstanceRequirements ( output [ "instanceRequirements" ] , context ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateOverridesList = ( output , context ) : LaunchTemplateOverrides [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LaunchTemplateOverrides ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LaunchTemplatePlacement = ( output , context ) : LaunchTemplatePlacement => { const contents = { AvailabilityZone : undefined , Affinity : undefined , GroupName : undefined , HostId : undefined , Tenancy : undefined , SpreadDomain : undefined , HostResourceGroupArn : undefined , PartitionNumber : undefined , } ; if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "affinity" ] !== undefined ) { contents . Affinity = __expectString ( output [ "affinity" ] ) ; } if ( output [ "groupName" ] !== undefined ) { contents . GroupName = __expectString ( output [ "groupName" ] ) ; } if ( output [ "hostId" ] !== undefined ) { contents . HostId = __expectString ( output [ "hostId" ] ) ; } if ( output [ "tenancy" ] !== undefined ) { contents . Tenancy = __expectString ( output [ "tenancy" ] ) ; } if ( output [ "spreadDomain" ] !== undefined ) { contents . SpreadDomain = __expectString ( output [ "spreadDomain" ] ) ; } if ( output [ "hostResourceGroupArn" ] !== undefined ) { contents . HostResourceGroupArn = __expectString ( output [ "hostResourceGroupArn" ] ) ; } if ( output [ "partitionNumber" ] !== undefined ) { contents . PartitionNumber = __strictParseInt32 ( output [ "partitionNumber" ] ) as number ; } return contents ; } ; const deserializeAws_ec2LaunchTemplatePrivateDnsNameOptions = ( output , context ) : LaunchTemplatePrivateDnsNameOptions => { const contents = { HostnameType : undefined , EnableResourceNameDnsARecord : undefined , EnableResourceNameDnsAAAARecord : undefined , } ; if ( output [ "hostnameType" ] !== undefined ) { contents . HostnameType = __expectString ( output [ "hostnameType" ] ) ; } if ( output [ "enableResourceNameDnsARecord" ] !== undefined ) { contents . EnableResourceNameDnsARecord = __parseBoolean ( output [ "enableResourceNameDnsARecord" ] ) ; } if ( output [ "enableResourceNameDnsAAAARecord" ] !== undefined ) { contents . EnableResourceNameDnsAAAARecord = __parseBoolean ( output [ "enableResourceNameDnsAAAARecord" ] ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateSet = ( output , context ) : LaunchTemplate [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LaunchTemplate ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LaunchTemplatesMonitoring = ( output , context ) : LaunchTemplatesMonitoring => { const contents = { Enabled : undefined , } ; if ( output [ "enabled" ] !== undefined ) { contents . Enabled = __parseBoolean ( output [ "enabled" ] ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateSpotMarketOptions = ( output , context ) : LaunchTemplateSpotMarketOptions => { const contents = { MaxPrice : undefined , SpotInstanceType : undefined , BlockDurationMinutes : undefined , ValidUntil : undefined , InstanceInterruptionBehavior : undefined , } ; if ( output [ "maxPrice" ] !== undefined ) { contents . MaxPrice = __expectString ( output [ "maxPrice" ] ) ; } if ( output [ "spotInstanceType" ] !== undefined ) { contents . SpotInstanceType = __expectString ( output [ "spotInstanceType" ] ) ; } if ( output [ "blockDurationMinutes" ] !== undefined ) { contents . BlockDurationMinutes = __strictParseInt32 ( output [ "blockDurationMinutes" ] ) as number ; } if ( output [ "validUntil" ] !== undefined ) { contents . ValidUntil = __expectNonNull ( __parseRfc3339DateTime ( output [ "validUntil" ] ) ) ; } if ( output [ "instanceInterruptionBehavior" ] !== undefined ) { contents . InstanceInterruptionBehavior = __expectString ( output [ "instanceInterruptionBehavior" ] ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateTagSpecification = ( output , context ) : LaunchTemplateTagSpecification => { const contents = { ResourceType : undefined , Tags : undefined , } ; if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateTagSpecificationList = ( output , context ) : LaunchTemplateTagSpecification [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LaunchTemplateTagSpecification ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LaunchTemplateVersion = ( output , context ) : LaunchTemplateVersion => { const contents = { LaunchTemplateId : undefined , LaunchTemplateName : undefined , VersionNumber : undefined , VersionDescription : undefined , CreateTime : undefined , CreatedBy : undefined , DefaultVersion : undefined , LaunchTemplateData : undefined , } ; if ( output [ "launchTemplateId" ] !== undefined ) { contents . LaunchTemplateId = __expectString ( output [ "launchTemplateId" ] ) ; } if ( output [ "launchTemplateName" ] !== undefined ) { contents . LaunchTemplateName = __expectString ( output [ "launchTemplateName" ] ) ; } if ( output [ "versionNumber" ] !== undefined ) { contents . VersionNumber = __strictParseLong ( output [ "versionNumber" ] ) as number ; } if ( output [ "versionDescription" ] !== undefined ) { contents . VersionDescription = __expectString ( output [ "versionDescription" ] ) ; } if ( output [ "createTime" ] !== undefined ) { contents . CreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "createTime" ] ) ) ; } if ( output [ "createdBy" ] !== undefined ) { contents . CreatedBy = __expectString ( output [ "createdBy" ] ) ; } if ( output [ "defaultVersion" ] !== undefined ) { contents . DefaultVersion = __parseBoolean ( output [ "defaultVersion" ] ) ; } if ( output [ "launchTemplateData" ] !== undefined ) { contents . LaunchTemplateData = deserializeAws_ec2ResponseLaunchTemplateData ( output [ "launchTemplateData" ] , context ) ; } return contents ; } ; const deserializeAws_ec2LaunchTemplateVersionSet = ( output , context ) : LaunchTemplateVersion [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LaunchTemplateVersion ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LicenseConfiguration = ( output , context ) : LicenseConfiguration => { const contents = { LicenseConfigurationArn : undefined , } ; if ( output [ "licenseConfigurationArn" ] !== undefined ) { contents . LicenseConfigurationArn = __expectString ( output [ "licenseConfigurationArn" ] ) ; } return contents ; } ; const deserializeAws_ec2LicenseList = ( output , context ) : LicenseConfiguration [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LicenseConfiguration ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ListSnapshotsInRecycleBinResult = ( output , context ) : ListSnapshotsInRecycleBinResult => { const contents = { Snapshots : undefined , NextToken : undefined , } ; if ( output . snapshotSet === "" ) { contents . Snapshots = [ ] ; } if ( output [ "snapshotSet" ] !== undefined && output [ "snapshotSet" ] [ "item" ] !== undefined ) { contents . Snapshots = deserializeAws_ec2SnapshotRecycleBinInfoList ( __getArrayIfSingleItem ( output [ "snapshotSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2LoadBalancersConfig = ( output , context ) : LoadBalancersConfig => { const contents = { ClassicLoadBalancersConfig : undefined , TargetGroupsConfig : undefined , } ; if ( output [ "classicLoadBalancersConfig" ] !== undefined ) { contents . ClassicLoadBalancersConfig = deserializeAws_ec2ClassicLoadBalancersConfig ( output [ "classicLoadBalancersConfig" ] , context ) ; } if ( output [ "targetGroupsConfig" ] !== undefined ) { contents . TargetGroupsConfig = deserializeAws_ec2TargetGroupsConfig ( output [ "targetGroupsConfig" ] , context ) ; } return contents ; } ; const deserializeAws_ec2LoadPermission = ( output , context ) : LoadPermission => { const contents = { UserId : undefined , Group : undefined , } ; if ( output [ "userId" ] !== undefined ) { contents . UserId = __expectString ( output [ "userId" ] ) ; } if ( output [ "group" ] !== undefined ) { contents . Group = __expectString ( output [ "group" ] ) ; } return contents ; } ; const deserializeAws_ec2LoadPermissionList = ( output , context ) : LoadPermission [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LoadPermission ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LocalGateway = ( output , context ) : LocalGateway => { const contents = { LocalGatewayId : undefined , OutpostArn : undefined , OwnerId : undefined , State : undefined , Tags : undefined , } ; if ( output [ "localGatewayId" ] !== undefined ) { contents . LocalGatewayId = __expectString ( output [ "localGatewayId" ] ) ; } if ( output [ "outpostArn" ] !== undefined ) { contents . OutpostArn = __expectString ( output [ "outpostArn" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2LocalGatewayRoute = ( output , context ) : LocalGatewayRoute => { const contents = { DestinationCidrBlock : undefined , LocalGatewayVirtualInterfaceGroupId : undefined , Type : undefined , State : undefined , LocalGatewayRouteTableId : undefined , LocalGatewayRouteTableArn : undefined , OwnerId : undefined , } ; if ( output [ "destinationCidrBlock" ] !== undefined ) { contents . DestinationCidrBlock = __expectString ( output [ "destinationCidrBlock" ] ) ; } if ( output [ "localGatewayVirtualInterfaceGroupId" ] !== undefined ) { contents . LocalGatewayVirtualInterfaceGroupId = __expectString ( output [ "localGatewayVirtualInterfaceGroupId" ] ) ; } if ( output [ "type" ] !== undefined ) { contents . Type = __expectString ( output [ "type" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "localGatewayRouteTableId" ] !== undefined ) { contents . LocalGatewayRouteTableId = __expectString ( output [ "localGatewayRouteTableId" ] ) ; } if ( output [ "localGatewayRouteTableArn" ] !== undefined ) { contents . LocalGatewayRouteTableArn = __expectString ( output [ "localGatewayRouteTableArn" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } return contents ; } ; const deserializeAws_ec2LocalGatewayRouteList = ( output , context ) : LocalGatewayRoute [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LocalGatewayRoute ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LocalGatewayRouteTable = ( output , context ) : LocalGatewayRouteTable => { const contents = { LocalGatewayRouteTableId : undefined , LocalGatewayRouteTableArn : undefined , LocalGatewayId : undefined , OutpostArn : undefined , OwnerId : undefined , State : undefined , Tags : undefined , } ; if ( output [ "localGatewayRouteTableId" ] !== undefined ) { contents . LocalGatewayRouteTableId = __expectString ( output [ "localGatewayRouteTableId" ] ) ; } if ( output [ "localGatewayRouteTableArn" ] !== undefined ) { contents . LocalGatewayRouteTableArn = __expectString ( output [ "localGatewayRouteTableArn" ] ) ; } if ( output [ "localGatewayId" ] !== undefined ) { contents . LocalGatewayId = __expectString ( output [ "localGatewayId" ] ) ; } if ( output [ "outpostArn" ] !== undefined ) { contents . OutpostArn = __expectString ( output [ "outpostArn" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2LocalGatewayRouteTableSet = ( output , context ) : LocalGatewayRouteTable [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LocalGatewayRouteTable ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LocalGatewayRouteTableVirtualInterfaceGroupAssociation = ( output , context ) : LocalGatewayRouteTableVirtualInterfaceGroupAssociation => { const contents = { LocalGatewayRouteTableVirtualInterfaceGroupAssociationId : undefined , LocalGatewayVirtualInterfaceGroupId : undefined , LocalGatewayId : undefined , LocalGatewayRouteTableId : undefined , LocalGatewayRouteTableArn : undefined , OwnerId : undefined , State : undefined , Tags : undefined , } ; if ( output [ "localGatewayRouteTableVirtualInterfaceGroupAssociationId" ] !== undefined ) { contents . LocalGatewayRouteTableVirtualInterfaceGroupAssociationId = __expectString ( output [ "localGatewayRouteTableVirtualInterfaceGroupAssociationId" ] ) ; } if ( output [ "localGatewayVirtualInterfaceGroupId" ] !== undefined ) { contents . LocalGatewayVirtualInterfaceGroupId = __expectString ( output [ "localGatewayVirtualInterfaceGroupId" ] ) ; } if ( output [ "localGatewayId" ] !== undefined ) { contents . LocalGatewayId = __expectString ( output [ "localGatewayId" ] ) ; } if ( output [ "localGatewayRouteTableId" ] !== undefined ) { contents . LocalGatewayRouteTableId = __expectString ( output [ "localGatewayRouteTableId" ] ) ; } if ( output [ "localGatewayRouteTableArn" ] !== undefined ) { contents . LocalGatewayRouteTableArn = __expectString ( output [ "localGatewayRouteTableArn" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2LocalGatewayRouteTableVirtualInterfaceGroupAssociationSet = ( output , context ) : LocalGatewayRouteTableVirtualInterfaceGroupAssociation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LocalGatewayRouteTableVirtualInterfaceGroupAssociation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LocalGatewayRouteTableVpcAssociation = ( output , context ) : LocalGatewayRouteTableVpcAssociation => { const contents = { LocalGatewayRouteTableVpcAssociationId : undefined , LocalGatewayRouteTableId : undefined , LocalGatewayRouteTableArn : undefined , LocalGatewayId : undefined , VpcId : undefined , OwnerId : undefined , State : undefined , Tags : undefined , } ; if ( output [ "localGatewayRouteTableVpcAssociationId" ] !== undefined ) { contents . LocalGatewayRouteTableVpcAssociationId = __expectString ( output [ "localGatewayRouteTableVpcAssociationId" ] ) ; } if ( output [ "localGatewayRouteTableId" ] !== undefined ) { contents . LocalGatewayRouteTableId = __expectString ( output [ "localGatewayRouteTableId" ] ) ; } if ( output [ "localGatewayRouteTableArn" ] !== undefined ) { contents . LocalGatewayRouteTableArn = __expectString ( output [ "localGatewayRouteTableArn" ] ) ; } if ( output [ "localGatewayId" ] !== undefined ) { contents . LocalGatewayId = __expectString ( output [ "localGatewayId" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2LocalGatewayRouteTableVpcAssociationSet = ( output , context ) : LocalGatewayRouteTableVpcAssociation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LocalGatewayRouteTableVpcAssociation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LocalGatewaySet = ( output , context ) : LocalGateway [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LocalGateway ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LocalGatewayVirtualInterface = ( output , context ) : LocalGatewayVirtualInterface => { const contents = { LocalGatewayVirtualInterfaceId : undefined , LocalGatewayId : undefined , Vlan : undefined , LocalAddress : undefined , PeerAddress : undefined , LocalBgpAsn : undefined , PeerBgpAsn : undefined , OwnerId : undefined , Tags : undefined , } ; if ( output [ "localGatewayVirtualInterfaceId" ] !== undefined ) { contents . LocalGatewayVirtualInterfaceId = __expectString ( output [ "localGatewayVirtualInterfaceId" ] ) ; } if ( output [ "localGatewayId" ] !== undefined ) { contents . LocalGatewayId = __expectString ( output [ "localGatewayId" ] ) ; } if ( output [ "vlan" ] !== undefined ) { contents . Vlan = __strictParseInt32 ( output [ "vlan" ] ) as number ; } if ( output [ "localAddress" ] !== undefined ) { contents . LocalAddress = __expectString ( output [ "localAddress" ] ) ; } if ( output [ "peerAddress" ] !== undefined ) { contents . PeerAddress = __expectString ( output [ "peerAddress" ] ) ; } if ( output [ "localBgpAsn" ] !== undefined ) { contents . LocalBgpAsn = __strictParseInt32 ( output [ "localBgpAsn" ] ) as number ; } if ( output [ "peerBgpAsn" ] !== undefined ) { contents . PeerBgpAsn = __strictParseInt32 ( output [ "peerBgpAsn" ] ) as number ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2LocalGatewayVirtualInterfaceGroup = ( output , context ) : LocalGatewayVirtualInterfaceGroup => { const contents = { LocalGatewayVirtualInterfaceGroupId : undefined , LocalGatewayVirtualInterfaceIds : undefined , LocalGatewayId : undefined , OwnerId : undefined , Tags : undefined , } ; if ( output [ "localGatewayVirtualInterfaceGroupId" ] !== undefined ) { contents . LocalGatewayVirtualInterfaceGroupId = __expectString ( output [ "localGatewayVirtualInterfaceGroupId" ] ) ; } if ( output . localGatewayVirtualInterfaceIdSet === "" ) { contents . LocalGatewayVirtualInterfaceIds = [ ] ; } if ( output [ "localGatewayVirtualInterfaceIdSet" ] !== undefined && output [ "localGatewayVirtualInterfaceIdSet" ] [ "item" ] !== undefined ) { contents . LocalGatewayVirtualInterfaceIds = deserializeAws_ec2LocalGatewayVirtualInterfaceIdSet ( __getArrayIfSingleItem ( output [ "localGatewayVirtualInterfaceIdSet" ] [ "item" ] ) , context ) ; } if ( output [ "localGatewayId" ] !== undefined ) { contents . LocalGatewayId = __expectString ( output [ "localGatewayId" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2LocalGatewayVirtualInterfaceGroupSet = ( output , context ) : LocalGatewayVirtualInterfaceGroup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LocalGatewayVirtualInterfaceGroup ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LocalGatewayVirtualInterfaceIdSet = ( 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_ec2LocalGatewayVirtualInterfaceSet = ( output , context ) : LocalGatewayVirtualInterface [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2LocalGatewayVirtualInterface ( entry , context ) ; } ) ; } ; const deserializeAws_ec2LocalStorageTypeSet = ( output , context ) : ( LocalStorageType | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_ec2ManagedPrefixList = ( output , context ) : ManagedPrefixList => { const contents = { PrefixListId : undefined , AddressFamily : undefined , State : undefined , StateMessage : undefined , PrefixListArn : undefined , PrefixListName : undefined , MaxEntries : undefined , Version : undefined , Tags : undefined , OwnerId : undefined , } ; if ( output [ "prefixListId" ] !== undefined ) { contents . PrefixListId = __expectString ( output [ "prefixListId" ] ) ; } if ( output [ "addressFamily" ] !== undefined ) { contents . AddressFamily = __expectString ( output [ "addressFamily" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "stateMessage" ] !== undefined ) { contents . StateMessage = __expectString ( output [ "stateMessage" ] ) ; } if ( output [ "prefixListArn" ] !== undefined ) { contents . PrefixListArn = __expectString ( output [ "prefixListArn" ] ) ; } if ( output [ "prefixListName" ] !== undefined ) { contents . PrefixListName = __expectString ( output [ "prefixListName" ] ) ; } if ( output [ "maxEntries" ] !== undefined ) { contents . MaxEntries = __strictParseInt32 ( output [ "maxEntries" ] ) as number ; } if ( output [ "version" ] !== undefined ) { contents . Version = __strictParseLong ( output [ "version" ] ) as number ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } return contents ; } ; const deserializeAws_ec2ManagedPrefixListSet = ( output , context ) : ManagedPrefixList [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ManagedPrefixList ( entry , context ) ; } ) ; } ; const deserializeAws_ec2MemoryGiBPerVCpu = ( output , context ) : MemoryGiBPerVCpu => { const contents = { Min : undefined , Max : undefined , } ; if ( output [ "min" ] !== undefined ) { contents . Min = __strictParseFloat ( output [ "min" ] ) as number ; } if ( output [ "max" ] !== undefined ) { contents . Max = __strictParseFloat ( output [ "max" ] ) as number ; } return contents ; } ; const deserializeAws_ec2MemoryInfo = ( output , context ) : MemoryInfo => { const contents = { SizeInMiB : undefined , } ; if ( output [ "sizeInMiB" ] !== undefined ) { contents . SizeInMiB = __strictParseLong ( output [ "sizeInMiB" ] ) as number ; } return contents ; } ; const deserializeAws_ec2MemoryMiB = ( output , context ) : MemoryMiB => { const contents = { Min : undefined , Max : undefined , } ; if ( output [ "min" ] !== undefined ) { contents . Min = __strictParseInt32 ( output [ "min" ] ) as number ; } if ( output [ "max" ] !== undefined ) { contents . Max = __strictParseInt32 ( output [ "max" ] ) as number ; } return contents ; } ; const deserializeAws_ec2ModifyAddressAttributeResult = ( output , context ) : ModifyAddressAttributeResult => { const contents = { Address : undefined , } ; if ( output [ "address" ] !== undefined ) { contents . Address = deserializeAws_ec2AddressAttribute ( output [ "address" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyAvailabilityZoneGroupResult = ( output , context ) : ModifyAvailabilityZoneGroupResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifyCapacityReservationFleetResult = ( output , context ) : ModifyCapacityReservationFleetResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifyCapacityReservationResult = ( output , context ) : ModifyCapacityReservationResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifyClientVpnEndpointResult = ( output , context ) : ModifyClientVpnEndpointResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifyDefaultCreditSpecificationResult = ( output , context ) : ModifyDefaultCreditSpecificationResult => { const contents = { InstanceFamilyCreditSpecification : undefined , } ; if ( output [ "instanceFamilyCreditSpecification" ] !== undefined ) { contents . InstanceFamilyCreditSpecification = deserializeAws_ec2InstanceFamilyCreditSpecification ( output [ "instanceFamilyCreditSpecification" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyEbsDefaultKmsKeyIdResult = ( output , context ) : ModifyEbsDefaultKmsKeyIdResult => { const contents = { KmsKeyId : undefined , } ; if ( output [ "kmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "kmsKeyId" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifyFleetResult = ( output , context ) : ModifyFleetResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifyFpgaImageAttributeResult = ( output , context ) : ModifyFpgaImageAttributeResult => { const contents = { FpgaImageAttribute : undefined , } ; if ( output [ "fpgaImageAttribute" ] !== undefined ) { contents . FpgaImageAttribute = deserializeAws_ec2FpgaImageAttribute ( output [ "fpgaImageAttribute" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyHostsResult = ( output , context ) : ModifyHostsResult => { const contents = { Successful : undefined , Unsuccessful : undefined , } ; if ( output . successful === "" ) { contents . Successful = [ ] ; } if ( output [ "successful" ] !== undefined && output [ "successful" ] [ "item" ] !== undefined ) { contents . Successful = deserializeAws_ec2ResponseHostIdList ( __getArrayIfSingleItem ( output [ "successful" ] [ "item" ] ) , context ) ; } if ( output . unsuccessful === "" ) { contents . Unsuccessful = [ ] ; } if ( output [ "unsuccessful" ] !== undefined && output [ "unsuccessful" ] [ "item" ] !== undefined ) { contents . Unsuccessful = deserializeAws_ec2UnsuccessfulItemList ( __getArrayIfSingleItem ( output [ "unsuccessful" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyInstanceCapacityReservationAttributesResult = ( output , context ) : ModifyInstanceCapacityReservationAttributesResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifyInstanceCreditSpecificationResult = ( output , context ) : ModifyInstanceCreditSpecificationResult => { const contents = { SuccessfulInstanceCreditSpecifications : undefined , UnsuccessfulInstanceCreditSpecifications : undefined , } ; if ( output . successfulInstanceCreditSpecificationSet === "" ) { contents . SuccessfulInstanceCreditSpecifications = [ ] ; } if ( output [ "successfulInstanceCreditSpecificationSet" ] !== undefined && output [ "successfulInstanceCreditSpecificationSet" ] [ "item" ] !== undefined ) { contents . SuccessfulInstanceCreditSpecifications = deserializeAws_ec2SuccessfulInstanceCreditSpecificationSet ( __getArrayIfSingleItem ( output [ "successfulInstanceCreditSpecificationSet" ] [ "item" ] ) , context ) ; } if ( output . unsuccessfulInstanceCreditSpecificationSet === "" ) { contents . UnsuccessfulInstanceCreditSpecifications = [ ] ; } if ( output [ "unsuccessfulInstanceCreditSpecificationSet" ] !== undefined && output [ "unsuccessfulInstanceCreditSpecificationSet" ] [ "item" ] !== undefined ) { contents . UnsuccessfulInstanceCreditSpecifications = deserializeAws_ec2UnsuccessfulInstanceCreditSpecificationSet ( __getArrayIfSingleItem ( output [ "unsuccessfulInstanceCreditSpecificationSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyInstanceEventStartTimeResult = ( output , context ) : ModifyInstanceEventStartTimeResult => { const contents = { Event : undefined , } ; if ( output [ "event" ] !== undefined ) { contents . Event = deserializeAws_ec2InstanceStatusEvent ( output [ "event" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyInstanceEventWindowResult = ( output , context ) : ModifyInstanceEventWindowResult => { const contents = { InstanceEventWindow : undefined , } ; if ( output [ "instanceEventWindow" ] !== undefined ) { contents . InstanceEventWindow = deserializeAws_ec2InstanceEventWindow ( output [ "instanceEventWindow" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyInstanceMetadataOptionsResult = ( output , context ) : ModifyInstanceMetadataOptionsResult => { const contents = { InstanceId : undefined , InstanceMetadataOptions : undefined , } ; if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "instanceMetadataOptions" ] !== undefined ) { contents . InstanceMetadataOptions = deserializeAws_ec2InstanceMetadataOptionsResponse ( output [ "instanceMetadataOptions" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyInstancePlacementResult = ( output , context ) : ModifyInstancePlacementResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifyIpamPoolResult = ( output , context ) : ModifyIpamPoolResult => { const contents = { IpamPool : undefined , } ; if ( output [ "ipamPool" ] !== undefined ) { contents . IpamPool = deserializeAws_ec2IpamPool ( output [ "ipamPool" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyIpamResourceCidrResult = ( output , context ) : ModifyIpamResourceCidrResult => { const contents = { IpamResourceCidr : undefined , } ; if ( output [ "ipamResourceCidr" ] !== undefined ) { contents . IpamResourceCidr = deserializeAws_ec2IpamResourceCidr ( output [ "ipamResourceCidr" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyIpamResult = ( output , context ) : ModifyIpamResult => { const contents = { Ipam : undefined , } ; if ( output [ "ipam" ] !== undefined ) { contents . Ipam = deserializeAws_ec2Ipam ( output [ "ipam" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyIpamScopeResult = ( output , context ) : ModifyIpamScopeResult => { const contents = { IpamScope : undefined , } ; if ( output [ "ipamScope" ] !== undefined ) { contents . IpamScope = deserializeAws_ec2IpamScope ( output [ "ipamScope" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyLaunchTemplateResult = ( output , context ) : ModifyLaunchTemplateResult => { const contents = { LaunchTemplate : undefined , } ; if ( output [ "launchTemplate" ] !== undefined ) { contents . LaunchTemplate = deserializeAws_ec2LaunchTemplate ( output [ "launchTemplate" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyManagedPrefixListResult = ( output , context ) : ModifyManagedPrefixListResult => { const contents = { PrefixList : undefined , } ; if ( output [ "prefixList" ] !== undefined ) { contents . PrefixList = deserializeAws_ec2ManagedPrefixList ( output [ "prefixList" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyPrivateDnsNameOptionsResult = ( output , context ) : ModifyPrivateDnsNameOptionsResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifyReservedInstancesResult = ( output , context ) : ModifyReservedInstancesResult => { const contents = { ReservedInstancesModificationId : undefined , } ; if ( output [ "reservedInstancesModificationId" ] !== undefined ) { contents . ReservedInstancesModificationId = __expectString ( output [ "reservedInstancesModificationId" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifySecurityGroupRulesResult = ( output , context ) : ModifySecurityGroupRulesResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifySnapshotTierResult = ( output , context ) : ModifySnapshotTierResult => { const contents = { SnapshotId : undefined , TieringStartTime : undefined , } ; if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output [ "tieringStartTime" ] !== undefined ) { contents . TieringStartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "tieringStartTime" ] ) ) ; } return contents ; } ; const deserializeAws_ec2ModifySpotFleetRequestResponse = ( output , context ) : ModifySpotFleetRequestResponse => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifyTrafficMirrorFilterNetworkServicesResult = ( output , context ) : ModifyTrafficMirrorFilterNetworkServicesResult => { const contents = { TrafficMirrorFilter : undefined , } ; if ( output [ "trafficMirrorFilter" ] !== undefined ) { contents . TrafficMirrorFilter = deserializeAws_ec2TrafficMirrorFilter ( output [ "trafficMirrorFilter" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyTrafficMirrorFilterRuleResult = ( output , context ) : ModifyTrafficMirrorFilterRuleResult => { const contents = { TrafficMirrorFilterRule : undefined , } ; if ( output [ "trafficMirrorFilterRule" ] !== undefined ) { contents . TrafficMirrorFilterRule = deserializeAws_ec2TrafficMirrorFilterRule ( output [ "trafficMirrorFilterRule" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyTrafficMirrorSessionResult = ( output , context ) : ModifyTrafficMirrorSessionResult => { const contents = { TrafficMirrorSession : undefined , } ; if ( output [ "trafficMirrorSession" ] !== undefined ) { contents . TrafficMirrorSession = deserializeAws_ec2TrafficMirrorSession ( output [ "trafficMirrorSession" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyTransitGatewayPrefixListReferenceResult = ( output , context ) : ModifyTransitGatewayPrefixListReferenceResult => { const contents = { TransitGatewayPrefixListReference : undefined , } ; if ( output [ "transitGatewayPrefixListReference" ] !== undefined ) { contents . TransitGatewayPrefixListReference = deserializeAws_ec2TransitGatewayPrefixListReference ( output [ "transitGatewayPrefixListReference" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyTransitGatewayResult = ( output , context ) : ModifyTransitGatewayResult => { const contents = { TransitGateway : undefined , } ; if ( output [ "transitGateway" ] !== undefined ) { contents . TransitGateway = deserializeAws_ec2TransitGateway ( output [ "transitGateway" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyTransitGatewayVpcAttachmentResult = ( output , context ) : ModifyTransitGatewayVpcAttachmentResult => { const contents = { TransitGatewayVpcAttachment : undefined , } ; if ( output [ "transitGatewayVpcAttachment" ] !== undefined ) { contents . TransitGatewayVpcAttachment = deserializeAws_ec2TransitGatewayVpcAttachment ( output [ "transitGatewayVpcAttachment" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyVolumeResult = ( output , context ) : ModifyVolumeResult => { const contents = { VolumeModification : undefined , } ; if ( output [ "volumeModification" ] !== undefined ) { contents . VolumeModification = deserializeAws_ec2VolumeModification ( output [ "volumeModification" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyVpcEndpointConnectionNotificationResult = ( output , context ) : ModifyVpcEndpointConnectionNotificationResult => { const contents = { ReturnValue : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . ReturnValue = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifyVpcEndpointResult = ( output , context ) : ModifyVpcEndpointResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifyVpcEndpointServiceConfigurationResult = ( output , context ) : ModifyVpcEndpointServiceConfigurationResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifyVpcEndpointServicePayerResponsibilityResult = ( output , context ) : ModifyVpcEndpointServicePayerResponsibilityResult => { const contents = { ReturnValue : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . ReturnValue = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifyVpcEndpointServicePermissionsResult = ( output , context ) : ModifyVpcEndpointServicePermissionsResult => { const contents = { ReturnValue : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . ReturnValue = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifyVpcPeeringConnectionOptionsResult = ( output , context ) : ModifyVpcPeeringConnectionOptionsResult => { const contents = { AccepterPeeringConnectionOptions : undefined , RequesterPeeringConnectionOptions : undefined , } ; if ( output [ "accepterPeeringConnectionOptions" ] !== undefined ) { contents . AccepterPeeringConnectionOptions = deserializeAws_ec2PeeringConnectionOptions ( output [ "accepterPeeringConnectionOptions" ] , context ) ; } if ( output [ "requesterPeeringConnectionOptions" ] !== undefined ) { contents . RequesterPeeringConnectionOptions = deserializeAws_ec2PeeringConnectionOptions ( output [ "requesterPeeringConnectionOptions" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyVpcTenancyResult = ( output , context ) : ModifyVpcTenancyResult => { const contents = { ReturnValue : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . ReturnValue = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ModifyVpnConnectionOptionsResult = ( output , context ) : ModifyVpnConnectionOptionsResult => { const contents = { VpnConnection : undefined , } ; if ( output [ "vpnConnection" ] !== undefined ) { contents . VpnConnection = deserializeAws_ec2VpnConnection ( output [ "vpnConnection" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyVpnConnectionResult = ( output , context ) : ModifyVpnConnectionResult => { const contents = { VpnConnection : undefined , } ; if ( output [ "vpnConnection" ] !== undefined ) { contents . VpnConnection = deserializeAws_ec2VpnConnection ( output [ "vpnConnection" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyVpnTunnelCertificateResult = ( output , context ) : ModifyVpnTunnelCertificateResult => { const contents = { VpnConnection : undefined , } ; if ( output [ "vpnConnection" ] !== undefined ) { contents . VpnConnection = deserializeAws_ec2VpnConnection ( output [ "vpnConnection" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ModifyVpnTunnelOptionsResult = ( output , context ) : ModifyVpnTunnelOptionsResult => { const contents = { VpnConnection : undefined , } ; if ( output [ "vpnConnection" ] !== undefined ) { contents . VpnConnection = deserializeAws_ec2VpnConnection ( output [ "vpnConnection" ] , context ) ; } return contents ; } ; const deserializeAws_ec2Monitoring = ( output , context ) : Monitoring => { const contents = { State : undefined , } ; if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } return contents ; } ; const deserializeAws_ec2MonitorInstancesResult = ( output , context ) : MonitorInstancesResult => { const contents = { InstanceMonitorings : undefined , } ; if ( output . instancesSet === "" ) { contents . InstanceMonitorings = [ ] ; } if ( output [ "instancesSet" ] !== undefined && output [ "instancesSet" ] [ "item" ] !== undefined ) { contents . InstanceMonitorings = deserializeAws_ec2InstanceMonitoringList ( __getArrayIfSingleItem ( output [ "instancesSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2MoveAddressToVpcResult = ( output , context ) : MoveAddressToVpcResult => { const contents = { AllocationId : undefined , Status : undefined , } ; if ( output [ "allocationId" ] !== undefined ) { contents . AllocationId = __expectString ( output [ "allocationId" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } return contents ; } ; const deserializeAws_ec2MoveByoipCidrToIpamResult = ( output , context ) : MoveByoipCidrToIpamResult => { const contents = { ByoipCidr : undefined , } ; if ( output [ "byoipCidr" ] !== undefined ) { contents . ByoipCidr = deserializeAws_ec2ByoipCidr ( output [ "byoipCidr" ] , context ) ; } return contents ; } ; const deserializeAws_ec2MovingAddressStatus = ( output , context ) : MovingAddressStatus => { const contents = { MoveStatus : undefined , PublicIp : undefined , } ; if ( output [ "moveStatus" ] !== undefined ) { contents . MoveStatus = __expectString ( output [ "moveStatus" ] ) ; } if ( output [ "publicIp" ] !== undefined ) { contents . PublicIp = __expectString ( output [ "publicIp" ] ) ; } return contents ; } ; const deserializeAws_ec2MovingAddressStatusSet = ( output , context ) : MovingAddressStatus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2MovingAddressStatus ( entry , context ) ; } ) ; } ; const deserializeAws_ec2NatGateway = ( output , context ) : NatGateway => { const contents = { CreateTime : undefined , DeleteTime : undefined , FailureCode : undefined , FailureMessage : undefined , NatGatewayAddresses : undefined , NatGatewayId : undefined , ProvisionedBandwidth : undefined , State : undefined , SubnetId : undefined , VpcId : undefined , Tags : undefined , ConnectivityType : undefined , } ; if ( output [ "createTime" ] !== undefined ) { contents . CreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "createTime" ] ) ) ; } if ( output [ "deleteTime" ] !== undefined ) { contents . DeleteTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "deleteTime" ] ) ) ; } if ( output [ "failureCode" ] !== undefined ) { contents . FailureCode = __expectString ( output [ "failureCode" ] ) ; } if ( output [ "failureMessage" ] !== undefined ) { contents . FailureMessage = __expectString ( output [ "failureMessage" ] ) ; } if ( output . natGatewayAddressSet === "" ) { contents . NatGatewayAddresses = [ ] ; } if ( output [ "natGatewayAddressSet" ] !== undefined && output [ "natGatewayAddressSet" ] [ "item" ] !== undefined ) { contents . NatGatewayAddresses = deserializeAws_ec2NatGatewayAddressList ( __getArrayIfSingleItem ( output [ "natGatewayAddressSet" ] [ "item" ] ) , context ) ; } if ( output [ "natGatewayId" ] !== undefined ) { contents . NatGatewayId = __expectString ( output [ "natGatewayId" ] ) ; } if ( output [ "provisionedBandwidth" ] !== undefined ) { contents . ProvisionedBandwidth = deserializeAws_ec2ProvisionedBandwidth ( output [ "provisionedBandwidth" ] , context ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "connectivityType" ] !== undefined ) { contents . ConnectivityType = __expectString ( output [ "connectivityType" ] ) ; } return contents ; } ; const deserializeAws_ec2NatGatewayAddress = ( output , context ) : NatGatewayAddress => { const contents = { AllocationId : undefined , NetworkInterfaceId : undefined , PrivateIp : undefined , PublicIp : undefined , } ; if ( output [ "allocationId" ] !== undefined ) { contents . AllocationId = __expectString ( output [ "allocationId" ] ) ; } if ( output [ "networkInterfaceId" ] !== undefined ) { contents . NetworkInterfaceId = __expectString ( output [ "networkInterfaceId" ] ) ; } if ( output [ "privateIp" ] !== undefined ) { contents . PrivateIp = __expectString ( output [ "privateIp" ] ) ; } if ( output [ "publicIp" ] !== undefined ) { contents . PublicIp = __expectString ( output [ "publicIp" ] ) ; } return contents ; } ; const deserializeAws_ec2NatGatewayAddressList = ( output , context ) : NatGatewayAddress [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2NatGatewayAddress ( entry , context ) ; } ) ; } ; const deserializeAws_ec2NatGatewayList = ( output , context ) : NatGateway [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2NatGateway ( entry , context ) ; } ) ; } ; const deserializeAws_ec2NetworkAcl = ( output , context ) : NetworkAcl => { const contents = { Associations : undefined , Entries : undefined , IsDefault : undefined , NetworkAclId : undefined , Tags : undefined , VpcId : undefined , OwnerId : undefined , } ; if ( output . associationSet === "" ) { contents . Associations = [ ] ; } if ( output [ "associationSet" ] !== undefined && output [ "associationSet" ] [ "item" ] !== undefined ) { contents . Associations = deserializeAws_ec2NetworkAclAssociationList ( __getArrayIfSingleItem ( output [ "associationSet" ] [ "item" ] ) , context ) ; } if ( output . entrySet === "" ) { contents . Entries = [ ] ; } if ( output [ "entrySet" ] !== undefined && output [ "entrySet" ] [ "item" ] !== undefined ) { contents . Entries = deserializeAws_ec2NetworkAclEntryList ( __getArrayIfSingleItem ( output [ "entrySet" ] [ "item" ] ) , context ) ; } if ( output [ "default" ] !== undefined ) { contents . IsDefault = __parseBoolean ( output [ "default" ] ) ; } if ( output [ "networkAclId" ] !== undefined ) { contents . NetworkAclId = __expectString ( output [ "networkAclId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } return contents ; } ; const deserializeAws_ec2NetworkAclAssociation = ( output , context ) : NetworkAclAssociation => { const contents = { NetworkAclAssociationId : undefined , NetworkAclId : undefined , SubnetId : undefined , } ; if ( output [ "networkAclAssociationId" ] !== undefined ) { contents . NetworkAclAssociationId = __expectString ( output [ "networkAclAssociationId" ] ) ; } if ( output [ "networkAclId" ] !== undefined ) { contents . NetworkAclId = __expectString ( output [ "networkAclId" ] ) ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } return contents ; } ; const deserializeAws_ec2NetworkAclAssociationList = ( output , context ) : NetworkAclAssociation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2NetworkAclAssociation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2NetworkAclEntry = ( output , context ) : NetworkAclEntry => { const contents = { CidrBlock : undefined , Egress : undefined , IcmpTypeCode : undefined , Ipv6CidrBlock : undefined , PortRange : undefined , Protocol : undefined , RuleAction : undefined , RuleNumber : undefined , } ; if ( output [ "cidrBlock" ] !== undefined ) { contents . CidrBlock = __expectString ( output [ "cidrBlock" ] ) ; } if ( output [ "egress" ] !== undefined ) { contents . Egress = __parseBoolean ( output [ "egress" ] ) ; } if ( output [ "icmpTypeCode" ] !== undefined ) { contents . IcmpTypeCode = deserializeAws_ec2IcmpTypeCode ( output [ "icmpTypeCode" ] , context ) ; } if ( output [ "ipv6CidrBlock" ] !== undefined ) { contents . Ipv6CidrBlock = __expectString ( output [ "ipv6CidrBlock" ] ) ; } if ( output [ "portRange" ] !== undefined ) { contents . PortRange = deserializeAws_ec2PortRange ( output [ "portRange" ] , context ) ; } if ( output [ "protocol" ] !== undefined ) { contents . Protocol = __expectString ( output [ "protocol" ] ) ; } if ( output [ "ruleAction" ] !== undefined ) { contents . RuleAction = __expectString ( output [ "ruleAction" ] ) ; } if ( output [ "ruleNumber" ] !== undefined ) { contents . RuleNumber = __strictParseInt32 ( output [ "ruleNumber" ] ) as number ; } return contents ; } ; const deserializeAws_ec2NetworkAclEntryList = ( output , context ) : NetworkAclEntry [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2NetworkAclEntry ( entry , context ) ; } ) ; } ; const deserializeAws_ec2NetworkAclList = ( output , context ) : NetworkAcl [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2NetworkAcl ( entry , context ) ; } ) ; } ; const deserializeAws_ec2NetworkCardInfo = ( output , context ) : NetworkCardInfo => { const contents = { NetworkCardIndex : undefined , NetworkPerformance : undefined , MaximumNetworkInterfaces : undefined , } ; if ( output [ "networkCardIndex" ] !== undefined ) { contents . NetworkCardIndex = __strictParseInt32 ( output [ "networkCardIndex" ] ) as number ; } if ( output [ "networkPerformance" ] !== undefined ) { contents . NetworkPerformance = __expectString ( output [ "networkPerformance" ] ) ; } if ( output [ "maximumNetworkInterfaces" ] !== undefined ) { contents . MaximumNetworkInterfaces = __strictParseInt32 ( output [ "maximumNetworkInterfaces" ] ) as number ; } return contents ; } ; const deserializeAws_ec2NetworkCardInfoList = ( output , context ) : NetworkCardInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2NetworkCardInfo ( entry , context ) ; } ) ; } ; const deserializeAws_ec2NetworkInfo = ( output , context ) : NetworkInfo => { const contents = { NetworkPerformance : undefined , MaximumNetworkInterfaces : undefined , MaximumNetworkCards : undefined , DefaultNetworkCardIndex : undefined , NetworkCards : undefined , Ipv4AddressesPerInterface : undefined , Ipv6AddressesPerInterface : undefined , Ipv6Supported : undefined , EnaSupport : undefined , EfaSupported : undefined , EfaInfo : undefined , EncryptionInTransitSupported : undefined , } ; if ( output [ "networkPerformance" ] !== undefined ) { contents . NetworkPerformance = __expectString ( output [ "networkPerformance" ] ) ; } if ( output [ "maximumNetworkInterfaces" ] !== undefined ) { contents . MaximumNetworkInterfaces = __strictParseInt32 ( output [ "maximumNetworkInterfaces" ] ) as number ; } if ( output [ "maximumNetworkCards" ] !== undefined ) { contents . MaximumNetworkCards = __strictParseInt32 ( output [ "maximumNetworkCards" ] ) as number ; } if ( output [ "defaultNetworkCardIndex" ] !== undefined ) { contents . DefaultNetworkCardIndex = __strictParseInt32 ( output [ "defaultNetworkCardIndex" ] ) as number ; } if ( output . networkCards === "" ) { contents . NetworkCards = [ ] ; } if ( output [ "networkCards" ] !== undefined && output [ "networkCards" ] [ "item" ] !== undefined ) { contents . NetworkCards = deserializeAws_ec2NetworkCardInfoList ( __getArrayIfSingleItem ( output [ "networkCards" ] [ "item" ] ) , context ) ; } if ( output [ "ipv4AddressesPerInterface" ] !== undefined ) { contents . Ipv4AddressesPerInterface = __strictParseInt32 ( output [ "ipv4AddressesPerInterface" ] ) as number ; } if ( output [ "ipv6AddressesPerInterface" ] !== undefined ) { contents . Ipv6AddressesPerInterface = __strictParseInt32 ( output [ "ipv6AddressesPerInterface" ] ) as number ; } if ( output [ "ipv6Supported" ] !== undefined ) { contents . Ipv6Supported = __parseBoolean ( output [ "ipv6Supported" ] ) ; } if ( output [ "enaSupport" ] !== undefined ) { contents . EnaSupport = __expectString ( output [ "enaSupport" ] ) ; } if ( output [ "efaSupported" ] !== undefined ) { contents . EfaSupported = __parseBoolean ( output [ "efaSupported" ] ) ; } if ( output [ "efaInfo" ] !== undefined ) { contents . EfaInfo = deserializeAws_ec2EfaInfo ( output [ "efaInfo" ] , context ) ; } if ( output [ "encryptionInTransitSupported" ] !== undefined ) { contents . EncryptionInTransitSupported = __parseBoolean ( output [ "encryptionInTransitSupported" ] ) ; } return contents ; } ; const deserializeAws_ec2NetworkInsightsAccessScope = ( output , context ) : NetworkInsightsAccessScope => { const contents = { NetworkInsightsAccessScopeId : undefined , NetworkInsightsAccessScopeArn : undefined , CreatedDate : undefined , UpdatedDate : undefined , Tags : undefined , } ; if ( output [ "networkInsightsAccessScopeId" ] !== undefined ) { contents . NetworkInsightsAccessScopeId = __expectString ( output [ "networkInsightsAccessScopeId" ] ) ; } if ( output [ "networkInsightsAccessScopeArn" ] !== undefined ) { contents . NetworkInsightsAccessScopeArn = __expectString ( output [ "networkInsightsAccessScopeArn" ] ) ; } if ( output [ "createdDate" ] !== undefined ) { contents . CreatedDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "createdDate" ] ) ) ; } if ( output [ "updatedDate" ] !== undefined ) { contents . UpdatedDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "updatedDate" ] ) ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2NetworkInsightsAccessScopeAnalysis = ( output , context ) : NetworkInsightsAccessScopeAnalysis => { const contents = { NetworkInsightsAccessScopeAnalysisId : undefined , NetworkInsightsAccessScopeAnalysisArn : undefined , NetworkInsightsAccessScopeId : undefined , Status : undefined , StatusMessage : undefined , WarningMessage : undefined , StartDate : undefined , EndDate : undefined , FindingsFound : undefined , AnalyzedEniCount : undefined , Tags : undefined , } ; if ( output [ "networkInsightsAccessScopeAnalysisId" ] !== undefined ) { contents . NetworkInsightsAccessScopeAnalysisId = __expectString ( output [ "networkInsightsAccessScopeAnalysisId" ] ) ; } if ( output [ "networkInsightsAccessScopeAnalysisArn" ] !== undefined ) { contents . NetworkInsightsAccessScopeAnalysisArn = __expectString ( output [ "networkInsightsAccessScopeAnalysisArn" ] ) ; } if ( output [ "networkInsightsAccessScopeId" ] !== undefined ) { contents . NetworkInsightsAccessScopeId = __expectString ( output [ "networkInsightsAccessScopeId" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output [ "warningMessage" ] !== undefined ) { contents . WarningMessage = __expectString ( output [ "warningMessage" ] ) ; } if ( output [ "startDate" ] !== undefined ) { contents . StartDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "startDate" ] ) ) ; } if ( output [ "endDate" ] !== undefined ) { contents . EndDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "endDate" ] ) ) ; } if ( output [ "findingsFound" ] !== undefined ) { contents . FindingsFound = __expectString ( output [ "findingsFound" ] ) ; } if ( output [ "analyzedEniCount" ] !== undefined ) { contents . AnalyzedEniCount = __strictParseInt32 ( output [ "analyzedEniCount" ] ) as number ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2NetworkInsightsAccessScopeAnalysisList = ( output , context ) : NetworkInsightsAccessScopeAnalysis [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2NetworkInsightsAccessScopeAnalysis ( entry , context ) ; } ) ; } ; const deserializeAws_ec2NetworkInsightsAccessScopeContent = ( output , context ) : NetworkInsightsAccessScopeContent => { const contents = { NetworkInsightsAccessScopeId : undefined , MatchPaths : undefined , ExcludePaths : undefined , } ; if ( output [ "networkInsightsAccessScopeId" ] !== undefined ) { contents . NetworkInsightsAccessScopeId = __expectString ( output [ "networkInsightsAccessScopeId" ] ) ; } if ( output . matchPathSet === "" ) { contents . MatchPaths = [ ] ; } if ( output [ "matchPathSet" ] !== undefined && output [ "matchPathSet" ] [ "item" ] !== undefined ) { contents . MatchPaths = deserializeAws_ec2AccessScopePathList ( __getArrayIfSingleItem ( output [ "matchPathSet" ] [ "item" ] ) , context ) ; } if ( output . excludePathSet === "" ) { contents . ExcludePaths = [ ] ; } if ( output [ "excludePathSet" ] !== undefined && output [ "excludePathSet" ] [ "item" ] !== undefined ) { contents . ExcludePaths = deserializeAws_ec2AccessScopePathList ( __getArrayIfSingleItem ( output [ "excludePathSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2NetworkInsightsAccessScopeList = ( output , context ) : NetworkInsightsAccessScope [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2NetworkInsightsAccessScope ( entry , context ) ; } ) ; } ; const deserializeAws_ec2NetworkInsightsAnalysis = ( output , context ) : NetworkInsightsAnalysis => { const contents = { NetworkInsightsAnalysisId : undefined , NetworkInsightsAnalysisArn : undefined , NetworkInsightsPathId : undefined , FilterInArns : undefined , StartDate : undefined , Status : undefined , StatusMessage : undefined , WarningMessage : undefined , NetworkPathFound : undefined , ForwardPathComponents : undefined , ReturnPathComponents : undefined , Explanations : undefined , AlternatePathHints : undefined , Tags : undefined , } ; if ( output [ "networkInsightsAnalysisId" ] !== undefined ) { contents . NetworkInsightsAnalysisId = __expectString ( output [ "networkInsightsAnalysisId" ] ) ; } if ( output [ "networkInsightsAnalysisArn" ] !== undefined ) { contents . NetworkInsightsAnalysisArn = __expectString ( output [ "networkInsightsAnalysisArn" ] ) ; } if ( output [ "networkInsightsPathId" ] !== undefined ) { contents . NetworkInsightsPathId = __expectString ( output [ "networkInsightsPathId" ] ) ; } if ( output . filterInArnSet === "" ) { contents . FilterInArns = [ ] ; } if ( output [ "filterInArnSet" ] !== undefined && output [ "filterInArnSet" ] [ "item" ] !== undefined ) { contents . FilterInArns = deserializeAws_ec2ArnList ( __getArrayIfSingleItem ( output [ "filterInArnSet" ] [ "item" ] ) , context ) ; } if ( output [ "startDate" ] !== undefined ) { contents . StartDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "startDate" ] ) ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output [ "warningMessage" ] !== undefined ) { contents . WarningMessage = __expectString ( output [ "warningMessage" ] ) ; } if ( output [ "networkPathFound" ] !== undefined ) { contents . NetworkPathFound = __parseBoolean ( output [ "networkPathFound" ] ) ; } if ( output . forwardPathComponentSet === "" ) { contents . ForwardPathComponents = [ ] ; } if ( output [ "forwardPathComponentSet" ] !== undefined && output [ "forwardPathComponentSet" ] [ "item" ] !== undefined ) { contents . ForwardPathComponents = deserializeAws_ec2PathComponentList ( __getArrayIfSingleItem ( output [ "forwardPathComponentSet" ] [ "item" ] ) , context ) ; } if ( output . returnPathComponentSet === "" ) { contents . ReturnPathComponents = [ ] ; } if ( output [ "returnPathComponentSet" ] !== undefined && output [ "returnPathComponentSet" ] [ "item" ] !== undefined ) { contents . ReturnPathComponents = deserializeAws_ec2PathComponentList ( __getArrayIfSingleItem ( output [ "returnPathComponentSet" ] [ "item" ] ) , context ) ; } if ( output . explanationSet === "" ) { contents . Explanations = [ ] ; } if ( output [ "explanationSet" ] !== undefined && output [ "explanationSet" ] [ "item" ] !== undefined ) { contents . Explanations = deserializeAws_ec2ExplanationList ( __getArrayIfSingleItem ( output [ "explanationSet" ] [ "item" ] ) , context ) ; } if ( output . alternatePathHintSet === "" ) { contents . AlternatePathHints = [ ] ; } if ( output [ "alternatePathHintSet" ] !== undefined && output [ "alternatePathHintSet" ] [ "item" ] !== undefined ) { contents . AlternatePathHints = deserializeAws_ec2AlternatePathHintList ( __getArrayIfSingleItem ( output [ "alternatePathHintSet" ] [ "item" ] ) , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2NetworkInsightsAnalysisList = ( output , context ) : NetworkInsightsAnalysis [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2NetworkInsightsAnalysis ( entry , context ) ; } ) ; } ; const deserializeAws_ec2NetworkInsightsPath = ( output , context ) : NetworkInsightsPath => { const contents = { NetworkInsightsPathId : undefined , NetworkInsightsPathArn : undefined , CreatedDate : undefined , Source : undefined , Destination : undefined , SourceIp : undefined , DestinationIp : undefined , Protocol : undefined , DestinationPort : undefined , Tags : undefined , } ; if ( output [ "networkInsightsPathId" ] !== undefined ) { contents . NetworkInsightsPathId = __expectString ( output [ "networkInsightsPathId" ] ) ; } if ( output [ "networkInsightsPathArn" ] !== undefined ) { contents . NetworkInsightsPathArn = __expectString ( output [ "networkInsightsPathArn" ] ) ; } if ( output [ "createdDate" ] !== undefined ) { contents . CreatedDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "createdDate" ] ) ) ; } if ( output [ "source" ] !== undefined ) { contents . Source = __expectString ( output [ "source" ] ) ; } if ( output [ "destination" ] !== undefined ) { contents . Destination = __expectString ( output [ "destination" ] ) ; } if ( output [ "sourceIp" ] !== undefined ) { contents . SourceIp = __expectString ( output [ "sourceIp" ] ) ; } if ( output [ "destinationIp" ] !== undefined ) { contents . DestinationIp = __expectString ( output [ "destinationIp" ] ) ; } if ( output [ "protocol" ] !== undefined ) { contents . Protocol = __expectString ( output [ "protocol" ] ) ; } if ( output [ "destinationPort" ] !== undefined ) { contents . DestinationPort = __strictParseInt32 ( output [ "destinationPort" ] ) as number ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2NetworkInsightsPathList = ( output , context ) : NetworkInsightsPath [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2NetworkInsightsPath ( entry , context ) ; } ) ; } ; const deserializeAws_ec2NetworkInterface = ( output , context ) : NetworkInterface => { const contents = { Association : undefined , Attachment : undefined , AvailabilityZone : undefined , Description : undefined , Groups : undefined , InterfaceType : undefined , Ipv6Addresses : undefined , MacAddress : undefined , NetworkInterfaceId : undefined , OutpostArn : undefined , OwnerId : undefined , PrivateDnsName : undefined , PrivateIpAddress : undefined , PrivateIpAddresses : undefined , Ipv4Prefixes : undefined , Ipv6Prefixes : undefined , RequesterId : undefined , RequesterManaged : undefined , SourceDestCheck : undefined , Status : undefined , SubnetId : undefined , TagSet : undefined , VpcId : undefined , DenyAllIgwTraffic : undefined , Ipv6Native : undefined , Ipv6Address : undefined , } ; if ( output [ "association" ] !== undefined ) { contents . Association = deserializeAws_ec2NetworkInterfaceAssociation ( output [ "association" ] , context ) ; } if ( output [ "attachment" ] !== undefined ) { contents . Attachment = deserializeAws_ec2NetworkInterfaceAttachment ( output [ "attachment" ] , context ) ; } if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output . groupSet === "" ) { contents . Groups = [ ] ; } if ( output [ "groupSet" ] !== undefined && output [ "groupSet" ] [ "item" ] !== undefined ) { contents . Groups = deserializeAws_ec2GroupIdentifierList ( __getArrayIfSingleItem ( output [ "groupSet" ] [ "item" ] ) , context ) ; } if ( output [ "interfaceType" ] !== undefined ) { contents . InterfaceType = __expectString ( output [ "interfaceType" ] ) ; } if ( output . ipv6AddressesSet === "" ) { contents . Ipv6Addresses = [ ] ; } if ( output [ "ipv6AddressesSet" ] !== undefined && output [ "ipv6AddressesSet" ] [ "item" ] !== undefined ) { contents . Ipv6Addresses = deserializeAws_ec2NetworkInterfaceIpv6AddressesList ( __getArrayIfSingleItem ( output [ "ipv6AddressesSet" ] [ "item" ] ) , context ) ; } if ( output [ "macAddress" ] !== undefined ) { contents . MacAddress = __expectString ( output [ "macAddress" ] ) ; } if ( output [ "networkInterfaceId" ] !== undefined ) { contents . NetworkInterfaceId = __expectString ( output [ "networkInterfaceId" ] ) ; } if ( output [ "outpostArn" ] !== undefined ) { contents . OutpostArn = __expectString ( output [ "outpostArn" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "privateDnsName" ] !== undefined ) { contents . PrivateDnsName = __expectString ( output [ "privateDnsName" ] ) ; } if ( output [ "privateIpAddress" ] !== undefined ) { contents . PrivateIpAddress = __expectString ( output [ "privateIpAddress" ] ) ; } if ( output . privateIpAddressesSet === "" ) { contents . PrivateIpAddresses = [ ] ; } if ( output [ "privateIpAddressesSet" ] !== undefined && output [ "privateIpAddressesSet" ] [ "item" ] !== undefined ) { contents . PrivateIpAddresses = deserializeAws_ec2NetworkInterfacePrivateIpAddressList ( __getArrayIfSingleItem ( output [ "privateIpAddressesSet" ] [ "item" ] ) , context ) ; } if ( output . ipv4PrefixSet === "" ) { contents . Ipv4Prefixes = [ ] ; } if ( output [ "ipv4PrefixSet" ] !== undefined && output [ "ipv4PrefixSet" ] [ "item" ] !== undefined ) { contents . Ipv4Prefixes = deserializeAws_ec2Ipv4PrefixesList ( __getArrayIfSingleItem ( output [ "ipv4PrefixSet" ] [ "item" ] ) , context ) ; } if ( output . ipv6PrefixSet === "" ) { contents . Ipv6Prefixes = [ ] ; } if ( output [ "ipv6PrefixSet" ] !== undefined && output [ "ipv6PrefixSet" ] [ "item" ] !== undefined ) { contents . Ipv6Prefixes = deserializeAws_ec2Ipv6PrefixesList ( __getArrayIfSingleItem ( output [ "ipv6PrefixSet" ] [ "item" ] ) , context ) ; } if ( output [ "requesterId" ] !== undefined ) { contents . RequesterId = __expectString ( output [ "requesterId" ] ) ; } if ( output [ "requesterManaged" ] !== undefined ) { contents . RequesterManaged = __parseBoolean ( output [ "requesterManaged" ] ) ; } if ( output [ "sourceDestCheck" ] !== undefined ) { contents . SourceDestCheck = __parseBoolean ( output [ "sourceDestCheck" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } if ( output . tagSet === "" ) { contents . TagSet = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . TagSet = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "denyAllIgwTraffic" ] !== undefined ) { contents . DenyAllIgwTraffic = __parseBoolean ( output [ "denyAllIgwTraffic" ] ) ; } if ( output [ "ipv6Native" ] !== undefined ) { contents . Ipv6Native = __parseBoolean ( output [ "ipv6Native" ] ) ; } if ( output [ "ipv6Address" ] !== undefined ) { contents . Ipv6Address = __expectString ( output [ "ipv6Address" ] ) ; } return contents ; } ; const deserializeAws_ec2NetworkInterfaceAssociation = ( output , context ) : NetworkInterfaceAssociation => { const contents = { AllocationId : undefined , AssociationId : undefined , IpOwnerId : undefined , PublicDnsName : undefined , PublicIp : undefined , CustomerOwnedIp : undefined , CarrierIp : undefined , } ; if ( output [ "allocationId" ] !== undefined ) { contents . AllocationId = __expectString ( output [ "allocationId" ] ) ; } if ( output [ "associationId" ] !== undefined ) { contents . AssociationId = __expectString ( output [ "associationId" ] ) ; } if ( output [ "ipOwnerId" ] !== undefined ) { contents . IpOwnerId = __expectString ( output [ "ipOwnerId" ] ) ; } if ( output [ "publicDnsName" ] !== undefined ) { contents . PublicDnsName = __expectString ( output [ "publicDnsName" ] ) ; } if ( output [ "publicIp" ] !== undefined ) { contents . PublicIp = __expectString ( output [ "publicIp" ] ) ; } if ( output [ "customerOwnedIp" ] !== undefined ) { contents . CustomerOwnedIp = __expectString ( output [ "customerOwnedIp" ] ) ; } if ( output [ "carrierIp" ] !== undefined ) { contents . CarrierIp = __expectString ( output [ "carrierIp" ] ) ; } return contents ; } ; const deserializeAws_ec2NetworkInterfaceAttachment = ( output , context ) : NetworkInterfaceAttachment => { const contents = { AttachTime : undefined , AttachmentId : undefined , DeleteOnTermination : undefined , DeviceIndex : undefined , NetworkCardIndex : undefined , InstanceId : undefined , InstanceOwnerId : undefined , Status : undefined , } ; if ( output [ "attachTime" ] !== undefined ) { contents . AttachTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "attachTime" ] ) ) ; } if ( output [ "attachmentId" ] !== undefined ) { contents . AttachmentId = __expectString ( output [ "attachmentId" ] ) ; } if ( output [ "deleteOnTermination" ] !== undefined ) { contents . DeleteOnTermination = __parseBoolean ( output [ "deleteOnTermination" ] ) ; } if ( output [ "deviceIndex" ] !== undefined ) { contents . DeviceIndex = __strictParseInt32 ( output [ "deviceIndex" ] ) as number ; } if ( output [ "networkCardIndex" ] !== undefined ) { contents . NetworkCardIndex = __strictParseInt32 ( output [ "networkCardIndex" ] ) as number ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "instanceOwnerId" ] !== undefined ) { contents . InstanceOwnerId = __expectString ( output [ "instanceOwnerId" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } return contents ; } ; const deserializeAws_ec2NetworkInterfaceCount = ( output , context ) : NetworkInterfaceCount => { const contents = { Min : undefined , Max : undefined , } ; if ( output [ "min" ] !== undefined ) { contents . Min = __strictParseInt32 ( output [ "min" ] ) as number ; } if ( output [ "max" ] !== undefined ) { contents . Max = __strictParseInt32 ( output [ "max" ] ) as number ; } return contents ; } ; const deserializeAws_ec2NetworkInterfaceIpv6Address = ( output , context ) : NetworkInterfaceIpv6Address => { const contents = { Ipv6Address : undefined , } ; if ( output [ "ipv6Address" ] !== undefined ) { contents . Ipv6Address = __expectString ( output [ "ipv6Address" ] ) ; } return contents ; } ; const deserializeAws_ec2NetworkInterfaceIpv6AddressesList = ( output , context ) : NetworkInterfaceIpv6Address [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2NetworkInterfaceIpv6Address ( entry , context ) ; } ) ; } ; const deserializeAws_ec2NetworkInterfaceList = ( output , context ) : NetworkInterface [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2NetworkInterface ( entry , context ) ; } ) ; } ; const deserializeAws_ec2NetworkInterfacePermission = ( output , context ) : NetworkInterfacePermission => { const contents = { NetworkInterfacePermissionId : undefined , NetworkInterfaceId : undefined , AwsAccountId : undefined , AwsService : undefined , Permission : undefined , PermissionState : undefined , } ; if ( output [ "networkInterfacePermissionId" ] !== undefined ) { contents . NetworkInterfacePermissionId = __expectString ( output [ "networkInterfacePermissionId" ] ) ; } if ( output [ "networkInterfaceId" ] !== undefined ) { contents . NetworkInterfaceId = __expectString ( output [ "networkInterfaceId" ] ) ; } if ( output [ "awsAccountId" ] !== undefined ) { contents . AwsAccountId = __expectString ( output [ "awsAccountId" ] ) ; } if ( output [ "awsService" ] !== undefined ) { contents . AwsService = __expectString ( output [ "awsService" ] ) ; } if ( output [ "permission" ] !== undefined ) { contents . Permission = __expectString ( output [ "permission" ] ) ; } if ( output [ "permissionState" ] !== undefined ) { contents . PermissionState = deserializeAws_ec2NetworkInterfacePermissionState ( output [ "permissionState" ] , context ) ; } return contents ; } ; const deserializeAws_ec2NetworkInterfacePermissionList = ( output , context ) : NetworkInterfacePermission [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2NetworkInterfacePermission ( entry , context ) ; } ) ; } ; const deserializeAws_ec2NetworkInterfacePermissionState = ( output , context ) : NetworkInterfacePermissionState => { const contents = { State : undefined , StatusMessage : undefined , } ; if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } return contents ; } ; const deserializeAws_ec2NetworkInterfacePrivateIpAddress = ( output , context ) : NetworkInterfacePrivateIpAddress => { const contents = { Association : undefined , Primary : undefined , PrivateDnsName : undefined , PrivateIpAddress : undefined , } ; if ( output [ "association" ] !== undefined ) { contents . Association = deserializeAws_ec2NetworkInterfaceAssociation ( output [ "association" ] , context ) ; } if ( output [ "primary" ] !== undefined ) { contents . Primary = __parseBoolean ( output [ "primary" ] ) ; } if ( output [ "privateDnsName" ] !== undefined ) { contents . PrivateDnsName = __expectString ( output [ "privateDnsName" ] ) ; } if ( output [ "privateIpAddress" ] !== undefined ) { contents . PrivateIpAddress = __expectString ( output [ "privateIpAddress" ] ) ; } return contents ; } ; const deserializeAws_ec2NetworkInterfacePrivateIpAddressList = ( output , context ) : NetworkInterfacePrivateIpAddress [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2NetworkInterfacePrivateIpAddress ( entry , context ) ; } ) ; } ; const deserializeAws_ec2OccurrenceDaySet = ( output , context ) : number [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __strictParseInt32 ( entry ) as number ; } ) ; } ; const deserializeAws_ec2OnDemandOptions = ( output , context ) : OnDemandOptions => { const contents = { AllocationStrategy : undefined , CapacityReservationOptions : undefined , SingleInstanceType : undefined , SingleAvailabilityZone : undefined , MinTargetCapacity : undefined , MaxTotalPrice : undefined , } ; if ( output [ "allocationStrategy" ] !== undefined ) { contents . AllocationStrategy = __expectString ( output [ "allocationStrategy" ] ) ; } if ( output [ "capacityReservationOptions" ] !== undefined ) { contents . CapacityReservationOptions = deserializeAws_ec2CapacityReservationOptions ( output [ "capacityReservationOptions" ] , context ) ; } if ( output [ "singleInstanceType" ] !== undefined ) { contents . SingleInstanceType = __parseBoolean ( output [ "singleInstanceType" ] ) ; } if ( output [ "singleAvailabilityZone" ] !== undefined ) { contents . SingleAvailabilityZone = __parseBoolean ( output [ "singleAvailabilityZone" ] ) ; } if ( output [ "minTargetCapacity" ] !== undefined ) { contents . MinTargetCapacity = __strictParseInt32 ( output [ "minTargetCapacity" ] ) as number ; } if ( output [ "maxTotalPrice" ] !== undefined ) { contents . MaxTotalPrice = __expectString ( output [ "maxTotalPrice" ] ) ; } return contents ; } ; const deserializeAws_ec2PacketHeaderStatement = ( output , context ) : PacketHeaderStatement => { const contents = { SourceAddresses : undefined , DestinationAddresses : undefined , SourcePorts : undefined , DestinationPorts : undefined , SourcePrefixLists : undefined , DestinationPrefixLists : undefined , Protocols : undefined , } ; if ( output . sourceAddressSet === "" ) { contents . SourceAddresses = [ ] ; } if ( output [ "sourceAddressSet" ] !== undefined && output [ "sourceAddressSet" ] [ "item" ] !== undefined ) { contents . SourceAddresses = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "sourceAddressSet" ] [ "item" ] ) , context ) ; } if ( output . destinationAddressSet === "" ) { contents . DestinationAddresses = [ ] ; } if ( output [ "destinationAddressSet" ] !== undefined && output [ "destinationAddressSet" ] [ "item" ] !== undefined ) { contents . DestinationAddresses = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "destinationAddressSet" ] [ "item" ] ) , context ) ; } if ( output . sourcePortSet === "" ) { contents . SourcePorts = [ ] ; } if ( output [ "sourcePortSet" ] !== undefined && output [ "sourcePortSet" ] [ "item" ] !== undefined ) { contents . SourcePorts = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "sourcePortSet" ] [ "item" ] ) , context ) ; } if ( output . destinationPortSet === "" ) { contents . DestinationPorts = [ ] ; } if ( output [ "destinationPortSet" ] !== undefined && output [ "destinationPortSet" ] [ "item" ] !== undefined ) { contents . DestinationPorts = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "destinationPortSet" ] [ "item" ] ) , context ) ; } if ( output . sourcePrefixListSet === "" ) { contents . SourcePrefixLists = [ ] ; } if ( output [ "sourcePrefixListSet" ] !== undefined && output [ "sourcePrefixListSet" ] [ "item" ] !== undefined ) { contents . SourcePrefixLists = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "sourcePrefixListSet" ] [ "item" ] ) , context ) ; } if ( output . destinationPrefixListSet === "" ) { contents . DestinationPrefixLists = [ ] ; } if ( output [ "destinationPrefixListSet" ] !== undefined && output [ "destinationPrefixListSet" ] [ "item" ] !== undefined ) { contents . DestinationPrefixLists = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "destinationPrefixListSet" ] [ "item" ] ) , context ) ; } if ( output . protocolSet === "" ) { contents . Protocols = [ ] ; } if ( output [ "protocolSet" ] !== undefined && output [ "protocolSet" ] [ "item" ] !== undefined ) { contents . Protocols = deserializeAws_ec2ProtocolList ( __getArrayIfSingleItem ( output [ "protocolSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2PathComponent = ( output , context ) : PathComponent => { const contents = { SequenceNumber : undefined , AclRule : undefined , AttachedTo : undefined , Component : undefined , DestinationVpc : undefined , OutboundHeader : undefined , InboundHeader : undefined , RouteTableRoute : undefined , SecurityGroupRule : undefined , SourceVpc : undefined , Subnet : undefined , Vpc : undefined , } ; if ( output [ "sequenceNumber" ] !== undefined ) { contents . SequenceNumber = __strictParseInt32 ( output [ "sequenceNumber" ] ) as number ; } if ( output [ "aclRule" ] !== undefined ) { contents . AclRule = deserializeAws_ec2AnalysisAclRule ( output [ "aclRule" ] , context ) ; } if ( output [ "attachedTo" ] !== undefined ) { contents . AttachedTo = deserializeAws_ec2AnalysisComponent ( output [ "attachedTo" ] , context ) ; } if ( output [ "component" ] !== undefined ) { contents . Component = deserializeAws_ec2AnalysisComponent ( output [ "component" ] , context ) ; } if ( output [ "destinationVpc" ] !== undefined ) { contents . DestinationVpc = deserializeAws_ec2AnalysisComponent ( output [ "destinationVpc" ] , context ) ; } if ( output [ "outboundHeader" ] !== undefined ) { contents . OutboundHeader = deserializeAws_ec2AnalysisPacketHeader ( output [ "outboundHeader" ] , context ) ; } if ( output [ "inboundHeader" ] !== undefined ) { contents . InboundHeader = deserializeAws_ec2AnalysisPacketHeader ( output [ "inboundHeader" ] , context ) ; } if ( output [ "routeTableRoute" ] !== undefined ) { contents . RouteTableRoute = deserializeAws_ec2AnalysisRouteTableRoute ( output [ "routeTableRoute" ] , context ) ; } if ( output [ "securityGroupRule" ] !== undefined ) { contents . SecurityGroupRule = deserializeAws_ec2AnalysisSecurityGroupRule ( output [ "securityGroupRule" ] , context ) ; } if ( output [ "sourceVpc" ] !== undefined ) { contents . SourceVpc = deserializeAws_ec2AnalysisComponent ( output [ "sourceVpc" ] , context ) ; } if ( output [ "subnet" ] !== undefined ) { contents . Subnet = deserializeAws_ec2AnalysisComponent ( output [ "subnet" ] , context ) ; } if ( output [ "vpc" ] !== undefined ) { contents . Vpc = deserializeAws_ec2AnalysisComponent ( output [ "vpc" ] , context ) ; } return contents ; } ; const deserializeAws_ec2PathComponentList = ( output , context ) : PathComponent [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2PathComponent ( entry , context ) ; } ) ; } ; const deserializeAws_ec2PathStatement = ( output , context ) : PathStatement => { const contents = { PacketHeaderStatement : undefined , ResourceStatement : undefined , } ; if ( output [ "packetHeaderStatement" ] !== undefined ) { contents . PacketHeaderStatement = deserializeAws_ec2PacketHeaderStatement ( output [ "packetHeaderStatement" ] , context ) ; } if ( output [ "resourceStatement" ] !== undefined ) { contents . ResourceStatement = deserializeAws_ec2ResourceStatement ( output [ "resourceStatement" ] , context ) ; } return contents ; } ; const deserializeAws_ec2PciId = ( output , context ) : PciId => { const contents = { DeviceId : undefined , VendorId : undefined , SubsystemId : undefined , SubsystemVendorId : undefined , } ; if ( output [ "DeviceId" ] !== undefined ) { contents . DeviceId = __expectString ( output [ "DeviceId" ] ) ; } if ( output [ "VendorId" ] !== undefined ) { contents . VendorId = __expectString ( output [ "VendorId" ] ) ; } if ( output [ "SubsystemId" ] !== undefined ) { contents . SubsystemId = __expectString ( output [ "SubsystemId" ] ) ; } if ( output [ "SubsystemVendorId" ] !== undefined ) { contents . SubsystemVendorId = __expectString ( output [ "SubsystemVendorId" ] ) ; } return contents ; } ; const deserializeAws_ec2PeeringAttachmentStatus = ( output , context ) : PeeringAttachmentStatus => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2PeeringConnectionOptions = ( output , context ) : PeeringConnectionOptions => { const contents = { AllowDnsResolutionFromRemoteVpc : undefined , AllowEgressFromLocalClassicLinkToRemoteVpc : undefined , AllowEgressFromLocalVpcToRemoteClassicLink : undefined , } ; if ( output [ "allowDnsResolutionFromRemoteVpc" ] !== undefined ) { contents . AllowDnsResolutionFromRemoteVpc = __parseBoolean ( output [ "allowDnsResolutionFromRemoteVpc" ] ) ; } if ( output [ "allowEgressFromLocalClassicLinkToRemoteVpc" ] !== undefined ) { contents . AllowEgressFromLocalClassicLinkToRemoteVpc = __parseBoolean ( output [ "allowEgressFromLocalClassicLinkToRemoteVpc" ] ) ; } if ( output [ "allowEgressFromLocalVpcToRemoteClassicLink" ] !== undefined ) { contents . AllowEgressFromLocalVpcToRemoteClassicLink = __parseBoolean ( output [ "allowEgressFromLocalVpcToRemoteClassicLink" ] ) ; } return contents ; } ; const deserializeAws_ec2PeeringTgwInfo = ( output , context ) : PeeringTgwInfo => { const contents = { TransitGatewayId : undefined , OwnerId : undefined , Region : undefined , } ; if ( output [ "transitGatewayId" ] !== undefined ) { contents . TransitGatewayId = __expectString ( output [ "transitGatewayId" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "region" ] !== undefined ) { contents . Region = __expectString ( output [ "region" ] ) ; } return contents ; } ; const deserializeAws_ec2Phase1DHGroupNumbersList = ( output , context ) : Phase1DHGroupNumbersListValue [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Phase1DHGroupNumbersListValue ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Phase1DHGroupNumbersListValue = ( output , context ) : Phase1DHGroupNumbersListValue => { const contents = { Value : undefined , } ; if ( output [ "value" ] !== undefined ) { contents . Value = __strictParseInt32 ( output [ "value" ] ) as number ; } return contents ; } ; const deserializeAws_ec2Phase1EncryptionAlgorithmsList = ( output , context ) : Phase1EncryptionAlgorithmsListValue [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Phase1EncryptionAlgorithmsListValue ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Phase1EncryptionAlgorithmsListValue = ( output , context ) : Phase1EncryptionAlgorithmsListValue => { const contents = { Value : undefined , } ; if ( output [ "value" ] !== undefined ) { contents . Value = __expectString ( output [ "value" ] ) ; } return contents ; } ; const deserializeAws_ec2Phase1IntegrityAlgorithmsList = ( output , context ) : Phase1IntegrityAlgorithmsListValue [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Phase1IntegrityAlgorithmsListValue ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Phase1IntegrityAlgorithmsListValue = ( output , context ) : Phase1IntegrityAlgorithmsListValue => { const contents = { Value : undefined , } ; if ( output [ "value" ] !== undefined ) { contents . Value = __expectString ( output [ "value" ] ) ; } return contents ; } ; const deserializeAws_ec2Phase2DHGroupNumbersList = ( output , context ) : Phase2DHGroupNumbersListValue [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Phase2DHGroupNumbersListValue ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Phase2DHGroupNumbersListValue = ( output , context ) : Phase2DHGroupNumbersListValue => { const contents = { Value : undefined , } ; if ( output [ "value" ] !== undefined ) { contents . Value = __strictParseInt32 ( output [ "value" ] ) as number ; } return contents ; } ; const deserializeAws_ec2Phase2EncryptionAlgorithmsList = ( output , context ) : Phase2EncryptionAlgorithmsListValue [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Phase2EncryptionAlgorithmsListValue ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Phase2EncryptionAlgorithmsListValue = ( output , context ) : Phase2EncryptionAlgorithmsListValue => { const contents = { Value : undefined , } ; if ( output [ "value" ] !== undefined ) { contents . Value = __expectString ( output [ "value" ] ) ; } return contents ; } ; const deserializeAws_ec2Phase2IntegrityAlgorithmsList = ( output , context ) : Phase2IntegrityAlgorithmsListValue [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Phase2IntegrityAlgorithmsListValue ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Phase2IntegrityAlgorithmsListValue = ( output , context ) : Phase2IntegrityAlgorithmsListValue => { const contents = { Value : undefined , } ; if ( output [ "value" ] !== undefined ) { contents . Value = __expectString ( output [ "value" ] ) ; } return contents ; } ; const deserializeAws_ec2Placement = ( output , context ) : Placement => { const contents = { AvailabilityZone : undefined , Affinity : undefined , GroupName : undefined , PartitionNumber : undefined , HostId : undefined , Tenancy : undefined , SpreadDomain : undefined , HostResourceGroupArn : undefined , } ; if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "affinity" ] !== undefined ) { contents . Affinity = __expectString ( output [ "affinity" ] ) ; } if ( output [ "groupName" ] !== undefined ) { contents . GroupName = __expectString ( output [ "groupName" ] ) ; } if ( output [ "partitionNumber" ] !== undefined ) { contents . PartitionNumber = __strictParseInt32 ( output [ "partitionNumber" ] ) as number ; } if ( output [ "hostId" ] !== undefined ) { contents . HostId = __expectString ( output [ "hostId" ] ) ; } if ( output [ "tenancy" ] !== undefined ) { contents . Tenancy = __expectString ( output [ "tenancy" ] ) ; } if ( output [ "spreadDomain" ] !== undefined ) { contents . SpreadDomain = __expectString ( output [ "spreadDomain" ] ) ; } if ( output [ "hostResourceGroupArn" ] !== undefined ) { contents . HostResourceGroupArn = __expectString ( output [ "hostResourceGroupArn" ] ) ; } return contents ; } ; const deserializeAws_ec2PlacementGroup = ( output , context ) : PlacementGroup => { const contents = { GroupName : undefined , State : undefined , Strategy : undefined , PartitionCount : undefined , GroupId : undefined , Tags : undefined , GroupArn : undefined , } ; if ( output [ "groupName" ] !== undefined ) { contents . GroupName = __expectString ( output [ "groupName" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "strategy" ] !== undefined ) { contents . Strategy = __expectString ( output [ "strategy" ] ) ; } if ( output [ "partitionCount" ] !== undefined ) { contents . PartitionCount = __strictParseInt32 ( output [ "partitionCount" ] ) as number ; } if ( output [ "groupId" ] !== undefined ) { contents . GroupId = __expectString ( output [ "groupId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "groupArn" ] !== undefined ) { contents . GroupArn = __expectString ( output [ "groupArn" ] ) ; } return contents ; } ; const deserializeAws_ec2PlacementGroupInfo = ( output , context ) : PlacementGroupInfo => { const contents = { SupportedStrategies : undefined , } ; if ( output . supportedStrategies === "" ) { contents . SupportedStrategies = [ ] ; } if ( output [ "supportedStrategies" ] !== undefined && output [ "supportedStrategies" ] [ "item" ] !== undefined ) { contents . SupportedStrategies = deserializeAws_ec2PlacementGroupStrategyList ( __getArrayIfSingleItem ( output [ "supportedStrategies" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2PlacementGroupList = ( output , context ) : PlacementGroup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2PlacementGroup ( entry , context ) ; } ) ; } ; const deserializeAws_ec2PlacementGroupStrategyList = ( output , context ) : ( PlacementGroupStrategy | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_ec2PlacementResponse = ( output , context ) : PlacementResponse => { const contents = { GroupName : undefined , } ; if ( output [ "groupName" ] !== undefined ) { contents . GroupName = __expectString ( output [ "groupName" ] ) ; } return contents ; } ; const deserializeAws_ec2PoolCidrBlock = ( output , context ) : PoolCidrBlock => { const contents = { Cidr : undefined , } ; if ( output [ "poolCidrBlock" ] !== undefined ) { contents . Cidr = __expectString ( output [ "poolCidrBlock" ] ) ; } return contents ; } ; const deserializeAws_ec2PoolCidrBlocksSet = ( output , context ) : PoolCidrBlock [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2PoolCidrBlock ( entry , context ) ; } ) ; } ; const deserializeAws_ec2PortRange = ( output , context ) : PortRange => { const contents = { From : undefined , To : undefined , } ; if ( output [ "from" ] !== undefined ) { contents . From = __strictParseInt32 ( output [ "from" ] ) as number ; } if ( output [ "to" ] !== undefined ) { contents . To = __strictParseInt32 ( output [ "to" ] ) as number ; } return contents ; } ; const deserializeAws_ec2PortRangeList = ( output , context ) : PortRange [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2PortRange ( entry , context ) ; } ) ; } ; const deserializeAws_ec2PrefixList = ( output , context ) : PrefixList => { const contents = { Cidrs : undefined , PrefixListId : undefined , PrefixListName : undefined , } ; if ( output . cidrSet === "" ) { contents . Cidrs = [ ] ; } if ( output [ "cidrSet" ] !== undefined && output [ "cidrSet" ] [ "item" ] !== undefined ) { contents . Cidrs = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "cidrSet" ] [ "item" ] ) , context ) ; } if ( output [ "prefixListId" ] !== undefined ) { contents . PrefixListId = __expectString ( output [ "prefixListId" ] ) ; } if ( output [ "prefixListName" ] !== undefined ) { contents . PrefixListName = __expectString ( output [ "prefixListName" ] ) ; } return contents ; } ; const deserializeAws_ec2PrefixListAssociation = ( output , context ) : PrefixListAssociation => { const contents = { ResourceId : undefined , ResourceOwner : undefined , } ; if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } if ( output [ "resourceOwner" ] !== undefined ) { contents . ResourceOwner = __expectString ( output [ "resourceOwner" ] ) ; } return contents ; } ; const deserializeAws_ec2PrefixListAssociationSet = ( output , context ) : PrefixListAssociation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2PrefixListAssociation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2PrefixListEntry = ( output , context ) : PrefixListEntry => { const contents = { Cidr : undefined , Description : undefined , } ; if ( output [ "cidr" ] !== undefined ) { contents . Cidr = __expectString ( output [ "cidr" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } return contents ; } ; const deserializeAws_ec2PrefixListEntrySet = ( output , context ) : PrefixListEntry [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2PrefixListEntry ( entry , context ) ; } ) ; } ; const deserializeAws_ec2PrefixListId = ( output , context ) : PrefixListId => { const contents = { Description : undefined , PrefixListId : undefined , } ; if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "prefixListId" ] !== undefined ) { contents . PrefixListId = __expectString ( output [ "prefixListId" ] ) ; } return contents ; } ; const deserializeAws_ec2PrefixListIdList = ( output , context ) : PrefixListId [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2PrefixListId ( entry , context ) ; } ) ; } ; const deserializeAws_ec2PrefixListIdSet = ( 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_ec2PrefixListSet = ( output , context ) : PrefixList [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2PrefixList ( entry , context ) ; } ) ; } ; const deserializeAws_ec2PriceSchedule = ( output , context ) : PriceSchedule => { const contents = { Active : undefined , CurrencyCode : undefined , Price : undefined , Term : undefined , } ; if ( output [ "active" ] !== undefined ) { contents . Active = __parseBoolean ( output [ "active" ] ) ; } if ( output [ "currencyCode" ] !== undefined ) { contents . CurrencyCode = __expectString ( output [ "currencyCode" ] ) ; } if ( output [ "price" ] !== undefined ) { contents . Price = __strictParseFloat ( output [ "price" ] ) as number ; } if ( output [ "term" ] !== undefined ) { contents . Term = __strictParseLong ( output [ "term" ] ) as number ; } return contents ; } ; const deserializeAws_ec2PriceScheduleList = ( output , context ) : PriceSchedule [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2PriceSchedule ( entry , context ) ; } ) ; } ; const deserializeAws_ec2PricingDetail = ( output , context ) : PricingDetail => { const contents = { Count : undefined , Price : undefined , } ; if ( output [ "count" ] !== undefined ) { contents . Count = __strictParseInt32 ( output [ "count" ] ) as number ; } if ( output [ "price" ] !== undefined ) { contents . Price = __strictParseFloat ( output [ "price" ] ) as number ; } return contents ; } ; const deserializeAws_ec2PricingDetailsList = ( output , context ) : PricingDetail [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2PricingDetail ( entry , context ) ; } ) ; } ; const deserializeAws_ec2PrincipalIdFormat = ( output , context ) : PrincipalIdFormat => { const contents = { Arn : undefined , Statuses : undefined , } ; if ( output [ "arn" ] !== undefined ) { contents . Arn = __expectString ( output [ "arn" ] ) ; } if ( output . statusSet === "" ) { contents . Statuses = [ ] ; } if ( output [ "statusSet" ] !== undefined && output [ "statusSet" ] [ "item" ] !== undefined ) { contents . Statuses = deserializeAws_ec2IdFormatList ( __getArrayIfSingleItem ( output [ "statusSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2PrincipalIdFormatList = ( output , context ) : PrincipalIdFormat [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2PrincipalIdFormat ( entry , context ) ; } ) ; } ; const deserializeAws_ec2PrivateDnsDetails = ( output , context ) : PrivateDnsDetails => { const contents = { PrivateDnsName : undefined , } ; if ( output [ "privateDnsName" ] !== undefined ) { contents . PrivateDnsName = __expectString ( output [ "privateDnsName" ] ) ; } return contents ; } ; const deserializeAws_ec2PrivateDnsDetailsSet = ( output , context ) : PrivateDnsDetails [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2PrivateDnsDetails ( entry , context ) ; } ) ; } ; const deserializeAws_ec2PrivateDnsNameConfiguration = ( output , context ) : PrivateDnsNameConfiguration => { const contents = { State : undefined , Type : undefined , Value : undefined , Name : undefined , } ; if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "type" ] !== undefined ) { contents . Type = __expectString ( output [ "type" ] ) ; } if ( output [ "value" ] !== undefined ) { contents . Value = __expectString ( output [ "value" ] ) ; } if ( output [ "name" ] !== undefined ) { contents . Name = __expectString ( output [ "name" ] ) ; } return contents ; } ; const deserializeAws_ec2PrivateDnsNameOptionsOnLaunch = ( output , context ) : PrivateDnsNameOptionsOnLaunch => { const contents = { HostnameType : undefined , EnableResourceNameDnsARecord : undefined , EnableResourceNameDnsAAAARecord : undefined , } ; if ( output [ "hostnameType" ] !== undefined ) { contents . HostnameType = __expectString ( output [ "hostnameType" ] ) ; } if ( output [ "enableResourceNameDnsARecord" ] !== undefined ) { contents . EnableResourceNameDnsARecord = __parseBoolean ( output [ "enableResourceNameDnsARecord" ] ) ; } if ( output [ "enableResourceNameDnsAAAARecord" ] !== undefined ) { contents . EnableResourceNameDnsAAAARecord = __parseBoolean ( output [ "enableResourceNameDnsAAAARecord" ] ) ; } return contents ; } ; const deserializeAws_ec2PrivateDnsNameOptionsResponse = ( output , context ) : PrivateDnsNameOptionsResponse => { const contents = { HostnameType : undefined , EnableResourceNameDnsARecord : undefined , EnableResourceNameDnsAAAARecord : undefined , } ; if ( output [ "hostnameType" ] !== undefined ) { contents . HostnameType = __expectString ( output [ "hostnameType" ] ) ; } if ( output [ "enableResourceNameDnsARecord" ] !== undefined ) { contents . EnableResourceNameDnsARecord = __parseBoolean ( output [ "enableResourceNameDnsARecord" ] ) ; } if ( output [ "enableResourceNameDnsAAAARecord" ] !== undefined ) { contents . EnableResourceNameDnsAAAARecord = __parseBoolean ( output [ "enableResourceNameDnsAAAARecord" ] ) ; } return contents ; } ; const deserializeAws_ec2PrivateIpAddressSpecification = ( output , context ) : PrivateIpAddressSpecification => { const contents = { Primary : undefined , PrivateIpAddress : undefined , } ; if ( output [ "primary" ] !== undefined ) { contents . Primary = __parseBoolean ( output [ "primary" ] ) ; } if ( output [ "privateIpAddress" ] !== undefined ) { contents . PrivateIpAddress = __expectString ( output [ "privateIpAddress" ] ) ; } return contents ; } ; const deserializeAws_ec2PrivateIpAddressSpecificationList = ( output , context ) : PrivateIpAddressSpecification [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2PrivateIpAddressSpecification ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ProcessorInfo = ( output , context ) : ProcessorInfo => { const contents = { SupportedArchitectures : undefined , SustainedClockSpeedInGhz : undefined , } ; if ( output . supportedArchitectures === "" ) { contents . SupportedArchitectures = [ ] ; } if ( output [ "supportedArchitectures" ] !== undefined && output [ "supportedArchitectures" ] [ "item" ] !== undefined ) { contents . SupportedArchitectures = deserializeAws_ec2ArchitectureTypeList ( __getArrayIfSingleItem ( output [ "supportedArchitectures" ] [ "item" ] ) , context ) ; } if ( output [ "sustainedClockSpeedInGhz" ] !== undefined ) { contents . SustainedClockSpeedInGhz = __strictParseFloat ( output [ "sustainedClockSpeedInGhz" ] ) as number ; } return contents ; } ; const deserializeAws_ec2ProductCode = ( output , context ) : ProductCode => { const contents = { ProductCodeId : undefined , ProductCodeType : undefined , } ; if ( output [ "productCode" ] !== undefined ) { contents . ProductCodeId = __expectString ( output [ "productCode" ] ) ; } if ( output [ "type" ] !== undefined ) { contents . ProductCodeType = __expectString ( output [ "type" ] ) ; } return contents ; } ; const deserializeAws_ec2ProductCodeList = ( output , context ) : ProductCode [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ProductCode ( entry , context ) ; } ) ; } ; const deserializeAws_ec2PropagatingVgw = ( output , context ) : PropagatingVgw => { const contents = { GatewayId : undefined , } ; if ( output [ "gatewayId" ] !== undefined ) { contents . GatewayId = __expectString ( output [ "gatewayId" ] ) ; } return contents ; } ; const deserializeAws_ec2PropagatingVgwList = ( output , context ) : PropagatingVgw [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2PropagatingVgw ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ProtocolList = ( output , context ) : ( Protocol | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_ec2ProvisionByoipCidrResult = ( output , context ) : ProvisionByoipCidrResult => { const contents = { ByoipCidr : undefined , } ; if ( output [ "byoipCidr" ] !== undefined ) { contents . ByoipCidr = deserializeAws_ec2ByoipCidr ( output [ "byoipCidr" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ProvisionedBandwidth = ( output , context ) : ProvisionedBandwidth => { const contents = { ProvisionTime : undefined , Provisioned : undefined , RequestTime : undefined , Requested : undefined , Status : undefined , } ; if ( output [ "provisionTime" ] !== undefined ) { contents . ProvisionTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "provisionTime" ] ) ) ; } if ( output [ "provisioned" ] !== undefined ) { contents . Provisioned = __expectString ( output [ "provisioned" ] ) ; } if ( output [ "requestTime" ] !== undefined ) { contents . RequestTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "requestTime" ] ) ) ; } if ( output [ "requested" ] !== undefined ) { contents . Requested = __expectString ( output [ "requested" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } return contents ; } ; const deserializeAws_ec2ProvisionIpamPoolCidrResult = ( output , context ) : ProvisionIpamPoolCidrResult => { const contents = { IpamPoolCidr : undefined , } ; if ( output [ "ipamPoolCidr" ] !== undefined ) { contents . IpamPoolCidr = deserializeAws_ec2IpamPoolCidr ( output [ "ipamPoolCidr" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ProvisionPublicIpv4PoolCidrResult = ( output , context ) : ProvisionPublicIpv4PoolCidrResult => { const contents = { PoolId : undefined , PoolAddressRange : undefined , } ; if ( output [ "poolId" ] !== undefined ) { contents . PoolId = __expectString ( output [ "poolId" ] ) ; } if ( output [ "poolAddressRange" ] !== undefined ) { contents . PoolAddressRange = deserializeAws_ec2PublicIpv4PoolRange ( output [ "poolAddressRange" ] , context ) ; } return contents ; } ; const deserializeAws_ec2PtrUpdateStatus = ( output , context ) : PtrUpdateStatus => { const contents = { Value : undefined , Status : undefined , Reason : undefined , } ; if ( output [ "value" ] !== undefined ) { contents . Value = __expectString ( output [ "value" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "reason" ] !== undefined ) { contents . Reason = __expectString ( output [ "reason" ] ) ; } return contents ; } ; const deserializeAws_ec2PublicIpv4Pool = ( output , context ) : PublicIpv4Pool => { const contents = { PoolId : undefined , Description : undefined , PoolAddressRanges : undefined , TotalAddressCount : undefined , TotalAvailableAddressCount : undefined , NetworkBorderGroup : undefined , Tags : undefined , } ; if ( output [ "poolId" ] !== undefined ) { contents . PoolId = __expectString ( output [ "poolId" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output . poolAddressRangeSet === "" ) { contents . PoolAddressRanges = [ ] ; } if ( output [ "poolAddressRangeSet" ] !== undefined && output [ "poolAddressRangeSet" ] [ "item" ] !== undefined ) { contents . PoolAddressRanges = deserializeAws_ec2PublicIpv4PoolRangeSet ( __getArrayIfSingleItem ( output [ "poolAddressRangeSet" ] [ "item" ] ) , context ) ; } if ( output [ "totalAddressCount" ] !== undefined ) { contents . TotalAddressCount = __strictParseInt32 ( output [ "totalAddressCount" ] ) as number ; } if ( output [ "totalAvailableAddressCount" ] !== undefined ) { contents . TotalAvailableAddressCount = __strictParseInt32 ( output [ "totalAvailableAddressCount" ] ) as number ; } if ( output [ "networkBorderGroup" ] !== undefined ) { contents . NetworkBorderGroup = __expectString ( output [ "networkBorderGroup" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2PublicIpv4PoolRange = ( output , context ) : PublicIpv4PoolRange => { const contents = { FirstAddress : undefined , LastAddress : undefined , AddressCount : undefined , AvailableAddressCount : undefined , } ; if ( output [ "firstAddress" ] !== undefined ) { contents . FirstAddress = __expectString ( output [ "firstAddress" ] ) ; } if ( output [ "lastAddress" ] !== undefined ) { contents . LastAddress = __expectString ( output [ "lastAddress" ] ) ; } if ( output [ "addressCount" ] !== undefined ) { contents . AddressCount = __strictParseInt32 ( output [ "addressCount" ] ) as number ; } if ( output [ "availableAddressCount" ] !== undefined ) { contents . AvailableAddressCount = __strictParseInt32 ( output [ "availableAddressCount" ] ) as number ; } return contents ; } ; const deserializeAws_ec2PublicIpv4PoolRangeSet = ( output , context ) : PublicIpv4PoolRange [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2PublicIpv4PoolRange ( entry , context ) ; } ) ; } ; const deserializeAws_ec2PublicIpv4PoolSet = ( output , context ) : PublicIpv4Pool [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2PublicIpv4Pool ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Purchase = ( output , context ) : Purchase => { const contents = { CurrencyCode : undefined , Duration : undefined , HostIdSet : undefined , HostReservationId : undefined , HourlyPrice : undefined , InstanceFamily : undefined , PaymentOption : undefined , UpfrontPrice : undefined , } ; if ( output [ "currencyCode" ] !== undefined ) { contents . CurrencyCode = __expectString ( output [ "currencyCode" ] ) ; } if ( output [ "duration" ] !== undefined ) { contents . Duration = __strictParseInt32 ( output [ "duration" ] ) as number ; } if ( output . hostIdSet === "" ) { contents . HostIdSet = [ ] ; } if ( output [ "hostIdSet" ] !== undefined && output [ "hostIdSet" ] [ "item" ] !== undefined ) { contents . HostIdSet = deserializeAws_ec2ResponseHostIdSet ( __getArrayIfSingleItem ( output [ "hostIdSet" ] [ "item" ] ) , context ) ; } if ( output [ "hostReservationId" ] !== undefined ) { contents . HostReservationId = __expectString ( output [ "hostReservationId" ] ) ; } if ( output [ "hourlyPrice" ] !== undefined ) { contents . HourlyPrice = __expectString ( output [ "hourlyPrice" ] ) ; } if ( output [ "instanceFamily" ] !== undefined ) { contents . InstanceFamily = __expectString ( output [ "instanceFamily" ] ) ; } if ( output [ "paymentOption" ] !== undefined ) { contents . PaymentOption = __expectString ( output [ "paymentOption" ] ) ; } if ( output [ "upfrontPrice" ] !== undefined ) { contents . UpfrontPrice = __expectString ( output [ "upfrontPrice" ] ) ; } return contents ; } ; const deserializeAws_ec2PurchasedScheduledInstanceSet = ( output , context ) : ScheduledInstance [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ScheduledInstance ( entry , context ) ; } ) ; } ; const deserializeAws_ec2PurchaseHostReservationResult = ( output , context ) : PurchaseHostReservationResult => { const contents = { ClientToken : undefined , CurrencyCode : undefined , Purchase : undefined , TotalHourlyPrice : undefined , TotalUpfrontPrice : undefined , } ; if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } if ( output [ "currencyCode" ] !== undefined ) { contents . CurrencyCode = __expectString ( output [ "currencyCode" ] ) ; } if ( output . purchase === "" ) { contents . Purchase = [ ] ; } if ( output [ "purchase" ] !== undefined && output [ "purchase" ] [ "item" ] !== undefined ) { contents . Purchase = deserializeAws_ec2PurchaseSet ( __getArrayIfSingleItem ( output [ "purchase" ] [ "item" ] ) , context ) ; } if ( output [ "totalHourlyPrice" ] !== undefined ) { contents . TotalHourlyPrice = __expectString ( output [ "totalHourlyPrice" ] ) ; } if ( output [ "totalUpfrontPrice" ] !== undefined ) { contents . TotalUpfrontPrice = __expectString ( output [ "totalUpfrontPrice" ] ) ; } return contents ; } ; const deserializeAws_ec2PurchaseReservedInstancesOfferingResult = ( output , context ) : PurchaseReservedInstancesOfferingResult => { const contents = { ReservedInstancesId : undefined , } ; if ( output [ "reservedInstancesId" ] !== undefined ) { contents . ReservedInstancesId = __expectString ( output [ "reservedInstancesId" ] ) ; } return contents ; } ; const deserializeAws_ec2PurchaseScheduledInstancesResult = ( output , context ) : PurchaseScheduledInstancesResult => { const contents = { ScheduledInstanceSet : undefined , } ; if ( output . scheduledInstanceSet === "" ) { contents . ScheduledInstanceSet = [ ] ; } if ( output [ "scheduledInstanceSet" ] !== undefined && output [ "scheduledInstanceSet" ] [ "item" ] !== undefined ) { contents . ScheduledInstanceSet = deserializeAws_ec2PurchasedScheduledInstanceSet ( __getArrayIfSingleItem ( output [ "scheduledInstanceSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2PurchaseSet = ( output , context ) : Purchase [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Purchase ( entry , context ) ; } ) ; } ; const deserializeAws_ec2RecurringCharge = ( output , context ) : RecurringCharge => { const contents = { Amount : undefined , Frequency : undefined , } ; if ( output [ "amount" ] !== undefined ) { contents . Amount = __strictParseFloat ( output [ "amount" ] ) as number ; } if ( output [ "frequency" ] !== undefined ) { contents . Frequency = __expectString ( output [ "frequency" ] ) ; } return contents ; } ; const deserializeAws_ec2RecurringChargesList = ( output , context ) : RecurringCharge [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2RecurringCharge ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ReferencedSecurityGroup = ( output , context ) : ReferencedSecurityGroup => { const contents = { GroupId : undefined , PeeringStatus : undefined , UserId : undefined , VpcId : undefined , VpcPeeringConnectionId : undefined , } ; if ( output [ "groupId" ] !== undefined ) { contents . GroupId = __expectString ( output [ "groupId" ] ) ; } if ( output [ "peeringStatus" ] !== undefined ) { contents . PeeringStatus = __expectString ( output [ "peeringStatus" ] ) ; } if ( output [ "userId" ] !== undefined ) { contents . UserId = __expectString ( output [ "userId" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "vpcPeeringConnectionId" ] !== undefined ) { contents . VpcPeeringConnectionId = __expectString ( output [ "vpcPeeringConnectionId" ] ) ; } return contents ; } ; const deserializeAws_ec2Region = ( output , context ) : Region => { const contents = { Endpoint : undefined , RegionName : undefined , OptInStatus : undefined , } ; if ( output [ "regionEndpoint" ] !== undefined ) { contents . Endpoint = __expectString ( output [ "regionEndpoint" ] ) ; } if ( output [ "regionName" ] !== undefined ) { contents . RegionName = __expectString ( output [ "regionName" ] ) ; } if ( output [ "optInStatus" ] !== undefined ) { contents . OptInStatus = __expectString ( output [ "optInStatus" ] ) ; } return contents ; } ; const deserializeAws_ec2RegionList = ( output , context ) : Region [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Region ( entry , context ) ; } ) ; } ; const deserializeAws_ec2RegisterImageResult = ( output , context ) : RegisterImageResult => { const contents = { ImageId : undefined , } ; if ( output [ "imageId" ] !== undefined ) { contents . ImageId = __expectString ( output [ "imageId" ] ) ; } return contents ; } ; const deserializeAws_ec2RegisterInstanceEventNotificationAttributesResult = ( output , context ) : RegisterInstanceEventNotificationAttributesResult => { const contents = { InstanceTagAttribute : undefined , } ; if ( output [ "instanceTagAttribute" ] !== undefined ) { contents . InstanceTagAttribute = deserializeAws_ec2InstanceTagNotificationAttribute ( output [ "instanceTagAttribute" ] , context ) ; } return contents ; } ; const deserializeAws_ec2RegisterTransitGatewayMulticastGroupMembersResult = ( output , context ) : RegisterTransitGatewayMulticastGroupMembersResult => { const contents = { RegisteredMulticastGroupMembers : undefined , } ; if ( output [ "registeredMulticastGroupMembers" ] !== undefined ) { contents . RegisteredMulticastGroupMembers = deserializeAws_ec2TransitGatewayMulticastRegisteredGroupMembers ( output [ "registeredMulticastGroupMembers" ] , context ) ; } return contents ; } ; const deserializeAws_ec2RegisterTransitGatewayMulticastGroupSourcesResult = ( output , context ) : RegisterTransitGatewayMulticastGroupSourcesResult => { const contents = { RegisteredMulticastGroupSources : undefined , } ; if ( output [ "registeredMulticastGroupSources" ] !== undefined ) { contents . RegisteredMulticastGroupSources = deserializeAws_ec2TransitGatewayMulticastRegisteredGroupSources ( output [ "registeredMulticastGroupSources" ] , context ) ; } return contents ; } ; const deserializeAws_ec2RejectTransitGatewayMulticastDomainAssociationsResult = ( output , context ) : RejectTransitGatewayMulticastDomainAssociationsResult => { const contents = { Associations : undefined , } ; if ( output [ "associations" ] !== undefined ) { contents . Associations = deserializeAws_ec2TransitGatewayMulticastDomainAssociations ( output [ "associations" ] , context ) ; } return contents ; } ; const deserializeAws_ec2RejectTransitGatewayPeeringAttachmentResult = ( output , context ) : RejectTransitGatewayPeeringAttachmentResult => { const contents = { TransitGatewayPeeringAttachment : undefined , } ; if ( output [ "transitGatewayPeeringAttachment" ] !== undefined ) { contents . TransitGatewayPeeringAttachment = deserializeAws_ec2TransitGatewayPeeringAttachment ( output [ "transitGatewayPeeringAttachment" ] , context ) ; } return contents ; } ; const deserializeAws_ec2RejectTransitGatewayVpcAttachmentResult = ( output , context ) : RejectTransitGatewayVpcAttachmentResult => { const contents = { TransitGatewayVpcAttachment : undefined , } ; if ( output [ "transitGatewayVpcAttachment" ] !== undefined ) { contents . TransitGatewayVpcAttachment = deserializeAws_ec2TransitGatewayVpcAttachment ( output [ "transitGatewayVpcAttachment" ] , context ) ; } return contents ; } ; const deserializeAws_ec2RejectVpcEndpointConnectionsResult = ( output , context ) : RejectVpcEndpointConnectionsResult => { const contents = { Unsuccessful : undefined , } ; if ( output . unsuccessful === "" ) { contents . Unsuccessful = [ ] ; } if ( output [ "unsuccessful" ] !== undefined && output [ "unsuccessful" ] [ "item" ] !== undefined ) { contents . Unsuccessful = deserializeAws_ec2UnsuccessfulItemSet ( __getArrayIfSingleItem ( output [ "unsuccessful" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2RejectVpcPeeringConnectionResult = ( output , context ) : RejectVpcPeeringConnectionResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ReleaseHostsResult = ( output , context ) : ReleaseHostsResult => { const contents = { Successful : undefined , Unsuccessful : undefined , } ; if ( output . successful === "" ) { contents . Successful = [ ] ; } if ( output [ "successful" ] !== undefined && output [ "successful" ] [ "item" ] !== undefined ) { contents . Successful = deserializeAws_ec2ResponseHostIdList ( __getArrayIfSingleItem ( output [ "successful" ] [ "item" ] ) , context ) ; } if ( output . unsuccessful === "" ) { contents . Unsuccessful = [ ] ; } if ( output [ "unsuccessful" ] !== undefined && output [ "unsuccessful" ] [ "item" ] !== undefined ) { contents . Unsuccessful = deserializeAws_ec2UnsuccessfulItemList ( __getArrayIfSingleItem ( output [ "unsuccessful" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ReleaseIpamPoolAllocationResult = ( output , context ) : ReleaseIpamPoolAllocationResult => { const contents = { Success : undefined , } ; if ( output [ "success" ] !== undefined ) { contents . Success = __parseBoolean ( output [ "success" ] ) ; } return contents ; } ; const deserializeAws_ec2ReplaceIamInstanceProfileAssociationResult = ( output , context ) : ReplaceIamInstanceProfileAssociationResult => { const contents = { IamInstanceProfileAssociation : undefined , } ; if ( output [ "iamInstanceProfileAssociation" ] !== undefined ) { contents . IamInstanceProfileAssociation = deserializeAws_ec2IamInstanceProfileAssociation ( output [ "iamInstanceProfileAssociation" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ReplaceNetworkAclAssociationResult = ( output , context ) : ReplaceNetworkAclAssociationResult => { const contents = { NewAssociationId : undefined , } ; if ( output [ "newAssociationId" ] !== undefined ) { contents . NewAssociationId = __expectString ( output [ "newAssociationId" ] ) ; } return contents ; } ; const deserializeAws_ec2ReplaceRootVolumeTask = ( output , context ) : ReplaceRootVolumeTask => { const contents = { ReplaceRootVolumeTaskId : undefined , InstanceId : undefined , TaskState : undefined , StartTime : undefined , CompleteTime : undefined , Tags : undefined , } ; if ( output [ "replaceRootVolumeTaskId" ] !== undefined ) { contents . ReplaceRootVolumeTaskId = __expectString ( output [ "replaceRootVolumeTaskId" ] ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "taskState" ] !== undefined ) { contents . TaskState = __expectString ( output [ "taskState" ] ) ; } if ( output [ "startTime" ] !== undefined ) { contents . StartTime = __expectString ( output [ "startTime" ] ) ; } if ( output [ "completeTime" ] !== undefined ) { contents . CompleteTime = __expectString ( output [ "completeTime" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ReplaceRootVolumeTasks = ( output , context ) : ReplaceRootVolumeTask [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ReplaceRootVolumeTask ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ReplaceRouteTableAssociationResult = ( output , context ) : ReplaceRouteTableAssociationResult => { const contents = { NewAssociationId : undefined , AssociationState : undefined , } ; if ( output [ "newAssociationId" ] !== undefined ) { contents . NewAssociationId = __expectString ( output [ "newAssociationId" ] ) ; } if ( output [ "associationState" ] !== undefined ) { contents . AssociationState = deserializeAws_ec2RouteTableAssociationState ( output [ "associationState" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ReplaceTransitGatewayRouteResult = ( output , context ) : ReplaceTransitGatewayRouteResult => { const contents = { Route : undefined , } ; if ( output [ "route" ] !== undefined ) { contents . Route = deserializeAws_ec2TransitGatewayRoute ( output [ "route" ] , context ) ; } return contents ; } ; const deserializeAws_ec2RequestSpotFleetResponse = ( output , context ) : RequestSpotFleetResponse => { const contents = { SpotFleetRequestId : undefined , } ; if ( output [ "spotFleetRequestId" ] !== undefined ) { contents . SpotFleetRequestId = __expectString ( output [ "spotFleetRequestId" ] ) ; } return contents ; } ; const deserializeAws_ec2RequestSpotInstancesResult = ( output , context ) : RequestSpotInstancesResult => { const contents = { SpotInstanceRequests : undefined , } ; if ( output . spotInstanceRequestSet === "" ) { contents . SpotInstanceRequests = [ ] ; } if ( output [ "spotInstanceRequestSet" ] !== undefined && output [ "spotInstanceRequestSet" ] [ "item" ] !== undefined ) { contents . SpotInstanceRequests = deserializeAws_ec2SpotInstanceRequestList ( __getArrayIfSingleItem ( output [ "spotInstanceRequestSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2Reservation = ( output , context ) : Reservation => { const contents = { Groups : undefined , Instances : undefined , OwnerId : undefined , RequesterId : undefined , ReservationId : undefined , } ; if ( output . groupSet === "" ) { contents . Groups = [ ] ; } if ( output [ "groupSet" ] !== undefined && output [ "groupSet" ] [ "item" ] !== undefined ) { contents . Groups = deserializeAws_ec2GroupIdentifierList ( __getArrayIfSingleItem ( output [ "groupSet" ] [ "item" ] ) , context ) ; } if ( output . instancesSet === "" ) { contents . Instances = [ ] ; } if ( output [ "instancesSet" ] !== undefined && output [ "instancesSet" ] [ "item" ] !== undefined ) { contents . Instances = deserializeAws_ec2InstanceList ( __getArrayIfSingleItem ( output [ "instancesSet" ] [ "item" ] ) , context ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "requesterId" ] !== undefined ) { contents . RequesterId = __expectString ( output [ "requesterId" ] ) ; } if ( output [ "reservationId" ] !== undefined ) { contents . ReservationId = __expectString ( output [ "reservationId" ] ) ; } return contents ; } ; const deserializeAws_ec2ReservationList = ( output , context ) : Reservation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Reservation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ReservationValue = ( output , context ) : ReservationValue => { const contents = { HourlyPrice : undefined , RemainingTotalValue : undefined , RemainingUpfrontValue : undefined , } ; if ( output [ "hourlyPrice" ] !== undefined ) { contents . HourlyPrice = __expectString ( output [ "hourlyPrice" ] ) ; } if ( output [ "remainingTotalValue" ] !== undefined ) { contents . RemainingTotalValue = __expectString ( output [ "remainingTotalValue" ] ) ; } if ( output [ "remainingUpfrontValue" ] !== undefined ) { contents . RemainingUpfrontValue = __expectString ( output [ "remainingUpfrontValue" ] ) ; } return contents ; } ; const deserializeAws_ec2ReservedInstanceReservationValue = ( output , context ) : ReservedInstanceReservationValue => { const contents = { ReservationValue : undefined , ReservedInstanceId : undefined , } ; if ( output [ "reservationValue" ] !== undefined ) { contents . ReservationValue = deserializeAws_ec2ReservationValue ( output [ "reservationValue" ] , context ) ; } if ( output [ "reservedInstanceId" ] !== undefined ) { contents . ReservedInstanceId = __expectString ( output [ "reservedInstanceId" ] ) ; } return contents ; } ; const deserializeAws_ec2ReservedInstanceReservationValueSet = ( output , context ) : ReservedInstanceReservationValue [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ReservedInstanceReservationValue ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ReservedInstances = ( output , context ) : ReservedInstances => { const contents = { AvailabilityZone : undefined , Duration : undefined , End : undefined , FixedPrice : undefined , InstanceCount : undefined , InstanceType : undefined , ProductDescription : undefined , ReservedInstancesId : undefined , Start : undefined , State : undefined , UsagePrice : undefined , CurrencyCode : undefined , InstanceTenancy : undefined , OfferingClass : undefined , OfferingType : undefined , RecurringCharges : undefined , Scope : undefined , Tags : undefined , } ; if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "duration" ] !== undefined ) { contents . Duration = __strictParseLong ( output [ "duration" ] ) as number ; } if ( output [ "end" ] !== undefined ) { contents . End = __expectNonNull ( __parseRfc3339DateTime ( output [ "end" ] ) ) ; } if ( output [ "fixedPrice" ] !== undefined ) { contents . FixedPrice = __strictParseFloat ( output [ "fixedPrice" ] ) as number ; } if ( output [ "instanceCount" ] !== undefined ) { contents . InstanceCount = __strictParseInt32 ( output [ "instanceCount" ] ) as number ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "productDescription" ] !== undefined ) { contents . ProductDescription = __expectString ( output [ "productDescription" ] ) ; } if ( output [ "reservedInstancesId" ] !== undefined ) { contents . ReservedInstancesId = __expectString ( output [ "reservedInstancesId" ] ) ; } if ( output [ "start" ] !== undefined ) { contents . Start = __expectNonNull ( __parseRfc3339DateTime ( output [ "start" ] ) ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "usagePrice" ] !== undefined ) { contents . UsagePrice = __strictParseFloat ( output [ "usagePrice" ] ) as number ; } if ( output [ "currencyCode" ] !== undefined ) { contents . CurrencyCode = __expectString ( output [ "currencyCode" ] ) ; } if ( output [ "instanceTenancy" ] !== undefined ) { contents . InstanceTenancy = __expectString ( output [ "instanceTenancy" ] ) ; } if ( output [ "offeringClass" ] !== undefined ) { contents . OfferingClass = __expectString ( output [ "offeringClass" ] ) ; } if ( output [ "offeringType" ] !== undefined ) { contents . OfferingType = __expectString ( output [ "offeringType" ] ) ; } if ( output . recurringCharges === "" ) { contents . RecurringCharges = [ ] ; } if ( output [ "recurringCharges" ] !== undefined && output [ "recurringCharges" ] [ "item" ] !== undefined ) { contents . RecurringCharges = deserializeAws_ec2RecurringChargesList ( __getArrayIfSingleItem ( output [ "recurringCharges" ] [ "item" ] ) , context ) ; } if ( output [ "scope" ] !== undefined ) { contents . Scope = __expectString ( output [ "scope" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ReservedInstancesConfiguration = ( output , context ) : ReservedInstancesConfiguration => { const contents = { AvailabilityZone : undefined , InstanceCount : undefined , InstanceType : undefined , Platform : undefined , Scope : undefined , } ; if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "instanceCount" ] !== undefined ) { contents . InstanceCount = __strictParseInt32 ( output [ "instanceCount" ] ) as number ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "platform" ] !== undefined ) { contents . Platform = __expectString ( output [ "platform" ] ) ; } if ( output [ "scope" ] !== undefined ) { contents . Scope = __expectString ( output [ "scope" ] ) ; } return contents ; } ; const deserializeAws_ec2ReservedInstancesId = ( output , context ) : ReservedInstancesId => { const contents = { ReservedInstancesId : undefined , } ; if ( output [ "reservedInstancesId" ] !== undefined ) { contents . ReservedInstancesId = __expectString ( output [ "reservedInstancesId" ] ) ; } return contents ; } ; const deserializeAws_ec2ReservedInstancesList = ( output , context ) : ReservedInstances [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ReservedInstances ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ReservedInstancesListing = ( output , context ) : ReservedInstancesListing => { const contents = { ClientToken : undefined , CreateDate : undefined , InstanceCounts : undefined , PriceSchedules : undefined , ReservedInstancesId : undefined , ReservedInstancesListingId : undefined , Status : undefined , StatusMessage : undefined , Tags : undefined , UpdateDate : undefined , } ; if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } if ( output [ "createDate" ] !== undefined ) { contents . CreateDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "createDate" ] ) ) ; } if ( output . instanceCounts === "" ) { contents . InstanceCounts = [ ] ; } if ( output [ "instanceCounts" ] !== undefined && output [ "instanceCounts" ] [ "item" ] !== undefined ) { contents . InstanceCounts = deserializeAws_ec2InstanceCountList ( __getArrayIfSingleItem ( output [ "instanceCounts" ] [ "item" ] ) , context ) ; } if ( output . priceSchedules === "" ) { contents . PriceSchedules = [ ] ; } if ( output [ "priceSchedules" ] !== undefined && output [ "priceSchedules" ] [ "item" ] !== undefined ) { contents . PriceSchedules = deserializeAws_ec2PriceScheduleList ( __getArrayIfSingleItem ( output [ "priceSchedules" ] [ "item" ] ) , context ) ; } if ( output [ "reservedInstancesId" ] !== undefined ) { contents . ReservedInstancesId = __expectString ( output [ "reservedInstancesId" ] ) ; } if ( output [ "reservedInstancesListingId" ] !== undefined ) { contents . ReservedInstancesListingId = __expectString ( output [ "reservedInstancesListingId" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "updateDate" ] !== undefined ) { contents . UpdateDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "updateDate" ] ) ) ; } return contents ; } ; const deserializeAws_ec2ReservedInstancesListingList = ( output , context ) : ReservedInstancesListing [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ReservedInstancesListing ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ReservedInstancesModification = ( output , context ) : ReservedInstancesModification => { const contents = { ClientToken : undefined , CreateDate : undefined , EffectiveDate : undefined , ModificationResults : undefined , ReservedInstancesIds : undefined , ReservedInstancesModificationId : undefined , Status : undefined , StatusMessage : undefined , UpdateDate : undefined , } ; if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } if ( output [ "createDate" ] !== undefined ) { contents . CreateDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "createDate" ] ) ) ; } if ( output [ "effectiveDate" ] !== undefined ) { contents . EffectiveDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "effectiveDate" ] ) ) ; } if ( output . modificationResultSet === "" ) { contents . ModificationResults = [ ] ; } if ( output [ "modificationResultSet" ] !== undefined && output [ "modificationResultSet" ] [ "item" ] !== undefined ) { contents . ModificationResults = deserializeAws_ec2ReservedInstancesModificationResultList ( __getArrayIfSingleItem ( output [ "modificationResultSet" ] [ "item" ] ) , context ) ; } if ( output . reservedInstancesSet === "" ) { contents . ReservedInstancesIds = [ ] ; } if ( output [ "reservedInstancesSet" ] !== undefined && output [ "reservedInstancesSet" ] [ "item" ] !== undefined ) { contents . ReservedInstancesIds = deserializeAws_ec2ReservedIntancesIds ( __getArrayIfSingleItem ( output [ "reservedInstancesSet" ] [ "item" ] ) , context ) ; } if ( output [ "reservedInstancesModificationId" ] !== undefined ) { contents . ReservedInstancesModificationId = __expectString ( output [ "reservedInstancesModificationId" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output [ "updateDate" ] !== undefined ) { contents . UpdateDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "updateDate" ] ) ) ; } return contents ; } ; const deserializeAws_ec2ReservedInstancesModificationList = ( output , context ) : ReservedInstancesModification [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ReservedInstancesModification ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ReservedInstancesModificationResult = ( output , context ) : ReservedInstancesModificationResult => { const contents = { ReservedInstancesId : undefined , TargetConfiguration : undefined , } ; if ( output [ "reservedInstancesId" ] !== undefined ) { contents . ReservedInstancesId = __expectString ( output [ "reservedInstancesId" ] ) ; } if ( output [ "targetConfiguration" ] !== undefined ) { contents . TargetConfiguration = deserializeAws_ec2ReservedInstancesConfiguration ( output [ "targetConfiguration" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ReservedInstancesModificationResultList = ( output , context ) : ReservedInstancesModificationResult [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ReservedInstancesModificationResult ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ReservedInstancesOffering = ( output , context ) : ReservedInstancesOffering => { const contents = { AvailabilityZone : undefined , Duration : undefined , FixedPrice : undefined , InstanceType : undefined , ProductDescription : undefined , ReservedInstancesOfferingId : undefined , UsagePrice : undefined , CurrencyCode : undefined , InstanceTenancy : undefined , Marketplace : undefined , OfferingClass : undefined , OfferingType : undefined , PricingDetails : undefined , RecurringCharges : undefined , Scope : undefined , } ; if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "duration" ] !== undefined ) { contents . Duration = __strictParseLong ( output [ "duration" ] ) as number ; } if ( output [ "fixedPrice" ] !== undefined ) { contents . FixedPrice = __strictParseFloat ( output [ "fixedPrice" ] ) as number ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "productDescription" ] !== undefined ) { contents . ProductDescription = __expectString ( output [ "productDescription" ] ) ; } if ( output [ "reservedInstancesOfferingId" ] !== undefined ) { contents . ReservedInstancesOfferingId = __expectString ( output [ "reservedInstancesOfferingId" ] ) ; } if ( output [ "usagePrice" ] !== undefined ) { contents . UsagePrice = __strictParseFloat ( output [ "usagePrice" ] ) as number ; } if ( output [ "currencyCode" ] !== undefined ) { contents . CurrencyCode = __expectString ( output [ "currencyCode" ] ) ; } if ( output [ "instanceTenancy" ] !== undefined ) { contents . InstanceTenancy = __expectString ( output [ "instanceTenancy" ] ) ; } if ( output [ "marketplace" ] !== undefined ) { contents . Marketplace = __parseBoolean ( output [ "marketplace" ] ) ; } if ( output [ "offeringClass" ] !== undefined ) { contents . OfferingClass = __expectString ( output [ "offeringClass" ] ) ; } if ( output [ "offeringType" ] !== undefined ) { contents . OfferingType = __expectString ( output [ "offeringType" ] ) ; } if ( output . pricingDetailsSet === "" ) { contents . PricingDetails = [ ] ; } if ( output [ "pricingDetailsSet" ] !== undefined && output [ "pricingDetailsSet" ] [ "item" ] !== undefined ) { contents . PricingDetails = deserializeAws_ec2PricingDetailsList ( __getArrayIfSingleItem ( output [ "pricingDetailsSet" ] [ "item" ] ) , context ) ; } if ( output . recurringCharges === "" ) { contents . RecurringCharges = [ ] ; } if ( output [ "recurringCharges" ] !== undefined && output [ "recurringCharges" ] [ "item" ] !== undefined ) { contents . RecurringCharges = deserializeAws_ec2RecurringChargesList ( __getArrayIfSingleItem ( output [ "recurringCharges" ] [ "item" ] ) , context ) ; } if ( output [ "scope" ] !== undefined ) { contents . Scope = __expectString ( output [ "scope" ] ) ; } return contents ; } ; const deserializeAws_ec2ReservedInstancesOfferingList = ( output , context ) : ReservedInstancesOffering [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ReservedInstancesOffering ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ReservedIntancesIds = ( output , context ) : ReservedInstancesId [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ReservedInstancesId ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ResetAddressAttributeResult = ( output , context ) : ResetAddressAttributeResult => { const contents = { Address : undefined , } ; if ( output [ "address" ] !== undefined ) { contents . Address = deserializeAws_ec2AddressAttribute ( output [ "address" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ResetEbsDefaultKmsKeyIdResult = ( output , context ) : ResetEbsDefaultKmsKeyIdResult => { const contents = { KmsKeyId : undefined , } ; if ( output [ "kmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "kmsKeyId" ] ) ; } return contents ; } ; const deserializeAws_ec2ResetFpgaImageAttributeResult = ( output , context ) : ResetFpgaImageAttributeResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2ResourceStatement = ( output , context ) : ResourceStatement => { const contents = { Resources : undefined , ResourceTypes : undefined , } ; if ( output . resourceSet === "" ) { contents . Resources = [ ] ; } if ( output [ "resourceSet" ] !== undefined && output [ "resourceSet" ] [ "item" ] !== undefined ) { contents . Resources = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "resourceSet" ] [ "item" ] ) , context ) ; } if ( output . resourceTypeSet === "" ) { contents . ResourceTypes = [ ] ; } if ( output [ "resourceTypeSet" ] !== undefined && output [ "resourceTypeSet" ] [ "item" ] !== undefined ) { contents . ResourceTypes = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "resourceTypeSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ResponseError = ( output , context ) : ResponseError => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2ResponseHostIdList = ( 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_ec2ResponseHostIdSet = ( 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_ec2ResponseLaunchTemplateData = ( output , context ) : ResponseLaunchTemplateData => { const contents = { KernelId : undefined , EbsOptimized : undefined , IamInstanceProfile : undefined , BlockDeviceMappings : undefined , NetworkInterfaces : undefined , ImageId : undefined , InstanceType : undefined , KeyName : undefined , Monitoring : undefined , Placement : undefined , RamDiskId : undefined , DisableApiTermination : undefined , InstanceInitiatedShutdownBehavior : undefined , UserData : undefined , TagSpecifications : undefined , ElasticGpuSpecifications : undefined , ElasticInferenceAccelerators : undefined , SecurityGroupIds : undefined , SecurityGroups : undefined , InstanceMarketOptions : undefined , CreditSpecification : undefined , CpuOptions : undefined , CapacityReservationSpecification : undefined , LicenseSpecifications : undefined , HibernationOptions : undefined , MetadataOptions : undefined , EnclaveOptions : undefined , InstanceRequirements : undefined , PrivateDnsNameOptions : undefined , } ; if ( output [ "kernelId" ] !== undefined ) { contents . KernelId = __expectString ( output [ "kernelId" ] ) ; } if ( output [ "ebsOptimized" ] !== undefined ) { contents . EbsOptimized = __parseBoolean ( output [ "ebsOptimized" ] ) ; } if ( output [ "iamInstanceProfile" ] !== undefined ) { contents . IamInstanceProfile = deserializeAws_ec2LaunchTemplateIamInstanceProfileSpecification ( output [ "iamInstanceProfile" ] , context ) ; } if ( output . blockDeviceMappingSet === "" ) { contents . BlockDeviceMappings = [ ] ; } if ( output [ "blockDeviceMappingSet" ] !== undefined && output [ "blockDeviceMappingSet" ] [ "item" ] !== undefined ) { contents . BlockDeviceMappings = deserializeAws_ec2LaunchTemplateBlockDeviceMappingList ( __getArrayIfSingleItem ( output [ "blockDeviceMappingSet" ] [ "item" ] ) , context ) ; } if ( output . networkInterfaceSet === "" ) { contents . NetworkInterfaces = [ ] ; } if ( output [ "networkInterfaceSet" ] !== undefined && output [ "networkInterfaceSet" ] [ "item" ] !== undefined ) { contents . NetworkInterfaces = deserializeAws_ec2LaunchTemplateInstanceNetworkInterfaceSpecificationList ( __getArrayIfSingleItem ( output [ "networkInterfaceSet" ] [ "item" ] ) , context ) ; } if ( output [ "imageId" ] !== undefined ) { contents . ImageId = __expectString ( output [ "imageId" ] ) ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "keyName" ] !== undefined ) { contents . KeyName = __expectString ( output [ "keyName" ] ) ; } if ( output [ "monitoring" ] !== undefined ) { contents . Monitoring = deserializeAws_ec2LaunchTemplatesMonitoring ( output [ "monitoring" ] , context ) ; } if ( output [ "placement" ] !== undefined ) { contents . Placement = deserializeAws_ec2LaunchTemplatePlacement ( output [ "placement" ] , context ) ; } if ( output [ "ramDiskId" ] !== undefined ) { contents . RamDiskId = __expectString ( output [ "ramDiskId" ] ) ; } if ( output [ "disableApiTermination" ] !== undefined ) { contents . DisableApiTermination = __parseBoolean ( output [ "disableApiTermination" ] ) ; } if ( output [ "instanceInitiatedShutdownBehavior" ] !== undefined ) { contents . InstanceInitiatedShutdownBehavior = __expectString ( output [ "instanceInitiatedShutdownBehavior" ] ) ; } if ( output [ "userData" ] !== undefined ) { contents . UserData = __expectString ( output [ "userData" ] ) ; } if ( output . tagSpecificationSet === "" ) { contents . TagSpecifications = [ ] ; } if ( output [ "tagSpecificationSet" ] !== undefined && output [ "tagSpecificationSet" ] [ "item" ] !== undefined ) { contents . TagSpecifications = deserializeAws_ec2LaunchTemplateTagSpecificationList ( __getArrayIfSingleItem ( output [ "tagSpecificationSet" ] [ "item" ] ) , context ) ; } if ( output . elasticGpuSpecificationSet === "" ) { contents . ElasticGpuSpecifications = [ ] ; } if ( output [ "elasticGpuSpecificationSet" ] !== undefined && output [ "elasticGpuSpecificationSet" ] [ "item" ] !== undefined ) { contents . ElasticGpuSpecifications = deserializeAws_ec2ElasticGpuSpecificationResponseList ( __getArrayIfSingleItem ( output [ "elasticGpuSpecificationSet" ] [ "item" ] ) , context ) ; } if ( output . elasticInferenceAcceleratorSet === "" ) { contents . ElasticInferenceAccelerators = [ ] ; } if ( output [ "elasticInferenceAcceleratorSet" ] !== undefined && output [ "elasticInferenceAcceleratorSet" ] [ "item" ] !== undefined ) { contents . ElasticInferenceAccelerators = deserializeAws_ec2LaunchTemplateElasticInferenceAcceleratorResponseList ( __getArrayIfSingleItem ( output [ "elasticInferenceAcceleratorSet" ] [ "item" ] ) , context ) ; } if ( output . securityGroupIdSet === "" ) { contents . SecurityGroupIds = [ ] ; } if ( output [ "securityGroupIdSet" ] !== undefined && output [ "securityGroupIdSet" ] [ "item" ] !== undefined ) { contents . SecurityGroupIds = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "securityGroupIdSet" ] [ "item" ] ) , context ) ; } if ( output . securityGroupSet === "" ) { contents . SecurityGroups = [ ] ; } if ( output [ "securityGroupSet" ] !== undefined && output [ "securityGroupSet" ] [ "item" ] !== undefined ) { contents . SecurityGroups = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "securityGroupSet" ] [ "item" ] ) , context ) ; } if ( output [ "instanceMarketOptions" ] !== undefined ) { contents . InstanceMarketOptions = deserializeAws_ec2LaunchTemplateInstanceMarketOptions ( output [ "instanceMarketOptions" ] , context ) ; } if ( output [ "creditSpecification" ] !== undefined ) { contents . CreditSpecification = deserializeAws_ec2CreditSpecification ( output [ "creditSpecification" ] , context ) ; } if ( output [ "cpuOptions" ] !== undefined ) { contents . CpuOptions = deserializeAws_ec2LaunchTemplateCpuOptions ( output [ "cpuOptions" ] , context ) ; } if ( output [ "capacityReservationSpecification" ] !== undefined ) { contents . CapacityReservationSpecification = deserializeAws_ec2LaunchTemplateCapacityReservationSpecificationResponse ( output [ "capacityReservationSpecification" ] , context ) ; } if ( output . licenseSet === "" ) { contents . LicenseSpecifications = [ ] ; } if ( output [ "licenseSet" ] !== undefined && output [ "licenseSet" ] [ "item" ] !== undefined ) { contents . LicenseSpecifications = deserializeAws_ec2LaunchTemplateLicenseList ( __getArrayIfSingleItem ( output [ "licenseSet" ] [ "item" ] ) , context ) ; } if ( output [ "hibernationOptions" ] !== undefined ) { contents . HibernationOptions = deserializeAws_ec2LaunchTemplateHibernationOptions ( output [ "hibernationOptions" ] , context ) ; } if ( output [ "metadataOptions" ] !== undefined ) { contents . MetadataOptions = deserializeAws_ec2LaunchTemplateInstanceMetadataOptions ( output [ "metadataOptions" ] , context ) ; } if ( output [ "enclaveOptions" ] !== undefined ) { contents . EnclaveOptions = deserializeAws_ec2LaunchTemplateEnclaveOptions ( output [ "enclaveOptions" ] , context ) ; } if ( output [ "instanceRequirements" ] !== undefined ) { contents . InstanceRequirements = deserializeAws_ec2InstanceRequirements ( output [ "instanceRequirements" ] , context ) ; } if ( output [ "privateDnsNameOptions" ] !== undefined ) { contents . PrivateDnsNameOptions = deserializeAws_ec2LaunchTemplatePrivateDnsNameOptions ( output [ "privateDnsNameOptions" ] , context ) ; } return contents ; } ; const deserializeAws_ec2RestoreAddressToClassicResult = ( output , context ) : RestoreAddressToClassicResult => { const contents = { PublicIp : undefined , Status : undefined , } ; if ( output [ "publicIp" ] !== undefined ) { contents . PublicIp = __expectString ( output [ "publicIp" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } return contents ; } ; const deserializeAws_ec2RestoreManagedPrefixListVersionResult = ( output , context ) : RestoreManagedPrefixListVersionResult => { const contents = { PrefixList : undefined , } ; if ( output [ "prefixList" ] !== undefined ) { contents . PrefixList = deserializeAws_ec2ManagedPrefixList ( output [ "prefixList" ] , context ) ; } return contents ; } ; const deserializeAws_ec2RestoreSnapshotFromRecycleBinResult = ( output , context ) : RestoreSnapshotFromRecycleBinResult => { const contents = { SnapshotId : undefined , OutpostArn : undefined , Description : undefined , Encrypted : undefined , OwnerId : undefined , Progress : undefined , StartTime : undefined , State : undefined , VolumeId : undefined , VolumeSize : undefined , } ; if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output [ "outpostArn" ] !== undefined ) { contents . OutpostArn = __expectString ( output [ "outpostArn" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "encrypted" ] !== undefined ) { contents . Encrypted = __parseBoolean ( output [ "encrypted" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "progress" ] !== undefined ) { contents . Progress = __expectString ( output [ "progress" ] ) ; } if ( output [ "startTime" ] !== undefined ) { contents . StartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "startTime" ] ) ) ; } if ( output [ "status" ] !== undefined ) { contents . State = __expectString ( output [ "status" ] ) ; } if ( output [ "volumeId" ] !== undefined ) { contents . VolumeId = __expectString ( output [ "volumeId" ] ) ; } if ( output [ "volumeSize" ] !== undefined ) { contents . VolumeSize = __strictParseInt32 ( output [ "volumeSize" ] ) as number ; } return contents ; } ; const deserializeAws_ec2RestoreSnapshotTierResult = ( output , context ) : RestoreSnapshotTierResult => { const contents = { SnapshotId : undefined , RestoreStartTime : undefined , RestoreDuration : undefined , IsPermanentRestore : undefined , } ; if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output [ "restoreStartTime" ] !== undefined ) { contents . RestoreStartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "restoreStartTime" ] ) ) ; } if ( output [ "restoreDuration" ] !== undefined ) { contents . RestoreDuration = __strictParseInt32 ( output [ "restoreDuration" ] ) as number ; } if ( output [ "isPermanentRestore" ] !== undefined ) { contents . IsPermanentRestore = __parseBoolean ( output [ "isPermanentRestore" ] ) ; } return contents ; } ; const deserializeAws_ec2RevokeClientVpnIngressResult = ( output , context ) : RevokeClientVpnIngressResult => { const contents = { Status : undefined , } ; if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2ClientVpnAuthorizationRuleStatus ( output [ "status" ] , context ) ; } return contents ; } ; const deserializeAws_ec2RevokeSecurityGroupEgressResult = ( output , context ) : RevokeSecurityGroupEgressResult => { const contents = { Return : undefined , UnknownIpPermissions : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } if ( output . unknownIpPermissionSet === "" ) { contents . UnknownIpPermissions = [ ] ; } if ( output [ "unknownIpPermissionSet" ] !== undefined && output [ "unknownIpPermissionSet" ] [ "item" ] !== undefined ) { contents . UnknownIpPermissions = deserializeAws_ec2IpPermissionList ( __getArrayIfSingleItem ( output [ "unknownIpPermissionSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2RevokeSecurityGroupIngressResult = ( output , context ) : RevokeSecurityGroupIngressResult => { const contents = { Return : undefined , UnknownIpPermissions : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } if ( output . unknownIpPermissionSet === "" ) { contents . UnknownIpPermissions = [ ] ; } if ( output [ "unknownIpPermissionSet" ] !== undefined && output [ "unknownIpPermissionSet" ] [ "item" ] !== undefined ) { contents . UnknownIpPermissions = deserializeAws_ec2IpPermissionList ( __getArrayIfSingleItem ( output [ "unknownIpPermissionSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2RootDeviceTypeList = ( output , context ) : ( RootDeviceType | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_ec2Route = ( output , context ) : Route => { const contents = { DestinationCidrBlock : undefined , DestinationIpv6CidrBlock : undefined , DestinationPrefixListId : undefined , EgressOnlyInternetGatewayId : undefined , GatewayId : undefined , InstanceId : undefined , InstanceOwnerId : undefined , NatGatewayId : undefined , TransitGatewayId : undefined , LocalGatewayId : undefined , CarrierGatewayId : undefined , NetworkInterfaceId : undefined , Origin : undefined , State : undefined , VpcPeeringConnectionId : undefined , CoreNetworkArn : undefined , } ; if ( output [ "destinationCidrBlock" ] !== undefined ) { contents . DestinationCidrBlock = __expectString ( output [ "destinationCidrBlock" ] ) ; } if ( output [ "destinationIpv6CidrBlock" ] !== undefined ) { contents . DestinationIpv6CidrBlock = __expectString ( output [ "destinationIpv6CidrBlock" ] ) ; } if ( output [ "destinationPrefixListId" ] !== undefined ) { contents . DestinationPrefixListId = __expectString ( output [ "destinationPrefixListId" ] ) ; } if ( output [ "egressOnlyInternetGatewayId" ] !== undefined ) { contents . EgressOnlyInternetGatewayId = __expectString ( output [ "egressOnlyInternetGatewayId" ] ) ; } if ( output [ "gatewayId" ] !== undefined ) { contents . GatewayId = __expectString ( output [ "gatewayId" ] ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "instanceOwnerId" ] !== undefined ) { contents . InstanceOwnerId = __expectString ( output [ "instanceOwnerId" ] ) ; } if ( output [ "natGatewayId" ] !== undefined ) { contents . NatGatewayId = __expectString ( output [ "natGatewayId" ] ) ; } if ( output [ "transitGatewayId" ] !== undefined ) { contents . TransitGatewayId = __expectString ( output [ "transitGatewayId" ] ) ; } if ( output [ "localGatewayId" ] !== undefined ) { contents . LocalGatewayId = __expectString ( output [ "localGatewayId" ] ) ; } if ( output [ "carrierGatewayId" ] !== undefined ) { contents . CarrierGatewayId = __expectString ( output [ "carrierGatewayId" ] ) ; } if ( output [ "networkInterfaceId" ] !== undefined ) { contents . NetworkInterfaceId = __expectString ( output [ "networkInterfaceId" ] ) ; } if ( output [ "origin" ] !== undefined ) { contents . Origin = __expectString ( output [ "origin" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "vpcPeeringConnectionId" ] !== undefined ) { contents . VpcPeeringConnectionId = __expectString ( output [ "vpcPeeringConnectionId" ] ) ; } if ( output [ "coreNetworkArn" ] !== undefined ) { contents . CoreNetworkArn = __expectString ( output [ "coreNetworkArn" ] ) ; } return contents ; } ; const deserializeAws_ec2RouteList = ( output , context ) : Route [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Route ( entry , context ) ; } ) ; } ; const deserializeAws_ec2RouteTable = ( output , context ) : RouteTable => { const contents = { Associations : undefined , PropagatingVgws : undefined , RouteTableId : undefined , Routes : undefined , Tags : undefined , VpcId : undefined , OwnerId : undefined , } ; if ( output . associationSet === "" ) { contents . Associations = [ ] ; } if ( output [ "associationSet" ] !== undefined && output [ "associationSet" ] [ "item" ] !== undefined ) { contents . Associations = deserializeAws_ec2RouteTableAssociationList ( __getArrayIfSingleItem ( output [ "associationSet" ] [ "item" ] ) , context ) ; } if ( output . propagatingVgwSet === "" ) { contents . PropagatingVgws = [ ] ; } if ( output [ "propagatingVgwSet" ] !== undefined && output [ "propagatingVgwSet" ] [ "item" ] !== undefined ) { contents . PropagatingVgws = deserializeAws_ec2PropagatingVgwList ( __getArrayIfSingleItem ( output [ "propagatingVgwSet" ] [ "item" ] ) , context ) ; } if ( output [ "routeTableId" ] !== undefined ) { contents . RouteTableId = __expectString ( output [ "routeTableId" ] ) ; } if ( output . routeSet === "" ) { contents . Routes = [ ] ; } if ( output [ "routeSet" ] !== undefined && output [ "routeSet" ] [ "item" ] !== undefined ) { contents . Routes = deserializeAws_ec2RouteList ( __getArrayIfSingleItem ( output [ "routeSet" ] [ "item" ] ) , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } return contents ; } ; const deserializeAws_ec2RouteTableAssociation = ( output , context ) : RouteTableAssociation => { const contents = { Main : undefined , RouteTableAssociationId : undefined , RouteTableId : undefined , SubnetId : undefined , GatewayId : undefined , AssociationState : undefined , } ; if ( output [ "main" ] !== undefined ) { contents . Main = __parseBoolean ( output [ "main" ] ) ; } if ( output [ "routeTableAssociationId" ] !== undefined ) { contents . RouteTableAssociationId = __expectString ( output [ "routeTableAssociationId" ] ) ; } if ( output [ "routeTableId" ] !== undefined ) { contents . RouteTableId = __expectString ( output [ "routeTableId" ] ) ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } if ( output [ "gatewayId" ] !== undefined ) { contents . GatewayId = __expectString ( output [ "gatewayId" ] ) ; } if ( output [ "associationState" ] !== undefined ) { contents . AssociationState = deserializeAws_ec2RouteTableAssociationState ( output [ "associationState" ] , context ) ; } return contents ; } ; const deserializeAws_ec2RouteTableAssociationList = ( output , context ) : RouteTableAssociation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2RouteTableAssociation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2RouteTableAssociationState = ( output , context ) : RouteTableAssociationState => { const contents = { State : undefined , StatusMessage : undefined , } ; if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } return contents ; } ; const deserializeAws_ec2RouteTableList = ( output , context ) : RouteTable [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2RouteTable ( entry , context ) ; } ) ; } ; const deserializeAws_ec2RunInstancesMonitoringEnabled = ( output , context ) : RunInstancesMonitoringEnabled => { const contents = { Enabled : undefined , } ; if ( output [ "enabled" ] !== undefined ) { contents . Enabled = __parseBoolean ( output [ "enabled" ] ) ; } return contents ; } ; const deserializeAws_ec2RunScheduledInstancesResult = ( output , context ) : RunScheduledInstancesResult => { const contents = { InstanceIdSet : undefined , } ; if ( output . instanceIdSet === "" ) { contents . InstanceIdSet = [ ] ; } if ( output [ "instanceIdSet" ] !== undefined && output [ "instanceIdSet" ] [ "item" ] !== undefined ) { contents . InstanceIdSet = deserializeAws_ec2InstanceIdSet ( __getArrayIfSingleItem ( output [ "instanceIdSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2S3Storage = ( output , context ) : S3Storage => { const contents = { AWSAccessKeyId : undefined , Bucket : undefined , Prefix : undefined , UploadPolicy : undefined , UploadPolicySignature : undefined , } ; if ( output [ "AWSAccessKeyId" ] !== undefined ) { contents . AWSAccessKeyId = __expectString ( output [ "AWSAccessKeyId" ] ) ; } if ( output [ "bucket" ] !== undefined ) { contents . Bucket = __expectString ( output [ "bucket" ] ) ; } if ( output [ "prefix" ] !== undefined ) { contents . Prefix = __expectString ( output [ "prefix" ] ) ; } if ( output [ "uploadPolicy" ] !== undefined ) { contents . UploadPolicy = context . base64Decoder ( output [ "uploadPolicy" ] ) ; } if ( output [ "uploadPolicySignature" ] !== undefined ) { contents . UploadPolicySignature = __expectString ( output [ "uploadPolicySignature" ] ) ; } return contents ; } ; const deserializeAws_ec2ScheduledInstance = ( output , context ) : ScheduledInstance => { const contents = { AvailabilityZone : undefined , CreateDate : undefined , HourlyPrice : undefined , InstanceCount : undefined , InstanceType : undefined , NetworkPlatform : undefined , NextSlotStartTime : undefined , Platform : undefined , PreviousSlotEndTime : undefined , Recurrence : undefined , ScheduledInstanceId : undefined , SlotDurationInHours : undefined , TermEndDate : undefined , TermStartDate : undefined , TotalScheduledInstanceHours : undefined , } ; if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "createDate" ] !== undefined ) { contents . CreateDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "createDate" ] ) ) ; } if ( output [ "hourlyPrice" ] !== undefined ) { contents . HourlyPrice = __expectString ( output [ "hourlyPrice" ] ) ; } if ( output [ "instanceCount" ] !== undefined ) { contents . InstanceCount = __strictParseInt32 ( output [ "instanceCount" ] ) as number ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "networkPlatform" ] !== undefined ) { contents . NetworkPlatform = __expectString ( output [ "networkPlatform" ] ) ; } if ( output [ "nextSlotStartTime" ] !== undefined ) { contents . NextSlotStartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "nextSlotStartTime" ] ) ) ; } if ( output [ "platform" ] !== undefined ) { contents . Platform = __expectString ( output [ "platform" ] ) ; } if ( output [ "previousSlotEndTime" ] !== undefined ) { contents . PreviousSlotEndTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "previousSlotEndTime" ] ) ) ; } if ( output [ "recurrence" ] !== undefined ) { contents . Recurrence = deserializeAws_ec2ScheduledInstanceRecurrence ( output [ "recurrence" ] , context ) ; } if ( output [ "scheduledInstanceId" ] !== undefined ) { contents . ScheduledInstanceId = __expectString ( output [ "scheduledInstanceId" ] ) ; } if ( output [ "slotDurationInHours" ] !== undefined ) { contents . SlotDurationInHours = __strictParseInt32 ( output [ "slotDurationInHours" ] ) as number ; } if ( output [ "termEndDate" ] !== undefined ) { contents . TermEndDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "termEndDate" ] ) ) ; } if ( output [ "termStartDate" ] !== undefined ) { contents . TermStartDate = __expectNonNull ( __parseRfc3339DateTime ( output [ "termStartDate" ] ) ) ; } if ( output [ "totalScheduledInstanceHours" ] !== undefined ) { contents . TotalScheduledInstanceHours = __strictParseInt32 ( output [ "totalScheduledInstanceHours" ] ) as number ; } return contents ; } ; const deserializeAws_ec2ScheduledInstanceAvailability = ( output , context ) : ScheduledInstanceAvailability => { const contents = { AvailabilityZone : undefined , AvailableInstanceCount : undefined , FirstSlotStartTime : undefined , HourlyPrice : undefined , InstanceType : undefined , MaxTermDurationInDays : undefined , MinTermDurationInDays : undefined , NetworkPlatform : undefined , Platform : undefined , PurchaseToken : undefined , Recurrence : undefined , SlotDurationInHours : undefined , TotalScheduledInstanceHours : undefined , } ; if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "availableInstanceCount" ] !== undefined ) { contents . AvailableInstanceCount = __strictParseInt32 ( output [ "availableInstanceCount" ] ) as number ; } if ( output [ "firstSlotStartTime" ] !== undefined ) { contents . FirstSlotStartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "firstSlotStartTime" ] ) ) ; } if ( output [ "hourlyPrice" ] !== undefined ) { contents . HourlyPrice = __expectString ( output [ "hourlyPrice" ] ) ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "maxTermDurationInDays" ] !== undefined ) { contents . MaxTermDurationInDays = __strictParseInt32 ( output [ "maxTermDurationInDays" ] ) as number ; } if ( output [ "minTermDurationInDays" ] !== undefined ) { contents . MinTermDurationInDays = __strictParseInt32 ( output [ "minTermDurationInDays" ] ) as number ; } if ( output [ "networkPlatform" ] !== undefined ) { contents . NetworkPlatform = __expectString ( output [ "networkPlatform" ] ) ; } if ( output [ "platform" ] !== undefined ) { contents . Platform = __expectString ( output [ "platform" ] ) ; } if ( output [ "purchaseToken" ] !== undefined ) { contents . PurchaseToken = __expectString ( output [ "purchaseToken" ] ) ; } if ( output [ "recurrence" ] !== undefined ) { contents . Recurrence = deserializeAws_ec2ScheduledInstanceRecurrence ( output [ "recurrence" ] , context ) ; } if ( output [ "slotDurationInHours" ] !== undefined ) { contents . SlotDurationInHours = __strictParseInt32 ( output [ "slotDurationInHours" ] ) as number ; } if ( output [ "totalScheduledInstanceHours" ] !== undefined ) { contents . TotalScheduledInstanceHours = __strictParseInt32 ( output [ "totalScheduledInstanceHours" ] ) as number ; } return contents ; } ; const deserializeAws_ec2ScheduledInstanceAvailabilitySet = ( output , context ) : ScheduledInstanceAvailability [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ScheduledInstanceAvailability ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ScheduledInstanceRecurrence = ( output , context ) : ScheduledInstanceRecurrence => { const contents = { Frequency : undefined , Interval : undefined , OccurrenceDaySet : undefined , OccurrenceRelativeToEnd : undefined , OccurrenceUnit : undefined , } ; if ( output [ "frequency" ] !== undefined ) { contents . Frequency = __expectString ( output [ "frequency" ] ) ; } if ( output [ "interval" ] !== undefined ) { contents . Interval = __strictParseInt32 ( output [ "interval" ] ) as number ; } if ( output . occurrenceDaySet === "" ) { contents . OccurrenceDaySet = [ ] ; } if ( output [ "occurrenceDaySet" ] !== undefined && output [ "occurrenceDaySet" ] [ "item" ] !== undefined ) { contents . OccurrenceDaySet = deserializeAws_ec2OccurrenceDaySet ( __getArrayIfSingleItem ( output [ "occurrenceDaySet" ] [ "item" ] ) , context ) ; } if ( output [ "occurrenceRelativeToEnd" ] !== undefined ) { contents . OccurrenceRelativeToEnd = __parseBoolean ( output [ "occurrenceRelativeToEnd" ] ) ; } if ( output [ "occurrenceUnit" ] !== undefined ) { contents . OccurrenceUnit = __expectString ( output [ "occurrenceUnit" ] ) ; } return contents ; } ; const deserializeAws_ec2ScheduledInstanceSet = ( output , context ) : ScheduledInstance [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ScheduledInstance ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SearchLocalGatewayRoutesResult = ( output , context ) : SearchLocalGatewayRoutesResult => { const contents = { Routes : undefined , NextToken : undefined , } ; if ( output . routeSet === "" ) { contents . Routes = [ ] ; } if ( output [ "routeSet" ] !== undefined && output [ "routeSet" ] [ "item" ] !== undefined ) { contents . Routes = deserializeAws_ec2LocalGatewayRouteList ( __getArrayIfSingleItem ( output [ "routeSet" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2SearchTransitGatewayMulticastGroupsResult = ( output , context ) : SearchTransitGatewayMulticastGroupsResult => { const contents = { MulticastGroups : undefined , NextToken : undefined , } ; if ( output . multicastGroups === "" ) { contents . MulticastGroups = [ ] ; } if ( output [ "multicastGroups" ] !== undefined && output [ "multicastGroups" ] [ "item" ] !== undefined ) { contents . MulticastGroups = deserializeAws_ec2TransitGatewayMulticastGroupList ( __getArrayIfSingleItem ( output [ "multicastGroups" ] [ "item" ] ) , context ) ; } if ( output [ "nextToken" ] !== undefined ) { contents . NextToken = __expectString ( output [ "nextToken" ] ) ; } return contents ; } ; const deserializeAws_ec2SearchTransitGatewayRoutesResult = ( output , context ) : SearchTransitGatewayRoutesResult => { const contents = { Routes : undefined , AdditionalRoutesAvailable : undefined , } ; if ( output . routeSet === "" ) { contents . Routes = [ ] ; } if ( output [ "routeSet" ] !== undefined && output [ "routeSet" ] [ "item" ] !== undefined ) { contents . Routes = deserializeAws_ec2TransitGatewayRouteList ( __getArrayIfSingleItem ( output [ "routeSet" ] [ "item" ] ) , context ) ; } if ( output [ "additionalRoutesAvailable" ] !== undefined ) { contents . AdditionalRoutesAvailable = __parseBoolean ( output [ "additionalRoutesAvailable" ] ) ; } return contents ; } ; const deserializeAws_ec2SecurityGroup = ( output , context ) : SecurityGroup => { const contents = { Description : undefined , GroupName : undefined , IpPermissions : undefined , OwnerId : undefined , GroupId : undefined , IpPermissionsEgress : undefined , Tags : undefined , VpcId : undefined , } ; if ( output [ "groupDescription" ] !== undefined ) { contents . Description = __expectString ( output [ "groupDescription" ] ) ; } if ( output [ "groupName" ] !== undefined ) { contents . GroupName = __expectString ( output [ "groupName" ] ) ; } if ( output . ipPermissions === "" ) { contents . IpPermissions = [ ] ; } if ( output [ "ipPermissions" ] !== undefined && output [ "ipPermissions" ] [ "item" ] !== undefined ) { contents . IpPermissions = deserializeAws_ec2IpPermissionList ( __getArrayIfSingleItem ( output [ "ipPermissions" ] [ "item" ] ) , context ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "groupId" ] !== undefined ) { contents . GroupId = __expectString ( output [ "groupId" ] ) ; } if ( output . ipPermissionsEgress === "" ) { contents . IpPermissionsEgress = [ ] ; } if ( output [ "ipPermissionsEgress" ] !== undefined && output [ "ipPermissionsEgress" ] [ "item" ] !== undefined ) { contents . IpPermissionsEgress = deserializeAws_ec2IpPermissionList ( __getArrayIfSingleItem ( output [ "ipPermissionsEgress" ] [ "item" ] ) , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } return contents ; } ; const deserializeAws_ec2SecurityGroupIdentifier = ( output , context ) : SecurityGroupIdentifier => { const contents = { GroupId : undefined , GroupName : undefined , } ; if ( output [ "groupId" ] !== undefined ) { contents . GroupId = __expectString ( output [ "groupId" ] ) ; } if ( output [ "groupName" ] !== undefined ) { contents . GroupName = __expectString ( output [ "groupName" ] ) ; } return contents ; } ; const deserializeAws_ec2SecurityGroupIdStringList = ( 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_ec2SecurityGroupList = ( output , context ) : SecurityGroup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SecurityGroup ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SecurityGroupReference = ( output , context ) : SecurityGroupReference => { const contents = { GroupId : undefined , ReferencingVpcId : undefined , VpcPeeringConnectionId : undefined , } ; if ( output [ "groupId" ] !== undefined ) { contents . GroupId = __expectString ( output [ "groupId" ] ) ; } if ( output [ "referencingVpcId" ] !== undefined ) { contents . ReferencingVpcId = __expectString ( output [ "referencingVpcId" ] ) ; } if ( output [ "vpcPeeringConnectionId" ] !== undefined ) { contents . VpcPeeringConnectionId = __expectString ( output [ "vpcPeeringConnectionId" ] ) ; } return contents ; } ; const deserializeAws_ec2SecurityGroupReferences = ( output , context ) : SecurityGroupReference [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SecurityGroupReference ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SecurityGroupRule = ( output , context ) : SecurityGroupRule => { const contents = { SecurityGroupRuleId : undefined , GroupId : undefined , GroupOwnerId : undefined , IsEgress : undefined , IpProtocol : undefined , FromPort : undefined , ToPort : undefined , CidrIpv4 : undefined , CidrIpv6 : undefined , PrefixListId : undefined , ReferencedGroupInfo : undefined , Description : undefined , Tags : undefined , } ; if ( output [ "securityGroupRuleId" ] !== undefined ) { contents . SecurityGroupRuleId = __expectString ( output [ "securityGroupRuleId" ] ) ; } if ( output [ "groupId" ] !== undefined ) { contents . GroupId = __expectString ( output [ "groupId" ] ) ; } if ( output [ "groupOwnerId" ] !== undefined ) { contents . GroupOwnerId = __expectString ( output [ "groupOwnerId" ] ) ; } if ( output [ "isEgress" ] !== undefined ) { contents . IsEgress = __parseBoolean ( output [ "isEgress" ] ) ; } if ( output [ "ipProtocol" ] !== undefined ) { contents . IpProtocol = __expectString ( output [ "ipProtocol" ] ) ; } if ( output [ "fromPort" ] !== undefined ) { contents . FromPort = __strictParseInt32 ( output [ "fromPort" ] ) as number ; } if ( output [ "toPort" ] !== undefined ) { contents . ToPort = __strictParseInt32 ( output [ "toPort" ] ) as number ; } if ( output [ "cidrIpv4" ] !== undefined ) { contents . CidrIpv4 = __expectString ( output [ "cidrIpv4" ] ) ; } if ( output [ "cidrIpv6" ] !== undefined ) { contents . CidrIpv6 = __expectString ( output [ "cidrIpv6" ] ) ; } if ( output [ "prefixListId" ] !== undefined ) { contents . PrefixListId = __expectString ( output [ "prefixListId" ] ) ; } if ( output [ "referencedGroupInfo" ] !== undefined ) { contents . ReferencedGroupInfo = deserializeAws_ec2ReferencedSecurityGroup ( output [ "referencedGroupInfo" ] , context ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2SecurityGroupRuleList = ( output , context ) : SecurityGroupRule [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SecurityGroupRule ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ServiceConfiguration = ( output , context ) : ServiceConfiguration => { const contents = { ServiceType : undefined , ServiceId : undefined , ServiceName : undefined , ServiceState : undefined , AvailabilityZones : undefined , AcceptanceRequired : undefined , ManagesVpcEndpoints : undefined , NetworkLoadBalancerArns : undefined , GatewayLoadBalancerArns : undefined , BaseEndpointDnsNames : undefined , PrivateDnsName : undefined , PrivateDnsNameConfiguration : undefined , PayerResponsibility : undefined , Tags : undefined , } ; if ( output . serviceType === "" ) { contents . ServiceType = [ ] ; } if ( output [ "serviceType" ] !== undefined && output [ "serviceType" ] [ "item" ] !== undefined ) { contents . ServiceType = deserializeAws_ec2ServiceTypeDetailSet ( __getArrayIfSingleItem ( output [ "serviceType" ] [ "item" ] ) , context ) ; } if ( output [ "serviceId" ] !== undefined ) { contents . ServiceId = __expectString ( output [ "serviceId" ] ) ; } if ( output [ "serviceName" ] !== undefined ) { contents . ServiceName = __expectString ( output [ "serviceName" ] ) ; } if ( output [ "serviceState" ] !== undefined ) { contents . ServiceState = __expectString ( output [ "serviceState" ] ) ; } if ( output . availabilityZoneSet === "" ) { contents . AvailabilityZones = [ ] ; } if ( output [ "availabilityZoneSet" ] !== undefined && output [ "availabilityZoneSet" ] [ "item" ] !== undefined ) { contents . AvailabilityZones = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "availabilityZoneSet" ] [ "item" ] ) , context ) ; } if ( output [ "acceptanceRequired" ] !== undefined ) { contents . AcceptanceRequired = __parseBoolean ( output [ "acceptanceRequired" ] ) ; } if ( output [ "managesVpcEndpoints" ] !== undefined ) { contents . ManagesVpcEndpoints = __parseBoolean ( output [ "managesVpcEndpoints" ] ) ; } if ( output . networkLoadBalancerArnSet === "" ) { contents . NetworkLoadBalancerArns = [ ] ; } if ( output [ "networkLoadBalancerArnSet" ] !== undefined && output [ "networkLoadBalancerArnSet" ] [ "item" ] !== undefined ) { contents . NetworkLoadBalancerArns = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "networkLoadBalancerArnSet" ] [ "item" ] ) , context ) ; } if ( output . gatewayLoadBalancerArnSet === "" ) { contents . GatewayLoadBalancerArns = [ ] ; } if ( output [ "gatewayLoadBalancerArnSet" ] !== undefined && output [ "gatewayLoadBalancerArnSet" ] [ "item" ] !== undefined ) { contents . GatewayLoadBalancerArns = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "gatewayLoadBalancerArnSet" ] [ "item" ] ) , context ) ; } if ( output . baseEndpointDnsNameSet === "" ) { contents . BaseEndpointDnsNames = [ ] ; } if ( output [ "baseEndpointDnsNameSet" ] !== undefined && output [ "baseEndpointDnsNameSet" ] [ "item" ] !== undefined ) { contents . BaseEndpointDnsNames = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "baseEndpointDnsNameSet" ] [ "item" ] ) , context ) ; } if ( output [ "privateDnsName" ] !== undefined ) { contents . PrivateDnsName = __expectString ( output [ "privateDnsName" ] ) ; } if ( output [ "privateDnsNameConfiguration" ] !== undefined ) { contents . PrivateDnsNameConfiguration = deserializeAws_ec2PrivateDnsNameConfiguration ( output [ "privateDnsNameConfiguration" ] , context ) ; } if ( output [ "payerResponsibility" ] !== undefined ) { contents . PayerResponsibility = __expectString ( output [ "payerResponsibility" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ServiceConfigurationSet = ( output , context ) : ServiceConfiguration [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ServiceConfiguration ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ServiceDetail = ( output , context ) : ServiceDetail => { const contents = { ServiceName : undefined , ServiceId : undefined , ServiceType : undefined , AvailabilityZones : undefined , Owner : undefined , BaseEndpointDnsNames : undefined , PrivateDnsName : undefined , PrivateDnsNames : undefined , VpcEndpointPolicySupported : undefined , AcceptanceRequired : undefined , ManagesVpcEndpoints : undefined , PayerResponsibility : undefined , Tags : undefined , PrivateDnsNameVerificationState : undefined , } ; if ( output [ "serviceName" ] !== undefined ) { contents . ServiceName = __expectString ( output [ "serviceName" ] ) ; } if ( output [ "serviceId" ] !== undefined ) { contents . ServiceId = __expectString ( output [ "serviceId" ] ) ; } if ( output . serviceType === "" ) { contents . ServiceType = [ ] ; } if ( output [ "serviceType" ] !== undefined && output [ "serviceType" ] [ "item" ] !== undefined ) { contents . ServiceType = deserializeAws_ec2ServiceTypeDetailSet ( __getArrayIfSingleItem ( output [ "serviceType" ] [ "item" ] ) , context ) ; } if ( output . availabilityZoneSet === "" ) { contents . AvailabilityZones = [ ] ; } if ( output [ "availabilityZoneSet" ] !== undefined && output [ "availabilityZoneSet" ] [ "item" ] !== undefined ) { contents . AvailabilityZones = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "availabilityZoneSet" ] [ "item" ] ) , context ) ; } if ( output [ "owner" ] !== undefined ) { contents . Owner = __expectString ( output [ "owner" ] ) ; } if ( output . baseEndpointDnsNameSet === "" ) { contents . BaseEndpointDnsNames = [ ] ; } if ( output [ "baseEndpointDnsNameSet" ] !== undefined && output [ "baseEndpointDnsNameSet" ] [ "item" ] !== undefined ) { contents . BaseEndpointDnsNames = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "baseEndpointDnsNameSet" ] [ "item" ] ) , context ) ; } if ( output [ "privateDnsName" ] !== undefined ) { contents . PrivateDnsName = __expectString ( output [ "privateDnsName" ] ) ; } if ( output . privateDnsNameSet === "" ) { contents . PrivateDnsNames = [ ] ; } if ( output [ "privateDnsNameSet" ] !== undefined && output [ "privateDnsNameSet" ] [ "item" ] !== undefined ) { contents . PrivateDnsNames = deserializeAws_ec2PrivateDnsDetailsSet ( __getArrayIfSingleItem ( output [ "privateDnsNameSet" ] [ "item" ] ) , context ) ; } if ( output [ "vpcEndpointPolicySupported" ] !== undefined ) { contents . VpcEndpointPolicySupported = __parseBoolean ( output [ "vpcEndpointPolicySupported" ] ) ; } if ( output [ "acceptanceRequired" ] !== undefined ) { contents . AcceptanceRequired = __parseBoolean ( output [ "acceptanceRequired" ] ) ; } if ( output [ "managesVpcEndpoints" ] !== undefined ) { contents . ManagesVpcEndpoints = __parseBoolean ( output [ "managesVpcEndpoints" ] ) ; } if ( output [ "payerResponsibility" ] !== undefined ) { contents . PayerResponsibility = __expectString ( output [ "payerResponsibility" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "privateDnsNameVerificationState" ] !== undefined ) { contents . PrivateDnsNameVerificationState = __expectString ( output [ "privateDnsNameVerificationState" ] ) ; } return contents ; } ; const deserializeAws_ec2ServiceDetailSet = ( output , context ) : ServiceDetail [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ServiceDetail ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ServiceTypeDetail = ( output , context ) : ServiceTypeDetail => { const contents = { ServiceType : undefined , } ; if ( output [ "serviceType" ] !== undefined ) { contents . ServiceType = __expectString ( output [ "serviceType" ] ) ; } return contents ; } ; const deserializeAws_ec2ServiceTypeDetailSet = ( output , context ) : ServiceTypeDetail [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ServiceTypeDetail ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Snapshot = ( output , context ) : Snapshot => { const contents = { DataEncryptionKeyId : undefined , Description : undefined , Encrypted : undefined , KmsKeyId : undefined , OwnerId : undefined , Progress : undefined , SnapshotId : undefined , StartTime : undefined , State : undefined , StateMessage : undefined , VolumeId : undefined , VolumeSize : undefined , OwnerAlias : undefined , OutpostArn : undefined , Tags : undefined , StorageTier : undefined , RestoreExpiryTime : undefined , } ; if ( output [ "dataEncryptionKeyId" ] !== undefined ) { contents . DataEncryptionKeyId = __expectString ( output [ "dataEncryptionKeyId" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "encrypted" ] !== undefined ) { contents . Encrypted = __parseBoolean ( output [ "encrypted" ] ) ; } if ( output [ "kmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "kmsKeyId" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "progress" ] !== undefined ) { contents . Progress = __expectString ( output [ "progress" ] ) ; } if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output [ "startTime" ] !== undefined ) { contents . StartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "startTime" ] ) ) ; } if ( output [ "status" ] !== undefined ) { contents . State = __expectString ( output [ "status" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StateMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output [ "volumeId" ] !== undefined ) { contents . VolumeId = __expectString ( output [ "volumeId" ] ) ; } if ( output [ "volumeSize" ] !== undefined ) { contents . VolumeSize = __strictParseInt32 ( output [ "volumeSize" ] ) as number ; } if ( output [ "ownerAlias" ] !== undefined ) { contents . OwnerAlias = __expectString ( output [ "ownerAlias" ] ) ; } if ( output [ "outpostArn" ] !== undefined ) { contents . OutpostArn = __expectString ( output [ "outpostArn" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "storageTier" ] !== undefined ) { contents . StorageTier = __expectString ( output [ "storageTier" ] ) ; } if ( output [ "restoreExpiryTime" ] !== undefined ) { contents . RestoreExpiryTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "restoreExpiryTime" ] ) ) ; } return contents ; } ; const deserializeAws_ec2SnapshotDetail = ( output , context ) : SnapshotDetail => { const contents = { Description : undefined , DeviceName : undefined , DiskImageSize : undefined , Format : undefined , Progress : undefined , SnapshotId : undefined , Status : undefined , StatusMessage : undefined , Url : undefined , UserBucket : undefined , } ; if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "deviceName" ] !== undefined ) { contents . DeviceName = __expectString ( output [ "deviceName" ] ) ; } if ( output [ "diskImageSize" ] !== undefined ) { contents . DiskImageSize = __strictParseFloat ( output [ "diskImageSize" ] ) as number ; } if ( output [ "format" ] !== undefined ) { contents . Format = __expectString ( output [ "format" ] ) ; } if ( output [ "progress" ] !== undefined ) { contents . Progress = __expectString ( output [ "progress" ] ) ; } if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output [ "url" ] !== undefined ) { contents . Url = __expectString ( output [ "url" ] ) ; } if ( output [ "userBucket" ] !== undefined ) { contents . UserBucket = deserializeAws_ec2UserBucketDetails ( output [ "userBucket" ] , context ) ; } return contents ; } ; const deserializeAws_ec2SnapshotDetailList = ( output , context ) : SnapshotDetail [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SnapshotDetail ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SnapshotInfo = ( output , context ) : SnapshotInfo => { const contents = { Description : undefined , Tags : undefined , Encrypted : undefined , VolumeId : undefined , State : undefined , VolumeSize : undefined , StartTime : undefined , Progress : undefined , OwnerId : undefined , SnapshotId : undefined , OutpostArn : undefined , } ; if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "encrypted" ] !== undefined ) { contents . Encrypted = __parseBoolean ( output [ "encrypted" ] ) ; } if ( output [ "volumeId" ] !== undefined ) { contents . VolumeId = __expectString ( output [ "volumeId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "volumeSize" ] !== undefined ) { contents . VolumeSize = __strictParseInt32 ( output [ "volumeSize" ] ) as number ; } if ( output [ "startTime" ] !== undefined ) { contents . StartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "startTime" ] ) ) ; } if ( output [ "progress" ] !== undefined ) { contents . Progress = __expectString ( output [ "progress" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output [ "outpostArn" ] !== undefined ) { contents . OutpostArn = __expectString ( output [ "outpostArn" ] ) ; } return contents ; } ; const deserializeAws_ec2SnapshotList = ( output , context ) : Snapshot [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Snapshot ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SnapshotRecycleBinInfo = ( output , context ) : SnapshotRecycleBinInfo => { const contents = { SnapshotId : undefined , RecycleBinEnterTime : undefined , RecycleBinExitTime : undefined , Description : undefined , VolumeId : undefined , } ; if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output [ "recycleBinEnterTime" ] !== undefined ) { contents . RecycleBinEnterTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "recycleBinEnterTime" ] ) ) ; } if ( output [ "recycleBinExitTime" ] !== undefined ) { contents . RecycleBinExitTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "recycleBinExitTime" ] ) ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "volumeId" ] !== undefined ) { contents . VolumeId = __expectString ( output [ "volumeId" ] ) ; } return contents ; } ; const deserializeAws_ec2SnapshotRecycleBinInfoList = ( output , context ) : SnapshotRecycleBinInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SnapshotRecycleBinInfo ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SnapshotSet = ( output , context ) : SnapshotInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SnapshotInfo ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SnapshotTaskDetail = ( output , context ) : SnapshotTaskDetail => { const contents = { Description : undefined , DiskImageSize : undefined , Encrypted : undefined , Format : undefined , KmsKeyId : undefined , Progress : undefined , SnapshotId : undefined , Status : undefined , StatusMessage : undefined , Url : undefined , UserBucket : undefined , } ; if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "diskImageSize" ] !== undefined ) { contents . DiskImageSize = __strictParseFloat ( output [ "diskImageSize" ] ) as number ; } if ( output [ "encrypted" ] !== undefined ) { contents . Encrypted = __parseBoolean ( output [ "encrypted" ] ) ; } if ( output [ "format" ] !== undefined ) { contents . Format = __expectString ( output [ "format" ] ) ; } if ( output [ "kmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "kmsKeyId" ] ) ; } if ( output [ "progress" ] !== undefined ) { contents . Progress = __expectString ( output [ "progress" ] ) ; } if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output [ "url" ] !== undefined ) { contents . Url = __expectString ( output [ "url" ] ) ; } if ( output [ "userBucket" ] !== undefined ) { contents . UserBucket = deserializeAws_ec2UserBucketDetails ( output [ "userBucket" ] , context ) ; } return contents ; } ; const deserializeAws_ec2SnapshotTierStatus = ( output , context ) : SnapshotTierStatus => { const contents = { SnapshotId : undefined , VolumeId : undefined , Status : undefined , OwnerId : undefined , Tags : undefined , StorageTier : undefined , LastTieringStartTime : undefined , LastTieringProgress : undefined , LastTieringOperationStatus : undefined , LastTieringOperationStatusDetail : undefined , ArchivalCompleteTime : undefined , RestoreExpiryTime : undefined , } ; if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output [ "volumeId" ] !== undefined ) { contents . VolumeId = __expectString ( output [ "volumeId" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "storageTier" ] !== undefined ) { contents . StorageTier = __expectString ( output [ "storageTier" ] ) ; } if ( output [ "lastTieringStartTime" ] !== undefined ) { contents . LastTieringStartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "lastTieringStartTime" ] ) ) ; } if ( output [ "lastTieringProgress" ] !== undefined ) { contents . LastTieringProgress = __strictParseInt32 ( output [ "lastTieringProgress" ] ) as number ; } if ( output [ "lastTieringOperationStatus" ] !== undefined ) { contents . LastTieringOperationStatus = __expectString ( output [ "lastTieringOperationStatus" ] ) ; } if ( output [ "lastTieringOperationStatusDetail" ] !== undefined ) { contents . LastTieringOperationStatusDetail = __expectString ( output [ "lastTieringOperationStatusDetail" ] ) ; } if ( output [ "archivalCompleteTime" ] !== undefined ) { contents . ArchivalCompleteTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "archivalCompleteTime" ] ) ) ; } if ( output [ "restoreExpiryTime" ] !== undefined ) { contents . RestoreExpiryTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "restoreExpiryTime" ] ) ) ; } return contents ; } ; const deserializeAws_ec2snapshotTierStatusSet = ( output , context ) : SnapshotTierStatus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SnapshotTierStatus ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SpotCapacityRebalance = ( output , context ) : SpotCapacityRebalance => { const contents = { ReplacementStrategy : undefined , TerminationDelay : undefined , } ; if ( output [ "replacementStrategy" ] !== undefined ) { contents . ReplacementStrategy = __expectString ( output [ "replacementStrategy" ] ) ; } if ( output [ "terminationDelay" ] !== undefined ) { contents . TerminationDelay = __strictParseInt32 ( output [ "terminationDelay" ] ) as number ; } return contents ; } ; const deserializeAws_ec2SpotDatafeedSubscription = ( output , context ) : SpotDatafeedSubscription => { const contents = { Bucket : undefined , Fault : undefined , OwnerId : undefined , Prefix : undefined , State : undefined , } ; if ( output [ "bucket" ] !== undefined ) { contents . Bucket = __expectString ( output [ "bucket" ] ) ; } if ( output [ "fault" ] !== undefined ) { contents . Fault = deserializeAws_ec2SpotInstanceStateFault ( output [ "fault" ] , context ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "prefix" ] !== undefined ) { contents . Prefix = __expectString ( output [ "prefix" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } return contents ; } ; const deserializeAws_ec2SpotFleetLaunchSpecification = ( output , context ) : SpotFleetLaunchSpecification => { const contents = { SecurityGroups : undefined , AddressingType : undefined , BlockDeviceMappings : undefined , EbsOptimized : undefined , IamInstanceProfile : undefined , ImageId : undefined , InstanceType : undefined , KernelId : undefined , KeyName : undefined , Monitoring : undefined , NetworkInterfaces : undefined , Placement : undefined , RamdiskId : undefined , SpotPrice : undefined , SubnetId : undefined , UserData : undefined , WeightedCapacity : undefined , TagSpecifications : undefined , InstanceRequirements : undefined , } ; if ( output . groupSet === "" ) { contents . SecurityGroups = [ ] ; } if ( output [ "groupSet" ] !== undefined && output [ "groupSet" ] [ "item" ] !== undefined ) { contents . SecurityGroups = deserializeAws_ec2GroupIdentifierList ( __getArrayIfSingleItem ( output [ "groupSet" ] [ "item" ] ) , context ) ; } if ( output [ "addressingType" ] !== undefined ) { contents . AddressingType = __expectString ( output [ "addressingType" ] ) ; } if ( output . blockDeviceMapping === "" ) { contents . BlockDeviceMappings = [ ] ; } if ( output [ "blockDeviceMapping" ] !== undefined && output [ "blockDeviceMapping" ] [ "item" ] !== undefined ) { contents . BlockDeviceMappings = deserializeAws_ec2BlockDeviceMappingList ( __getArrayIfSingleItem ( output [ "blockDeviceMapping" ] [ "item" ] ) , context ) ; } if ( output [ "ebsOptimized" ] !== undefined ) { contents . EbsOptimized = __parseBoolean ( output [ "ebsOptimized" ] ) ; } if ( output [ "iamInstanceProfile" ] !== undefined ) { contents . IamInstanceProfile = deserializeAws_ec2IamInstanceProfileSpecification ( output [ "iamInstanceProfile" ] , context ) ; } if ( output [ "imageId" ] !== undefined ) { contents . ImageId = __expectString ( output [ "imageId" ] ) ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "kernelId" ] !== undefined ) { contents . KernelId = __expectString ( output [ "kernelId" ] ) ; } if ( output [ "keyName" ] !== undefined ) { contents . KeyName = __expectString ( output [ "keyName" ] ) ; } if ( output [ "monitoring" ] !== undefined ) { contents . Monitoring = deserializeAws_ec2SpotFleetMonitoring ( output [ "monitoring" ] , context ) ; } if ( output . networkInterfaceSet === "" ) { contents . NetworkInterfaces = [ ] ; } if ( output [ "networkInterfaceSet" ] !== undefined && output [ "networkInterfaceSet" ] [ "item" ] !== undefined ) { contents . NetworkInterfaces = deserializeAws_ec2InstanceNetworkInterfaceSpecificationList ( __getArrayIfSingleItem ( output [ "networkInterfaceSet" ] [ "item" ] ) , context ) ; } if ( output [ "placement" ] !== undefined ) { contents . Placement = deserializeAws_ec2SpotPlacement ( output [ "placement" ] , context ) ; } if ( output [ "ramdiskId" ] !== undefined ) { contents . RamdiskId = __expectString ( output [ "ramdiskId" ] ) ; } if ( output [ "spotPrice" ] !== undefined ) { contents . SpotPrice = __expectString ( output [ "spotPrice" ] ) ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } if ( output [ "userData" ] !== undefined ) { contents . UserData = __expectString ( output [ "userData" ] ) ; } if ( output [ "weightedCapacity" ] !== undefined ) { contents . WeightedCapacity = __strictParseFloat ( output [ "weightedCapacity" ] ) as number ; } if ( output . tagSpecificationSet === "" ) { contents . TagSpecifications = [ ] ; } if ( output [ "tagSpecificationSet" ] !== undefined && output [ "tagSpecificationSet" ] [ "item" ] !== undefined ) { contents . TagSpecifications = deserializeAws_ec2SpotFleetTagSpecificationList ( __getArrayIfSingleItem ( output [ "tagSpecificationSet" ] [ "item" ] ) , context ) ; } if ( output [ "instanceRequirements" ] !== undefined ) { contents . InstanceRequirements = deserializeAws_ec2InstanceRequirements ( output [ "instanceRequirements" ] , context ) ; } return contents ; } ; const deserializeAws_ec2SpotFleetMonitoring = ( output , context ) : SpotFleetMonitoring => { const contents = { Enabled : undefined , } ; if ( output [ "enabled" ] !== undefined ) { contents . Enabled = __parseBoolean ( output [ "enabled" ] ) ; } return contents ; } ; const deserializeAws_ec2SpotFleetRequestConfig = ( output , context ) : SpotFleetRequestConfig => { const contents = { ActivityStatus : undefined , CreateTime : undefined , SpotFleetRequestConfig : undefined , SpotFleetRequestId : undefined , SpotFleetRequestState : undefined , Tags : undefined , } ; if ( output [ "activityStatus" ] !== undefined ) { contents . ActivityStatus = __expectString ( output [ "activityStatus" ] ) ; } if ( output [ "createTime" ] !== undefined ) { contents . CreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "createTime" ] ) ) ; } if ( output [ "spotFleetRequestConfig" ] !== undefined ) { contents . SpotFleetRequestConfig = deserializeAws_ec2SpotFleetRequestConfigData ( output [ "spotFleetRequestConfig" ] , context ) ; } if ( output [ "spotFleetRequestId" ] !== undefined ) { contents . SpotFleetRequestId = __expectString ( output [ "spotFleetRequestId" ] ) ; } if ( output [ "spotFleetRequestState" ] !== undefined ) { contents . SpotFleetRequestState = __expectString ( output [ "spotFleetRequestState" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2SpotFleetRequestConfigData = ( output , context ) : SpotFleetRequestConfigData => { const contents = { AllocationStrategy : undefined , OnDemandAllocationStrategy : undefined , SpotMaintenanceStrategies : undefined , ClientToken : undefined , ExcessCapacityTerminationPolicy : undefined , FulfilledCapacity : undefined , OnDemandFulfilledCapacity : undefined , IamFleetRole : undefined , LaunchSpecifications : undefined , LaunchTemplateConfigs : undefined , SpotPrice : undefined , TargetCapacity : undefined , OnDemandTargetCapacity : undefined , OnDemandMaxTotalPrice : undefined , SpotMaxTotalPrice : undefined , TerminateInstancesWithExpiration : undefined , Type : undefined , ValidFrom : undefined , ValidUntil : undefined , ReplaceUnhealthyInstances : undefined , InstanceInterruptionBehavior : undefined , LoadBalancersConfig : undefined , InstancePoolsToUseCount : undefined , Context : undefined , TargetCapacityUnitType : undefined , TagSpecifications : undefined , } ; if ( output [ "allocationStrategy" ] !== undefined ) { contents . AllocationStrategy = __expectString ( output [ "allocationStrategy" ] ) ; } if ( output [ "onDemandAllocationStrategy" ] !== undefined ) { contents . OnDemandAllocationStrategy = __expectString ( output [ "onDemandAllocationStrategy" ] ) ; } if ( output [ "spotMaintenanceStrategies" ] !== undefined ) { contents . SpotMaintenanceStrategies = deserializeAws_ec2SpotMaintenanceStrategies ( output [ "spotMaintenanceStrategies" ] , context ) ; } if ( output [ "clientToken" ] !== undefined ) { contents . ClientToken = __expectString ( output [ "clientToken" ] ) ; } if ( output [ "excessCapacityTerminationPolicy" ] !== undefined ) { contents . ExcessCapacityTerminationPolicy = __expectString ( output [ "excessCapacityTerminationPolicy" ] ) ; } if ( output [ "fulfilledCapacity" ] !== undefined ) { contents . FulfilledCapacity = __strictParseFloat ( output [ "fulfilledCapacity" ] ) as number ; } if ( output [ "onDemandFulfilledCapacity" ] !== undefined ) { contents . OnDemandFulfilledCapacity = __strictParseFloat ( output [ "onDemandFulfilledCapacity" ] ) as number ; } if ( output [ "iamFleetRole" ] !== undefined ) { contents . IamFleetRole = __expectString ( output [ "iamFleetRole" ] ) ; } if ( output . launchSpecifications === "" ) { contents . LaunchSpecifications = [ ] ; } if ( output [ "launchSpecifications" ] !== undefined && output [ "launchSpecifications" ] [ "item" ] !== undefined ) { contents . LaunchSpecifications = deserializeAws_ec2LaunchSpecsList ( __getArrayIfSingleItem ( output [ "launchSpecifications" ] [ "item" ] ) , context ) ; } if ( output . launchTemplateConfigs === "" ) { contents . LaunchTemplateConfigs = [ ] ; } if ( output [ "launchTemplateConfigs" ] !== undefined && output [ "launchTemplateConfigs" ] [ "item" ] !== undefined ) { contents . LaunchTemplateConfigs = deserializeAws_ec2LaunchTemplateConfigList ( __getArrayIfSingleItem ( output [ "launchTemplateConfigs" ] [ "item" ] ) , context ) ; } if ( output [ "spotPrice" ] !== undefined ) { contents . SpotPrice = __expectString ( output [ "spotPrice" ] ) ; } if ( output [ "targetCapacity" ] !== undefined ) { contents . TargetCapacity = __strictParseInt32 ( output [ "targetCapacity" ] ) as number ; } if ( output [ "onDemandTargetCapacity" ] !== undefined ) { contents . OnDemandTargetCapacity = __strictParseInt32 ( output [ "onDemandTargetCapacity" ] ) as number ; } if ( output [ "onDemandMaxTotalPrice" ] !== undefined ) { contents . OnDemandMaxTotalPrice = __expectString ( output [ "onDemandMaxTotalPrice" ] ) ; } if ( output [ "spotMaxTotalPrice" ] !== undefined ) { contents . SpotMaxTotalPrice = __expectString ( output [ "spotMaxTotalPrice" ] ) ; } if ( output [ "terminateInstancesWithExpiration" ] !== undefined ) { contents . TerminateInstancesWithExpiration = __parseBoolean ( output [ "terminateInstancesWithExpiration" ] ) ; } if ( output [ "type" ] !== undefined ) { contents . Type = __expectString ( output [ "type" ] ) ; } if ( output [ "validFrom" ] !== undefined ) { contents . ValidFrom = __expectNonNull ( __parseRfc3339DateTime ( output [ "validFrom" ] ) ) ; } if ( output [ "validUntil" ] !== undefined ) { contents . ValidUntil = __expectNonNull ( __parseRfc3339DateTime ( output [ "validUntil" ] ) ) ; } if ( output [ "replaceUnhealthyInstances" ] !== undefined ) { contents . ReplaceUnhealthyInstances = __parseBoolean ( output [ "replaceUnhealthyInstances" ] ) ; } if ( output [ "instanceInterruptionBehavior" ] !== undefined ) { contents . InstanceInterruptionBehavior = __expectString ( output [ "instanceInterruptionBehavior" ] ) ; } if ( output [ "loadBalancersConfig" ] !== undefined ) { contents . LoadBalancersConfig = deserializeAws_ec2LoadBalancersConfig ( output [ "loadBalancersConfig" ] , context ) ; } if ( output [ "instancePoolsToUseCount" ] !== undefined ) { contents . InstancePoolsToUseCount = __strictParseInt32 ( output [ "instancePoolsToUseCount" ] ) as number ; } if ( output [ "context" ] !== undefined ) { contents . Context = __expectString ( output [ "context" ] ) ; } if ( output [ "targetCapacityUnitType" ] !== undefined ) { contents . TargetCapacityUnitType = __expectString ( output [ "targetCapacityUnitType" ] ) ; } if ( output . TagSpecification === "" ) { contents . TagSpecifications = [ ] ; } if ( output [ "TagSpecification" ] !== undefined && output [ "TagSpecification" ] [ "item" ] !== undefined ) { contents . TagSpecifications = deserializeAws_ec2TagSpecificationList ( __getArrayIfSingleItem ( output [ "TagSpecification" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2SpotFleetRequestConfigSet = ( output , context ) : SpotFleetRequestConfig [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SpotFleetRequestConfig ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SpotFleetTagSpecification = ( output , context ) : SpotFleetTagSpecification => { const contents = { ResourceType : undefined , Tags : undefined , } ; if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } if ( output . tag === "" ) { contents . Tags = [ ] ; } if ( output [ "tag" ] !== undefined && output [ "tag" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tag" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2SpotFleetTagSpecificationList = ( output , context ) : SpotFleetTagSpecification [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SpotFleetTagSpecification ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SpotInstanceRequest = ( output , context ) : SpotInstanceRequest => { const contents = { ActualBlockHourlyPrice : undefined , AvailabilityZoneGroup : undefined , BlockDurationMinutes : undefined , CreateTime : undefined , Fault : undefined , InstanceId : undefined , LaunchGroup : undefined , LaunchSpecification : undefined , LaunchedAvailabilityZone : undefined , ProductDescription : undefined , SpotInstanceRequestId : undefined , SpotPrice : undefined , State : undefined , Status : undefined , Tags : undefined , Type : undefined , ValidFrom : undefined , ValidUntil : undefined , InstanceInterruptionBehavior : undefined , } ; if ( output [ "actualBlockHourlyPrice" ] !== undefined ) { contents . ActualBlockHourlyPrice = __expectString ( output [ "actualBlockHourlyPrice" ] ) ; } if ( output [ "availabilityZoneGroup" ] !== undefined ) { contents . AvailabilityZoneGroup = __expectString ( output [ "availabilityZoneGroup" ] ) ; } if ( output [ "blockDurationMinutes" ] !== undefined ) { contents . BlockDurationMinutes = __strictParseInt32 ( output [ "blockDurationMinutes" ] ) as number ; } if ( output [ "createTime" ] !== undefined ) { contents . CreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "createTime" ] ) ) ; } if ( output [ "fault" ] !== undefined ) { contents . Fault = deserializeAws_ec2SpotInstanceStateFault ( output [ "fault" ] , context ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "launchGroup" ] !== undefined ) { contents . LaunchGroup = __expectString ( output [ "launchGroup" ] ) ; } if ( output [ "launchSpecification" ] !== undefined ) { contents . LaunchSpecification = deserializeAws_ec2LaunchSpecification ( output [ "launchSpecification" ] , context ) ; } if ( output [ "launchedAvailabilityZone" ] !== undefined ) { contents . LaunchedAvailabilityZone = __expectString ( output [ "launchedAvailabilityZone" ] ) ; } if ( output [ "productDescription" ] !== undefined ) { contents . ProductDescription = __expectString ( output [ "productDescription" ] ) ; } if ( output [ "spotInstanceRequestId" ] !== undefined ) { contents . SpotInstanceRequestId = __expectString ( output [ "spotInstanceRequestId" ] ) ; } if ( output [ "spotPrice" ] !== undefined ) { contents . SpotPrice = __expectString ( output [ "spotPrice" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2SpotInstanceStatus ( output [ "status" ] , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "type" ] !== undefined ) { contents . Type = __expectString ( output [ "type" ] ) ; } if ( output [ "validFrom" ] !== undefined ) { contents . ValidFrom = __expectNonNull ( __parseRfc3339DateTime ( output [ "validFrom" ] ) ) ; } if ( output [ "validUntil" ] !== undefined ) { contents . ValidUntil = __expectNonNull ( __parseRfc3339DateTime ( output [ "validUntil" ] ) ) ; } if ( output [ "instanceInterruptionBehavior" ] !== undefined ) { contents . InstanceInterruptionBehavior = __expectString ( output [ "instanceInterruptionBehavior" ] ) ; } return contents ; } ; const deserializeAws_ec2SpotInstanceRequestList = ( output , context ) : SpotInstanceRequest [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SpotInstanceRequest ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SpotInstanceStateFault = ( output , context ) : SpotInstanceStateFault => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2SpotInstanceStatus = ( output , context ) : SpotInstanceStatus => { const contents = { Code : undefined , Message : undefined , UpdateTime : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } if ( output [ "updateTime" ] !== undefined ) { contents . UpdateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "updateTime" ] ) ) ; } return contents ; } ; const deserializeAws_ec2SpotMaintenanceStrategies = ( output , context ) : SpotMaintenanceStrategies => { const contents = { CapacityRebalance : undefined , } ; if ( output [ "capacityRebalance" ] !== undefined ) { contents . CapacityRebalance = deserializeAws_ec2SpotCapacityRebalance ( output [ "capacityRebalance" ] , context ) ; } return contents ; } ; const deserializeAws_ec2SpotOptions = ( output , context ) : SpotOptions => { const contents = { AllocationStrategy : undefined , MaintenanceStrategies : undefined , InstanceInterruptionBehavior : undefined , InstancePoolsToUseCount : undefined , SingleInstanceType : undefined , SingleAvailabilityZone : undefined , MinTargetCapacity : undefined , MaxTotalPrice : undefined , } ; if ( output [ "allocationStrategy" ] !== undefined ) { contents . AllocationStrategy = __expectString ( output [ "allocationStrategy" ] ) ; } if ( output [ "maintenanceStrategies" ] !== undefined ) { contents . MaintenanceStrategies = deserializeAws_ec2FleetSpotMaintenanceStrategies ( output [ "maintenanceStrategies" ] , context ) ; } if ( output [ "instanceInterruptionBehavior" ] !== undefined ) { contents . InstanceInterruptionBehavior = __expectString ( output [ "instanceInterruptionBehavior" ] ) ; } if ( output [ "instancePoolsToUseCount" ] !== undefined ) { contents . InstancePoolsToUseCount = __strictParseInt32 ( output [ "instancePoolsToUseCount" ] ) as number ; } if ( output [ "singleInstanceType" ] !== undefined ) { contents . SingleInstanceType = __parseBoolean ( output [ "singleInstanceType" ] ) ; } if ( output [ "singleAvailabilityZone" ] !== undefined ) { contents . SingleAvailabilityZone = __parseBoolean ( output [ "singleAvailabilityZone" ] ) ; } if ( output [ "minTargetCapacity" ] !== undefined ) { contents . MinTargetCapacity = __strictParseInt32 ( output [ "minTargetCapacity" ] ) as number ; } if ( output [ "maxTotalPrice" ] !== undefined ) { contents . MaxTotalPrice = __expectString ( output [ "maxTotalPrice" ] ) ; } return contents ; } ; const deserializeAws_ec2SpotPlacement = ( output , context ) : SpotPlacement => { const contents = { AvailabilityZone : undefined , GroupName : undefined , Tenancy : undefined , } ; if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "groupName" ] !== undefined ) { contents . GroupName = __expectString ( output [ "groupName" ] ) ; } if ( output [ "tenancy" ] !== undefined ) { contents . Tenancy = __expectString ( output [ "tenancy" ] ) ; } return contents ; } ; const deserializeAws_ec2SpotPlacementScore = ( output , context ) : SpotPlacementScore => { const contents = { Region : undefined , AvailabilityZoneId : undefined , Score : undefined , } ; if ( output [ "region" ] !== undefined ) { contents . Region = __expectString ( output [ "region" ] ) ; } if ( output [ "availabilityZoneId" ] !== undefined ) { contents . AvailabilityZoneId = __expectString ( output [ "availabilityZoneId" ] ) ; } if ( output [ "score" ] !== undefined ) { contents . Score = __strictParseInt32 ( output [ "score" ] ) as number ; } return contents ; } ; const deserializeAws_ec2SpotPlacementScores = ( output , context ) : SpotPlacementScore [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SpotPlacementScore ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SpotPrice = ( output , context ) : SpotPrice => { const contents = { AvailabilityZone : undefined , InstanceType : undefined , ProductDescription : undefined , SpotPrice : undefined , Timestamp : undefined , } ; if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "instanceType" ] !== undefined ) { contents . InstanceType = __expectString ( output [ "instanceType" ] ) ; } if ( output [ "productDescription" ] !== undefined ) { contents . ProductDescription = __expectString ( output [ "productDescription" ] ) ; } if ( output [ "spotPrice" ] !== undefined ) { contents . SpotPrice = __expectString ( output [ "spotPrice" ] ) ; } if ( output [ "timestamp" ] !== undefined ) { contents . Timestamp = __expectNonNull ( __parseRfc3339DateTime ( output [ "timestamp" ] ) ) ; } return contents ; } ; const deserializeAws_ec2SpotPriceHistoryList = ( output , context ) : SpotPrice [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SpotPrice ( entry , context ) ; } ) ; } ; const deserializeAws_ec2StaleIpPermission = ( output , context ) : StaleIpPermission => { const contents = { FromPort : undefined , IpProtocol : undefined , IpRanges : undefined , PrefixListIds : undefined , ToPort : undefined , UserIdGroupPairs : undefined , } ; if ( output [ "fromPort" ] !== undefined ) { contents . FromPort = __strictParseInt32 ( output [ "fromPort" ] ) as number ; } if ( output [ "ipProtocol" ] !== undefined ) { contents . IpProtocol = __expectString ( output [ "ipProtocol" ] ) ; } if ( output . ipRanges === "" ) { contents . IpRanges = [ ] ; } if ( output [ "ipRanges" ] !== undefined && output [ "ipRanges" ] [ "item" ] !== undefined ) { contents . IpRanges = deserializeAws_ec2IpRanges ( __getArrayIfSingleItem ( output [ "ipRanges" ] [ "item" ] ) , context ) ; } if ( output . prefixListIds === "" ) { contents . PrefixListIds = [ ] ; } if ( output [ "prefixListIds" ] !== undefined && output [ "prefixListIds" ] [ "item" ] !== undefined ) { contents . PrefixListIds = deserializeAws_ec2PrefixListIdSet ( __getArrayIfSingleItem ( output [ "prefixListIds" ] [ "item" ] ) , context ) ; } if ( output [ "toPort" ] !== undefined ) { contents . ToPort = __strictParseInt32 ( output [ "toPort" ] ) as number ; } if ( output . groups === "" ) { contents . UserIdGroupPairs = [ ] ; } if ( output [ "groups" ] !== undefined && output [ "groups" ] [ "item" ] !== undefined ) { contents . UserIdGroupPairs = deserializeAws_ec2UserIdGroupPairSet ( __getArrayIfSingleItem ( output [ "groups" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2StaleIpPermissionSet = ( output , context ) : StaleIpPermission [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2StaleIpPermission ( entry , context ) ; } ) ; } ; const deserializeAws_ec2StaleSecurityGroup = ( output , context ) : StaleSecurityGroup => { const contents = { Description : undefined , GroupId : undefined , GroupName : undefined , StaleIpPermissions : undefined , StaleIpPermissionsEgress : undefined , VpcId : undefined , } ; if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "groupId" ] !== undefined ) { contents . GroupId = __expectString ( output [ "groupId" ] ) ; } if ( output [ "groupName" ] !== undefined ) { contents . GroupName = __expectString ( output [ "groupName" ] ) ; } if ( output . staleIpPermissions === "" ) { contents . StaleIpPermissions = [ ] ; } if ( output [ "staleIpPermissions" ] !== undefined && output [ "staleIpPermissions" ] [ "item" ] !== undefined ) { contents . StaleIpPermissions = deserializeAws_ec2StaleIpPermissionSet ( __getArrayIfSingleItem ( output [ "staleIpPermissions" ] [ "item" ] ) , context ) ; } if ( output . staleIpPermissionsEgress === "" ) { contents . StaleIpPermissionsEgress = [ ] ; } if ( output [ "staleIpPermissionsEgress" ] !== undefined && output [ "staleIpPermissionsEgress" ] [ "item" ] !== undefined ) { contents . StaleIpPermissionsEgress = deserializeAws_ec2StaleIpPermissionSet ( __getArrayIfSingleItem ( output [ "staleIpPermissionsEgress" ] [ "item" ] ) , context ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } return contents ; } ; const deserializeAws_ec2StaleSecurityGroupSet = ( output , context ) : StaleSecurityGroup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2StaleSecurityGroup ( entry , context ) ; } ) ; } ; const deserializeAws_ec2StartInstancesResult = ( output , context ) : StartInstancesResult => { const contents = { StartingInstances : undefined , } ; if ( output . instancesSet === "" ) { contents . StartingInstances = [ ] ; } if ( output [ "instancesSet" ] !== undefined && output [ "instancesSet" ] [ "item" ] !== undefined ) { contents . StartingInstances = deserializeAws_ec2InstanceStateChangeList ( __getArrayIfSingleItem ( output [ "instancesSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2StartNetworkInsightsAccessScopeAnalysisResult = ( output , context ) : StartNetworkInsightsAccessScopeAnalysisResult => { const contents = { NetworkInsightsAccessScopeAnalysis : undefined , } ; if ( output [ "networkInsightsAccessScopeAnalysis" ] !== undefined ) { contents . NetworkInsightsAccessScopeAnalysis = deserializeAws_ec2NetworkInsightsAccessScopeAnalysis ( output [ "networkInsightsAccessScopeAnalysis" ] , context ) ; } return contents ; } ; const deserializeAws_ec2StartNetworkInsightsAnalysisResult = ( output , context ) : StartNetworkInsightsAnalysisResult => { const contents = { NetworkInsightsAnalysis : undefined , } ; if ( output [ "networkInsightsAnalysis" ] !== undefined ) { contents . NetworkInsightsAnalysis = deserializeAws_ec2NetworkInsightsAnalysis ( output [ "networkInsightsAnalysis" ] , context ) ; } return contents ; } ; const deserializeAws_ec2StartVpcEndpointServicePrivateDnsVerificationResult = ( output , context ) : StartVpcEndpointServicePrivateDnsVerificationResult => { const contents = { ReturnValue : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . ReturnValue = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2StateReason = ( output , context ) : StateReason => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2StopInstancesResult = ( output , context ) : StopInstancesResult => { const contents = { StoppingInstances : undefined , } ; if ( output . instancesSet === "" ) { contents . StoppingInstances = [ ] ; } if ( output [ "instancesSet" ] !== undefined && output [ "instancesSet" ] [ "item" ] !== undefined ) { contents . StoppingInstances = deserializeAws_ec2InstanceStateChangeList ( __getArrayIfSingleItem ( output [ "instancesSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2Storage = ( output , context ) : Storage => { const contents = { S3 : undefined , } ; if ( output [ "S3" ] !== undefined ) { contents . S3 = deserializeAws_ec2S3Storage ( output [ "S3" ] , context ) ; } return contents ; } ; const deserializeAws_ec2StoreImageTaskResult = ( output , context ) : StoreImageTaskResult => { const contents = { AmiId : undefined , TaskStartTime : undefined , Bucket : undefined , S3objectKey : undefined , ProgressPercentage : undefined , StoreTaskState : undefined , StoreTaskFailureReason : undefined , } ; if ( output [ "amiId" ] !== undefined ) { contents . AmiId = __expectString ( output [ "amiId" ] ) ; } if ( output [ "taskStartTime" ] !== undefined ) { contents . TaskStartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "taskStartTime" ] ) ) ; } if ( output [ "bucket" ] !== undefined ) { contents . Bucket = __expectString ( output [ "bucket" ] ) ; } if ( output [ "s3objectKey" ] !== undefined ) { contents . S3objectKey = __expectString ( output [ "s3objectKey" ] ) ; } if ( output [ "progressPercentage" ] !== undefined ) { contents . ProgressPercentage = __strictParseInt32 ( output [ "progressPercentage" ] ) as number ; } if ( output [ "storeTaskState" ] !== undefined ) { contents . StoreTaskState = __expectString ( output [ "storeTaskState" ] ) ; } if ( output [ "storeTaskFailureReason" ] !== undefined ) { contents . StoreTaskFailureReason = __expectString ( output [ "storeTaskFailureReason" ] ) ; } return contents ; } ; const deserializeAws_ec2StoreImageTaskResultSet = ( output , context ) : StoreImageTaskResult [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2StoreImageTaskResult ( entry , context ) ; } ) ; } ; const deserializeAws_ec2StringList = ( 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_ec2Subnet = ( output , context ) : Subnet => { const contents = { AvailabilityZone : undefined , AvailabilityZoneId : undefined , AvailableIpAddressCount : undefined , CidrBlock : undefined , DefaultForAz : undefined , EnableLniAtDeviceIndex : undefined , MapPublicIpOnLaunch : undefined , MapCustomerOwnedIpOnLaunch : undefined , CustomerOwnedIpv4Pool : undefined , State : undefined , SubnetId : undefined , VpcId : undefined , OwnerId : undefined , AssignIpv6AddressOnCreation : undefined , Ipv6CidrBlockAssociationSet : undefined , Tags : undefined , SubnetArn : undefined , OutpostArn : undefined , EnableDns64 : undefined , Ipv6Native : undefined , PrivateDnsNameOptionsOnLaunch : undefined , } ; if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "availabilityZoneId" ] !== undefined ) { contents . AvailabilityZoneId = __expectString ( output [ "availabilityZoneId" ] ) ; } if ( output [ "availableIpAddressCount" ] !== undefined ) { contents . AvailableIpAddressCount = __strictParseInt32 ( output [ "availableIpAddressCount" ] ) as number ; } if ( output [ "cidrBlock" ] !== undefined ) { contents . CidrBlock = __expectString ( output [ "cidrBlock" ] ) ; } if ( output [ "defaultForAz" ] !== undefined ) { contents . DefaultForAz = __parseBoolean ( output [ "defaultForAz" ] ) ; } if ( output [ "enableLniAtDeviceIndex" ] !== undefined ) { contents . EnableLniAtDeviceIndex = __strictParseInt32 ( output [ "enableLniAtDeviceIndex" ] ) as number ; } if ( output [ "mapPublicIpOnLaunch" ] !== undefined ) { contents . MapPublicIpOnLaunch = __parseBoolean ( output [ "mapPublicIpOnLaunch" ] ) ; } if ( output [ "mapCustomerOwnedIpOnLaunch" ] !== undefined ) { contents . MapCustomerOwnedIpOnLaunch = __parseBoolean ( output [ "mapCustomerOwnedIpOnLaunch" ] ) ; } if ( output [ "customerOwnedIpv4Pool" ] !== undefined ) { contents . CustomerOwnedIpv4Pool = __expectString ( output [ "customerOwnedIpv4Pool" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "assignIpv6AddressOnCreation" ] !== undefined ) { contents . AssignIpv6AddressOnCreation = __parseBoolean ( output [ "assignIpv6AddressOnCreation" ] ) ; } if ( output . ipv6CidrBlockAssociationSet === "" ) { contents . Ipv6CidrBlockAssociationSet = [ ] ; } if ( output [ "ipv6CidrBlockAssociationSet" ] !== undefined && output [ "ipv6CidrBlockAssociationSet" ] [ "item" ] !== undefined ) { contents . Ipv6CidrBlockAssociationSet = deserializeAws_ec2SubnetIpv6CidrBlockAssociationSet ( __getArrayIfSingleItem ( output [ "ipv6CidrBlockAssociationSet" ] [ "item" ] ) , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "subnetArn" ] !== undefined ) { contents . SubnetArn = __expectString ( output [ "subnetArn" ] ) ; } if ( output [ "outpostArn" ] !== undefined ) { contents . OutpostArn = __expectString ( output [ "outpostArn" ] ) ; } if ( output [ "enableDns64" ] !== undefined ) { contents . EnableDns64 = __parseBoolean ( output [ "enableDns64" ] ) ; } if ( output [ "ipv6Native" ] !== undefined ) { contents . Ipv6Native = __parseBoolean ( output [ "ipv6Native" ] ) ; } if ( output [ "privateDnsNameOptionsOnLaunch" ] !== undefined ) { contents . PrivateDnsNameOptionsOnLaunch = deserializeAws_ec2PrivateDnsNameOptionsOnLaunch ( output [ "privateDnsNameOptionsOnLaunch" ] , context ) ; } return contents ; } ; const deserializeAws_ec2SubnetAssociation = ( output , context ) : SubnetAssociation => { const contents = { SubnetId : undefined , State : undefined , } ; if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } return contents ; } ; const deserializeAws_ec2SubnetAssociationList = ( output , context ) : SubnetAssociation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SubnetAssociation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SubnetCidrBlockState = ( output , context ) : SubnetCidrBlockState => { const contents = { State : undefined , StatusMessage : undefined , } ; if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } return contents ; } ; const deserializeAws_ec2SubnetCidrReservation = ( output , context ) : SubnetCidrReservation => { const contents = { SubnetCidrReservationId : undefined , SubnetId : undefined , Cidr : undefined , ReservationType : undefined , OwnerId : undefined , Description : undefined , Tags : undefined , } ; if ( output [ "subnetCidrReservationId" ] !== undefined ) { contents . SubnetCidrReservationId = __expectString ( output [ "subnetCidrReservationId" ] ) ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } if ( output [ "cidr" ] !== undefined ) { contents . Cidr = __expectString ( output [ "cidr" ] ) ; } if ( output [ "reservationType" ] !== undefined ) { contents . ReservationType = __expectString ( output [ "reservationType" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2SubnetCidrReservationList = ( output , context ) : SubnetCidrReservation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SubnetCidrReservation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SubnetIpv6CidrBlockAssociation = ( output , context ) : SubnetIpv6CidrBlockAssociation => { const contents = { AssociationId : undefined , Ipv6CidrBlock : undefined , Ipv6CidrBlockState : undefined , } ; if ( output [ "associationId" ] !== undefined ) { contents . AssociationId = __expectString ( output [ "associationId" ] ) ; } if ( output [ "ipv6CidrBlock" ] !== undefined ) { contents . Ipv6CidrBlock = __expectString ( output [ "ipv6CidrBlock" ] ) ; } if ( output [ "ipv6CidrBlockState" ] !== undefined ) { contents . Ipv6CidrBlockState = deserializeAws_ec2SubnetCidrBlockState ( output [ "ipv6CidrBlockState" ] , context ) ; } return contents ; } ; const deserializeAws_ec2SubnetIpv6CidrBlockAssociationSet = ( output , context ) : SubnetIpv6CidrBlockAssociation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SubnetIpv6CidrBlockAssociation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SubnetList = ( output , context ) : Subnet [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Subnet ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SuccessfulInstanceCreditSpecificationItem = ( output , context ) : SuccessfulInstanceCreditSpecificationItem => { const contents = { InstanceId : undefined , } ; if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } return contents ; } ; const deserializeAws_ec2SuccessfulInstanceCreditSpecificationSet = ( output , context ) : SuccessfulInstanceCreditSpecificationItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SuccessfulInstanceCreditSpecificationItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2SuccessfulQueuedPurchaseDeletion = ( output , context ) : SuccessfulQueuedPurchaseDeletion => { const contents = { ReservedInstancesId : undefined , } ; if ( output [ "reservedInstancesId" ] !== undefined ) { contents . ReservedInstancesId = __expectString ( output [ "reservedInstancesId" ] ) ; } return contents ; } ; const deserializeAws_ec2SuccessfulQueuedPurchaseDeletionSet = ( output , context ) : SuccessfulQueuedPurchaseDeletion [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2SuccessfulQueuedPurchaseDeletion ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Tag = ( output , context ) : Tag => { const contents = { Key : undefined , Value : undefined , } ; if ( output [ "key" ] !== undefined ) { contents . Key = __expectString ( output [ "key" ] ) ; } if ( output [ "value" ] !== undefined ) { contents . Value = __expectString ( output [ "value" ] ) ; } return contents ; } ; const deserializeAws_ec2TagDescription = ( output , context ) : TagDescription => { const contents = { Key : undefined , ResourceId : undefined , ResourceType : undefined , Value : undefined , } ; if ( output [ "key" ] !== undefined ) { contents . Key = __expectString ( output [ "key" ] ) ; } if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } if ( output [ "value" ] !== undefined ) { contents . Value = __expectString ( output [ "value" ] ) ; } return contents ; } ; const deserializeAws_ec2TagDescriptionList = ( output , context ) : TagDescription [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TagDescription ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TagList = ( output , context ) : Tag [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Tag ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TagSpecification = ( output , context ) : TagSpecification => { const contents = { ResourceType : undefined , Tags : undefined , } ; if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } if ( output . Tag === "" ) { contents . Tags = [ ] ; } if ( output [ "Tag" ] !== undefined && output [ "Tag" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "Tag" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TagSpecificationList = ( output , context ) : TagSpecification [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TagSpecification ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TargetCapacitySpecification = ( output , context ) : TargetCapacitySpecification => { const contents = { TotalTargetCapacity : undefined , OnDemandTargetCapacity : undefined , SpotTargetCapacity : undefined , DefaultTargetCapacityType : undefined , TargetCapacityUnitType : undefined , } ; if ( output [ "totalTargetCapacity" ] !== undefined ) { contents . TotalTargetCapacity = __strictParseInt32 ( output [ "totalTargetCapacity" ] ) as number ; } if ( output [ "onDemandTargetCapacity" ] !== undefined ) { contents . OnDemandTargetCapacity = __strictParseInt32 ( output [ "onDemandTargetCapacity" ] ) as number ; } if ( output [ "spotTargetCapacity" ] !== undefined ) { contents . SpotTargetCapacity = __strictParseInt32 ( output [ "spotTargetCapacity" ] ) as number ; } if ( output [ "defaultTargetCapacityType" ] !== undefined ) { contents . DefaultTargetCapacityType = __expectString ( output [ "defaultTargetCapacityType" ] ) ; } if ( output [ "targetCapacityUnitType" ] !== undefined ) { contents . TargetCapacityUnitType = __expectString ( output [ "targetCapacityUnitType" ] ) ; } return contents ; } ; const deserializeAws_ec2TargetConfiguration = ( output , context ) : TargetConfiguration => { const contents = { InstanceCount : undefined , OfferingId : undefined , } ; if ( output [ "instanceCount" ] !== undefined ) { contents . InstanceCount = __strictParseInt32 ( output [ "instanceCount" ] ) as number ; } if ( output [ "offeringId" ] !== undefined ) { contents . OfferingId = __expectString ( output [ "offeringId" ] ) ; } return contents ; } ; const deserializeAws_ec2TargetGroup = ( output , context ) : TargetGroup => { const contents = { Arn : undefined , } ; if ( output [ "arn" ] !== undefined ) { contents . Arn = __expectString ( output [ "arn" ] ) ; } return contents ; } ; const deserializeAws_ec2TargetGroups = ( output , context ) : TargetGroup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TargetGroup ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TargetGroupsConfig = ( output , context ) : TargetGroupsConfig => { const contents = { TargetGroups : undefined , } ; if ( output . targetGroups === "" ) { contents . TargetGroups = [ ] ; } if ( output [ "targetGroups" ] !== undefined && output [ "targetGroups" ] [ "item" ] !== undefined ) { contents . TargetGroups = deserializeAws_ec2TargetGroups ( __getArrayIfSingleItem ( output [ "targetGroups" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TargetNetwork = ( output , context ) : TargetNetwork => { const contents = { AssociationId : undefined , VpcId : undefined , TargetNetworkId : undefined , ClientVpnEndpointId : undefined , Status : undefined , SecurityGroups : undefined , } ; if ( output [ "associationId" ] !== undefined ) { contents . AssociationId = __expectString ( output [ "associationId" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "targetNetworkId" ] !== undefined ) { contents . TargetNetworkId = __expectString ( output [ "targetNetworkId" ] ) ; } if ( output [ "clientVpnEndpointId" ] !== undefined ) { contents . ClientVpnEndpointId = __expectString ( output [ "clientVpnEndpointId" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2AssociationStatus ( output [ "status" ] , context ) ; } if ( output . securityGroups === "" ) { contents . SecurityGroups = [ ] ; } if ( output [ "securityGroups" ] !== undefined && output [ "securityGroups" ] [ "item" ] !== undefined ) { contents . SecurityGroups = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "securityGroups" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TargetNetworkSet = ( output , context ) : TargetNetwork [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TargetNetwork ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TargetReservationValue = ( output , context ) : TargetReservationValue => { const contents = { ReservationValue : undefined , TargetConfiguration : undefined , } ; if ( output [ "reservationValue" ] !== undefined ) { contents . ReservationValue = deserializeAws_ec2ReservationValue ( output [ "reservationValue" ] , context ) ; } if ( output [ "targetConfiguration" ] !== undefined ) { contents . TargetConfiguration = deserializeAws_ec2TargetConfiguration ( output [ "targetConfiguration" ] , context ) ; } return contents ; } ; const deserializeAws_ec2TargetReservationValueSet = ( output , context ) : TargetReservationValue [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TargetReservationValue ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TerminateClientVpnConnectionsResult = ( output , context ) : TerminateClientVpnConnectionsResult => { const contents = { ClientVpnEndpointId : undefined , Username : undefined , ConnectionStatuses : undefined , } ; if ( output [ "clientVpnEndpointId" ] !== undefined ) { contents . ClientVpnEndpointId = __expectString ( output [ "clientVpnEndpointId" ] ) ; } if ( output [ "username" ] !== undefined ) { contents . Username = __expectString ( output [ "username" ] ) ; } if ( output . connectionStatuses === "" ) { contents . ConnectionStatuses = [ ] ; } if ( output [ "connectionStatuses" ] !== undefined && output [ "connectionStatuses" ] [ "item" ] !== undefined ) { contents . ConnectionStatuses = deserializeAws_ec2TerminateConnectionStatusSet ( __getArrayIfSingleItem ( output [ "connectionStatuses" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TerminateConnectionStatus = ( output , context ) : TerminateConnectionStatus => { const contents = { ConnectionId : undefined , PreviousStatus : undefined , CurrentStatus : undefined , } ; if ( output [ "connectionId" ] !== undefined ) { contents . ConnectionId = __expectString ( output [ "connectionId" ] ) ; } if ( output [ "previousStatus" ] !== undefined ) { contents . PreviousStatus = deserializeAws_ec2ClientVpnConnectionStatus ( output [ "previousStatus" ] , context ) ; } if ( output [ "currentStatus" ] !== undefined ) { contents . CurrentStatus = deserializeAws_ec2ClientVpnConnectionStatus ( output [ "currentStatus" ] , context ) ; } return contents ; } ; const deserializeAws_ec2TerminateConnectionStatusSet = ( output , context ) : TerminateConnectionStatus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TerminateConnectionStatus ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TerminateInstancesResult = ( output , context ) : TerminateInstancesResult => { const contents = { TerminatingInstances : undefined , } ; if ( output . instancesSet === "" ) { contents . TerminatingInstances = [ ] ; } if ( output [ "instancesSet" ] !== undefined && output [ "instancesSet" ] [ "item" ] !== undefined ) { contents . TerminatingInstances = deserializeAws_ec2InstanceStateChangeList ( __getArrayIfSingleItem ( output [ "instancesSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ThreadsPerCoreList = ( output , context ) : number [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __strictParseInt32 ( entry ) as number ; } ) ; } ; const deserializeAws_ec2ThroughResourcesStatement = ( output , context ) : ThroughResourcesStatement => { const contents = { ResourceStatement : undefined , } ; if ( output [ "resourceStatement" ] !== undefined ) { contents . ResourceStatement = deserializeAws_ec2ResourceStatement ( output [ "resourceStatement" ] , context ) ; } return contents ; } ; const deserializeAws_ec2ThroughResourcesStatementList = ( output , context ) : ThroughResourcesStatement [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2ThroughResourcesStatement ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TotalLocalStorageGB = ( output , context ) : TotalLocalStorageGB => { const contents = { Min : undefined , Max : undefined , } ; if ( output [ "min" ] !== undefined ) { contents . Min = __strictParseFloat ( output [ "min" ] ) as number ; } if ( output [ "max" ] !== undefined ) { contents . Max = __strictParseFloat ( output [ "max" ] ) as number ; } return contents ; } ; const deserializeAws_ec2TrafficMirrorFilter = ( output , context ) : TrafficMirrorFilter => { const contents = { TrafficMirrorFilterId : undefined , IngressFilterRules : undefined , EgressFilterRules : undefined , NetworkServices : undefined , Description : undefined , Tags : undefined , } ; if ( output [ "trafficMirrorFilterId" ] !== undefined ) { contents . TrafficMirrorFilterId = __expectString ( output [ "trafficMirrorFilterId" ] ) ; } if ( output . ingressFilterRuleSet === "" ) { contents . IngressFilterRules = [ ] ; } if ( output [ "ingressFilterRuleSet" ] !== undefined && output [ "ingressFilterRuleSet" ] [ "item" ] !== undefined ) { contents . IngressFilterRules = deserializeAws_ec2TrafficMirrorFilterRuleList ( __getArrayIfSingleItem ( output [ "ingressFilterRuleSet" ] [ "item" ] ) , context ) ; } if ( output . egressFilterRuleSet === "" ) { contents . EgressFilterRules = [ ] ; } if ( output [ "egressFilterRuleSet" ] !== undefined && output [ "egressFilterRuleSet" ] [ "item" ] !== undefined ) { contents . EgressFilterRules = deserializeAws_ec2TrafficMirrorFilterRuleList ( __getArrayIfSingleItem ( output [ "egressFilterRuleSet" ] [ "item" ] ) , context ) ; } if ( output . networkServiceSet === "" ) { contents . NetworkServices = [ ] ; } if ( output [ "networkServiceSet" ] !== undefined && output [ "networkServiceSet" ] [ "item" ] !== undefined ) { contents . NetworkServices = deserializeAws_ec2TrafficMirrorNetworkServiceList ( __getArrayIfSingleItem ( output [ "networkServiceSet" ] [ "item" ] ) , context ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TrafficMirrorFilterRule = ( output , context ) : TrafficMirrorFilterRule => { const contents = { TrafficMirrorFilterRuleId : undefined , TrafficMirrorFilterId : undefined , TrafficDirection : undefined , RuleNumber : undefined , RuleAction : undefined , Protocol : undefined , DestinationPortRange : undefined , SourcePortRange : undefined , DestinationCidrBlock : undefined , SourceCidrBlock : undefined , Description : undefined , } ; if ( output [ "trafficMirrorFilterRuleId" ] !== undefined ) { contents . TrafficMirrorFilterRuleId = __expectString ( output [ "trafficMirrorFilterRuleId" ] ) ; } if ( output [ "trafficMirrorFilterId" ] !== undefined ) { contents . TrafficMirrorFilterId = __expectString ( output [ "trafficMirrorFilterId" ] ) ; } if ( output [ "trafficDirection" ] !== undefined ) { contents . TrafficDirection = __expectString ( output [ "trafficDirection" ] ) ; } if ( output [ "ruleNumber" ] !== undefined ) { contents . RuleNumber = __strictParseInt32 ( output [ "ruleNumber" ] ) as number ; } if ( output [ "ruleAction" ] !== undefined ) { contents . RuleAction = __expectString ( output [ "ruleAction" ] ) ; } if ( output [ "protocol" ] !== undefined ) { contents . Protocol = __strictParseInt32 ( output [ "protocol" ] ) as number ; } if ( output [ "destinationPortRange" ] !== undefined ) { contents . DestinationPortRange = deserializeAws_ec2TrafficMirrorPortRange ( output [ "destinationPortRange" ] , context ) ; } if ( output [ "sourcePortRange" ] !== undefined ) { contents . SourcePortRange = deserializeAws_ec2TrafficMirrorPortRange ( output [ "sourcePortRange" ] , context ) ; } if ( output [ "destinationCidrBlock" ] !== undefined ) { contents . DestinationCidrBlock = __expectString ( output [ "destinationCidrBlock" ] ) ; } if ( output [ "sourceCidrBlock" ] !== undefined ) { contents . SourceCidrBlock = __expectString ( output [ "sourceCidrBlock" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } return contents ; } ; const deserializeAws_ec2TrafficMirrorFilterRuleList = ( output , context ) : TrafficMirrorFilterRule [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TrafficMirrorFilterRule ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TrafficMirrorFilterSet = ( output , context ) : TrafficMirrorFilter [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TrafficMirrorFilter ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TrafficMirrorNetworkServiceList = ( output , context ) : ( TrafficMirrorNetworkService | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_ec2TrafficMirrorPortRange = ( output , context ) : TrafficMirrorPortRange => { const contents = { FromPort : undefined , ToPort : undefined , } ; if ( output [ "fromPort" ] !== undefined ) { contents . FromPort = __strictParseInt32 ( output [ "fromPort" ] ) as number ; } if ( output [ "toPort" ] !== undefined ) { contents . ToPort = __strictParseInt32 ( output [ "toPort" ] ) as number ; } return contents ; } ; const deserializeAws_ec2TrafficMirrorSession = ( output , context ) : TrafficMirrorSession => { const contents = { TrafficMirrorSessionId : undefined , TrafficMirrorTargetId : undefined , TrafficMirrorFilterId : undefined , NetworkInterfaceId : undefined , OwnerId : undefined , PacketLength : undefined , SessionNumber : undefined , VirtualNetworkId : undefined , Description : undefined , Tags : undefined , } ; if ( output [ "trafficMirrorSessionId" ] !== undefined ) { contents . TrafficMirrorSessionId = __expectString ( output [ "trafficMirrorSessionId" ] ) ; } if ( output [ "trafficMirrorTargetId" ] !== undefined ) { contents . TrafficMirrorTargetId = __expectString ( output [ "trafficMirrorTargetId" ] ) ; } if ( output [ "trafficMirrorFilterId" ] !== undefined ) { contents . TrafficMirrorFilterId = __expectString ( output [ "trafficMirrorFilterId" ] ) ; } if ( output [ "networkInterfaceId" ] !== undefined ) { contents . NetworkInterfaceId = __expectString ( output [ "networkInterfaceId" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "packetLength" ] !== undefined ) { contents . PacketLength = __strictParseInt32 ( output [ "packetLength" ] ) as number ; } if ( output [ "sessionNumber" ] !== undefined ) { contents . SessionNumber = __strictParseInt32 ( output [ "sessionNumber" ] ) as number ; } if ( output [ "virtualNetworkId" ] !== undefined ) { contents . VirtualNetworkId = __strictParseInt32 ( output [ "virtualNetworkId" ] ) as number ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TrafficMirrorSessionSet = ( output , context ) : TrafficMirrorSession [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TrafficMirrorSession ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TrafficMirrorTarget = ( output , context ) : TrafficMirrorTarget => { const contents = { TrafficMirrorTargetId : undefined , NetworkInterfaceId : undefined , NetworkLoadBalancerArn : undefined , Type : undefined , Description : undefined , OwnerId : undefined , Tags : undefined , } ; if ( output [ "trafficMirrorTargetId" ] !== undefined ) { contents . TrafficMirrorTargetId = __expectString ( output [ "trafficMirrorTargetId" ] ) ; } if ( output [ "networkInterfaceId" ] !== undefined ) { contents . NetworkInterfaceId = __expectString ( output [ "networkInterfaceId" ] ) ; } if ( output [ "networkLoadBalancerArn" ] !== undefined ) { contents . NetworkLoadBalancerArn = __expectString ( output [ "networkLoadBalancerArn" ] ) ; } if ( output [ "type" ] !== undefined ) { contents . Type = __expectString ( output [ "type" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TrafficMirrorTargetSet = ( output , context ) : TrafficMirrorTarget [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TrafficMirrorTarget ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGateway = ( output , context ) : TransitGateway => { const contents = { TransitGatewayId : undefined , TransitGatewayArn : undefined , State : undefined , OwnerId : undefined , Description : undefined , CreationTime : undefined , Options : undefined , Tags : undefined , } ; if ( output [ "transitGatewayId" ] !== undefined ) { contents . TransitGatewayId = __expectString ( output [ "transitGatewayId" ] ) ; } if ( output [ "transitGatewayArn" ] !== undefined ) { contents . TransitGatewayArn = __expectString ( output [ "transitGatewayArn" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "creationTime" ] !== undefined ) { contents . CreationTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "creationTime" ] ) ) ; } if ( output [ "options" ] !== undefined ) { contents . Options = deserializeAws_ec2TransitGatewayOptions ( output [ "options" ] , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayAssociation = ( output , context ) : TransitGatewayAssociation => { const contents = { TransitGatewayRouteTableId : undefined , TransitGatewayAttachmentId : undefined , ResourceId : undefined , ResourceType : undefined , State : undefined , } ; if ( output [ "transitGatewayRouteTableId" ] !== undefined ) { contents . TransitGatewayRouteTableId = __expectString ( output [ "transitGatewayRouteTableId" ] ) ; } if ( output [ "transitGatewayAttachmentId" ] !== undefined ) { contents . TransitGatewayAttachmentId = __expectString ( output [ "transitGatewayAttachmentId" ] ) ; } if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayAttachment = ( output , context ) : TransitGatewayAttachment => { const contents = { TransitGatewayAttachmentId : undefined , TransitGatewayId : undefined , TransitGatewayOwnerId : undefined , ResourceOwnerId : undefined , ResourceType : undefined , ResourceId : undefined , State : undefined , Association : undefined , CreationTime : undefined , Tags : undefined , } ; if ( output [ "transitGatewayAttachmentId" ] !== undefined ) { contents . TransitGatewayAttachmentId = __expectString ( output [ "transitGatewayAttachmentId" ] ) ; } if ( output [ "transitGatewayId" ] !== undefined ) { contents . TransitGatewayId = __expectString ( output [ "transitGatewayId" ] ) ; } if ( output [ "transitGatewayOwnerId" ] !== undefined ) { contents . TransitGatewayOwnerId = __expectString ( output [ "transitGatewayOwnerId" ] ) ; } if ( output [ "resourceOwnerId" ] !== undefined ) { contents . ResourceOwnerId = __expectString ( output [ "resourceOwnerId" ] ) ; } if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "association" ] !== undefined ) { contents . Association = deserializeAws_ec2TransitGatewayAttachmentAssociation ( output [ "association" ] , context ) ; } if ( output [ "creationTime" ] !== undefined ) { contents . CreationTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "creationTime" ] ) ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayAttachmentAssociation = ( output , context ) : TransitGatewayAttachmentAssociation => { const contents = { TransitGatewayRouteTableId : undefined , State : undefined , } ; if ( output [ "transitGatewayRouteTableId" ] !== undefined ) { contents . TransitGatewayRouteTableId = __expectString ( output [ "transitGatewayRouteTableId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayAttachmentBgpConfiguration = ( output , context ) : TransitGatewayAttachmentBgpConfiguration => { const contents = { TransitGatewayAsn : undefined , PeerAsn : undefined , TransitGatewayAddress : undefined , PeerAddress : undefined , BgpStatus : undefined , } ; if ( output [ "transitGatewayAsn" ] !== undefined ) { contents . TransitGatewayAsn = __strictParseLong ( output [ "transitGatewayAsn" ] ) as number ; } if ( output [ "peerAsn" ] !== undefined ) { contents . PeerAsn = __strictParseLong ( output [ "peerAsn" ] ) as number ; } if ( output [ "transitGatewayAddress" ] !== undefined ) { contents . TransitGatewayAddress = __expectString ( output [ "transitGatewayAddress" ] ) ; } if ( output [ "peerAddress" ] !== undefined ) { contents . PeerAddress = __expectString ( output [ "peerAddress" ] ) ; } if ( output [ "bgpStatus" ] !== undefined ) { contents . BgpStatus = __expectString ( output [ "bgpStatus" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayAttachmentBgpConfigurationList = ( output , context ) : TransitGatewayAttachmentBgpConfiguration [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGatewayAttachmentBgpConfiguration ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayAttachmentList = ( output , context ) : TransitGatewayAttachment [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGatewayAttachment ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayAttachmentPropagation = ( output , context ) : TransitGatewayAttachmentPropagation => { const contents = { TransitGatewayRouteTableId : undefined , State : undefined , } ; if ( output [ "transitGatewayRouteTableId" ] !== undefined ) { contents . TransitGatewayRouteTableId = __expectString ( output [ "transitGatewayRouteTableId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayAttachmentPropagationList = ( output , context ) : TransitGatewayAttachmentPropagation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGatewayAttachmentPropagation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayConnect = ( output , context ) : TransitGatewayConnect => { const contents = { TransitGatewayAttachmentId : undefined , TransportTransitGatewayAttachmentId : undefined , TransitGatewayId : undefined , State : undefined , CreationTime : undefined , Options : undefined , Tags : undefined , } ; if ( output [ "transitGatewayAttachmentId" ] !== undefined ) { contents . TransitGatewayAttachmentId = __expectString ( output [ "transitGatewayAttachmentId" ] ) ; } if ( output [ "transportTransitGatewayAttachmentId" ] !== undefined ) { contents . TransportTransitGatewayAttachmentId = __expectString ( output [ "transportTransitGatewayAttachmentId" ] ) ; } if ( output [ "transitGatewayId" ] !== undefined ) { contents . TransitGatewayId = __expectString ( output [ "transitGatewayId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "creationTime" ] !== undefined ) { contents . CreationTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "creationTime" ] ) ) ; } if ( output [ "options" ] !== undefined ) { contents . Options = deserializeAws_ec2TransitGatewayConnectOptions ( output [ "options" ] , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayConnectList = ( output , context ) : TransitGatewayConnect [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGatewayConnect ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayConnectOptions = ( output , context ) : TransitGatewayConnectOptions => { const contents = { Protocol : undefined , } ; if ( output [ "protocol" ] !== undefined ) { contents . Protocol = __expectString ( output [ "protocol" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayConnectPeer = ( output , context ) : TransitGatewayConnectPeer => { const contents = { TransitGatewayAttachmentId : undefined , TransitGatewayConnectPeerId : undefined , State : undefined , CreationTime : undefined , ConnectPeerConfiguration : undefined , Tags : undefined , } ; if ( output [ "transitGatewayAttachmentId" ] !== undefined ) { contents . TransitGatewayAttachmentId = __expectString ( output [ "transitGatewayAttachmentId" ] ) ; } if ( output [ "transitGatewayConnectPeerId" ] !== undefined ) { contents . TransitGatewayConnectPeerId = __expectString ( output [ "transitGatewayConnectPeerId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "creationTime" ] !== undefined ) { contents . CreationTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "creationTime" ] ) ) ; } if ( output [ "connectPeerConfiguration" ] !== undefined ) { contents . ConnectPeerConfiguration = deserializeAws_ec2TransitGatewayConnectPeerConfiguration ( output [ "connectPeerConfiguration" ] , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayConnectPeerConfiguration = ( output , context ) : TransitGatewayConnectPeerConfiguration => { const contents = { TransitGatewayAddress : undefined , PeerAddress : undefined , InsideCidrBlocks : undefined , Protocol : undefined , BgpConfigurations : undefined , } ; if ( output [ "transitGatewayAddress" ] !== undefined ) { contents . TransitGatewayAddress = __expectString ( output [ "transitGatewayAddress" ] ) ; } if ( output [ "peerAddress" ] !== undefined ) { contents . PeerAddress = __expectString ( output [ "peerAddress" ] ) ; } if ( output . insideCidrBlocks === "" ) { contents . InsideCidrBlocks = [ ] ; } if ( output [ "insideCidrBlocks" ] !== undefined && output [ "insideCidrBlocks" ] [ "item" ] !== undefined ) { contents . InsideCidrBlocks = deserializeAws_ec2InsideCidrBlocksStringList ( __getArrayIfSingleItem ( output [ "insideCidrBlocks" ] [ "item" ] ) , context ) ; } if ( output [ "protocol" ] !== undefined ) { contents . Protocol = __expectString ( output [ "protocol" ] ) ; } if ( output . bgpConfigurations === "" ) { contents . BgpConfigurations = [ ] ; } if ( output [ "bgpConfigurations" ] !== undefined && output [ "bgpConfigurations" ] [ "item" ] !== undefined ) { contents . BgpConfigurations = deserializeAws_ec2TransitGatewayAttachmentBgpConfigurationList ( __getArrayIfSingleItem ( output [ "bgpConfigurations" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayConnectPeerList = ( output , context ) : TransitGatewayConnectPeer [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGatewayConnectPeer ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayList = ( output , context ) : TransitGateway [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGateway ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayMulticastDeregisteredGroupMembers = ( output , context ) : TransitGatewayMulticastDeregisteredGroupMembers => { const contents = { TransitGatewayMulticastDomainId : undefined , DeregisteredNetworkInterfaceIds : undefined , GroupIpAddress : undefined , } ; if ( output [ "transitGatewayMulticastDomainId" ] !== undefined ) { contents . TransitGatewayMulticastDomainId = __expectString ( output [ "transitGatewayMulticastDomainId" ] ) ; } if ( output . deregisteredNetworkInterfaceIds === "" ) { contents . DeregisteredNetworkInterfaceIds = [ ] ; } if ( output [ "deregisteredNetworkInterfaceIds" ] !== undefined && output [ "deregisteredNetworkInterfaceIds" ] [ "item" ] !== undefined ) { contents . DeregisteredNetworkInterfaceIds = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "deregisteredNetworkInterfaceIds" ] [ "item" ] ) , context ) ; } if ( output [ "groupIpAddress" ] !== undefined ) { contents . GroupIpAddress = __expectString ( output [ "groupIpAddress" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayMulticastDeregisteredGroupSources = ( output , context ) : TransitGatewayMulticastDeregisteredGroupSources => { const contents = { TransitGatewayMulticastDomainId : undefined , DeregisteredNetworkInterfaceIds : undefined , GroupIpAddress : undefined , } ; if ( output [ "transitGatewayMulticastDomainId" ] !== undefined ) { contents . TransitGatewayMulticastDomainId = __expectString ( output [ "transitGatewayMulticastDomainId" ] ) ; } if ( output . deregisteredNetworkInterfaceIds === "" ) { contents . DeregisteredNetworkInterfaceIds = [ ] ; } if ( output [ "deregisteredNetworkInterfaceIds" ] !== undefined && output [ "deregisteredNetworkInterfaceIds" ] [ "item" ] !== undefined ) { contents . DeregisteredNetworkInterfaceIds = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "deregisteredNetworkInterfaceIds" ] [ "item" ] ) , context ) ; } if ( output [ "groupIpAddress" ] !== undefined ) { contents . GroupIpAddress = __expectString ( output [ "groupIpAddress" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayMulticastDomain = ( output , context ) : TransitGatewayMulticastDomain => { const contents = { TransitGatewayMulticastDomainId : undefined , TransitGatewayId : undefined , TransitGatewayMulticastDomainArn : undefined , OwnerId : undefined , Options : undefined , State : undefined , CreationTime : undefined , Tags : undefined , } ; if ( output [ "transitGatewayMulticastDomainId" ] !== undefined ) { contents . TransitGatewayMulticastDomainId = __expectString ( output [ "transitGatewayMulticastDomainId" ] ) ; } if ( output [ "transitGatewayId" ] !== undefined ) { contents . TransitGatewayId = __expectString ( output [ "transitGatewayId" ] ) ; } if ( output [ "transitGatewayMulticastDomainArn" ] !== undefined ) { contents . TransitGatewayMulticastDomainArn = __expectString ( output [ "transitGatewayMulticastDomainArn" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "options" ] !== undefined ) { contents . Options = deserializeAws_ec2TransitGatewayMulticastDomainOptions ( output [ "options" ] , context ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "creationTime" ] !== undefined ) { contents . CreationTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "creationTime" ] ) ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayMulticastDomainAssociation = ( output , context ) : TransitGatewayMulticastDomainAssociation => { const contents = { TransitGatewayAttachmentId : undefined , ResourceId : undefined , ResourceType : undefined , ResourceOwnerId : undefined , Subnet : undefined , } ; if ( output [ "transitGatewayAttachmentId" ] !== undefined ) { contents . TransitGatewayAttachmentId = __expectString ( output [ "transitGatewayAttachmentId" ] ) ; } if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } if ( output [ "resourceOwnerId" ] !== undefined ) { contents . ResourceOwnerId = __expectString ( output [ "resourceOwnerId" ] ) ; } if ( output [ "subnet" ] !== undefined ) { contents . Subnet = deserializeAws_ec2SubnetAssociation ( output [ "subnet" ] , context ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayMulticastDomainAssociationList = ( output , context ) : TransitGatewayMulticastDomainAssociation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGatewayMulticastDomainAssociation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayMulticastDomainAssociations = ( output , context ) : TransitGatewayMulticastDomainAssociations => { const contents = { TransitGatewayMulticastDomainId : undefined , TransitGatewayAttachmentId : undefined , ResourceId : undefined , ResourceType : undefined , ResourceOwnerId : undefined , Subnets : undefined , } ; if ( output [ "transitGatewayMulticastDomainId" ] !== undefined ) { contents . TransitGatewayMulticastDomainId = __expectString ( output [ "transitGatewayMulticastDomainId" ] ) ; } if ( output [ "transitGatewayAttachmentId" ] !== undefined ) { contents . TransitGatewayAttachmentId = __expectString ( output [ "transitGatewayAttachmentId" ] ) ; } if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } if ( output [ "resourceOwnerId" ] !== undefined ) { contents . ResourceOwnerId = __expectString ( output [ "resourceOwnerId" ] ) ; } if ( output . subnets === "" ) { contents . Subnets = [ ] ; } if ( output [ "subnets" ] !== undefined && output [ "subnets" ] [ "item" ] !== undefined ) { contents . Subnets = deserializeAws_ec2SubnetAssociationList ( __getArrayIfSingleItem ( output [ "subnets" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayMulticastDomainList = ( output , context ) : TransitGatewayMulticastDomain [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGatewayMulticastDomain ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayMulticastDomainOptions = ( output , context ) : TransitGatewayMulticastDomainOptions => { const contents = { Igmpv2Support : undefined , StaticSourcesSupport : undefined , AutoAcceptSharedAssociations : undefined , } ; if ( output [ "igmpv2Support" ] !== undefined ) { contents . Igmpv2Support = __expectString ( output [ "igmpv2Support" ] ) ; } if ( output [ "staticSourcesSupport" ] !== undefined ) { contents . StaticSourcesSupport = __expectString ( output [ "staticSourcesSupport" ] ) ; } if ( output [ "autoAcceptSharedAssociations" ] !== undefined ) { contents . AutoAcceptSharedAssociations = __expectString ( output [ "autoAcceptSharedAssociations" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayMulticastGroup = ( output , context ) : TransitGatewayMulticastGroup => { const contents = { GroupIpAddress : undefined , TransitGatewayAttachmentId : undefined , SubnetId : undefined , ResourceId : undefined , ResourceType : undefined , ResourceOwnerId : undefined , NetworkInterfaceId : undefined , GroupMember : undefined , GroupSource : undefined , MemberType : undefined , SourceType : undefined , } ; if ( output [ "groupIpAddress" ] !== undefined ) { contents . GroupIpAddress = __expectString ( output [ "groupIpAddress" ] ) ; } if ( output [ "transitGatewayAttachmentId" ] !== undefined ) { contents . TransitGatewayAttachmentId = __expectString ( output [ "transitGatewayAttachmentId" ] ) ; } if ( output [ "subnetId" ] !== undefined ) { contents . SubnetId = __expectString ( output [ "subnetId" ] ) ; } if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } if ( output [ "resourceOwnerId" ] !== undefined ) { contents . ResourceOwnerId = __expectString ( output [ "resourceOwnerId" ] ) ; } if ( output [ "networkInterfaceId" ] !== undefined ) { contents . NetworkInterfaceId = __expectString ( output [ "networkInterfaceId" ] ) ; } if ( output [ "groupMember" ] !== undefined ) { contents . GroupMember = __parseBoolean ( output [ "groupMember" ] ) ; } if ( output [ "groupSource" ] !== undefined ) { contents . GroupSource = __parseBoolean ( output [ "groupSource" ] ) ; } if ( output [ "memberType" ] !== undefined ) { contents . MemberType = __expectString ( output [ "memberType" ] ) ; } if ( output [ "sourceType" ] !== undefined ) { contents . SourceType = __expectString ( output [ "sourceType" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayMulticastGroupList = ( output , context ) : TransitGatewayMulticastGroup [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGatewayMulticastGroup ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayMulticastRegisteredGroupMembers = ( output , context ) : TransitGatewayMulticastRegisteredGroupMembers => { const contents = { TransitGatewayMulticastDomainId : undefined , RegisteredNetworkInterfaceIds : undefined , GroupIpAddress : undefined , } ; if ( output [ "transitGatewayMulticastDomainId" ] !== undefined ) { contents . TransitGatewayMulticastDomainId = __expectString ( output [ "transitGatewayMulticastDomainId" ] ) ; } if ( output . registeredNetworkInterfaceIds === "" ) { contents . RegisteredNetworkInterfaceIds = [ ] ; } if ( output [ "registeredNetworkInterfaceIds" ] !== undefined && output [ "registeredNetworkInterfaceIds" ] [ "item" ] !== undefined ) { contents . RegisteredNetworkInterfaceIds = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "registeredNetworkInterfaceIds" ] [ "item" ] ) , context ) ; } if ( output [ "groupIpAddress" ] !== undefined ) { contents . GroupIpAddress = __expectString ( output [ "groupIpAddress" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayMulticastRegisteredGroupSources = ( output , context ) : TransitGatewayMulticastRegisteredGroupSources => { const contents = { TransitGatewayMulticastDomainId : undefined , RegisteredNetworkInterfaceIds : undefined , GroupIpAddress : undefined , } ; if ( output [ "transitGatewayMulticastDomainId" ] !== undefined ) { contents . TransitGatewayMulticastDomainId = __expectString ( output [ "transitGatewayMulticastDomainId" ] ) ; } if ( output . registeredNetworkInterfaceIds === "" ) { contents . RegisteredNetworkInterfaceIds = [ ] ; } if ( output [ "registeredNetworkInterfaceIds" ] !== undefined && output [ "registeredNetworkInterfaceIds" ] [ "item" ] !== undefined ) { contents . RegisteredNetworkInterfaceIds = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "registeredNetworkInterfaceIds" ] [ "item" ] ) , context ) ; } if ( output [ "groupIpAddress" ] !== undefined ) { contents . GroupIpAddress = __expectString ( output [ "groupIpAddress" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayOptions = ( output , context ) : TransitGatewayOptions => { const contents = { AmazonSideAsn : undefined , TransitGatewayCidrBlocks : undefined , AutoAcceptSharedAttachments : undefined , DefaultRouteTableAssociation : undefined , AssociationDefaultRouteTableId : undefined , DefaultRouteTablePropagation : undefined , PropagationDefaultRouteTableId : undefined , VpnEcmpSupport : undefined , DnsSupport : undefined , MulticastSupport : undefined , } ; if ( output [ "amazonSideAsn" ] !== undefined ) { contents . AmazonSideAsn = __strictParseLong ( output [ "amazonSideAsn" ] ) as number ; } if ( output . transitGatewayCidrBlocks === "" ) { contents . TransitGatewayCidrBlocks = [ ] ; } if ( output [ "transitGatewayCidrBlocks" ] !== undefined && output [ "transitGatewayCidrBlocks" ] [ "item" ] !== undefined ) { contents . TransitGatewayCidrBlocks = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "transitGatewayCidrBlocks" ] [ "item" ] ) , context ) ; } if ( output [ "autoAcceptSharedAttachments" ] !== undefined ) { contents . AutoAcceptSharedAttachments = __expectString ( output [ "autoAcceptSharedAttachments" ] ) ; } if ( output [ "defaultRouteTableAssociation" ] !== undefined ) { contents . DefaultRouteTableAssociation = __expectString ( output [ "defaultRouteTableAssociation" ] ) ; } if ( output [ "associationDefaultRouteTableId" ] !== undefined ) { contents . AssociationDefaultRouteTableId = __expectString ( output [ "associationDefaultRouteTableId" ] ) ; } if ( output [ "defaultRouteTablePropagation" ] !== undefined ) { contents . DefaultRouteTablePropagation = __expectString ( output [ "defaultRouteTablePropagation" ] ) ; } if ( output [ "propagationDefaultRouteTableId" ] !== undefined ) { contents . PropagationDefaultRouteTableId = __expectString ( output [ "propagationDefaultRouteTableId" ] ) ; } if ( output [ "vpnEcmpSupport" ] !== undefined ) { contents . VpnEcmpSupport = __expectString ( output [ "vpnEcmpSupport" ] ) ; } if ( output [ "dnsSupport" ] !== undefined ) { contents . DnsSupport = __expectString ( output [ "dnsSupport" ] ) ; } if ( output [ "multicastSupport" ] !== undefined ) { contents . MulticastSupport = __expectString ( output [ "multicastSupport" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayPeeringAttachment = ( output , context ) : TransitGatewayPeeringAttachment => { const contents = { TransitGatewayAttachmentId : undefined , RequesterTgwInfo : undefined , AccepterTgwInfo : undefined , Status : undefined , State : undefined , CreationTime : undefined , Tags : undefined , } ; if ( output [ "transitGatewayAttachmentId" ] !== undefined ) { contents . TransitGatewayAttachmentId = __expectString ( output [ "transitGatewayAttachmentId" ] ) ; } if ( output [ "requesterTgwInfo" ] !== undefined ) { contents . RequesterTgwInfo = deserializeAws_ec2PeeringTgwInfo ( output [ "requesterTgwInfo" ] , context ) ; } if ( output [ "accepterTgwInfo" ] !== undefined ) { contents . AccepterTgwInfo = deserializeAws_ec2PeeringTgwInfo ( output [ "accepterTgwInfo" ] , context ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2PeeringAttachmentStatus ( output [ "status" ] , context ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "creationTime" ] !== undefined ) { contents . CreationTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "creationTime" ] ) ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayPeeringAttachmentList = ( output , context ) : TransitGatewayPeeringAttachment [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGatewayPeeringAttachment ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayPrefixListAttachment = ( output , context ) : TransitGatewayPrefixListAttachment => { const contents = { TransitGatewayAttachmentId : undefined , ResourceType : undefined , ResourceId : undefined , } ; if ( output [ "transitGatewayAttachmentId" ] !== undefined ) { contents . TransitGatewayAttachmentId = __expectString ( output [ "transitGatewayAttachmentId" ] ) ; } if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayPrefixListReference = ( output , context ) : TransitGatewayPrefixListReference => { const contents = { TransitGatewayRouteTableId : undefined , PrefixListId : undefined , PrefixListOwnerId : undefined , State : undefined , Blackhole : undefined , TransitGatewayAttachment : undefined , } ; if ( output [ "transitGatewayRouteTableId" ] !== undefined ) { contents . TransitGatewayRouteTableId = __expectString ( output [ "transitGatewayRouteTableId" ] ) ; } if ( output [ "prefixListId" ] !== undefined ) { contents . PrefixListId = __expectString ( output [ "prefixListId" ] ) ; } if ( output [ "prefixListOwnerId" ] !== undefined ) { contents . PrefixListOwnerId = __expectString ( output [ "prefixListOwnerId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "blackhole" ] !== undefined ) { contents . Blackhole = __parseBoolean ( output [ "blackhole" ] ) ; } if ( output [ "transitGatewayAttachment" ] !== undefined ) { contents . TransitGatewayAttachment = deserializeAws_ec2TransitGatewayPrefixListAttachment ( output [ "transitGatewayAttachment" ] , context ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayPrefixListReferenceSet = ( output , context ) : TransitGatewayPrefixListReference [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGatewayPrefixListReference ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayPropagation = ( output , context ) : TransitGatewayPropagation => { const contents = { TransitGatewayAttachmentId : undefined , ResourceId : undefined , ResourceType : undefined , TransitGatewayRouteTableId : undefined , State : undefined , } ; if ( output [ "transitGatewayAttachmentId" ] !== undefined ) { contents . TransitGatewayAttachmentId = __expectString ( output [ "transitGatewayAttachmentId" ] ) ; } if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } if ( output [ "transitGatewayRouteTableId" ] !== undefined ) { contents . TransitGatewayRouteTableId = __expectString ( output [ "transitGatewayRouteTableId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayRoute = ( output , context ) : TransitGatewayRoute => { const contents = { DestinationCidrBlock : undefined , PrefixListId : undefined , TransitGatewayAttachments : undefined , Type : undefined , State : undefined , } ; if ( output [ "destinationCidrBlock" ] !== undefined ) { contents . DestinationCidrBlock = __expectString ( output [ "destinationCidrBlock" ] ) ; } if ( output [ "prefixListId" ] !== undefined ) { contents . PrefixListId = __expectString ( output [ "prefixListId" ] ) ; } if ( output . transitGatewayAttachments === "" ) { contents . TransitGatewayAttachments = [ ] ; } if ( output [ "transitGatewayAttachments" ] !== undefined && output [ "transitGatewayAttachments" ] [ "item" ] !== undefined ) { contents . TransitGatewayAttachments = deserializeAws_ec2TransitGatewayRouteAttachmentList ( __getArrayIfSingleItem ( output [ "transitGatewayAttachments" ] [ "item" ] ) , context ) ; } if ( output [ "type" ] !== undefined ) { contents . Type = __expectString ( output [ "type" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayRouteAttachment = ( output , context ) : TransitGatewayRouteAttachment => { const contents = { ResourceId : undefined , TransitGatewayAttachmentId : undefined , ResourceType : undefined , } ; if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } if ( output [ "transitGatewayAttachmentId" ] !== undefined ) { contents . TransitGatewayAttachmentId = __expectString ( output [ "transitGatewayAttachmentId" ] ) ; } if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayRouteAttachmentList = ( output , context ) : TransitGatewayRouteAttachment [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGatewayRouteAttachment ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayRouteList = ( output , context ) : TransitGatewayRoute [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGatewayRoute ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayRouteTable = ( output , context ) : TransitGatewayRouteTable => { const contents = { TransitGatewayRouteTableId : undefined , TransitGatewayId : undefined , State : undefined , DefaultAssociationRouteTable : undefined , DefaultPropagationRouteTable : undefined , CreationTime : undefined , Tags : undefined , } ; if ( output [ "transitGatewayRouteTableId" ] !== undefined ) { contents . TransitGatewayRouteTableId = __expectString ( output [ "transitGatewayRouteTableId" ] ) ; } if ( output [ "transitGatewayId" ] !== undefined ) { contents . TransitGatewayId = __expectString ( output [ "transitGatewayId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "defaultAssociationRouteTable" ] !== undefined ) { contents . DefaultAssociationRouteTable = __parseBoolean ( output [ "defaultAssociationRouteTable" ] ) ; } if ( output [ "defaultPropagationRouteTable" ] !== undefined ) { contents . DefaultPropagationRouteTable = __parseBoolean ( output [ "defaultPropagationRouteTable" ] ) ; } if ( output [ "creationTime" ] !== undefined ) { contents . CreationTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "creationTime" ] ) ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayRouteTableAssociation = ( output , context ) : TransitGatewayRouteTableAssociation => { const contents = { TransitGatewayAttachmentId : undefined , ResourceId : undefined , ResourceType : undefined , State : undefined , } ; if ( output [ "transitGatewayAttachmentId" ] !== undefined ) { contents . TransitGatewayAttachmentId = __expectString ( output [ "transitGatewayAttachmentId" ] ) ; } if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayRouteTableAssociationList = ( output , context ) : TransitGatewayRouteTableAssociation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGatewayRouteTableAssociation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayRouteTableList = ( output , context ) : TransitGatewayRouteTable [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGatewayRouteTable ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayRouteTablePropagation = ( output , context ) : TransitGatewayRouteTablePropagation => { const contents = { TransitGatewayAttachmentId : undefined , ResourceId : undefined , ResourceType : undefined , State : undefined , } ; if ( output [ "transitGatewayAttachmentId" ] !== undefined ) { contents . TransitGatewayAttachmentId = __expectString ( output [ "transitGatewayAttachmentId" ] ) ; } if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } if ( output [ "resourceType" ] !== undefined ) { contents . ResourceType = __expectString ( output [ "resourceType" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayRouteTablePropagationList = ( output , context ) : TransitGatewayRouteTablePropagation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGatewayRouteTablePropagation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayVpcAttachment = ( output , context ) : TransitGatewayVpcAttachment => { const contents = { TransitGatewayAttachmentId : undefined , TransitGatewayId : undefined , VpcId : undefined , VpcOwnerId : undefined , State : undefined , SubnetIds : undefined , CreationTime : undefined , Options : undefined , Tags : undefined , } ; if ( output [ "transitGatewayAttachmentId" ] !== undefined ) { contents . TransitGatewayAttachmentId = __expectString ( output [ "transitGatewayAttachmentId" ] ) ; } if ( output [ "transitGatewayId" ] !== undefined ) { contents . TransitGatewayId = __expectString ( output [ "transitGatewayId" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "vpcOwnerId" ] !== undefined ) { contents . VpcOwnerId = __expectString ( output [ "vpcOwnerId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output . subnetIds === "" ) { contents . SubnetIds = [ ] ; } if ( output [ "subnetIds" ] !== undefined && output [ "subnetIds" ] [ "item" ] !== undefined ) { contents . SubnetIds = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "subnetIds" ] [ "item" ] ) , context ) ; } if ( output [ "creationTime" ] !== undefined ) { contents . CreationTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "creationTime" ] ) ) ; } if ( output [ "options" ] !== undefined ) { contents . Options = deserializeAws_ec2TransitGatewayVpcAttachmentOptions ( output [ "options" ] , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TransitGatewayVpcAttachmentList = ( output , context ) : TransitGatewayVpcAttachment [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TransitGatewayVpcAttachment ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TransitGatewayVpcAttachmentOptions = ( output , context ) : TransitGatewayVpcAttachmentOptions => { const contents = { DnsSupport : undefined , Ipv6Support : undefined , ApplianceModeSupport : undefined , } ; if ( output [ "dnsSupport" ] !== undefined ) { contents . DnsSupport = __expectString ( output [ "dnsSupport" ] ) ; } if ( output [ "ipv6Support" ] !== undefined ) { contents . Ipv6Support = __expectString ( output [ "ipv6Support" ] ) ; } if ( output [ "applianceModeSupport" ] !== undefined ) { contents . ApplianceModeSupport = __expectString ( output [ "applianceModeSupport" ] ) ; } return contents ; } ; const deserializeAws_ec2TrunkInterfaceAssociation = ( output , context ) : TrunkInterfaceAssociation => { const contents = { AssociationId : undefined , BranchInterfaceId : undefined , TrunkInterfaceId : undefined , InterfaceProtocol : undefined , VlanId : undefined , GreKey : undefined , Tags : undefined , } ; if ( output [ "associationId" ] !== undefined ) { contents . AssociationId = __expectString ( output [ "associationId" ] ) ; } if ( output [ "branchInterfaceId" ] !== undefined ) { contents . BranchInterfaceId = __expectString ( output [ "branchInterfaceId" ] ) ; } if ( output [ "trunkInterfaceId" ] !== undefined ) { contents . TrunkInterfaceId = __expectString ( output [ "trunkInterfaceId" ] ) ; } if ( output [ "interfaceProtocol" ] !== undefined ) { contents . InterfaceProtocol = __expectString ( output [ "interfaceProtocol" ] ) ; } if ( output [ "vlanId" ] !== undefined ) { contents . VlanId = __strictParseInt32 ( output [ "vlanId" ] ) as number ; } if ( output [ "greKey" ] !== undefined ) { contents . GreKey = __strictParseInt32 ( output [ "greKey" ] ) as number ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2TrunkInterfaceAssociationList = ( output , context ) : TrunkInterfaceAssociation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TrunkInterfaceAssociation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2TunnelOption = ( output , context ) : TunnelOption => { const contents = { OutsideIpAddress : undefined , TunnelInsideCidr : undefined , TunnelInsideIpv6Cidr : undefined , PreSharedKey : undefined , Phase1LifetimeSeconds : undefined , Phase2LifetimeSeconds : undefined , RekeyMarginTimeSeconds : undefined , RekeyFuzzPercentage : undefined , ReplayWindowSize : undefined , DpdTimeoutSeconds : undefined , DpdTimeoutAction : undefined , Phase1EncryptionAlgorithms : undefined , Phase2EncryptionAlgorithms : undefined , Phase1IntegrityAlgorithms : undefined , Phase2IntegrityAlgorithms : undefined , Phase1DHGroupNumbers : undefined , Phase2DHGroupNumbers : undefined , IkeVersions : undefined , StartupAction : undefined , } ; if ( output [ "outsideIpAddress" ] !== undefined ) { contents . OutsideIpAddress = __expectString ( output [ "outsideIpAddress" ] ) ; } if ( output [ "tunnelInsideCidr" ] !== undefined ) { contents . TunnelInsideCidr = __expectString ( output [ "tunnelInsideCidr" ] ) ; } if ( output [ "tunnelInsideIpv6Cidr" ] !== undefined ) { contents . TunnelInsideIpv6Cidr = __expectString ( output [ "tunnelInsideIpv6Cidr" ] ) ; } if ( output [ "preSharedKey" ] !== undefined ) { contents . PreSharedKey = __expectString ( output [ "preSharedKey" ] ) ; } if ( output [ "phase1LifetimeSeconds" ] !== undefined ) { contents . Phase1LifetimeSeconds = __strictParseInt32 ( output [ "phase1LifetimeSeconds" ] ) as number ; } if ( output [ "phase2LifetimeSeconds" ] !== undefined ) { contents . Phase2LifetimeSeconds = __strictParseInt32 ( output [ "phase2LifetimeSeconds" ] ) as number ; } if ( output [ "rekeyMarginTimeSeconds" ] !== undefined ) { contents . RekeyMarginTimeSeconds = __strictParseInt32 ( output [ "rekeyMarginTimeSeconds" ] ) as number ; } if ( output [ "rekeyFuzzPercentage" ] !== undefined ) { contents . RekeyFuzzPercentage = __strictParseInt32 ( output [ "rekeyFuzzPercentage" ] ) as number ; } if ( output [ "replayWindowSize" ] !== undefined ) { contents . ReplayWindowSize = __strictParseInt32 ( output [ "replayWindowSize" ] ) as number ; } if ( output [ "dpdTimeoutSeconds" ] !== undefined ) { contents . DpdTimeoutSeconds = __strictParseInt32 ( output [ "dpdTimeoutSeconds" ] ) as number ; } if ( output [ "dpdTimeoutAction" ] !== undefined ) { contents . DpdTimeoutAction = __expectString ( output [ "dpdTimeoutAction" ] ) ; } if ( output . phase1EncryptionAlgorithmSet === "" ) { contents . Phase1EncryptionAlgorithms = [ ] ; } if ( output [ "phase1EncryptionAlgorithmSet" ] !== undefined && output [ "phase1EncryptionAlgorithmSet" ] [ "item" ] !== undefined ) { contents . Phase1EncryptionAlgorithms = deserializeAws_ec2Phase1EncryptionAlgorithmsList ( __getArrayIfSingleItem ( output [ "phase1EncryptionAlgorithmSet" ] [ "item" ] ) , context ) ; } if ( output . phase2EncryptionAlgorithmSet === "" ) { contents . Phase2EncryptionAlgorithms = [ ] ; } if ( output [ "phase2EncryptionAlgorithmSet" ] !== undefined && output [ "phase2EncryptionAlgorithmSet" ] [ "item" ] !== undefined ) { contents . Phase2EncryptionAlgorithms = deserializeAws_ec2Phase2EncryptionAlgorithmsList ( __getArrayIfSingleItem ( output [ "phase2EncryptionAlgorithmSet" ] [ "item" ] ) , context ) ; } if ( output . phase1IntegrityAlgorithmSet === "" ) { contents . Phase1IntegrityAlgorithms = [ ] ; } if ( output [ "phase1IntegrityAlgorithmSet" ] !== undefined && output [ "phase1IntegrityAlgorithmSet" ] [ "item" ] !== undefined ) { contents . Phase1IntegrityAlgorithms = deserializeAws_ec2Phase1IntegrityAlgorithmsList ( __getArrayIfSingleItem ( output [ "phase1IntegrityAlgorithmSet" ] [ "item" ] ) , context ) ; } if ( output . phase2IntegrityAlgorithmSet === "" ) { contents . Phase2IntegrityAlgorithms = [ ] ; } if ( output [ "phase2IntegrityAlgorithmSet" ] !== undefined && output [ "phase2IntegrityAlgorithmSet" ] [ "item" ] !== undefined ) { contents . Phase2IntegrityAlgorithms = deserializeAws_ec2Phase2IntegrityAlgorithmsList ( __getArrayIfSingleItem ( output [ "phase2IntegrityAlgorithmSet" ] [ "item" ] ) , context ) ; } if ( output . phase1DHGroupNumberSet === "" ) { contents . Phase1DHGroupNumbers = [ ] ; } if ( output [ "phase1DHGroupNumberSet" ] !== undefined && output [ "phase1DHGroupNumberSet" ] [ "item" ] !== undefined ) { contents . Phase1DHGroupNumbers = deserializeAws_ec2Phase1DHGroupNumbersList ( __getArrayIfSingleItem ( output [ "phase1DHGroupNumberSet" ] [ "item" ] ) , context ) ; } if ( output . phase2DHGroupNumberSet === "" ) { contents . Phase2DHGroupNumbers = [ ] ; } if ( output [ "phase2DHGroupNumberSet" ] !== undefined && output [ "phase2DHGroupNumberSet" ] [ "item" ] !== undefined ) { contents . Phase2DHGroupNumbers = deserializeAws_ec2Phase2DHGroupNumbersList ( __getArrayIfSingleItem ( output [ "phase2DHGroupNumberSet" ] [ "item" ] ) , context ) ; } if ( output . ikeVersionSet === "" ) { contents . IkeVersions = [ ] ; } if ( output [ "ikeVersionSet" ] !== undefined && output [ "ikeVersionSet" ] [ "item" ] !== undefined ) { contents . IkeVersions = deserializeAws_ec2IKEVersionsList ( __getArrayIfSingleItem ( output [ "ikeVersionSet" ] [ "item" ] ) , context ) ; } if ( output [ "startupAction" ] !== undefined ) { contents . StartupAction = __expectString ( output [ "startupAction" ] ) ; } return contents ; } ; const deserializeAws_ec2TunnelOptionsList = ( output , context ) : TunnelOption [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2TunnelOption ( entry , context ) ; } ) ; } ; const deserializeAws_ec2UnassignIpv6AddressesResult = ( output , context ) : UnassignIpv6AddressesResult => { const contents = { NetworkInterfaceId : undefined , UnassignedIpv6Addresses : undefined , UnassignedIpv6Prefixes : undefined , } ; if ( output [ "networkInterfaceId" ] !== undefined ) { contents . NetworkInterfaceId = __expectString ( output [ "networkInterfaceId" ] ) ; } if ( output . unassignedIpv6Addresses === "" ) { contents . UnassignedIpv6Addresses = [ ] ; } if ( output [ "unassignedIpv6Addresses" ] !== undefined && output [ "unassignedIpv6Addresses" ] [ "item" ] !== undefined ) { contents . UnassignedIpv6Addresses = deserializeAws_ec2Ipv6AddressList ( __getArrayIfSingleItem ( output [ "unassignedIpv6Addresses" ] [ "item" ] ) , context ) ; } if ( output . unassignedIpv6PrefixSet === "" ) { contents . UnassignedIpv6Prefixes = [ ] ; } if ( output [ "unassignedIpv6PrefixSet" ] !== undefined && output [ "unassignedIpv6PrefixSet" ] [ "item" ] !== undefined ) { contents . UnassignedIpv6Prefixes = deserializeAws_ec2IpPrefixList ( __getArrayIfSingleItem ( output [ "unassignedIpv6PrefixSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2UnmonitorInstancesResult = ( output , context ) : UnmonitorInstancesResult => { const contents = { InstanceMonitorings : undefined , } ; if ( output . instancesSet === "" ) { contents . InstanceMonitorings = [ ] ; } if ( output [ "instancesSet" ] !== undefined && output [ "instancesSet" ] [ "item" ] !== undefined ) { contents . InstanceMonitorings = deserializeAws_ec2InstanceMonitoringList ( __getArrayIfSingleItem ( output [ "instancesSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2UnsuccessfulInstanceCreditSpecificationItem = ( output , context ) : UnsuccessfulInstanceCreditSpecificationItem => { const contents = { InstanceId : undefined , Error : undefined , } ; if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "error" ] !== undefined ) { contents . Error = deserializeAws_ec2UnsuccessfulInstanceCreditSpecificationItemError ( output [ "error" ] , context ) ; } return contents ; } ; const deserializeAws_ec2UnsuccessfulInstanceCreditSpecificationItemError = ( output , context ) : UnsuccessfulInstanceCreditSpecificationItemError => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2UnsuccessfulInstanceCreditSpecificationSet = ( output , context ) : UnsuccessfulInstanceCreditSpecificationItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2UnsuccessfulInstanceCreditSpecificationItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2UnsuccessfulItem = ( output , context ) : UnsuccessfulItem => { const contents = { Error : undefined , ResourceId : undefined , } ; if ( output [ "error" ] !== undefined ) { contents . Error = deserializeAws_ec2UnsuccessfulItemError ( output [ "error" ] , context ) ; } if ( output [ "resourceId" ] !== undefined ) { contents . ResourceId = __expectString ( output [ "resourceId" ] ) ; } return contents ; } ; const deserializeAws_ec2UnsuccessfulItemError = ( output , context ) : UnsuccessfulItemError => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2UnsuccessfulItemList = ( output , context ) : UnsuccessfulItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2UnsuccessfulItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2UnsuccessfulItemSet = ( output , context ) : UnsuccessfulItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2UnsuccessfulItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2UpdateSecurityGroupRuleDescriptionsEgressResult = ( output , context ) : UpdateSecurityGroupRuleDescriptionsEgressResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2UpdateSecurityGroupRuleDescriptionsIngressResult = ( output , context ) : UpdateSecurityGroupRuleDescriptionsIngressResult => { const contents = { Return : undefined , } ; if ( output [ "return" ] !== undefined ) { contents . Return = __parseBoolean ( output [ "return" ] ) ; } return contents ; } ; const deserializeAws_ec2UsageClassTypeList = ( output , context ) : ( UsageClassType | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_ec2UserBucketDetails = ( output , context ) : UserBucketDetails => { const contents = { S3Bucket : undefined , S3Key : undefined , } ; if ( output [ "s3Bucket" ] !== undefined ) { contents . S3Bucket = __expectString ( output [ "s3Bucket" ] ) ; } if ( output [ "s3Key" ] !== undefined ) { contents . S3Key = __expectString ( output [ "s3Key" ] ) ; } return contents ; } ; const deserializeAws_ec2UserIdGroupPair = ( output , context ) : UserIdGroupPair => { const contents = { Description : undefined , GroupId : undefined , GroupName : undefined , PeeringStatus : undefined , UserId : undefined , VpcId : undefined , VpcPeeringConnectionId : undefined , } ; if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "groupId" ] !== undefined ) { contents . GroupId = __expectString ( output [ "groupId" ] ) ; } if ( output [ "groupName" ] !== undefined ) { contents . GroupName = __expectString ( output [ "groupName" ] ) ; } if ( output [ "peeringStatus" ] !== undefined ) { contents . PeeringStatus = __expectString ( output [ "peeringStatus" ] ) ; } if ( output [ "userId" ] !== undefined ) { contents . UserId = __expectString ( output [ "userId" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "vpcPeeringConnectionId" ] !== undefined ) { contents . VpcPeeringConnectionId = __expectString ( output [ "vpcPeeringConnectionId" ] ) ; } return contents ; } ; const deserializeAws_ec2UserIdGroupPairList = ( output , context ) : UserIdGroupPair [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2UserIdGroupPair ( entry , context ) ; } ) ; } ; const deserializeAws_ec2UserIdGroupPairSet = ( output , context ) : UserIdGroupPair [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2UserIdGroupPair ( entry , context ) ; } ) ; } ; const deserializeAws_ec2ValidationError = ( output , context ) : ValidationError => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2ValidationWarning = ( output , context ) : ValidationWarning => { const contents = { Errors : undefined , } ; if ( output . errorSet === "" ) { contents . Errors = [ ] ; } if ( output [ "errorSet" ] !== undefined && output [ "errorSet" ] [ "item" ] !== undefined ) { contents . Errors = deserializeAws_ec2ErrorSet ( __getArrayIfSingleItem ( output [ "errorSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2ValueStringList = ( 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_ec2VCpuCountRange = ( output , context ) : VCpuCountRange => { const contents = { Min : undefined , Max : undefined , } ; if ( output [ "min" ] !== undefined ) { contents . Min = __strictParseInt32 ( output [ "min" ] ) as number ; } if ( output [ "max" ] !== undefined ) { contents . Max = __strictParseInt32 ( output [ "max" ] ) as number ; } return contents ; } ; const deserializeAws_ec2VCpuInfo = ( output , context ) : VCpuInfo => { const contents = { DefaultVCpus : undefined , DefaultCores : undefined , DefaultThreadsPerCore : undefined , ValidCores : undefined , ValidThreadsPerCore : undefined , } ; if ( output [ "defaultVCpus" ] !== undefined ) { contents . DefaultVCpus = __strictParseInt32 ( output [ "defaultVCpus" ] ) as number ; } if ( output [ "defaultCores" ] !== undefined ) { contents . DefaultCores = __strictParseInt32 ( output [ "defaultCores" ] ) as number ; } if ( output [ "defaultThreadsPerCore" ] !== undefined ) { contents . DefaultThreadsPerCore = __strictParseInt32 ( output [ "defaultThreadsPerCore" ] ) as number ; } if ( output . validCores === "" ) { contents . ValidCores = [ ] ; } if ( output [ "validCores" ] !== undefined && output [ "validCores" ] [ "item" ] !== undefined ) { contents . ValidCores = deserializeAws_ec2CoreCountList ( __getArrayIfSingleItem ( output [ "validCores" ] [ "item" ] ) , context ) ; } if ( output . validThreadsPerCore === "" ) { contents . ValidThreadsPerCore = [ ] ; } if ( output [ "validThreadsPerCore" ] !== undefined && output [ "validThreadsPerCore" ] [ "item" ] !== undefined ) { contents . ValidThreadsPerCore = deserializeAws_ec2ThreadsPerCoreList ( __getArrayIfSingleItem ( output [ "validThreadsPerCore" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2VgwTelemetry = ( output , context ) : VgwTelemetry => { const contents = { AcceptedRouteCount : undefined , LastStatusChange : undefined , OutsideIpAddress : undefined , Status : undefined , StatusMessage : undefined , CertificateArn : undefined , } ; if ( output [ "acceptedRouteCount" ] !== undefined ) { contents . AcceptedRouteCount = __strictParseInt32 ( output [ "acceptedRouteCount" ] ) as number ; } if ( output [ "lastStatusChange" ] !== undefined ) { contents . LastStatusChange = __expectNonNull ( __parseRfc3339DateTime ( output [ "lastStatusChange" ] ) ) ; } if ( output [ "outsideIpAddress" ] !== undefined ) { contents . OutsideIpAddress = __expectString ( output [ "outsideIpAddress" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output [ "certificateArn" ] !== undefined ) { contents . CertificateArn = __expectString ( output [ "certificateArn" ] ) ; } return contents ; } ; const deserializeAws_ec2VgwTelemetryList = ( output , context ) : VgwTelemetry [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VgwTelemetry ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VirtualizationTypeList = ( output , context ) : ( VirtualizationType | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_ec2Volume = ( output , context ) : Volume => { const contents = { Attachments : undefined , AvailabilityZone : undefined , CreateTime : undefined , Encrypted : undefined , KmsKeyId : undefined , OutpostArn : undefined , Size : undefined , SnapshotId : undefined , State : undefined , VolumeId : undefined , Iops : undefined , Tags : undefined , VolumeType : undefined , FastRestored : undefined , MultiAttachEnabled : undefined , Throughput : undefined , } ; if ( output . attachmentSet === "" ) { contents . Attachments = [ ] ; } if ( output [ "attachmentSet" ] !== undefined && output [ "attachmentSet" ] [ "item" ] !== undefined ) { contents . Attachments = deserializeAws_ec2VolumeAttachmentList ( __getArrayIfSingleItem ( output [ "attachmentSet" ] [ "item" ] ) , context ) ; } if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "createTime" ] !== undefined ) { contents . CreateTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "createTime" ] ) ) ; } if ( output [ "encrypted" ] !== undefined ) { contents . Encrypted = __parseBoolean ( output [ "encrypted" ] ) ; } if ( output [ "kmsKeyId" ] !== undefined ) { contents . KmsKeyId = __expectString ( output [ "kmsKeyId" ] ) ; } if ( output [ "outpostArn" ] !== undefined ) { contents . OutpostArn = __expectString ( output [ "outpostArn" ] ) ; } if ( output [ "size" ] !== undefined ) { contents . Size = __strictParseInt32 ( output [ "size" ] ) as number ; } if ( output [ "snapshotId" ] !== undefined ) { contents . SnapshotId = __expectString ( output [ "snapshotId" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . State = __expectString ( output [ "status" ] ) ; } if ( output [ "volumeId" ] !== undefined ) { contents . VolumeId = __expectString ( output [ "volumeId" ] ) ; } if ( output [ "iops" ] !== undefined ) { contents . Iops = __strictParseInt32 ( output [ "iops" ] ) as number ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "volumeType" ] !== undefined ) { contents . VolumeType = __expectString ( output [ "volumeType" ] ) ; } if ( output [ "fastRestored" ] !== undefined ) { contents . FastRestored = __parseBoolean ( output [ "fastRestored" ] ) ; } if ( output [ "multiAttachEnabled" ] !== undefined ) { contents . MultiAttachEnabled = __parseBoolean ( output [ "multiAttachEnabled" ] ) ; } if ( output [ "throughput" ] !== undefined ) { contents . Throughput = __strictParseInt32 ( output [ "throughput" ] ) as number ; } return contents ; } ; const deserializeAws_ec2VolumeAttachment = ( output , context ) : VolumeAttachment => { const contents = { AttachTime : undefined , Device : undefined , InstanceId : undefined , State : undefined , VolumeId : undefined , DeleteOnTermination : undefined , } ; if ( output [ "attachTime" ] !== undefined ) { contents . AttachTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "attachTime" ] ) ) ; } if ( output [ "device" ] !== undefined ) { contents . Device = __expectString ( output [ "device" ] ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . State = __expectString ( output [ "status" ] ) ; } if ( output [ "volumeId" ] !== undefined ) { contents . VolumeId = __expectString ( output [ "volumeId" ] ) ; } if ( output [ "deleteOnTermination" ] !== undefined ) { contents . DeleteOnTermination = __parseBoolean ( output [ "deleteOnTermination" ] ) ; } return contents ; } ; const deserializeAws_ec2VolumeAttachmentList = ( output , context ) : VolumeAttachment [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VolumeAttachment ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VolumeList = ( output , context ) : Volume [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Volume ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VolumeModification = ( output , context ) : VolumeModification => { const contents = { VolumeId : undefined , ModificationState : undefined , StatusMessage : undefined , TargetSize : undefined , TargetIops : undefined , TargetVolumeType : undefined , TargetThroughput : undefined , TargetMultiAttachEnabled : undefined , OriginalSize : undefined , OriginalIops : undefined , OriginalVolumeType : undefined , OriginalThroughput : undefined , OriginalMultiAttachEnabled : undefined , Progress : undefined , StartTime : undefined , EndTime : undefined , } ; if ( output [ "volumeId" ] !== undefined ) { contents . VolumeId = __expectString ( output [ "volumeId" ] ) ; } if ( output [ "modificationState" ] !== undefined ) { contents . ModificationState = __expectString ( output [ "modificationState" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } if ( output [ "targetSize" ] !== undefined ) { contents . TargetSize = __strictParseInt32 ( output [ "targetSize" ] ) as number ; } if ( output [ "targetIops" ] !== undefined ) { contents . TargetIops = __strictParseInt32 ( output [ "targetIops" ] ) as number ; } if ( output [ "targetVolumeType" ] !== undefined ) { contents . TargetVolumeType = __expectString ( output [ "targetVolumeType" ] ) ; } if ( output [ "targetThroughput" ] !== undefined ) { contents . TargetThroughput = __strictParseInt32 ( output [ "targetThroughput" ] ) as number ; } if ( output [ "targetMultiAttachEnabled" ] !== undefined ) { contents . TargetMultiAttachEnabled = __parseBoolean ( output [ "targetMultiAttachEnabled" ] ) ; } if ( output [ "originalSize" ] !== undefined ) { contents . OriginalSize = __strictParseInt32 ( output [ "originalSize" ] ) as number ; } if ( output [ "originalIops" ] !== undefined ) { contents . OriginalIops = __strictParseInt32 ( output [ "originalIops" ] ) as number ; } if ( output [ "originalVolumeType" ] !== undefined ) { contents . OriginalVolumeType = __expectString ( output [ "originalVolumeType" ] ) ; } if ( output [ "originalThroughput" ] !== undefined ) { contents . OriginalThroughput = __strictParseInt32 ( output [ "originalThroughput" ] ) as number ; } if ( output [ "originalMultiAttachEnabled" ] !== undefined ) { contents . OriginalMultiAttachEnabled = __parseBoolean ( output [ "originalMultiAttachEnabled" ] ) ; } if ( output [ "progress" ] !== undefined ) { contents . Progress = __strictParseLong ( output [ "progress" ] ) as number ; } if ( output [ "startTime" ] !== undefined ) { contents . StartTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "startTime" ] ) ) ; } if ( output [ "endTime" ] !== undefined ) { contents . EndTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "endTime" ] ) ) ; } return contents ; } ; const deserializeAws_ec2VolumeModificationList = ( output , context ) : VolumeModification [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VolumeModification ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VolumeStatusAction = ( output , context ) : VolumeStatusAction => { const contents = { Code : undefined , Description : undefined , EventId : undefined , EventType : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "eventId" ] !== undefined ) { contents . EventId = __expectString ( output [ "eventId" ] ) ; } if ( output [ "eventType" ] !== undefined ) { contents . EventType = __expectString ( output [ "eventType" ] ) ; } return contents ; } ; const deserializeAws_ec2VolumeStatusActionsList = ( output , context ) : VolumeStatusAction [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VolumeStatusAction ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VolumeStatusAttachmentStatus = ( output , context ) : VolumeStatusAttachmentStatus => { const contents = { IoPerformance : undefined , InstanceId : undefined , } ; if ( output [ "ioPerformance" ] !== undefined ) { contents . IoPerformance = __expectString ( output [ "ioPerformance" ] ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } return contents ; } ; const deserializeAws_ec2VolumeStatusAttachmentStatusList = ( output , context ) : VolumeStatusAttachmentStatus [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VolumeStatusAttachmentStatus ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VolumeStatusDetails = ( output , context ) : VolumeStatusDetails => { const contents = { Name : undefined , Status : undefined , } ; if ( output [ "name" ] !== undefined ) { contents . Name = __expectString ( output [ "name" ] ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } return contents ; } ; const deserializeAws_ec2VolumeStatusDetailsList = ( output , context ) : VolumeStatusDetails [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VolumeStatusDetails ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VolumeStatusEvent = ( output , context ) : VolumeStatusEvent => { const contents = { Description : undefined , EventId : undefined , EventType : undefined , NotAfter : undefined , NotBefore : undefined , InstanceId : undefined , } ; if ( output [ "description" ] !== undefined ) { contents . Description = __expectString ( output [ "description" ] ) ; } if ( output [ "eventId" ] !== undefined ) { contents . EventId = __expectString ( output [ "eventId" ] ) ; } if ( output [ "eventType" ] !== undefined ) { contents . EventType = __expectString ( output [ "eventType" ] ) ; } if ( output [ "notAfter" ] !== undefined ) { contents . NotAfter = __expectNonNull ( __parseRfc3339DateTime ( output [ "notAfter" ] ) ) ; } if ( output [ "notBefore" ] !== undefined ) { contents . NotBefore = __expectNonNull ( __parseRfc3339DateTime ( output [ "notBefore" ] ) ) ; } if ( output [ "instanceId" ] !== undefined ) { contents . InstanceId = __expectString ( output [ "instanceId" ] ) ; } return contents ; } ; const deserializeAws_ec2VolumeStatusEventsList = ( output , context ) : VolumeStatusEvent [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VolumeStatusEvent ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VolumeStatusInfo = ( output , context ) : VolumeStatusInfo => { const contents = { Details : undefined , Status : undefined , } ; if ( output . details === "" ) { contents . Details = [ ] ; } if ( output [ "details" ] !== undefined && output [ "details" ] [ "item" ] !== undefined ) { contents . Details = deserializeAws_ec2VolumeStatusDetailsList ( __getArrayIfSingleItem ( output [ "details" ] [ "item" ] ) , context ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = __expectString ( output [ "status" ] ) ; } return contents ; } ; const deserializeAws_ec2VolumeStatusItem = ( output , context ) : VolumeStatusItem => { const contents = { Actions : undefined , AvailabilityZone : undefined , OutpostArn : undefined , Events : undefined , VolumeId : undefined , VolumeStatus : undefined , AttachmentStatuses : undefined , } ; if ( output . actionsSet === "" ) { contents . Actions = [ ] ; } if ( output [ "actionsSet" ] !== undefined && output [ "actionsSet" ] [ "item" ] !== undefined ) { contents . Actions = deserializeAws_ec2VolumeStatusActionsList ( __getArrayIfSingleItem ( output [ "actionsSet" ] [ "item" ] ) , context ) ; } if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "outpostArn" ] !== undefined ) { contents . OutpostArn = __expectString ( output [ "outpostArn" ] ) ; } if ( output . eventsSet === "" ) { contents . Events = [ ] ; } if ( output [ "eventsSet" ] !== undefined && output [ "eventsSet" ] [ "item" ] !== undefined ) { contents . Events = deserializeAws_ec2VolumeStatusEventsList ( __getArrayIfSingleItem ( output [ "eventsSet" ] [ "item" ] ) , context ) ; } if ( output [ "volumeId" ] !== undefined ) { contents . VolumeId = __expectString ( output [ "volumeId" ] ) ; } if ( output [ "volumeStatus" ] !== undefined ) { contents . VolumeStatus = deserializeAws_ec2VolumeStatusInfo ( output [ "volumeStatus" ] , context ) ; } if ( output . attachmentStatuses === "" ) { contents . AttachmentStatuses = [ ] ; } if ( output [ "attachmentStatuses" ] !== undefined && output [ "attachmentStatuses" ] [ "item" ] !== undefined ) { contents . AttachmentStatuses = deserializeAws_ec2VolumeStatusAttachmentStatusList ( __getArrayIfSingleItem ( output [ "attachmentStatuses" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2VolumeStatusList = ( output , context ) : VolumeStatusItem [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VolumeStatusItem ( entry , context ) ; } ) ; } ; const deserializeAws_ec2Vpc = ( output , context ) : Vpc => { const contents = { CidrBlock : undefined , DhcpOptionsId : undefined , State : undefined , VpcId : undefined , OwnerId : undefined , InstanceTenancy : undefined , Ipv6CidrBlockAssociationSet : undefined , CidrBlockAssociationSet : undefined , IsDefault : undefined , Tags : undefined , } ; if ( output [ "cidrBlock" ] !== undefined ) { contents . CidrBlock = __expectString ( output [ "cidrBlock" ] ) ; } if ( output [ "dhcpOptionsId" ] !== undefined ) { contents . DhcpOptionsId = __expectString ( output [ "dhcpOptionsId" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "instanceTenancy" ] !== undefined ) { contents . InstanceTenancy = __expectString ( output [ "instanceTenancy" ] ) ; } if ( output . ipv6CidrBlockAssociationSet === "" ) { contents . Ipv6CidrBlockAssociationSet = [ ] ; } if ( output [ "ipv6CidrBlockAssociationSet" ] !== undefined && output [ "ipv6CidrBlockAssociationSet" ] [ "item" ] !== undefined ) { contents . Ipv6CidrBlockAssociationSet = deserializeAws_ec2VpcIpv6CidrBlockAssociationSet ( __getArrayIfSingleItem ( output [ "ipv6CidrBlockAssociationSet" ] [ "item" ] ) , context ) ; } if ( output . cidrBlockAssociationSet === "" ) { contents . CidrBlockAssociationSet = [ ] ; } if ( output [ "cidrBlockAssociationSet" ] !== undefined && output [ "cidrBlockAssociationSet" ] [ "item" ] !== undefined ) { contents . CidrBlockAssociationSet = deserializeAws_ec2VpcCidrBlockAssociationSet ( __getArrayIfSingleItem ( output [ "cidrBlockAssociationSet" ] [ "item" ] ) , context ) ; } if ( output [ "isDefault" ] !== undefined ) { contents . IsDefault = __parseBoolean ( output [ "isDefault" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2VpcAttachment = ( output , context ) : VpcAttachment => { const contents = { State : undefined , VpcId : undefined , } ; if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } return contents ; } ; const deserializeAws_ec2VpcAttachmentList = ( output , context ) : VpcAttachment [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VpcAttachment ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VpcCidrBlockAssociation = ( output , context ) : VpcCidrBlockAssociation => { const contents = { AssociationId : undefined , CidrBlock : undefined , CidrBlockState : undefined , } ; if ( output [ "associationId" ] !== undefined ) { contents . AssociationId = __expectString ( output [ "associationId" ] ) ; } if ( output [ "cidrBlock" ] !== undefined ) { contents . CidrBlock = __expectString ( output [ "cidrBlock" ] ) ; } if ( output [ "cidrBlockState" ] !== undefined ) { contents . CidrBlockState = deserializeAws_ec2VpcCidrBlockState ( output [ "cidrBlockState" ] , context ) ; } return contents ; } ; const deserializeAws_ec2VpcCidrBlockAssociationSet = ( output , context ) : VpcCidrBlockAssociation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VpcCidrBlockAssociation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VpcCidrBlockState = ( output , context ) : VpcCidrBlockState => { const contents = { State : undefined , StatusMessage : undefined , } ; if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "statusMessage" ] !== undefined ) { contents . StatusMessage = __expectString ( output [ "statusMessage" ] ) ; } return contents ; } ; const deserializeAws_ec2VpcClassicLink = ( output , context ) : VpcClassicLink => { const contents = { ClassicLinkEnabled : undefined , Tags : undefined , VpcId : undefined , } ; if ( output [ "classicLinkEnabled" ] !== undefined ) { contents . ClassicLinkEnabled = __parseBoolean ( output [ "classicLinkEnabled" ] ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } return contents ; } ; const deserializeAws_ec2VpcClassicLinkList = ( output , context ) : VpcClassicLink [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VpcClassicLink ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VpcEndpoint = ( output , context ) : VpcEndpoint => { const contents = { VpcEndpointId : undefined , VpcEndpointType : undefined , VpcId : undefined , ServiceName : undefined , State : undefined , PolicyDocument : undefined , RouteTableIds : undefined , SubnetIds : undefined , Groups : undefined , PrivateDnsEnabled : undefined , RequesterManaged : undefined , NetworkInterfaceIds : undefined , DnsEntries : undefined , CreationTimestamp : undefined , Tags : undefined , OwnerId : undefined , LastError : undefined , } ; if ( output [ "vpcEndpointId" ] !== undefined ) { contents . VpcEndpointId = __expectString ( output [ "vpcEndpointId" ] ) ; } if ( output [ "vpcEndpointType" ] !== undefined ) { contents . VpcEndpointType = __expectString ( output [ "vpcEndpointType" ] ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "serviceName" ] !== undefined ) { contents . ServiceName = __expectString ( output [ "serviceName" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "policyDocument" ] !== undefined ) { contents . PolicyDocument = __expectString ( output [ "policyDocument" ] ) ; } if ( output . routeTableIdSet === "" ) { contents . RouteTableIds = [ ] ; } if ( output [ "routeTableIdSet" ] !== undefined && output [ "routeTableIdSet" ] [ "item" ] !== undefined ) { contents . RouteTableIds = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "routeTableIdSet" ] [ "item" ] ) , context ) ; } if ( output . subnetIdSet === "" ) { contents . SubnetIds = [ ] ; } if ( output [ "subnetIdSet" ] !== undefined && output [ "subnetIdSet" ] [ "item" ] !== undefined ) { contents . SubnetIds = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "subnetIdSet" ] [ "item" ] ) , context ) ; } if ( output . groupSet === "" ) { contents . Groups = [ ] ; } if ( output [ "groupSet" ] !== undefined && output [ "groupSet" ] [ "item" ] !== undefined ) { contents . Groups = deserializeAws_ec2GroupIdentifierSet ( __getArrayIfSingleItem ( output [ "groupSet" ] [ "item" ] ) , context ) ; } if ( output [ "privateDnsEnabled" ] !== undefined ) { contents . PrivateDnsEnabled = __parseBoolean ( output [ "privateDnsEnabled" ] ) ; } if ( output [ "requesterManaged" ] !== undefined ) { contents . RequesterManaged = __parseBoolean ( output [ "requesterManaged" ] ) ; } if ( output . networkInterfaceIdSet === "" ) { contents . NetworkInterfaceIds = [ ] ; } if ( output [ "networkInterfaceIdSet" ] !== undefined && output [ "networkInterfaceIdSet" ] [ "item" ] !== undefined ) { contents . NetworkInterfaceIds = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "networkInterfaceIdSet" ] [ "item" ] ) , context ) ; } if ( output . dnsEntrySet === "" ) { contents . DnsEntries = [ ] ; } if ( output [ "dnsEntrySet" ] !== undefined && output [ "dnsEntrySet" ] [ "item" ] !== undefined ) { contents . DnsEntries = deserializeAws_ec2DnsEntrySet ( __getArrayIfSingleItem ( output [ "dnsEntrySet" ] [ "item" ] ) , context ) ; } if ( output [ "creationTimestamp" ] !== undefined ) { contents . CreationTimestamp = __expectNonNull ( __parseRfc3339DateTime ( output [ "creationTimestamp" ] ) ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "lastError" ] !== undefined ) { contents . LastError = deserializeAws_ec2LastError ( output [ "lastError" ] , context ) ; } return contents ; } ; const deserializeAws_ec2VpcEndpointConnection = ( output , context ) : VpcEndpointConnection => { const contents = { ServiceId : undefined , VpcEndpointId : undefined , VpcEndpointOwner : undefined , VpcEndpointState : undefined , CreationTimestamp : undefined , DnsEntries : undefined , NetworkLoadBalancerArns : undefined , GatewayLoadBalancerArns : undefined , } ; if ( output [ "serviceId" ] !== undefined ) { contents . ServiceId = __expectString ( output [ "serviceId" ] ) ; } if ( output [ "vpcEndpointId" ] !== undefined ) { contents . VpcEndpointId = __expectString ( output [ "vpcEndpointId" ] ) ; } if ( output [ "vpcEndpointOwner" ] !== undefined ) { contents . VpcEndpointOwner = __expectString ( output [ "vpcEndpointOwner" ] ) ; } if ( output [ "vpcEndpointState" ] !== undefined ) { contents . VpcEndpointState = __expectString ( output [ "vpcEndpointState" ] ) ; } if ( output [ "creationTimestamp" ] !== undefined ) { contents . CreationTimestamp = __expectNonNull ( __parseRfc3339DateTime ( output [ "creationTimestamp" ] ) ) ; } if ( output . dnsEntrySet === "" ) { contents . DnsEntries = [ ] ; } if ( output [ "dnsEntrySet" ] !== undefined && output [ "dnsEntrySet" ] [ "item" ] !== undefined ) { contents . DnsEntries = deserializeAws_ec2DnsEntrySet ( __getArrayIfSingleItem ( output [ "dnsEntrySet" ] [ "item" ] ) , context ) ; } if ( output . networkLoadBalancerArnSet === "" ) { contents . NetworkLoadBalancerArns = [ ] ; } if ( output [ "networkLoadBalancerArnSet" ] !== undefined && output [ "networkLoadBalancerArnSet" ] [ "item" ] !== undefined ) { contents . NetworkLoadBalancerArns = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "networkLoadBalancerArnSet" ] [ "item" ] ) , context ) ; } if ( output . gatewayLoadBalancerArnSet === "" ) { contents . GatewayLoadBalancerArns = [ ] ; } if ( output [ "gatewayLoadBalancerArnSet" ] !== undefined && output [ "gatewayLoadBalancerArnSet" ] [ "item" ] !== undefined ) { contents . GatewayLoadBalancerArns = deserializeAws_ec2ValueStringList ( __getArrayIfSingleItem ( output [ "gatewayLoadBalancerArnSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2VpcEndpointConnectionSet = ( output , context ) : VpcEndpointConnection [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VpcEndpointConnection ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VpcEndpointSet = ( output , context ) : VpcEndpoint [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VpcEndpoint ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VpcIpv6CidrBlockAssociation = ( output , context ) : VpcIpv6CidrBlockAssociation => { const contents = { AssociationId : undefined , Ipv6CidrBlock : undefined , Ipv6CidrBlockState : undefined , NetworkBorderGroup : undefined , Ipv6Pool : undefined , } ; if ( output [ "associationId" ] !== undefined ) { contents . AssociationId = __expectString ( output [ "associationId" ] ) ; } if ( output [ "ipv6CidrBlock" ] !== undefined ) { contents . Ipv6CidrBlock = __expectString ( output [ "ipv6CidrBlock" ] ) ; } if ( output [ "ipv6CidrBlockState" ] !== undefined ) { contents . Ipv6CidrBlockState = deserializeAws_ec2VpcCidrBlockState ( output [ "ipv6CidrBlockState" ] , context ) ; } if ( output [ "networkBorderGroup" ] !== undefined ) { contents . NetworkBorderGroup = __expectString ( output [ "networkBorderGroup" ] ) ; } if ( output [ "ipv6Pool" ] !== undefined ) { contents . Ipv6Pool = __expectString ( output [ "ipv6Pool" ] ) ; } return contents ; } ; const deserializeAws_ec2VpcIpv6CidrBlockAssociationSet = ( output , context ) : VpcIpv6CidrBlockAssociation [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VpcIpv6CidrBlockAssociation ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VpcList = ( output , context ) : Vpc [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2Vpc ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VpcPeeringConnection = ( output , context ) : VpcPeeringConnection => { const contents = { AccepterVpcInfo : undefined , ExpirationTime : undefined , RequesterVpcInfo : undefined , Status : undefined , Tags : undefined , VpcPeeringConnectionId : undefined , } ; if ( output [ "accepterVpcInfo" ] !== undefined ) { contents . AccepterVpcInfo = deserializeAws_ec2VpcPeeringConnectionVpcInfo ( output [ "accepterVpcInfo" ] , context ) ; } if ( output [ "expirationTime" ] !== undefined ) { contents . ExpirationTime = __expectNonNull ( __parseRfc3339DateTime ( output [ "expirationTime" ] ) ) ; } if ( output [ "requesterVpcInfo" ] !== undefined ) { contents . RequesterVpcInfo = deserializeAws_ec2VpcPeeringConnectionVpcInfo ( output [ "requesterVpcInfo" ] , context ) ; } if ( output [ "status" ] !== undefined ) { contents . Status = deserializeAws_ec2VpcPeeringConnectionStateReason ( output [ "status" ] , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output [ "vpcPeeringConnectionId" ] !== undefined ) { contents . VpcPeeringConnectionId = __expectString ( output [ "vpcPeeringConnectionId" ] ) ; } return contents ; } ; const deserializeAws_ec2VpcPeeringConnectionList = ( output , context ) : VpcPeeringConnection [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VpcPeeringConnection ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VpcPeeringConnectionOptionsDescription = ( output , context ) : VpcPeeringConnectionOptionsDescription => { const contents = { AllowDnsResolutionFromRemoteVpc : undefined , AllowEgressFromLocalClassicLinkToRemoteVpc : undefined , AllowEgressFromLocalVpcToRemoteClassicLink : undefined , } ; if ( output [ "allowDnsResolutionFromRemoteVpc" ] !== undefined ) { contents . AllowDnsResolutionFromRemoteVpc = __parseBoolean ( output [ "allowDnsResolutionFromRemoteVpc" ] ) ; } if ( output [ "allowEgressFromLocalClassicLinkToRemoteVpc" ] !== undefined ) { contents . AllowEgressFromLocalClassicLinkToRemoteVpc = __parseBoolean ( output [ "allowEgressFromLocalClassicLinkToRemoteVpc" ] ) ; } if ( output [ "allowEgressFromLocalVpcToRemoteClassicLink" ] !== undefined ) { contents . AllowEgressFromLocalVpcToRemoteClassicLink = __parseBoolean ( output [ "allowEgressFromLocalVpcToRemoteClassicLink" ] ) ; } return contents ; } ; const deserializeAws_ec2VpcPeeringConnectionStateReason = ( output , context ) : VpcPeeringConnectionStateReason => { const contents = { Code : undefined , Message : undefined , } ; if ( output [ "code" ] !== undefined ) { contents . Code = __expectString ( output [ "code" ] ) ; } if ( output [ "message" ] !== undefined ) { contents . Message = __expectString ( output [ "message" ] ) ; } return contents ; } ; const deserializeAws_ec2VpcPeeringConnectionVpcInfo = ( output , context ) : VpcPeeringConnectionVpcInfo => { const contents = { CidrBlock : undefined , Ipv6CidrBlockSet : undefined , CidrBlockSet : undefined , OwnerId : undefined , PeeringOptions : undefined , VpcId : undefined , Region : undefined , } ; if ( output [ "cidrBlock" ] !== undefined ) { contents . CidrBlock = __expectString ( output [ "cidrBlock" ] ) ; } if ( output . ipv6CidrBlockSet === "" ) { contents . Ipv6CidrBlockSet = [ ] ; } if ( output [ "ipv6CidrBlockSet" ] !== undefined && output [ "ipv6CidrBlockSet" ] [ "item" ] !== undefined ) { contents . Ipv6CidrBlockSet = deserializeAws_ec2Ipv6CidrBlockSet ( __getArrayIfSingleItem ( output [ "ipv6CidrBlockSet" ] [ "item" ] ) , context ) ; } if ( output . cidrBlockSet === "" ) { contents . CidrBlockSet = [ ] ; } if ( output [ "cidrBlockSet" ] !== undefined && output [ "cidrBlockSet" ] [ "item" ] !== undefined ) { contents . CidrBlockSet = deserializeAws_ec2CidrBlockSet ( __getArrayIfSingleItem ( output [ "cidrBlockSet" ] [ "item" ] ) , context ) ; } if ( output [ "ownerId" ] !== undefined ) { contents . OwnerId = __expectString ( output [ "ownerId" ] ) ; } if ( output [ "peeringOptions" ] !== undefined ) { contents . PeeringOptions = deserializeAws_ec2VpcPeeringConnectionOptionsDescription ( output [ "peeringOptions" ] , context ) ; } if ( output [ "vpcId" ] !== undefined ) { contents . VpcId = __expectString ( output [ "vpcId" ] ) ; } if ( output [ "region" ] !== undefined ) { contents . Region = __expectString ( output [ "region" ] ) ; } return contents ; } ; const deserializeAws_ec2VpnConnection = ( output , context ) : VpnConnection => { const contents = { CustomerGatewayConfiguration : undefined , CustomerGatewayId : undefined , Category : undefined , State : undefined , Type : undefined , VpnConnectionId : undefined , VpnGatewayId : undefined , TransitGatewayId : undefined , CoreNetworkArn : undefined , CoreNetworkAttachmentArn : undefined , GatewayAssociationState : undefined , Options : undefined , Routes : undefined , Tags : undefined , VgwTelemetry : undefined , } ; if ( output [ "customerGatewayConfiguration" ] !== undefined ) { contents . CustomerGatewayConfiguration = __expectString ( output [ "customerGatewayConfiguration" ] ) ; } if ( output [ "customerGatewayId" ] !== undefined ) { contents . CustomerGatewayId = __expectString ( output [ "customerGatewayId" ] ) ; } if ( output [ "category" ] !== undefined ) { contents . Category = __expectString ( output [ "category" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "type" ] !== undefined ) { contents . Type = __expectString ( output [ "type" ] ) ; } if ( output [ "vpnConnectionId" ] !== undefined ) { contents . VpnConnectionId = __expectString ( output [ "vpnConnectionId" ] ) ; } if ( output [ "vpnGatewayId" ] !== undefined ) { contents . VpnGatewayId = __expectString ( output [ "vpnGatewayId" ] ) ; } if ( output [ "transitGatewayId" ] !== undefined ) { contents . TransitGatewayId = __expectString ( output [ "transitGatewayId" ] ) ; } if ( output [ "coreNetworkArn" ] !== undefined ) { contents . CoreNetworkArn = __expectString ( output [ "coreNetworkArn" ] ) ; } if ( output [ "coreNetworkAttachmentArn" ] !== undefined ) { contents . CoreNetworkAttachmentArn = __expectString ( output [ "coreNetworkAttachmentArn" ] ) ; } if ( output [ "gatewayAssociationState" ] !== undefined ) { contents . GatewayAssociationState = __expectString ( output [ "gatewayAssociationState" ] ) ; } if ( output [ "options" ] !== undefined ) { contents . Options = deserializeAws_ec2VpnConnectionOptions ( output [ "options" ] , context ) ; } if ( output . routes === "" ) { contents . Routes = [ ] ; } if ( output [ "routes" ] !== undefined && output [ "routes" ] [ "item" ] !== undefined ) { contents . Routes = deserializeAws_ec2VpnStaticRouteList ( __getArrayIfSingleItem ( output [ "routes" ] [ "item" ] ) , context ) ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } if ( output . vgwTelemetry === "" ) { contents . VgwTelemetry = [ ] ; } if ( output [ "vgwTelemetry" ] !== undefined && output [ "vgwTelemetry" ] [ "item" ] !== undefined ) { contents . VgwTelemetry = deserializeAws_ec2VgwTelemetryList ( __getArrayIfSingleItem ( output [ "vgwTelemetry" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2VpnConnectionDeviceType = ( output , context ) : VpnConnectionDeviceType => { const contents = { VpnConnectionDeviceTypeId : undefined , Vendor : undefined , Platform : undefined , Software : undefined , } ; if ( output [ "vpnConnectionDeviceTypeId" ] !== undefined ) { contents . VpnConnectionDeviceTypeId = __expectString ( output [ "vpnConnectionDeviceTypeId" ] ) ; } if ( output [ "vendor" ] !== undefined ) { contents . Vendor = __expectString ( output [ "vendor" ] ) ; } if ( output [ "platform" ] !== undefined ) { contents . Platform = __expectString ( output [ "platform" ] ) ; } if ( output [ "software" ] !== undefined ) { contents . Software = __expectString ( output [ "software" ] ) ; } return contents ; } ; const deserializeAws_ec2VpnConnectionDeviceTypeList = ( output , context ) : VpnConnectionDeviceType [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VpnConnectionDeviceType ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VpnConnectionList = ( output , context ) : VpnConnection [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VpnConnection ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VpnConnectionOptions = ( output , context ) : VpnConnectionOptions => { const contents = { EnableAcceleration : undefined , StaticRoutesOnly : undefined , LocalIpv4NetworkCidr : undefined , RemoteIpv4NetworkCidr : undefined , LocalIpv6NetworkCidr : undefined , RemoteIpv6NetworkCidr : undefined , TunnelInsideIpVersion : undefined , TunnelOptions : undefined , } ; if ( output [ "enableAcceleration" ] !== undefined ) { contents . EnableAcceleration = __parseBoolean ( output [ "enableAcceleration" ] ) ; } if ( output [ "staticRoutesOnly" ] !== undefined ) { contents . StaticRoutesOnly = __parseBoolean ( output [ "staticRoutesOnly" ] ) ; } if ( output [ "localIpv4NetworkCidr" ] !== undefined ) { contents . LocalIpv4NetworkCidr = __expectString ( output [ "localIpv4NetworkCidr" ] ) ; } if ( output [ "remoteIpv4NetworkCidr" ] !== undefined ) { contents . RemoteIpv4NetworkCidr = __expectString ( output [ "remoteIpv4NetworkCidr" ] ) ; } if ( output [ "localIpv6NetworkCidr" ] !== undefined ) { contents . LocalIpv6NetworkCidr = __expectString ( output [ "localIpv6NetworkCidr" ] ) ; } if ( output [ "remoteIpv6NetworkCidr" ] !== undefined ) { contents . RemoteIpv6NetworkCidr = __expectString ( output [ "remoteIpv6NetworkCidr" ] ) ; } if ( output [ "tunnelInsideIpVersion" ] !== undefined ) { contents . TunnelInsideIpVersion = __expectString ( output [ "tunnelInsideIpVersion" ] ) ; } if ( output . tunnelOptionSet === "" ) { contents . TunnelOptions = [ ] ; } if ( output [ "tunnelOptionSet" ] !== undefined && output [ "tunnelOptionSet" ] [ "item" ] !== undefined ) { contents . TunnelOptions = deserializeAws_ec2TunnelOptionsList ( __getArrayIfSingleItem ( output [ "tunnelOptionSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2VpnGateway = ( output , context ) : VpnGateway => { const contents = { AvailabilityZone : undefined , State : undefined , Type : undefined , VpcAttachments : undefined , VpnGatewayId : undefined , AmazonSideAsn : undefined , Tags : undefined , } ; if ( output [ "availabilityZone" ] !== undefined ) { contents . AvailabilityZone = __expectString ( output [ "availabilityZone" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } if ( output [ "type" ] !== undefined ) { contents . Type = __expectString ( output [ "type" ] ) ; } if ( output . attachments === "" ) { contents . VpcAttachments = [ ] ; } if ( output [ "attachments" ] !== undefined && output [ "attachments" ] [ "item" ] !== undefined ) { contents . VpcAttachments = deserializeAws_ec2VpcAttachmentList ( __getArrayIfSingleItem ( output [ "attachments" ] [ "item" ] ) , context ) ; } if ( output [ "vpnGatewayId" ] !== undefined ) { contents . VpnGatewayId = __expectString ( output [ "vpnGatewayId" ] ) ; } if ( output [ "amazonSideAsn" ] !== undefined ) { contents . AmazonSideAsn = __strictParseLong ( output [ "amazonSideAsn" ] ) as number ; } if ( output . tagSet === "" ) { contents . Tags = [ ] ; } if ( output [ "tagSet" ] !== undefined && output [ "tagSet" ] [ "item" ] !== undefined ) { contents . Tags = deserializeAws_ec2TagList ( __getArrayIfSingleItem ( output [ "tagSet" ] [ "item" ] ) , context ) ; } return contents ; } ; const deserializeAws_ec2VpnGatewayList = ( output , context ) : VpnGateway [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VpnGateway ( entry , context ) ; } ) ; } ; const deserializeAws_ec2VpnStaticRoute = ( output , context ) : VpnStaticRoute => { const contents = { DestinationCidrBlock : undefined , Source : undefined , State : undefined , } ; if ( output [ "destinationCidrBlock" ] !== undefined ) { contents . DestinationCidrBlock = __expectString ( output [ "destinationCidrBlock" ] ) ; } if ( output [ "source" ] !== undefined ) { contents . Source = __expectString ( output [ "source" ] ) ; } if ( output [ "state" ] !== undefined ) { contents . State = __expectString ( output [ "state" ] ) ; } return contents ; } ; const deserializeAws_ec2VpnStaticRouteList = ( output , context ) : VpnStaticRoute [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_ec2VpnStaticRoute ( entry , context ) ; } ) ; } ; const deserializeAws_ec2WithdrawByoipCidrResult = ( output , context ) : WithdrawByoipCidrResult => { const contents = { ByoipCidr : undefined , } ; if ( output [ "byoipCidr" ] !== undefined ) { contents . ByoipCidr = deserializeAws_ec2ByoipCidr ( output [ "byoipCidr" ] , context ) ; } return contents ; } ; const deserializeMetadata = ( output ) : __ResponseMetadata => ( { httpStatusCode : output . statusCode , requestId : output . headers [ "x-amzn-requestid" ] ?? output . headers [ "x-amzn-request-id" ] , extendedRequestId : output . headers [ "x-amz-id-2" ] , cfId : output . headers [ "x-amz-cf-id" ] , } ) ; const collectBody = ( streamBody = new Uint8Array ( ) , context ) : Promise < Uint8Array > => { if ( streamBody instanceof Uint8Array ) { return Promise . resolve ( streamBody ) ; } return context . streamCollector ( streamBody ) || Promise . resolve ( new Uint8Array ( ) ) ; } ; const collectBodyString = ( streamBody , context ) : Promise < string > => collectBody ( streamBody , context ) . then ( ( body ) => context . utf8Encoder ( body ) ) ; const buildHttpRpcRequest = async ( context , headers , path , resolvedHostname , body ) : Promise < __HttpRequest > => { const { hostname , protocol = "https" , port , path : basePath } = await context . endpoint ( ) ; const contents = { protocol , hostname , port , method : "POST" , path : basePath . endsWith ( "/" ) ? basePath . slice ( 0 , - 1 ) + path : basePath + path , headers , } ; if ( resolvedHostname !== undefined ) { contents . hostname = resolvedHostname ; } if ( body !== undefined ) { contents . body = body ; } return new __HttpRequest ( contents ) ; } ; const parseBody = ( streamBody , context ) : any => collectBodyString ( streamBody , context ) . then ( ( encoded ) => { if ( encoded . length ) { const parsedObj = xmlParse ( encoded , { attributeNamePrefix : "" , ignoreAttributes : false , parseNodeValue : false , trimValues : false , tagValueProcessor : ( val ) => ( val . trim ( ) === "" && val . includes ( "\n" ) ? "" : decodeHTML ( val ) ) , } ) ; const textNodeName = "#text" ; const key = Object . keys ( parsedObj ) [ 0 ] ; const parsedObjToReturn = parsedObj [ key ] ; if ( parsedObjToReturn [ textNodeName ] ) { parsedObjToReturn [ key ] = parsedObjToReturn [ textNodeName ] ; delete parsedObjToReturn [ textNodeName ] ; } return __getValueFromTextNode ( parsedObjToReturn ) ; } return { } ; } ) ; const buildFormUrlencodedString = ( formEntries ) : string => Object . entries ( formEntries ) . map ( ( [ key , value ] ) => __extendedEncodeURIComponent ( key ) + "=" + __extendedEncodeURIComponent ( value ) ) . join ( "&" ) ; const loadEc2ErrorCode = ( output , data ) : string => { if ( data . Errors . Error . Code !== undefined ) { return data . Errors . Error . Code ; } if ( output . statusCode == 404 ) { return "NotFound" ; } return "" ; } ;