{-# 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.PutWarmPool
-- 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)
--
-- Creates or updates a warm pool for the specified Auto Scaling group. A
-- warm pool is a pool of pre-initialized EC2 instances that sits alongside
-- the Auto Scaling group. Whenever your application needs to scale out,
-- the Auto Scaling group can draw on the warm pool to meet its new desired
-- capacity. For more information and example configurations, 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/.
--
-- This operation must be called from the Region in which the Auto Scaling
-- group was created. This operation cannot be called on an Auto Scaling
-- group that has a mixed instances policy or a launch template or launch
-- configuration that requests Spot Instances.
--
-- You can view the instances in the warm pool using the DescribeWarmPool
-- API call. If you are no longer using a warm pool, you can delete it by
-- calling the DeleteWarmPool API.
module Amazonka.AutoScaling.PutWarmPool
  ( -- * Creating a Request
    PutWarmPool (..),
    newPutWarmPool,

    -- * Request Lenses
    putWarmPool_minSize,
    putWarmPool_maxGroupPreparedCapacity,
    putWarmPool_poolState,
    putWarmPool_autoScalingGroupName,

    -- * Destructuring the Response
    PutWarmPoolResponse (..),
    newPutWarmPoolResponse,

    -- * Response Lenses
    putWarmPoolResponse_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:/ 'newPutWarmPool' smart constructor.
data PutWarmPool = PutWarmPool'
  { -- | Specifies the minimum number of instances to maintain in the warm pool.
    -- This helps you to ensure that there is always a certain number of warmed
    -- instances available to handle traffic spikes. Defaults to 0 if not
    -- specified.
    PutWarmPool -> Maybe Natural
minSize :: Prelude.Maybe Prelude.Natural,
    -- | Specifies the maximum number of instances that are allowed to be in the
    -- warm pool or in any state except @Terminated@ for the Auto Scaling
    -- group. This is an optional property. Specify it only if you do not want
    -- the warm pool size to be determined by the difference between the
    -- group\'s maximum capacity and its desired capacity.
    --
    -- If a value for @MaxGroupPreparedCapacity@ is not specified, Amazon EC2
    -- Auto Scaling launches and maintains the difference between the group\'s
    -- maximum capacity and its desired capacity. If you specify a value for
    -- @MaxGroupPreparedCapacity@, Amazon EC2 Auto Scaling uses the difference
    -- between the @MaxGroupPreparedCapacity@ and the desired capacity instead.
    --
    -- The size of the warm pool is dynamic. Only when
    -- @MaxGroupPreparedCapacity@ and @MinSize@ are set to the same value does
    -- the warm pool have an absolute size.
    --
    -- If the desired capacity of the Auto Scaling group is higher than the
    -- @MaxGroupPreparedCapacity@, the capacity of the warm pool is 0, unless
    -- you specify a value for @MinSize@. To remove a value that you previously
    -- set, include the property but specify -1 for the value.
    PutWarmPool -> Maybe Int
maxGroupPreparedCapacity :: Prelude.Maybe Prelude.Int,
    -- | Sets the instance state to transition to after the lifecycle actions are
    -- complete. Default is @Stopped@.
    PutWarmPool -> Maybe WarmPoolState
poolState :: Prelude.Maybe WarmPoolState,
    -- | The name of the Auto Scaling group.
    PutWarmPool -> Text
autoScalingGroupName :: Prelude.Text
  }
  deriving (PutWarmPool -> PutWarmPool -> Bool
(PutWarmPool -> PutWarmPool -> Bool)
-> (PutWarmPool -> PutWarmPool -> Bool) -> Eq PutWarmPool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutWarmPool -> PutWarmPool -> Bool
$c/= :: PutWarmPool -> PutWarmPool -> Bool
== :: PutWarmPool -> PutWarmPool -> Bool
$c== :: PutWarmPool -> PutWarmPool -> Bool
Prelude.Eq, ReadPrec [PutWarmPool]
ReadPrec PutWarmPool
Int -> ReadS PutWarmPool
ReadS [PutWarmPool]
(Int -> ReadS PutWarmPool)
-> ReadS [PutWarmPool]
-> ReadPrec PutWarmPool
-> ReadPrec [PutWarmPool]
-> Read PutWarmPool
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutWarmPool]
$creadListPrec :: ReadPrec [PutWarmPool]
readPrec :: ReadPrec PutWarmPool
$creadPrec :: ReadPrec PutWarmPool
readList :: ReadS [PutWarmPool]
$creadList :: ReadS [PutWarmPool]
readsPrec :: Int -> ReadS PutWarmPool
$creadsPrec :: Int -> ReadS PutWarmPool
Prelude.Read, Int -> PutWarmPool -> ShowS
[PutWarmPool] -> ShowS
PutWarmPool -> String
(Int -> PutWarmPool -> ShowS)
-> (PutWarmPool -> String)
-> ([PutWarmPool] -> ShowS)
-> Show PutWarmPool
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutWarmPool] -> ShowS
$cshowList :: [PutWarmPool] -> ShowS
show :: PutWarmPool -> String
$cshow :: PutWarmPool -> String
showsPrec :: Int -> PutWarmPool -> ShowS
$cshowsPrec :: Int -> PutWarmPool -> ShowS
Prelude.Show, (forall x. PutWarmPool -> Rep PutWarmPool x)
-> (forall x. Rep PutWarmPool x -> PutWarmPool)
-> Generic PutWarmPool
forall x. Rep PutWarmPool x -> PutWarmPool
forall x. PutWarmPool -> Rep PutWarmPool x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutWarmPool x -> PutWarmPool
$cfrom :: forall x. PutWarmPool -> Rep PutWarmPool x
Prelude.Generic)

