{-# 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.EMR.Types.InstanceGroupTimeline where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data InstanceGroupTimeline = InstanceGroupTimeline'
{
InstanceGroupTimeline -> Maybe POSIX
readyDateTime :: Prelude.Maybe Core.POSIX,
InstanceGroupTimeline -> Maybe POSIX
creationDateTime :: Prelude.Maybe Core.POSIX,
InstanceGroupTimeline -> Maybe POSIX
endDateTime :: Prelude.Maybe Core.POSIX
}
deriving (InstanceGroupTimeline -> InstanceGroupTimeline -> Bool
(InstanceGroupTimeline -> InstanceGroupTimeline -> Bool)
-> (InstanceGroupTimeline -> InstanceGroupTimeline -> Bool)
-> Eq InstanceGroupTimeline
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstanceGroupTimeline -> InstanceGroupTimeline -> Bool
$c/= :: InstanceGroupTimeline -> InstanceGroupTimeline -> Bool
== :: InstanceGroupTimeline -> InstanceGroupTimeline -> Bool
$c== :: InstanceGroupTimeline -> InstanceGroupTimeline -> Bool
Prelude.Eq, ReadPrec [InstanceGroupTimeline]
ReadPrec InstanceGroupTimeline
Int -> ReadS InstanceGroupTimeline
ReadS [InstanceGroupTimeline]
(Int -> ReadS InstanceGroupTimeline)
-> ReadS [InstanceGroupTimeline]
-> ReadPrec InstanceGroupTimeline
-> ReadPrec [InstanceGroupTimeline]
-> Read InstanceGroupTimeline
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InstanceGroupTimeline]
$creadListPrec :: ReadPrec [InstanceGroupTimeline]
readPrec :: ReadPrec InstanceGroupTimeline
$creadPrec :: ReadPrec InstanceGroupTimeline
readList :: ReadS [InstanceGroupTimeline]
$creadList :: ReadS [InstanceGroupTimeline]
readsPrec :: Int -> ReadS InstanceGroupTimeline
$creadsPrec :: Int -> ReadS InstanceGroupTimeline
Prelude.Read, Int -> InstanceGroupTimeline -> ShowS
[InstanceGroupTimeline] -> ShowS
InstanceGroupTimeline -> String
(Int -> InstanceGroupTimeline -> ShowS)
-> (InstanceGroupTimeline -> String)
-> ([InstanceGroupTimeline] -> ShowS)
-> Show InstanceGroupTimeline
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstanceGroupTimeline] -> ShowS
$cshowList :: [InstanceGroupTimeline] -> ShowS
show :: InstanceGroupTimeline -> String
$cshow :: InstanceGroupTimeline -> String
showsPrec :: Int -> InstanceGroupTimeline -> ShowS
$cshowsPrec :: Int -> InstanceGroupTimeline -> ShowS
Prelude.Show, (forall x. InstanceGroupTimeline -> Rep InstanceGroupTimeline x)
-> (forall x. Rep InstanceGroupTimeline x -> InstanceGroupTimeline)
-> Generic InstanceGroupTimeline
forall x. Rep InstanceGroupTimeline x -> InstanceGroupTimeline
forall x. InstanceGroupTimeline -> Rep InstanceGroupTimeline x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InstanceGroupTimeline x -> InstanceGroupTimeline
$cfrom :: forall x. InstanceGroupTimeline -> Rep InstanceGroupTimeline x
Prelude.Generic)
newInstanceGroupTimeline ::
InstanceGroupTimeline
newInstanceGroupTimeline :: InstanceGroupTimeline
newInstanceGroupTimeline =
InstanceGroupTimeline' :: Maybe POSIX -> Maybe POSIX -> Maybe POSIX -> InstanceGroupTimeline
InstanceGroupTimeline'
{ $sel:readyDateTime:InstanceGroupTimeline' :: Maybe POSIX
readyDateTime =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:creationDateTime:InstanceGroupTimeline' :: Maybe POSIX
creationDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:endDateTime:InstanceGroupTimeline' :: Maybe POSIX
endDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
instanceGroupTimeline_readyDateTime :: Lens.Lens' InstanceGroupTimeline (Prelude.Maybe Prelude.UTCTime)
instanceGroupTimeline_readyDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceGroupTimeline -> f InstanceGroupTimeline
instanceGroupTimeline_readyDateTime = (InstanceGroupTimeline -> Maybe POSIX)
-> (InstanceGroupTimeline -> Maybe POSIX -> InstanceGroupTimeline)
-> Lens
InstanceGroupTimeline
InstanceGroupTimeline
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceGroupTimeline' {Maybe POSIX
readyDateTime :: Maybe POSIX
$sel:readyDateTime:InstanceGroupTimeline' :: InstanceGroupTimeline -> Maybe POSIX
readyDateTime} -> Maybe POSIX
readyDateTime) (\s :: InstanceGroupTimeline
s@InstanceGroupTimeline' {} Maybe POSIX
a -> InstanceGroupTimeline
s {$sel:readyDateTime:InstanceGroupTimeline' :: Maybe POSIX
readyDateTime = Maybe POSIX
a} :: InstanceGroupTimeline) ((Maybe POSIX -> f (Maybe POSIX))
-> InstanceGroupTimeline -> f InstanceGroupTimeline)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceGroupTimeline
-> f InstanceGroupTimeline
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instanceGroupTimeline_creationDateTime :: Lens.Lens' InstanceGroupTimeline (Prelude.Maybe Prelude.UTCTime)
instanceGroupTimeline_creationDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceGroupTimeline -> f InstanceGroupTimeline
instanceGroupTimeline_creationDateTime = (InstanceGroupTimeline -> Maybe POSIX)
-> (InstanceGroupTimeline -> Maybe POSIX -> InstanceGroupTimeline)
-> Lens
InstanceGroupTimeline
InstanceGroupTimeline
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceGroupTimeline' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:InstanceGroupTimeline' :: InstanceGroupTimeline -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: InstanceGroupTimeline
s@InstanceGroupTimeline' {} Maybe POSIX
a -> InstanceGroupTimeline
s {$sel:creationDateTime:InstanceGroupTimeline' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: InstanceGroupTimeline) ((Maybe POSIX -> f (Maybe POSIX))
-> InstanceGroupTimeline -> f InstanceGroupTimeline)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceGroupTimeline
-> f InstanceGroupTimeline
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instanceGroupTimeline_endDateTime :: Lens.Lens' InstanceGroupTimeline (Prelude.Maybe Prelude.UTCTime)
instanceGroupTimeline_endDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceGroupTimeline -> f InstanceGroupTimeline
instanceGroupTimeline_endDateTime = (InstanceGroupTimeline -> Maybe POSIX)
-> (InstanceGroupTimeline -> Maybe POSIX -> InstanceGroupTimeline)
-> Lens
InstanceGroupTimeline
InstanceGroupTimeline
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceGroupTimeline' {Maybe POSIX
endDateTime :: Maybe POSIX
$sel:endDateTime:InstanceGroupTimeline' :: InstanceGroupTimeline -> Maybe POSIX
endDateTime} -> Maybe POSIX
endDateTime) (\s :: InstanceGroupTimeline
s@InstanceGroupTimeline' {} Maybe POSIX
a -> InstanceGroupTimeline
s {$sel:endDateTime:InstanceGroupTimeline' :: Maybe POSIX
endDateTime = Maybe POSIX
a} :: InstanceGroupTimeline) ((Maybe POSIX -> f (Maybe POSIX))
-> InstanceGroupTimeline -> f InstanceGroupTimeline)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceGroupTimeline
-> f InstanceGroupTimeline
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON InstanceGroupTimeline where
parseJSON :: Value -> Parser InstanceGroupTimeline
parseJSON =
String
-> (Object -> Parser InstanceGroupTimeline)
-> Value
-> Parser InstanceGroupTimeline
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"InstanceGroupTimeline"
( \Object
x ->
Maybe POSIX -> Maybe POSIX -> Maybe POSIX -> InstanceGroupTimeline
InstanceGroupTimeline'
(Maybe POSIX
-> Maybe POSIX -> Maybe POSIX -> InstanceGroupTimeline)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> Maybe POSIX -> InstanceGroupTimeline)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReadyDateTime")
Parser (Maybe POSIX -> Maybe POSIX -> InstanceGroupTimeline)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> InstanceGroupTimeline)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationDateTime")
Parser (Maybe POSIX -> InstanceGroupTimeline)
-> Parser (Maybe POSIX) -> Parser InstanceGroupTimeline
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EndDateTime")
)
instance Prelude.Hashable InstanceGroupTimeline
instance Prelude.NFData InstanceGroupTimeline