{-# 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.MediaConvert.Types.MovSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.MovClapAtom
import Amazonka.MediaConvert.Types.MovCslgAtom
import Amazonka.MediaConvert.Types.MovMpeg2FourCCControl
import Amazonka.MediaConvert.Types.MovPaddingControl
import Amazonka.MediaConvert.Types.MovReference
import qualified Amazonka.Prelude as Prelude
data MovSettings = MovSettings'
{
MovSettings -> Maybe MovReference
reference :: Prelude.Maybe MovReference,
MovSettings -> Maybe MovCslgAtom
cslgAtom :: Prelude.Maybe MovCslgAtom,
MovSettings -> Maybe MovMpeg2FourCCControl
mpeg2FourCCControl :: Prelude.Maybe MovMpeg2FourCCControl,
MovSettings -> Maybe MovPaddingControl
paddingControl :: Prelude.Maybe MovPaddingControl,
MovSettings -> Maybe MovClapAtom
clapAtom :: Prelude.Maybe MovClapAtom
}
deriving (MovSettings -> MovSettings -> Bool
(MovSettings -> MovSettings -> Bool)
-> (MovSettings -> MovSettings -> Bool) -> Eq MovSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MovSettings -> MovSettings -> Bool
$c/= :: MovSettings -> MovSettings -> Bool
== :: MovSettings -> MovSettings -> Bool
$c== :: MovSettings -> MovSettings -> Bool
Prelude.Eq, ReadPrec [MovSettings]
ReadPrec MovSettings
Int -> ReadS MovSettings
ReadS [MovSettings]
(Int -> ReadS MovSettings)
-> ReadS [MovSettings]
-> ReadPrec MovSettings
-> ReadPrec [MovSettings]
-> Read MovSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MovSettings]
$creadListPrec :: ReadPrec [MovSettings]
readPrec :: ReadPrec MovSettings
$creadPrec :: ReadPrec MovSettings
readList :: ReadS [MovSettings]
$creadList :: ReadS [MovSettings]
readsPrec :: Int -> ReadS MovSettings
$creadsPrec :: Int -> ReadS MovSettings
Prelude.Read, Int -> MovSettings -> ShowS
[MovSettings] -> ShowS
MovSettings -> String
(Int -> MovSettings -> ShowS)
-> (MovSettings -> String)
-> ([MovSettings] -> ShowS)
-> Show MovSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MovSettings] -> ShowS
$cshowList :: [MovSettings] -> ShowS
show :: MovSettings -> String
$cshow :: MovSettings -> String
showsPrec :: Int -> MovSettings -> ShowS
$cshowsPrec :: Int -> MovSettings -> ShowS
Prelude.Show, (forall x. MovSettings -> Rep MovSettings x)
-> (forall x. Rep MovSettings x -> MovSettings)
-> Generic MovSettings
forall x. Rep MovSettings x -> MovSettings
forall x. MovSettings -> Rep MovSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MovSettings x -> MovSettings
$cfrom :: forall x. MovSettings -> Rep MovSettings x
Prelude.Generic)
newMovSettings ::
MovSettings
newMovSettings :: MovSettings
newMovSettings =
MovSettings' :: Maybe MovReference
-> Maybe MovCslgAtom
-> Maybe MovMpeg2FourCCControl
-> Maybe MovPaddingControl
-> Maybe MovClapAtom
-> MovSettings
MovSettings'
{ $sel:reference:MovSettings' :: Maybe MovReference
reference = Maybe MovReference
forall a. Maybe a
Prelude.Nothing,
$sel:cslgAtom:MovSettings' :: Maybe MovCslgAtom
cslgAtom = Maybe MovCslgAtom
forall a. Maybe a
Prelude.Nothing,
$sel:mpeg2FourCCControl:MovSettings' :: Maybe MovMpeg2FourCCControl
mpeg2FourCCControl = Maybe MovMpeg2FourCCControl
forall a. Maybe a
Prelude.Nothing,
$sel:paddingControl:MovSettings' :: Maybe MovPaddingControl
paddingControl = Maybe MovPaddingControl
forall a. Maybe a
Prelude.Nothing,
$sel:clapAtom:MovSettings' :: Maybe MovClapAtom
clapAtom = Maybe MovClapAtom
forall a. Maybe a
Prelude.Nothing
}
movSettings_reference :: Lens.Lens' MovSettings (Prelude.Maybe MovReference)
movSettings_reference :: (Maybe MovReference -> f (Maybe MovReference))
-> MovSettings -> f MovSettings
movSettings_reference = (MovSettings -> Maybe MovReference)
-> (MovSettings -> Maybe MovReference -> MovSettings)
-> Lens
MovSettings MovSettings (Maybe MovReference) (Maybe MovReference)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MovSettings' {Maybe MovReference
reference :: Maybe MovReference
$sel:reference:MovSettings' :: MovSettings -> Maybe MovReference
reference} -> Maybe MovReference
reference) (\s :: MovSettings
s@MovSettings' {} Maybe MovReference
a -> MovSettings
s {$sel:reference:MovSettings' :: Maybe MovReference
reference = Maybe MovReference
a} :: MovSettings)
movSettings_cslgAtom :: Lens.Lens' MovSettings (Prelude.Maybe MovCslgAtom)
movSettings_cslgAtom :: (Maybe MovCslgAtom -> f (Maybe MovCslgAtom))
-> MovSettings -> f MovSettings
movSettings_cslgAtom = (MovSettings -> Maybe MovCslgAtom)
-> (MovSettings -> Maybe MovCslgAtom -> MovSettings)
-> Lens
MovSettings MovSettings (Maybe MovCslgAtom) (Maybe MovCslgAtom)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MovSettings' {Maybe MovCslgAtom
cslgAtom :: Maybe MovCslgAtom
$sel:cslgAtom:MovSettings' :: MovSettings -> Maybe MovCslgAtom
cslgAtom} -> Maybe MovCslgAtom
cslgAtom) (\s :: MovSettings
s@MovSettings' {} Maybe MovCslgAtom
a -> MovSettings
s {$sel:cslgAtom:MovSettings' :: Maybe MovCslgAtom
cslgAtom = Maybe MovCslgAtom
a} :: MovSettings)
movSettings_mpeg2FourCCControl :: Lens.Lens' MovSettings (Prelude.Maybe MovMpeg2FourCCControl)
movSettings_mpeg2FourCCControl :: (Maybe MovMpeg2FourCCControl -> f (Maybe MovMpeg2FourCCControl))
-> MovSettings -> f MovSettings
movSettings_mpeg2FourCCControl = (MovSettings -> Maybe MovMpeg2FourCCControl)
-> (MovSettings -> Maybe MovMpeg2FourCCControl -> MovSettings)
-> Lens
MovSettings
MovSettings
(Maybe MovMpeg2FourCCControl)
(Maybe MovMpeg2FourCCControl)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MovSettings' {Maybe MovMpeg2FourCCControl
mpeg2FourCCControl :: Maybe MovMpeg2FourCCControl
$sel:mpeg2FourCCControl:MovSettings' :: MovSettings -> Maybe MovMpeg2FourCCControl
mpeg2FourCCControl} -> Maybe MovMpeg2FourCCControl
mpeg2FourCCControl) (\s :: MovSettings
s@MovSettings' {} Maybe MovMpeg2FourCCControl
a -> MovSettings
s {$sel:mpeg2FourCCControl:MovSettings' :: Maybe MovMpeg2FourCCControl
mpeg2FourCCControl = Maybe MovMpeg2FourCCControl
a} :: MovSettings)
movSettings_paddingControl :: Lens.Lens' MovSettings (Prelude.Maybe MovPaddingControl)
movSettings_paddingControl :: (Maybe MovPaddingControl -> f (Maybe MovPaddingControl))
-> MovSettings -> f MovSettings
movSettings_paddingControl = (MovSettings -> Maybe MovPaddingControl)
-> (MovSettings -> Maybe MovPaddingControl -> MovSettings)
-> Lens
MovSettings
MovSettings
(Maybe MovPaddingControl)
(Maybe MovPaddingControl)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MovSettings' {Maybe MovPaddingControl
paddingControl :: Maybe MovPaddingControl
$sel:paddingControl:MovSettings' :: MovSettings -> Maybe MovPaddingControl
paddingControl} -> Maybe MovPaddingControl
paddingControl) (\s :: MovSettings
s@MovSettings' {} Maybe MovPaddingControl
a -> MovSettings
s {$sel:paddingControl:MovSettings' :: Maybe MovPaddingControl
paddingControl = Maybe MovPaddingControl
a} :: MovSettings)
movSettings_clapAtom :: Lens.Lens' MovSettings (Prelude.Maybe MovClapAtom)
movSettings_clapAtom :: (Maybe MovClapAtom -> f (Maybe MovClapAtom))
-> MovSettings -> f MovSettings
movSettings_clapAtom = (MovSettings -> Maybe MovClapAtom)
-> (MovSettings -> Maybe MovClapAtom -> MovSettings)
-> Lens
MovSettings MovSettings (Maybe MovClapAtom) (Maybe MovClapAtom)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MovSettings' {Maybe MovClapAtom
clapAtom :: Maybe MovClapAtom
$sel:clapAtom:MovSettings' :: MovSettings -> Maybe MovClapAtom
clapAtom} -> Maybe MovClapAtom
clapAtom) (\s :: MovSettings
s@MovSettings' {} Maybe MovClapAtom
a -> MovSettings
s {$sel:clapAtom:MovSettings' :: Maybe MovClapAtom
clapAtom = Maybe MovClapAtom
a} :: MovSettings)
instance Core.FromJSON MovSettings where
parseJSON :: Value -> Parser MovSettings
parseJSON =
String
-> (Object -> Parser MovSettings) -> Value -> Parser MovSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MovSettings"
( \Object
x ->
Maybe MovReference
-> Maybe MovCslgAtom
-> Maybe MovMpeg2FourCCControl
-> Maybe MovPaddingControl
-> Maybe MovClapAtom
-> MovSettings
MovSettings'
(Maybe MovReference
-> Maybe MovCslgAtom
-> Maybe MovMpeg2FourCCControl
-> Maybe MovPaddingControl
-> Maybe MovClapAtom
-> MovSettings)
-> Parser (Maybe MovReference)
-> Parser
(Maybe MovCslgAtom
-> Maybe MovMpeg2FourCCControl
-> Maybe MovPaddingControl
-> Maybe MovClapAtom
-> MovSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe MovReference)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"reference")
Parser
(Maybe MovCslgAtom
-> Maybe MovMpeg2FourCCControl
-> Maybe MovPaddingControl
-> Maybe MovClapAtom
-> MovSettings)
-> Parser (Maybe MovCslgAtom)
-> Parser
(Maybe MovMpeg2FourCCControl
-> Maybe MovPaddingControl -> Maybe MovClapAtom -> MovSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MovCslgAtom)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"cslgAtom")
Parser
(Maybe MovMpeg2FourCCControl
-> Maybe MovPaddingControl -> Maybe MovClapAtom -> MovSettings)
-> Parser (Maybe MovMpeg2FourCCControl)
-> Parser
(Maybe MovPaddingControl -> Maybe MovClapAtom -> MovSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MovMpeg2FourCCControl)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"mpeg2FourCCControl")
Parser
(Maybe MovPaddingControl -> Maybe MovClapAtom -> MovSettings)
-> Parser (Maybe MovPaddingControl)
-> Parser (Maybe MovClapAtom -> MovSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MovPaddingControl)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"paddingControl")
Parser (Maybe MovClapAtom -> MovSettings)
-> Parser (Maybe MovClapAtom) -> Parser MovSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MovClapAtom)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"clapAtom")
)
instance Prelude.Hashable MovSettings
instance Prelude.NFData MovSettings
instance Core.ToJSON MovSettings where
toJSON :: MovSettings -> Value
toJSON MovSettings' {Maybe MovClapAtom
Maybe MovCslgAtom
Maybe MovMpeg2FourCCControl
Maybe MovPaddingControl
Maybe MovReference
clapAtom :: Maybe MovClapAtom
paddingControl :: Maybe MovPaddingControl
mpeg2FourCCControl :: Maybe MovMpeg2FourCCControl
cslgAtom :: Maybe MovCslgAtom
reference :: Maybe MovReference
$sel:clapAtom:MovSettings' :: MovSettings -> Maybe MovClapAtom
$sel:paddingControl:MovSettings' :: MovSettings -> Maybe MovPaddingControl
$sel:mpeg2FourCCControl:MovSettings' :: MovSettings -> Maybe MovMpeg2FourCCControl
$sel:cslgAtom:MovSettings' :: MovSettings -> Maybe MovCslgAtom
$sel:reference:MovSettings' :: MovSettings -> Maybe MovReference
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"reference" Text -> MovReference -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MovReference -> Pair) -> Maybe MovReference -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MovReference
reference,
(Text
"cslgAtom" Text -> MovCslgAtom -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MovCslgAtom -> Pair) -> Maybe MovCslgAtom -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MovCslgAtom
cslgAtom,
(Text
"mpeg2FourCCControl" Text -> MovMpeg2FourCCControl -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(MovMpeg2FourCCControl -> Pair)
-> Maybe MovMpeg2FourCCControl -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MovMpeg2FourCCControl
mpeg2FourCCControl,
(Text
"paddingControl" Text -> MovPaddingControl -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(MovPaddingControl -> Pair)
-> Maybe MovPaddingControl -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MovPaddingControl
paddingControl,
(Text
"clapAtom" Text -> MovClapAtom -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MovClapAtom -> Pair) -> Maybe MovClapAtom -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MovClapAtom
clapAtom
]
)