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