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