{-# 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.Scte35DeliveryRestrictions 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.Scte35ArchiveAllowedFlag
import Amazonka.MediaLive.Types.Scte35DeviceRestrictions
import Amazonka.MediaLive.Types.Scte35NoRegionalBlackoutFlag
import Amazonka.MediaLive.Types.Scte35WebDeliveryAllowedFlag
import qualified Amazonka.Prelude as Prelude
data Scte35DeliveryRestrictions = Scte35DeliveryRestrictions'
{
Scte35DeliveryRestrictions -> Scte35DeviceRestrictions
deviceRestrictions :: Scte35DeviceRestrictions,
Scte35DeliveryRestrictions -> Scte35ArchiveAllowedFlag
archiveAllowedFlag :: Scte35ArchiveAllowedFlag,
Scte35DeliveryRestrictions -> Scte35WebDeliveryAllowedFlag
webDeliveryAllowedFlag :: Scte35WebDeliveryAllowedFlag,
Scte35DeliveryRestrictions -> Scte35NoRegionalBlackoutFlag
noRegionalBlackoutFlag :: Scte35NoRegionalBlackoutFlag
}
deriving (Scte35DeliveryRestrictions -> Scte35DeliveryRestrictions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Scte35DeliveryRestrictions -> Scte35DeliveryRestrictions -> Bool
$c/= :: Scte35DeliveryRestrictions -> Scte35DeliveryRestrictions -> Bool
== :: Scte35DeliveryRestrictions -> Scte35DeliveryRestrictions -> Bool
$c== :: Scte35DeliveryRestrictions -> Scte35DeliveryRestrictions -> Bool
Prelude.Eq, ReadPrec [Scte35DeliveryRestrictions]
ReadPrec Scte35DeliveryRestrictions
Int -> ReadS Scte35DeliveryRestrictions
ReadS [Scte35DeliveryRestrictions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Scte35DeliveryRestrictions]
$creadListPrec :: ReadPrec [Scte35DeliveryRestrictions]
readPrec :: ReadPrec Scte35DeliveryRestrictions
$creadPrec :: ReadPrec Scte35DeliveryRestrictions
readList :: ReadS [Scte35DeliveryRestrictions]
$creadList :: ReadS [Scte35DeliveryRestrictions]
readsPrec :: Int -> ReadS Scte35DeliveryRestrictions
$creadsPrec :: Int -> ReadS Scte35DeliveryRestrictions
Prelude.Read, Int -> Scte35DeliveryRestrictions -> ShowS
[Scte35DeliveryRestrictions] -> ShowS
Scte35DeliveryRestrictions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Scte35DeliveryRestrictions] -> ShowS
$cshowList :: [Scte35DeliveryRestrictions] -> ShowS
show :: Scte35DeliveryRestrictions -> String
$cshow :: Scte35DeliveryRestrictions -> String
showsPrec :: Int -> Scte35DeliveryRestrictions -> ShowS
$cshowsPrec :: Int -> Scte35DeliveryRestrictions -> ShowS
Prelude.Show, forall x.
Rep Scte35DeliveryRestrictions x -> Scte35DeliveryRestrictions
forall x.
Scte35DeliveryRestrictions -> Rep Scte35DeliveryRestrictions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep Scte35DeliveryRestrictions x -> Scte35DeliveryRestrictions
$cfrom :: forall x.
Scte35DeliveryRestrictions -> Rep Scte35DeliveryRestrictions x
Prelude.Generic)
newScte35DeliveryRestrictions ::
Scte35DeviceRestrictions ->
Scte35ArchiveAllowedFlag ->
Scte35WebDeliveryAllowedFlag ->
Scte35NoRegionalBlackoutFlag ->
Scte35DeliveryRestrictions
newScte35DeliveryRestrictions :: Scte35DeviceRestrictions
-> Scte35ArchiveAllowedFlag
-> Scte35WebDeliveryAllowedFlag
-> Scte35NoRegionalBlackoutFlag
-> Scte35DeliveryRestrictions
newScte35DeliveryRestrictions
Scte35DeviceRestrictions
pDeviceRestrictions_
Scte35ArchiveAllowedFlag
pArchiveAllowedFlag_
Scte35WebDeliveryAllowedFlag
pWebDeliveryAllowedFlag_
Scte35NoRegionalBlackoutFlag
pNoRegionalBlackoutFlag_ =
Scte35DeliveryRestrictions'
{ $sel:deviceRestrictions:Scte35DeliveryRestrictions' :: Scte35DeviceRestrictions
deviceRestrictions =
Scte35DeviceRestrictions
pDeviceRestrictions_,
$sel:archiveAllowedFlag:Scte35DeliveryRestrictions' :: Scte35ArchiveAllowedFlag
archiveAllowedFlag = Scte35ArchiveAllowedFlag
pArchiveAllowedFlag_,
$sel:webDeliveryAllowedFlag:Scte35DeliveryRestrictions' :: Scte35WebDeliveryAllowedFlag
webDeliveryAllowedFlag =
Scte35WebDeliveryAllowedFlag
pWebDeliveryAllowedFlag_,
$sel:noRegionalBlackoutFlag:Scte35DeliveryRestrictions' :: Scte35NoRegionalBlackoutFlag
noRegionalBlackoutFlag =
Scte35NoRegionalBlackoutFlag
pNoRegionalBlackoutFlag_
}
scte35DeliveryRestrictions_deviceRestrictions :: Lens.Lens' Scte35DeliveryRestrictions Scte35DeviceRestrictions
scte35DeliveryRestrictions_deviceRestrictions :: Lens' Scte35DeliveryRestrictions Scte35DeviceRestrictions
scte35DeliveryRestrictions_deviceRestrictions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Scte35DeliveryRestrictions' {Scte35DeviceRestrictions
deviceRestrictions :: Scte35DeviceRestrictions
$sel:deviceRestrictions:Scte35DeliveryRestrictions' :: Scte35DeliveryRestrictions -> Scte35DeviceRestrictions
deviceRestrictions} -> Scte35DeviceRestrictions
deviceRestrictions) (\s :: Scte35DeliveryRestrictions
s@Scte35DeliveryRestrictions' {} Scte35DeviceRestrictions
a -> Scte35DeliveryRestrictions
s {$sel:deviceRestrictions:Scte35DeliveryRestrictions' :: Scte35DeviceRestrictions
deviceRestrictions = Scte35DeviceRestrictions
a} :: Scte35DeliveryRestrictions)
scte35DeliveryRestrictions_archiveAllowedFlag :: Lens.Lens' Scte35DeliveryRestrictions Scte35ArchiveAllowedFlag
scte35DeliveryRestrictions_archiveAllowedFlag :: Lens' Scte35DeliveryRestrictions Scte35ArchiveAllowedFlag
scte35DeliveryRestrictions_archiveAllowedFlag = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Scte35DeliveryRestrictions' {Scte35ArchiveAllowedFlag
archiveAllowedFlag :: Scte35ArchiveAllowedFlag
$sel:archiveAllowedFlag:Scte35DeliveryRestrictions' :: Scte35DeliveryRestrictions -> Scte35ArchiveAllowedFlag
archiveAllowedFlag} -> Scte35ArchiveAllowedFlag
archiveAllowedFlag) (\s :: Scte35DeliveryRestrictions
s@Scte35DeliveryRestrictions' {} Scte35ArchiveAllowedFlag
a -> Scte35DeliveryRestrictions
s {$sel:archiveAllowedFlag:Scte35DeliveryRestrictions' :: Scte35ArchiveAllowedFlag
archiveAllowedFlag = Scte35ArchiveAllowedFlag
a} :: Scte35DeliveryRestrictions)
scte35DeliveryRestrictions_webDeliveryAllowedFlag :: Lens.Lens' Scte35DeliveryRestrictions Scte35WebDeliveryAllowedFlag
scte35DeliveryRestrictions_webDeliveryAllowedFlag :: Lens' Scte35DeliveryRestrictions Scte35WebDeliveryAllowedFlag
scte35DeliveryRestrictions_webDeliveryAllowedFlag = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Scte35DeliveryRestrictions' {Scte35WebDeliveryAllowedFlag
webDeliveryAllowedFlag :: Scte35WebDeliveryAllowedFlag
$sel:webDeliveryAllowedFlag:Scte35DeliveryRestrictions' :: Scte35DeliveryRestrictions -> Scte35WebDeliveryAllowedFlag
webDeliveryAllowedFlag} -> Scte35WebDeliveryAllowedFlag
webDeliveryAllowedFlag) (\s :: Scte35DeliveryRestrictions
s@Scte35DeliveryRestrictions' {} Scte35WebDeliveryAllowedFlag
a -> Scte35DeliveryRestrictions
s {$sel:webDeliveryAllowedFlag:Scte35DeliveryRestrictions' :: Scte35WebDeliveryAllowedFlag
webDeliveryAllowedFlag = Scte35WebDeliveryAllowedFlag
a} :: Scte35DeliveryRestrictions)
scte35DeliveryRestrictions_noRegionalBlackoutFlag :: Lens.Lens' Scte35DeliveryRestrictions Scte35NoRegionalBlackoutFlag
scte35DeliveryRestrictions_noRegionalBlackoutFlag :: Lens' Scte35DeliveryRestrictions Scte35NoRegionalBlackoutFlag
scte35DeliveryRestrictions_noRegionalBlackoutFlag = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Scte35DeliveryRestrictions' {Scte35NoRegionalBlackoutFlag
noRegionalBlackoutFlag :: Scte35NoRegionalBlackoutFlag
$sel:noRegionalBlackoutFlag:Scte35DeliveryRestrictions' :: Scte35DeliveryRestrictions -> Scte35NoRegionalBlackoutFlag
noRegionalBlackoutFlag} -> Scte35NoRegionalBlackoutFlag
noRegionalBlackoutFlag) (\s :: Scte35DeliveryRestrictions
s@Scte35DeliveryRestrictions' {} Scte35NoRegionalBlackoutFlag
a -> Scte35DeliveryRestrictions
s {$sel:noRegionalBlackoutFlag:Scte35DeliveryRestrictions' :: Scte35NoRegionalBlackoutFlag
noRegionalBlackoutFlag = Scte35NoRegionalBlackoutFlag
a} :: Scte35DeliveryRestrictions)
instance Data.FromJSON Scte35DeliveryRestrictions where
parseJSON :: Value -> Parser Scte35DeliveryRestrictions
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Scte35DeliveryRestrictions"
( \Object
x ->
Scte35DeviceRestrictions
-> Scte35ArchiveAllowedFlag
-> Scte35WebDeliveryAllowedFlag
-> Scte35NoRegionalBlackoutFlag
-> Scte35DeliveryRestrictions
Scte35DeliveryRestrictions'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"deviceRestrictions")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"archiveAllowedFlag")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"webDeliveryAllowedFlag")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"noRegionalBlackoutFlag")
)
instance Prelude.Hashable Scte35DeliveryRestrictions where
hashWithSalt :: Int -> Scte35DeliveryRestrictions -> Int
hashWithSalt Int
_salt Scte35DeliveryRestrictions' {Scte35ArchiveAllowedFlag
Scte35DeviceRestrictions
Scte35NoRegionalBlackoutFlag
Scte35WebDeliveryAllowedFlag
noRegionalBlackoutFlag :: Scte35NoRegionalBlackoutFlag
webDeliveryAllowedFlag :: Scte35WebDeliveryAllowedFlag
archiveAllowedFlag :: Scte35ArchiveAllowedFlag
deviceRestrictions :: Scte35DeviceRestrictions
$sel:noRegionalBlackoutFlag:Scte35DeliveryRestrictions' :: Scte35DeliveryRestrictions -> Scte35NoRegionalBlackoutFlag
$sel:webDeliveryAllowedFlag:Scte35DeliveryRestrictions' :: Scte35DeliveryRestrictions -> Scte35WebDeliveryAllowedFlag
$sel:archiveAllowedFlag:Scte35DeliveryRestrictions' :: Scte35DeliveryRestrictions -> Scte35ArchiveAllowedFlag
$sel:deviceRestrictions:Scte35DeliveryRestrictions' :: Scte35DeliveryRestrictions -> Scte35DeviceRestrictions
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Scte35DeviceRestrictions
deviceRestrictions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Scte35ArchiveAllowedFlag
archiveAllowedFlag
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Scte35WebDeliveryAllowedFlag
webDeliveryAllowedFlag
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Scte35NoRegionalBlackoutFlag
noRegionalBlackoutFlag
instance Prelude.NFData Scte35DeliveryRestrictions where
rnf :: Scte35DeliveryRestrictions -> ()
rnf Scte35DeliveryRestrictions' {Scte35ArchiveAllowedFlag
Scte35DeviceRestrictions
Scte35NoRegionalBlackoutFlag
Scte35WebDeliveryAllowedFlag
noRegionalBlackoutFlag :: Scte35NoRegionalBlackoutFlag
webDeliveryAllowedFlag :: Scte35WebDeliveryAllowedFlag
archiveAllowedFlag :: Scte35ArchiveAllowedFlag
deviceRestrictions :: Scte35DeviceRestrictions
$sel:noRegionalBlackoutFlag:Scte35DeliveryRestrictions' :: Scte35DeliveryRestrictions -> Scte35NoRegionalBlackoutFlag
$sel:webDeliveryAllowedFlag:Scte35DeliveryRestrictions' :: Scte35DeliveryRestrictions -> Scte35WebDeliveryAllowedFlag
$sel:archiveAllowedFlag:Scte35DeliveryRestrictions' :: Scte35DeliveryRestrictions -> Scte35ArchiveAllowedFlag
$sel:deviceRestrictions:Scte35DeliveryRestrictions' :: Scte35DeliveryRestrictions -> Scte35DeviceRestrictions
..} =
forall a. NFData a => a -> ()
Prelude.rnf Scte35DeviceRestrictions
deviceRestrictions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Scte35ArchiveAllowedFlag
archiveAllowedFlag
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Scte35WebDeliveryAllowedFlag
webDeliveryAllowedFlag
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Scte35NoRegionalBlackoutFlag
noRegionalBlackoutFlag
instance Data.ToJSON Scte35DeliveryRestrictions where
toJSON :: Scte35DeliveryRestrictions -> Value
toJSON Scte35DeliveryRestrictions' {Scte35ArchiveAllowedFlag
Scte35DeviceRestrictions
Scte35NoRegionalBlackoutFlag
Scte35WebDeliveryAllowedFlag
noRegionalBlackoutFlag :: Scte35NoRegionalBlackoutFlag
webDeliveryAllowedFlag :: Scte35WebDeliveryAllowedFlag
archiveAllowedFlag :: Scte35ArchiveAllowedFlag
deviceRestrictions :: Scte35DeviceRestrictions
$sel:noRegionalBlackoutFlag:Scte35DeliveryRestrictions' :: Scte35DeliveryRestrictions -> Scte35NoRegionalBlackoutFlag
$sel:webDeliveryAllowedFlag:Scte35DeliveryRestrictions' :: Scte35DeliveryRestrictions -> Scte35WebDeliveryAllowedFlag
$sel:archiveAllowedFlag:Scte35DeliveryRestrictions' :: Scte35DeliveryRestrictions -> Scte35ArchiveAllowedFlag
$sel:deviceRestrictions:Scte35DeliveryRestrictions' :: Scte35DeliveryRestrictions -> Scte35DeviceRestrictions
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"deviceRestrictions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Scte35DeviceRestrictions
deviceRestrictions),
forall a. a -> Maybe a
Prelude.Just
(Key
"archiveAllowedFlag" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Scte35ArchiveAllowedFlag
archiveAllowedFlag),
forall a. a -> Maybe a
Prelude.Just
( Key
"webDeliveryAllowedFlag"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Scte35WebDeliveryAllowedFlag
webDeliveryAllowedFlag
),
forall a. a -> Maybe a
Prelude.Just
( Key
"noRegionalBlackoutFlag"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Scte35NoRegionalBlackoutFlag
noRegionalBlackoutFlag
)
]
)