-- |
-- Create a value of 'PutWarmPool' 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:
--
-- 'minSize', 'putWarmPool_minSize' - Specifies the minimum number of instances to maintain in the warm pool.
-- This helps you to ensure that there is always a certain number of warmed
-- instances available to handle traffic spikes. Defaults to 0 if not
-- specified.
--
-- 'maxGroupPreparedCapacity', 'putWarmPool_maxGroupPreparedCapacity' - Specifies the maximum number of instances that are allowed to be in the
-- warm pool or in any state except @Terminated@ for the Auto Scaling
-- group. This is an optional property. Specify it only if you do not want
-- the warm pool size to be determined by the difference between the
-- group\'s maximum capacity and its desired capacity.
--
-- If a value for @MaxGroupPreparedCapacity@ is not specified, Amazon EC2
-- Auto Scaling launches and maintains the difference between the group\'s
-- maximum capacity and its desired capacity. If you specify a value for
-- @MaxGroupPreparedCapacity@, Amazon EC2 Auto Scaling uses the difference
-- between the @MaxGroupPreparedCapacity@ and the desired capacity instead.
--
-- The size of the warm pool is dynamic. Only when
-- @MaxGroupPreparedCapacity@ and @MinSize@ are set to the same value does
-- the warm pool have an absolute size.
--
-- If the desired capacity of the Auto Scaling group is higher than the
-- @MaxGroupPreparedCapacity@, the capacity of the warm pool is 0, unless
-- you specify a value for @MinSize@. To remove a value that you previously
-- set, include the property but specify -1 for the value.
--
-- 'poolState', 'putWarmPool_poolState' - Sets the instance state to transition to after the lifecycle actions are
-- complete. Default is @Stopped@.
--
-- 'autoScalingGroupName', 'putWarmPool_autoScalingGroupName' - The name of the Auto Scaling group.
newPutWarmPool ::
  -- | 'autoScalingGroupName'
  Prelude.Text ->
  PutWarmPool
newPutWarmPool :: Text -> PutWarmPool
newPutWarmPool Text
pAutoScalingGroupName_ =
  PutWarmPool' :: Maybe Natural
-> Maybe Int -> Maybe WarmPoolState -> Text -> PutWarmPool
PutWarmPool'
    { $sel:minSize:PutWarmPool' :: Maybe Natural
minSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:maxGroupPreparedCapacity:PutWarmPool' :: Maybe Int
maxGroupPreparedCapacity = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:poolState:PutWarmPool' :: Maybe WarmPoolState
poolState = Maybe WarmPoolState
forall a. Maybe a
Prelude.Nothing,
      $sel:autoScalingGroupName:PutWarmPool' :: Text
autoScalingGroupName = Text
pAutoScalingGroupName_
    }

-- | Specifies the minimum number of instances to maintain in the warm pool.
-- This helps you to ensure that there is always a certain number of warmed
-- instances available to handle traffic spikes. Defaults to 0 if not
-- specified.
putWarmPool_minSize :: Lens.Lens' PutWarmPool (Prelude.Maybe Prelude.Natural)
putWarmPool_minSize :: (Maybe Natural -> f (Maybe Natural))
-> PutWarmPool -> f PutWarmPool
putWarmPool_minSize = (PutWarmPool -> Maybe Natural)
-> (PutWarmPool -> Maybe Natural -> PutWarmPool)
-> Lens PutWarmPool PutWarmPool (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutWarmPool' {Maybe Natural
minSize :: Maybe Natural
$sel:minSize:PutWarmPool' :: PutWarmPool -> Maybe Natural
minSize} -> Maybe Natural
minSize) (\s :: PutWarmPool
s@PutWarmPool' {} Maybe Natural
a -> PutWarmPool
s {$sel:minSize:PutWarmPool' :: Maybe Natural
minSize = Maybe Natural
a} :: PutWarmPool)

