{-# 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.MediaLive.Types.WebvttDestinationSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.WebvttDestinationStyleControl
import qualified Amazonka.Prelude as Prelude
data WebvttDestinationSettings = WebvttDestinationSettings'
{
WebvttDestinationSettings -> Maybe WebvttDestinationStyleControl
styleControl :: Prelude.Maybe WebvttDestinationStyleControl
}
deriving (WebvttDestinationSettings -> WebvttDestinationSettings -> Bool
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]
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
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.
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'
{ $sel:styleControl:WebvttDestinationSettings' :: Maybe WebvttDestinationStyleControl
styleControl =
forall a. Maybe a
Prelude.Nothing
}
webvttDestinationSettings_styleControl :: Lens.Lens' WebvttDestinationSettings (Prelude.Maybe WebvttDestinationStyleControl)
webvttDestinationSettings_styleControl :: Lens'
WebvttDestinationSettings (Maybe WebvttDestinationStyleControl)
webvttDestinationSettings_styleControl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WebvttDestinationSettings' {Maybe WebvttDestinationStyleControl
styleControl :: Maybe WebvttDestinationStyleControl
$sel:styleControl:WebvttDestinationSettings' :: WebvttDestinationSettings -> Maybe WebvttDestinationStyleControl
styleControl} -> Maybe WebvttDestinationStyleControl
styleControl) (\s :: WebvttDestinationSettings
s@WebvttDestinationSettings' {} Maybe WebvttDestinationStyleControl
a -> WebvttDestinationSettings
s {$sel:styleControl:WebvttDestinationSettings' :: Maybe WebvttDestinationStyleControl
styleControl = Maybe WebvttDestinationStyleControl
a} :: WebvttDestinationSettings)
instance Data.FromJSON WebvttDestinationSettings where
parseJSON :: Value -> Parser WebvttDestinationSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"WebvttDestinationSettings"
( \Object
x ->
Maybe WebvttDestinationStyleControl -> WebvttDestinationSettings
WebvttDestinationSettings'
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
"styleControl")
)
instance Prelude.Hashable WebvttDestinationSettings where
hashWithSalt :: Int -> WebvttDestinationSettings -> Int
hashWithSalt Int
_salt WebvttDestinationSettings' {Maybe WebvttDestinationStyleControl
styleControl :: Maybe WebvttDestinationStyleControl
$sel:styleControl:WebvttDestinationSettings' :: WebvttDestinationSettings -> Maybe WebvttDestinationStyleControl
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WebvttDestinationStyleControl
styleControl
instance Prelude.NFData WebvttDestinationSettings where
rnf :: WebvttDestinationSettings -> ()
rnf WebvttDestinationSettings' {Maybe WebvttDestinationStyleControl
styleControl :: Maybe WebvttDestinationStyleControl
$sel:styleControl:WebvttDestinationSettings' :: WebvttDestinationSettings -> Maybe WebvttDestinationStyleControl
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe WebvttDestinationStyleControl
styleControl
instance Data.ToJSON WebvttDestinationSettings where
toJSON :: WebvttDestinationSettings -> Value
toJSON WebvttDestinationSettings' {Maybe WebvttDestinationStyleControl
styleControl :: Maybe WebvttDestinationStyleControl
$sel:styleControl:WebvttDestinationSettings' :: WebvttDestinationSettings -> Maybe WebvttDestinationStyleControl
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"styleControl" 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 WebvttDestinationStyleControl
styleControl]
)