module Stratosphere.WAFRegional.XssMatchSet (
module Exports, XssMatchSet(..), mkXssMatchSet
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.WAFRegional.XssMatchSet.XssMatchTupleProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data XssMatchSet
=
XssMatchSet {XssMatchSet -> ()
haddock_workaround_ :: (),
XssMatchSet -> Value Text
name :: (Value Prelude.Text),
XssMatchSet -> Maybe [XssMatchTupleProperty]
xssMatchTuples :: (Prelude.Maybe [XssMatchTupleProperty])}
deriving stock (XssMatchSet -> XssMatchSet -> Bool
(XssMatchSet -> XssMatchSet -> Bool)
-> (XssMatchSet -> XssMatchSet -> Bool) -> Eq XssMatchSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: XssMatchSet -> XssMatchSet -> Bool
== :: XssMatchSet -> XssMatchSet -> Bool
$c/= :: XssMatchSet -> XssMatchSet -> Bool
/= :: XssMatchSet -> XssMatchSet -> Bool
Prelude.Eq, Int -> XssMatchSet -> ShowS
[XssMatchSet] -> ShowS
XssMatchSet -> String
(Int -> XssMatchSet -> ShowS)
-> (XssMatchSet -> String)
-> ([XssMatchSet] -> ShowS)
-> Show XssMatchSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> XssMatchSet -> ShowS
showsPrec :: Int -> XssMatchSet -> ShowS
$cshow :: XssMatchSet -> String
show :: XssMatchSet -> String
$cshowList :: [XssMatchSet] -> ShowS
showList :: [XssMatchSet] -> ShowS
Prelude.Show)
mkXssMatchSet :: Value Prelude.Text -> XssMatchSet
mkXssMatchSet :: Value Text -> XssMatchSet
mkXssMatchSet Value Text
name
= XssMatchSet
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
xssMatchTuples :: Maybe [XssMatchTupleProperty]
xssMatchTuples = Maybe [XssMatchTupleProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties XssMatchSet where
toResourceProperties :: XssMatchSet -> ResourceProperties
toResourceProperties XssMatchSet {Maybe [XssMatchTupleProperty]
()
Value Text
haddock_workaround_ :: XssMatchSet -> ()
name :: XssMatchSet -> Value Text
xssMatchTuples :: XssMatchSet -> Maybe [XssMatchTupleProperty]
haddock_workaround_ :: ()
name :: Value Text
xssMatchTuples :: Maybe [XssMatchTupleProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::WAFRegional::XssMatchSet",
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
"Name" 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
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [XssMatchTupleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"XssMatchTuples" ([XssMatchTupleProperty] -> (Key, Value))
-> Maybe [XssMatchTupleProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [XssMatchTupleProperty]
xssMatchTuples]))}
instance JSON.ToJSON XssMatchSet where
toJSON :: XssMatchSet -> Value
toJSON XssMatchSet {Maybe [XssMatchTupleProperty]
()
Value Text
haddock_workaround_ :: XssMatchSet -> ()
name :: XssMatchSet -> Value Text
xssMatchTuples :: XssMatchSet -> Maybe [XssMatchTupleProperty]
haddock_workaround_ :: ()
name :: Value Text
xssMatchTuples :: Maybe [XssMatchTupleProperty]
..}
= [(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
"Name" 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
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [XssMatchTupleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"XssMatchTuples" ([XssMatchTupleProperty] -> (Key, Value))
-> Maybe [XssMatchTupleProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [XssMatchTupleProperty]
xssMatchTuples])))
instance Property "Name" XssMatchSet where
type PropertyType "Name" XssMatchSet = Value Prelude.Text
set :: PropertyType "Name" XssMatchSet -> XssMatchSet -> XssMatchSet
set PropertyType "Name" XssMatchSet
newValue XssMatchSet {Maybe [XssMatchTupleProperty]
()
Value Text
haddock_workaround_ :: XssMatchSet -> ()
name :: XssMatchSet -> Value Text
xssMatchTuples :: XssMatchSet -> Maybe [XssMatchTupleProperty]
haddock_workaround_ :: ()
name :: Value Text
xssMatchTuples :: Maybe [XssMatchTupleProperty]
..} = XssMatchSet {name :: Value Text
name = PropertyType "Name" XssMatchSet
Value Text
newValue, Maybe [XssMatchTupleProperty]
()
haddock_workaround_ :: ()
xssMatchTuples :: Maybe [XssMatchTupleProperty]
haddock_workaround_ :: ()
xssMatchTuples :: Maybe [XssMatchTupleProperty]
..}
instance Property "XssMatchTuples" XssMatchSet where
type PropertyType "XssMatchTuples" XssMatchSet = [XssMatchTupleProperty]
set :: PropertyType "XssMatchTuples" XssMatchSet
-> XssMatchSet -> XssMatchSet
set PropertyType "XssMatchTuples" XssMatchSet
newValue XssMatchSet {Maybe [XssMatchTupleProperty]
()
Value Text
haddock_workaround_ :: XssMatchSet -> ()
name :: XssMatchSet -> Value Text
xssMatchTuples :: XssMatchSet -> Maybe [XssMatchTupleProperty]
haddock_workaround_ :: ()
name :: Value Text
xssMatchTuples :: Maybe [XssMatchTupleProperty]
..}
= XssMatchSet {xssMatchTuples :: Maybe [XssMatchTupleProperty]
xssMatchTuples = [XssMatchTupleProperty] -> Maybe [XssMatchTupleProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [XssMatchTupleProperty]
PropertyType "XssMatchTuples" XssMatchSet
newValue, ()
Value Text
haddock_workaround_ :: ()
name :: Value Text
haddock_workaround_ :: ()
name :: Value Text
..}