-- | Specifies the maximum number of instances that are allowed to be in the
-- warm pool or in any state except @Terminated@ for the Auto Scaling
-- group. This is an optional property. Specify it only if you do not want
-- the warm pool size to be determined by the difference between the
-- group\'s maximum capacity and its desired capacity.
--
-- If a value for @MaxGroupPreparedCapacity@ is not specified, Amazon EC2
-- Auto Scaling launches and maintains the difference between the group\'s
-- maximum capacity and its desired capacity. If you specify a value for
-- @MaxGroupPreparedCapacity@, Amazon EC2 Auto Scaling uses the difference
-- between the @MaxGroupPreparedCapacity@ and the desired capacity instead.
--
-- The size of the warm pool is dynamic. Only when
-- @MaxGroupPreparedCapacity@ and @MinSize@ are set to the same value does
-- the warm pool have an absolute size.
--
-- If the desired capacity of the Auto Scaling group is higher than the
-- @MaxGroupPreparedCapacity@, the capacity of the warm pool is 0, unless
-- you specify a value for @MinSize@. To remove a value that you previously
-- set, include the property but specify -1 for the value.
putWarmPool_maxGroupPreparedCapacity :: Lens.Lens' PutWarmPool (Prelude.Maybe Prelude.Int)
putWarmPool_maxGroupPreparedCapacity :: (Maybe Int -> f (Maybe Int)) -> PutWarmPool -> f PutWarmPool
putWarmPool_maxGroupPreparedCapacity = (PutWarmPool -> Maybe Int)
-> (PutWarmPool -> Maybe Int -> PutWarmPool)
-> Lens PutWarmPool PutWarmPool (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutWarmPool' {Maybe Int
maxGroupPreparedCapacity :: Maybe Int
$sel:maxGroupPreparedCapacity:PutWarmPool' :: PutWarmPool -> Maybe Int
maxGroupPreparedCapacity} -> Maybe Int
maxGroupPreparedCapacity) (\s :: PutWarmPool
s@PutWarmPool' {} Maybe Int
a -> PutWarmPool
s {$sel:maxGroupPreparedCapacity:PutWarmPool' :: Maybe Int
maxGroupPreparedCapacity = Maybe Int
a} :: PutWarmPool)

-- | Sets the instance state to transition to after the lifecycle actions are
-- complete. Default is @Stopped@.
putWarmPool_poolState :: Lens.Lens' PutWarmPool (Prelude.Maybe WarmPoolState)
putWarmPool_poolState :: (Maybe WarmPoolState -> f (Maybe WarmPoolState))
-> PutWarmPool -> f PutWarmPool
putWarmPool_poolState = (PutWarmPool -> Maybe WarmPoolState)
-> (PutWarmPool -> Maybe WarmPoolState -> PutWarmPool)
-> Lens
     PutWarmPool PutWarmPool (Maybe WarmPoolState) (Maybe WarmPoolState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutWarmPool' {Maybe WarmPoolState
poolState :: Maybe WarmPoolState
$sel:poolState:PutWarmPool' :: PutWarmPool -> Maybe WarmPoolState
poolState} -> Maybe WarmPoolState
poolState) (\s :: PutWarmPool
s@PutWarmPool' {} Maybe WarmPoolState
a -> PutWarmPool
s {$sel:poolState:PutWarmPool' :: Maybe WarmPoolState
poolState = Maybe WarmPoolState
a} :: PutWarmPool)

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

instance Core.AWSRequest PutWarmPool where
  type AWSResponse PutWarmPool = PutWarmPoolResponse
  request :: PutWarmPool -> Request PutWarmPool
request = Service -> PutWarmPool -> Request PutWarmPool
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy PutWarmPool
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutWarmPool)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse PutWarmPool))
-> Logger
-> Service
-> Proxy PutWarmPool
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutWarmPool)))
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
"PutWarmPoolResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Int -> PutWarmPoolResponse
PutWarmPoolResponse'
            (Int -> PutWarmPoolResponse)
-> Either String Int -> Either String PutWarmPoolResponse
forall (f :: * -> *) a b. Functor 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 PutWarmPool

instance Prelude.NFData PutWarmPool

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

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

instance Core.ToQuery PutWarmPool where
  toQuery :: PutWarmPool -> QueryString
