{-# 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.Glue.Types.BlueprintRun where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Glue.Types.BlueprintRunState
import qualified Amazonka.Prelude as Prelude
data BlueprintRun = BlueprintRun'
{
BlueprintRun -> Maybe Text
blueprintName :: Prelude.Maybe Prelude.Text,
BlueprintRun -> Maybe POSIX
completedOn :: Prelude.Maybe Data.POSIX,
BlueprintRun -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
BlueprintRun -> Maybe Text
parameters :: Prelude.Maybe Prelude.Text,
BlueprintRun -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
BlueprintRun -> Maybe Text
rollbackErrorMessage :: Prelude.Maybe Prelude.Text,
BlueprintRun -> Maybe Text
runId :: Prelude.Maybe Prelude.Text,
BlueprintRun -> Maybe POSIX
startedOn :: Prelude.Maybe Data.POSIX,
BlueprintRun -> Maybe BlueprintRunState
state :: Prelude.Maybe BlueprintRunState,
BlueprintRun -> Maybe Text
workflowName :: Prelude.Maybe Prelude.Text
}
deriving (BlueprintRun -> BlueprintRun -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BlueprintRun -> BlueprintRun -> Bool
$c/= :: BlueprintRun -> BlueprintRun -> Bool
== :: BlueprintRun -> BlueprintRun -> Bool
$c== :: BlueprintRun -> BlueprintRun -> Bool
Prelude.Eq, ReadPrec [BlueprintRun]
ReadPrec BlueprintRun
Int -> ReadS BlueprintRun
ReadS [BlueprintRun]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BlueprintRun]
$creadListPrec :: ReadPrec [BlueprintRun]
readPrec :: ReadPrec BlueprintRun
$creadPrec :: ReadPrec BlueprintRun
readList :: ReadS [BlueprintRun]
$creadList :: ReadS [BlueprintRun]
readsPrec :: Int -> ReadS BlueprintRun
$creadsPrec :: Int -> ReadS BlueprintRun
Prelude.Read, Int -> BlueprintRun -> ShowS
[BlueprintRun] -> ShowS
BlueprintRun -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BlueprintRun] -> ShowS
$cshowList :: [BlueprintRun] -> ShowS
show :: BlueprintRun -> String
$cshow :: BlueprintRun -> String
showsPrec :: Int -> BlueprintRun -> ShowS
$cshowsPrec :: Int -> BlueprintRun -> ShowS
Prelude.Show, forall x. Rep BlueprintRun x -> BlueprintRun
forall x. BlueprintRun -> Rep BlueprintRun x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BlueprintRun x -> BlueprintRun
$cfrom :: forall x. BlueprintRun -> Rep BlueprintRun x
Prelude.Generic)
newBlueprintRun ::
BlueprintRun
newBlueprintRun :: BlueprintRun
newBlueprintRun =
BlueprintRun'
{ $sel:blueprintName:BlueprintRun' :: Maybe Text
blueprintName = forall a. Maybe a
Prelude.Nothing,
$sel:completedOn:BlueprintRun' :: Maybe POSIX
completedOn = forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:BlueprintRun' :: Maybe Text
errorMessage = forall a. Maybe a
Prelude.Nothing,
$sel:parameters:BlueprintRun' :: Maybe Text
parameters = forall a. Maybe a
Prelude.Nothing,
$sel:roleArn:BlueprintRun' :: Maybe Text
roleArn = forall a. Maybe a
Prelude.Nothing,
$sel:rollbackErrorMessage:BlueprintRun' :: Maybe Text
rollbackErrorMessage = forall a. Maybe a
Prelude.Nothing,
$sel:runId:BlueprintRun' :: Maybe Text
runId = forall a. Maybe a
Prelude.Nothing,
$sel:startedOn:BlueprintRun' :: Maybe POSIX
startedOn = forall a. Maybe a
Prelude.Nothing,
$sel:state:BlueprintRun' :: Maybe BlueprintRunState
state = forall a. Maybe a
Prelude.Nothing,
$sel:workflowName:BlueprintRun' :: Maybe Text
workflowName = forall a. Maybe a
Prelude.Nothing
}
blueprintRun_blueprintName :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.Text)
blueprintRun_blueprintName :: Lens' BlueprintRun (Maybe Text)
blueprintRun_blueprintName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe Text
blueprintName :: Maybe Text
$sel:blueprintName:BlueprintRun' :: BlueprintRun -> Maybe Text
blueprintName} -> Maybe Text
blueprintName) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe Text
a -> BlueprintRun
s {$sel:blueprintName:BlueprintRun' :: Maybe Text
blueprintName = Maybe Text
a} :: BlueprintRun)
blueprintRun_completedOn :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.UTCTime)
blueprintRun_completedOn :: Lens' BlueprintRun (Maybe UTCTime)
blueprintRun_completedOn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe POSIX
completedOn :: Maybe POSIX
$sel:completedOn:BlueprintRun' :: BlueprintRun -> Maybe POSIX
completedOn} -> Maybe POSIX
completedOn) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe POSIX
a -> BlueprintRun
s {$sel:completedOn:BlueprintRun' :: Maybe POSIX
completedOn = Maybe POSIX
a} :: BlueprintRun) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
blueprintRun_errorMessage :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.Text)
blueprintRun_errorMessage :: Lens' BlueprintRun (Maybe Text)
blueprintRun_errorMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:BlueprintRun' :: BlueprintRun -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe Text
a -> BlueprintRun
s {$sel:errorMessage:BlueprintRun' :: Maybe Text
errorMessage = Maybe Text
a} :: BlueprintRun)
blueprintRun_parameters :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.Text)
blueprintRun_parameters :: Lens' BlueprintRun (Maybe Text)
blueprintRun_parameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe Text
parameters :: Maybe Text
$sel:parameters:BlueprintRun' :: BlueprintRun -> Maybe Text
parameters} -> Maybe Text
parameters) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe Text
a -> BlueprintRun
s {$sel:parameters:BlueprintRun' :: Maybe Text
parameters = Maybe Text
a} :: BlueprintRun)
blueprintRun_roleArn :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.Text)
blueprintRun_roleArn :: Lens' BlueprintRun (Maybe Text)
blueprintRun_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:BlueprintRun' :: BlueprintRun -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe Text
a -> BlueprintRun
s {$sel:roleArn:BlueprintRun' :: Maybe Text
roleArn = Maybe Text
a} :: BlueprintRun)
blueprintRun_rollbackErrorMessage :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.Text)
blueprintRun_rollbackErrorMessage :: Lens' BlueprintRun (Maybe Text)
blueprintRun_rollbackErrorMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe Text
rollbackErrorMessage :: Maybe Text
$sel:rollbackErrorMessage:BlueprintRun' :: BlueprintRun -> Maybe Text
rollbackErrorMessage} -> Maybe Text
rollbackErrorMessage) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe Text
a -> BlueprintRun
s {$sel:rollbackErrorMessage:BlueprintRun' :: Maybe Text
rollbackErrorMessage = Maybe Text
a} :: BlueprintRun)
blueprintRun_runId :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.Text)
blueprintRun_runId :: Lens' BlueprintRun (Maybe Text)
blueprintRun_runId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe Text
runId :: Maybe Text
$sel:runId:BlueprintRun' :: BlueprintRun -> Maybe Text
runId} -> Maybe Text
runId) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe Text
a -> BlueprintRun
s {$sel:runId:BlueprintRun' :: Maybe Text
runId = Maybe Text
a} :: BlueprintRun)
blueprintRun_startedOn :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.UTCTime)
blueprintRun_startedOn :: Lens' BlueprintRun (Maybe UTCTime)
blueprintRun_startedOn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe POSIX
startedOn :: Maybe POSIX
$sel:startedOn:BlueprintRun' :: BlueprintRun -> Maybe POSIX
startedOn} -> Maybe POSIX
startedOn) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe POSIX
a -> BlueprintRun
s {$sel:startedOn:BlueprintRun' :: Maybe POSIX
startedOn = Maybe POSIX
a} :: BlueprintRun) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
blueprintRun_state :: Lens.Lens' BlueprintRun (Prelude.Maybe BlueprintRunState)
blueprintRun_state :: Lens' BlueprintRun (Maybe BlueprintRunState)
blueprintRun_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe BlueprintRunState
state :: Maybe BlueprintRunState
$sel:state:BlueprintRun' :: BlueprintRun -> Maybe BlueprintRunState
state} -> Maybe BlueprintRunState
state) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe BlueprintRunState
a -> BlueprintRun
s {$sel:state:BlueprintRun' :: Maybe BlueprintRunState
state = Maybe BlueprintRunState
a} :: BlueprintRun)
blueprintRun_workflowName :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.Text)
blueprintRun_workflowName :: Lens' BlueprintRun (Maybe Text)
blueprintRun_workflowName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe Text
workflowName :: Maybe Text
$sel:workflowName:BlueprintRun' :: BlueprintRun -> Maybe Text
workflowName} -> Maybe Text
workflowName) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe Text
a -> BlueprintRun
s {$sel:workflowName:BlueprintRun' :: Maybe Text
workflowName = Maybe Text
a} :: BlueprintRun)
instance Data.FromJSON BlueprintRun where
parseJSON :: Value -> Parser BlueprintRun
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BlueprintRun"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BlueprintRunState
-> Maybe Text
-> BlueprintRun
BlueprintRun'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"BlueprintName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CompletedOn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ErrorMessage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Parameters")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RoleArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RollbackErrorMessage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RunId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StartedOn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"State")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"WorkflowName")
)
instance Prelude.Hashable BlueprintRun where
hashWithSalt :: Int -> BlueprintRun -> Int
hashWithSalt Int
_salt BlueprintRun' {Maybe Text
Maybe POSIX
Maybe BlueprintRunState
workflowName :: Maybe Text
state :: Maybe BlueprintRunState
startedOn :: Maybe POSIX
runId :: Maybe Text
rollbackErrorMessage :: Maybe Text
roleArn :: Maybe Text
parameters :: Maybe Text
errorMessage :: Maybe Text
completedOn :: Maybe POSIX
blueprintName :: Maybe Text
$sel:workflowName:BlueprintRun' :: BlueprintRun -> Maybe Text
$sel:state:BlueprintRun' :: BlueprintRun -> Maybe BlueprintRunState
$sel:startedOn:BlueprintRun' :: BlueprintRun -> Maybe POSIX
$sel:runId:BlueprintRun' :: BlueprintRun -> Maybe Text
$sel:rollbackErrorMessage:BlueprintRun' :: BlueprintRun -> Maybe Text
$sel:roleArn:BlueprintRun' :: BlueprintRun -> Maybe Text
$sel:parameters:BlueprintRun' :: BlueprintRun -> Maybe Text
$sel:errorMessage:BlueprintRun' :: BlueprintRun -> Maybe Text
$sel:completedOn:BlueprintRun' :: BlueprintRun -> Maybe POSIX
$sel:blueprintName:BlueprintRun' :: BlueprintRun -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
blueprintName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
completedOn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
parameters
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
rollbackErrorMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
runId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
startedOn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe BlueprintRunState
state
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
workflowName
instance Prelude.NFData BlueprintRun where
rnf :: BlueprintRun -> ()
rnf BlueprintRun' {Maybe Text
Maybe POSIX
Maybe BlueprintRunState
workflowName :: Maybe Text
state :: Maybe BlueprintRunState
startedOn :: Maybe POSIX
runId :: Maybe Text
rollbackErrorMessage :: Maybe Text
roleArn :: Maybe Text
parameters :: Maybe Text
errorMessage :: Maybe Text
completedOn :: Maybe POSIX
blueprintName :: Maybe Text
$sel:workflowName:BlueprintRun' :: BlueprintRun -> Maybe Text
$sel:state:BlueprintRun' :: BlueprintRun -> Maybe BlueprintRunState
$sel:startedOn:BlueprintRun' :: BlueprintRun -> Maybe POSIX
$sel:runId:BlueprintRun' :: BlueprintRun -> Maybe Text
$sel:rollbackErrorMessage:BlueprintRun' :: BlueprintRun -> Maybe Text
$sel:roleArn:BlueprintRun' :: BlueprintRun -> Maybe Text
$sel:parameters:BlueprintRun' :: BlueprintRun -> Maybe Text
$sel:errorMessage:BlueprintRun' :: BlueprintRun -> Maybe Text
$sel:completedOn:BlueprintRun' :: BlueprintRun -> Maybe POSIX
$sel:blueprintName:BlueprintRun' :: BlueprintRun -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
blueprintName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
completedOn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
parameters
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
rollbackErrorMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
runId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
startedOn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe BlueprintRunState
state
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
workflowName