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