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