{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
{ $sel:stylePassthrough:SrtDestinationSettings' :: Maybe SrtStylePassthrough
stylePassthrough =
forall a. Maybe a
Prelude.Nothing
}
srtDestinationSettings_stylePassthrough :: Lens.Lens' SrtDestinationSettings (Prelude.Maybe SrtStylePassthrough)
srtDestinationSettings_stylePassthrough :: Lens' SrtDestinationSettings (Maybe SrtStylePassthrough)
srtDestinationSettings_stylePassthrough = 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 Data.FromJSON SrtDestinationSettings where
parseJSON :: Value -> Parser SrtDestinationSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SrtDestinationSettings"
( \Object
x ->
Maybe SrtStylePassthrough -> SrtDestinationSettings
SrtDestinationSettings'
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
"stylePassthrough")
)
instance Prelude.Hashable SrtDestinationSettings where
hashWithSalt :: Int -> SrtDestinationSettings -> Int
hashWithSalt Int
_salt SrtDestinationSettings' {Maybe SrtStylePassthrough
stylePassthrough :: Maybe SrtStylePassthrough
$sel:stylePassthrough:SrtDestinationSettings' :: SrtDestinationSettings -> Maybe SrtStylePassthrough
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SrtStylePassthrough
stylePassthrough
instance Prelude.NFData SrtDestinationSettings where
rnf :: SrtDestinationSettings -> ()
rnf SrtDestinationSettings' {Maybe SrtStylePassthrough
stylePassthrough :: Maybe SrtStylePassthrough
$sel:stylePassthrough:SrtDestinationSettings' :: SrtDestinationSettings -> Maybe SrtStylePassthrough
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe SrtStylePassthrough
stylePassthrough
instance Data.ToJSON SrtDestinationSettings where
toJSON :: SrtDestinationSettings -> Value
toJSON SrtDestinationSettings' {Maybe SrtStylePassthrough
stylePassthrough :: Maybe SrtStylePassthrough
$sel:stylePassthrough:SrtDestinationSettings' :: SrtDestinationSettings -> Maybe SrtStylePassthrough
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"stylePassthrough" 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 SrtStylePassthrough
stylePassthrough
]
)