{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.EC2.DescribeInstanceTypes
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the details of the instance types that are offered in a
-- location. The results can be filtered by the attributes of the instance
-- types.
--
-- This operation returns paginated results.
module Amazonka.EC2.DescribeInstanceTypes
  ( -- * Creating a Request
    DescribeInstanceTypes (..),
    newDescribeInstanceTypes,

    -- * Request Lenses
    describeInstanceTypes_dryRun,
    describeInstanceTypes_filters,
    describeInstanceTypes_instanceTypes,
    describeInstanceTypes_maxResults,
    describeInstanceTypes_nextToken,

    -- * Destructuring the Response
    DescribeInstanceTypesResponse (..),
    newDescribeInstanceTypesResponse,

    -- * Response Lenses
    describeInstanceTypesResponse_instanceTypes,
    describeInstanceTypesResponse_nextToken,
    describeInstanceTypesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeInstanceTypes' smart constructor.
data DescribeInstanceTypes = DescribeInstanceTypes'
  { -- | Checks whether you have the required permissions for the action, without
    -- actually making the request, and provides an error response. If you have
    -- the required permissions, the error response is @DryRunOperation@.
    -- Otherwise, it is @UnauthorizedOperation@.
    DescribeInstanceTypes -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | One or more filters. Filter names and values are case-sensitive.
    --
    -- -   @auto-recovery-supported@ - Indicates whether auto recovery is
    --     supported (@true@ | @false@).
    --
    -- -   @bare-metal@ - Indicates whether it is a bare metal instance type
    --     (@true@ | @false@).
    --
    -- -   @burstable-performance-supported@ - Indicates whether it is a
    --     burstable performance instance type (@true@ | @false@).
    --
    -- -   @current-generation@ - Indicates whether this instance type is the
    --     latest generation instance type of an instance family (@true@ |
    --     @false@).
    --
    -- -   @ebs-info.ebs-optimized-info.baseline-bandwidth-in-mbps@ - The
    --     baseline bandwidth performance for an EBS-optimized instance type,
    --     in Mbps.
    --
    -- -   @ebs-info.ebs-optimized-info.baseline-iops@ - The baseline
    --     input\/output storage operations per second for an EBS-optimized
    --     instance type.
    --
    -- -   @ebs-info.ebs-optimized-info.baseline-throughput-in-mbps@ - The
    --     baseline throughput performance for an EBS-optimized instance type,
    --     in MB\/s.
    --
    -- -   @ebs-info.ebs-optimized-info.maximum-bandwidth-in-mbps@ - The
    --     maximum bandwidth performance for an EBS-optimized instance type, in
    --     Mbps.
    --
    -- -   @ebs-info.ebs-optimized-info.maximum-iops@ - The maximum
    --     input\/output storage operations per second for an EBS-optimized
    --     instance type.
    --
    -- -   @ebs-info.ebs-optimized-info.maximum-throughput-in-mbps@ - The
    --     maximum throughput performance for an EBS-optimized instance type,
    --     in MB\/s.
    --
    -- -   @ebs-info.ebs-optimized-support@ - Indicates whether the instance
    --     type is EBS-optimized (@supported@ | @unsupported@ | @default@).
    --
    -- -   @ebs-info.encryption-support@ - Indicates whether EBS encryption is
    --     supported (@supported@ | @unsupported@).
    --
    -- -   @ebs-info.nvme-support@ - Indicates whether non-volatile memory
    --     express (NVMe) is supported for EBS volumes (@required@ |
    --     @supported@ | @unsupported@).
    --
    -- -   @free-tier-eligible@ - Indicates whether the instance type is
    --     eligible to use in the free tier (@true@ | @false@).
    --
    -- -   @hibernation-supported@ - Indicates whether On-Demand hibernation is
    --     supported (@true@ | @false@).
    --
    -- -   @hypervisor@ - The hypervisor (@nitro@ | @xen@).
    --
    -- -   @instance-storage-info.disk.count@ - The number of local disks.
    --
    -- -   @instance-storage-info.disk.size-in-gb@ - The storage size of each
    --     instance storage disk, in GB.
    --
    -- -   @instance-storage-info.disk.type@ - The storage technology for the
    --     local instance storage disks (@hdd@ | @ssd@).
    --
    -- -   @instance-storage-info.encryption-support@ - Indicates whether data
    --     is encrypted at rest (@required@ | @supported@ | @unsupported@).
    --
    -- -   @instance-storage-info.nvme-support@ - Indicates whether
    --     non-volatile memory express (NVMe) is supported for instance store
    --     (@required@ | @supported@ | @unsupported@).
    --
    -- -   @instance-storage-info.total-size-in-gb@ - The total amount of
    --     storage available from all local instance storage, in GB.
    --
    -- -   @instance-storage-supported@ - Indicates whether the instance type
    --     has local instance storage (@true@ | @false@).
    --
    -- -   @instance-type@ - The instance type (for example @c5.2xlarge@ or
    --     c5*).
    --
    -- -   @memory-info.size-in-mib@ - The memory size.
    --
    -- -   @network-info.efa-info.maximum-efa-interfaces@ - The maximum number
    --     of Elastic Fabric Adapters (EFAs) per instance.
    --
    -- -   @network-info.efa-supported@ - Indicates whether the instance type
    --     supports Elastic Fabric Adapter (EFA) (@true@ | @false@).
    --
    -- -   @network-info.ena-support@ - Indicates whether Elastic Network
    --     Adapter (ENA) is supported or required (@required@ | @supported@ |
    --     @unsupported@).
    --
    -- -   @network-info.encryption-in-transit-supported@ - Indicates whether
    --     the instance type automatically encrypts in-transit traffic between
    --     instances (@true@ | @false@).
    --
    -- -   @network-info.ipv4-addresses-per-interface@ - The maximum number of
    --     private IPv4 addresses per network interface.
    --
    -- -   @network-info.ipv6-addresses-per-interface@ - The maximum number of
    --     private IPv6 addresses per network interface.
    --
    -- -   @network-info.ipv6-supported@ - Indicates whether the instance type
    --     supports IPv6 (@true@ | @false@).
    --
    -- -   @network-info.maximum-network-cards@ - The maximum number of network
    --     cards per instance.
    --
    -- -   @network-info.maximum-network-interfaces@ - The maximum number of
    --     network interfaces per instance.
    --
    -- -   @network-info.network-performance@ - The network performance (for
    --     example, \"25 Gigabit\").
    --
    -- -   @processor-info.supported-architecture@ - The CPU architecture
    --     (@arm64@ | @i386@ | @x86_64@).
    --
    -- -   @processor-info.sustained-clock-speed-in-ghz@ - The CPU clock speed,
    --     in GHz.
    --
    -- -   @supported-boot-mode@ - The boot mode (@legacy-bios@ | @uefi@).
    --
    -- -   @supported-root-device-type@ - The root device type (@ebs@ |
    --     @instance-store@).
    --
    -- -   @supported-usage-class@ - The usage class (@on-demand@ | @spot@).
    --
    -- -   @supported-virtualization-type@ - The virtualization type (@hvm@ |
    --     @paravirtual@).
    --
    -- -   @vcpu-info.default-cores@ - The default number of cores for the
    --     instance type.
    --
    -- -   @vcpu-info.default-threads-per-core@ - The default number of threads
    --     per core for the instance type.
    --
    -- -   @vcpu-info.default-vcpus@ - The default number of vCPUs for the
    --     instance type.
    --
    -- -   @vcpu-info.valid-cores@ - The number of cores that can be configured
    --     for the instance type.
    --
    -- -   @vcpu-info.valid-threads-per-core@ - The number of threads per core
    --     that can be configured for the instance type. For example, \"1\" or
    --     \"1,2\".
    DescribeInstanceTypes -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The instance types. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html Instance types>
    -- in the /Amazon EC2 User Guide/.
    DescribeInstanceTypes -> Maybe [InstanceType]
instanceTypes :: Prelude.Maybe [InstanceType],
    -- | The maximum number of results to return for the request in a single
    -- page. The remaining results can be seen by sending another request with
    -- the next token value.
    DescribeInstanceTypes -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token to retrieve the next page of results.
    DescribeInstanceTypes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeInstanceTypes -> DescribeInstanceTypes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeInstanceTypes -> DescribeInstanceTypes -> Bool
$c/= :: DescribeInstanceTypes -> DescribeInstanceTypes -> Bool
== :: DescribeInstanceTypes -> DescribeInstanceTypes -> Bool
$c== :: DescribeInstanceTypes -> DescribeInstanceTypes -> Bool
Prelude.Eq, ReadPrec [DescribeInstanceTypes]
ReadPrec DescribeInstanceTypes
Int -> ReadS DescribeInstanceTypes
ReadS [DescribeInstanceTypes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeInstanceTypes]
$creadListPrec :: ReadPrec [DescribeInstanceTypes]
readPrec :: ReadPrec DescribeInstanceTypes
$creadPrec :: ReadPrec DescribeInstanceTypes
readList :: ReadS [DescribeInstanceTypes]
$creadList :: ReadS [DescribeInstanceTypes]
readsPrec :: Int -> ReadS DescribeInstanceTypes
$creadsPrec :: Int -> ReadS DescribeInstanceTypes
Prelude.Read, Int -> DescribeInstanceTypes -> ShowS
[DescribeInstanceTypes] -> ShowS
DescribeInstanceTypes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeInstanceTypes] -> ShowS
$cshowList :: [DescribeInstanceTypes] -> ShowS
show :: DescribeInstanceTypes -> String
$cshow :: DescribeInstanceTypes -> String
showsPrec :: Int -> DescribeInstanceTypes -> ShowS
$cshowsPrec :: Int -> DescribeInstanceTypes -> ShowS
Prelude.Show, forall x. Rep DescribeInstanceTypes x -> DescribeInstanceTypes
forall x. DescribeInstanceTypes -> Rep DescribeInstanceTypes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeInstanceTypes x -> DescribeInstanceTypes
$cfrom :: forall x. DescribeInstanceTypes -> Rep DescribeInstanceTypes x
Prelude.Generic)

-- |
-- Create a value of 'DescribeInstanceTypes' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'dryRun', 'describeInstanceTypes_dryRun' - Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
--
-- 'filters', 'describeInstanceTypes_filters' - One or more filters. Filter names and values are case-sensitive.
--
-- -   @auto-recovery-supported@ - Indicates whether auto recovery is
--     supported (@true@ | @false@).
--
-- -   @bare-metal@ - Indicates whether it is a bare metal instance type
--     (@true@ | @false@).
--
-- -   @burstable-performance-supported@ - Indicates whether it is a
--     burstable performance instance type (@true@ | @false@).
--
-- -   @current-generation@ - Indicates whether this instance type is the
--     latest generation instance type of an instance family (@true@ |
--     @false@).
--
-- -   @ebs-info.ebs-optimized-info.baseline-bandwidth-in-mbps@ - The
--     baseline bandwidth performance for an EBS-optimized instance type,
--     in Mbps.
--
-- -   @ebs-info.ebs-optimized-info.baseline-iops@ - The baseline
--     input\/output storage operations per second for an EBS-optimized
--     instance type.
--
-- -   @ebs-info.ebs-optimized-info.baseline-throughput-in-mbps@ - The
--     baseline throughput performance for an EBS-optimized instance type,
--     in MB\/s.
--
-- -   @ebs-info.ebs-optimized-info.maximum-bandwidth-in-mbps@ - The
--     maximum bandwidth performance for an EBS-optimized instance type, in
--     Mbps.
--
-- -   @ebs-info.ebs-optimized-info.maximum-iops@ - The maximum
--     input\/output storage operations per second for an EBS-optimized
--     instance type.
--
-- -   @ebs-info.ebs-optimized-info.maximum-throughput-in-mbps@ - The
--     maximum throughput performance for an EBS-optimized instance type,
--     in MB\/s.
--
-- -   @ebs-info.ebs-optimized-support@ - Indicates whether the instance
--     type is EBS-optimized (@supported@ | @unsupported@ | @default@).
--
-- -   @ebs-info.encryption-support@ - Indicates whether EBS encryption is
--     supported (@supported@ | @unsupported@).
--
-- -   @ebs-info.nvme-support@ - Indicates whether non-volatile memory
--     express (NVMe) is supported for EBS volumes (@required@ |
--     @supported@ | @unsupported@).
--
-- -   @free-tier-eligible@ - Indicates whether the instance type is
--     eligible to use in the free tier (@true@ | @false@).
--
-- -   @hibernation-supported@ - Indicates whether On-Demand hibernation is
--     supported (@true@ | @false@).
--
-- -   @hypervisor@ - The hypervisor (@nitro@ | @xen@).
--
-- -   @instance-storage-info.disk.count@ - The number of local disks.
--
-- -   @instance-storage-info.disk.size-in-gb@ - The storage size of each
--     instance storage disk, in GB.
--
-- -   @instance-storage-info.disk.type@ - The storage technology for the
--     local instance storage disks (@hdd@ | @ssd@).
--
-- -   @instance-storage-info.encryption-support@ - Indicates whether data
--     is encrypted at rest (@required@ | @supported@ | @unsupported@).
--
-- -   @instance-storage-info.nvme-support@ - Indicates whether
--     non-volatile memory express (NVMe) is supported for instance store
--     (@required@ | @supported@ | @unsupported@).
--
-- -   @instance-storage-info.total-size-in-gb@ - The total amount of
--     storage available from all local instance storage, in GB.
--
-- -   @instance-storage-supported@ - Indicates whether the instance type
--     has local instance storage (@true@ | @false@).
--
-- -   @instance-type@ - The instance type (for example @c5.2xlarge@ or
--     c5*).
--
-- -   @memory-info.size-in-mib@ - The memory size.
--
-- -   @network-info.efa-info.maximum-efa-interfaces@ - The maximum number
--     of Elastic Fabric Adapters (EFAs) per instance.
--
-- -   @network-info.efa-supported@ - Indicates whether the instance type
--     supports Elastic Fabric Adapter (EFA) (@true@ | @false@).
--
-- -   @network-info.ena-support@ - Indicates whether Elastic Network
--     Adapter (ENA) is supported or required (@required@ | @supported@ |
--     @unsupported@).
--
-- -   @network-info.encryption-in-transit-supported@ - Indicates whether
--     the instance type automatically encrypts in-transit traffic between
--     instances (@true@ | @false@).
--
-- -   @network-info.ipv4-addresses-per-interface@ - The maximum number of
--     private IPv4 addresses per network interface.
--
-- -   @network-info.ipv6-addresses-per-interface@ - The maximum number of
--     private IPv6 addresses per network interface.
--
-- -   @network-info.ipv6-supported@ - Indicates whether the instance type
--     supports IPv6 (@true@ | @false@).
--
-- -   @network-info.maximum-network-cards@ - The maximum number of network
--     cards per instance.
--
-- -   @network-info.maximum-network-interfaces@ - The maximum number of
--     network interfaces per instance.
--
-- -   @network-info.network-performance@ - The network performance (for
--     example, \"25 Gigabit\").
--
-- -   @processor-info.supported-architecture@ - The CPU architecture
--     (@arm64@ | @i386@ | @x86_64@).
--
-- -   @processor-info.sustained-clock-speed-in-ghz@ - The CPU clock speed,
--     in GHz.
--
-- -   @supported-boot-mode@ - The boot mode (@legacy-bios@ | @uefi@).
--
-- -   @supported-root-device-type@ - The root device type (@ebs@ |
--     @instance-store@).
--
-- -   @supported-usage-class@ - The usage class (@on-demand@ | @spot@).
--
-- -   @supported-virtualization-type@ - The virtualization type (@hvm@ |
--     @paravirtual@).
--
-- -   @vcpu-info.default-cores@ - The default number of cores for the
--     instance type.
--
-- -   @vcpu-info.default-threads-per-core@ - The default number of threads
--     per core for the instance type.
--
-- -   @vcpu-info.default-vcpus@ - The default number of vCPUs for the
--     instance type.
--
-- -   @vcpu-info.valid-cores@ - The number of cores that can be configured
--     for the instance type.
--
-- -   @vcpu-info.valid-threads-per-core@ - The number of threads per core
--     that can be configured for the instance type. For example, \"1\" or
--     \"1,2\".
--
-- 'instanceTypes', 'describeInstanceTypes_instanceTypes' - The instance types. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html Instance types>
-- in the /Amazon EC2 User Guide/.
--
-- 'maxResults', 'describeInstanceTypes_maxResults' - The maximum number of results to return for the request in a single
-- page. The remaining results can be seen by sending another request with
-- the next token value.
--
-- 'nextToken', 'describeInstanceTypes_nextToken' - The token to retrieve the next page of results.
newDescribeInstanceTypes ::
  DescribeInstanceTypes
newDescribeInstanceTypes :: DescribeInstanceTypes
newDescribeInstanceTypes =
  DescribeInstanceTypes'
    { $sel:dryRun:DescribeInstanceTypes' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeInstanceTypes' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:instanceTypes:DescribeInstanceTypes' :: Maybe [InstanceType]
instanceTypes = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeInstanceTypes' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeInstanceTypes' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
describeInstanceTypes_dryRun :: Lens.Lens' DescribeInstanceTypes (Prelude.Maybe Prelude.Bool)
describeInstanceTypes_dryRun :: Lens' DescribeInstanceTypes (Maybe Bool)
describeInstanceTypes_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstanceTypes' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DescribeInstanceTypes
s@DescribeInstanceTypes' {} Maybe Bool
a -> DescribeInstanceTypes
s {$sel:dryRun:DescribeInstanceTypes' :: Maybe Bool
dryRun = Maybe Bool
a} :: DescribeInstanceTypes)

-- | One or more filters. Filter names and values are case-sensitive.
--
-- -   @auto-recovery-supported@ - Indicates whether auto recovery is
--     supported (@true@ | @false@).
--
-- -   @bare-metal@ - Indicates whether it is a bare metal instance type
--     (@true@ | @false@).
--
-- -   @burstable-performance-supported@ - Indicates whether it is a
--     burstable performance instance type (@true@ | @false@).
--
-- -   @current-generation@ - Indicates whether this instance type is the
--     latest generation instance type of an instance family (@true@ |
--     @false@).
--
-- -   @ebs-info.ebs-optimized-info.baseline-bandwidth-in-mbps@ - The
--     baseline bandwidth performance for an EBS-optimized instance type,
--     in Mbps.
--
-- -   @ebs-info.ebs-optimized-info.baseline-iops@ - The baseline
--     input\/output storage operations per second for an EBS-optimized
--     instance type.
--
-- -   @ebs-info.ebs-optimized-info.baseline-throughput-in-mbps@ - The
--     baseline throughput performance for an EBS-optimized instance type,
--     in MB\/s.
--
-- -   @ebs-info.ebs-optimized-info.maximum-bandwidth-in-mbps@ - The
--     maximum bandwidth performance for an EBS-optimized instance type, in
--     Mbps.
--
-- -   @ebs-info.ebs-optimized-info.maximum-iops@ - The maximum
--     input\/output storage operations per second for an EBS-optimized
--     instance type.
--
-- -   @ebs-info.ebs-optimized-info.maximum-throughput-in-mbps@ - The
--     maximum throughput performance for an EBS-optimized instance type,
--     in MB\/s.
--
-- -   @ebs-info.ebs-optimized-support@ - Indicates whether the instance
--     type is EBS-optimized (@supported@ | @unsupported@ | @default@).
--
-- -   @ebs-info.encryption-support@ - Indicates whether EBS encryption is
--     supported (@supported@ | @unsupported@).
--
-- -   @ebs-info.nvme-support@ - Indicates whether non-volatile memory
--     express (NVMe) is supported for EBS volumes (@required@ |
--     @supported@ | @unsupported@).
--
-- -   @free-tier-eligible@ - Indicates whether the instance type is
--     eligible to use in the free tier (@true@ | @false@).
--
-- -   @hibernation-supported@ - Indicates whether On-Demand hibernation is
--     supported (@true@ | @false@).
--
-- -   @hypervisor@ - The hypervisor (@nitro@ | @xen@).
--
-- -   @instance-storage-info.disk.count@ - The number of local disks.
--
-- -   @instance-storage-info.disk.size-in-gb@ - The storage size of each
--     instance storage disk, in GB.
--
-- -   @instance-storage-info.disk.type@ - The storage technology for the
--     local instance storage disks (@hdd@ | @ssd@).
--
-- -   @instance-storage-info.encryption-support@ - Indicates whether data
--     is encrypted at rest (@required@ | @supported@ | @unsupported@).
--
-- -   @instance-storage-info.nvme-support@ - Indicates whether
--     non-volatile memory express (NVMe) is supported for instance store
--     (@required@ | @supported@ | @unsupported@).
--
-- -   @instance-storage-info.total-size-in-gb@ - The total amount of
--     storage available from all local instance storage, in GB.
--
-- -   @instance-storage-supported@ - Indicates whether the instance type
--     has local instance storage (@true@ | @false@).
--
-- -   @instance-type@ - The instance type (for example @c5.2xlarge@ or
--     c5*).
--
-- -   @memory-info.size-in-mib@ - The memory size.
--
-- -   @network-info.efa-info.maximum-efa-interfaces@ - The maximum number
--     of Elastic Fabric Adapters (EFAs) per instance.
--
-- -   @network-info.efa-supported@ - Indicates whether the instance type
--     supports Elastic Fabric Adapter (EFA) (@true@ | @false@).
--
-- -   @network-info.ena-support@ - Indicates whether Elastic Network
--     Adapter (ENA) is supported or required (@required@ | @supported@ |
--     @unsupported@).
--
-- -   @network-info.encryption-in-transit-supported@ - Indicates whether
--     the instance type automatically encrypts in-transit traffic between
--     instances (@true@ | @false@).
--
-- -   @network-info.ipv4-addresses-per-interface@ - The maximum number of
--     private IPv4 addresses per network interface.
--
-- -   @network-info.ipv6-addresses-per-interface@ - The maximum number of
--     private IPv6 addresses per network interface.
--
-- -   @network-info.ipv6-supported@ - Indicates whether the instance type
--     supports IPv6 (@true@ | @false@).
--
-- -   @network-info.maximum-network-cards@ - The maximum number of network
--     cards per instance.
--
-- -   @network-info.maximum-network-interfaces@ - The maximum number of
--     network interfaces per instance.
--
-- -   @network-info.network-performance@ - The network performance (for
--     example, \"25 Gigabit\").
--
-- -   @processor-info.supported-architecture@ - The CPU architecture
--     (@arm64@ | @i386@ | @x86_64@).
--
-- -   @processor-info.sustained-clock-speed-in-ghz@ - The CPU clock speed,
--     in GHz.
--
-- -   @supported-boot-mode@ - The boot mode (@legacy-bios@ | @uefi@).
--
-- -   @supported-root-device-type@ - The root device type (@ebs@ |
--     @instance-store@).
--
-- -   @supported-usage-class@ - The usage class (@on-demand@ | @spot@).
--
-- -   @supported-virtualization-type@ - The virtualization type (@hvm@ |
--     @paravirtual@).
--
-- -   @vcpu-info.default-cores@ - The default number of cores for the
--     instance type.
--
-- -   @vcpu-info.default-threads-per-core@ - The default number of threads
--     per core for the instance type.
--
-- -   @vcpu-info.default-vcpus@ - The default number of vCPUs for the
--     instance type.
--
-- -   @vcpu-info.valid-cores@ - The number of cores that can be configured
--     for the instance type.
--
-- -   @vcpu-info.valid-threads-per-core@ - The number of threads per core
--     that can be configured for the instance type. For example, \"1\" or
--     \"1,2\".
describeInstanceTypes_filters :: Lens.Lens' DescribeInstanceTypes (Prelude.Maybe [Filter])
describeInstanceTypes_filters :: Lens' DescribeInstanceTypes (Maybe [Filter])
describeInstanceTypes_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstanceTypes' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeInstanceTypes
s@DescribeInstanceTypes' {} Maybe [Filter]
a -> DescribeInstanceTypes
s {$sel:filters:DescribeInstanceTypes' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeInstanceTypes) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The instance types. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html Instance types>
-- in the /Amazon EC2 User Guide/.
describeInstanceTypes_instanceTypes :: Lens.Lens' DescribeInstanceTypes (Prelude.Maybe [InstanceType])
describeInstanceTypes_instanceTypes :: Lens' DescribeInstanceTypes (Maybe [InstanceType])
describeInstanceTypes_instanceTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstanceTypes' {Maybe [InstanceType]
instanceTypes :: Maybe [InstanceType]
$sel:instanceTypes:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe [InstanceType]
instanceTypes} -> Maybe [InstanceType]
instanceTypes) (\s :: DescribeInstanceTypes
s@DescribeInstanceTypes' {} Maybe [InstanceType]
a -> DescribeInstanceTypes
s {$sel:instanceTypes:DescribeInstanceTypes' :: Maybe [InstanceType]
instanceTypes = Maybe [InstanceType]
a} :: DescribeInstanceTypes) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The maximum number of results to return for the request in a single
-- page. The remaining results can be seen by sending another request with
-- the next token value.
describeInstanceTypes_maxResults :: Lens.Lens' DescribeInstanceTypes (Prelude.Maybe Prelude.Natural)
describeInstanceTypes_maxResults :: Lens' DescribeInstanceTypes (Maybe Natural)
describeInstanceTypes_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstanceTypes' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeInstanceTypes
s@DescribeInstanceTypes' {} Maybe Natural
a -> DescribeInstanceTypes
s {$sel:maxResults:DescribeInstanceTypes' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeInstanceTypes)

-- | The token to retrieve the next page of results.
describeInstanceTypes_nextToken :: Lens.Lens' DescribeInstanceTypes (Prelude.Maybe Prelude.Text)
describeInstanceTypes_nextToken :: Lens' DescribeInstanceTypes (Maybe Text)
describeInstanceTypes_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstanceTypes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeInstanceTypes
s@DescribeInstanceTypes' {} Maybe Text
a -> DescribeInstanceTypes
s {$sel:nextToken:DescribeInstanceTypes' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeInstanceTypes)

instance Core.AWSPager DescribeInstanceTypes where
  page :: DescribeInstanceTypes
-> AWSResponse DescribeInstanceTypes -> Maybe DescribeInstanceTypes
page DescribeInstanceTypes
rq AWSResponse DescribeInstanceTypes
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeInstanceTypes
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeInstanceTypesResponse (Maybe Text)
describeInstanceTypesResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeInstanceTypes
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeInstanceTypesResponse (Maybe [InstanceTypeInfo])
describeInstanceTypesResponse_instanceTypes
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeInstanceTypes
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeInstanceTypes (Maybe Text)
describeInstanceTypes_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeInstanceTypes
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeInstanceTypesResponse (Maybe Text)
describeInstanceTypesResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeInstanceTypes where
  type
    AWSResponse DescribeInstanceTypes =
      DescribeInstanceTypesResponse
  request :: (Service -> Service)
-> DescribeInstanceTypes -> Request DescribeInstanceTypes
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeInstanceTypes
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeInstanceTypes)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [InstanceTypeInfo]
-> Maybe Text -> Int -> DescribeInstanceTypesResponse
DescribeInstanceTypesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"instanceTypeSet"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"nextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeInstanceTypes where
  hashWithSalt :: Int -> DescribeInstanceTypes -> Int
hashWithSalt Int
_salt DescribeInstanceTypes' {Maybe Bool
Maybe Natural
Maybe [Filter]
Maybe [InstanceType]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
instanceTypes :: Maybe [InstanceType]
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:nextToken:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe Text
$sel:maxResults:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe Natural
$sel:instanceTypes:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe [InstanceType]
$sel:filters:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe [Filter]
$sel:dryRun:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [InstanceType]
instanceTypes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData DescribeInstanceTypes where
  rnf :: DescribeInstanceTypes -> ()
rnf DescribeInstanceTypes' {Maybe Bool
Maybe Natural
Maybe [Filter]
Maybe [InstanceType]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
instanceTypes :: Maybe [InstanceType]
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:nextToken:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe Text
$sel:maxResults:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe Natural
$sel:instanceTypes:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe [InstanceType]
$sel:filters:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe [Filter]
$sel:dryRun:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Filter]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [InstanceType]
instanceTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance Data.ToHeaders DescribeInstanceTypes where
  toHeaders :: DescribeInstanceTypes -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath DescribeInstanceTypes where
  toPath :: DescribeInstanceTypes -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery DescribeInstanceTypes where
  toQuery :: DescribeInstanceTypes -> QueryString
toQuery DescribeInstanceTypes' {Maybe Bool
Maybe Natural
Maybe [Filter]
Maybe [InstanceType]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
instanceTypes :: Maybe [InstanceType]
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:nextToken:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe Text
$sel:maxResults:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe Natural
$sel:instanceTypes:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe [InstanceType]
$sel:filters:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe [Filter]
$sel:dryRun:DescribeInstanceTypes' :: DescribeInstanceTypes -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeInstanceTypes" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Filter" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters),
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"InstanceType"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InstanceType]
instanceTypes
          ),
        ByteString
"MaxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newDescribeInstanceTypesResponse' smart constructor.
data DescribeInstanceTypesResponse = DescribeInstanceTypesResponse'
  { -- | The instance type. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html Instance types>
    -- in the /Amazon EC2 User Guide/.
    DescribeInstanceTypesResponse -> Maybe [InstanceTypeInfo]
instanceTypes :: Prelude.Maybe [InstanceTypeInfo],
    -- | The token to use to retrieve the next page of results. This value is
    -- @null@ when there are no more results to return.
    DescribeInstanceTypesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeInstanceTypesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeInstanceTypesResponse
-> DescribeInstanceTypesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeInstanceTypesResponse
-> DescribeInstanceTypesResponse -> Bool
$c/= :: DescribeInstanceTypesResponse
-> DescribeInstanceTypesResponse -> Bool
== :: DescribeInstanceTypesResponse
-> DescribeInstanceTypesResponse -> Bool
$c== :: DescribeInstanceTypesResponse
-> DescribeInstanceTypesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeInstanceTypesResponse]
ReadPrec DescribeInstanceTypesResponse
Int -> ReadS DescribeInstanceTypesResponse
ReadS [DescribeInstanceTypesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeInstanceTypesResponse]
$creadListPrec :: ReadPrec [DescribeInstanceTypesResponse]
readPrec :: ReadPrec DescribeInstanceTypesResponse
$creadPrec :: ReadPrec DescribeInstanceTypesResponse
readList :: ReadS [DescribeInstanceTypesResponse]
$creadList :: ReadS [DescribeInstanceTypesResponse]
readsPrec :: Int -> ReadS DescribeInstanceTypesResponse
$creadsPrec :: Int -> ReadS DescribeInstanceTypesResponse
Prelude.Read, Int -> DescribeInstanceTypesResponse -> ShowS
[DescribeInstanceTypesResponse] -> ShowS
DescribeInstanceTypesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeInstanceTypesResponse] -> ShowS
$cshowList :: [DescribeInstanceTypesResponse] -> ShowS
show :: DescribeInstanceTypesResponse -> String
$cshow :: DescribeInstanceTypesResponse -> String
showsPrec :: Int -> DescribeInstanceTypesResponse -> ShowS
$cshowsPrec :: Int -> DescribeInstanceTypesResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeInstanceTypesResponse x
-> DescribeInstanceTypesResponse
forall x.
DescribeInstanceTypesResponse
-> Rep DescribeInstanceTypesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeInstanceTypesResponse x
-> DescribeInstanceTypesResponse
$cfrom :: forall x.
DescribeInstanceTypesResponse
-> Rep DescribeInstanceTypesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeInstanceTypesResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'instanceTypes', 'describeInstanceTypesResponse_instanceTypes' - The instance type. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html Instance types>
-- in the /Amazon EC2 User Guide/.
--
-- 'nextToken', 'describeInstanceTypesResponse_nextToken' - The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
--
-- 'httpStatus', 'describeInstanceTypesResponse_httpStatus' - The response's http status code.
newDescribeInstanceTypesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeInstanceTypesResponse
newDescribeInstanceTypesResponse :: Int -> DescribeInstanceTypesResponse
newDescribeInstanceTypesResponse Int
pHttpStatus_ =
  DescribeInstanceTypesResponse'
    { $sel:instanceTypes:DescribeInstanceTypesResponse' :: Maybe [InstanceTypeInfo]
instanceTypes =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeInstanceTypesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeInstanceTypesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The instance type. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html Instance types>
-- in the /Amazon EC2 User Guide/.
describeInstanceTypesResponse_instanceTypes :: Lens.Lens' DescribeInstanceTypesResponse (Prelude.Maybe [InstanceTypeInfo])
describeInstanceTypesResponse_instanceTypes :: Lens' DescribeInstanceTypesResponse (Maybe [InstanceTypeInfo])
describeInstanceTypesResponse_instanceTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstanceTypesResponse' {Maybe [InstanceTypeInfo]
instanceTypes :: Maybe [InstanceTypeInfo]
$sel:instanceTypes:DescribeInstanceTypesResponse' :: DescribeInstanceTypesResponse -> Maybe [InstanceTypeInfo]
instanceTypes} -> Maybe [InstanceTypeInfo]
instanceTypes) (\s :: DescribeInstanceTypesResponse
s@DescribeInstanceTypesResponse' {} Maybe [InstanceTypeInfo]
a -> DescribeInstanceTypesResponse
s {$sel:instanceTypes:DescribeInstanceTypesResponse' :: Maybe [InstanceTypeInfo]
instanceTypes = Maybe [InstanceTypeInfo]
a} :: DescribeInstanceTypesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
describeInstanceTypesResponse_nextToken :: Lens.Lens' DescribeInstanceTypesResponse (Prelude.Maybe Prelude.Text)
describeInstanceTypesResponse_nextToken :: Lens' DescribeInstanceTypesResponse (Maybe Text)
describeInstanceTypesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstanceTypesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeInstanceTypesResponse' :: DescribeInstanceTypesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeInstanceTypesResponse
s@DescribeInstanceTypesResponse' {} Maybe Text
a -> DescribeInstanceTypesResponse
s {$sel:nextToken:DescribeInstanceTypesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeInstanceTypesResponse)

-- | The response's http status code.
describeInstanceTypesResponse_httpStatus :: Lens.Lens' DescribeInstanceTypesResponse Prelude.Int
describeInstanceTypesResponse_httpStatus :: Lens' DescribeInstanceTypesResponse Int
describeInstanceTypesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstanceTypesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeInstanceTypesResponse' :: DescribeInstanceTypesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeInstanceTypesResponse
s@DescribeInstanceTypesResponse' {} Int
a -> DescribeInstanceTypesResponse
s {$sel:httpStatus:DescribeInstanceTypesResponse' :: Int
httpStatus = Int
a} :: DescribeInstanceTypesResponse)

instance Prelude.NFData DescribeInstanceTypesResponse where
  rnf :: DescribeInstanceTypesResponse -> ()
rnf DescribeInstanceTypesResponse' {Int
Maybe [InstanceTypeInfo]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
instanceTypes :: Maybe [InstanceTypeInfo]
$sel:httpStatus:DescribeInstanceTypesResponse' :: DescribeInstanceTypesResponse -> Int
$sel:nextToken:DescribeInstanceTypesResponse' :: DescribeInstanceTypesResponse -> Maybe Text
$sel:instanceTypes:DescribeInstanceTypesResponse' :: DescribeInstanceTypesResponse -> Maybe [InstanceTypeInfo]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [InstanceTypeInfo]
instanceTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus