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