{-# 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.DescribeSpotInstanceRequests
-- 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 specified Spot Instance requests.
--
-- You can use @DescribeSpotInstanceRequests@ to find a running Spot
-- Instance by examining the response. If the status of the Spot Instance
-- is @fulfilled@, the instance ID appears in the response and contains the
-- identifier of the instance. Alternatively, you can use
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances DescribeInstances>
-- with a filter to look for instances where the instance lifecycle is
-- @spot@.
--
-- We recommend that you set @MaxResults@ to a value between 5 and 1000 to
-- limit the number of results returned. This paginates the output, which
-- makes the list more manageable and returns the results faster. If the
-- list of results exceeds your @MaxResults@ value, then that number of
-- results is returned along with a @NextToken@ value that can be passed to
-- a subsequent @DescribeSpotInstanceRequests@ request to retrieve the
-- remaining results.
--
-- Spot Instance requests are deleted four hours after they are canceled
-- and their instances are terminated.
--
-- This operation returns paginated results.
module Amazonka.EC2.DescribeSpotInstanceRequests
  ( -- * Creating a Request
    DescribeSpotInstanceRequests (..),
    newDescribeSpotInstanceRequests,

    -- * Request Lenses
    describeSpotInstanceRequests_dryRun,
    describeSpotInstanceRequests_filters,
    describeSpotInstanceRequests_maxResults,
    describeSpotInstanceRequests_nextToken,
    describeSpotInstanceRequests_spotInstanceRequestIds,

    -- * Destructuring the Response
    DescribeSpotInstanceRequestsResponse (..),
    newDescribeSpotInstanceRequestsResponse,

    -- * Response Lenses
    describeSpotInstanceRequestsResponse_nextToken,
    describeSpotInstanceRequestsResponse_spotInstanceRequests,
    describeSpotInstanceRequestsResponse_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

-- | Contains the parameters for DescribeSpotInstanceRequests.
--
-- /See:/ 'newDescribeSpotInstanceRequests' smart constructor.
data DescribeSpotInstanceRequests = DescribeSpotInstanceRequests'
  { -- | 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@.
    DescribeSpotInstanceRequests -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | One or more filters.
    --
    -- -   @availability-zone-group@ - The Availability Zone group.
    --
    -- -   @create-time@ - The time stamp when the Spot Instance request was
    --     created.
    --
    -- -   @fault-code@ - The fault code related to the request.
    --
    -- -   @fault-message@ - The fault message related to the request.
    --
    -- -   @instance-id@ - The ID of the instance that fulfilled the request.
    --
    -- -   @launch-group@ - The Spot Instance launch group.
    --
    -- -   @launch.block-device-mapping.delete-on-termination@ - Indicates
    --     whether the EBS volume is deleted on instance termination.
    --
    -- -   @launch.block-device-mapping.device-name@ - The device name for the
    --     volume in the block device mapping (for example, @\/dev\/sdh@ or
    --     @xvdh@).
    --
    -- -   @launch.block-device-mapping.snapshot-id@ - The ID of the snapshot
    --     for the EBS volume.
    --
    -- -   @launch.block-device-mapping.volume-size@ - The size of the EBS
    --     volume, in GiB.
    --
    -- -   @launch.block-device-mapping.volume-type@ - The type of EBS volume:
    --     @gp2@ for General Purpose SSD, @io1@ or @io2@ for Provisioned IOPS
    --     SSD, @st1@ for Throughput Optimized HDD, @sc1@for Cold HDD, or
    --     @standard@ for Magnetic.
    --
    -- -   @launch.group-id@ - The ID of the security group for the instance.
    --
    -- -   @launch.group-name@ - The name of the security group for the
    --     instance.
    --
    -- -   @launch.image-id@ - The ID of the AMI.
    --
    -- -   @launch.instance-type@ - The type of instance (for example,
    --     @m3.medium@).
    --
    -- -   @launch.kernel-id@ - The kernel ID.
    --
    -- -   @launch.key-name@ - The name of the key pair the instance launched
    --     with.
    --
    -- -   @launch.monitoring-enabled@ - Whether detailed monitoring is enabled
    --     for the Spot Instance.
    --
    -- -   @launch.ramdisk-id@ - The RAM disk ID.
    --
    -- -   @launched-availability-zone@ - The Availability Zone in which the
    --     request is launched.
    --
    -- -   @network-interface.addresses.primary@ - Indicates whether the IP
    --     address is the primary private IP address.
    --
    -- -   @network-interface.delete-on-termination@ - Indicates whether the
    --     network interface is deleted when the instance is terminated.
    --
    -- -   @network-interface.description@ - A description of the network
    --     interface.
    --
    -- -   @network-interface.device-index@ - The index of the device for the
    --     network interface attachment on the instance.
    --
    -- -   @network-interface.group-id@ - The ID of the security group
    --     associated with the network interface.
    --
    -- -   @network-interface.network-interface-id@ - The ID of the network
    --     interface.
    --
    -- -   @network-interface.private-ip-address@ - The primary private IP
    --     address of the network interface.
    --
    -- -   @network-interface.subnet-id@ - The ID of the subnet for the
    --     instance.
    --
    -- -   @product-description@ - The product description associated with the
    --     instance (@Linux\/UNIX@ | @Windows@).
    --
    -- -   @spot-instance-request-id@ - The Spot Instance request ID.
    --
    -- -   @spot-price@ - The maximum hourly price for any Spot Instance
    --     launched to fulfill the request.
    --
    -- -   @state@ - The state of the Spot Instance request (@open@ | @active@
    --     | @closed@ | @cancelled@ | @failed@). Spot request status
    --     information can help you track your Amazon EC2 Spot Instance
    --     requests. For more information, see
    --     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html Spot request status>
    --     in the /Amazon EC2 User Guide for Linux Instances/.
    --
    -- -   @status-code@ - The short code describing the most recent evaluation
    --     of your Spot Instance request.
    --
    -- -   @status-message@ - The message explaining the status of the Spot
    --     Instance request.
    --
    -- -   @tag:\<key>@ - The key\/value combination of a tag assigned to the
    --     resource. Use the tag key in the filter name and the tag value as
    --     the filter value. For example, to find all resources that have a tag
    --     with the key @Owner@ and the value @TeamA@, specify @tag:Owner@ for
    --     the filter name and @TeamA@ for the filter value.
    --
    -- -   @tag-key@ - The key of a tag assigned to the resource. Use this
    --     filter to find all resources assigned a tag with a specific key,
    --     regardless of the tag value.
    --
    -- -   @type@ - The type of Spot Instance request (@one-time@ |
    --     @persistent@).
    --
    -- -   @valid-from@ - The start date of the request.
    --
    -- -   @valid-until@ - The end date of the request.
    DescribeSpotInstanceRequests -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The maximum number of results to return in a single call. Specify a
    -- value between 5 and 1000. To retrieve the remaining results, make
    -- another call with the returned @NextToken@ value.
    DescribeSpotInstanceRequests -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The token to request the next set of results. This value is @null@ when
    -- there are no more results to return.
    DescribeSpotInstanceRequests -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | One or more Spot Instance request IDs.
    DescribeSpotInstanceRequests -> Maybe [Text]
spotInstanceRequestIds :: Prelude.Maybe [Prelude.Text]
  }
  deriving (DescribeSpotInstanceRequests
-> DescribeSpotInstanceRequests -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSpotInstanceRequests
-> DescribeSpotInstanceRequests -> Bool
$c/= :: DescribeSpotInstanceRequests
-> DescribeSpotInstanceRequests -> Bool
== :: DescribeSpotInstanceRequests
-> DescribeSpotInstanceRequests -> Bool
$c== :: DescribeSpotInstanceRequests
-> DescribeSpotInstanceRequests -> Bool
Prelude.Eq, ReadPrec [DescribeSpotInstanceRequests]
ReadPrec DescribeSpotInstanceRequests
Int -> ReadS DescribeSpotInstanceRequests
ReadS [DescribeSpotInstanceRequests]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSpotInstanceRequests]
$creadListPrec :: ReadPrec [DescribeSpotInstanceRequests]
readPrec :: ReadPrec DescribeSpotInstanceRequests
$creadPrec :: ReadPrec DescribeSpotInstanceRequests
readList :: ReadS [DescribeSpotInstanceRequests]
$creadList :: ReadS [DescribeSpotInstanceRequests]
readsPrec :: Int -> ReadS DescribeSpotInstanceRequests
$creadsPrec :: Int -> ReadS DescribeSpotInstanceRequests
Prelude.Read, Int -> DescribeSpotInstanceRequests -> ShowS
[DescribeSpotInstanceRequests] -> ShowS
DescribeSpotInstanceRequests -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSpotInstanceRequests] -> ShowS
$cshowList :: [DescribeSpotInstanceRequests] -> ShowS
show :: DescribeSpotInstanceRequests -> String
$cshow :: DescribeSpotInstanceRequests -> String
showsPrec :: Int -> DescribeSpotInstanceRequests -> ShowS
$cshowsPrec :: Int -> DescribeSpotInstanceRequests -> ShowS
Prelude.Show, forall x.
Rep DescribeSpotInstanceRequests x -> DescribeSpotInstanceRequests
forall x.
DescribeSpotInstanceRequests -> Rep DescribeSpotInstanceRequests x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSpotInstanceRequests x -> DescribeSpotInstanceRequests
$cfrom :: forall x.
DescribeSpotInstanceRequests -> Rep DescribeSpotInstanceRequests x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSpotInstanceRequests' 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', 'describeSpotInstanceRequests_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', 'describeSpotInstanceRequests_filters' - One or more filters.
--
-- -   @availability-zone-group@ - The Availability Zone group.
--
-- -   @create-time@ - The time stamp when the Spot Instance request was
--     created.
--
-- -   @fault-code@ - The fault code related to the request.
--
-- -   @fault-message@ - The fault message related to the request.
--
-- -   @instance-id@ - The ID of the instance that fulfilled the request.
--
-- -   @launch-group@ - The Spot Instance launch group.
--
-- -   @launch.block-device-mapping.delete-on-termination@ - Indicates
--     whether the EBS volume is deleted on instance termination.
--
-- -   @launch.block-device-mapping.device-name@ - The device name for the
--     volume in the block device mapping (for example, @\/dev\/sdh@ or
--     @xvdh@).
--
-- -   @launch.block-device-mapping.snapshot-id@ - The ID of the snapshot
--     for the EBS volume.
--
-- -   @launch.block-device-mapping.volume-size@ - The size of the EBS
--     volume, in GiB.
--
-- -   @launch.block-device-mapping.volume-type@ - The type of EBS volume:
--     @gp2@ for General Purpose SSD, @io1@ or @io2@ for Provisioned IOPS
--     SSD, @st1@ for Throughput Optimized HDD, @sc1@for Cold HDD, or
--     @standard@ for Magnetic.
--
-- -   @launch.group-id@ - The ID of the security group for the instance.
--
-- -   @launch.group-name@ - The name of the security group for the
--     instance.
--
-- -   @launch.image-id@ - The ID of the AMI.
--
-- -   @launch.instance-type@ - The type of instance (for example,
--     @m3.medium@).
--
-- -   @launch.kernel-id@ - The kernel ID.
--
-- -   @launch.key-name@ - The name of the key pair the instance launched
--     with.
--
-- -   @launch.monitoring-enabled@ - Whether detailed monitoring is enabled
--     for the Spot Instance.
--
-- -   @launch.ramdisk-id@ - The RAM disk ID.
--
-- -   @launched-availability-zone@ - The Availability Zone in which the
--     request is launched.
--
-- -   @network-interface.addresses.primary@ - Indicates whether the IP
--     address is the primary private IP address.
--
-- -   @network-interface.delete-on-termination@ - Indicates whether the
--     network interface is deleted when the instance is terminated.
--
-- -   @network-interface.description@ - A description of the network
--     interface.
--
-- -   @network-interface.device-index@ - The index of the device for the
--     network interface attachment on the instance.
--
-- -   @network-interface.group-id@ - The ID of the security group
--     associated with the network interface.
--
-- -   @network-interface.network-interface-id@ - The ID of the network
--     interface.
--
-- -   @network-interface.private-ip-address@ - The primary private IP
--     address of the network interface.
--
-- -   @network-interface.subnet-id@ - The ID of the subnet for the
--     instance.
--
-- -   @product-description@ - The product description associated with the
--     instance (@Linux\/UNIX@ | @Windows@).
--
-- -   @spot-instance-request-id@ - The Spot Instance request ID.
--
-- -   @spot-price@ - The maximum hourly price for any Spot Instance
--     launched to fulfill the request.
--
-- -   @state@ - The state of the Spot Instance request (@open@ | @active@
--     | @closed@ | @cancelled@ | @failed@). Spot request status
--     information can help you track your Amazon EC2 Spot Instance
--     requests. For more information, see
--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html Spot request status>
--     in the /Amazon EC2 User Guide for Linux Instances/.
--
-- -   @status-code@ - The short code describing the most recent evaluation
--     of your Spot Instance request.
--
-- -   @status-message@ - The message explaining the status of the Spot
--     Instance request.
--
-- -   @tag:\<key>@ - The key\/value combination of a tag assigned to the
--     resource. Use the tag key in the filter name and the tag value as
--     the filter value. For example, to find all resources that have a tag
--     with the key @Owner@ and the value @TeamA@, specify @tag:Owner@ for
--     the filter name and @TeamA@ for the filter value.
--
-- -   @tag-key@ - The key of a tag assigned to the resource. Use this
--     filter to find all resources assigned a tag with a specific key,
--     regardless of the tag value.
--
-- -   @type@ - The type of Spot Instance request (@one-time@ |
--     @persistent@).
--
-- -   @valid-from@ - The start date of the request.
--
-- -   @valid-until@ - The end date of the request.
--
-- 'maxResults', 'describeSpotInstanceRequests_maxResults' - The maximum number of results to return in a single call. Specify a
-- value between 5 and 1000. To retrieve the remaining results, make
-- another call with the returned @NextToken@ value.
--
-- 'nextToken', 'describeSpotInstanceRequests_nextToken' - The token to request the next set of results. This value is @null@ when
-- there are no more results to return.
--
-- 'spotInstanceRequestIds', 'describeSpotInstanceRequests_spotInstanceRequestIds' - One or more Spot Instance request IDs.
newDescribeSpotInstanceRequests ::
  DescribeSpotInstanceRequests
newDescribeSpotInstanceRequests :: DescribeSpotInstanceRequests
newDescribeSpotInstanceRequests =
  DescribeSpotInstanceRequests'
    { $sel:dryRun:DescribeSpotInstanceRequests' :: Maybe Bool
dryRun =
        forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeSpotInstanceRequests' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeSpotInstanceRequests' :: Maybe Int
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeSpotInstanceRequests' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:spotInstanceRequestIds:DescribeSpotInstanceRequests' :: Maybe [Text]
spotInstanceRequestIds = 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@.
describeSpotInstanceRequests_dryRun :: Lens.Lens' DescribeSpotInstanceRequests (Prelude.Maybe Prelude.Bool)
describeSpotInstanceRequests_dryRun :: Lens' DescribeSpotInstanceRequests (Maybe Bool)
describeSpotInstanceRequests_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSpotInstanceRequests' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DescribeSpotInstanceRequests
s@DescribeSpotInstanceRequests' {} Maybe Bool
a -> DescribeSpotInstanceRequests
s {$sel:dryRun:DescribeSpotInstanceRequests' :: Maybe Bool
dryRun = Maybe Bool
a} :: DescribeSpotInstanceRequests)

-- | One or more filters.
--
-- -   @availability-zone-group@ - The Availability Zone group.
--
-- -   @create-time@ - The time stamp when the Spot Instance request was
--     created.
--
-- -   @fault-code@ - The fault code related to the request.
--
-- -   @fault-message@ - The fault message related to the request.
--
-- -   @instance-id@ - The ID of the instance that fulfilled the request.
--
-- -   @launch-group@ - The Spot Instance launch group.
--
-- -   @launch.block-device-mapping.delete-on-termination@ - Indicates
--     whether the EBS volume is deleted on instance termination.
--
-- -   @launch.block-device-mapping.device-name@ - The device name for the
--     volume in the block device mapping (for example, @\/dev\/sdh@ or
--     @xvdh@).
--
-- -   @launch.block-device-mapping.snapshot-id@ - The ID of the snapshot
--     for the EBS volume.
--
-- -   @launch.block-device-mapping.volume-size@ - The size of the EBS
--     volume, in GiB.
--
-- -   @launch.block-device-mapping.volume-type@ - The type of EBS volume:
--     @gp2@ for General Purpose SSD, @io1@ or @io2@ for Provisioned IOPS
--     SSD, @st1@ for Throughput Optimized HDD, @sc1@for Cold HDD, or
--     @standard@ for Magnetic.
--
-- -   @launch.group-id@ - The ID of the security group for the instance.
--
-- -   @launch.group-name@ - The name of the security group for the
--     instance.
--
-- -   @launch.image-id@ - The ID of the AMI.
--
-- -   @launch.instance-type@ - The type of instance (for example,
--     @m3.medium@).
--
-- -   @launch.kernel-id@ - The kernel ID.
--
-- -   @launch.key-name@ - The name of the key pair the instance launched
--     with.
--
-- -   @launch.monitoring-enabled@ - Whether detailed monitoring is enabled
--     for the Spot Instance.
--
-- -   @launch.ramdisk-id@ - The RAM disk ID.
--
-- -   @launched-availability-zone@ - The Availability Zone in which the
--     request is launched.
--
-- -   @network-interface.addresses.primary@ - Indicates whether the IP
--     address is the primary private IP address.
--
-- -   @network-interface.delete-on-termination@ - Indicates whether the
--     network interface is deleted when the instance is terminated.
--
-- -   @network-interface.description@ - A description of the network
--     interface.
--
-- -   @network-interface.device-index@ - The index of the device for the
--     network interface attachment on the instance.
--
-- -   @network-interface.group-id@ - The ID of the security group
--     associated with the network interface.
--
-- -   @network-interface.network-interface-id@ - The ID of the network
--     interface.
--
-- -   @network-interface.private-ip-address@ - The primary private IP
--     address of the network interface.
--
-- -   @network-interface.subnet-id@ - The ID of the subnet for the
--     instance.
--
-- -   @product-description@ - The product description associated with the
--     instance (@Linux\/UNIX@ | @Windows@).
--
-- -   @spot-instance-request-id@ - The Spot Instance request ID.
--
-- -   @spot-price@ - The maximum hourly price for any Spot Instance
--     launched to fulfill the request.
--
-- -   @state@ - The state of the Spot Instance request (@open@ | @active@
--     | @closed@ | @cancelled@ | @failed@). Spot request status
--     information can help you track your Amazon EC2 Spot Instance
--     requests. For more information, see
--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html Spot request status>
--     in the /Amazon EC2 User Guide for Linux Instances/.
--
-- -   @status-code@ - The short code describing the most recent evaluation
--     of your Spot Instance request.
--
-- -   @status-message@ - The message explaining the status of the Spot
--     Instance request.
--
-- -   @tag:\<key>@ - The key\/value combination of a tag assigned to the
--     resource. Use the tag key in the filter name and the tag value as
--     the filter value. For example, to find all resources that have a tag
--     with the key @Owner@ and the value @TeamA@, specify @tag:Owner@ for
--     the filter name and @TeamA@ for the filter value.
--
-- -   @tag-key@ - The key of a tag assigned to the resource. Use this
--     filter to find all resources assigned a tag with a specific key,
--     regardless of the tag value.
--
-- -   @type@ - The type of Spot Instance request (@one-time@ |
--     @persistent@).
--
-- -   @valid-from@ - The start date of the request.
--
-- -   @valid-until@ - The end date of the request.
describeSpotInstanceRequests_filters :: Lens.Lens' DescribeSpotInstanceRequests (Prelude.Maybe [Filter])
describeSpotInstanceRequests_filters :: Lens' DescribeSpotInstanceRequests (Maybe [Filter])
describeSpotInstanceRequests_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSpotInstanceRequests' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeSpotInstanceRequests
s@DescribeSpotInstanceRequests' {} Maybe [Filter]
a -> DescribeSpotInstanceRequests
s {$sel:filters:DescribeSpotInstanceRequests' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeSpotInstanceRequests) 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 in a single call. Specify a
-- value between 5 and 1000. To retrieve the remaining results, make
-- another call with the returned @NextToken@ value.
describeSpotInstanceRequests_maxResults :: Lens.Lens' DescribeSpotInstanceRequests (Prelude.Maybe Prelude.Int)
describeSpotInstanceRequests_maxResults :: Lens' DescribeSpotInstanceRequests (Maybe Int)
describeSpotInstanceRequests_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSpotInstanceRequests' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeSpotInstanceRequests
s@DescribeSpotInstanceRequests' {} Maybe Int
a -> DescribeSpotInstanceRequests
s {$sel:maxResults:DescribeSpotInstanceRequests' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeSpotInstanceRequests)

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

-- | One or more Spot Instance request IDs.
describeSpotInstanceRequests_spotInstanceRequestIds :: Lens.Lens' DescribeSpotInstanceRequests (Prelude.Maybe [Prelude.Text])
describeSpotInstanceRequests_spotInstanceRequestIds :: Lens' DescribeSpotInstanceRequests (Maybe [Text])
describeSpotInstanceRequests_spotInstanceRequestIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSpotInstanceRequests' {Maybe [Text]
spotInstanceRequestIds :: Maybe [Text]
$sel:spotInstanceRequestIds:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe [Text]
spotInstanceRequestIds} -> Maybe [Text]
spotInstanceRequestIds) (\s :: DescribeSpotInstanceRequests
s@DescribeSpotInstanceRequests' {} Maybe [Text]
a -> DescribeSpotInstanceRequests
s {$sel:spotInstanceRequestIds:DescribeSpotInstanceRequests' :: Maybe [Text]
spotInstanceRequestIds = Maybe [Text]
a} :: DescribeSpotInstanceRequests) 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

instance Core.AWSPager DescribeSpotInstanceRequests where
  page :: DescribeSpotInstanceRequests
-> AWSResponse DescribeSpotInstanceRequests
-> Maybe DescribeSpotInstanceRequests
page DescribeSpotInstanceRequests
rq AWSResponse DescribeSpotInstanceRequests
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeSpotInstanceRequests
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeSpotInstanceRequestsResponse (Maybe Text)
describeSpotInstanceRequestsResponse_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 DescribeSpotInstanceRequests
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeSpotInstanceRequestsResponse (Maybe [SpotInstanceRequest])
describeSpotInstanceRequestsResponse_spotInstanceRequests
            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.$ DescribeSpotInstanceRequests
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeSpotInstanceRequests (Maybe Text)
describeSpotInstanceRequests_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeSpotInstanceRequests
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeSpotInstanceRequestsResponse (Maybe Text)
describeSpotInstanceRequestsResponse_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 DescribeSpotInstanceRequests where
  type
    AWSResponse DescribeSpotInstanceRequests =
      DescribeSpotInstanceRequestsResponse
  request :: (Service -> Service)
-> DescribeSpotInstanceRequests
-> Request DescribeSpotInstanceRequests
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 DescribeSpotInstanceRequests
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeSpotInstanceRequests)))
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 Text
-> Maybe [SpotInstanceRequest]
-> Int
-> DescribeSpotInstanceRequestsResponse
DescribeSpotInstanceRequestsResponse'
            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
