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