module Stratosphere.MediaConnect.Bridge.MulticastSourceSettingsProperty (
        MulticastSourceSettingsProperty(..),
        mkMulticastSourceSettingsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MulticastSourceSettingsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-bridge-multicastsourcesettings.html>
    MulticastSourceSettingsProperty {MulticastSourceSettingsProperty -> ()
haddock_workaround_ :: (),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-bridge-multicastsourcesettings.html#cfn-mediaconnect-bridge-multicastsourcesettings-multicastsourceip>
                                     MulticastSourceSettingsProperty -> Maybe (Value Text)
multicastSourceIp :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (MulticastSourceSettingsProperty
-> MulticastSourceSettingsProperty -> Bool
(MulticastSourceSettingsProperty
 -> MulticastSourceSettingsProperty -> Bool)
-> (MulticastSourceSettingsProperty
    -> MulticastSourceSettingsProperty -> Bool)
-> Eq MulticastSourceSettingsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MulticastSourceSettingsProperty
-> MulticastSourceSettingsProperty -> Bool
== :: MulticastSourceSettingsProperty
-> MulticastSourceSettingsProperty -> Bool
$c/= :: MulticastSourceSettingsProperty
-> MulticastSourceSettingsProperty -> Bool
/= :: MulticastSourceSettingsProperty
-> MulticastSourceSettingsProperty -> Bool
Prelude.Eq, Int -> MulticastSourceSettingsProperty -> ShowS
[MulticastSourceSettingsProperty] -> ShowS
MulticastSourceSettingsProperty -> String
(Int -> MulticastSourceSettingsProperty -> ShowS)
-> (MulticastSourceSettingsProperty -> String)
-> ([MulticastSourceSettingsProperty] -> ShowS)
-> Show MulticastSourceSettingsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MulticastSourceSettingsProperty -> ShowS
showsPrec :: Int -> MulticastSourceSettingsProperty -> ShowS
$cshow :: MulticastSourceSettingsProperty -> String
show :: MulticastSourceSettingsProperty -> String
$cshowList :: [MulticastSourceSettingsProperty] -> ShowS
showList :: [MulticastSourceSettingsProperty] -> ShowS
Prelude.Show)
mkMulticastSourceSettingsProperty ::
  MulticastSourceSettingsProperty
mkMulticastSourceSettingsProperty :: MulticastSourceSettingsProperty
mkMulticastSourceSettingsProperty
  = MulticastSourceSettingsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), multicastSourceIp :: Maybe (Value Text)
multicastSourceIp = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MulticastSourceSettingsProperty where
  toResourceProperties :: MulticastSourceSettingsProperty -> ResourceProperties
toResourceProperties MulticastSourceSettingsProperty {Maybe (Value Text)
()
haddock_workaround_ :: MulticastSourceSettingsProperty -> ()
multicastSourceIp :: MulticastSourceSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
multicastSourceIp :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaConnect::Bridge.MulticastSourceSettings",
         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
"MulticastSourceIp" (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)
multicastSourceIp])}
instance JSON.ToJSON MulticastSourceSettingsProperty where
  toJSON :: MulticastSourceSettingsProperty -> Value
toJSON MulticastSourceSettingsProperty {Maybe (Value Text)
()
haddock_workaround_ :: MulticastSourceSettingsProperty -> ()
multicastSourceIp :: MulticastSourceSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
multicastSourceIp :: 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
"MulticastSourceIp" (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)
multicastSourceIp]))
instance Property "MulticastSourceIp" MulticastSourceSettingsProperty where
  type PropertyType "MulticastSourceIp" MulticastSourceSettingsProperty = Value Prelude.Text
  set :: PropertyType "MulticastSourceIp" MulticastSourceSettingsProperty
-> MulticastSourceSettingsProperty
-> MulticastSourceSettingsProperty
set PropertyType "MulticastSourceIp" MulticastSourceSettingsProperty
newValue MulticastSourceSettingsProperty {Maybe (Value Text)
()
haddock_workaround_ :: MulticastSourceSettingsProperty -> ()
multicastSourceIp :: MulticastSourceSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
multicastSourceIp :: Maybe (Value Text)
..}
    = MulticastSourceSettingsProperty
        {multicastSourceIp :: Maybe (Value Text)
multicastSourceIp = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MulticastSourceIp" MulticastSourceSettingsProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}