{-# 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.InstanceFleetTimeline where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data InstanceFleetTimeline = InstanceFleetTimeline'
{
InstanceFleetTimeline -> Maybe POSIX
readyDateTime :: Prelude.Maybe Core.POSIX,
InstanceFleetTimeline -> Maybe POSIX
creationDateTime :: Prelude.Maybe Core.POSIX,
InstanceFleetTimeline -> Maybe POSIX
endDateTime :: Prelude.Maybe Core.POSIX
}
deriving (InstanceFleetTimeline -> InstanceFleetTimeline -> Bool
(InstanceFleetTimeline -> InstanceFleetTimeline -> Bool)
-> (InstanceFleetTimeline -> InstanceFleetTimeline -> Bool)
-> Eq InstanceFleetTimeline
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstanceFleetTimeline -> InstanceFleetTimeline -> Bool
$c/= :: InstanceFleetTimeline -> InstanceFleetTimeline -> Bool
== :: InstanceFleetTimeline -> InstanceFleetTimeline -> Bool
$c== :: InstanceFleetTimeline -> InstanceFleetTimeline -> Bool
Prelude.Eq, ReadPrec [InstanceFleetTimeline]
ReadPrec InstanceFleetTimeline
Int -> ReadS InstanceFleetTimeline
ReadS [InstanceFleetTimeline]
(Int -> ReadS InstanceFleetTimeline)
-> ReadS [InstanceFleetTimeline]
-> ReadPrec InstanceFleetTimeline
-> ReadPrec [InstanceFleetTimeline]
-> Read InstanceFleetTimeline
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InstanceFleetTimeline]
$creadListPrec :: ReadPrec [InstanceFleetTimeline]
readPrec :: ReadPrec InstanceFleetTimeline
$creadPrec :: ReadPrec InstanceFleetTimeline
readList :: ReadS [InstanceFleetTimeline]
$creadList :: ReadS [InstanceFleetTimeline]
readsPrec :: Int -> ReadS InstanceFleetTimeline
$creadsPrec :: Int -> ReadS InstanceFleetTimeline
Prelude.Read, Int -> InstanceFleetTimeline -> ShowS
[InstanceFleetTimeline] -> ShowS
InstanceFleetTimeline -> String
(Int -> InstanceFleetTimeline -> ShowS)
-> (InstanceFleetTimeline -> String)
-> ([InstanceFleetTimeline] -> ShowS)
-> Show InstanceFleetTimeline
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstanceFleetTimeline] -> ShowS
$cshowList :: [InstanceFleetTimeline] -> ShowS
show :: InstanceFleetTimeline -> String
$cshow :: InstanceFleetTimeline -> String
showsPrec :: Int -> InstanceFleetTimeline -> ShowS
$cshowsPrec :: Int -> InstanceFleetTimeline -> ShowS
Prelude.Show, (forall x. InstanceFleetTimeline -> Rep InstanceFleetTimeline x)
-> (forall x. Rep InstanceFleetTimeline x -> InstanceFleetTimeline)
-> Generic InstanceFleetTimeline
forall x. Rep InstanceFleetTimeline x -> InstanceFleetTimeline
forall x. InstanceFleetTimeline -> Rep InstanceFleetTimeline x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InstanceFleetTimeline x -> InstanceFleetTimeline
$cfrom :: forall x. InstanceFleetTimeline -> Rep InstanceFleetTimeline x
Prelude.Generic)
newInstanceFleetTimeline ::
InstanceFleetTimeline
newInstanceFleetTimeline :: InstanceFleetTimeline
newInstanceFleetTimeline =
InstanceFleetTimeline' :: Maybe POSIX -> Maybe POSIX -> Maybe POSIX -> InstanceFleetTimeline
InstanceFleetTimeline'
{ $sel:readyDateTime:InstanceFleetTimeline' :: Maybe POSIX
readyDateTime =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:creationDateTime:InstanceFleetTimeline' :: Maybe POSIX
creationDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:endDateTime:InstanceFleetTimeline' :: Maybe POSIX
endDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
instanceFleetTimeline_readyDateTime :: Lens.Lens' InstanceFleetTimeline (Prelude.Maybe Prelude.UTCTime)
instanceFleetTimeline_readyDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceFleetTimeline -> f InstanceFleetTimeline
instanceFleetTimeline_readyDateTime = (InstanceFleetTimeline -> Maybe POSIX)
-> (InstanceFleetTimeline -> Maybe POSIX -> InstanceFleetTimeline)
-> Lens
InstanceFleetTimeline
InstanceFleetTimeline
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceFleetTimeline' {Maybe POSIX
readyDateTime :: Maybe POSIX
$sel:readyDateTime:InstanceFleetTimeline' :: InstanceFleetTimeline -> Maybe POSIX
readyDateTime} -> Maybe POSIX
readyDateTime) (\s :: InstanceFleetTimeline
s@InstanceFleetTimeline' {} Maybe POSIX
a -> InstanceFleetTimeline
s {$sel:readyDateTime:InstanceFleetTimeline' :: Maybe POSIX
readyDateTime = Maybe POSIX
a} :: InstanceFleetTimeline) ((Maybe POSIX -> f (Maybe POSIX))
-> InstanceFleetTimeline -> f InstanceFleetTimeline)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceFleetTimeline
-> f InstanceFleetTimeline
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
instanceFleetTimeline_creationDateTime :: Lens.Lens' InstanceFleetTimeline (Prelude.Maybe Prelude.UTCTime)
instanceFleetTimeline_creationDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceFleetTimeline -> f InstanceFleetTimeline
instanceFleetTimeline_creationDateTime = (InstanceFleetTimeline -> Maybe POSIX)
-> (InstanceFleetTimeline -> Maybe POSIX -> InstanceFleetTimeline)
-> Lens
InstanceFleetTimeline
InstanceFleetTimeline
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceFleetTimeline' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:InstanceFleetTimeline' :: InstanceFleetTimeline -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: InstanceFleetTimeline
s@InstanceFleetTimeline' {} Maybe POSIX
a -> InstanceFleetTimeline
s {$sel:creationDateTime:InstanceFleetTimeline' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: InstanceFleetTimeline) ((Maybe POSIX -> f (Maybe POSIX))
-> InstanceFleetTimeline -> f InstanceFleetTimeline)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceFleetTimeline
-> f InstanceFleetTimeline
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
instanceFleetTimeline_endDateTime :: Lens.Lens' InstanceFleetTimeline (Prelude.Maybe Prelude.UTCTime)
instanceFleetTimeline_endDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceFleetTimeline -> f InstanceFleetTimeline
instanceFleetTimeline_endDateTime = (InstanceFleetTimeline -> Maybe POSIX)
-> (InstanceFleetTimeline -> Maybe POSIX -> InstanceFleetTimeline)
-> Lens
InstanceFleetTimeline
InstanceFleetTimeline
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceFleetTimeline' {Maybe POSIX
endDateTime :: Maybe POSIX
$sel:endDateTime:InstanceFleetTimeline' :: InstanceFleetTimeline -> Maybe POSIX
endDateTime} -> Maybe POSIX
endDateTime) (\s :: InstanceFleetTimeline
s@InstanceFleetTimeline' {} Maybe POSIX
a -> InstanceFleetTimeline
s {$sel:endDateTime:InstanceFleetTimeline' :: Maybe POSIX
endDateTime = Maybe POSIX
a} :: InstanceFleetTimeline) ((Maybe POSIX -> f (Maybe POSIX))
-> InstanceFleetTimeline -> f InstanceFleetTimeline)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceFleetTimeline
-> f InstanceFleetTimeline
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 InstanceFleetTimeline where
parseJSON :: Value -> Parser InstanceFleetTimeline
parseJSON =
String
-> (Object -> Parser InstanceFleetTimeline)
-> Value
-> Parser InstanceFleetTimeline
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"InstanceFleetTimeline"
( \Object
x ->
Maybe POSIX -> Maybe POSIX -> Maybe POSIX -> InstanceFleetTimeline
InstanceFleetTimeline'
(Maybe POSIX
-> Maybe POSIX -> Maybe POSIX -> InstanceFleetTimeline)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> Maybe POSIX -> InstanceFleetTimeline)
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 -> InstanceFleetTimeline)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> InstanceFleetTimeline)
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 -> InstanceFleetTimeline)
-> Parser (Maybe POSIX) -> Parser InstanceFleetTimeline
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 InstanceFleetTimeline
instance Prelude.NFData InstanceFleetTimeline