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