{-# 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.AutoScaling.DescribeWarmPool
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets information about a warm pool and its instances.
--
-- For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html Warm pools for Amazon EC2 Auto Scaling>
-- in the /Amazon EC2 Auto Scaling User Guide/.
module Amazonka.AutoScaling.DescribeWarmPool
  ( -- * Creating a Request
    DescribeWarmPool (..),
    newDescribeWarmPool,

    -- * Request Lenses
    describeWarmPool_nextToken,
    describeWarmPool_maxRecords,
    describeWarmPool_autoScalingGroupName,

    -- * Destructuring the Response
    DescribeWarmPoolResponse (..),
    newDescribeWarmPoolResponse,

    -- * Response Lenses
    describeWarmPoolResponse_nextToken,
    describeWarmPoolResponse_instances,
    describeWarmPoolResponse_warmPoolConfiguration,
    describeWarmPoolResponse_httpStatus,
  )
where

import Amazonka.AutoScaling.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeWarmPool' smart constructor.
data DescribeWarmPool = DescribeWarmPool'
  { -- | The token for the next set of instances to return. (You received this
    -- token from a previous call.)
    DescribeWarmPool -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of instances to return with this call. The maximum
    -- value is @50@.
    DescribeWarmPool -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | The name of the Auto Scaling group.
    DescribeWarmPool -> Text
autoScalingGroupName :: Prelude.Text
  }
  deriving (DescribeWarmPool -> DescribeWarmPool -> Bool
(DescribeWarmPool -> DescribeWarmPool -> Bool)
-> (DescribeWarmPool -> DescribeWarmPool -> Bool)
-> Eq DescribeWarmPool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeWarmPool -> DescribeWarmPool -> Bool
$c/= :: DescribeWarmPool -> DescribeWarmPool -> Bool
== :: DescribeWarmPool -> DescribeWarmPool -> Bool
$c== :: DescribeWarmPool -> DescribeWarmPool -> Bool
Prelude.Eq, ReadPrec [DescribeWarmPool]
ReadPrec DescribeWarmPool
Int -> ReadS DescribeWarmPool
ReadS [DescribeWarmPool]
(Int -> ReadS DescribeWarmPool)
-> ReadS [DescribeWarmPool]
-> ReadPrec DescribeWarmPool
-> ReadPrec [DescribeWarmPool]
-> Read DescribeWarmPool
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeWarmPool]
$creadListPrec :: ReadPrec [DescribeWarmPool]
readPrec :: ReadPrec DescribeWarmPool
$creadPrec :: ReadPrec DescribeWarmPool
readList :: ReadS [DescribeWarmPool]
$creadList :: ReadS [DescribeWarmPool]
readsPrec :: Int -> ReadS DescribeWarmPool
$creadsPrec :: Int -> ReadS DescribeWarmPool
Prelude.Read, Int -> DescribeWarmPool -> ShowS
[DescribeWarmPool] -> ShowS
DescribeWarmPool -> String
(Int -> DescribeWarmPool -> ShowS)
-> (DescribeWarmPool -> String)
-> ([DescribeWarmPool] -> ShowS)
-> Show DescribeWarmPool
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeWarmPool] -> ShowS
$cshowList :: [DescribeWarmPool] -> ShowS
show :: DescribeWarmPool -> String
$cshow :: DescribeWarmPool -> String
showsPrec :: Int -> DescribeWarmPool -> ShowS
$cshowsPrec :: Int -> DescribeWarmPool -> ShowS
Prelude.Show, (forall x. DescribeWarmPool -> Rep DescribeWarmPool x)
-> (forall x. Rep DescribeWarmPool x -> DescribeWarmPool)
-> Generic DescribeWarmPool
forall x. Rep DescribeWarmPool x -> DescribeWarmPool
forall x. DescribeWarmPool -> Rep DescribeWarmPool x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeWarmPool x -> DescribeWarmPool
$cfrom :: forall x. DescribeWarmPool -> Rep DescribeWarmPool x
Prelude.Generic)

