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