module Stratosphere.IVS.PlaybackRestrictionPolicy (
PlaybackRestrictionPolicy(..), mkPlaybackRestrictionPolicy
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data PlaybackRestrictionPolicy
=
PlaybackRestrictionPolicy {PlaybackRestrictionPolicy -> ()
haddock_workaround_ :: (),
PlaybackRestrictionPolicy -> Maybe (ValueList Text)
allowedCountries :: (Prelude.Maybe (ValueList Prelude.Text)),
PlaybackRestrictionPolicy -> Maybe (ValueList Text)
allowedOrigins :: (Prelude.Maybe (ValueList Prelude.Text)),
PlaybackRestrictionPolicy -> Maybe (Value Bool)
enableStrictOriginEnforcement :: (Prelude.Maybe (Value Prelude.Bool)),
PlaybackRestrictionPolicy -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
PlaybackRestrictionPolicy -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (PlaybackRestrictionPolicy -> PlaybackRestrictionPolicy -> Bool
(PlaybackRestrictionPolicy -> PlaybackRestrictionPolicy -> Bool)
-> (PlaybackRestrictionPolicy -> PlaybackRestrictionPolicy -> Bool)
-> Eq PlaybackRestrictionPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PlaybackRestrictionPolicy -> PlaybackRestrictionPolicy -> Bool
== :: PlaybackRestrictionPolicy -> PlaybackRestrictionPolicy -> Bool
$c/= :: PlaybackRestrictionPolicy -> PlaybackRestrictionPolicy -> Bool
/= :: PlaybackRestrictionPolicy -> PlaybackRestrictionPolicy -> Bool
Prelude.Eq, Int -> PlaybackRestrictionPolicy -> ShowS
[PlaybackRestrictionPolicy] -> ShowS
PlaybackRestrictionPolicy -> String
(Int -> PlaybackRestrictionPolicy -> ShowS)
-> (PlaybackRestrictionPolicy -> String)
-> ([PlaybackRestrictionPolicy] -> ShowS)
-> Show PlaybackRestrictionPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PlaybackRestrictionPolicy -> ShowS
showsPrec :: Int -> PlaybackRestrictionPolicy -> ShowS
$cshow :: PlaybackRestrictionPolicy -> String
show :: PlaybackRestrictionPolicy -> String
$cshowList :: [PlaybackRestrictionPolicy] -> ShowS
showList :: [PlaybackRestrictionPolicy] -> ShowS
Prelude.Show)
mkPlaybackRestrictionPolicy :: PlaybackRestrictionPolicy
mkPlaybackRestrictionPolicy :: PlaybackRestrictionPolicy
mkPlaybackRestrictionPolicy
= PlaybackRestrictionPolicy
{haddock_workaround_ :: ()
haddock_workaround_ = (), allowedCountries :: Maybe (ValueList Text)
allowedCountries = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
allowedOrigins :: Maybe (ValueList Text)
allowedOrigins = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
enableStrictOriginEnforcement :: Maybe (Value Bool)
enableStrictOriginEnforcement = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PlaybackRestrictionPolicy where
toResourceProperties :: PlaybackRestrictionPolicy -> ResourceProperties
toResourceProperties PlaybackRestrictionPolicy {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: PlaybackRestrictionPolicy -> ()
allowedCountries :: PlaybackRestrictionPolicy -> Maybe (ValueList Text)
allowedOrigins :: PlaybackRestrictionPolicy -> Maybe (ValueList Text)
enableStrictOriginEnforcement :: PlaybackRestrictionPolicy -> Maybe (Value Bool)
name :: PlaybackRestrictionPolicy -> Maybe (Value Text)
tags :: PlaybackRestrictionPolicy -> Maybe [Tag]
haddock_workaround_ :: ()
allowedCountries :: Maybe (ValueList Text)
allowedOrigins :: Maybe (ValueList Text)
enableStrictOriginEnforcement :: Maybe (Value Bool)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IVS::PlaybackRestrictionPolicy",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllowedCountries" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
allowedCountries,
Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllowedOrigins" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
allowedOrigins,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EnableStrictOriginEnforcement"
(Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enableStrictOriginEnforcement,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Name" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
name,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])}
instance JSON.ToJSON PlaybackRestrictionPolicy where
toJSON :: PlaybackRestrictionPolicy -> Value
toJSON PlaybackRestrictionPolicy {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: PlaybackRestrictionPolicy -> ()
allowedCountries :: PlaybackRestrictionPolicy -> Maybe (ValueList Text)
allowedOrigins :: PlaybackRestrictionPolicy -> Maybe (ValueList Text)
enableStrictOriginEnforcement :: PlaybackRestrictionPolicy -> Maybe (Value Bool)
name :: PlaybackRestrictionPolicy -> Maybe (Value Text)
tags :: PlaybackRestrictionPolicy -> Maybe [Tag]
haddock_workaround_ :: ()
allowedCountries :: Maybe (ValueList Text)
allowedOrigins :: Maybe (ValueList Text)
enableStrictOriginEnforcement :: Maybe (Value Bool)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllowedCountries" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
allowedCountries,
Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllowedOrigins" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
allowedOrigins,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EnableStrictOriginEnforcement"
(Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enableStrictOriginEnforcement,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Name" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
name,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))
instance Property "AllowedCountries" PlaybackRestrictionPolicy where
type PropertyType "AllowedCountries" PlaybackRestrictionPolicy = ValueList Prelude.Text
set :: PropertyType "AllowedCountries" PlaybackRestrictionPolicy
-> PlaybackRestrictionPolicy -> PlaybackRestrictionPolicy
set PropertyType "AllowedCountries" PlaybackRestrictionPolicy
newValue PlaybackRestrictionPolicy {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: PlaybackRestrictionPolicy -> ()
allowedCountries :: PlaybackRestrictionPolicy -> Maybe (ValueList Text)
allowedOrigins :: PlaybackRestrictionPolicy -> Maybe (ValueList Text)
enableStrictOriginEnforcement :: PlaybackRestrictionPolicy -> Maybe (Value Bool)
name :: PlaybackRestrictionPolicy -> Maybe (Value Text)
tags :: PlaybackRestrictionPolicy -> Maybe [Tag]
haddock_workaround_ :: ()
allowedCountries :: Maybe (ValueList Text)
allowedOrigins :: Maybe (ValueList Text)
enableStrictOriginEnforcement :: Maybe (Value Bool)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= PlaybackRestrictionPolicy
{allowedCountries :: Maybe (ValueList Text)
allowedCountries = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AllowedCountries" PlaybackRestrictionPolicy
ValueList Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
allowedOrigins :: Maybe (ValueList Text)
enableStrictOriginEnforcement :: Maybe (Value Bool)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
allowedOrigins :: Maybe (ValueList Text)
enableStrictOriginEnforcement :: Maybe (Value Bool)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "AllowedOrigins" PlaybackRestrictionPolicy where
type PropertyType "AllowedOrigins" PlaybackRestrictionPolicy = ValueList Prelude.Text
set :: PropertyType "AllowedOrigins" PlaybackRestrictionPolicy
-> PlaybackRestrictionPolicy -> PlaybackRestrictionPolicy
set PropertyType "AllowedOrigins" PlaybackRestrictionPolicy
newValue PlaybackRestrictionPolicy {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: PlaybackRestrictionPolicy -> ()
allowedCountries :: PlaybackRestrictionPolicy -> Maybe (ValueList Text)
allowedOrigins :: PlaybackRestrictionPolicy -> Maybe (ValueList Text)
enableStrictOriginEnforcement :: PlaybackRestrictionPolicy -> Maybe (Value Bool)
name :: PlaybackRestrictionPolicy -> Maybe (Value Text)
tags :: PlaybackRestrictionPolicy -> Maybe [Tag]
haddock_workaround_ :: ()
allowedCountries :: Maybe (ValueList Text)
allowedOrigins :: Maybe (ValueList Text)
enableStrictOriginEnforcement :: Maybe (Value Bool)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= PlaybackRestrictionPolicy
{allowedOrigins :: Maybe (ValueList Text)
allowedOrigins = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AllowedOrigins" PlaybackRestrictionPolicy
ValueList Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
allowedCountries :: Maybe (ValueList Text)
enableStrictOriginEnforcement :: Maybe (Value Bool)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
allowedCountries :: Maybe (ValueList Text)
enableStrictOriginEnforcement :: Maybe (Value Bool)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "EnableStrictOriginEnforcement" PlaybackRestrictionPolicy where
type PropertyType "EnableStrictOriginEnforcement" PlaybackRestrictionPolicy = Value Prelude.Bool
set :: PropertyType
"EnableStrictOriginEnforcement" PlaybackRestrictionPolicy
-> PlaybackRestrictionPolicy -> PlaybackRestrictionPolicy
set PropertyType
"EnableStrictOriginEnforcement" PlaybackRestrictionPolicy
newValue PlaybackRestrictionPolicy {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: PlaybackRestrictionPolicy -> ()
allowedCountries :: PlaybackRestrictionPolicy -> Maybe (ValueList Text)
allowedOrigins :: PlaybackRestrictionPolicy -> Maybe (ValueList Text)
enableStrictOriginEnforcement :: PlaybackRestrictionPolicy -> Maybe (Value Bool)
name :: PlaybackRestrictionPolicy -> Maybe (Value Text)
tags :: PlaybackRestrictionPolicy -> Maybe [Tag]
haddock_workaround_ :: ()
allowedCountries :: Maybe (ValueList Text)
allowedOrigins :: Maybe (ValueList Text)
enableStrictOriginEnforcement :: Maybe (Value Bool)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= PlaybackRestrictionPolicy
{enableStrictOriginEnforcement :: Maybe (Value Bool)
enableStrictOriginEnforcement = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"EnableStrictOriginEnforcement" PlaybackRestrictionPolicy
Value Bool
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
allowedCountries :: Maybe (ValueList Text)
allowedOrigins :: Maybe (ValueList Text)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
allowedCountries :: Maybe (ValueList Text)
allowedOrigins :: Maybe (ValueList Text)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Name" PlaybackRestrictionPolicy where
type PropertyType "Name" PlaybackRestrictionPolicy = Value Prelude.Text
set :: PropertyType "Name" PlaybackRestrictionPolicy
-> PlaybackRestrictionPolicy -> PlaybackRestrictionPolicy
set PropertyType "Name" PlaybackRestrictionPolicy
newValue PlaybackRestrictionPolicy {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: PlaybackRestrictionPolicy -> ()
allowedCountries :: PlaybackRestrictionPolicy -> Maybe (ValueList Text)
allowedOrigins :: PlaybackRestrictionPolicy -> Maybe (ValueList Text)
enableStrictOriginEnforcement :: PlaybackRestrictionPolicy -> Maybe (Value Bool)
name :: PlaybackRestrictionPolicy -> Maybe (Value Text)
tags :: PlaybackRestrictionPolicy -> Maybe [Tag]
haddock_workaround_ :: ()
allowedCountries :: Maybe (ValueList Text)
allowedOrigins :: Maybe (ValueList Text)
enableStrictOriginEnforcement :: Maybe (Value Bool)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= PlaybackRestrictionPolicy {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" PlaybackRestrictionPolicy
Value Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
()
haddock_workaround_ :: ()
allowedCountries :: Maybe (ValueList Text)
allowedOrigins :: Maybe (ValueList Text)
enableStrictOriginEnforcement :: Maybe (Value Bool)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
allowedCountries :: Maybe (ValueList Text)
allowedOrigins :: Maybe (ValueList Text)
enableStrictOriginEnforcement :: Maybe (Value Bool)
tags :: Maybe [Tag]
..}
instance Property "Tags" PlaybackRestrictionPolicy where
type PropertyType "Tags" PlaybackRestrictionPolicy = [Tag]
set :: PropertyType "Tags" PlaybackRestrictionPolicy
-> PlaybackRestrictionPolicy -> PlaybackRestrictionPolicy
set PropertyType "Tags" PlaybackRestrictionPolicy
newValue PlaybackRestrictionPolicy {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: PlaybackRestrictionPolicy -> ()
allowedCountries :: PlaybackRestrictionPolicy -> Maybe (ValueList Text)
allowedOrigins :: PlaybackRestrictionPolicy -> Maybe (ValueList Text)
enableStrictOriginEnforcement :: PlaybackRestrictionPolicy -> Maybe (Value Bool)
name :: PlaybackRestrictionPolicy -> Maybe (Value Text)
tags :: PlaybackRestrictionPolicy -> Maybe [Tag]
haddock_workaround_ :: ()
allowedCountries :: Maybe (ValueList Text)
allowedOrigins :: Maybe (ValueList Text)
enableStrictOriginEnforcement :: Maybe (Value Bool)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= PlaybackRestrictionPolicy {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" PlaybackRestrictionPolicy
newValue, Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
allowedCountries :: Maybe (ValueList Text)
allowedOrigins :: Maybe (ValueList Text)
enableStrictOriginEnforcement :: Maybe (Value Bool)
name :: Maybe (Value Text)
haddock_workaround_ :: ()
allowedCountries :: Maybe (ValueList Text)
allowedOrigins :: Maybe (ValueList Text)
enableStrictOriginEnforcement :: Maybe (Value Bool)
name :: Maybe (Value Text)
..}