{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.WAFV2.Types.AWSManagedRulesBotControlRuleSet where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.WAFV2.Types.InspectionLevel
data AWSManagedRulesBotControlRuleSet = AWSManagedRulesBotControlRuleSet'
{
AWSManagedRulesBotControlRuleSet -> InspectionLevel
inspectionLevel :: InspectionLevel
}
deriving (AWSManagedRulesBotControlRuleSet
-> AWSManagedRulesBotControlRuleSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AWSManagedRulesBotControlRuleSet
-> AWSManagedRulesBotControlRuleSet -> Bool
$c/= :: AWSManagedRulesBotControlRuleSet
-> AWSManagedRulesBotControlRuleSet -> Bool
== :: AWSManagedRulesBotControlRuleSet
-> AWSManagedRulesBotControlRuleSet -> Bool
$c== :: AWSManagedRulesBotControlRuleSet
-> AWSManagedRulesBotControlRuleSet -> Bool
Prelude.Eq, ReadPrec [AWSManagedRulesBotControlRuleSet]
ReadPrec AWSManagedRulesBotControlRuleSet
Int -> ReadS AWSManagedRulesBotControlRuleSet
ReadS [AWSManagedRulesBotControlRuleSet]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AWSManagedRulesBotControlRuleSet]
$creadListPrec :: ReadPrec [AWSManagedRulesBotControlRuleSet]
readPrec :: ReadPrec AWSManagedRulesBotControlRuleSet
$creadPrec :: ReadPrec AWSManagedRulesBotControlRuleSet
readList :: ReadS [AWSManagedRulesBotControlRuleSet]
$creadList :: ReadS [AWSManagedRulesBotControlRuleSet]
readsPrec :: Int -> ReadS AWSManagedRulesBotControlRuleSet
$creadsPrec :: Int -> ReadS AWSManagedRulesBotControlRuleSet
Prelude.Read, Int -> AWSManagedRulesBotControlRuleSet -> ShowS
[AWSManagedRulesBotControlRuleSet] -> ShowS
AWSManagedRulesBotControlRuleSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AWSManagedRulesBotControlRuleSet] -> ShowS
$cshowList :: [AWSManagedRulesBotControlRuleSet] -> ShowS
show :: AWSManagedRulesBotControlRuleSet -> String
$cshow :: AWSManagedRulesBotControlRuleSet -> String
showsPrec :: Int -> AWSManagedRulesBotControlRuleSet -> ShowS
$cshowsPrec :: Int -> AWSManagedRulesBotControlRuleSet -> ShowS
Prelude.Show, forall x.
Rep AWSManagedRulesBotControlRuleSet x
-> AWSManagedRulesBotControlRuleSet
forall x.
AWSManagedRulesBotControlRuleSet
-> Rep AWSManagedRulesBotControlRuleSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AWSManagedRulesBotControlRuleSet x
-> AWSManagedRulesBotControlRuleSet
$cfrom :: forall x.
AWSManagedRulesBotControlRuleSet
-> Rep AWSManagedRulesBotControlRuleSet x
Prelude.Generic)
newAWSManagedRulesBotControlRuleSet ::
InspectionLevel ->
AWSManagedRulesBotControlRuleSet
newAWSManagedRulesBotControlRuleSet :: InspectionLevel -> AWSManagedRulesBotControlRuleSet
newAWSManagedRulesBotControlRuleSet InspectionLevel
pInspectionLevel_ =
AWSManagedRulesBotControlRuleSet'
{ $sel:inspectionLevel:AWSManagedRulesBotControlRuleSet' :: InspectionLevel
inspectionLevel =
InspectionLevel
pInspectionLevel_
}
aWSManagedRulesBotControlRuleSet_inspectionLevel :: Lens.Lens' AWSManagedRulesBotControlRuleSet InspectionLevel
aWSManagedRulesBotControlRuleSet_inspectionLevel :: Lens' AWSManagedRulesBotControlRuleSet InspectionLevel
aWSManagedRulesBotControlRuleSet_inspectionLevel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AWSManagedRulesBotControlRuleSet' {InspectionLevel
inspectionLevel :: InspectionLevel
$sel:inspectionLevel:AWSManagedRulesBotControlRuleSet' :: AWSManagedRulesBotControlRuleSet -> InspectionLevel
inspectionLevel} -> InspectionLevel
inspectionLevel) (\s :: AWSManagedRulesBotControlRuleSet
s@AWSManagedRulesBotControlRuleSet' {} InspectionLevel
a -> AWSManagedRulesBotControlRuleSet
s {$sel:inspectionLevel:AWSManagedRulesBotControlRuleSet' :: InspectionLevel
inspectionLevel = InspectionLevel
a} :: AWSManagedRulesBotControlRuleSet)
instance
Data.FromJSON
AWSManagedRulesBotControlRuleSet
where
parseJSON :: Value -> Parser AWSManagedRulesBotControlRuleSet
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AWSManagedRulesBotControlRuleSet"
( \Object
x ->
InspectionLevel -> AWSManagedRulesBotControlRuleSet
AWSManagedRulesBotControlRuleSet'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"InspectionLevel")
)
instance
Prelude.Hashable
AWSManagedRulesBotControlRuleSet
where
hashWithSalt :: Int -> AWSManagedRulesBotControlRuleSet -> Int
hashWithSalt
Int
_salt
AWSManagedRulesBotControlRuleSet' {InspectionLevel
inspectionLevel :: InspectionLevel
$sel:inspectionLevel:AWSManagedRulesBotControlRuleSet' :: AWSManagedRulesBotControlRuleSet -> InspectionLevel
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` InspectionLevel
inspectionLevel
instance
Prelude.NFData
AWSManagedRulesBotControlRuleSet
where
rnf :: AWSManagedRulesBotControlRuleSet -> ()
rnf AWSManagedRulesBotControlRuleSet' {InspectionLevel
inspectionLevel :: InspectionLevel
$sel:inspectionLevel:AWSManagedRulesBotControlRuleSet' :: AWSManagedRulesBotControlRuleSet -> InspectionLevel
..} =
forall a. NFData a => a -> ()
Prelude.rnf InspectionLevel
inspectionLevel
instance Data.ToJSON AWSManagedRulesBotControlRuleSet where
toJSON :: AWSManagedRulesBotControlRuleSet -> Value
toJSON AWSManagedRulesBotControlRuleSet' {InspectionLevel
inspectionLevel :: InspectionLevel
$sel:inspectionLevel:AWSManagedRulesBotControlRuleSet' :: AWSManagedRulesBotControlRuleSet -> InspectionLevel
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"InspectionLevel" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= InspectionLevel
inspectionLevel)
]
)