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