module Stratosphere.NetworkFirewall.FirewallPolicy.PolicyVariablesProperty (
module Exports, PolicyVariablesProperty(..),
mkPolicyVariablesProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.NetworkFirewall.FirewallPolicy.IPSetProperty as Exports
import Stratosphere.ResourceProperties
data PolicyVariablesProperty
=
PolicyVariablesProperty {PolicyVariablesProperty -> ()
haddock_workaround_ :: (),
PolicyVariablesProperty -> Maybe (Map Text IPSetProperty)
ruleVariables :: (Prelude.Maybe (Prelude.Map Prelude.Text IPSetProperty))}
deriving stock (PolicyVariablesProperty -> PolicyVariablesProperty -> Bool
(PolicyVariablesProperty -> PolicyVariablesProperty -> Bool)
-> (PolicyVariablesProperty -> PolicyVariablesProperty -> Bool)
-> Eq PolicyVariablesProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PolicyVariablesProperty -> PolicyVariablesProperty -> Bool
== :: PolicyVariablesProperty -> PolicyVariablesProperty -> Bool
$c/= :: PolicyVariablesProperty -> PolicyVariablesProperty -> Bool
/= :: PolicyVariablesProperty -> PolicyVariablesProperty -> Bool
Prelude.Eq, Int -> PolicyVariablesProperty -> ShowS
[PolicyVariablesProperty] -> ShowS
PolicyVariablesProperty -> String
(Int -> PolicyVariablesProperty -> ShowS)
-> (PolicyVariablesProperty -> String)
-> ([PolicyVariablesProperty] -> ShowS)
-> Show PolicyVariablesProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PolicyVariablesProperty -> ShowS
showsPrec :: Int -> PolicyVariablesProperty -> ShowS
$cshow :: PolicyVariablesProperty -> String
show :: PolicyVariablesProperty -> String
$cshowList :: [PolicyVariablesProperty] -> ShowS
showList :: [PolicyVariablesProperty] -> ShowS
Prelude.Show)
mkPolicyVariablesProperty :: PolicyVariablesProperty
mkPolicyVariablesProperty :: PolicyVariablesProperty
mkPolicyVariablesProperty
= PolicyVariablesProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), ruleVariables :: Maybe (Map Text IPSetProperty)
ruleVariables = Maybe (Map Text IPSetProperty)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PolicyVariablesProperty where
toResourceProperties :: PolicyVariablesProperty -> ResourceProperties
toResourceProperties PolicyVariablesProperty {Maybe (Map Text IPSetProperty)
()
haddock_workaround_ :: PolicyVariablesProperty -> ()
ruleVariables :: PolicyVariablesProperty -> Maybe (Map Text IPSetProperty)
haddock_workaround_ :: ()
ruleVariables :: Maybe (Map Text IPSetProperty)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::NetworkFirewall::FirewallPolicy.PolicyVariables",
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
"RuleVariables" (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)
ruleVariables])}
instance JSON.ToJSON PolicyVariablesProperty where
toJSON :: PolicyVariablesProperty -> Value
toJSON PolicyVariablesProperty {Maybe (Map Text IPSetProperty)
()
haddock_workaround_ :: PolicyVariablesProperty -> ()
ruleVariables :: PolicyVariablesProperty -> Maybe (Map Text IPSetProperty)
haddock_workaround_ :: ()
ruleVariables :: Maybe (Map Text IPSetProperty)
..}
= [(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
"RuleVariables" (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)
ruleVariables]))
instance Property "RuleVariables" PolicyVariablesProperty where
type PropertyType "RuleVariables" PolicyVariablesProperty = Prelude.Map Prelude.Text IPSetProperty
set :: PropertyType "RuleVariables" PolicyVariablesProperty
-> PolicyVariablesProperty -> PolicyVariablesProperty
set PropertyType "RuleVariables" PolicyVariablesProperty
newValue PolicyVariablesProperty {Maybe (Map Text IPSetProperty)
()
haddock_workaround_ :: PolicyVariablesProperty -> ()
ruleVariables :: PolicyVariablesProperty -> Maybe (Map Text IPSetProperty)
haddock_workaround_ :: ()
ruleVariables :: Maybe (Map Text IPSetProperty)
..}
= PolicyVariablesProperty
{ruleVariables :: Maybe (Map Text IPSetProperty)
ruleVariables = 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 "RuleVariables" PolicyVariablesProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}