-- |
-- Create a value of 'DescribeWarmPool' 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', 'describeWarmPool_nextToken' - The token for the next set of instances to return. (You received this
-- token from a previous call.)
--
-- 'maxRecords', 'describeWarmPool_maxRecords' - The maximum number of instances to return with this call. The maximum
-- value is @50@.
--
-- 'autoScalingGroupName', 'describeWarmPool_autoScalingGroupName' - The name of the Auto Scaling group.
newDescribeWarmPool ::
  -- | 'autoScalingGroupName'
  Prelude.Text ->
  DescribeWarmPool
newDescribeWarmPool :: Text -> DescribeWarmPool
newDescribeWarmPool Text
pAutoScalingGroupName_ =
  DescribeWarmPool' :: Maybe Text -> Maybe Int -> Text -> DescribeWarmPool
DescribeWarmPool'
    { $sel:nextToken:DescribeWarmPool' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeWarmPool' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:autoScalingGroupName:DescribeWarmPool' :: Text
autoScalingGroupName = Text
pAutoScalingGroupName_
    }

-- | The token for the next set of instances to return. (You received this
-- token from a previous call.)
describeWarmPool_nextToken :: Lens.Lens' DescribeWarmPool (Prelude.Maybe Prelude.Text)
describeWarmPool_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeWarmPool -> f DescribeWarmPool
describeWarmPool_nextToken = (DescribeWarmPool -> Maybe Text)
-> (DescribeWarmPool -> Maybe Text -> DescribeWarmPool)
-> Lens DescribeWarmPool DescribeWarmPool (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWarmPool' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeWarmPool' :: DescribeWarmPool -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeWarmPool
s@DescribeWarmPool' {} Maybe Text
a -> DescribeWarmPool
s {$sel:nextToken:DescribeWarmPool' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeWarmPool)

-- | The maximum number of instances to return with this call. The maximum
-- value is @50@.
describeWarmPool_maxRecords :: Lens.Lens' DescribeWarmPool (Prelude.Maybe Prelude.Int)
describeWarmPool_maxRecords :: (Maybe Int -> f (Maybe Int))
-> DescribeWarmPool -> f DescribeWarmPool
describeWarmPool_maxRecords = (DescribeWarmPool -> Maybe Int)
-> (DescribeWarmPool -> Maybe Int -> DescribeWarmPool)
-> Lens DescribeWarmPool DescribeWarmPool (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWarmPool' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeWarmPool' :: DescribeWarmPool -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeWarmPool
s@DescribeWarmPool' {} Maybe Int
a -> DescribeWarmPool
s {$sel:maxRecords:DescribeWarmPool' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeWarmPool)

-- | The name of the Auto Scaling group.
describeWarmPool_autoScalingGroupName :: Lens.Lens' DescribeWarmPool Prelude.Text
describeWarmPool_autoScalingGroupName :: (Text -> f Text) -> DescribeWarmPool -> f DescribeWarmPool
describeWarmPool_autoScalingGroupName = (DescribeWarmPool -> Text)
-> (DescribeWarmPool -> Text -> DescribeWarmPool)
-> Lens DescribeWarmPool DescribeWarmPool Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWarmPool' {Text
autoScalingGroupName :: Text
$sel:autoScalingGroupName:DescribeWarmPool' :: DescribeWarmPool -> Text
autoScalingGroupName} -> Text
autoScalingGroupName) (\s :: DescribeWarmPool
s@DescribeWarmPool' {} Text
a -> DescribeWarmPool
s {$sel:autoScalingGroupName:DescribeWarmPool' :: Text
autoScalingGroupName = Text
a} :: DescribeWarmPool)

instance Core.AWSRequest DescribeWarmPool where
  type
    AWSResponse DescribeWarmPool =
      DescribeWarmPoolResponse
  request :: DescribeWarmPool -> Request DescribeWarmPool
request = Service -> DescribeWarmPool -> Request DescribeWarmPool
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeWarmPool
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeWarmPool)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeWarmPool))
-> Logger
-> Service
-> Proxy DescribeWarmPool
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeWarmPool)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeWarmPoolResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [Instance]
-> Maybe WarmPoolConfiguration
-> Int
-> DescribeWarmPoolResponse
DescribeWarmPoolResponse'
            (Maybe Text
 -> Maybe [Instance]
 -> Maybe WarmPoolConfiguration
 -> Int
 -> DescribeWarmPoolResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Instance]
      -> Maybe WarmPoolConfiguration -> Int -> DescribeWarmPoolResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NextToken")
            Either
  String
  (Maybe [Instance]
   -> Maybe WarmPoolConfiguration -> Int -> DescribeWarmPoolResponse)
