module Stratosphere.WAFRegional.ByteMatchSet.FieldToMatchProperty (
FieldToMatchProperty(..), mkFieldToMatchProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FieldToMatchProperty
=
FieldToMatchProperty {FieldToMatchProperty -> ()
haddock_workaround_ :: (),
FieldToMatchProperty -> Maybe (Value Text)
data' :: (Prelude.Maybe (Value Prelude.Text)),
FieldToMatchProperty -> Value Text
type' :: (Value Prelude.Text)}
deriving stock (FieldToMatchProperty -> FieldToMatchProperty -> Bool
(FieldToMatchProperty -> FieldToMatchProperty -> Bool)
-> (FieldToMatchProperty -> FieldToMatchProperty -> Bool)
-> Eq FieldToMatchProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FieldToMatchProperty -> FieldToMatchProperty -> Bool
== :: FieldToMatchProperty -> FieldToMatchProperty -> Bool
$c/= :: FieldToMatchProperty -> FieldToMatchProperty -> Bool
/= :: FieldToMatchProperty -> FieldToMatchProperty -> Bool
Prelude.Eq, Int -> FieldToMatchProperty -> ShowS
[FieldToMatchProperty] -> ShowS
FieldToMatchProperty -> String
(Int -> FieldToMatchProperty -> ShowS)
-> (FieldToMatchProperty -> String)
-> ([FieldToMatchProperty] -> ShowS)
-> Show FieldToMatchProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FieldToMatchProperty -> ShowS
showsPrec :: Int -> FieldToMatchProperty -> ShowS
$cshow :: FieldToMatchProperty -> String
show :: FieldToMatchProperty -> String
$cshowList :: [FieldToMatchProperty] -> ShowS
showList :: [FieldToMatchProperty] -> ShowS
Prelude.Show)
mkFieldToMatchProperty ::
Value Prelude.Text -> FieldToMatchProperty
mkFieldToMatchProperty :: Value Text -> FieldToMatchProperty
mkFieldToMatchProperty Value Text
type'
= FieldToMatchProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Value Text
type' = Value Text
type', data' :: Maybe (Value Text)
data' = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FieldToMatchProperty where
toResourceProperties :: FieldToMatchProperty -> ResourceProperties
toResourceProperties FieldToMatchProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FieldToMatchProperty -> ()
data' :: FieldToMatchProperty -> Maybe (Value Text)
type' :: FieldToMatchProperty -> Value Text
haddock_workaround_ :: ()
data' :: Maybe (Value Text)
type' :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::WAFRegional::ByteMatchSet.FieldToMatch",
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
"Type" 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
type']
([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
"Data" (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)
data']))}
instance JSON.ToJSON FieldToMatchProperty where
toJSON :: FieldToMatchProperty -> Value
toJSON FieldToMatchProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FieldToMatchProperty -> ()
data' :: FieldToMatchProperty -> Maybe (Value Text)
type' :: FieldToMatchProperty -> Value Text
haddock_workaround_ :: ()
data' :: Maybe (Value Text)
type' :: 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
"Type" 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
type']
([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
"Data" (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)
data'])))
instance Property "Data" FieldToMatchProperty where
type PropertyType "Data" FieldToMatchProperty = Value Prelude.Text
set :: PropertyType "Data" FieldToMatchProperty
-> FieldToMatchProperty -> FieldToMatchProperty
set PropertyType "Data" FieldToMatchProperty
newValue FieldToMatchProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FieldToMatchProperty -> ()
data' :: FieldToMatchProperty -> Maybe (Value Text)
type' :: FieldToMatchProperty -> Value Text
haddock_workaround_ :: ()
data' :: Maybe (Value Text)
type' :: Value Text
..}
= FieldToMatchProperty {data' :: Maybe (Value Text)
data' = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Data" FieldToMatchProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
type' :: Value Text
haddock_workaround_ :: ()
type' :: Value Text
..}
instance Property "Type" FieldToMatchProperty where
type PropertyType "Type" FieldToMatchProperty = Value Prelude.Text
set :: PropertyType "Type" FieldToMatchProperty
-> FieldToMatchProperty -> FieldToMatchProperty
set PropertyType "Type" FieldToMatchProperty
newValue FieldToMatchProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FieldToMatchProperty -> ()
data' :: FieldToMatchProperty -> Maybe (Value Text)
type' :: FieldToMatchProperty -> Value Text
haddock_workaround_ :: ()
data' :: Maybe (Value Text)
type' :: Value Text
..}
= FieldToMatchProperty {type' :: Value Text
type' = PropertyType "Type" FieldToMatchProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
data' :: Maybe (Value Text)
haddock_workaround_ :: ()
data' :: Maybe (Value Text)
..}