module Stratosphere.WAF.WebACL.ActivatedRuleProperty (
module Exports, ActivatedRuleProperty(..), mkActivatedRuleProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.WAF.WebACL.WafActionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ActivatedRuleProperty
=
ActivatedRuleProperty {ActivatedRuleProperty -> ()
haddock_workaround_ :: (),
ActivatedRuleProperty -> Maybe WafActionProperty
action :: (Prelude.Maybe WafActionProperty),
ActivatedRuleProperty -> Value Integer
priority :: (Value Prelude.Integer),
ActivatedRuleProperty -> Value Text
ruleId :: (Value Prelude.Text)}
deriving stock (ActivatedRuleProperty -> ActivatedRuleProperty -> Bool
(ActivatedRuleProperty -> ActivatedRuleProperty -> Bool)
-> (ActivatedRuleProperty -> ActivatedRuleProperty -> Bool)
-> Eq ActivatedRuleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ActivatedRuleProperty -> ActivatedRuleProperty -> Bool
== :: ActivatedRuleProperty -> ActivatedRuleProperty -> Bool
$c/= :: ActivatedRuleProperty -> ActivatedRuleProperty -> Bool
/= :: ActivatedRuleProperty -> ActivatedRuleProperty -> Bool
Prelude.Eq, Int -> ActivatedRuleProperty -> ShowS
[ActivatedRuleProperty] -> ShowS
ActivatedRuleProperty -> String
(Int -> ActivatedRuleProperty -> ShowS)
-> (ActivatedRuleProperty -> String)
-> ([ActivatedRuleProperty] -> ShowS)
-> Show ActivatedRuleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ActivatedRuleProperty -> ShowS
showsPrec :: Int -> ActivatedRuleProperty -> ShowS
$cshow :: ActivatedRuleProperty -> String
show :: ActivatedRuleProperty -> String
$cshowList :: [ActivatedRuleProperty] -> ShowS
showList :: [ActivatedRuleProperty] -> ShowS
Prelude.Show)
mkActivatedRuleProperty ::
Value Prelude.Integer
-> Value Prelude.Text -> ActivatedRuleProperty
mkActivatedRuleProperty :: Value Integer -> Value Text -> ActivatedRuleProperty
mkActivatedRuleProperty Value Integer
priority Value Text
ruleId
= ActivatedRuleProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), priority :: Value Integer
priority = Value Integer
priority, ruleId :: Value Text
ruleId = Value Text
ruleId,
action :: Maybe WafActionProperty
action = Maybe WafActionProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ActivatedRuleProperty where
toResourceProperties :: ActivatedRuleProperty -> ResourceProperties
toResourceProperties ActivatedRuleProperty {Maybe WafActionProperty
()
Value Integer
Value Text
haddock_workaround_ :: ActivatedRuleProperty -> ()
action :: ActivatedRuleProperty -> Maybe WafActionProperty
priority :: ActivatedRuleProperty -> Value Integer
ruleId :: ActivatedRuleProperty -> Value Text
haddock_workaround_ :: ()
action :: Maybe WafActionProperty
priority :: Value Integer
ruleId :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::WAF::WebACL.ActivatedRule",
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
"Priority" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
priority, Key
"RuleId" 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
ruleId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> WafActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Action" (WafActionProperty -> (Key, Value))
-> Maybe WafActionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WafActionProperty
action]))}
instance JSON.ToJSON ActivatedRuleProperty where
toJSON :: ActivatedRuleProperty -> Value
toJSON ActivatedRuleProperty {Maybe WafActionProperty
()
Value Integer
Value Text
haddock_workaround_ :: ActivatedRuleProperty -> ()
action :: ActivatedRuleProperty -> Maybe WafActionProperty
priority :: ActivatedRuleProperty -> Value Integer
ruleId :: ActivatedRuleProperty -> Value Text
haddock_workaround_ :: ()
action :: Maybe WafActionProperty
priority :: Value Integer
ruleId :: Value Text
..}
= [(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
"Priority" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
priority, Key
"RuleId" 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
ruleId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> WafActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Action" (WafActionProperty -> (Key, Value))
-> Maybe WafActionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WafActionProperty
action])))
instance Property "Action" ActivatedRuleProperty where
type PropertyType "Action" ActivatedRuleProperty = WafActionProperty
set :: PropertyType "Action" ActivatedRuleProperty
-> ActivatedRuleProperty -> ActivatedRuleProperty
set PropertyType "Action" ActivatedRuleProperty
newValue ActivatedRuleProperty {Maybe WafActionProperty
()
Value Integer
Value Text
haddock_workaround_ :: ActivatedRuleProperty -> ()
action :: ActivatedRuleProperty -> Maybe WafActionProperty
priority :: ActivatedRuleProperty -> Value Integer
ruleId :: ActivatedRuleProperty -> Value Text
haddock_workaround_ :: ()
action :: Maybe WafActionProperty
priority :: Value Integer
ruleId :: Value Text
..}
= ActivatedRuleProperty {action :: Maybe WafActionProperty
action = WafActionProperty -> Maybe WafActionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Action" ActivatedRuleProperty
WafActionProperty
newValue, ()
Value Integer
Value Text
haddock_workaround_ :: ()
priority :: Value Integer
ruleId :: Value Text
haddock_workaround_ :: ()
priority :: Value Integer
ruleId :: Value Text
..}
instance Property "Priority" ActivatedRuleProperty where
type PropertyType "Priority" ActivatedRuleProperty = Value Prelude.Integer
set :: PropertyType "Priority" ActivatedRuleProperty
-> ActivatedRuleProperty -> ActivatedRuleProperty
set PropertyType "Priority" ActivatedRuleProperty
newValue ActivatedRuleProperty {Maybe WafActionProperty
()
Value Integer
Value Text
haddock_workaround_ :: ActivatedRuleProperty -> ()
action :: ActivatedRuleProperty -> Maybe WafActionProperty
priority :: ActivatedRuleProperty -> Value Integer
ruleId :: ActivatedRuleProperty -> Value Text
haddock_workaround_ :: ()
action :: Maybe WafActionProperty
priority :: Value Integer
ruleId :: Value Text
..}
= ActivatedRuleProperty {priority :: Value Integer
priority = PropertyType "Priority" ActivatedRuleProperty
Value Integer
newValue, Maybe WafActionProperty
()
Value Text
haddock_workaround_ :: ()
action :: Maybe WafActionProperty
ruleId :: Value Text
haddock_workaround_ :: ()
action :: Maybe WafActionProperty
ruleId :: Value Text
..}
instance Property "RuleId" ActivatedRuleProperty where
type PropertyType "RuleId" ActivatedRuleProperty = Value Prelude.Text
set :: PropertyType "RuleId" ActivatedRuleProperty
-> ActivatedRuleProperty -> ActivatedRuleProperty
set PropertyType "RuleId" ActivatedRuleProperty
newValue ActivatedRuleProperty {Maybe WafActionProperty
()
Value Integer
Value Text
haddock_workaround_ :: ActivatedRuleProperty -> ()
action :: ActivatedRuleProperty -> Maybe WafActionProperty
priority :: ActivatedRuleProperty -> Value Integer
ruleId :: ActivatedRuleProperty -> Value Text
haddock_workaround_ :: ()
action :: Maybe WafActionProperty
priority :: Value Integer
ruleId :: Value Text
..}
= ActivatedRuleProperty {ruleId :: Value Text
ruleId = PropertyType "RuleId" ActivatedRuleProperty
Value Text
newValue, Maybe WafActionProperty
()
Value Integer
haddock_workaround_ :: ()
action :: Maybe WafActionProperty
priority :: Value Integer
haddock_workaround_ :: ()
action :: Maybe WafActionProperty
priority :: Value Integer
..}