module Stratosphere.WAFv2.RegexPatternSet (
RegexPatternSet(..), mkRegexPatternSet
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data RegexPatternSet
=
RegexPatternSet {RegexPatternSet -> ()
haddock_workaround_ :: (),
RegexPatternSet -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
RegexPatternSet -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
RegexPatternSet -> ValueList Text
regularExpressionList :: (ValueList Prelude.Text),
RegexPatternSet -> Value Text
scope :: (Value Prelude.Text),
RegexPatternSet -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (RegexPatternSet -> RegexPatternSet -> Bool
(RegexPatternSet -> RegexPatternSet -> Bool)
-> (RegexPatternSet -> RegexPatternSet -> Bool)
-> Eq RegexPatternSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RegexPatternSet -> RegexPatternSet -> Bool
== :: RegexPatternSet -> RegexPatternSet -> Bool
$c/= :: RegexPatternSet -> RegexPatternSet -> Bool
/= :: RegexPatternSet -> RegexPatternSet -> Bool
Prelude.Eq, Int -> RegexPatternSet -> ShowS
[RegexPatternSet] -> ShowS
RegexPatternSet -> String
(Int -> RegexPatternSet -> ShowS)
-> (RegexPatternSet -> String)
-> ([RegexPatternSet] -> ShowS)
-> Show RegexPatternSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RegexPatternSet -> ShowS
showsPrec :: Int -> RegexPatternSet -> ShowS
$cshow :: RegexPatternSet -> String
show :: RegexPatternSet -> String
$cshowList :: [RegexPatternSet] -> ShowS
showList :: [RegexPatternSet] -> ShowS
Prelude.Show)
mkRegexPatternSet ::
ValueList Prelude.Text -> Value Prelude.Text -> RegexPatternSet
mkRegexPatternSet :: ValueList Text -> Value Text -> RegexPatternSet
mkRegexPatternSet ValueList Text
regularExpressionList Value Text
scope
= RegexPatternSet
{haddock_workaround_ :: ()
haddock_workaround_ = (),
regularExpressionList :: ValueList Text
regularExpressionList = ValueList Text
regularExpressionList, scope :: Value Text
scope = Value Text
scope,
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RegexPatternSet where
toResourceProperties :: RegexPatternSet -> ResourceProperties
toResourceProperties RegexPatternSet {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: RegexPatternSet -> ()
description :: RegexPatternSet -> Maybe (Value Text)
name :: RegexPatternSet -> Maybe (Value Text)
regularExpressionList :: RegexPatternSet -> ValueList Text
scope :: RegexPatternSet -> Value Text
tags :: RegexPatternSet -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
regularExpressionList :: ValueList Text
scope :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::WAFv2::RegexPatternSet",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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
"RegularExpressionList" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
regularExpressionList,
Key
"Scope" 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
scope]
([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
"Description" (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)
description,
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
"Name" (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)
name,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON RegexPatternSet where
toJSON :: RegexPatternSet -> Value
toJSON RegexPatternSet {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: RegexPatternSet -> ()
description :: RegexPatternSet -> Maybe (Value Text)
name :: RegexPatternSet -> Maybe (Value Text)
regularExpressionList :: RegexPatternSet -> ValueList Text
scope :: RegexPatternSet -> Value Text
tags :: RegexPatternSet -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
regularExpressionList :: ValueList Text
scope :: Value Text
tags :: Maybe [Tag]
..}
= [(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
"RegularExpressionList" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
regularExpressionList,
Key
"Scope" 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
scope]
([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
"Description" (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)
description,
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
"Name" (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)
name,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "Description" RegexPatternSet where
type PropertyType "Description" RegexPatternSet = Value Prelude.Text
set :: PropertyType "Description" RegexPatternSet
-> RegexPatternSet -> RegexPatternSet
set PropertyType "Description" RegexPatternSet
newValue RegexPatternSet {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: RegexPatternSet -> ()
description :: RegexPatternSet -> Maybe (Value Text)
name :: RegexPatternSet -> Maybe (Value Text)
regularExpressionList :: RegexPatternSet -> ValueList Text
scope :: RegexPatternSet -> Value Text
tags :: RegexPatternSet -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
regularExpressionList :: ValueList Text
scope :: Value Text
tags :: Maybe [Tag]
..}
= RegexPatternSet {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" RegexPatternSet
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
regularExpressionList :: ValueList Text
scope :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
regularExpressionList :: ValueList Text
scope :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Name" RegexPatternSet where
type PropertyType "Name" RegexPatternSet = Value Prelude.Text
set :: PropertyType "Name" RegexPatternSet
-> RegexPatternSet -> RegexPatternSet
set PropertyType "Name" RegexPatternSet
newValue RegexPatternSet {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: RegexPatternSet -> ()
description :: RegexPatternSet -> Maybe (Value Text)
name :: RegexPatternSet -> Maybe (Value Text)
regularExpressionList :: RegexPatternSet -> ValueList Text
scope :: RegexPatternSet -> Value Text
tags :: RegexPatternSet -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
regularExpressionList :: ValueList Text
scope :: Value Text
tags :: Maybe [Tag]
..}
= RegexPatternSet {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" RegexPatternSet
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
regularExpressionList :: ValueList Text
scope :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
regularExpressionList :: ValueList Text
scope :: Value Text
tags :: Maybe [Tag]
..}
instance Property "RegularExpressionList" RegexPatternSet where
type PropertyType "RegularExpressionList" RegexPatternSet = ValueList Prelude.Text
set :: PropertyType "RegularExpressionList" RegexPatternSet
-> RegexPatternSet -> RegexPatternSet
set PropertyType "RegularExpressionList" RegexPatternSet
newValue RegexPatternSet {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: RegexPatternSet -> ()
description :: RegexPatternSet -> Maybe (Value Text)
name :: RegexPatternSet -> Maybe (Value Text)
regularExpressionList :: RegexPatternSet -> ValueList Text
scope :: RegexPatternSet -> Value Text
tags :: RegexPatternSet -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
regularExpressionList :: ValueList Text
scope :: Value Text
tags :: Maybe [Tag]
..}
= RegexPatternSet {regularExpressionList :: ValueList Text
regularExpressionList = PropertyType "RegularExpressionList" RegexPatternSet
ValueList Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
scope :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
scope :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Scope" RegexPatternSet where
type PropertyType "Scope" RegexPatternSet = Value Prelude.Text
set :: PropertyType "Scope" RegexPatternSet
-> RegexPatternSet -> RegexPatternSet
set PropertyType "Scope" RegexPatternSet
newValue RegexPatternSet {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: RegexPatternSet -> ()
description :: RegexPatternSet -> Maybe (Value Text)
name :: RegexPatternSet -> Maybe (Value Text)
regularExpressionList :: RegexPatternSet -> ValueList Text
scope :: RegexPatternSet -> Value Text
tags :: RegexPatternSet -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
regularExpressionList :: ValueList Text
scope :: Value Text
tags :: Maybe [Tag]
..}
= RegexPatternSet {scope :: Value Text
scope = PropertyType "Scope" RegexPatternSet
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
regularExpressionList :: ValueList Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
regularExpressionList :: ValueList Text
tags :: Maybe [Tag]
..}
instance Property "Tags" RegexPatternSet where
type PropertyType "Tags" RegexPatternSet = [Tag]
set :: PropertyType "Tags" RegexPatternSet
-> RegexPatternSet -> RegexPatternSet
set PropertyType "Tags" RegexPatternSet
newValue RegexPatternSet {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: RegexPatternSet -> ()
description :: RegexPatternSet -> Maybe (Value Text)
name :: RegexPatternSet -> Maybe (Value Text)
regularExpressionList :: RegexPatternSet -> ValueList Text
scope :: RegexPatternSet -> Value Text
tags :: RegexPatternSet -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
regularExpressionList :: ValueList Text
scope :: Value Text
tags :: Maybe [Tag]
..}
= RegexPatternSet {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" RegexPatternSet
newValue, Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
regularExpressionList :: ValueList Text
scope :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
regularExpressionList :: ValueList Text
scope :: Value Text
..}