module Stratosphere.MediaConnect.Bridge.BridgeSourceProperty (
module Exports, BridgeSourceProperty(..), mkBridgeSourceProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MediaConnect.Bridge.BridgeFlowSourceProperty as Exports
import {-# SOURCE #-} Stratosphere.MediaConnect.Bridge.BridgeNetworkSourceProperty as Exports
import Stratosphere.ResourceProperties
data BridgeSourceProperty
=
BridgeSourceProperty {BridgeSourceProperty -> ()
haddock_workaround_ :: (),
BridgeSourceProperty -> Maybe BridgeFlowSourceProperty
flowSource :: (Prelude.Maybe BridgeFlowSourceProperty),
BridgeSourceProperty -> Maybe BridgeNetworkSourceProperty
networkSource :: (Prelude.Maybe BridgeNetworkSourceProperty)}
deriving stock (BridgeSourceProperty -> BridgeSourceProperty -> Bool
(BridgeSourceProperty -> BridgeSourceProperty -> Bool)
-> (BridgeSourceProperty -> BridgeSourceProperty -> Bool)
-> Eq BridgeSourceProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BridgeSourceProperty -> BridgeSourceProperty -> Bool
== :: BridgeSourceProperty -> BridgeSourceProperty -> Bool
$c/= :: BridgeSourceProperty -> BridgeSourceProperty -> Bool
/= :: BridgeSourceProperty -> BridgeSourceProperty -> Bool
Prelude.Eq, Int -> BridgeSourceProperty -> ShowS
[BridgeSourceProperty] -> ShowS
BridgeSourceProperty -> String
(Int -> BridgeSourceProperty -> ShowS)
-> (BridgeSourceProperty -> String)
-> ([BridgeSourceProperty] -> ShowS)
-> Show BridgeSourceProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BridgeSourceProperty -> ShowS
showsPrec :: Int -> BridgeSourceProperty -> ShowS
$cshow :: BridgeSourceProperty -> String
show :: BridgeSourceProperty -> String
$cshowList :: [BridgeSourceProperty] -> ShowS
showList :: [BridgeSourceProperty] -> ShowS
Prelude.Show)
mkBridgeSourceProperty :: BridgeSourceProperty
mkBridgeSourceProperty :: BridgeSourceProperty
mkBridgeSourceProperty
= BridgeSourceProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), flowSource :: Maybe BridgeFlowSourceProperty
flowSource = Maybe BridgeFlowSourceProperty
forall a. Maybe a
Prelude.Nothing,
networkSource :: Maybe BridgeNetworkSourceProperty
networkSource = Maybe BridgeNetworkSourceProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BridgeSourceProperty where
toResourceProperties :: BridgeSourceProperty -> ResourceProperties
toResourceProperties BridgeSourceProperty {Maybe BridgeNetworkSourceProperty
Maybe BridgeFlowSourceProperty
()
haddock_workaround_ :: BridgeSourceProperty -> ()
flowSource :: BridgeSourceProperty -> Maybe BridgeFlowSourceProperty
networkSource :: BridgeSourceProperty -> Maybe BridgeNetworkSourceProperty
haddock_workaround_ :: ()
flowSource :: Maybe BridgeFlowSourceProperty
networkSource :: Maybe BridgeNetworkSourceProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::MediaConnect::Bridge.BridgeSource",
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 -> BridgeFlowSourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FlowSource" (BridgeFlowSourceProperty -> (Key, Value))
-> Maybe BridgeFlowSourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BridgeFlowSourceProperty
flowSource,
Key -> BridgeNetworkSourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NetworkSource" (BridgeNetworkSourceProperty -> (Key, Value))
-> Maybe BridgeNetworkSourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BridgeNetworkSourceProperty
networkSource])}
instance JSON.ToJSON BridgeSourceProperty where
toJSON :: BridgeSourceProperty -> Value
toJSON BridgeSourceProperty {Maybe BridgeNetworkSourceProperty
Maybe BridgeFlowSourceProperty
()
haddock_workaround_ :: BridgeSourceProperty -> ()
flowSource :: BridgeSourceProperty -> Maybe BridgeFlowSourceProperty
networkSource :: BridgeSourceProperty -> Maybe BridgeNetworkSourceProperty
haddock_workaround_ :: ()
flowSource :: Maybe BridgeFlowSourceProperty
networkSource :: Maybe BridgeNetworkSourceProperty
..}
= [(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 -> BridgeFlowSourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FlowSource" (BridgeFlowSourceProperty -> (Key, Value))
-> Maybe BridgeFlowSourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BridgeFlowSourceProperty
flowSource,
Key -> BridgeNetworkSourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NetworkSource" (BridgeNetworkSourceProperty -> (Key, Value))
-> Maybe BridgeNetworkSourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BridgeNetworkSourceProperty
networkSource]))
instance Property "FlowSource" BridgeSourceProperty where
type PropertyType "FlowSource" BridgeSourceProperty = BridgeFlowSourceProperty
set :: PropertyType "FlowSource" BridgeSourceProperty
-> BridgeSourceProperty -> BridgeSourceProperty
set PropertyType "FlowSource" BridgeSourceProperty
newValue BridgeSourceProperty {Maybe BridgeNetworkSourceProperty
Maybe BridgeFlowSourceProperty
()
haddock_workaround_ :: BridgeSourceProperty -> ()
flowSource :: BridgeSourceProperty -> Maybe BridgeFlowSourceProperty
networkSource :: BridgeSourceProperty -> Maybe BridgeNetworkSourceProperty
haddock_workaround_ :: ()
flowSource :: Maybe BridgeFlowSourceProperty
networkSource :: Maybe BridgeNetworkSourceProperty
..}
= BridgeSourceProperty {flowSource :: Maybe BridgeFlowSourceProperty
flowSource = BridgeFlowSourceProperty -> Maybe BridgeFlowSourceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FlowSource" BridgeSourceProperty
BridgeFlowSourceProperty
newValue, Maybe BridgeNetworkSourceProperty
()
haddock_workaround_ :: ()
networkSource :: Maybe BridgeNetworkSourceProperty
haddock_workaround_ :: ()
networkSource :: Maybe BridgeNetworkSourceProperty
..}
instance Property "NetworkSource" BridgeSourceProperty where
type PropertyType "NetworkSource" BridgeSourceProperty = BridgeNetworkSourceProperty
set :: PropertyType "NetworkSource" BridgeSourceProperty
-> BridgeSourceProperty -> BridgeSourceProperty
set PropertyType "NetworkSource" BridgeSourceProperty
newValue BridgeSourceProperty {Maybe BridgeNetworkSourceProperty
Maybe BridgeFlowSourceProperty
()
haddock_workaround_ :: BridgeSourceProperty -> ()
flowSource :: BridgeSourceProperty -> Maybe BridgeFlowSourceProperty
networkSource :: BridgeSourceProperty -> Maybe BridgeNetworkSourceProperty
haddock_workaround_ :: ()
flowSource :: Maybe BridgeFlowSourceProperty
networkSource :: Maybe BridgeNetworkSourceProperty
..}
= BridgeSourceProperty {networkSource :: Maybe BridgeNetworkSourceProperty
networkSource = BridgeNetworkSourceProperty -> Maybe BridgeNetworkSourceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NetworkSource" BridgeSourceProperty
BridgeNetworkSourceProperty
newValue, Maybe BridgeFlowSourceProperty
()
haddock_workaround_ :: ()
flowSource :: Maybe BridgeFlowSourceProperty
haddock_workaround_ :: ()
flowSource :: Maybe BridgeFlowSourceProperty
..}