"nextToken")
            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
"spotInstanceRequestSet"
                            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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    DescribeSpotInstanceRequests
  where
  hashWithSalt :: Int -> DescribeSpotInstanceRequests -> Int
hashWithSalt Int
_salt DescribeSpotInstanceRequests' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [Filter]
Maybe Text
spotInstanceRequestIds :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:spotInstanceRequestIds:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe [Text]
$sel:nextToken:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe Text
$sel:maxResults:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe Int
$sel:filters:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe [Filter]
$sel:dryRun:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> 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 Int
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
spotInstanceRequestIds

instance Prelude.NFData DescribeSpotInstanceRequests where
  rnf :: DescribeSpotInstanceRequests -> ()
rnf DescribeSpotInstanceRequests' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [Filter]
Maybe Text
spotInstanceRequestIds :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:spotInstanceRequestIds:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe [Text]
$sel:nextToken:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe Text
$sel:maxResults:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe Int
$sel:filters:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe [Filter]
$sel:dryRun:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> 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 Int
maxResults
      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 Maybe [Text]
spotInstanceRequestIds

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

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

instance Data.ToQuery DescribeSpotInstanceRequests where
  toQuery :: DescribeSpotInstanceRequests -> QueryString
toQuery DescribeSpotInstanceRequests' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [Filter]
Maybe Text
spotInstanceRequestIds :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:spotInstanceRequestIds:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe [Text]
$sel:nextToken:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe Text
$sel:maxResults:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe Int
$sel:filters:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe [Filter]
$sel:dryRun:DescribeSpotInstanceRequests' :: DescribeSpotInstanceRequests -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"DescribeSpotInstanceRequests" ::
                      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),
        ByteString
"MaxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
maxResults,
        ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"SpotInstanceRequestId"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
spotInstanceRequestIds
          )
      ]

-- | Contains the output of DescribeSpotInstanceRequests.
--
-- /See:/ 'newDescribeSpotInstanceRequestsResponse' smart constructor.
data DescribeSpotInstanceRequestsResponse = DescribeSpotInstanceRequestsResponse'
  { -- | The token to use to retrieve the next set of results. This value is
    -- @null@ when there are no more results to return.
    DescribeSpotInstanceRequestsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | One or more Spot Instance requests.
    DescribeSpotInstanceRequestsResponse -> Maybe [SpotInstanceRequest]
spotInstanceRequests :: Prelude.Maybe [SpotInstanceRequest],
    -- | The response's http status code.
    DescribeSpotInstanceRequestsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeSpotInstanceRequestsResponse
-> DescribeSpotInstanceRequestsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSpotInstanceRequestsResponse
-> DescribeSpotInstanceRequestsResponse -> Bool
$c/= :: DescribeSpotInstanceRequestsResponse
-> DescribeSpotInstanceRequestsResponse -> Bool
== :: DescribeSpotInstanceRequestsResponse
-> DescribeSpotInstanceRequestsResponse -> Bool
$c== :: DescribeSpotInstanceRequestsResponse
-> DescribeSpotInstanceRequestsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeSpotInstanceRequestsResponse]
ReadPrec DescribeSpotInstanceRequestsResponse
Int -> ReadS DescribeSpotInstanceRequestsResponse
ReadS [DescribeSpotInstanceRequestsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSpotInstanceRequestsResponse]
$creadListPrec :: ReadPrec [DescribeSpotInstanceRequestsResponse]
readPrec :: ReadPrec DescribeSpotInstanceRequestsResponse
$creadPrec :: ReadPrec DescribeSpotInstanceRequestsResponse
readList :: ReadS [DescribeSpotInstanceRequestsResponse]
$creadList :: ReadS [DescribeSpotInstanceRequestsResponse]
readsPrec :: Int -> ReadS DescribeSpotInstanceRequestsResponse
$creadsPrec :: Int -> ReadS DescribeSpotInstanceRequestsResponse
Prelude.Read, Int -> DescribeSpotInstanceRequestsResponse -> ShowS
[DescribeSpotInstanceRequestsResponse] -> ShowS
DescribeSpotInstanceRequestsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSpotInstanceRequestsResponse] -> ShowS
$cshowList :: [DescribeSpotInstanceRequestsResponse] -> ShowS
show :: DescribeSpotInstanceRequestsResponse -> String
$cshow :: DescribeSpotInstanceRequestsResponse -> String
showsPrec :: Int -> DescribeSpotInstanceRequestsResponse -> ShowS
$cshowsPrec :: Int -> DescribeSpotInstanceRequestsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeSpotInstanceRequestsResponse x
-> DescribeSpotInstanceRequestsResponse
forall x.
DescribeSpotInstanceRequestsResponse
-> Rep DescribeSpotInstanceRequestsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSpotInstanceRequestsResponse x
-> DescribeSpotInstanceRequestsResponse
$cfrom :: forall x.
DescribeSpotInstanceRequestsResponse
-> Rep DescribeSpotInstanceRequestsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSpotInstanceRequestsResponse' 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:
--
-- 'nextToken', 'describeSpotInstanceRequestsResponse_nextToken' - The token to use to retrieve the next set of results. This value is
-- @null@ when there are no more results to return.
--
-- 'spotInstanceRequests', 'describeSpotInstanceRequestsResponse_spotInstanceRequests' - One or more Spot Instance requests.
--
-- 'httpStatus', 'describeSpotInstanceRequestsResponse_httpStatus' - The response's http status code.
newDescribeSpotInstanceRequestsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeSpotInstanceRequestsResponse
newDescribeSpotInstanceRequestsResponse :: Int -> DescribeSpotInstanceRequestsResponse
newDescribeSpotInstanceRequestsResponse Int
pHttpStatus_ =
  DescribeSpotInstanceRequestsResponse'
    { $sel:nextToken:DescribeSpotInstanceRequestsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:spotInstanceRequests:DescribeSpotInstanceRequestsResponse' :: Maybe [SpotInstanceRequest]
spotInstanceRequests =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeSpotInstanceRequestsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | One or more Spot Instance requests.
describeSpotInstanceRequestsResponse_spotInstanceRequests :: Lens.Lens' DescribeSpotInstanceRequestsResponse (Prelude.Maybe [SpotInstanceRequest])
describeSpotInstanceRequestsResponse_spotInstanceRequests :: Lens'
  DescribeSpotInstanceRequestsResponse (Maybe [SpotInstanceRequest])
describeSpotInstanceRequestsResponse_spotInstanceRequests = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSpotInstanceRequestsResponse' {Maybe [SpotInstanceRequest]
spotInstanceRequests :: Maybe [SpotInstanceRequest]
$sel:spotInstanceRequests:DescribeSpotInstanceRequestsResponse' :: DescribeSpotInstanceRequestsResponse -> Maybe [SpotInstanceRequest]
spotInstanceRequests} -> Maybe [SpotInstanceRequest]
spotInstanceRequests) (\s :: DescribeSpotInstanceRequestsResponse
s@DescribeSpotInstanceRequestsResponse' {} Maybe [SpotInstanceRequest]
a -> DescribeSpotInstanceRequestsResponse
s {$sel:spotInstanceRequests:DescribeSpotInstanceRequestsResponse' :: Maybe [SpotInstanceRequest]
spotInstanceRequests = Maybe [SpotInstanceRequest]
a} :: DescribeSpotInstanceRequestsResponse) 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 response's http status code.
describeSpotInstanceRequestsResponse_httpStatus :: Lens.Lens' DescribeSpotInstanceRequestsResponse Prelude.Int
describeSpotInstanceRequestsResponse_httpStatus :: Lens' DescribeSpotInstanceRequestsResponse Int
describeSpotInstanceRequestsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSpotInstanceRequestsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeSpotInstanceRequestsResponse' :: DescribeSpotInstanceRequestsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeSpotInstanceRequestsResponse
s@DescribeSpotInstanceRequestsResponse' {} Int
a -> DescribeSpotInstanceRequestsResponse
s {$sel:httpStatus:DescribeSpotInstanceRequestsResponse' :: Int
httpStatus = Int
a} :: DescribeSpotInstanceRequestsResponse)

instance
  Prelude.NFData
    DescribeSpotInstanceRequestsResponse
  where
  rnf :: DescribeSpotInstanceRequestsResponse -> ()
rnf DescribeSpotInstanceRequestsResponse' {Int
Maybe [SpotInstanceRequest]
Maybe Text
httpStatus :: Int
spotInstanceRequests :: Maybe [SpotInstanceRequest]
nextToken :: Maybe Text
$sel:httpStatus:DescribeSpotInstanceRequestsResponse' :: DescribeSpotInstanceRequestsResponse -> Int
$sel:spotInstanceRequests:DescribeSpotInstanceRequestsResponse' :: DescribeSpotInstanceRequestsResponse -> Maybe [SpotInstanceRequest]
$sel:nextToken:DescribeSpotInstanceRequestsResponse' :: DescribeSpotInstanceRequestsResponse -> Maybe Text
..} =
    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 Maybe [SpotInstanceRequest]
spotInstanceRequests
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus