module Stratosphere.WAFv2.RuleGroup.CookieMatchPatternProperty (
CookieMatchPatternProperty(..), mkCookieMatchPatternProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CookieMatchPatternProperty
=
CookieMatchPatternProperty {CookieMatchPatternProperty -> ()
haddock_workaround_ :: (),
CookieMatchPatternProperty -> Maybe Object
all :: (Prelude.Maybe JSON.Object),
CookieMatchPatternProperty -> Maybe (ValueList Text)
excludedCookies :: (Prelude.Maybe (ValueList Prelude.Text)),
CookieMatchPatternProperty -> Maybe (ValueList Text)
includedCookies :: (Prelude.Maybe (ValueList Prelude.Text))}
deriving stock (CookieMatchPatternProperty -> CookieMatchPatternProperty -> Bool
(CookieMatchPatternProperty -> CookieMatchPatternProperty -> Bool)
-> (CookieMatchPatternProperty
-> CookieMatchPatternProperty -> Bool)
-> Eq CookieMatchPatternProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CookieMatchPatternProperty -> CookieMatchPatternProperty -> Bool
== :: CookieMatchPatternProperty -> CookieMatchPatternProperty -> Bool
$c/= :: CookieMatchPatternProperty -> CookieMatchPatternProperty -> Bool
/= :: CookieMatchPatternProperty -> CookieMatchPatternProperty -> Bool
Prelude.Eq, Int -> CookieMatchPatternProperty -> ShowS
[CookieMatchPatternProperty] -> ShowS
CookieMatchPatternProperty -> String
(Int -> CookieMatchPatternProperty -> ShowS)
-> (CookieMatchPatternProperty -> String)
-> ([CookieMatchPatternProperty] -> ShowS)
-> Show CookieMatchPatternProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CookieMatchPatternProperty -> ShowS
showsPrec :: Int -> CookieMatchPatternProperty -> ShowS
$cshow :: CookieMatchPatternProperty -> String
show :: CookieMatchPatternProperty -> String
$cshowList :: [CookieMatchPatternProperty] -> ShowS
showList :: [CookieMatchPatternProperty] -> ShowS
Prelude.Show)
mkCookieMatchPatternProperty :: CookieMatchPatternProperty
mkCookieMatchPatternProperty :: CookieMatchPatternProperty
mkCookieMatchPatternProperty
= CookieMatchPatternProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), all :: Maybe Object
all = Maybe Object
forall a. Maybe a
Prelude.Nothing,
excludedCookies :: Maybe (ValueList Text)
excludedCookies = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
includedCookies :: Maybe (ValueList Text)
includedCookies = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CookieMatchPatternProperty where
toResourceProperties :: CookieMatchPatternProperty -> ResourceProperties
toResourceProperties CookieMatchPatternProperty {Maybe Object
Maybe (ValueList Text)
()
haddock_workaround_ :: CookieMatchPatternProperty -> ()
all :: CookieMatchPatternProperty -> Maybe Object
excludedCookies :: CookieMatchPatternProperty -> Maybe (ValueList Text)
includedCookies :: CookieMatchPatternProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
all :: Maybe Object
excludedCookies :: Maybe (ValueList Text)
includedCookies :: Maybe (ValueList Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::WAFv2::RuleGroup.CookieMatchPattern",
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
"ExcludedCookies" (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)
excludedCookies,
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
"IncludedCookies" (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)
includedCookies])}
instance JSON.ToJSON CookieMatchPatternProperty where
toJSON :: CookieMatchPatternProperty -> Value
toJSON CookieMatchPatternProperty {Maybe Object
Maybe (ValueList Text)
()
haddock_workaround_ :: CookieMatchPatternProperty -> ()
all :: CookieMatchPatternProperty -> Maybe Object
excludedCookies :: CookieMatchPatternProperty -> Maybe (ValueList Text)
includedCookies :: CookieMatchPatternProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
all :: Maybe Object
excludedCookies :: Maybe (ValueList Text)
includedCookies :: 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
"ExcludedCookies" (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)
excludedCookies,
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
"IncludedCookies" (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)
includedCookies]))
instance Property "All" CookieMatchPatternProperty where
type PropertyType "All" CookieMatchPatternProperty = JSON.Object
set :: PropertyType "All" CookieMatchPatternProperty
-> CookieMatchPatternProperty -> CookieMatchPatternProperty
set PropertyType "All" CookieMatchPatternProperty
newValue CookieMatchPatternProperty {Maybe Object
Maybe (ValueList Text)
()
haddock_workaround_ :: CookieMatchPatternProperty -> ()
all :: CookieMatchPatternProperty -> Maybe Object
excludedCookies :: CookieMatchPatternProperty -> Maybe (ValueList Text)
includedCookies :: CookieMatchPatternProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
all :: Maybe Object
excludedCookies :: Maybe (ValueList Text)
includedCookies :: Maybe (ValueList Text)
..}
= CookieMatchPatternProperty {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" CookieMatchPatternProperty
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
excludedCookies :: Maybe (ValueList Text)
includedCookies :: Maybe (ValueList Text)
haddock_workaround_ :: ()
excludedCookies :: Maybe (ValueList Text)
includedCookies :: Maybe (ValueList Text)
..}
instance Property "ExcludedCookies" CookieMatchPatternProperty where
type PropertyType "ExcludedCookies" CookieMatchPatternProperty = ValueList Prelude.Text
set :: PropertyType "ExcludedCookies" CookieMatchPatternProperty
-> CookieMatchPatternProperty -> CookieMatchPatternProperty
set PropertyType "ExcludedCookies" CookieMatchPatternProperty
newValue CookieMatchPatternProperty {Maybe Object
Maybe (ValueList Text)
()
haddock_workaround_ :: CookieMatchPatternProperty -> ()
all :: CookieMatchPatternProperty -> Maybe Object
excludedCookies :: CookieMatchPatternProperty -> Maybe (ValueList Text)
includedCookies :: CookieMatchPatternProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
all :: Maybe Object
excludedCookies :: Maybe (ValueList Text)
includedCookies :: Maybe (ValueList Text)
..}
= CookieMatchPatternProperty
{excludedCookies :: Maybe (ValueList Text)
excludedCookies = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ExcludedCookies" CookieMatchPatternProperty
ValueList Text
newValue, Maybe Object
Maybe (ValueList Text)
()
haddock_workaround_ :: ()
all :: Maybe Object
includedCookies :: Maybe (ValueList Text)
haddock_workaround_ :: ()
all :: Maybe Object
includedCookies :: Maybe (ValueList Text)
..}
instance Property "IncludedCookies" CookieMatchPatternProperty where
type PropertyType "IncludedCookies" CookieMatchPatternProperty = ValueList Prelude.Text
set :: PropertyType "IncludedCookies" CookieMatchPatternProperty
-> CookieMatchPatternProperty -> CookieMatchPatternProperty
set PropertyType "IncludedCookies" CookieMatchPatternProperty
newValue CookieMatchPatternProperty {Maybe Object
Maybe (ValueList Text)
()
haddock_workaround_ :: CookieMatchPatternProperty -> ()
all :: CookieMatchPatternProperty -> Maybe Object
excludedCookies :: CookieMatchPatternProperty -> Maybe (ValueList Text)
includedCookies :: CookieMatchPatternProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
all :: Maybe Object
excludedCookies :: Maybe (ValueList Text)
includedCookies :: Maybe (ValueList Text)
..}
= CookieMatchPatternProperty
{includedCookies :: Maybe (ValueList Text)
includedCookies = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IncludedCookies" CookieMatchPatternProperty
ValueList Text
newValue, Maybe Object
Maybe (ValueList Text)
()
haddock_workaround_ :: ()
all :: Maybe Object
excludedCookies :: Maybe (ValueList Text)
haddock_workaround_ :: ()
all :: Maybe Object
excludedCookies :: Maybe (ValueList Text)
..}