module Stratosphere.NetworkFirewall.RuleGroup.RuleVariablesProperty (
module Exports, RuleVariablesProperty(..), mkRuleVariablesProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.NetworkFirewall.RuleGroup.IPSetProperty as Exports
import {-# SOURCE #-} Stratosphere.NetworkFirewall.RuleGroup.PortSetProperty as Exports
import Stratosphere.ResourceProperties
data RuleVariablesProperty
=
RuleVariablesProperty {RuleVariablesProperty -> ()
haddock_workaround_ :: (),
RuleVariablesProperty -> Maybe (Map Text IPSetProperty)
iPSets :: (Prelude.Maybe (Prelude.Map Prelude.Text IPSetProperty)),
RuleVariablesProperty -> Maybe (Map Text PortSetProperty)
portSets :: (Prelude.Maybe (Prelude.Map Prelude.Text PortSetProperty))}
deriving stock (RuleVariablesProperty -> RuleVariablesProperty -> Bool
(RuleVariablesProperty -> RuleVariablesProperty -> Bool)
-> (RuleVariablesProperty -> RuleVariablesProperty -> Bool)
-> Eq RuleVariablesProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RuleVariablesProperty -> RuleVariablesProperty -> Bool
== :: RuleVariablesProperty -> RuleVariablesProperty -> Bool
$c/= :: RuleVariablesProperty -> RuleVariablesProperty -> Bool
/= :: RuleVariablesProperty -> RuleVariablesProperty -> Bool
Prelude.Eq, Int -> RuleVariablesProperty -> ShowS
[RuleVariablesProperty] -> ShowS
RuleVariablesProperty -> String
(Int -> RuleVariablesProperty -> ShowS)
-> (RuleVariablesProperty -> String)
-> ([RuleVariablesProperty] -> ShowS)
-> Show RuleVariablesProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RuleVariablesProperty -> ShowS
showsPrec :: Int -> RuleVariablesProperty -> ShowS
$cshow :: RuleVariablesProperty -> String
show :: RuleVariablesProperty -> String
$cshowList :: [RuleVariablesProperty] -> ShowS
showList :: [RuleVariablesProperty] -> ShowS
Prelude.Show)
mkRuleVariablesProperty :: RuleVariablesProperty
mkRuleVariablesProperty :: RuleVariablesProperty
mkRuleVariablesProperty
= RuleVariablesProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), iPSets :: Maybe (Map Text IPSetProperty)
iPSets = Maybe (Map Text IPSetProperty)
forall a. Maybe a
Prelude.Nothing,
portSets :: Maybe (Map Text PortSetProperty)
portSets = Maybe (Map Text PortSetProperty)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RuleVariablesProperty where
toResourceProperties :: RuleVariablesProperty -> ResourceProperties
toResourceProperties RuleVariablesProperty {Maybe (Map Text IPSetProperty)
Maybe (Map Text PortSetProperty)
()
haddock_workaround_ :: RuleVariablesProperty -> ()
iPSets :: RuleVariablesProperty -> Maybe (Map Text IPSetProperty)
portSets :: RuleVariablesProperty -> Maybe (Map Text PortSetProperty)
haddock_workaround_ :: ()
iPSets :: Maybe (Map Text IPSetProperty)
portSets :: Maybe (Map Text PortSetProperty)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::NetworkFirewall::RuleGroup.RuleVariables",
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 -> Map Text IPSetProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IPSets" (Map Text IPSetProperty -> (Key, Value))
-> Maybe (Map Text IPSetProperty) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text IPSetProperty)
iPSets,
Key -> Map Text PortSetProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PortSets" (Map Text PortSetProperty -> (Key, Value))
-> Maybe (Map Text PortSetProperty) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text PortSetProperty)
portSets])}
instance JSON.ToJSON RuleVariablesProperty where
toJSON :: RuleVariablesProperty -> Value
toJSON RuleVariablesProperty {Maybe (Map Text IPSetProperty)
Maybe (Map Text PortSetProperty)
()
haddock_workaround_ :: RuleVariablesProperty -> ()
iPSets :: RuleVariablesProperty -> Maybe (Map Text IPSetProperty)
portSets :: RuleVariablesProperty -> Maybe (Map Text PortSetProperty)
haddock_workaround_ :: ()
iPSets :: Maybe (Map Text IPSetProperty)
portSets :: Maybe (Map Text PortSetProperty)
..}
= [(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 -> Map Text IPSetProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IPSets" (Map Text IPSetProperty -> (Key, Value))
-> Maybe (Map Text IPSetProperty) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text IPSetProperty)
iPSets,
Key -> Map Text PortSetProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PortSets" (Map Text PortSetProperty -> (Key, Value))
-> Maybe (Map Text PortSetProperty) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text PortSetProperty)
portSets]))
instance Property "IPSets" RuleVariablesProperty where
type PropertyType "IPSets" RuleVariablesProperty = Prelude.Map Prelude.Text IPSetProperty
set :: PropertyType "IPSets" RuleVariablesProperty
-> RuleVariablesProperty -> RuleVariablesProperty
set PropertyType "IPSets" RuleVariablesProperty
newValue RuleVariablesProperty {Maybe (Map Text IPSetProperty)
Maybe (Map Text PortSetProperty)
()
haddock_workaround_ :: RuleVariablesProperty -> ()
iPSets :: RuleVariablesProperty -> Maybe (Map Text IPSetProperty)
portSets :: RuleVariablesProperty -> Maybe (Map Text PortSetProperty)
haddock_workaround_ :: ()
iPSets :: Maybe (Map Text IPSetProperty)
portSets :: Maybe (Map Text PortSetProperty)
..}
= RuleVariablesProperty {iPSets :: Maybe (Map Text IPSetProperty)
iPSets = Map Text IPSetProperty -> Maybe (Map Text IPSetProperty)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text IPSetProperty
PropertyType "IPSets" RuleVariablesProperty
newValue, Maybe (Map Text PortSetProperty)
()
haddock_workaround_ :: ()
portSets :: Maybe (Map Text PortSetProperty)
haddock_workaround_ :: ()
portSets :: Maybe (Map Text PortSetProperty)
..}
instance Property "PortSets" RuleVariablesProperty where
type PropertyType "PortSets" RuleVariablesProperty = Prelude.Map Prelude.Text PortSetProperty
set :: PropertyType "PortSets" RuleVariablesProperty
-> RuleVariablesProperty -> RuleVariablesProperty
set PropertyType "PortSets" RuleVariablesProperty
newValue RuleVariablesProperty {Maybe (Map Text IPSetProperty)
Maybe (Map Text PortSetProperty)
()
haddock_workaround_ :: RuleVariablesProperty -> ()
iPSets :: RuleVariablesProperty -> Maybe (Map Text IPSetProperty)
portSets :: RuleVariablesProperty -> Maybe (Map Text PortSetProperty)
haddock_workaround_ :: ()
iPSets :: Maybe (Map Text IPSetProperty)
portSets :: Maybe (Map Text PortSetProperty)
..}
= RuleVariablesProperty {portSets :: Maybe (Map Text PortSetProperty)
portSets = Map Text PortSetProperty -> Maybe (Map Text PortSetProperty)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text PortSetProperty
PropertyType "PortSets" RuleVariablesProperty
newValue, Maybe (Map Text IPSetProperty)
()
haddock_workaround_ :: ()
iPSets :: Maybe (Map Text IPSetProperty)
haddock_workaround_ :: ()
iPSets :: Maybe (Map Text IPSetProperty)
..}