{-# 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.Mp4Settings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConvert.Types.CmfcAudioDuration
import Amazonka.MediaConvert.Types.Mp4CslgAtom
import Amazonka.MediaConvert.Types.Mp4FreeSpaceBox
import Amazonka.MediaConvert.Types.Mp4MoovPlacement
import qualified Amazonka.Prelude as Prelude
data Mp4Settings = Mp4Settings'
{
Mp4Settings -> Maybe CmfcAudioDuration
audioDuration :: Prelude.Maybe CmfcAudioDuration,
Mp4Settings -> Maybe Mp4CslgAtom
cslgAtom :: Prelude.Maybe Mp4CslgAtom,
Mp4Settings -> Maybe Natural
cttsVersion :: Prelude.Maybe Prelude.Natural,
Mp4Settings -> Maybe Mp4FreeSpaceBox
freeSpaceBox :: Prelude.Maybe Mp4FreeSpaceBox,
Mp4Settings -> Maybe Mp4MoovPlacement
moovPlacement :: Prelude.Maybe Mp4MoovPlacement,
Mp4Settings -> Maybe Text
mp4MajorBrand :: Prelude.Maybe Prelude.Text
}
deriving (Mp4Settings -> Mp4Settings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Mp4Settings -> Mp4Settings -> Bool
$c/= :: Mp4Settings -> Mp4Settings -> Bool
== :: Mp4Settings -> Mp4Settings -> Bool
$c== :: Mp4Settings -> Mp4Settings -> Bool
Prelude.Eq, ReadPrec [Mp4Settings]
ReadPrec Mp4Settings
Int -> ReadS Mp4Settings
ReadS [Mp4Settings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Mp4Settings]
$creadListPrec :: ReadPrec [Mp4Settings]
readPrec :: ReadPrec Mp4Settings
$creadPrec :: ReadPrec Mp4Settings
readList :: ReadS [Mp4Settings]
$creadList :: ReadS [Mp4Settings]
readsPrec :: Int -> ReadS Mp4Settings
$creadsPrec :: Int -> ReadS Mp4Settings
Prelude.Read, Int -> Mp4Settings -> ShowS
[Mp4Settings] -> ShowS
Mp4Settings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Mp4Settings] -> ShowS
$cshowList :: [Mp4Settings] -> ShowS
show :: Mp4Settings -> String
$cshow :: Mp4Settings -> String
showsPrec :: Int -> Mp4Settings -> ShowS
$cshowsPrec :: Int -> Mp4Settings -> ShowS
Prelude.Show, forall x. Rep Mp4Settings x -> Mp4Settings
forall x. Mp4Settings -> Rep Mp4Settings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Mp4Settings x -> Mp4Settings
$cfrom :: forall x. Mp4Settings -> Rep Mp4Settings x
Prelude.Generic)
newMp4Settings ::
Mp4Settings
newMp4Settings :: Mp4Settings
newMp4Settings =
Mp4Settings'
{ $sel:audioDuration:Mp4Settings' :: Maybe CmfcAudioDuration
audioDuration = forall a. Maybe a
Prelude.Nothing,
$sel:cslgAtom:Mp4Settings' :: Maybe Mp4CslgAtom
cslgAtom = forall a. Maybe a
Prelude.Nothing,
$sel:cttsVersion:Mp4Settings' :: Maybe Natural
cttsVersion = forall a. Maybe a
Prelude.Nothing,
$sel:freeSpaceBox:Mp4Settings' :: Maybe Mp4FreeSpaceBox
freeSpaceBox = forall a. Maybe a
Prelude.Nothing,
$sel:moovPlacement:Mp4Settings' :: Maybe Mp4MoovPlacement
moovPlacement = forall a. Maybe a
Prelude.Nothing,
$sel:mp4MajorBrand:Mp4Settings' :: Maybe Text
mp4MajorBrand = forall a. Maybe a
Prelude.Nothing
}
mp4Settings_audioDuration :: Lens.Lens' Mp4Settings (Prelude.Maybe CmfcAudioDuration)
mp4Settings_audioDuration :: Lens' Mp4Settings (Maybe CmfcAudioDuration)
mp4Settings_audioDuration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Mp4Settings' {Maybe CmfcAudioDuration
audioDuration :: Maybe CmfcAudioDuration
$sel:audioDuration:Mp4Settings' :: Mp4Settings -> Maybe CmfcAudioDuration
audioDuration} -> Maybe CmfcAudioDuration
audioDuration) (\s :: Mp4Settings
s@Mp4Settings' {} Maybe CmfcAudioDuration
a -> Mp4Settings
s {$sel:audioDuration:Mp4Settings' :: Maybe CmfcAudioDuration
audioDuration = Maybe CmfcAudioDuration
a} :: Mp4Settings)
mp4Settings_cslgAtom :: Lens.Lens' Mp4Settings (Prelude.Maybe Mp4CslgAtom)
mp4Settings_cslgAtom :: Lens' Mp4Settings (Maybe Mp4CslgAtom)
mp4Settings_cslgAtom = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Mp4Settings' {Maybe Mp4CslgAtom
cslgAtom :: Maybe Mp4CslgAtom
$sel:cslgAtom:Mp4Settings' :: Mp4Settings -> Maybe Mp4CslgAtom
cslgAtom} -> Maybe Mp4CslgAtom
cslgAtom) (\s :: Mp4Settings
s@Mp4Settings' {} Maybe Mp4CslgAtom
a -> Mp4Settings
s {$sel:cslgAtom:Mp4Settings' :: Maybe Mp4CslgAtom
cslgAtom = Maybe Mp4CslgAtom
a} :: Mp4Settings)
mp4Settings_cttsVersion :: Lens.Lens' Mp4Settings (Prelude.Maybe Prelude.Natural)
mp4Settings_cttsVersion :: Lens' Mp4Settings (Maybe Natural)
mp4Settings_cttsVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Mp4Settings' {Maybe Natural
cttsVersion :: Maybe Natural
$sel:cttsVersion:Mp4Settings' :: Mp4Settings -> Maybe Natural
cttsVersion} -> Maybe Natural
cttsVersion) (\s :: Mp4Settings
s@Mp4Settings' {} Maybe Natural
a -> Mp4Settings
s {$sel:cttsVersion:Mp4Settings' :: Maybe Natural
cttsVersion = Maybe Natural
a} :: Mp4Settings)
mp4Settings_freeSpaceBox :: Lens.Lens' Mp4Settings (Prelude.Maybe Mp4FreeSpaceBox)
mp4Settings_freeSpaceBox :: Lens' Mp4Settings (Maybe Mp4FreeSpaceBox)
mp4Settings_freeSpaceBox = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Mp4Settings' {Maybe Mp4FreeSpaceBox
freeSpaceBox :: Maybe Mp4FreeSpaceBox
$sel:freeSpaceBox:Mp4Settings' :: Mp4Settings -> Maybe Mp4FreeSpaceBox
freeSpaceBox} -> Maybe Mp4FreeSpaceBox
freeSpaceBox) (\s :: Mp4Settings
s@Mp4Settings' {} Maybe Mp4FreeSpaceBox
a -> Mp4Settings
s {$sel:freeSpaceBox:Mp4Settings' :: Maybe Mp4FreeSpaceBox
freeSpaceBox = Maybe Mp4FreeSpaceBox
a} :: Mp4Settings)
mp4Settings_moovPlacement :: Lens.Lens' Mp4Settings (Prelude.Maybe Mp4MoovPlacement)
mp4Settings_moovPlacement :: Lens' Mp4Settings (Maybe Mp4MoovPlacement)
mp4Settings_moovPlacement = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Mp4Settings' {Maybe Mp4MoovPlacement
moovPlacement :: Maybe Mp4MoovPlacement
$sel:moovPlacement:Mp4Settings' :: Mp4Settings -> Maybe Mp4MoovPlacement
moovPlacement} -> Maybe Mp4MoovPlacement
moovPlacement) (\s :: Mp4Settings
s@Mp4Settings' {} Maybe Mp4MoovPlacement
a -> Mp4Settings
s {$sel:moovPlacement:Mp4Settings' :: Maybe Mp4MoovPlacement
moovPlacement = Maybe Mp4MoovPlacement
a} :: Mp4Settings)
mp4Settings_mp4MajorBrand :: Lens.Lens' Mp4Settings (Prelude.Maybe Prelude.Text)
mp4Settings_mp4MajorBrand :: Lens' Mp4Settings (Maybe Text)
mp4Settings_mp4MajorBrand = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Mp4Settings' {Maybe Text
mp4MajorBrand :: Maybe Text
$sel:mp4MajorBrand:Mp4Settings' :: Mp4Settings -> Maybe Text
mp4MajorBrand} -> Maybe Text
mp4MajorBrand) (\s :: Mp4Settings
s@Mp4Settings' {} Maybe Text
a -> Mp4Settings
s {$sel:mp4MajorBrand:Mp4Settings' :: Maybe Text
mp4MajorBrand = Maybe Text
a} :: Mp4Settings)
instance Data.FromJSON Mp4Settings where
parseJSON :: Value -> Parser Mp4Settings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Mp4Settings"
( \Object
x ->
Maybe CmfcAudioDuration
-> Maybe Mp4CslgAtom
-> Maybe Natural
-> Maybe Mp4FreeSpaceBox
-> Maybe Mp4MoovPlacement
-> Maybe Text
-> Mp4Settings
Mp4Settings'
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
"audioDuration")
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
"cslgAtom")
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
"cttsVersion")
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
"freeSpaceBox")
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
"moovPlacement")
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
"mp4MajorBrand")
)
instance Prelude.Hashable Mp4Settings where
hashWithSalt :: Int -> Mp4Settings -> Int
hashWithSalt Int
_salt Mp4Settings' {Maybe Natural
Maybe Text
Maybe CmfcAudioDuration
Maybe Mp4CslgAtom
Maybe Mp4FreeSpaceBox
Maybe Mp4MoovPlacement
mp4MajorBrand :: Maybe Text
moovPlacement :: Maybe Mp4MoovPlacement
freeSpaceBox :: Maybe Mp4FreeSpaceBox
cttsVersion :: Maybe Natural
cslgAtom :: Maybe Mp4CslgAtom
audioDuration :: Maybe CmfcAudioDuration
$sel:mp4MajorBrand:Mp4Settings' :: Mp4Settings -> Maybe Text
$sel:moovPlacement:Mp4Settings' :: Mp4Settings -> Maybe Mp4MoovPlacement
$sel:freeSpaceBox:Mp4Settings' :: Mp4Settings -> Maybe Mp4FreeSpaceBox
$sel:cttsVersion:Mp4Settings' :: Mp4Settings -> Maybe Natural
$sel:cslgAtom:Mp4Settings' :: Mp4Settings -> Maybe Mp4CslgAtom
$sel:audioDuration:Mp4Settings' :: Mp4Settings -> Maybe CmfcAudioDuration
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CmfcAudioDuration
audioDuration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Mp4CslgAtom
cslgAtom
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
cttsVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Mp4FreeSpaceBox
freeSpaceBox
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Mp4MoovPlacement
moovPlacement
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
mp4MajorBrand
instance Prelude.NFData Mp4Settings where
rnf :: Mp4Settings -> ()
rnf Mp4Settings' {Maybe Natural
Maybe Text
Maybe CmfcAudioDuration
Maybe Mp4CslgAtom
Maybe Mp4FreeSpaceBox
Maybe Mp4MoovPlacement
mp4MajorBrand :: Maybe Text
moovPlacement :: Maybe Mp4MoovPlacement
freeSpaceBox :: Maybe Mp4FreeSpaceBox
cttsVersion :: Maybe Natural
cslgAtom :: Maybe Mp4CslgAtom
audioDuration :: Maybe CmfcAudioDuration
$sel:mp4MajorBrand:Mp4Settings' :: Mp4Settings -> Maybe Text
$sel:moovPlacement:Mp4Settings' :: Mp4Settings -> Maybe Mp4MoovPlacement
$sel:freeSpaceBox:Mp4Settings' :: Mp4Settings -> Maybe Mp4FreeSpaceBox
$sel:cttsVersion:Mp4Settings' :: Mp4Settings -> Maybe Natural
$sel:cslgAtom:Mp4Settings' :: Mp4Settings -> Maybe Mp4CslgAtom
$sel:audioDuration:Mp4Settings' :: Mp4Settings -> Maybe CmfcAudioDuration
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe CmfcAudioDuration
audioDuration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Mp4CslgAtom
cslgAtom
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
cttsVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Mp4FreeSpaceBox
freeSpaceBox
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Mp4MoovPlacement
moovPlacement
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
mp4MajorBrand
instance Data.ToJSON Mp4Settings where
toJSON :: Mp4Settings -> Value
toJSON Mp4Settings' {Maybe Natural
Maybe Text
Maybe CmfcAudioDuration
Maybe Mp4CslgAtom
Maybe Mp4FreeSpaceBox
Maybe Mp4MoovPlacement
mp4MajorBrand :: Maybe Text
moovPlacement :: Maybe Mp4MoovPlacement
freeSpaceBox :: Maybe Mp4FreeSpaceBox
cttsVersion :: Maybe Natural
cslgAtom :: Maybe Mp4CslgAtom
audioDuration :: Maybe CmfcAudioDuration
$sel:mp4MajorBrand:Mp4Settings' :: Mp4Settings -> Maybe Text
$sel:moovPlacement:Mp4Settings' :: Mp4Settings -> Maybe Mp4MoovPlacement
$sel:freeSpaceBox:Mp4Settings' :: Mp4Settings -> Maybe Mp4FreeSpaceBox
$sel:cttsVersion:Mp4Settings' :: Mp4Settings -> Maybe Natural
$sel:cslgAtom:Mp4Settings' :: Mp4Settings -> Maybe Mp4CslgAtom
$sel:audioDuration:Mp4Settings' :: Mp4Settings -> Maybe CmfcAudioDuration
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"audioDuration" 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 CmfcAudioDuration
audioDuration,
(Key
"cslgAtom" 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 Mp4CslgAtom
cslgAtom,
(Key
"cttsVersion" 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 Natural
cttsVersion,
(Key
"freeSpaceBox" 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 Mp4FreeSpaceBox
freeSpaceBox,
(Key
"moovPlacement" 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 Mp4MoovPlacement
moovPlacement,
(Key
"mp4MajorBrand" 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
mp4MajorBrand
]
)