{-# 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.InstanceRefreshProgressDetails where
import Amazonka.AutoScaling.Types.InstanceRefreshLivePoolProgress
import Amazonka.AutoScaling.Types.InstanceRefreshWarmPoolProgress
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data InstanceRefreshProgressDetails = InstanceRefreshProgressDetails'
{
InstanceRefreshProgressDetails
-> Maybe InstanceRefreshLivePoolProgress
livePoolProgress :: Prelude.Maybe InstanceRefreshLivePoolProgress,
InstanceRefreshProgressDetails
-> Maybe InstanceRefreshWarmPoolProgress
warmPoolProgress :: Prelude.Maybe InstanceRefreshWarmPoolProgress
}
deriving (InstanceRefreshProgressDetails
-> InstanceRefreshProgressDetails -> Bool
(InstanceRefreshProgressDetails
-> InstanceRefreshProgressDetails -> Bool)
-> (InstanceRefreshProgressDetails
-> InstanceRefreshProgressDetails -> Bool)
-> Eq InstanceRefreshProgressDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstanceRefreshProgressDetails
-> InstanceRefreshProgressDetails -> Bool
$c/= :: InstanceRefreshProgressDetails
-> InstanceRefreshProgressDetails -> Bool
== :: InstanceRefreshProgressDetails
-> InstanceRefreshProgressDetails -> Bool
$c== :: InstanceRefreshProgressDetails
-> InstanceRefreshProgressDetails -> Bool
Prelude.Eq, ReadPrec [InstanceRefreshProgressDetails]
ReadPrec InstanceRefreshProgressDetails
Int -> ReadS InstanceRefreshProgressDetails
ReadS [InstanceRefreshProgressDetails]
(Int -> ReadS InstanceRefreshProgressDetails)
-> ReadS [InstanceRefreshProgressDetails]
-> ReadPrec InstanceRefreshProgressDetails
-> ReadPrec [InstanceRefreshProgressDetails]
-> Read InstanceRefreshProgressDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InstanceRefreshProgressDetails]
$creadListPrec :: ReadPrec [InstanceRefreshProgressDetails]
readPrec :: ReadPrec InstanceRefreshProgressDetails
$creadPrec :: ReadPrec InstanceRefreshProgressDetails
readList :: ReadS [InstanceRefreshProgressDetails]
$creadList :: ReadS [InstanceRefreshProgressDetails]
readsPrec :: Int -> ReadS InstanceRefreshProgressDetails
$creadsPrec :: Int -> ReadS InstanceRefreshProgressDetails
Prelude.Read, Int -> InstanceRefreshProgressDetails -> ShowS
[InstanceRefreshProgressDetails] -> ShowS
InstanceRefreshProgressDetails -> String
(Int -> InstanceRefreshProgressDetails -> ShowS)
-> (InstanceRefreshProgressDetails -> String)
-> ([InstanceRefreshProgressDetails] -> ShowS)
-> Show InstanceRefreshProgressDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstanceRefreshProgressDetails] -> ShowS
$cshowList :: [InstanceRefreshProgressDetails] -> ShowS
show :: InstanceRefreshProgressDetails -> String
$cshow :: InstanceRefreshProgressDetails -> String
showsPrec :: Int -> InstanceRefreshProgressDetails -> ShowS
$cshowsPrec :: Int -> InstanceRefreshProgressDetails -> ShowS
Prelude.Show, (forall x.
InstanceRefreshProgressDetails
-> Rep InstanceRefreshProgressDetails x)
-> (forall x.
Rep InstanceRefreshProgressDetails x
-> InstanceRefreshProgressDetails)
-> Generic InstanceRefreshProgressDetails
forall x.
Rep InstanceRefreshProgressDetails x
-> InstanceRefreshProgressDetails
forall x.
InstanceRefreshProgressDetails
-> Rep InstanceRefreshProgressDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InstanceRefreshProgressDetails x
-> InstanceRefreshProgressDetails
$cfrom :: forall x.
InstanceRefreshProgressDetails
-> Rep InstanceRefreshProgressDetails x
Prelude.Generic)
newInstanceRefreshProgressDetails ::
InstanceRefreshProgressDetails
newInstanceRefreshProgressDetails :: InstanceRefreshProgressDetails
newInstanceRefreshProgressDetails =
InstanceRefreshProgressDetails' :: Maybe InstanceRefreshLivePoolProgress
-> Maybe InstanceRefreshWarmPoolProgress
-> InstanceRefreshProgressDetails
InstanceRefreshProgressDetails'
{ $sel:livePoolProgress:InstanceRefreshProgressDetails' :: Maybe InstanceRefreshLivePoolProgress
livePoolProgress =
Maybe InstanceRefreshLivePoolProgress
forall a. Maybe a
Prelude.Nothing,
$sel:warmPoolProgress:InstanceRefreshProgressDetails' :: Maybe InstanceRefreshWarmPoolProgress
warmPoolProgress = Maybe InstanceRefreshWarmPoolProgress
forall a. Maybe a
Prelude.Nothing
}
instanceRefreshProgressDetails_livePoolProgress :: Lens.Lens' InstanceRefreshProgressDetails (Prelude.Maybe InstanceRefreshLivePoolProgress)
instanceRefreshProgressDetails_livePoolProgress :: (Maybe InstanceRefreshLivePoolProgress
-> f (Maybe InstanceRefreshLivePoolProgress))
-> InstanceRefreshProgressDetails
-> f InstanceRefreshProgressDetails
instanceRefreshProgressDetails_livePoolProgress = (InstanceRefreshProgressDetails
-> Maybe InstanceRefreshLivePoolProgress)
-> (InstanceRefreshProgressDetails
-> Maybe InstanceRefreshLivePoolProgress
-> InstanceRefreshProgressDetails)
-> Lens
InstanceRefreshProgressDetails
InstanceRefreshProgressDetails
(Maybe InstanceRefreshLivePoolProgress)
(Maybe InstanceRefreshLivePoolProgress)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceRefreshProgressDetails' {Maybe InstanceRefreshLivePoolProgress
livePoolProgress :: Maybe InstanceRefreshLivePoolProgress
$sel:livePoolProgress:InstanceRefreshProgressDetails' :: InstanceRefreshProgressDetails
-> Maybe InstanceRefreshLivePoolProgress
livePoolProgress} -> Maybe InstanceRefreshLivePoolProgress
livePoolProgress) (\s :: InstanceRefreshProgressDetails
s@InstanceRefreshProgressDetails' {} Maybe InstanceRefreshLivePoolProgress
a -> InstanceRefreshProgressDetails
s {$sel:livePoolProgress:InstanceRefreshProgressDetails' :: Maybe InstanceRefreshLivePoolProgress
livePoolProgress = Maybe InstanceRefreshLivePoolProgress
a} :: InstanceRefreshProgressDetails)
instanceRefreshProgressDetails_warmPoolProgress :: Lens.Lens' InstanceRefreshProgressDetails (Prelude.Maybe InstanceRefreshWarmPoolProgress)
instanceRefreshProgressDetails_warmPoolProgress :: (Maybe InstanceRefreshWarmPoolProgress
-> f (Maybe InstanceRefreshWarmPoolProgress))
-> InstanceRefreshProgressDetails
-> f InstanceRefreshProgressDetails
instanceRefreshProgressDetails_warmPoolProgress = (InstanceRefreshProgressDetails
-> Maybe InstanceRefreshWarmPoolProgress)
-> (InstanceRefreshProgressDetails
-> Maybe InstanceRefreshWarmPoolProgress
-> InstanceRefreshProgressDetails)
-> Lens
InstanceRefreshProgressDetails
InstanceRefreshProgressDetails
(Maybe InstanceRefreshWarmPoolProgress)
(Maybe InstanceRefreshWarmPoolProgress)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceRefreshProgressDetails' {Maybe InstanceRefreshWarmPoolProgress
warmPoolProgress :: Maybe InstanceRefreshWarmPoolProgress
$sel:warmPoolProgress:InstanceRefreshProgressDetails' :: InstanceRefreshProgressDetails
-> Maybe InstanceRefreshWarmPoolProgress
warmPoolProgress} -> Maybe InstanceRefreshWarmPoolProgress
warmPoolProgress) (\s :: InstanceRefreshProgressDetails
s@InstanceRefreshProgressDetails' {} Maybe InstanceRefreshWarmPoolProgress
a -> InstanceRefreshProgressDetails
s {$sel:warmPoolProgress:InstanceRefreshProgressDetails' :: Maybe InstanceRefreshWarmPoolProgress
warmPoolProgress = Maybe InstanceRefreshWarmPoolProgress
a} :: InstanceRefreshProgressDetails)
instance Core.FromXML InstanceRefreshProgressDetails where
parseXML :: [Node] -> Either String InstanceRefreshProgressDetails
parseXML [Node]
x =
Maybe InstanceRefreshLivePoolProgress
-> Maybe InstanceRefreshWarmPoolProgress
-> InstanceRefreshProgressDetails
InstanceRefreshProgressDetails'
(Maybe InstanceRefreshLivePoolProgress
-> Maybe InstanceRefreshWarmPoolProgress
-> InstanceRefreshProgressDetails)
-> Either String (Maybe InstanceRefreshLivePoolProgress)
-> Either
String
(Maybe InstanceRefreshWarmPoolProgress
-> InstanceRefreshProgressDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node]
-> Text -> Either String (Maybe InstanceRefreshLivePoolProgress)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LivePoolProgress")
Either
String
(Maybe InstanceRefreshWarmPoolProgress
-> InstanceRefreshProgressDetails)
-> Either String (Maybe InstanceRefreshWarmPoolProgress)
-> Either String InstanceRefreshProgressDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node]
-> Text -> Either String (Maybe InstanceRefreshWarmPoolProgress)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"WarmPoolProgress")
instance
Prelude.Hashable
InstanceRefreshProgressDetails
instance
Prelude.NFData
InstanceRefreshProgressDetails