-> Either String (Maybe [Instance])
-> Either
     String
     (Maybe WarmPoolConfiguration -> Int -> DescribeWarmPoolResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Instances" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [Instance]))
-> Either String (Maybe [Instance])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Instance])
-> [Node] -> Either String (Maybe [Instance])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Instance]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either
  String
  (Maybe WarmPoolConfiguration -> Int -> DescribeWarmPoolResponse)
-> Either String (Maybe WarmPoolConfiguration)
-> Either String (Int -> DescribeWarmPoolResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe WarmPoolConfiguration)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"WarmPoolConfiguration")
            Either String (Int -> DescribeWarmPoolResponse)
-> Either String Int -> Either String DescribeWarmPoolResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeWarmPool

instance Prelude.NFData DescribeWarmPool

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

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

instance Core.ToQuery DescribeWarmPool where
  toQuery :: DescribeWarmPool -> QueryString
toQuery DescribeWarmPool' {Maybe Int
Maybe Text
Text
autoScalingGroupName :: Text
maxRecords :: Maybe Int
nextToken :: Maybe Text
$sel:autoScalingGroupName:DescribeWarmPool' :: DescribeWarmPool -> Text
$sel:maxRecords:DescribeWarmPool' :: DescribeWarmPool -> Maybe Int
$sel:nextToken:DescribeWarmPool' :: DescribeWarmPool -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DescribeWarmPool" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2011-01-01" :: Prelude.ByteString),
        ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"MaxRecords" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxRecords,
        ByteString
"AutoScalingGroupName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
autoScalingGroupName
      ]

-- | /See:/ 'newDescribeWarmPoolResponse' smart constructor.
data DescribeWarmPoolResponse = DescribeWarmPoolResponse'
  { -- | The token for the next set of items to return. (You received this token
    -- from a previous call.)
    DescribeWarmPoolResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The instances that are currently in the warm pool.
    DescribeWarmPoolResponse -> Maybe [Instance]
instances :: Prelude.Maybe [Instance],
    -- | The warm pool configuration details.
    DescribeWarmPoolResponse -> Maybe WarmPoolConfiguration
warmPoolConfiguration :: Prelude.Maybe WarmPoolConfiguration,
    -- | The response's http status code.
    DescribeWarmPoolResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeWarmPoolResponse -> DescribeWarmPoolResponse -> Bool
(DescribeWarmPoolResponse -> DescribeWarmPoolResponse -> Bool)
-> (DescribeWarmPoolResponse -> DescribeWarmPoolResponse -> Bool)
-> Eq DescribeWarmPoolResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeWarmPoolResponse -> DescribeWarmPoolResponse -> Bool
$c/= :: DescribeWarmPoolResponse -> DescribeWarmPoolResponse -> Bool
== :: DescribeWarmPoolResponse -> DescribeWarmPoolResponse -> Bool
$c== :: DescribeWarmPoolResponse -> DescribeWarmPoolResponse -> Bool
Prelude.Eq, ReadPrec [DescribeWarmPoolResponse]
ReadPrec DescribeWarmPoolResponse
Int -> ReadS DescribeWarmPoolResponse
ReadS [DescribeWarmPoolResponse]
(Int -> ReadS DescribeWarmPoolResponse)
-> ReadS [DescribeWarmPoolResponse]
-> ReadPrec DescribeWarmPoolResponse
-> ReadPrec [DescribeWarmPoolResponse]
-> Read DescribeWarmPoolResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeWarmPoolResponse]
$creadListPrec :: ReadPrec [DescribeWarmPoolResponse]
readPrec :: ReadPrec DescribeWarmPoolResponse
$creadPrec :: ReadPrec DescribeWarmPoolResponse
readList :: ReadS [DescribeWarmPoolResponse]
$creadList :: ReadS [DescribeWarmPoolResponse]
readsPrec :: Int -> ReadS DescribeWarmPoolResponse
$creadsPrec :: Int -> ReadS DescribeWarmPoolResponse
Prelude.Read, Int -> DescribeWarmPoolResponse -> ShowS
[DescribeWarmPoolResponse] -> ShowS
DescribeWarmPoolResponse -> String
(Int -> DescribeWarmPoolResponse -> ShowS)
-> (DescribeWarmPoolResponse -> String)
-> ([DescribeWarmPoolResponse] -> ShowS)
-> Show DescribeWarmPoolResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeWarmPoolResponse] -> ShowS
$cshowList :: [DescribeWarmPoolResponse] -> ShowS
show :: DescribeWarmPoolResponse -> String
$cshow :: DescribeWarmPoolResponse -> String
showsPrec :: Int -> DescribeWarmPoolResponse -> ShowS
$cshowsPrec :: Int -> DescribeWarmPoolResponse -> ShowS
Prelude.Show, (forall x.
 DescribeWarmPoolResponse -> Rep DescribeWarmPoolResponse x)
