module Stratosphere.WAFv2.WebACL.JsonMatchPatternProperty (
JsonMatchPatternProperty(..), mkJsonMatchPatternProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data JsonMatchPatternProperty
=
JsonMatchPatternProperty {JsonMatchPatternProperty -> ()
haddock_workaround_ :: (),
JsonMatchPatternProperty -> Maybe Object
all :: (Prelude.Maybe JSON.Object),
JsonMatchPatternProperty -> Maybe (ValueList Text)
includedPaths :: (Prelude.Maybe (ValueList Prelude.Text))}
deriving stock (JsonMatchPatternProperty -> JsonMatchPatternProperty -> Bool
(JsonMatchPatternProperty -> JsonMatchPatternProperty -> Bool)
-> (JsonMatchPatternProperty -> JsonMatchPatternProperty -> Bool)
-> Eq JsonMatchPatternProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: JsonMatchPatternProperty -> JsonMatchPatternProperty -> Bool
== :: JsonMatchPatternProperty -> JsonMatchPatternProperty -> Bool
$c/= :: JsonMatchPatternProperty -> JsonMatchPatternProperty -> Bool
/= :: JsonMatchPatternProperty -> JsonMatchPatternProperty -> Bool
Prelude.Eq, Int -> JsonMatchPatternProperty -> ShowS
[JsonMatchPatternProperty] -> ShowS
JsonMatchPatternProperty -> String
(Int -> JsonMatchPatternProperty -> ShowS)
-> (JsonMatchPatternProperty -> String)
-> ([JsonMatchPatternProperty] -> ShowS)
-> Show JsonMatchPatternProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> JsonMatchPatternProperty -> ShowS
showsPrec :: Int -> JsonMatchPatternProperty -> ShowS
$cshow :: JsonMatchPatternProperty -> String
show :: JsonMatchPatternProperty -> String
$cshowList :: [JsonMatchPatternProperty] -> ShowS
showList :: [JsonMatchPatternProperty] -> ShowS
Prelude.Show)
mkJsonMatchPatternProperty :: JsonMatchPatternProperty
mkJsonMatchPatternProperty :: JsonMatchPatternProperty
mkJsonMatchPatternProperty
= JsonMatchPatternProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), all :: Maybe Object
all = Maybe Object
forall a. Maybe a
Prelude.Nothing,
includedPaths :: Maybe (ValueList Text)
includedPaths = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties JsonMatchPatternProperty where
toResourceProperties :: JsonMatchPatternProperty -> ResourceProperties
toResourceProperties JsonMatchPatternProperty {Maybe Object
Maybe (ValueList Text)
()
haddock_workaround_ :: JsonMatchPatternProperty -> ()
all :: JsonMatchPatternProperty -> Maybe Object
includedPaths :: JsonMatchPatternProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
all :: Maybe Object
includedPaths :: Maybe (ValueList Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::WAFv2::WebACL.JsonMatchPattern",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"All" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
all,
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..=) Key
"IncludedPaths" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
includedPaths])}
instance JSON.ToJSON JsonMatchPatternProperty where
toJSON :: JsonMatchPatternProperty -> Value
toJSON JsonMatchPatternProperty {Maybe Object
Maybe (ValueList Text)
()
haddock_workaround_ :: JsonMatchPatternProperty -> ()
all :: JsonMatchPatternProperty -> Maybe Object
includedPaths :: JsonMatchPatternProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
all :: Maybe Object
includedPaths :: Maybe (ValueList Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"All" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
all,
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..=) Key
"IncludedPaths" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
includedPaths]))
instance Property "All" JsonMatchPatternProperty where
type PropertyType "All" JsonMatchPatternProperty = JSON.Object
set :: PropertyType "All" JsonMatchPatternProperty
-> JsonMatchPatternProperty -> JsonMatchPatternProperty
set PropertyType "All" JsonMatchPatternProperty
newValue JsonMatchPatternProperty {Maybe Object
Maybe (ValueList Text)
()
haddock_workaround_ :: JsonMatchPatternProperty -> ()
all :: JsonMatchPatternProperty -> Maybe Object
includedPaths :: JsonMatchPatternProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
all :: Maybe Object
includedPaths :: Maybe (ValueList Text)
..}
= JsonMatchPatternProperty {all :: Maybe Object
all = Object -> Maybe Object
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Object
PropertyType "All" JsonMatchPatternProperty
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
includedPaths :: Maybe (ValueList Text)
haddock_workaround_ :: ()
includedPaths :: Maybe (ValueList Text)
..}
instance Property "IncludedPaths" JsonMatchPatternProperty where
type PropertyType "IncludedPaths" JsonMatchPatternProperty = ValueList Prelude.Text
set :: PropertyType "IncludedPaths" JsonMatchPatternProperty
-> JsonMatchPatternProperty -> JsonMatchPatternProperty
set PropertyType "IncludedPaths" JsonMatchPatternProperty
newValue JsonMatchPatternProperty {Maybe Object
Maybe (ValueList Text)
()
haddock_workaround_ :: JsonMatchPatternProperty -> ()
all :: JsonMatchPatternProperty -> Maybe Object
includedPaths :: JsonMatchPatternProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
all :: Maybe Object
includedPaths :: Maybe (ValueList Text)
..}
= JsonMatchPatternProperty
{includedPaths :: Maybe (ValueList Text)
includedPaths = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IncludedPaths" JsonMatchPatternProperty
ValueList Text
newValue, Maybe Object
()
haddock_workaround_ :: ()
all :: Maybe Object
haddock_workaround_ :: ()
all :: Maybe Object
..}