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