{-# 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.MxfSettings 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.MxfAfdSignaling
import Amazonka.MediaConvert.Types.MxfProfile
import Amazonka.MediaConvert.Types.MxfXavcProfileSettings
import qualified Amazonka.Prelude as Prelude
data MxfSettings = MxfSettings'
{
MxfSettings -> Maybe MxfAfdSignaling
afdSignaling :: Prelude.Maybe MxfAfdSignaling,
MxfSettings -> Maybe MxfProfile
profile :: Prelude.Maybe MxfProfile,
MxfSettings -> Maybe MxfXavcProfileSettings
xavcProfileSettings :: Prelude.Maybe MxfXavcProfileSettings
}
deriving (MxfSettings -> MxfSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MxfSettings -> MxfSettings -> Bool
$c/= :: MxfSettings -> MxfSettings -> Bool
== :: MxfSettings -> MxfSettings -> Bool
$c== :: MxfSettings -> MxfSettings -> Bool
Prelude.Eq, ReadPrec [MxfSettings]
ReadPrec MxfSettings
Int -> ReadS MxfSettings
ReadS [MxfSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MxfSettings]
$creadListPrec :: ReadPrec [MxfSettings]
readPrec :: ReadPrec MxfSettings
$creadPrec :: ReadPrec MxfSettings
readList :: ReadS [MxfSettings]
$creadList :: ReadS [MxfSettings]
readsPrec :: Int -> ReadS MxfSettings
$creadsPrec :: Int -> ReadS MxfSettings
Prelude.Read, Int -> MxfSettings -> ShowS
[MxfSettings] -> ShowS
MxfSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MxfSettings] -> ShowS
$cshowList :: [MxfSettings] -> ShowS
show :: MxfSettings -> String
$cshow :: MxfSettings -> String
showsPrec :: Int -> MxfSettings -> ShowS
$cshowsPrec :: Int -> MxfSettings -> ShowS
Prelude.Show, forall x. Rep MxfSettings x -> MxfSettings
forall x. MxfSettings -> Rep MxfSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MxfSettings x -> MxfSettings
$cfrom :: forall x. MxfSettings -> Rep MxfSettings x
Prelude.Generic)
newMxfSettings ::
MxfSettings
newMxfSettings :: MxfSettings
newMxfSettings =
MxfSettings'
{ $sel:afdSignaling:MxfSettings' :: Maybe MxfAfdSignaling
afdSignaling = forall a. Maybe a
Prelude.Nothing,
$sel:profile:MxfSettings' :: Maybe MxfProfile
profile = forall a. Maybe a
Prelude.Nothing,
$sel:xavcProfileSettings:MxfSettings' :: Maybe MxfXavcProfileSettings
xavcProfileSettings = forall a. Maybe a
Prelude.Nothing
}
mxfSettings_afdSignaling :: Lens.Lens' MxfSettings (Prelude.Maybe MxfAfdSignaling)
mxfSettings_afdSignaling :: Lens' MxfSettings (Maybe MxfAfdSignaling)
mxfSettings_afdSignaling = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MxfSettings' {Maybe MxfAfdSignaling
afdSignaling :: Maybe MxfAfdSignaling
$sel:afdSignaling:MxfSettings' :: MxfSettings -> Maybe MxfAfdSignaling
afdSignaling} -> Maybe MxfAfdSignaling
afdSignaling) (\s :: MxfSettings
s@MxfSettings' {} Maybe MxfAfdSignaling
a -> MxfSettings
s {$sel:afdSignaling:MxfSettings' :: Maybe MxfAfdSignaling
afdSignaling = Maybe MxfAfdSignaling
a} :: MxfSettings)
mxfSettings_profile :: Lens.Lens' MxfSettings (Prelude.Maybe MxfProfile)
mxfSettings_profile :: Lens' MxfSettings (Maybe MxfProfile)
mxfSettings_profile = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MxfSettings' {Maybe MxfProfile
profile :: Maybe MxfProfile
$sel:profile:MxfSettings' :: MxfSettings -> Maybe MxfProfile
profile} -> Maybe MxfProfile
profile) (\s :: MxfSettings
s@MxfSettings' {} Maybe MxfProfile
a -> MxfSettings
s {$sel:profile:MxfSettings' :: Maybe MxfProfile
profile = Maybe MxfProfile
a} :: MxfSettings)
mxfSettings_xavcProfileSettings :: Lens.Lens' MxfSettings (Prelude.Maybe MxfXavcProfileSettings)
mxfSettings_xavcProfileSettings :: Lens' MxfSettings (Maybe MxfXavcProfileSettings)
mxfSettings_xavcProfileSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MxfSettings' {Maybe MxfXavcProfileSettings
xavcProfileSettings :: Maybe MxfXavcProfileSettings
$sel:xavcProfileSettings:MxfSettings' :: MxfSettings -> Maybe MxfXavcProfileSettings
xavcProfileSettings} -> Maybe MxfXavcProfileSettings
xavcProfileSettings) (\s :: MxfSettings
s@MxfSettings' {} Maybe MxfXavcProfileSettings
a -> MxfSettings
s {$sel:xavcProfileSettings:MxfSettings' :: Maybe MxfXavcProfileSettings
xavcProfileSettings = Maybe MxfXavcProfileSettings
a} :: MxfSettings)
instance Data.FromJSON MxfSettings where
parseJSON :: Value -> Parser MxfSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MxfSettings"
( \Object
x ->
Maybe MxfAfdSignaling
-> Maybe MxfProfile -> Maybe MxfXavcProfileSettings -> MxfSettings
MxfSettings'
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
"afdSignaling")
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
"profile")
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
"xavcProfileSettings")
)
instance Prelude.Hashable MxfSettings where
hashWithSalt :: Int -> MxfSettings -> Int
hashWithSalt Int
_salt MxfSettings' {Maybe MxfAfdSignaling
Maybe MxfProfile
Maybe MxfXavcProfileSettings
xavcProfileSettings :: Maybe MxfXavcProfileSettings
profile :: Maybe MxfProfile
afdSignaling :: Maybe MxfAfdSignaling
$sel:xavcProfileSettings:MxfSettings' :: MxfSettings -> Maybe MxfXavcProfileSettings
$sel:profile:MxfSettings' :: MxfSettings -> Maybe MxfProfile
$sel:afdSignaling:MxfSettings' :: MxfSettings -> Maybe MxfAfdSignaling
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MxfAfdSignaling
afdSignaling
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MxfProfile
profile
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MxfXavcProfileSettings
xavcProfileSettings
instance Prelude.NFData MxfSettings where
rnf :: MxfSettings -> ()
rnf MxfSettings' {Maybe MxfAfdSignaling
Maybe MxfProfile
Maybe MxfXavcProfileSettings
xavcProfileSettings :: Maybe MxfXavcProfileSettings
profile :: Maybe MxfProfile
afdSignaling :: Maybe MxfAfdSignaling
$sel:xavcProfileSettings:MxfSettings' :: MxfSettings -> Maybe MxfXavcProfileSettings
$sel:profile:MxfSettings' :: MxfSettings -> Maybe MxfProfile
$sel:afdSignaling:MxfSettings' :: MxfSettings -> Maybe MxfAfdSignaling
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe MxfAfdSignaling
afdSignaling
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MxfProfile
profile
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MxfXavcProfileSettings
xavcProfileSettings
instance Data.ToJSON MxfSettings where
toJSON :: MxfSettings -> Value
toJSON MxfSettings' {Maybe MxfAfdSignaling
Maybe MxfProfile
Maybe MxfXavcProfileSettings
xavcProfileSettings :: Maybe MxfXavcProfileSettings
profile :: Maybe MxfProfile
afdSignaling :: Maybe MxfAfdSignaling
$sel:xavcProfileSettings:MxfSettings' :: MxfSettings -> Maybe MxfXavcProfileSettings
$sel:profile:MxfSettings' :: MxfSettings -> Maybe MxfProfile
$sel:afdSignaling:MxfSettings' :: MxfSettings -> Maybe MxfAfdSignaling
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"afdSignaling" 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 MxfAfdSignaling
afdSignaling,
(Key
"profile" 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 MxfProfile
profile,
(Key
"xavcProfileSettings" 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 MxfXavcProfileSettings
xavcProfileSettings
]
)