-> (forall x.
    Rep DescribeWarmPoolResponse x -> DescribeWarmPoolResponse)
-> Generic DescribeWarmPoolResponse
forall x.
Rep DescribeWarmPoolResponse x -> DescribeWarmPoolResponse
forall x.
DescribeWarmPoolResponse -> Rep DescribeWarmPoolResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeWarmPoolResponse x -> DescribeWarmPoolResponse
$cfrom :: forall x.
DescribeWarmPoolResponse -> Rep DescribeWarmPoolResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeWarmPoolResponse' 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', 'describeWarmPoolResponse_nextToken' - The token for the next set of items to return. (You received this token
-- from a previous call.)
--
-- 'instances', 'describeWarmPoolResponse_instances' - The instances that are currently in the warm pool.
--
-- 'warmPoolConfiguration', 'describeWarmPoolResponse_warmPoolConfiguration' - The warm pool configuration details.
--
-- 'httpStatus', 'describeWarmPoolResponse_httpStatus' - The response's http status code.
newDescribeWarmPoolResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeWarmPoolResponse
newDescribeWarmPoolResponse :: Int -> DescribeWarmPoolResponse
newDescribeWarmPoolResponse Int
pHttpStatus_ =
  DescribeWarmPoolResponse' :: Maybe Text