toQuery PutWarmPool' {Maybe Int
Maybe Natural
Maybe WarmPoolState
Text
autoScalingGroupName :: Text
poolState :: Maybe WarmPoolState
maxGroupPreparedCapacity :: Maybe Int
minSize :: Maybe Natural
$sel:autoScalingGroupName:PutWarmPool' :: PutWarmPool -> Text
$sel:poolState:PutWarmPool' :: PutWarmPool -> Maybe WarmPoolState
$sel:maxGroupPreparedCapacity:PutWarmPool' :: PutWarmPool -> Maybe Int
$sel:minSize:PutWarmPool' :: PutWarmPool -> Maybe Natural
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"PutWarmPool" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2011-01-01" :: Prelude.ByteString),
        ByteString
"MinSize" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
minSize,
        ByteString
"MaxGroupPreparedCapacity"
          ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxGroupPreparedCapacity,
        ByteString
"PoolState" ByteString -> Maybe WarmPoolState -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe WarmPoolState
poolState,
        ByteString
"AutoScalingGroupName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
autoScalingGroupName
      ]

-- | /See:/ 'newPutWarmPoolResponse' smart constructor.
data PutWarmPoolResponse = PutWarmPoolResponse'
  { -- | The response's http status code.
    PutWarmPoolResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (PutWarmPoolResponse -> PutWarmPoolResponse -> Bool
(PutWarmPoolResponse -> PutWarmPoolResponse -> Bool)
-> (PutWarmPoolResponse -> PutWarmPoolResponse -> Bool)
-> Eq PutWarmPoolResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutWarmPoolResponse -> PutWarmPoolResponse -> Bool
$c/= :: PutWarmPoolResponse -> PutWarmPoolResponse -> Bool
== :: PutWarmPoolResponse -> PutWarmPoolResponse -> Bool
$c== :: PutWarmPoolResponse -> PutWarmPoolResponse -> Bool
Prelude.Eq, ReadPrec [PutWarmPoolResponse]
ReadPrec PutWarmPoolResponse
Int -> ReadS PutWarmPoolResponse
ReadS [PutWarmPoolResponse]
(Int -> ReadS PutWarmPoolResponse)
-> ReadS [PutWarmPoolResponse]
-> ReadPrec PutWarmPoolResponse
-> ReadPrec [PutWarmPoolResponse]
-> Read PutWarmPoolResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutWarmPoolResponse]
$creadListPrec :: ReadPrec [PutWarmPoolResponse]
readPrec :: ReadPrec PutWarmPoolResponse
$creadPrec :: ReadPrec PutWarmPoolResponse
readList :: ReadS [PutWarmPoolResponse]
$creadList :: ReadS [PutWarmPoolResponse]
readsPrec :: Int -> ReadS PutWarmPoolResponse
$creadsPrec :: Int -> ReadS PutWarmPoolResponse
Prelude.Read, Int -> PutWarmPoolResponse -> ShowS
[PutWarmPoolResponse] -> ShowS
PutWarmPoolResponse -> String
(Int -> PutWarmPoolResponse -> ShowS)
-> (PutWarmPoolResponse -> String)
-> ([PutWarmPoolResponse] -> ShowS)
-> Show PutWarmPoolResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutWarmPoolResponse] -> ShowS
$cshowList :: [PutWarmPoolResponse] -> ShowS
show :: PutWarmPoolResponse -> String
$cshow :: PutWarmPoolResponse -> String
showsPrec :: Int -> PutWarmPoolResponse -> ShowS
$cshowsPrec :: Int -> PutWarmPoolResponse -> ShowS
Prelude.Show, (forall x. PutWarmPoolResponse -> Rep PutWarmPoolResponse x)
-> (forall x. Rep PutWarmPoolResponse x -> PutWarmPoolResponse)
-> Generic PutWarmPoolResponse
forall x. Rep PutWarmPoolResponse x -> PutWarmPoolResponse
forall x. PutWarmPoolResponse -> Rep PutWarmPoolResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutWarmPoolResponse x -> PutWarmPoolResponse
$cfrom :: forall x. PutWarmPoolResponse -> Rep PutWarmPoolResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutWarmPoolResponse' 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:
--
-- 'httpStatus', 'putWarmPoolResponse_httpStatus' - The response's http status code.
newPutWarmPoolResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutWarmPoolResponse
newPutWarmPoolResponse :: Int -> PutWarmPoolResponse
newPutWarmPoolResponse Int
pHttpStatus_ =
  PutWarmPoolResponse' :: Int -> PutWarmPoolResponse
PutWarmPoolResponse' {$sel:httpStatus:PutWarmPoolResponse' :: Int
httpStatus = Int
pHttpStatus_}

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

instance Prelude.NFData PutWarmPoolResponse