module Stratosphere.WAFv2.WebACL.CaptchaActionProperty (
        module Exports, CaptchaActionProperty(..), mkCaptchaActionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.WAFv2.WebACL.CustomRequestHandlingProperty as Exports
import Stratosphere.ResourceProperties
data CaptchaActionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-captchaaction.html>
    CaptchaActionProperty {CaptchaActionProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-captchaaction.html#cfn-wafv2-webacl-captchaaction-customrequesthandling>
                           CaptchaActionProperty -> Maybe CustomRequestHandlingProperty
customRequestHandling :: (Prelude.Maybe CustomRequestHandlingProperty)}
  deriving stock (CaptchaActionProperty -> CaptchaActionProperty -> Bool
(CaptchaActionProperty -> CaptchaActionProperty -> Bool)
-> (CaptchaActionProperty -> CaptchaActionProperty -> Bool)
-> Eq CaptchaActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CaptchaActionProperty -> CaptchaActionProperty -> Bool
== :: CaptchaActionProperty -> CaptchaActionProperty -> Bool
$c/= :: CaptchaActionProperty -> CaptchaActionProperty -> Bool
/= :: CaptchaActionProperty -> CaptchaActionProperty -> Bool
Prelude.Eq, Int -> CaptchaActionProperty -> ShowS
[CaptchaActionProperty] -> ShowS
CaptchaActionProperty -> String
(Int -> CaptchaActionProperty -> ShowS)
-> (CaptchaActionProperty -> String)
-> ([CaptchaActionProperty] -> ShowS)
-> Show CaptchaActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CaptchaActionProperty -> ShowS
showsPrec :: Int -> CaptchaActionProperty -> ShowS
$cshow :: CaptchaActionProperty -> String
show :: CaptchaActionProperty -> String
$cshowList :: [CaptchaActionProperty] -> ShowS
showList :: [CaptchaActionProperty] -> ShowS
Prelude.Show)
mkCaptchaActionProperty :: CaptchaActionProperty
mkCaptchaActionProperty :: CaptchaActionProperty
mkCaptchaActionProperty
  = CaptchaActionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), customRequestHandling :: Maybe CustomRequestHandlingProperty
customRequestHandling = Maybe CustomRequestHandlingProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CaptchaActionProperty where
  toResourceProperties :: CaptchaActionProperty -> ResourceProperties
toResourceProperties CaptchaActionProperty {Maybe CustomRequestHandlingProperty
()
haddock_workaround_ :: CaptchaActionProperty -> ()
customRequestHandling :: CaptchaActionProperty -> Maybe CustomRequestHandlingProperty
haddock_workaround_ :: ()
customRequestHandling :: Maybe CustomRequestHandlingProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::WAFv2::WebACL.CaptchaAction",
         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 -> CustomRequestHandlingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CustomRequestHandling"
                              (CustomRequestHandlingProperty -> (Key, Value))
-> Maybe CustomRequestHandlingProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CustomRequestHandlingProperty
customRequestHandling])}
instance JSON.ToJSON CaptchaActionProperty where
  toJSON :: CaptchaActionProperty -> Value
toJSON CaptchaActionProperty {Maybe CustomRequestHandlingProperty
()
haddock_workaround_ :: CaptchaActionProperty -> ()
customRequestHandling :: CaptchaActionProperty -> Maybe CustomRequestHandlingProperty
haddock_workaround_ :: ()
customRequestHandling :: Maybe CustomRequestHandlingProperty
..}
    = [(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 -> CustomRequestHandlingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CustomRequestHandling"
                 (CustomRequestHandlingProperty -> (Key, Value))
-> Maybe CustomRequestHandlingProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CustomRequestHandlingProperty
customRequestHandling]))
instance Property "CustomRequestHandling" CaptchaActionProperty where
  type PropertyType "CustomRequestHandling" CaptchaActionProperty = CustomRequestHandlingProperty
  set :: PropertyType "CustomRequestHandling" CaptchaActionProperty
-> CaptchaActionProperty -> CaptchaActionProperty
set PropertyType "CustomRequestHandling" CaptchaActionProperty
newValue CaptchaActionProperty {Maybe CustomRequestHandlingProperty
()
haddock_workaround_ :: CaptchaActionProperty -> ()
customRequestHandling :: CaptchaActionProperty -> Maybe CustomRequestHandlingProperty
haddock_workaround_ :: ()
customRequestHandling :: Maybe CustomRequestHandlingProperty
..}
    = CaptchaActionProperty
        {customRequestHandling :: Maybe CustomRequestHandlingProperty
customRequestHandling = CustomRequestHandlingProperty
-> Maybe CustomRequestHandlingProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CustomRequestHandling" CaptchaActionProperty
CustomRequestHandlingProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}