module Stratosphere.MediaConnect.BridgeSource (
        module Exports, BridgeSource(..), mkBridgeSource
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MediaConnect.BridgeSource.BridgeFlowSourceProperty as Exports
import {-# SOURCE #-} Stratosphere.MediaConnect.BridgeSource.BridgeNetworkSourceProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data BridgeSource
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-bridgesource.html>
    BridgeSource {BridgeSource -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-bridgesource.html#cfn-mediaconnect-bridgesource-bridgearn>
                  BridgeSource -> Value Text
bridgeArn :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-bridgesource.html#cfn-mediaconnect-bridgesource-flowsource>
                  BridgeSource -> Maybe BridgeFlowSourceProperty
flowSource :: (Prelude.Maybe BridgeFlowSourceProperty),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-bridgesource.html#cfn-mediaconnect-bridgesource-name>
                  BridgeSource -> Value Text
name :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-bridgesource.html#cfn-mediaconnect-bridgesource-networksource>
                  BridgeSource -> Maybe BridgeNetworkSourceProperty
networkSource :: (Prelude.Maybe BridgeNetworkSourceProperty)}
  deriving stock (BridgeSource -> BridgeSource -> Bool
(BridgeSource -> BridgeSource -> Bool)
-> (BridgeSource -> BridgeSource -> Bool) -> Eq BridgeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BridgeSource -> BridgeSource -> Bool
== :: BridgeSource -> BridgeSource -> Bool
$c/= :: BridgeSource -> BridgeSource -> Bool
/= :: BridgeSource -> BridgeSource -> Bool
Prelude.Eq, Int -> BridgeSource -> ShowS
[BridgeSource] -> ShowS
BridgeSource -> String
(Int -> BridgeSource -> ShowS)
-> (BridgeSource -> String)
-> ([BridgeSource] -> ShowS)
-> Show BridgeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BridgeSource -> ShowS
showsPrec :: Int -> BridgeSource -> ShowS
$cshow :: BridgeSource -> String
show :: BridgeSource -> String
$cshowList :: [BridgeSource] -> ShowS
showList :: [BridgeSource] -> ShowS
Prelude.Show)
mkBridgeSource ::
  Value Prelude.Text -> Value Prelude.Text -> BridgeSource
mkBridgeSource :: Value Text -> Value Text -> BridgeSource
mkBridgeSource Value Text
bridgeArn Value Text
name
  = BridgeSource
      {haddock_workaround_ :: ()
haddock_workaround_ = (), bridgeArn :: Value Text
bridgeArn = Value Text
bridgeArn, name :: Value Text
name = Value Text
name,
       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 BridgeSource where
  toResourceProperties :: BridgeSource -> ResourceProperties
toResourceProperties BridgeSource {Maybe BridgeNetworkSourceProperty
Maybe BridgeFlowSourceProperty
()
Value Text
haddock_workaround_ :: BridgeSource -> ()
bridgeArn :: BridgeSource -> Value Text
flowSource :: BridgeSource -> Maybe BridgeFlowSourceProperty
name :: BridgeSource -> Value Text
networkSource :: BridgeSource -> Maybe BridgeNetworkSourceProperty
haddock_workaround_ :: ()
bridgeArn :: Value Text
flowSource :: Maybe BridgeFlowSourceProperty
name :: Value Text
networkSource :: Maybe BridgeNetworkSourceProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaConnect::BridgeSource",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"BridgeArn" 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..= Value Text
bridgeArn, Key
"Name" 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..= Value Text
name]
                           ([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 BridgeSource where
  toJSON :: BridgeSource -> Value
toJSON BridgeSource {Maybe BridgeNetworkSourceProperty
Maybe BridgeFlowSourceProperty
()
Value Text
haddock_workaround_ :: BridgeSource -> ()
bridgeArn :: BridgeSource -> Value Text
flowSource :: BridgeSource -> Maybe BridgeFlowSourceProperty
name :: BridgeSource -> Value Text
networkSource :: BridgeSource -> Maybe BridgeNetworkSourceProperty
haddock_workaround_ :: ()
bridgeArn :: Value Text
flowSource :: Maybe BridgeFlowSourceProperty
name :: Value Text
networkSource :: Maybe BridgeNetworkSourceProperty
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"BridgeArn" 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..= Value Text
bridgeArn, Key
"Name" 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..= Value Text
name]
              ([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 "BridgeArn" BridgeSource where
  type PropertyType "BridgeArn" BridgeSource = Value Prelude.Text
  set :: PropertyType "BridgeArn" BridgeSource
-> BridgeSource -> BridgeSource
set PropertyType "BridgeArn" BridgeSource
newValue BridgeSource {Maybe BridgeNetworkSourceProperty
Maybe BridgeFlowSourceProperty
()
Value Text
haddock_workaround_ :: BridgeSource -> ()
bridgeArn :: BridgeSource -> Value Text
flowSource :: BridgeSource -> Maybe BridgeFlowSourceProperty
name :: BridgeSource -> Value Text
networkSource :: BridgeSource -> Maybe BridgeNetworkSourceProperty
haddock_workaround_ :: ()
bridgeArn :: Value Text
flowSource :: Maybe BridgeFlowSourceProperty
name :: Value Text
networkSource :: Maybe BridgeNetworkSourceProperty
..}
    = BridgeSource {bridgeArn :: Value Text
bridgeArn = PropertyType "BridgeArn" BridgeSource
Value Text
newValue, Maybe BridgeNetworkSourceProperty
Maybe BridgeFlowSourceProperty
()
Value Text
haddock_workaround_ :: ()
flowSource :: Maybe BridgeFlowSourceProperty
name :: Value Text
networkSource :: Maybe BridgeNetworkSourceProperty
haddock_workaround_ :: ()
flowSource :: Maybe BridgeFlowSourceProperty
name :: Value Text
networkSource :: Maybe BridgeNetworkSourceProperty
..}
instance Property "FlowSource" BridgeSource where
  type PropertyType "FlowSource" BridgeSource = BridgeFlowSourceProperty
  set :: PropertyType "FlowSource" BridgeSource
-> BridgeSource -> BridgeSource
set PropertyType "FlowSource" BridgeSource
newValue BridgeSource {Maybe BridgeNetworkSourceProperty
Maybe BridgeFlowSourceProperty
()
Value Text
haddock_workaround_ :: BridgeSource -> ()
bridgeArn :: BridgeSource -> Value Text
flowSource :: BridgeSource -> Maybe BridgeFlowSourceProperty
name :: BridgeSource -> Value Text
networkSource :: BridgeSource -> Maybe BridgeNetworkSourceProperty
haddock_workaround_ :: ()
bridgeArn :: Value Text
flowSource :: Maybe BridgeFlowSourceProperty
name :: Value Text
networkSource :: Maybe BridgeNetworkSourceProperty
..}
    = BridgeSource {flowSource :: Maybe BridgeFlowSourceProperty
flowSource = BridgeFlowSourceProperty -> Maybe BridgeFlowSourceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FlowSource" BridgeSource
BridgeFlowSourceProperty
newValue, Maybe BridgeNetworkSourceProperty
()
Value Text
haddock_workaround_ :: ()
bridgeArn :: Value Text
name :: Value Text
networkSource :: Maybe BridgeNetworkSourceProperty
haddock_workaround_ :: ()
bridgeArn :: Value Text
name :: Value Text
networkSource :: Maybe BridgeNetworkSourceProperty
..}
instance Property "Name" BridgeSource where
  type PropertyType "Name" BridgeSource = Value Prelude.Text
  set :: PropertyType "Name" BridgeSource -> BridgeSource -> BridgeSource
set PropertyType "Name" BridgeSource
newValue BridgeSource {Maybe BridgeNetworkSourceProperty
Maybe BridgeFlowSourceProperty
()
Value Text
haddock_workaround_ :: BridgeSource -> ()
bridgeArn :: BridgeSource -> Value Text
flowSource :: BridgeSource -> Maybe BridgeFlowSourceProperty
name :: BridgeSource -> Value Text
networkSource :: BridgeSource -> Maybe BridgeNetworkSourceProperty
haddock_workaround_ :: ()
bridgeArn :: Value Text
flowSource :: Maybe BridgeFlowSourceProperty
name :: Value Text
networkSource :: Maybe BridgeNetworkSourceProperty
..} = BridgeSource {name :: Value Text
name = PropertyType "Name" BridgeSource
Value Text
newValue, Maybe BridgeNetworkSourceProperty
Maybe BridgeFlowSourceProperty
()
Value Text
haddock_workaround_ :: ()
bridgeArn :: Value Text
flowSource :: Maybe BridgeFlowSourceProperty
networkSource :: Maybe BridgeNetworkSourceProperty
haddock_workaround_ :: ()
bridgeArn :: Value Text
flowSource :: Maybe BridgeFlowSourceProperty
networkSource :: Maybe BridgeNetworkSourceProperty
..}
instance Property "NetworkSource" BridgeSource where
  type PropertyType "NetworkSource" BridgeSource = BridgeNetworkSourceProperty
  set :: PropertyType "NetworkSource" BridgeSource
-> BridgeSource -> BridgeSource
set PropertyType "NetworkSource" BridgeSource
newValue BridgeSource {Maybe BridgeNetworkSourceProperty
Maybe BridgeFlowSourceProperty
()
Value Text
haddock_workaround_ :: BridgeSource -> ()
bridgeArn :: BridgeSource -> Value Text
flowSource :: BridgeSource -> Maybe BridgeFlowSourceProperty
name :: BridgeSource -> Value Text
networkSource :: BridgeSource -> Maybe BridgeNetworkSourceProperty
haddock_workaround_ :: ()
bridgeArn :: Value Text
flowSource :: Maybe BridgeFlowSourceProperty
name :: Value Text
networkSource :: Maybe BridgeNetworkSourceProperty
..}
    = BridgeSource {networkSource :: Maybe BridgeNetworkSourceProperty
networkSource = BridgeNetworkSourceProperty -> Maybe BridgeNetworkSourceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NetworkSource" BridgeSource
BridgeNetworkSourceProperty
newValue, Maybe BridgeFlowSourceProperty
()
Value Text
haddock_workaround_ :: ()
bridgeArn :: Value Text
flowSource :: Maybe BridgeFlowSourceProperty
name :: Value Text
haddock_workaround_ :: ()
bridgeArn :: Value Text
flowSource :: Maybe BridgeFlowSourceProperty
name :: Value Text
..}