module Stratosphere.MediaTailor.PlaybackConfiguration.LivePreRollConfigurationProperty (
LivePreRollConfigurationProperty(..),
mkLivePreRollConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LivePreRollConfigurationProperty
=
LivePreRollConfigurationProperty {LivePreRollConfigurationProperty -> ()
haddock_workaround_ :: (),
LivePreRollConfigurationProperty -> Maybe (Value Text)
adDecisionServerUrl :: (Prelude.Maybe (Value Prelude.Text)),
LivePreRollConfigurationProperty -> Maybe (Value Integer)
maxDurationSeconds :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (LivePreRollConfigurationProperty
-> LivePreRollConfigurationProperty -> Bool
(LivePreRollConfigurationProperty
-> LivePreRollConfigurationProperty -> Bool)
-> (LivePreRollConfigurationProperty
-> LivePreRollConfigurationProperty -> Bool)
-> Eq LivePreRollConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LivePreRollConfigurationProperty
-> LivePreRollConfigurationProperty -> Bool
== :: LivePreRollConfigurationProperty
-> LivePreRollConfigurationProperty -> Bool
$c/= :: LivePreRollConfigurationProperty
-> LivePreRollConfigurationProperty -> Bool
/= :: LivePreRollConfigurationProperty
-> LivePreRollConfigurationProperty -> Bool
Prelude.Eq, Int -> LivePreRollConfigurationProperty -> ShowS
[LivePreRollConfigurationProperty] -> ShowS
LivePreRollConfigurationProperty -> String
(Int -> LivePreRollConfigurationProperty -> ShowS)
-> (LivePreRollConfigurationProperty -> String)
-> ([LivePreRollConfigurationProperty] -> ShowS)
-> Show LivePreRollConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LivePreRollConfigurationProperty -> ShowS
showsPrec :: Int -> LivePreRollConfigurationProperty -> ShowS
$cshow :: LivePreRollConfigurationProperty -> String
show :: LivePreRollConfigurationProperty -> String
$cshowList :: [LivePreRollConfigurationProperty] -> ShowS
showList :: [LivePreRollConfigurationProperty] -> ShowS
Prelude.Show)
mkLivePreRollConfigurationProperty ::
LivePreRollConfigurationProperty
mkLivePreRollConfigurationProperty :: LivePreRollConfigurationProperty
mkLivePreRollConfigurationProperty
= LivePreRollConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), adDecisionServerUrl :: Maybe (Value Text)
adDecisionServerUrl = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
maxDurationSeconds :: Maybe (Value Integer)
maxDurationSeconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LivePreRollConfigurationProperty where
toResourceProperties :: LivePreRollConfigurationProperty -> ResourceProperties
toResourceProperties LivePreRollConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: LivePreRollConfigurationProperty -> ()
adDecisionServerUrl :: LivePreRollConfigurationProperty -> Maybe (Value Text)
maxDurationSeconds :: LivePreRollConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
adDecisionServerUrl :: Maybe (Value Text)
maxDurationSeconds :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::MediaTailor::PlaybackConfiguration.LivePreRollConfiguration",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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 -> 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
"AdDecisionServerUrl" (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)
adDecisionServerUrl,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaxDurationSeconds" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
maxDurationSeconds])}
instance JSON.ToJSON LivePreRollConfigurationProperty where
toJSON :: LivePreRollConfigurationProperty -> Value
toJSON LivePreRollConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: LivePreRollConfigurationProperty -> ()
adDecisionServerUrl :: LivePreRollConfigurationProperty -> Maybe (Value Text)
maxDurationSeconds :: LivePreRollConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
adDecisionServerUrl :: Maybe (Value Text)
maxDurationSeconds :: Maybe (Value Integer)
..}
= [(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 -> 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
"AdDecisionServerUrl" (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)
adDecisionServerUrl,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaxDurationSeconds" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
maxDurationSeconds]))
instance Property "AdDecisionServerUrl" LivePreRollConfigurationProperty where
type PropertyType "AdDecisionServerUrl" LivePreRollConfigurationProperty = Value Prelude.Text
set :: PropertyType "AdDecisionServerUrl" LivePreRollConfigurationProperty
-> LivePreRollConfigurationProperty
-> LivePreRollConfigurationProperty
set PropertyType "AdDecisionServerUrl" LivePreRollConfigurationProperty
newValue LivePreRollConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: LivePreRollConfigurationProperty -> ()
adDecisionServerUrl :: LivePreRollConfigurationProperty -> Maybe (Value Text)
maxDurationSeconds :: LivePreRollConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
adDecisionServerUrl :: Maybe (Value Text)
maxDurationSeconds :: Maybe (Value Integer)
..}
= LivePreRollConfigurationProperty
{adDecisionServerUrl :: Maybe (Value Text)
adDecisionServerUrl = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AdDecisionServerUrl" LivePreRollConfigurationProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
maxDurationSeconds :: Maybe (Value Integer)
haddock_workaround_ :: ()
maxDurationSeconds :: Maybe (Value Integer)
..}
instance Property "MaxDurationSeconds" LivePreRollConfigurationProperty where
type PropertyType "MaxDurationSeconds" LivePreRollConfigurationProperty = Value Prelude.Integer
set :: PropertyType "MaxDurationSeconds" LivePreRollConfigurationProperty
-> LivePreRollConfigurationProperty
-> LivePreRollConfigurationProperty
set PropertyType "MaxDurationSeconds" LivePreRollConfigurationProperty
newValue LivePreRollConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: LivePreRollConfigurationProperty -> ()
adDecisionServerUrl :: LivePreRollConfigurationProperty -> Maybe (Value Text)
maxDurationSeconds :: LivePreRollConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
adDecisionServerUrl :: Maybe (Value Text)
maxDurationSeconds :: Maybe (Value Integer)
..}
= LivePreRollConfigurationProperty
{maxDurationSeconds :: Maybe (Value Integer)
maxDurationSeconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaxDurationSeconds" LivePreRollConfigurationProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
adDecisionServerUrl :: Maybe (Value Text)
haddock_workaround_ :: ()
adDecisionServerUrl :: Maybe (Value Text)
..}