module Stratosphere.MediaConnect.Bridge.SourcePriorityProperty (
SourcePriorityProperty(..), mkSourcePriorityProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SourcePriorityProperty
=
SourcePriorityProperty {SourcePriorityProperty -> ()
haddock_workaround_ :: (),
SourcePriorityProperty -> Maybe (Value Text)
primarySource :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (SourcePriorityProperty -> SourcePriorityProperty -> Bool
(SourcePriorityProperty -> SourcePriorityProperty -> Bool)
-> (SourcePriorityProperty -> SourcePriorityProperty -> Bool)
-> Eq SourcePriorityProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SourcePriorityProperty -> SourcePriorityProperty -> Bool
== :: SourcePriorityProperty -> SourcePriorityProperty -> Bool
$c/= :: SourcePriorityProperty -> SourcePriorityProperty -> Bool
/= :: SourcePriorityProperty -> SourcePriorityProperty -> Bool
Prelude.Eq, Int -> SourcePriorityProperty -> ShowS
[SourcePriorityProperty] -> ShowS
SourcePriorityProperty -> String
(Int -> SourcePriorityProperty -> ShowS)
-> (SourcePriorityProperty -> String)
-> ([SourcePriorityProperty] -> ShowS)
-> Show SourcePriorityProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SourcePriorityProperty -> ShowS
showsPrec :: Int -> SourcePriorityProperty -> ShowS
$cshow :: SourcePriorityProperty -> String
show :: SourcePriorityProperty -> String
$cshowList :: [SourcePriorityProperty] -> ShowS
showList :: [SourcePriorityProperty] -> ShowS
Prelude.Show)
mkSourcePriorityProperty :: SourcePriorityProperty
mkSourcePriorityProperty :: SourcePriorityProperty
mkSourcePriorityProperty
= SourcePriorityProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), primarySource :: Maybe (Value Text)
primarySource = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SourcePriorityProperty where
toResourceProperties :: SourcePriorityProperty -> ResourceProperties
toResourceProperties SourcePriorityProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourcePriorityProperty -> ()
primarySource :: SourcePriorityProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
primarySource :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::MediaConnect::Bridge.SourcePriority",
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
"PrimarySource" (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)
primarySource])}
instance JSON.ToJSON SourcePriorityProperty where
toJSON :: SourcePriorityProperty -> Value
toJSON SourcePriorityProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourcePriorityProperty -> ()
primarySource :: SourcePriorityProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
primarySource :: Maybe (Value Text)
..}
= [(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
"PrimarySource" (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)
primarySource]))
instance Property "PrimarySource" SourcePriorityProperty where
type PropertyType "PrimarySource" SourcePriorityProperty = Value Prelude.Text
set :: PropertyType "PrimarySource" SourcePriorityProperty
-> SourcePriorityProperty -> SourcePriorityProperty
set PropertyType "PrimarySource" SourcePriorityProperty
newValue SourcePriorityProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourcePriorityProperty -> ()
primarySource :: SourcePriorityProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
primarySource :: Maybe (Value Text)
..}
= SourcePriorityProperty
{primarySource :: Maybe (Value Text)
primarySource = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PrimarySource" SourcePriorityProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}