{-# 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.Scte35TimeSignalApos 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.Scte35AposNoRegionalBlackoutBehavior
import Amazonka.MediaLive.Types.Scte35AposWebDeliveryAllowedBehavior
import qualified Amazonka.Prelude as Prelude
data Scte35TimeSignalApos = Scte35TimeSignalApos'
{
Scte35TimeSignalApos -> Maybe Int
adAvailOffset :: Prelude.Maybe Prelude.Int,
Scte35TimeSignalApos -> Maybe Scte35AposNoRegionalBlackoutBehavior
noRegionalBlackoutFlag :: Prelude.Maybe Scte35AposNoRegionalBlackoutBehavior,
Scte35TimeSignalApos -> Maybe Scte35AposWebDeliveryAllowedBehavior
webDeliveryAllowedFlag :: Prelude.Maybe Scte35AposWebDeliveryAllowedBehavior
}
deriving (Scte35TimeSignalApos -> Scte35TimeSignalApos -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Scte35TimeSignalApos -> Scte35TimeSignalApos -> Bool
$c/= :: Scte35TimeSignalApos -> Scte35TimeSignalApos -> Bool
== :: Scte35TimeSignalApos -> Scte35TimeSignalApos -> Bool
$c== :: Scte35TimeSignalApos -> Scte35TimeSignalApos -> Bool
Prelude.Eq, ReadPrec [Scte35TimeSignalApos]
ReadPrec Scte35TimeSignalApos
Int -> ReadS Scte35TimeSignalApos
ReadS [Scte35TimeSignalApos]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Scte35TimeSignalApos]
$creadListPrec :: ReadPrec [Scte35TimeSignalApos]
readPrec :: ReadPrec Scte35TimeSignalApos
$creadPrec :: ReadPrec Scte35TimeSignalApos
readList :: ReadS [Scte35TimeSignalApos]
$creadList :: ReadS [Scte35TimeSignalApos]
readsPrec :: Int -> ReadS Scte35TimeSignalApos
$creadsPrec :: Int -> ReadS Scte35TimeSignalApos
Prelude.Read, Int -> Scte35TimeSignalApos -> ShowS
[Scte35TimeSignalApos] -> ShowS
Scte35TimeSignalApos -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Scte35TimeSignalApos] -> ShowS
$cshowList :: [Scte35TimeSignalApos] -> ShowS
show :: Scte35TimeSignalApos -> String
$cshow :: Scte35TimeSignalApos -> String
showsPrec :: Int -> Scte35TimeSignalApos -> ShowS
$cshowsPrec :: Int -> Scte35TimeSignalApos -> ShowS
Prelude.Show, forall x. Rep Scte35TimeSignalApos x -> Scte35TimeSignalApos
forall x. Scte35TimeSignalApos -> Rep Scte35TimeSignalApos x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Scte35TimeSignalApos x -> Scte35TimeSignalApos
$cfrom :: forall x. Scte35TimeSignalApos -> Rep Scte35TimeSignalApos x
Prelude.Generic)
newScte35TimeSignalApos ::
Scte35TimeSignalApos
newScte35TimeSignalApos :: Scte35TimeSignalApos
newScte35TimeSignalApos =
Scte35TimeSignalApos'
{ $sel:adAvailOffset:Scte35TimeSignalApos' :: Maybe Int
adAvailOffset =
forall a. Maybe a
Prelude.Nothing,
$sel:noRegionalBlackoutFlag:Scte35TimeSignalApos' :: Maybe Scte35AposNoRegionalBlackoutBehavior
noRegionalBlackoutFlag = forall a. Maybe a
Prelude.Nothing,
$sel:webDeliveryAllowedFlag:Scte35TimeSignalApos' :: Maybe Scte35AposWebDeliveryAllowedBehavior
webDeliveryAllowedFlag = forall a. Maybe a
Prelude.Nothing
}
scte35TimeSignalApos_adAvailOffset :: Lens.Lens' Scte35TimeSignalApos (Prelude.Maybe Prelude.Int)
scte35TimeSignalApos_adAvailOffset :: Lens' Scte35TimeSignalApos (Maybe Int)
scte35TimeSignalApos_adAvailOffset = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Scte35TimeSignalApos' {Maybe Int
adAvailOffset :: Maybe Int
$sel:adAvailOffset:Scte35TimeSignalApos' :: Scte35TimeSignalApos -> Maybe Int
adAvailOffset} -> Maybe Int
adAvailOffset) (\s :: Scte35TimeSignalApos
s@Scte35TimeSignalApos' {} Maybe Int
a -> Scte35TimeSignalApos
s {$sel:adAvailOffset:Scte35TimeSignalApos' :: Maybe Int
adAvailOffset = Maybe Int
a} :: Scte35TimeSignalApos)
scte35TimeSignalApos_noRegionalBlackoutFlag :: Lens.Lens' Scte35TimeSignalApos (Prelude.Maybe Scte35AposNoRegionalBlackoutBehavior)
scte35TimeSignalApos_noRegionalBlackoutFlag :: Lens'
Scte35TimeSignalApos (Maybe Scte35AposNoRegionalBlackoutBehavior)
scte35TimeSignalApos_noRegionalBlackoutFlag = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Scte35TimeSignalApos' {Maybe Scte35AposNoRegionalBlackoutBehavior
noRegionalBlackoutFlag :: Maybe Scte35AposNoRegionalBlackoutBehavior
$sel:noRegionalBlackoutFlag:Scte35TimeSignalApos' :: Scte35TimeSignalApos -> Maybe Scte35AposNoRegionalBlackoutBehavior
noRegionalBlackoutFlag} -> Maybe Scte35AposNoRegionalBlackoutBehavior
noRegionalBlackoutFlag) (\s :: Scte35TimeSignalApos
s@Scte35TimeSignalApos' {} Maybe Scte35AposNoRegionalBlackoutBehavior
a -> Scte35TimeSignalApos
s {$sel:noRegionalBlackoutFlag:Scte35TimeSignalApos' :: Maybe Scte35AposNoRegionalBlackoutBehavior
noRegionalBlackoutFlag = Maybe Scte35AposNoRegionalBlackoutBehavior
a} :: Scte35TimeSignalApos)
scte35TimeSignalApos_webDeliveryAllowedFlag :: Lens.Lens' Scte35TimeSignalApos (Prelude.Maybe Scte35AposWebDeliveryAllowedBehavior)
scte35TimeSignalApos_webDeliveryAllowedFlag :: Lens'
Scte35TimeSignalApos (Maybe Scte35AposWebDeliveryAllowedBehavior)
scte35TimeSignalApos_webDeliveryAllowedFlag = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Scte35TimeSignalApos' {Maybe Scte35AposWebDeliveryAllowedBehavior
webDeliveryAllowedFlag :: Maybe Scte35AposWebDeliveryAllowedBehavior
$sel:webDeliveryAllowedFlag:Scte35TimeSignalApos' :: Scte35TimeSignalApos -> Maybe Scte35AposWebDeliveryAllowedBehavior
webDeliveryAllowedFlag} -> Maybe Scte35AposWebDeliveryAllowedBehavior
webDeliveryAllowedFlag) (\s :: Scte35TimeSignalApos
s@Scte35TimeSignalApos' {} Maybe Scte35AposWebDeliveryAllowedBehavior
a -> Scte35TimeSignalApos
s {$sel:webDeliveryAllowedFlag:Scte35TimeSignalApos' :: Maybe Scte35AposWebDeliveryAllowedBehavior
webDeliveryAllowedFlag = Maybe Scte35AposWebDeliveryAllowedBehavior
a} :: Scte35TimeSignalApos)
instance Data.FromJSON Scte35TimeSignalApos where
parseJSON :: Value -> Parser Scte35TimeSignalApos
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Scte35TimeSignalApos"
( \Object
x ->
Maybe Int
-> Maybe Scte35AposNoRegionalBlackoutBehavior
-> Maybe Scte35AposWebDeliveryAllowedBehavior
-> Scte35TimeSignalApos
Scte35TimeSignalApos'
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
"adAvailOffset")
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
"noRegionalBlackoutFlag")
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
"webDeliveryAllowedFlag")
)
instance Prelude.Hashable Scte35TimeSignalApos where
hashWithSalt :: Int -> Scte35TimeSignalApos -> Int
hashWithSalt Int
_salt Scte35TimeSignalApos' {Maybe Int
Maybe Scte35AposNoRegionalBlackoutBehavior
Maybe Scte35AposWebDeliveryAllowedBehavior
webDeliveryAllowedFlag :: Maybe Scte35AposWebDeliveryAllowedBehavior
noRegionalBlackoutFlag :: Maybe Scte35AposNoRegionalBlackoutBehavior
adAvailOffset :: Maybe Int
$sel:webDeliveryAllowedFlag:Scte35TimeSignalApos' :: Scte35TimeSignalApos -> Maybe Scte35AposWebDeliveryAllowedBehavior
$sel:noRegionalBlackoutFlag:Scte35TimeSignalApos' :: Scte35TimeSignalApos -> Maybe Scte35AposNoRegionalBlackoutBehavior
$sel:adAvailOffset:Scte35TimeSignalApos' :: Scte35TimeSignalApos -> Maybe Int
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
adAvailOffset
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Scte35AposNoRegionalBlackoutBehavior
noRegionalBlackoutFlag
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Scte35AposWebDeliveryAllowedBehavior
webDeliveryAllowedFlag
instance Prelude.NFData Scte35TimeSignalApos where
rnf :: Scte35TimeSignalApos -> ()
rnf Scte35TimeSignalApos' {Maybe Int
Maybe Scte35AposNoRegionalBlackoutBehavior
Maybe Scte35AposWebDeliveryAllowedBehavior
webDeliveryAllowedFlag :: Maybe Scte35AposWebDeliveryAllowedBehavior
noRegionalBlackoutFlag :: Maybe Scte35AposNoRegionalBlackoutBehavior
adAvailOffset :: Maybe Int
$sel:webDeliveryAllowedFlag:Scte35TimeSignalApos' :: Scte35TimeSignalApos -> Maybe Scte35AposWebDeliveryAllowedBehavior
$sel:noRegionalBlackoutFlag:Scte35TimeSignalApos' :: Scte35TimeSignalApos -> Maybe Scte35AposNoRegionalBlackoutBehavior
$sel:adAvailOffset:Scte35TimeSignalApos' :: Scte35TimeSignalApos -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
adAvailOffset
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Scte35AposNoRegionalBlackoutBehavior
noRegionalBlackoutFlag
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Scte35AposWebDeliveryAllowedBehavior
webDeliveryAllowedFlag
instance Data.ToJSON Scte35TimeSignalApos where
toJSON :: Scte35TimeSignalApos -> Value
toJSON Scte35TimeSignalApos' {Maybe Int
Maybe Scte35AposNoRegionalBlackoutBehavior
Maybe Scte35AposWebDeliveryAllowedBehavior
webDeliveryAllowedFlag :: Maybe Scte35AposWebDeliveryAllowedBehavior
noRegionalBlackoutFlag :: Maybe Scte35AposNoRegionalBlackoutBehavior
adAvailOffset :: Maybe Int
$sel:webDeliveryAllowedFlag:Scte35TimeSignalApos' :: Scte35TimeSignalApos -> Maybe Scte35AposWebDeliveryAllowedBehavior
$sel:noRegionalBlackoutFlag:Scte35TimeSignalApos' :: Scte35TimeSignalApos -> Maybe Scte35AposNoRegionalBlackoutBehavior
$sel:adAvailOffset:Scte35TimeSignalApos' :: Scte35TimeSignalApos -> Maybe Int
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"adAvailOffset" 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 Int
adAvailOffset,
(Key
"noRegionalBlackoutFlag" 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 Scte35AposNoRegionalBlackoutBehavior
noRegionalBlackoutFlag,
(Key
"webDeliveryAllowedFlag" 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 Scte35AposWebDeliveryAllowedBehavior
webDeliveryAllowedFlag
]
)