{-# 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.Lens as Lens
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 MxfXavcProfileSettings
xavcProfileSettings :: Prelude.Maybe MxfXavcProfileSettings,
MxfSettings -> Maybe MxfAfdSignaling
afdSignaling :: Prelude.Maybe MxfAfdSignaling,
MxfSettings -> Maybe MxfProfile
profile :: Prelude.Maybe MxfProfile
}
deriving (MxfSettings -> MxfSettings -> Bool
(MxfSettings -> MxfSettings -> Bool)
-> (MxfSettings -> MxfSettings -> Bool) -> Eq MxfSettings
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]
(Int -> ReadS MxfSettings)
-> ReadS [MxfSettings]
-> ReadPrec MxfSettings
-> ReadPrec [MxfSettings]
-> Read 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
(Int -> MxfSettings -> ShowS)
-> (MxfSettings -> String)
-> ([MxfSettings] -> ShowS)
-> Show MxfSettings
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. MxfSettings -> Rep MxfSettings x)
-> (forall x. Rep MxfSettings x -> MxfSettings)
-> Generic MxfSettings
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' :: Maybe MxfXavcProfileSettings
-> Maybe MxfAfdSignaling -> Maybe MxfProfile -> MxfSettings
MxfSettings'
{ $sel:xavcProfileSettings:MxfSettings' :: Maybe MxfXavcProfileSettings
xavcProfileSettings = Maybe MxfXavcProfileSettings
forall a. Maybe a
Prelude.Nothing,
$sel:afdSignaling:MxfSettings' :: Maybe MxfAfdSignaling
afdSignaling = Maybe MxfAfdSignaling
forall a. Maybe a
Prelude.Nothing,
$sel:profile:MxfSettings' :: Maybe MxfProfile
profile = Maybe MxfProfile
forall a. Maybe a
Prelude.Nothing
}
mxfSettings_xavcProfileSettings :: Lens.Lens' MxfSettings (Prelude.Maybe MxfXavcProfileSettings)
mxfSettings_xavcProfileSettings :: (Maybe MxfXavcProfileSettings -> f (Maybe MxfXavcProfileSettings))
-> MxfSettings -> f MxfSettings
mxfSettings_xavcProfileSettings = (MxfSettings -> Maybe MxfXavcProfileSettings)
-> (MxfSettings -> Maybe MxfXavcProfileSettings -> MxfSettings)
-> Lens
MxfSettings
MxfSettings
(Maybe MxfXavcProfileSettings)
(Maybe MxfXavcProfileSettings)
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)
mxfSettings_afdSignaling :: Lens.Lens' MxfSettings (Prelude.Maybe MxfAfdSignaling)
mxfSettings_afdSignaling :: (Maybe MxfAfdSignaling -> f (Maybe MxfAfdSignaling))
-> MxfSettings -> f MxfSettings
mxfSettings_afdSignaling = (MxfSettings -> Maybe MxfAfdSignaling)
-> (MxfSettings -> Maybe MxfAfdSignaling -> MxfSettings)
-> Lens
MxfSettings
MxfSettings
(Maybe MxfAfdSignaling)
(Maybe MxfAfdSignaling)
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 :: (Maybe MxfProfile -> f (Maybe MxfProfile))
-> MxfSettings -> f MxfSettings
mxfSettings_profile = (MxfSettings -> Maybe MxfProfile)
-> (MxfSettings -> Maybe MxfProfile -> MxfSettings)
-> Lens
MxfSettings MxfSettings (Maybe MxfProfile) (Maybe MxfProfile)
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)
instance Core.FromJSON MxfSettings where
parseJSON :: Value -> Parser MxfSettings
parseJSON =
String
-> (Object -> Parser MxfSettings) -> Value -> Parser MxfSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MxfSettings"
( \Object
x ->
Maybe MxfXavcProfileSettings
-> Maybe MxfAfdSignaling -> Maybe MxfProfile -> MxfSettings
MxfSettings'
(Maybe MxfXavcProfileSettings
-> Maybe MxfAfdSignaling -> Maybe MxfProfile -> MxfSettings)
-> Parser (Maybe MxfXavcProfileSettings)
-> Parser
(Maybe MxfAfdSignaling -> Maybe MxfProfile -> MxfSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe MxfXavcProfileSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"xavcProfileSettings")
Parser (Maybe MxfAfdSignaling -> Maybe MxfProfile -> MxfSettings)
-> Parser (Maybe MxfAfdSignaling)
-> Parser (Maybe MxfProfile -> MxfSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MxfAfdSignaling)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"afdSignaling")
Parser (Maybe MxfProfile -> MxfSettings)
-> Parser (Maybe MxfProfile) -> Parser MxfSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MxfProfile)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"profile")
)
instance Prelude.Hashable MxfSettings
instance Prelude.NFData MxfSettings
instance Core.ToJSON MxfSettings where
toJSON :: MxfSettings -> Value
toJSON MxfSettings' {Maybe MxfAfdSignaling
Maybe MxfProfile
Maybe MxfXavcProfileSettings
profile :: Maybe MxfProfile
afdSignaling :: Maybe MxfAfdSignaling
xavcProfileSettings :: Maybe MxfXavcProfileSettings
$sel:profile:MxfSettings' :: MxfSettings -> Maybe MxfProfile
$sel:afdSignaling:MxfSettings' :: MxfSettings -> Maybe MxfAfdSignaling
$sel:xavcProfileSettings:MxfSettings' :: MxfSettings -> Maybe MxfXavcProfileSettings
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"xavcProfileSettings" Text -> MxfXavcProfileSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(MxfXavcProfileSettings -> Pair)
-> Maybe MxfXavcProfileSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MxfXavcProfileSettings
xavcProfileSettings,
(Text
"afdSignaling" Text -> MxfAfdSignaling -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MxfAfdSignaling -> Pair) -> Maybe MxfAfdSignaling -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MxfAfdSignaling
afdSignaling,
(Text
"profile" Text -> MxfProfile -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MxfProfile -> Pair) -> Maybe MxfProfile -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MxfProfile
profile
]
)