{-# 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.NotebookExecutionSummary where
import qualified Amazonka.Core as Core
import Amazonka.EMR.Types.NotebookExecutionStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data NotebookExecutionSummary = NotebookExecutionSummary'
{
NotebookExecutionSummary -> Maybe NotebookExecutionStatus
status :: Prelude.Maybe NotebookExecutionStatus,
NotebookExecutionSummary -> Maybe Text
editorId :: Prelude.Maybe Prelude.Text,
NotebookExecutionSummary -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
NotebookExecutionSummary -> Maybe Text
notebookExecutionId :: Prelude.Maybe Prelude.Text,
NotebookExecutionSummary -> Maybe Text
notebookExecutionName :: Prelude.Maybe Prelude.Text,
NotebookExecutionSummary -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX
}
deriving (NotebookExecutionSummary -> NotebookExecutionSummary -> Bool
(NotebookExecutionSummary -> NotebookExecutionSummary -> Bool)
-> (NotebookExecutionSummary -> NotebookExecutionSummary -> Bool)
-> Eq NotebookExecutionSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NotebookExecutionSummary -> NotebookExecutionSummary -> Bool
$c/= :: NotebookExecutionSummary -> NotebookExecutionSummary -> Bool
== :: NotebookExecutionSummary -> NotebookExecutionSummary -> Bool
$c== :: NotebookExecutionSummary -> NotebookExecutionSummary -> Bool
Prelude.Eq, ReadPrec [NotebookExecutionSummary]
ReadPrec NotebookExecutionSummary
Int -> ReadS NotebookExecutionSummary
ReadS [NotebookExecutionSummary]
(Int -> ReadS NotebookExecutionSummary)
-> ReadS [NotebookExecutionSummary]
-> ReadPrec NotebookExecutionSummary
-> ReadPrec [NotebookExecutionSummary]
-> Read NotebookExecutionSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NotebookExecutionSummary]
$creadListPrec :: ReadPrec [NotebookExecutionSummary]
readPrec :: ReadPrec NotebookExecutionSummary
$creadPrec :: ReadPrec NotebookExecutionSummary
readList :: ReadS [NotebookExecutionSummary]
$creadList :: ReadS [NotebookExecutionSummary]
readsPrec :: Int -> ReadS NotebookExecutionSummary
$creadsPrec :: Int -> ReadS NotebookExecutionSummary
Prelude.Read, Int -> NotebookExecutionSummary -> ShowS
[NotebookExecutionSummary] -> ShowS
NotebookExecutionSummary -> String
(Int -> NotebookExecutionSummary -> ShowS)
-> (NotebookExecutionSummary -> String)
-> ([NotebookExecutionSummary] -> ShowS)
-> Show NotebookExecutionSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NotebookExecutionSummary] -> ShowS
$cshowList :: [NotebookExecutionSummary] -> ShowS
show :: NotebookExecutionSummary -> String
$cshow :: NotebookExecutionSummary -> String
showsPrec :: Int -> NotebookExecutionSummary -> ShowS
$cshowsPrec :: Int -> NotebookExecutionSummary -> ShowS
Prelude.Show, (forall x.
NotebookExecutionSummary -> Rep NotebookExecutionSummary x)
-> (forall x.
Rep NotebookExecutionSummary x -> NotebookExecutionSummary)
-> Generic NotebookExecutionSummary
forall x.
Rep NotebookExecutionSummary x -> NotebookExecutionSummary
forall x.
NotebookExecutionSummary -> Rep NotebookExecutionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NotebookExecutionSummary x -> NotebookExecutionSummary
$cfrom :: forall x.
NotebookExecutionSummary -> Rep NotebookExecutionSummary x
Prelude.Generic)
newNotebookExecutionSummary ::
NotebookExecutionSummary
newNotebookExecutionSummary :: NotebookExecutionSummary
newNotebookExecutionSummary =
NotebookExecutionSummary' :: Maybe NotebookExecutionStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> NotebookExecutionSummary
NotebookExecutionSummary'
{ $sel:status:NotebookExecutionSummary' :: Maybe NotebookExecutionStatus
status = Maybe NotebookExecutionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:editorId:NotebookExecutionSummary' :: Maybe Text
editorId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:startTime:NotebookExecutionSummary' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:notebookExecutionId:NotebookExecutionSummary' :: Maybe Text
notebookExecutionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:notebookExecutionName:NotebookExecutionSummary' :: Maybe Text
notebookExecutionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:endTime:NotebookExecutionSummary' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
notebookExecutionSummary_status :: Lens.Lens' NotebookExecutionSummary (Prelude.Maybe NotebookExecutionStatus)
notebookExecutionSummary_status :: (Maybe NotebookExecutionStatus
-> f (Maybe NotebookExecutionStatus))
-> NotebookExecutionSummary -> f NotebookExecutionSummary
notebookExecutionSummary_status = (NotebookExecutionSummary -> Maybe NotebookExecutionStatus)
-> (NotebookExecutionSummary
-> Maybe NotebookExecutionStatus -> NotebookExecutionSummary)
-> Lens
NotebookExecutionSummary
NotebookExecutionSummary
(Maybe NotebookExecutionStatus)
(Maybe NotebookExecutionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotebookExecutionSummary' {Maybe NotebookExecutionStatus
status :: Maybe NotebookExecutionStatus
$sel:status:NotebookExecutionSummary' :: NotebookExecutionSummary -> Maybe NotebookExecutionStatus
status} -> Maybe NotebookExecutionStatus
status) (\s :: NotebookExecutionSummary
s@NotebookExecutionSummary' {} Maybe NotebookExecutionStatus
a -> NotebookExecutionSummary
s {$sel:status:NotebookExecutionSummary' :: Maybe NotebookExecutionStatus
status = Maybe NotebookExecutionStatus
a} :: NotebookExecutionSummary)
notebookExecutionSummary_editorId :: Lens.Lens' NotebookExecutionSummary (Prelude.Maybe Prelude.Text)
notebookExecutionSummary_editorId :: (Maybe Text -> f (Maybe Text))
-> NotebookExecutionSummary -> f NotebookExecutionSummary
notebookExecutionSummary_editorId = (NotebookExecutionSummary -> Maybe Text)
-> (NotebookExecutionSummary
-> Maybe Text -> NotebookExecutionSummary)
-> Lens
NotebookExecutionSummary
NotebookExecutionSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotebookExecutionSummary' {Maybe Text
editorId :: Maybe Text
$sel:editorId:NotebookExecutionSummary' :: NotebookExecutionSummary -> Maybe Text
editorId} -> Maybe Text
editorId) (\s :: NotebookExecutionSummary
s@NotebookExecutionSummary' {} Maybe Text
a -> NotebookExecutionSummary
s {$sel:editorId:NotebookExecutionSummary' :: Maybe Text
editorId = Maybe Text
a} :: NotebookExecutionSummary)
notebookExecutionSummary_startTime :: Lens.Lens' NotebookExecutionSummary (Prelude.Maybe Prelude.UTCTime)
notebookExecutionSummary_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> NotebookExecutionSummary -> f NotebookExecutionSummary
notebookExecutionSummary_startTime = (NotebookExecutionSummary -> Maybe POSIX)
-> (NotebookExecutionSummary
-> Maybe POSIX -> NotebookExecutionSummary)
-> Lens
NotebookExecutionSummary
NotebookExecutionSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotebookExecutionSummary' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:NotebookExecutionSummary' :: NotebookExecutionSummary -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: NotebookExecutionSummary
s@NotebookExecutionSummary' {} Maybe POSIX
a -> NotebookExecutionSummary
s {$sel:startTime:NotebookExecutionSummary' :: Maybe POSIX
startTime = Maybe POSIX
a} :: NotebookExecutionSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> NotebookExecutionSummary -> f NotebookExecutionSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> NotebookExecutionSummary
-> f NotebookExecutionSummary
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
notebookExecutionSummary_notebookExecutionId :: Lens.Lens' NotebookExecutionSummary (Prelude.Maybe Prelude.Text)
notebookExecutionSummary_notebookExecutionId :: (Maybe Text -> f (Maybe Text))
-> NotebookExecutionSummary -> f NotebookExecutionSummary
notebookExecutionSummary_notebookExecutionId = (NotebookExecutionSummary -> Maybe Text)
-> (NotebookExecutionSummary
-> Maybe Text -> NotebookExecutionSummary)
-> Lens
NotebookExecutionSummary
NotebookExecutionSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotebookExecutionSummary' {Maybe Text
notebookExecutionId :: Maybe Text
$sel:notebookExecutionId:NotebookExecutionSummary' :: NotebookExecutionSummary -> Maybe Text
notebookExecutionId} -> Maybe Text
notebookExecutionId) (\s :: NotebookExecutionSummary
s@NotebookExecutionSummary' {} Maybe Text
a -> NotebookExecutionSummary
s {$sel:notebookExecutionId:NotebookExecutionSummary' :: Maybe Text
notebookExecutionId = Maybe Text
a} :: NotebookExecutionSummary)
notebookExecutionSummary_notebookExecutionName :: Lens.Lens' NotebookExecutionSummary (Prelude.Maybe Prelude.Text)
notebookExecutionSummary_notebookExecutionName :: (Maybe Text -> f (Maybe Text))
-> NotebookExecutionSummary -> f NotebookExecutionSummary
notebookExecutionSummary_notebookExecutionName = (NotebookExecutionSummary -> Maybe Text)
-> (NotebookExecutionSummary
-> Maybe Text -> NotebookExecutionSummary)
-> Lens
NotebookExecutionSummary
NotebookExecutionSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotebookExecutionSummary' {Maybe Text
notebookExecutionName :: Maybe Text
$sel:notebookExecutionName:NotebookExecutionSummary' :: NotebookExecutionSummary -> Maybe Text
notebookExecutionName} -> Maybe Text
notebookExecutionName) (\s :: NotebookExecutionSummary
s@NotebookExecutionSummary' {} Maybe Text
a -> NotebookExecutionSummary
s {$sel:notebookExecutionName:NotebookExecutionSummary' :: Maybe Text
notebookExecutionName = Maybe Text
a} :: NotebookExecutionSummary)
notebookExecutionSummary_endTime :: Lens.Lens' NotebookExecutionSummary (Prelude.Maybe Prelude.UTCTime)
notebookExecutionSummary_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> NotebookExecutionSummary -> f NotebookExecutionSummary
notebookExecutionSummary_endTime = (NotebookExecutionSummary -> Maybe POSIX)
-> (NotebookExecutionSummary
-> Maybe POSIX -> NotebookExecutionSummary)
-> Lens
NotebookExecutionSummary
NotebookExecutionSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotebookExecutionSummary' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:NotebookExecutionSummary' :: NotebookExecutionSummary -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: NotebookExecutionSummary
s@NotebookExecutionSummary' {} Maybe POSIX
a -> NotebookExecutionSummary
s {$sel:endTime:NotebookExecutionSummary' :: Maybe POSIX
endTime = Maybe POSIX
a} :: NotebookExecutionSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> NotebookExecutionSummary -> f NotebookExecutionSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> NotebookExecutionSummary
-> f NotebookExecutionSummary
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 NotebookExecutionSummary where
parseJSON :: Value -> Parser NotebookExecutionSummary
parseJSON =
String
-> (Object -> Parser NotebookExecutionSummary)
-> Value
-> Parser NotebookExecutionSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NotebookExecutionSummary"
( \Object
x ->
Maybe NotebookExecutionStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> NotebookExecutionSummary
NotebookExecutionSummary'
(Maybe NotebookExecutionStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> NotebookExecutionSummary)
-> Parser (Maybe NotebookExecutionStatus)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> NotebookExecutionSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe NotebookExecutionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> NotebookExecutionSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> NotebookExecutionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EditorId")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> NotebookExecutionSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe POSIX -> NotebookExecutionSummary)
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
"StartTime")
Parser
(Maybe Text
-> Maybe Text -> Maybe POSIX -> NotebookExecutionSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> NotebookExecutionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotebookExecutionId")
Parser (Maybe Text -> Maybe POSIX -> NotebookExecutionSummary)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> NotebookExecutionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotebookExecutionName")
Parser (Maybe POSIX -> NotebookExecutionSummary)
-> Parser (Maybe POSIX) -> Parser NotebookExecutionSummary
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
"EndTime")
)
instance Prelude.Hashable NotebookExecutionSummary
instance Prelude.NFData NotebookExecutionSummary