{-# 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.JobInput 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.DetectedProperties
import Amazonka.ElasticTranscoder.Types.Encryption
import Amazonka.ElasticTranscoder.Types.InputCaptions
import Amazonka.ElasticTranscoder.Types.TimeSpan
import qualified Amazonka.Prelude as Prelude
data JobInput = JobInput'
{
JobInput -> Maybe Text
aspectRatio :: Prelude.Maybe Prelude.Text,
JobInput -> Maybe Text
container :: Prelude.Maybe Prelude.Text,
JobInput -> Maybe DetectedProperties
detectedProperties :: Prelude.Maybe DetectedProperties,
JobInput -> Maybe Encryption
encryption :: Prelude.Maybe Encryption,
JobInput -> Maybe Text
frameRate :: Prelude.Maybe Prelude.Text,
JobInput -> Maybe InputCaptions
inputCaptions :: Prelude.Maybe InputCaptions,
JobInput -> Maybe Text
interlaced :: Prelude.Maybe Prelude.Text,
JobInput -> Maybe Text
key :: Prelude.Maybe Prelude.Text,
JobInput -> Maybe Text
resolution :: Prelude.Maybe Prelude.Text,
JobInput -> Maybe TimeSpan
timeSpan :: Prelude.Maybe TimeSpan
}
deriving (JobInput -> JobInput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobInput -> JobInput -> Bool
$c/= :: JobInput -> JobInput -> Bool
== :: JobInput -> JobInput -> Bool
$c== :: JobInput -> JobInput -> Bool
Prelude.Eq, ReadPrec [JobInput]
ReadPrec JobInput
Int -> ReadS JobInput
ReadS [JobInput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JobInput]
$creadListPrec :: ReadPrec [JobInput]
readPrec :: ReadPrec JobInput
$creadPrec :: ReadPrec JobInput
readList :: ReadS [JobInput]
$creadList :: ReadS [JobInput]
readsPrec :: Int -> ReadS JobInput
$creadsPrec :: Int -> ReadS JobInput
Prelude.Read, Int -> JobInput -> ShowS
[JobInput] -> ShowS
JobInput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobInput] -> ShowS
$cshowList :: [JobInput] -> ShowS
show :: JobInput -> String
$cshow :: JobInput -> String
showsPrec :: Int -> JobInput -> ShowS
$cshowsPrec :: Int -> JobInput -> ShowS
Prelude.Show, forall x. Rep JobInput x -> JobInput
forall x. JobInput -> Rep JobInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobInput x -> JobInput
$cfrom :: forall x. JobInput -> Rep JobInput x
Prelude.Generic)
newJobInput ::
JobInput
newJobInput :: JobInput
newJobInput =
JobInput'
{ $sel:aspectRatio:JobInput' :: Maybe Text
aspectRatio = forall a. Maybe a
Prelude.Nothing,
$sel:container:JobInput' :: Maybe Text
container = forall a. Maybe a
Prelude.Nothing,
$sel:detectedProperties:JobInput' :: Maybe DetectedProperties
detectedProperties = forall a. Maybe a
Prelude.Nothing,
$sel:encryption:JobInput' :: Maybe Encryption
encryption = forall a. Maybe a
Prelude.Nothing,
$sel:frameRate:JobInput' :: Maybe Text
frameRate = forall a. Maybe a
Prelude.Nothing,
$sel:inputCaptions:JobInput' :: Maybe InputCaptions
inputCaptions = forall a. Maybe a
Prelude.Nothing,
$sel:interlaced:JobInput' :: Maybe Text
interlaced = forall a. Maybe a
Prelude.Nothing,
$sel:key:JobInput' :: Maybe Text
key = forall a. Maybe a
Prelude.Nothing,
$sel:resolution:JobInput' :: Maybe Text
resolution = forall a. Maybe a
Prelude.Nothing,
$sel:timeSpan:JobInput' :: Maybe TimeSpan
timeSpan = forall a. Maybe a
Prelude.Nothing
}
jobInput_aspectRatio :: Lens.Lens' JobInput (Prelude.Maybe Prelude.Text)
jobInput_aspectRatio :: Lens' JobInput (Maybe Text)
jobInput_aspectRatio = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe Text
aspectRatio :: Maybe Text
$sel:aspectRatio:JobInput' :: JobInput -> Maybe Text
aspectRatio} -> Maybe Text
aspectRatio) (\s :: JobInput
s@JobInput' {} Maybe Text
a -> JobInput
s {$sel:aspectRatio:JobInput' :: Maybe Text
aspectRatio = Maybe Text
a} :: JobInput)
jobInput_container :: Lens.Lens' JobInput (Prelude.Maybe Prelude.Text)
jobInput_container :: Lens' JobInput (Maybe Text)
jobInput_container = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe Text
container :: Maybe Text
$sel:container:JobInput' :: JobInput -> Maybe Text
container} -> Maybe Text
container) (\s :: JobInput
s@JobInput' {} Maybe Text
a -> JobInput
s {$sel:container:JobInput' :: Maybe Text
container = Maybe Text
a} :: JobInput)
jobInput_detectedProperties :: Lens.Lens' JobInput (Prelude.Maybe DetectedProperties)
jobInput_detectedProperties :: Lens' JobInput (Maybe DetectedProperties)
jobInput_detectedProperties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe DetectedProperties
detectedProperties :: Maybe DetectedProperties
$sel:detectedProperties:JobInput' :: JobInput -> Maybe DetectedProperties
detectedProperties} -> Maybe DetectedProperties
detectedProperties) (\s :: JobInput
s@JobInput' {} Maybe DetectedProperties
a -> JobInput
s {$sel:detectedProperties:JobInput' :: Maybe DetectedProperties
detectedProperties = Maybe DetectedProperties
a} :: JobInput)
jobInput_encryption :: Lens.Lens' JobInput (Prelude.Maybe Encryption)
jobInput_encryption :: Lens' JobInput (Maybe Encryption)
jobInput_encryption = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe Encryption
encryption :: Maybe Encryption
$sel:encryption:JobInput' :: JobInput -> Maybe Encryption
encryption} -> Maybe Encryption
encryption) (\s :: JobInput
s@JobInput' {} Maybe Encryption
a -> JobInput
s {$sel:encryption:JobInput' :: Maybe Encryption
encryption = Maybe Encryption
a} :: JobInput)
jobInput_frameRate :: Lens.Lens' JobInput (Prelude.Maybe Prelude.Text)
jobInput_frameRate :: Lens' JobInput (Maybe Text)
jobInput_frameRate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe Text
frameRate :: Maybe Text
$sel:frameRate:JobInput' :: JobInput -> Maybe Text
frameRate} -> Maybe Text
frameRate) (\s :: JobInput
s@JobInput' {} Maybe Text
a -> JobInput
s {$sel:frameRate:JobInput' :: Maybe Text
frameRate = Maybe Text
a} :: JobInput)
jobInput_inputCaptions :: Lens.Lens' JobInput (Prelude.Maybe InputCaptions)
jobInput_inputCaptions :: Lens' JobInput (Maybe InputCaptions)
jobInput_inputCaptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe InputCaptions
inputCaptions :: Maybe InputCaptions
$sel:inputCaptions:JobInput' :: JobInput -> Maybe InputCaptions
inputCaptions} -> Maybe InputCaptions
inputCaptions) (\s :: JobInput
s@JobInput' {} Maybe InputCaptions
a -> JobInput
s {$sel:inputCaptions:JobInput' :: Maybe InputCaptions
inputCaptions = Maybe InputCaptions
a} :: JobInput)
jobInput_interlaced :: Lens.Lens' JobInput (Prelude.Maybe Prelude.Text)
jobInput_interlaced :: Lens' JobInput (Maybe Text)
jobInput_interlaced = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe Text
interlaced :: Maybe Text
$sel:interlaced:JobInput' :: JobInput -> Maybe Text
interlaced} -> Maybe Text
interlaced) (\s :: JobInput
s@JobInput' {} Maybe Text
a -> JobInput
s {$sel:interlaced:JobInput' :: Maybe Text
interlaced = Maybe Text
a} :: JobInput)
jobInput_key :: Lens.Lens' JobInput (Prelude.Maybe Prelude.Text)
jobInput_key :: Lens' JobInput (Maybe Text)
jobInput_key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe Text
key :: Maybe Text
$sel:key:JobInput' :: JobInput -> Maybe Text
key} -> Maybe Text
key) (\s :: JobInput
s@JobInput' {} Maybe Text
a -> JobInput
s {$sel:key:JobInput' :: Maybe Text
key = Maybe Text
a} :: JobInput)
jobInput_resolution :: Lens.Lens' JobInput (Prelude.Maybe Prelude.Text)
jobInput_resolution :: Lens' JobInput (Maybe Text)
jobInput_resolution = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe Text
resolution :: Maybe Text
$sel:resolution:JobInput' :: JobInput -> Maybe Text
resolution} -> Maybe Text
resolution) (\s :: JobInput
s@JobInput' {} Maybe Text
a -> JobInput
s {$sel:resolution:JobInput' :: Maybe Text
resolution = Maybe Text
a} :: JobInput)
jobInput_timeSpan :: Lens.Lens' JobInput (Prelude.Maybe TimeSpan)
jobInput_timeSpan :: Lens' JobInput (Maybe TimeSpan)
jobInput_timeSpan = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe TimeSpan
timeSpan :: Maybe TimeSpan
$sel:timeSpan:JobInput' :: JobInput -> Maybe TimeSpan
timeSpan} -> Maybe TimeSpan
timeSpan) (\s :: JobInput
s@JobInput' {} Maybe TimeSpan
a -> JobInput
s {$sel:timeSpan:JobInput' :: Maybe TimeSpan
timeSpan = Maybe TimeSpan
a} :: JobInput)
instance Data.FromJSON JobInput where
parseJSON :: Value -> Parser JobInput
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"JobInput"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe DetectedProperties
-> Maybe Encryption
-> Maybe Text
-> Maybe InputCaptions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe TimeSpan
-> JobInput
JobInput'
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
"AspectRatio")
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
"Container")
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
"DetectedProperties")
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
"Encryption")
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
"FrameRate")
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
"InputCaptions")
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
"Interlaced")
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
"Key")
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
"Resolution")
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
"TimeSpan")
)
instance Prelude.Hashable JobInput where
hashWithSalt :: Int -> JobInput -> Int
hashWithSalt Int
_salt JobInput' {Maybe Text
Maybe DetectedProperties
Maybe Encryption
Maybe InputCaptions
Maybe TimeSpan
timeSpan :: Maybe TimeSpan
resolution :: Maybe Text
key :: Maybe Text
interlaced :: Maybe Text
inputCaptions :: Maybe InputCaptions
frameRate :: Maybe Text
encryption :: Maybe Encryption
detectedProperties :: Maybe DetectedProperties
container :: Maybe Text
aspectRatio :: Maybe Text
$sel:timeSpan:JobInput' :: JobInput -> Maybe TimeSpan
$sel:resolution:JobInput' :: JobInput -> Maybe Text
$sel:key:JobInput' :: JobInput -> Maybe Text
$sel:interlaced:JobInput' :: JobInput -> Maybe Text
$sel:inputCaptions:JobInput' :: JobInput -> Maybe InputCaptions
$sel:frameRate:JobInput' :: JobInput -> Maybe Text
$sel:encryption:JobInput' :: JobInput -> Maybe Encryption
$sel:detectedProperties:JobInput' :: JobInput -> Maybe DetectedProperties
$sel:container:JobInput' :: JobInput -> Maybe Text
$sel:aspectRatio:JobInput' :: JobInput -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
aspectRatio
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
container
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DetectedProperties
detectedProperties
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Encryption
encryption
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
frameRate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InputCaptions
inputCaptions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
interlaced
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
key
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resolution
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TimeSpan
timeSpan
instance Prelude.NFData JobInput where
rnf :: JobInput -> ()
rnf JobInput' {Maybe Text
Maybe DetectedProperties
Maybe Encryption
Maybe InputCaptions
Maybe TimeSpan
timeSpan :: Maybe TimeSpan
resolution :: Maybe Text
key :: Maybe Text
interlaced :: Maybe Text
inputCaptions :: Maybe InputCaptions
frameRate :: Maybe Text
encryption :: Maybe Encryption
detectedProperties :: Maybe DetectedProperties
container :: Maybe Text
aspectRatio :: Maybe Text
$sel:timeSpan:JobInput' :: JobInput -> Maybe TimeSpan
$sel:resolution:JobInput' :: JobInput -> Maybe Text
$sel:key:JobInput' :: JobInput -> Maybe Text
$sel:interlaced:JobInput' :: JobInput -> Maybe Text
$sel:inputCaptions:JobInput' :: JobInput -> Maybe InputCaptions
$sel:frameRate:JobInput' :: JobInput -> Maybe Text
$sel:encryption:JobInput' :: JobInput -> Maybe Encryption
$sel:detectedProperties:JobInput' :: JobInput -> Maybe DetectedProperties
$sel:container:JobInput' :: JobInput -> Maybe Text
$sel:aspectRatio:JobInput' :: JobInput -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
aspectRatio
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
container
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DetectedProperties
detectedProperties
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Encryption
encryption
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
frameRate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InputCaptions
inputCaptions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
interlaced
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
key
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resolution
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TimeSpan
timeSpan
instance Data.ToJSON JobInput where
toJSON :: JobInput -> Value
toJSON JobInput' {Maybe Text
Maybe DetectedProperties
Maybe Encryption
Maybe InputCaptions
Maybe TimeSpan
timeSpan :: Maybe TimeSpan
resolution :: Maybe Text
key :: Maybe Text
interlaced :: Maybe Text
inputCaptions :: Maybe InputCaptions
frameRate :: Maybe Text
encryption :: Maybe Encryption
detectedProperties :: Maybe DetectedProperties
container :: Maybe Text
aspectRatio :: Maybe Text
$sel:timeSpan:JobInput' :: JobInput -> Maybe TimeSpan
$sel:resolution:JobInput' :: JobInput -> Maybe Text
$sel:key:JobInput' :: JobInput -> Maybe Text
$sel:interlaced:JobInput' :: JobInput -> Maybe Text
$sel:inputCaptions:JobInput' :: JobInput -> Maybe InputCaptions
$sel:frameRate:JobInput' :: JobInput -> Maybe Text
$sel:encryption:JobInput' :: JobInput -> Maybe Encryption
$sel:detectedProperties:JobInput' :: JobInput -> Maybe DetectedProperties
$sel:container:JobInput' :: JobInput -> Maybe Text
$sel:aspectRatio:JobInput' :: JobInput -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"AspectRatio" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
aspectRatio,
(Key
"Container" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
container,
(Key
"DetectedProperties" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DetectedProperties
detectedProperties,
(Key
"Encryption" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Encryption
encryption,
(Key
"FrameRate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
frameRate,
(Key
"InputCaptions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InputCaptions
inputCaptions,
(Key
"Interlaced" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
interlaced,
(Key
"Key" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
key,
(Key
"Resolution" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
resolution,
(Key
"TimeSpan" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimeSpan
timeSpan
]
)