{-# 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.InstanceRefreshLivePoolProgress where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data InstanceRefreshLivePoolProgress = InstanceRefreshLivePoolProgress'
{
InstanceRefreshLivePoolProgress -> Maybe Natural
instancesToUpdate :: Prelude.Maybe Prelude.Natural,
InstanceRefreshLivePoolProgress -> Maybe Natural
percentageComplete :: Prelude.Maybe Prelude.Natural
}
deriving (InstanceRefreshLivePoolProgress
-> InstanceRefreshLivePoolProgress -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstanceRefreshLivePoolProgress
-> InstanceRefreshLivePoolProgress -> Bool
$c/= :: InstanceRefreshLivePoolProgress
-> InstanceRefreshLivePoolProgress -> Bool
== :: InstanceRefreshLivePoolProgress
-> InstanceRefreshLivePoolProgress -> Bool
$c== :: InstanceRefreshLivePoolProgress
-> InstanceRefreshLivePoolProgress -> Bool
Prelude.Eq, ReadPrec [InstanceRefreshLivePoolProgress]
ReadPrec InstanceRefreshLivePoolProgress
Int -> ReadS InstanceRefreshLivePoolProgress
ReadS [InstanceRefreshLivePoolProgress]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InstanceRefreshLivePoolProgress]
$creadListPrec :: ReadPrec [InstanceRefreshLivePoolProgress]
readPrec :: ReadPrec InstanceRefreshLivePoolProgress
$creadPrec :: ReadPrec InstanceRefreshLivePoolProgress
readList :: ReadS [InstanceRefreshLivePoolProgress]
$creadList :: ReadS [InstanceRefreshLivePoolProgress]
readsPrec :: Int -> ReadS InstanceRefreshLivePoolProgress
$creadsPrec :: Int -> ReadS InstanceRefreshLivePoolProgress
Prelude.Read, Int -> InstanceRefreshLivePoolProgress -> ShowS
[InstanceRefreshLivePoolProgress] -> ShowS
InstanceRefreshLivePoolProgress -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstanceRefreshLivePoolProgress] -> ShowS
$cshowList :: [InstanceRefreshLivePoolProgress] -> ShowS
show :: InstanceRefreshLivePoolProgress -> String
$cshow :: InstanceRefreshLivePoolProgress -> String
showsPrec :: Int -> InstanceRefreshLivePoolProgress -> ShowS
$cshowsPrec :: Int -> InstanceRefreshLivePoolProgress -> ShowS
Prelude.Show, forall x.
Rep InstanceRefreshLivePoolProgress x
-> InstanceRefreshLivePoolProgress
forall x.
InstanceRefreshLivePoolProgress
-> Rep InstanceRefreshLivePoolProgress x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InstanceRefreshLivePoolProgress x
-> InstanceRefreshLivePoolProgress
$cfrom :: forall x.
InstanceRefreshLivePoolProgress
-> Rep InstanceRefreshLivePoolProgress x
Prelude.Generic)
newInstanceRefreshLivePoolProgress ::
InstanceRefreshLivePoolProgress
newInstanceRefreshLivePoolProgress :: InstanceRefreshLivePoolProgress
newInstanceRefreshLivePoolProgress =
InstanceRefreshLivePoolProgress'
{ $sel:instancesToUpdate:InstanceRefreshLivePoolProgress' :: Maybe Natural
instancesToUpdate =
forall a. Maybe a
Prelude.Nothing,
$sel:percentageComplete:InstanceRefreshLivePoolProgress' :: Maybe Natural
percentageComplete = forall a. Maybe a
Prelude.Nothing
}
instanceRefreshLivePoolProgress_instancesToUpdate :: Lens.Lens' InstanceRefreshLivePoolProgress (Prelude.Maybe Prelude.Natural)
instanceRefreshLivePoolProgress_instancesToUpdate :: Lens' InstanceRefreshLivePoolProgress (Maybe Natural)
instanceRefreshLivePoolProgress_instancesToUpdate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceRefreshLivePoolProgress' {Maybe Natural
instancesToUpdate :: Maybe Natural
$sel:instancesToUpdate:InstanceRefreshLivePoolProgress' :: InstanceRefreshLivePoolProgress -> Maybe Natural
instancesToUpdate} -> Maybe Natural
instancesToUpdate) (\s :: InstanceRefreshLivePoolProgress
s@InstanceRefreshLivePoolProgress' {} Maybe Natural
a -> InstanceRefreshLivePoolProgress
s {$sel:instancesToUpdate:InstanceRefreshLivePoolProgress' :: Maybe Natural
instancesToUpdate = Maybe Natural
a} :: InstanceRefreshLivePoolProgress)
instanceRefreshLivePoolProgress_percentageComplete :: Lens.Lens' InstanceRefreshLivePoolProgress (Prelude.Maybe Prelude.Natural)
instanceRefreshLivePoolProgress_percentageComplete :: Lens' InstanceRefreshLivePoolProgress (Maybe Natural)
instanceRefreshLivePoolProgress_percentageComplete = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceRefreshLivePoolProgress' {Maybe Natural
percentageComplete :: Maybe Natural
$sel:percentageComplete:InstanceRefreshLivePoolProgress' :: InstanceRefreshLivePoolProgress -> Maybe Natural
percentageComplete} -> Maybe Natural
percentageComplete) (\s :: InstanceRefreshLivePoolProgress
s@InstanceRefreshLivePoolProgress' {} Maybe Natural
a -> InstanceRefreshLivePoolProgress
s {$sel:percentageComplete:InstanceRefreshLivePoolProgress' :: Maybe Natural
percentageComplete = Maybe Natural
a} :: InstanceRefreshLivePoolProgress)
instance Data.FromXML InstanceRefreshLivePoolProgress where
parseXML :: [Node] -> Either String InstanceRefreshLivePoolProgress
parseXML [Node]
x =
Maybe Natural -> Maybe Natural -> InstanceRefreshLivePoolProgress
InstanceRefreshLivePoolProgress'
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
"InstancesToUpdate")
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
"PercentageComplete")
instance
Prelude.Hashable
InstanceRefreshLivePoolProgress
where
hashWithSalt :: Int -> InstanceRefreshLivePoolProgress -> Int
hashWithSalt
Int
_salt
InstanceRefreshLivePoolProgress' {Maybe Natural
percentageComplete :: Maybe Natural
instancesToUpdate :: Maybe Natural
$sel:percentageComplete:InstanceRefreshLivePoolProgress' :: InstanceRefreshLivePoolProgress -> Maybe Natural
$sel:instancesToUpdate:InstanceRefreshLivePoolProgress' :: InstanceRefreshLivePoolProgress -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
instancesToUpdate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
percentageComplete
instance
Prelude.NFData
InstanceRefreshLivePoolProgress
where
rnf :: InstanceRefreshLivePoolProgress -> ()
rnf InstanceRefreshLivePoolProgress' {Maybe Natural
percentageComplete :: Maybe Natural
instancesToUpdate :: Maybe Natural
$sel:percentageComplete:InstanceRefreshLivePoolProgress' :: InstanceRefreshLivePoolProgress -> Maybe Natural
$sel:instancesToUpdate:InstanceRefreshLivePoolProgress' :: InstanceRefreshLivePoolProgress -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
instancesToUpdate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
percentageComplete