{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.AutoScaling.Types.InstanceRefreshWarmPoolProgress where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data InstanceRefreshWarmPoolProgress = InstanceRefreshWarmPoolProgress'
{
InstanceRefreshWarmPoolProgress -> Maybe Natural
instancesToUpdate :: Prelude.Maybe Prelude.Natural,
InstanceRefreshWarmPoolProgress -> Maybe Natural
percentageComplete :: Prelude.Maybe Prelude.Natural
}
deriving (InstanceRefreshWarmPoolProgress
-> InstanceRefreshWarmPoolProgress -> Bool
(InstanceRefreshWarmPoolProgress
-> InstanceRefreshWarmPoolProgress -> Bool)
-> (InstanceRefreshWarmPoolProgress
-> InstanceRefreshWarmPoolProgress -> Bool)
-> Eq InstanceRefreshWarmPoolProgress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstanceRefreshWarmPoolProgress
-> InstanceRefreshWarmPoolProgress -> Bool
$c/= :: InstanceRefreshWarmPoolProgress
-> InstanceRefreshWarmPoolProgress -> Bool
== :: InstanceRefreshWarmPoolProgress
-> InstanceRefreshWarmPoolProgress -> Bool
$c== :: InstanceRefreshWarmPoolProgress
-> InstanceRefreshWarmPoolProgress -> Bool
Prelude.Eq, ReadPrec [InstanceRefreshWarmPoolProgress]
ReadPrec InstanceRefreshWarmPoolProgress
Int -> ReadS InstanceRefreshWarmPoolProgress
ReadS [InstanceRefreshWarmPoolProgress]
(Int -> ReadS InstanceRefreshWarmPoolProgress)
-> ReadS [InstanceRefreshWarmPoolProgress]
-> ReadPrec InstanceRefreshWarmPoolProgress
-> ReadPrec [InstanceRefreshWarmPoolProgress]
-> Read InstanceRefreshWarmPoolProgress
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InstanceRefreshWarmPoolProgress]
$creadListPrec :: ReadPrec [InstanceRefreshWarmPoolProgress]
readPrec :: ReadPrec InstanceRefreshWarmPoolProgress
$creadPrec :: ReadPrec InstanceRefreshWarmPoolProgress
readList :: ReadS [InstanceRefreshWarmPoolProgress]
$creadList :: ReadS [InstanceRefreshWarmPoolProgress]
readsPrec :: Int -> ReadS InstanceRefreshWarmPoolProgress
$creadsPrec :: Int -> ReadS InstanceRefreshWarmPoolProgress
Prelude.Read, Int -> InstanceRefreshWarmPoolProgress -> ShowS
[InstanceRefreshWarmPoolProgress] -> ShowS
InstanceRefreshWarmPoolProgress -> String
(Int -> InstanceRefreshWarmPoolProgress -> ShowS)
-> (InstanceRefreshWarmPoolProgress -> String)
-> ([InstanceRefreshWarmPoolProgress] -> ShowS)
-> Show InstanceRefreshWarmPoolProgress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstanceRefreshWarmPoolProgress] -> ShowS
$cshowList :: [InstanceRefreshWarmPoolProgress] -> ShowS
show :: InstanceRefreshWarmPoolProgress -> String
$cshow :: InstanceRefreshWarmPoolProgress -> String
showsPrec :: Int -> InstanceRefreshWarmPoolProgress -> ShowS
$cshowsPrec :: Int -> InstanceRefreshWarmPoolProgress -> ShowS
Prelude.Show, (forall x.
InstanceRefreshWarmPoolProgress
-> Rep InstanceRefreshWarmPoolProgress x)
-> (forall x.
Rep InstanceRefreshWarmPoolProgress x
-> InstanceRefreshWarmPoolProgress)
-> Generic InstanceRefreshWarmPoolProgress
forall x.
Rep InstanceRefreshWarmPoolProgress x
-> InstanceRefreshWarmPoolProgress
forall x.
InstanceRefreshWarmPoolProgress
-> Rep InstanceRefreshWarmPoolProgress x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InstanceRefreshWarmPoolProgress x
-> InstanceRefreshWarmPoolProgress
$cfrom :: forall x.
InstanceRefreshWarmPoolProgress
-> Rep InstanceRefreshWarmPoolProgress x
Prelude.Generic)
newInstanceRefreshWarmPoolProgress ::
InstanceRefreshWarmPoolProgress
newInstanceRefreshWarmPoolProgress :: InstanceRefreshWarmPoolProgress
newInstanceRefreshWarmPoolProgress =
InstanceRefreshWarmPoolProgress' :: Maybe Natural -> Maybe Natural -> InstanceRefreshWarmPoolProgress
InstanceRefreshWarmPoolProgress'
{ $sel:instancesToUpdate:InstanceRefreshWarmPoolProgress' :: Maybe Natural
instancesToUpdate =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:percentageComplete:InstanceRefreshWarmPoolProgress' :: Maybe Natural
percentageComplete = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
instanceRefreshWarmPoolProgress_instancesToUpdate :: Lens.Lens' InstanceRefreshWarmPoolProgress (Prelude.Maybe Prelude.Natural)
instanceRefreshWarmPoolProgress_instancesToUpdate :: (Maybe Natural -> f (Maybe Natural))
-> InstanceRefreshWarmPoolProgress
-> f InstanceRefreshWarmPoolProgress
instanceRefreshWarmPoolProgress_instancesToUpdate = (InstanceRefreshWarmPoolProgress -> Maybe Natural)
-> (InstanceRefreshWarmPoolProgress
-> Maybe Natural -> InstanceRefreshWarmPoolProgress)
-> Lens
InstanceRefreshWarmPoolProgress
InstanceRefreshWarmPoolProgress
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceRefreshWarmPoolProgress' {Maybe Natural
instancesToUpdate :: Maybe Natural
$sel:instancesToUpdate:InstanceRefreshWarmPoolProgress' :: InstanceRefreshWarmPoolProgress -> Maybe Natural
instancesToUpdate} -> Maybe Natural
instancesToUpdate) (\s :: InstanceRefreshWarmPoolProgress
s@InstanceRefreshWarmPoolProgress' {} Maybe Natural
a -> InstanceRefreshWarmPoolProgress
s {$sel:instancesToUpdate:InstanceRefreshWarmPoolProgress' :: Maybe Natural
instancesToUpdate = Maybe Natural
a} :: InstanceRefreshWarmPoolProgress)
instanceRefreshWarmPoolProgress_percentageComplete :: Lens.Lens' InstanceRefreshWarmPoolProgress (Prelude.Maybe Prelude.Natural)
instanceRefreshWarmPoolProgress_percentageComplete :: (Maybe Natural -> f (Maybe Natural))
-> InstanceRefreshWarmPoolProgress
-> f InstanceRefreshWarmPoolProgress
instanceRefreshWarmPoolProgress_percentageComplete = (InstanceRefreshWarmPoolProgress -> Maybe Natural)
-> (InstanceRefreshWarmPoolProgress
-> Maybe Natural -> InstanceRefreshWarmPoolProgress)
-> Lens
InstanceRefreshWarmPoolProgress
InstanceRefreshWarmPoolProgress
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceRefreshWarmPoolProgress' {Maybe Natural
percentageComplete :: Maybe Natural
$sel:percentageComplete:InstanceRefreshWarmPoolProgress' :: InstanceRefreshWarmPoolProgress -> Maybe Natural
percentageComplete} -> Maybe Natural
percentageComplete) (\s :: InstanceRefreshWarmPoolProgress
s@InstanceRefreshWarmPoolProgress' {} Maybe Natural
a -> InstanceRefreshWarmPoolProgress
s {$sel:percentageComplete:InstanceRefreshWarmPoolProgress' :: Maybe Natural
percentageComplete = Maybe Natural
a} :: InstanceRefreshWarmPoolProgress)
instance Core.FromXML InstanceRefreshWarmPoolProgress where
parseXML :: [Node] -> Either String InstanceRefreshWarmPoolProgress
parseXML [Node]
x =
Maybe Natural -> Maybe Natural -> InstanceRefreshWarmPoolProgress
InstanceRefreshWarmPoolProgress'
(Maybe Natural -> Maybe Natural -> InstanceRefreshWarmPoolProgress)
-> Either String (Maybe Natural)
-> Either String (Maybe Natural -> InstanceRefreshWarmPoolProgress)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Natural)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"InstancesToUpdate")
Either String (Maybe Natural -> InstanceRefreshWarmPoolProgress)
-> Either String (Maybe Natural)
-> Either String InstanceRefreshWarmPoolProgress
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Natural)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PercentageComplete")
instance
Prelude.Hashable
InstanceRefreshWarmPoolProgress
instance
Prelude.NFData
InstanceRefreshWarmPoolProgress