{-# 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.ElasticTranscoder.Types.Job where
import qualified Amazonka.Core as Core
import Amazonka.ElasticTranscoder.Types.JobInput
import Amazonka.ElasticTranscoder.Types.JobOutput
import Amazonka.ElasticTranscoder.Types.Playlist
import Amazonka.ElasticTranscoder.Types.Timing
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Job = Job'
{
Job -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
Job -> Maybe Text
pipelineId :: Prelude.Maybe Prelude.Text,
Job -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Job -> Maybe [JobInput]
inputs :: Prelude.Maybe [JobInput],
Job -> Maybe JobInput
input :: Prelude.Maybe JobInput,
Job -> Maybe (HashMap Text Text)
userMetadata :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
Job -> Maybe [JobOutput]
outputs :: Prelude.Maybe [JobOutput],
Job -> Maybe JobOutput
output :: Prelude.Maybe JobOutput,
Job -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
Job -> Maybe [Playlist]
playlists :: Prelude.Maybe [Playlist],
Job -> Maybe Text
outputKeyPrefix :: Prelude.Maybe Prelude.Text,
Job -> Maybe Timing
timing :: Prelude.Maybe Timing
}
deriving (Job -> Job -> Bool
(Job -> Job -> Bool) -> (Job -> Job -> Bool) -> Eq Job
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Job -> Job -> Bool
$c/= :: Job -> Job -> Bool
== :: Job -> Job -> Bool
$c== :: Job -> Job -> Bool
Prelude.Eq, ReadPrec [Job]
ReadPrec Job
Int -> ReadS Job
ReadS [Job]
(Int -> ReadS Job)
-> ReadS [Job] -> ReadPrec Job -> ReadPrec [Job] -> Read Job
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Job]
$creadListPrec :: ReadPrec [Job]
readPrec :: ReadPrec Job
$creadPrec :: ReadPrec Job
readList :: ReadS [Job]
$creadList :: ReadS [Job]
readsPrec :: Int -> ReadS Job
$creadsPrec :: Int -> ReadS Job
Prelude.Read, Int -> Job -> ShowS
[Job] -> ShowS
Job -> String
(Int -> Job -> ShowS)
-> (Job -> String) -> ([Job] -> ShowS) -> Show Job
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Job] -> ShowS
$cshowList :: [Job] -> ShowS
show :: Job -> String
$cshow :: Job -> String
showsPrec :: Int -> Job -> ShowS
$cshowsPrec :: Int -> Job -> ShowS
Prelude.Show, (forall x. Job -> Rep Job x)
-> (forall x. Rep Job x -> Job) -> Generic Job
forall x. Rep Job x -> Job
forall x. Job -> Rep Job x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Job x -> Job
$cfrom :: forall x. Job -> Rep Job x
Prelude.Generic)
newJob ::
Job
newJob :: Job
newJob =
Job' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [JobInput]
-> Maybe JobInput
-> Maybe (HashMap Text Text)
-> Maybe [JobOutput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job
Job'
{ $sel:status:Job' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:pipelineId:Job' :: Maybe Text
pipelineId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Job' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:inputs:Job' :: Maybe [JobInput]
inputs = Maybe [JobInput]
forall a. Maybe a
Prelude.Nothing,
$sel:input:Job' :: Maybe JobInput
input = Maybe JobInput
forall a. Maybe a
Prelude.Nothing,
$sel:userMetadata:Job' :: Maybe (HashMap Text Text)
userMetadata = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:outputs:Job' :: Maybe [JobOutput]
outputs = Maybe [JobOutput]
forall a. Maybe a
Prelude.Nothing,
$sel:output:Job' :: Maybe JobOutput
output = Maybe JobOutput
forall a. Maybe a
Prelude.Nothing,
$sel:id:Job' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:playlists:Job' :: Maybe [Playlist]
playlists = Maybe [Playlist]
forall a. Maybe a
Prelude.Nothing,
$sel:outputKeyPrefix:Job' :: Maybe Text
outputKeyPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:timing:Job' :: Maybe Timing
timing = Maybe Timing
forall a. Maybe a
Prelude.Nothing
}
job_status :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_status :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_status = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
status :: Maybe Text
$sel:status:Job' :: Job -> Maybe Text
status} -> Maybe Text
status) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:status:Job' :: Maybe Text
status = Maybe Text
a} :: Job)
job_pipelineId :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_pipelineId :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_pipelineId = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
pipelineId :: Maybe Text
$sel:pipelineId:Job' :: Job -> Maybe Text
pipelineId} -> Maybe Text
pipelineId) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:pipelineId:Job' :: Maybe Text
pipelineId = Maybe Text
a} :: Job)
job_arn :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_arn :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_arn = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
arn :: Maybe Text
$sel:arn:Job' :: Job -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:arn:Job' :: Maybe Text
arn = Maybe Text
a} :: Job)
job_inputs :: Lens.Lens' Job (Prelude.Maybe [JobInput])
job_inputs :: (Maybe [JobInput] -> f (Maybe [JobInput])) -> Job -> f Job
job_inputs = (Job -> Maybe [JobInput])
-> (Job -> Maybe [JobInput] -> Job)
-> Lens Job Job (Maybe [JobInput]) (Maybe [JobInput])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe [JobInput]
inputs :: Maybe [JobInput]
$sel:inputs:Job' :: Job -> Maybe [JobInput]
inputs} -> Maybe [JobInput]
inputs) (\s :: Job
s@Job' {} Maybe [JobInput]
a -> Job
s {$sel:inputs:Job' :: Maybe [JobInput]
inputs = Maybe [JobInput]
a} :: Job) ((Maybe [JobInput] -> f (Maybe [JobInput])) -> Job -> f Job)
-> ((Maybe [JobInput] -> f (Maybe [JobInput]))
-> Maybe [JobInput] -> f (Maybe [JobInput]))
-> (Maybe [JobInput] -> f (Maybe [JobInput]))
-> Job
-> f Job
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [JobInput] [JobInput] [JobInput] [JobInput]
-> Iso
(Maybe [JobInput])
(Maybe [JobInput])
(Maybe [JobInput])
(Maybe [JobInput])
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 [JobInput] [JobInput] [JobInput] [JobInput]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
job_input :: Lens.Lens' Job (Prelude.Maybe JobInput)
job_input :: (Maybe JobInput -> f (Maybe JobInput)) -> Job -> f Job
job_input = (Job -> Maybe JobInput)
-> (Job -> Maybe JobInput -> Job)
-> Lens Job Job (Maybe JobInput) (Maybe JobInput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe JobInput
input :: Maybe JobInput
$sel:input:Job' :: Job -> Maybe JobInput
input} -> Maybe JobInput
input) (\s :: Job
s@Job' {} Maybe JobInput
a -> Job
s {$sel:input:Job' :: Maybe JobInput
input = Maybe JobInput
a} :: Job)
job_userMetadata :: Lens.Lens' Job (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
job_userMetadata :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Job -> f Job
job_userMetadata = (Job -> Maybe (HashMap Text Text))
-> (Job -> Maybe (HashMap Text Text) -> Job)
-> Lens
Job Job (Maybe (HashMap Text Text)) (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe (HashMap Text Text)
userMetadata :: Maybe (HashMap Text Text)
$sel:userMetadata:Job' :: Job -> Maybe (HashMap Text Text)
userMetadata} -> Maybe (HashMap Text Text)
userMetadata) (\s :: Job
s@Job' {} Maybe (HashMap Text Text)
a -> Job
s {$sel:userMetadata:Job' :: Maybe (HashMap Text Text)
userMetadata = Maybe (HashMap Text Text)
a} :: Job) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Job -> f Job)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Job
-> f Job
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
job_outputs :: Lens.Lens' Job (Prelude.Maybe [JobOutput])
job_outputs :: (Maybe [JobOutput] -> f (Maybe [JobOutput])) -> Job -> f Job
job_outputs = (Job -> Maybe [JobOutput])
-> (Job -> Maybe [JobOutput] -> Job)
-> Lens Job Job (Maybe [JobOutput]) (Maybe [JobOutput])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe [JobOutput]
outputs :: Maybe [JobOutput]
$sel:outputs:Job' :: Job -> Maybe [JobOutput]
outputs} -> Maybe [JobOutput]
outputs) (\s :: Job
s@Job' {} Maybe [JobOutput]
a -> Job
s {$sel:outputs:Job' :: Maybe [JobOutput]
outputs = Maybe [JobOutput]
a} :: Job) ((Maybe [JobOutput] -> f (Maybe [JobOutput])) -> Job -> f Job)
-> ((Maybe [JobOutput] -> f (Maybe [JobOutput]))
-> Maybe [JobOutput] -> f (Maybe [JobOutput]))
-> (Maybe [JobOutput] -> f (Maybe [JobOutput]))
-> Job
-> f Job
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [JobOutput] [JobOutput] [JobOutput] [JobOutput]
-> Iso
(Maybe [JobOutput])
(Maybe [JobOutput])
(Maybe [JobOutput])
(Maybe [JobOutput])
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 [JobOutput] [JobOutput] [JobOutput] [JobOutput]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
job_output :: Lens.Lens' Job (Prelude.Maybe JobOutput)
job_output :: (Maybe JobOutput -> f (Maybe JobOutput)) -> Job -> f Job
job_output = (Job -> Maybe JobOutput)
-> (Job -> Maybe JobOutput -> Job)
-> Lens Job Job (Maybe JobOutput) (Maybe JobOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe JobOutput
output :: Maybe JobOutput
$sel:output:Job' :: Job -> Maybe JobOutput
output} -> Maybe JobOutput
output) (\s :: Job
s@Job' {} Maybe JobOutput
a -> Job
s {$sel:output:Job' :: Maybe JobOutput
output = Maybe JobOutput
a} :: Job)
job_id :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_id :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_id = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
id :: Maybe Text
$sel:id:Job' :: Job -> Maybe Text
id} -> Maybe Text
id) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:id:Job' :: Maybe Text
id = Maybe Text
a} :: Job)
job_playlists :: Lens.Lens' Job (Prelude.Maybe [Playlist])
job_playlists :: (Maybe [Playlist] -> f (Maybe [Playlist])) -> Job -> f Job
job_playlists = (Job -> Maybe [Playlist])
-> (Job -> Maybe [Playlist] -> Job)
-> Lens Job Job (Maybe [Playlist]) (Maybe [Playlist])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe [Playlist]
playlists :: Maybe [Playlist]
$sel:playlists:Job' :: Job -> Maybe [Playlist]
playlists} -> Maybe [Playlist]
playlists) (\s :: Job
s@Job' {} Maybe [Playlist]
a -> Job
s {$sel:playlists:Job' :: Maybe [Playlist]
playlists = Maybe [Playlist]
a} :: Job) ((Maybe [Playlist] -> f (Maybe [Playlist])) -> Job -> f Job)
-> ((Maybe [Playlist] -> f (Maybe [Playlist]))
-> Maybe [Playlist] -> f (Maybe [Playlist]))
-> (Maybe [Playlist] -> f (Maybe [Playlist]))
-> Job
-> f Job
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Playlist] [Playlist] [Playlist] [Playlist]
-> Iso
(Maybe [Playlist])
(Maybe [Playlist])
(Maybe [Playlist])
(Maybe [Playlist])
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 [Playlist] [Playlist] [Playlist] [Playlist]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
job_outputKeyPrefix :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_outputKeyPrefix :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_outputKeyPrefix = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
outputKeyPrefix :: Maybe Text
$sel:outputKeyPrefix:Job' :: Job -> Maybe Text
outputKeyPrefix} -> Maybe Text
outputKeyPrefix) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:outputKeyPrefix:Job' :: Maybe Text
outputKeyPrefix = Maybe Text
a} :: Job)
job_timing :: Lens.Lens' Job (Prelude.Maybe Timing)
job_timing :: (Maybe Timing -> f (Maybe Timing)) -> Job -> f Job
job_timing = (Job -> Maybe Timing)
-> (Job -> Maybe Timing -> Job)
-> Lens Job Job (Maybe Timing) (Maybe Timing)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Timing
timing :: Maybe Timing
$sel:timing:Job' :: Job -> Maybe Timing
timing} -> Maybe Timing
timing) (\s :: Job
s@Job' {} Maybe Timing
a -> Job
s {$sel:timing:Job' :: Maybe Timing
timing = Maybe Timing
a} :: Job)
instance Core.FromJSON Job where
parseJSON :: Value -> Parser Job
parseJSON =
String -> (Object -> Parser Job) -> Value -> Parser Job
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Job"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [JobInput]
-> Maybe JobInput
-> Maybe (HashMap Text Text)
-> Maybe [JobOutput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job
Job'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [JobInput]
-> Maybe JobInput
-> Maybe (HashMap Text Text)
-> Maybe [JobOutput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [JobInput]
-> Maybe JobInput
-> Maybe (HashMap Text Text)
-> Maybe [JobOutput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job)
forall (f :: * -> *) a b. Functor 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
"Status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe [JobInput]
-> Maybe JobInput
-> Maybe (HashMap Text Text)
-> Maybe [JobOutput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [JobInput]
-> Maybe JobInput
-> Maybe (HashMap Text Text)
-> Maybe [JobOutput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job)
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
"PipelineId")
Parser
(Maybe Text
-> Maybe [JobInput]
-> Maybe JobInput
-> Maybe (HashMap Text Text)
-> Maybe [JobOutput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job)
-> Parser (Maybe Text)
-> Parser
(Maybe [JobInput]
-> Maybe JobInput
-> Maybe (HashMap Text Text)
-> Maybe [JobOutput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job)
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
"Arn")
Parser
(Maybe [JobInput]
-> Maybe JobInput
-> Maybe (HashMap Text Text)
-> Maybe [JobOutput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job)
-> Parser (Maybe [JobInput])
-> Parser
(Maybe JobInput
-> Maybe (HashMap Text Text)
-> Maybe [JobOutput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [JobInput]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Inputs" Parser (Maybe (Maybe [JobInput]))
-> Maybe [JobInput] -> Parser (Maybe [JobInput])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [JobInput]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe JobInput
-> Maybe (HashMap Text Text)
-> Maybe [JobOutput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job)
-> Parser (Maybe JobInput)
-> Parser
(Maybe (HashMap Text Text)
-> Maybe [JobOutput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobInput)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Input")
Parser
(Maybe (HashMap Text Text)
-> Maybe [JobOutput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Maybe [JobOutput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UserMetadata" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe [JobOutput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job)
-> Parser (Maybe [JobOutput])
-> Parser
(Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [JobOutput]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Outputs" Parser (Maybe (Maybe [JobOutput]))
-> Maybe [JobOutput] -> Parser (Maybe [JobOutput])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [JobOutput]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe JobOutput
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Job)
-> Parser (Maybe JobOutput)
-> Parser
(Maybe Text
-> Maybe [Playlist] -> Maybe Text -> Maybe Timing -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobOutput)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Output")
Parser
(Maybe Text
-> Maybe [Playlist] -> Maybe Text -> Maybe Timing -> Job)
-> Parser (Maybe Text)
-> Parser (Maybe [Playlist] -> Maybe Text -> Maybe Timing -> Job)
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
"Id")
Parser (Maybe [Playlist] -> Maybe Text -> Maybe Timing -> Job)
-> Parser (Maybe [Playlist])
-> Parser (Maybe Text -> Maybe Timing -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Playlist]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Playlists" Parser (Maybe (Maybe [Playlist]))
-> Maybe [Playlist] -> Parser (Maybe [Playlist])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Playlist]
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe Text -> Maybe Timing -> Job)
-> Parser (Maybe Text) -> Parser (Maybe Timing -> Job)
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
"OutputKeyPrefix")
Parser (Maybe Timing -> Job) -> Parser (Maybe Timing) -> Parser Job
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Timing)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Timing")
)
instance Prelude.Hashable Job
instance Prelude.NFData Job