{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConvert.Types.WebvttAccessibilitySubs
import Amazonka.MediaConvert.Types.WebvttStylePassthrough
import qualified Amazonka.Prelude as Prelude
data WebvttDestinationSettings = WebvttDestinationSettings'
{
WebvttDestinationSettings -> Maybe WebvttAccessibilitySubs
accessibility :: Prelude.Maybe WebvttAccessibilitySubs,
WebvttDestinationSettings -> Maybe WebvttStylePassthrough
stylePassthrough :: Prelude.Maybe WebvttStylePassthrough
}
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:accessibility:WebvttDestinationSettings' :: Maybe WebvttAccessibilitySubs
accessibility =
forall a. Maybe a
Prelude.Nothing,
$sel:stylePassthrough:WebvttDestinationSettings' :: Maybe WebvttStylePassthrough
stylePassthrough = forall a. Maybe a
Prelude.Nothing
}
webvttDestinationSettings_accessibility :: Lens.Lens' WebvttDestinationSettings (Prelude.Maybe WebvttAccessibilitySubs)
webvttDestinationSettings_accessibility :: Lens' WebvttDestinationSettings (Maybe WebvttAccessibilitySubs)
webvttDestinationSettings_accessibility = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WebvttDestinationSettings' {Maybe WebvttAccessibilitySubs
accessibility :: Maybe WebvttAccessibilitySubs
$sel:accessibility:WebvttDestinationSettings' :: WebvttDestinationSettings -> Maybe WebvttAccessibilitySubs
accessibility} -> Maybe WebvttAccessibilitySubs
accessibility) (\s :: WebvttDestinationSettings
s@WebvttDestinationSettings' {} Maybe WebvttAccessibilitySubs
a -> WebvttDestinationSettings
s {$sel:accessibility:WebvttDestinationSettings' :: Maybe WebvttAccessibilitySubs
accessibility = Maybe WebvttAccessibilitySubs
a} :: WebvttDestinationSettings)
webvttDestinationSettings_stylePassthrough :: Lens.Lens' WebvttDestinationSettings (Prelude.Maybe WebvttStylePassthrough)
webvttDestinationSettings_stylePassthrough :: Lens' WebvttDestinationSettings (Maybe WebvttStylePassthrough)
webvttDestinationSettings_stylePassthrough = 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 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 WebvttAccessibilitySubs
-> Maybe WebvttStylePassthrough -> 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
"accessibility")
forall (f :: * -> *) a b. Applicative f => 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 WebvttDestinationSettings where
hashWithSalt :: Int -> WebvttDestinationSettings -> Int
hashWithSalt Int
_salt WebvttDestinationSettings' {Maybe WebvttAccessibilitySubs
Maybe WebvttStylePassthrough
stylePassthrough :: Maybe WebvttStylePassthrough
accessibility :: Maybe WebvttAccessibilitySubs
$sel:stylePassthrough:WebvttDestinationSettings' :: WebvttDestinationSettings -> Maybe WebvttStylePassthrough
$sel:accessibility:WebvttDestinationSettings' :: WebvttDestinationSettings -> Maybe WebvttAccessibilitySubs
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WebvttAccessibilitySubs
accessibility
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WebvttStylePassthrough
stylePassthrough
instance Prelude.NFData WebvttDestinationSettings where
rnf :: WebvttDestinationSettings -> ()
rnf WebvttDestinationSettings' {Maybe WebvttAccessibilitySubs
Maybe WebvttStylePassthrough
stylePassthrough :: Maybe WebvttStylePassthrough
accessibility :: Maybe WebvttAccessibilitySubs
$sel:stylePassthrough:WebvttDestinationSettings' :: WebvttDestinationSettings -> Maybe WebvttStylePassthrough
$sel:accessibility:WebvttDestinationSettings' :: WebvttDestinationSettings -> Maybe WebvttAccessibilitySubs
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe WebvttAccessibilitySubs
accessibility
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WebvttStylePassthrough
stylePassthrough
instance Data.ToJSON WebvttDestinationSettings where
toJSON :: WebvttDestinationSettings -> Value
toJSON WebvttDestinationSettings' {Maybe WebvttAccessibilitySubs
Maybe WebvttStylePassthrough
stylePassthrough :: Maybe WebvttStylePassthrough
accessibility :: Maybe WebvttAccessibilitySubs
$sel:stylePassthrough:WebvttDestinationSettings' :: WebvttDestinationSettings -> Maybe WebvttStylePassthrough
$sel:accessibility:WebvttDestinationSettings' :: WebvttDestinationSettings -> Maybe WebvttAccessibilitySubs
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"accessibility" 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 WebvttAccessibilitySubs
accessibility,
(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 WebvttStylePassthrough
stylePassthrough
]
)