-> Maybe [Instance]
-> Maybe WarmPoolConfiguration
-> Int
-> DescribeWarmPoolResponse
DescribeWarmPoolResponse'
    { $sel:nextToken:DescribeWarmPoolResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:instances:DescribeWarmPoolResponse' :: Maybe [Instance]
instances = Maybe [Instance]
forall a. Maybe a
Prelude.Nothing,
      $sel:warmPoolConfiguration:DescribeWarmPoolResponse' :: Maybe WarmPoolConfiguration
warmPoolConfiguration = Maybe WarmPoolConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeWarmPoolResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token for the next set of items to return. (You received this token
-- from a previous call.)
describeWarmPoolResponse_nextToken :: Lens.Lens' DescribeWarmPoolResponse (Prelude.Maybe Prelude.Text)
describeWarmPoolResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeWarmPoolResponse -> f DescribeWarmPoolResponse
describeWarmPoolResponse_nextToken = (DescribeWarmPoolResponse -> Maybe Text)
-> (DescribeWarmPoolResponse
    -> Maybe Text -> DescribeWarmPoolResponse)
-> Lens
     DescribeWarmPoolResponse
     DescribeWarmPoolResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWarmPoolResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeWarmPoolResponse' :: DescribeWarmPoolResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeWarmPoolResponse
s@DescribeWarmPoolResponse' {} Maybe Text
a -> DescribeWarmPoolResponse
s {$sel:nextToken:DescribeWarmPoolResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeWarmPoolResponse)

-- | The instances that are currently in the warm pool.
describeWarmPoolResponse_instances :: Lens.Lens' DescribeWarmPoolResponse (Prelude.Maybe [Instance])
describeWarmPoolResponse_instances :: (Maybe [Instance] -> f (Maybe [Instance]))
-> DescribeWarmPoolResponse -> f DescribeWarmPoolResponse
describeWarmPoolResponse_instances = (DescribeWarmPoolResponse -> Maybe [Instance])
-> (DescribeWarmPoolResponse
    -> Maybe [Instance] -> DescribeWarmPoolResponse)
-> Lens
     DescribeWarmPoolResponse
     DescribeWarmPoolResponse
     (Maybe [Instance])
     (Maybe [Instance])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWarmPoolResponse' {Maybe [Instance]
instances :: Maybe [Instance]
$sel:instances:DescribeWarmPoolResponse' :: DescribeWarmPoolResponse -> Maybe [Instance]
instances} -> Maybe [Instance]
instances) (\s :: DescribeWarmPoolResponse
s@DescribeWarmPoolResponse' {} Maybe [Instance]
a -> DescribeWarmPoolResponse
s {$sel:instances:DescribeWarmPoolResponse' :: Maybe [Instance]
instances = Maybe [Instance]
a} :: DescribeWarmPoolResponse) ((Maybe [Instance] -> f (Maybe [Instance]))
 -> DescribeWarmPoolResponse -> f DescribeWarmPoolResponse)
-> ((Maybe [Instance] -> f (Maybe [Instance]))
    -> Maybe [Instance] -> f (Maybe [Instance]))
-> (Maybe [Instance] -> f (Maybe [Instance]))
-> DescribeWarmPoolResponse
-> f DescribeWarmPoolResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Instance] [Instance] [Instance] [Instance]
-> Iso
     (Maybe [Instance])
     (Maybe [Instance])
     (Maybe [Instance])
     (Maybe [Instance])
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 AnIso [Instance] [Instance] [Instance] [Instance]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The warm pool configuration details.
describeWarmPoolResponse_warmPoolConfiguration :: Lens.Lens' DescribeWarmPoolResponse (Prelude.Maybe WarmPoolConfiguration)
describeWarmPoolResponse_warmPoolConfiguration :: (Maybe WarmPoolConfiguration -> f (Maybe WarmPoolConfiguration))
-> DescribeWarmPoolResponse -> f DescribeWarmPoolResponse
describeWarmPoolResponse_warmPoolConfiguration = (DescribeWarmPoolResponse -> Maybe WarmPoolConfiguration)
-> (DescribeWarmPoolResponse
    -> Maybe WarmPoolConfiguration -> DescribeWarmPoolResponse)
-> Lens
     DescribeWarmPoolResponse
     DescribeWarmPoolResponse
     (Maybe WarmPoolConfiguration)
     (Maybe WarmPoolConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWarmPoolResponse' {Maybe WarmPoolConfiguration
warmPoolConfiguration :: Maybe WarmPoolConfiguration
$sel:warmPoolConfiguration:DescribeWarmPoolResponse' :: DescribeWarmPoolResponse -> Maybe WarmPoolConfiguration
warmPoolConfiguration} -> Maybe WarmPoolConfiguration
warmPoolConfiguration) (\s :: DescribeWarmPoolResponse
s@DescribeWarmPoolResponse' {} Maybe WarmPoolConfiguration
a -> DescribeWarmPoolResponse
s {$sel:warmPoolConfiguration:DescribeWarmPoolResponse' :: Maybe WarmPoolConfiguration
warmPoolConfiguration = Maybe WarmPoolConfiguration
a} :: DescribeWarmPoolResponse)

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

instance Prelude.NFData DescribeWarmPoolResponse