{-# 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.MxfXavcProfileSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.MxfXavcDurationMode
import qualified Amazonka.Prelude as Prelude
data MxfXavcProfileSettings = MxfXavcProfileSettings'
{
MxfXavcProfileSettings -> Maybe Natural
maxAncDataSize :: Prelude.Maybe Prelude.Natural,
MxfXavcProfileSettings -> Maybe MxfXavcDurationMode
durationMode :: Prelude.Maybe MxfXavcDurationMode
}
deriving (MxfXavcProfileSettings -> MxfXavcProfileSettings -> Bool
(MxfXavcProfileSettings -> MxfXavcProfileSettings -> Bool)
-> (MxfXavcProfileSettings -> MxfXavcProfileSettings -> Bool)
-> Eq MxfXavcProfileSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MxfXavcProfileSettings -> MxfXavcProfileSettings -> Bool
$c/= :: MxfXavcProfileSettings -> MxfXavcProfileSettings -> Bool
== :: MxfXavcProfileSettings -> MxfXavcProfileSettings -> Bool
$c== :: MxfXavcProfileSettings -> MxfXavcProfileSettings -> Bool
Prelude.Eq, ReadPrec [MxfXavcProfileSettings]
ReadPrec MxfXavcProfileSettings
Int -> ReadS MxfXavcProfileSettings
ReadS [MxfXavcProfileSettings]
(Int -> ReadS MxfXavcProfileSettings)
-> ReadS [MxfXavcProfileSettings]
-> ReadPrec MxfXavcProfileSettings
-> ReadPrec [MxfXavcProfileSettings]
-> Read MxfXavcProfileSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MxfXavcProfileSettings]
$creadListPrec :: ReadPrec [MxfXavcProfileSettings]
readPrec :: ReadPrec MxfXavcProfileSettings
$creadPrec :: ReadPrec MxfXavcProfileSettings
readList :: ReadS [MxfXavcProfileSettings]
$creadList :: ReadS [MxfXavcProfileSettings]
readsPrec :: Int -> ReadS MxfXavcProfileSettings
$creadsPrec :: Int -> ReadS MxfXavcProfileSettings
Prelude.Read, Int -> MxfXavcProfileSettings -> ShowS
[MxfXavcProfileSettings] -> ShowS
MxfXavcProfileSettings -> String
(Int -> MxfXavcProfileSettings -> ShowS)
-> (MxfXavcProfileSettings -> String)
-> ([MxfXavcProfileSettings] -> ShowS)
-> Show MxfXavcProfileSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MxfXavcProfileSettings] -> ShowS
$cshowList :: [MxfXavcProfileSettings] -> ShowS
show :: MxfXavcProfileSettings -> String
$cshow :: MxfXavcProfileSettings -> String
showsPrec :: Int -> MxfXavcProfileSettings -> ShowS
$cshowsPrec :: Int -> MxfXavcProfileSettings -> ShowS
Prelude.Show, (forall x. MxfXavcProfileSettings -> Rep MxfXavcProfileSettings x)
-> (forall x.
Rep MxfXavcProfileSettings x -> MxfXavcProfileSettings)
-> Generic MxfXavcProfileSettings
forall x. Rep MxfXavcProfileSettings x -> MxfXavcProfileSettings
forall x. MxfXavcProfileSettings -> Rep MxfXavcProfileSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MxfXavcProfileSettings x -> MxfXavcProfileSettings
$cfrom :: forall x. MxfXavcProfileSettings -> Rep MxfXavcProfileSettings x
Prelude.Generic)
newMxfXavcProfileSettings ::
MxfXavcProfileSettings
newMxfXavcProfileSettings :: MxfXavcProfileSettings
newMxfXavcProfileSettings =
MxfXavcProfileSettings' :: Maybe Natural
-> Maybe MxfXavcDurationMode -> MxfXavcProfileSettings
MxfXavcProfileSettings'
{ $sel:maxAncDataSize:MxfXavcProfileSettings' :: Maybe Natural
maxAncDataSize =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:durationMode:MxfXavcProfileSettings' :: Maybe MxfXavcDurationMode
durationMode = Maybe MxfXavcDurationMode
forall a. Maybe a
Prelude.Nothing
}
mxfXavcProfileSettings_maxAncDataSize :: Lens.Lens' MxfXavcProfileSettings (Prelude.Maybe Prelude.Natural)
mxfXavcProfileSettings_maxAncDataSize :: (Maybe Natural -> f (Maybe Natural))
-> MxfXavcProfileSettings -> f MxfXavcProfileSettings
mxfXavcProfileSettings_maxAncDataSize = (MxfXavcProfileSettings -> Maybe Natural)
-> (MxfXavcProfileSettings
-> Maybe Natural -> MxfXavcProfileSettings)
-> Lens
MxfXavcProfileSettings
MxfXavcProfileSettings
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MxfXavcProfileSettings' {Maybe Natural
maxAncDataSize :: Maybe Natural
$sel:maxAncDataSize:MxfXavcProfileSettings' :: MxfXavcProfileSettings -> Maybe Natural
maxAncDataSize} -> Maybe Natural
maxAncDataSize) (\s :: MxfXavcProfileSettings
s@MxfXavcProfileSettings' {} Maybe Natural
a -> MxfXavcProfileSettings
s {$sel:maxAncDataSize:MxfXavcProfileSettings' :: Maybe Natural
maxAncDataSize = Maybe Natural
a} :: MxfXavcProfileSettings)
mxfXavcProfileSettings_durationMode :: Lens.Lens' MxfXavcProfileSettings (Prelude.Maybe MxfXavcDurationMode)
mxfXavcProfileSettings_durationMode :: (Maybe MxfXavcDurationMode -> f (Maybe MxfXavcDurationMode))
-> MxfXavcProfileSettings -> f MxfXavcProfileSettings
mxfXavcProfileSettings_durationMode = (MxfXavcProfileSettings -> Maybe MxfXavcDurationMode)
-> (MxfXavcProfileSettings
-> Maybe MxfXavcDurationMode -> MxfXavcProfileSettings)
-> Lens
MxfXavcProfileSettings
MxfXavcProfileSettings
(Maybe MxfXavcDurationMode)
(Maybe MxfXavcDurationMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MxfXavcProfileSettings' {Maybe MxfXavcDurationMode
durationMode :: Maybe MxfXavcDurationMode
$sel:durationMode:MxfXavcProfileSettings' :: MxfXavcProfileSettings -> Maybe MxfXavcDurationMode
durationMode} -> Maybe MxfXavcDurationMode
durationMode) (\s :: MxfXavcProfileSettings
s@MxfXavcProfileSettings' {} Maybe MxfXavcDurationMode
a -> MxfXavcProfileSettings
s {$sel:durationMode:MxfXavcProfileSettings' :: Maybe MxfXavcDurationMode
durationMode = Maybe MxfXavcDurationMode
a} :: MxfXavcProfileSettings)
instance Core.FromJSON MxfXavcProfileSettings where
parseJSON :: Value -> Parser MxfXavcProfileSettings
parseJSON =
String
-> (Object -> Parser MxfXavcProfileSettings)
-> Value
-> Parser MxfXavcProfileSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MxfXavcProfileSettings"
( \Object
x ->
Maybe Natural
-> Maybe MxfXavcDurationMode -> MxfXavcProfileSettings
MxfXavcProfileSettings'
(Maybe Natural
-> Maybe MxfXavcDurationMode -> MxfXavcProfileSettings)
-> Parser (Maybe Natural)
-> Parser (Maybe MxfXavcDurationMode -> MxfXavcProfileSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"maxAncDataSize")
Parser (Maybe MxfXavcDurationMode -> MxfXavcProfileSettings)
-> Parser (Maybe MxfXavcDurationMode)
-> Parser MxfXavcProfileSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MxfXavcDurationMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"durationMode")
)
instance Prelude.Hashable MxfXavcProfileSettings
instance Prelude.NFData MxfXavcProfileSettings
instance Core.ToJSON MxfXavcProfileSettings where
toJSON :: MxfXavcProfileSettings -> Value
toJSON MxfXavcProfileSettings' {Maybe Natural
Maybe MxfXavcDurationMode
durationMode :: Maybe MxfXavcDurationMode
maxAncDataSize :: Maybe Natural
$sel:durationMode:MxfXavcProfileSettings' :: MxfXavcProfileSettings -> Maybe MxfXavcDurationMode
$sel:maxAncDataSize:MxfXavcProfileSettings' :: MxfXavcProfileSettings -> Maybe Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"maxAncDataSize" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxAncDataSize,
(Text
"durationMode" Text -> MxfXavcDurationMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MxfXavcDurationMode -> Pair)
-> Maybe MxfXavcDurationMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MxfXavcDurationMode
durationMode
]
)