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