{-# 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 qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElasticTranscoder.Types.JobInput
import Amazonka.ElasticTranscoder.Types.JobOutput
import Amazonka.ElasticTranscoder.Types.Playlist
import Amazonka.ElasticTranscoder.Types.Timing
import qualified Amazonka.Prelude as Prelude
data Job = Job'
{
Job -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Job -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
Job -> Maybe JobInput
input :: Prelude.Maybe JobInput,
Job -> Maybe [JobInput]
inputs :: Prelude.Maybe [JobInput],
Job -> Maybe JobOutput
output :: Prelude.Maybe JobOutput,
Job -> Maybe Text
outputKeyPrefix :: Prelude.Maybe Prelude.Text,
Job -> Maybe [JobOutput]
outputs :: Prelude.Maybe [JobOutput],
Job -> Maybe Text
pipelineId :: Prelude.Maybe Prelude.Text,
Job -> Maybe [Playlist]
playlists :: Prelude.Maybe [Playlist],
Job -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
Job -> Maybe Timing
timing :: Prelude.Maybe Timing,
Job -> Maybe (HashMap Text Text)
userMetadata :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (Job -> Job -> Bool
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]
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
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. 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'
{ $sel:arn:Job' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:id:Job' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:input:Job' :: Maybe JobInput
input = forall a. Maybe a
Prelude.Nothing,
$sel:inputs:Job' :: Maybe [JobInput]
inputs = forall a. Maybe a
Prelude.Nothing,
$sel:output:Job' :: Maybe JobOutput
output = forall a. Maybe a
Prelude.Nothing,
$sel:outputKeyPrefix:Job' :: Maybe Text
outputKeyPrefix = forall a. Maybe a
Prelude.Nothing,
$sel:outputs:Job' :: Maybe [JobOutput]
outputs = forall a. Maybe a
Prelude.Nothing,
$sel:pipelineId:Job' :: Maybe Text
pipelineId = forall a. Maybe a
Prelude.Nothing,
$sel:playlists:Job' :: Maybe [Playlist]
playlists = forall a. Maybe a
Prelude.Nothing,
$sel:status:Job' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
$sel:timing:Job' :: Maybe Timing
timing = forall a. Maybe a
Prelude.Nothing,
$sel:userMetadata:Job' :: Maybe (HashMap Text Text)
userMetadata = forall a. Maybe a
Prelude.Nothing
}
job_arn :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_arn :: Lens' Job (Maybe Text)
job_arn = 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_id :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_id :: Lens' Job (Maybe Text)
job_id = 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_input :: Lens.Lens' Job (Prelude.Maybe JobInput)
job_input :: Lens' Job (Maybe JobInput)
job_input = 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_inputs :: Lens.Lens' Job (Prelude.Maybe [JobInput])
job_inputs :: Lens' Job (Maybe [JobInput])
job_inputs = 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) 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 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 :: Lens' Job (Maybe JobOutput)
job_output = 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_outputKeyPrefix :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_outputKeyPrefix :: Lens' Job (Maybe Text)
job_outputKeyPrefix = 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_outputs :: Lens.Lens' Job (Prelude.Maybe [JobOutput])
job_outputs :: Lens' Job (Maybe [JobOutput])
job_outputs = 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) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
job_pipelineId :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_pipelineId :: Lens' Job (Maybe Text)
job_pipelineId = 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_playlists :: Lens.Lens' Job (Prelude.Maybe [Playlist])
job_playlists :: Lens' Job (Maybe [Playlist])
job_playlists = 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) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
job_status :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_status :: Lens' Job (Maybe Text)
job_status = 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_timing :: Lens.Lens' Job (Prelude.Maybe Timing)
job_timing :: Lens' Job (Maybe Timing)
job_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)
job_userMetadata :: Lens.Lens' Job (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
job_userMetadata :: Lens' Job (Maybe (HashMap Text Text))
job_userMetadata = 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) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON Job where
parseJSON :: Value -> Parser Job
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Job"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe JobInput
-> Maybe [JobInput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [JobOutput]
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Maybe (HashMap Text Text)
-> Job
Job'
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
"Arn")
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
"Id")
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
"Input")
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
"Inputs" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"Output")
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
"OutputKeyPrefix")
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
"Outputs" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"PipelineId")
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
"Playlists" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"Status")
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
"Timing")
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
"UserMetadata" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable Job where
hashWithSalt :: Int -> Job -> Int
hashWithSalt Int
_salt Job' {Maybe [Playlist]
Maybe [JobInput]
Maybe [JobOutput]
Maybe Text
Maybe (HashMap Text Text)
Maybe JobInput
Maybe JobOutput
Maybe Timing
userMetadata :: Maybe (HashMap Text Text)
timing :: Maybe Timing
status :: Maybe Text
playlists :: Maybe [Playlist]
pipelineId :: Maybe Text
outputs :: Maybe [JobOutput]
outputKeyPrefix :: Maybe Text
output :: Maybe JobOutput
inputs :: Maybe [JobInput]
input :: Maybe JobInput
id :: Maybe Text
arn :: Maybe Text
$sel:userMetadata:Job' :: Job -> Maybe (HashMap Text Text)
$sel:timing:Job' :: Job -> Maybe Timing
$sel:status:Job' :: Job -> Maybe Text
$sel:playlists:Job' :: Job -> Maybe [Playlist]
$sel:pipelineId:Job' :: Job -> Maybe Text
$sel:outputs:Job' :: Job -> Maybe [JobOutput]
$sel:outputKeyPrefix:Job' :: Job -> Maybe Text
$sel:output:Job' :: Job -> Maybe JobOutput
$sel:inputs:Job' :: Job -> Maybe [JobInput]
$sel:input:Job' :: Job -> Maybe JobInput
$sel:id:Job' :: Job -> Maybe Text
$sel:arn:Job' :: Job -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe JobInput
input
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [JobInput]
inputs
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe JobOutput
output
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
outputKeyPrefix
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [JobOutput]
outputs
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pipelineId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Playlist]
playlists
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Timing
timing
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
userMetadata
instance Prelude.NFData Job where
rnf :: Job -> ()
rnf Job' {Maybe [Playlist]
Maybe [JobInput]
Maybe [JobOutput]
Maybe Text
Maybe (HashMap Text Text)
Maybe JobInput
Maybe JobOutput
Maybe Timing
userMetadata :: Maybe (HashMap Text Text)
timing :: Maybe Timing
status :: Maybe Text
playlists :: Maybe [Playlist]
pipelineId :: Maybe Text
outputs :: Maybe [JobOutput]
outputKeyPrefix :: Maybe Text
output :: Maybe JobOutput
inputs :: Maybe [JobInput]
input :: Maybe JobInput
id :: Maybe Text
arn :: Maybe Text
$sel:userMetadata:Job' :: Job -> Maybe (HashMap Text Text)
$sel:timing:Job' :: Job -> Maybe Timing
$sel:status:Job' :: Job -> Maybe Text
$sel:playlists:Job' :: Job -> Maybe [Playlist]
$sel:pipelineId:Job' :: Job -> Maybe Text
$sel:outputs:Job' :: Job -> Maybe [JobOutput]
$sel:outputKeyPrefix:Job' :: Job -> Maybe Text
$sel:output:Job' :: Job -> Maybe JobOutput
$sel:inputs:Job' :: Job -> Maybe [JobInput]
$sel:input:Job' :: Job -> Maybe JobInput
$sel:id:Job' :: Job -> Maybe Text
$sel:arn:Job' :: Job -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobInput
input
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [JobInput]
inputs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobOutput
output
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
outputKeyPrefix
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [JobOutput]
outputs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
pipelineId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Playlist]
playlists
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Timing
timing
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
userMetadata