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