{-# 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.ManagedRuleGroupSummary 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
data ManagedRuleGroupSummary = ManagedRuleGroupSummary'
{
ManagedRuleGroupSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ManagedRuleGroupSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ManagedRuleGroupSummary -> Maybe Text
vendorName :: Prelude.Maybe Prelude.Text,
ManagedRuleGroupSummary -> Maybe Bool
versioningSupported :: Prelude.Maybe Prelude.Bool
}
deriving (ManagedRuleGroupSummary -> ManagedRuleGroupSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ManagedRuleGroupSummary -> ManagedRuleGroupSummary -> Bool
$c/= :: ManagedRuleGroupSummary -> ManagedRuleGroupSummary -> Bool
== :: ManagedRuleGroupSummary -> ManagedRuleGroupSummary -> Bool
$c== :: ManagedRuleGroupSummary -> ManagedRuleGroupSummary -> Bool
Prelude.Eq, ReadPrec [ManagedRuleGroupSummary]
ReadPrec ManagedRuleGroupSummary
Int -> ReadS ManagedRuleGroupSummary
ReadS [ManagedRuleGroupSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ManagedRuleGroupSummary]
$creadListPrec :: ReadPrec [ManagedRuleGroupSummary]
readPrec :: ReadPrec ManagedRuleGroupSummary
$creadPrec :: ReadPrec ManagedRuleGroupSummary
readList :: ReadS [ManagedRuleGroupSummary]
$creadList :: ReadS [ManagedRuleGroupSummary]
readsPrec :: Int -> ReadS ManagedRuleGroupSummary
$creadsPrec :: Int -> ReadS ManagedRuleGroupSummary
Prelude.Read, Int -> ManagedRuleGroupSummary -> ShowS
[ManagedRuleGroupSummary] -> ShowS
ManagedRuleGroupSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ManagedRuleGroupSummary] -> ShowS
$cshowList :: [ManagedRuleGroupSummary] -> ShowS
show :: ManagedRuleGroupSummary -> String
$cshow :: ManagedRuleGroupSummary -> String
showsPrec :: Int -> ManagedRuleGroupSummary -> ShowS
$cshowsPrec :: Int -> ManagedRuleGroupSummary -> ShowS
Prelude.Show, forall x. Rep ManagedRuleGroupSummary x -> ManagedRuleGroupSummary
forall x. ManagedRuleGroupSummary -> Rep ManagedRuleGroupSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ManagedRuleGroupSummary x -> ManagedRuleGroupSummary
$cfrom :: forall x. ManagedRuleGroupSummary -> Rep ManagedRuleGroupSummary x
Prelude.Generic)
newManagedRuleGroupSummary ::
ManagedRuleGroupSummary
newManagedRuleGroupSummary :: ManagedRuleGroupSummary
newManagedRuleGroupSummary =
ManagedRuleGroupSummary'
{ $sel:description:ManagedRuleGroupSummary' :: Maybe Text
description =
forall a. Maybe a
Prelude.Nothing,
$sel:name:ManagedRuleGroupSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:vendorName:ManagedRuleGroupSummary' :: Maybe Text
vendorName = forall a. Maybe a
Prelude.Nothing,
$sel:versioningSupported:ManagedRuleGroupSummary' :: Maybe Bool
versioningSupported = forall a. Maybe a
Prelude.Nothing
}
managedRuleGroupSummary_description :: Lens.Lens' ManagedRuleGroupSummary (Prelude.Maybe Prelude.Text)
managedRuleGroupSummary_description :: Lens' ManagedRuleGroupSummary (Maybe Text)
managedRuleGroupSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedRuleGroupSummary' {Maybe Text
description :: Maybe Text
$sel:description:ManagedRuleGroupSummary' :: ManagedRuleGroupSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: ManagedRuleGroupSummary
s@ManagedRuleGroupSummary' {} Maybe Text
a -> ManagedRuleGroupSummary
s {$sel:description:ManagedRuleGroupSummary' :: Maybe Text
description = Maybe Text
a} :: ManagedRuleGroupSummary)
managedRuleGroupSummary_name :: Lens.Lens' ManagedRuleGroupSummary (Prelude.Maybe Prelude.Text)
managedRuleGroupSummary_name :: Lens' ManagedRuleGroupSummary (Maybe Text)
managedRuleGroupSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedRuleGroupSummary' {Maybe Text
name :: Maybe Text
$sel:name:ManagedRuleGroupSummary' :: ManagedRuleGroupSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: ManagedRuleGroupSummary
s@ManagedRuleGroupSummary' {} Maybe Text
a -> ManagedRuleGroupSummary
s {$sel:name:ManagedRuleGroupSummary' :: Maybe Text
name = Maybe Text
a} :: ManagedRuleGroupSummary)
managedRuleGroupSummary_vendorName :: Lens.Lens' ManagedRuleGroupSummary (Prelude.Maybe Prelude.Text)
managedRuleGroupSummary_vendorName :: Lens' ManagedRuleGroupSummary (Maybe Text)
managedRuleGroupSummary_vendorName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedRuleGroupSummary' {Maybe Text
vendorName :: Maybe Text
$sel:vendorName:ManagedRuleGroupSummary' :: ManagedRuleGroupSummary -> Maybe Text
vendorName} -> Maybe Text
vendorName) (\s :: ManagedRuleGroupSummary
s@ManagedRuleGroupSummary' {} Maybe Text
a -> ManagedRuleGroupSummary
s {$sel:vendorName:ManagedRuleGroupSummary' :: Maybe Text
vendorName = Maybe Text
a} :: ManagedRuleGroupSummary)
managedRuleGroupSummary_versioningSupported :: Lens.Lens' ManagedRuleGroupSummary (Prelude.Maybe Prelude.Bool)
managedRuleGroupSummary_versioningSupported :: Lens' ManagedRuleGroupSummary (Maybe Bool)
managedRuleGroupSummary_versioningSupported = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedRuleGroupSummary' {Maybe Bool
versioningSupported :: Maybe Bool
$sel:versioningSupported:ManagedRuleGroupSummary' :: ManagedRuleGroupSummary -> Maybe Bool
versioningSupported} -> Maybe Bool
versioningSupported) (\s :: ManagedRuleGroupSummary
s@ManagedRuleGroupSummary' {} Maybe Bool
a -> ManagedRuleGroupSummary
s {$sel:versioningSupported:ManagedRuleGroupSummary' :: Maybe Bool
versioningSupported = Maybe Bool
a} :: ManagedRuleGroupSummary)
instance Data.FromJSON ManagedRuleGroupSummary where
parseJSON :: Value -> Parser ManagedRuleGroupSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ManagedRuleGroupSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> ManagedRuleGroupSummary
ManagedRuleGroupSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"VendorName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"VersioningSupported")
)
instance Prelude.Hashable ManagedRuleGroupSummary where
hashWithSalt :: Int -> ManagedRuleGroupSummary -> Int
hashWithSalt Int
_salt ManagedRuleGroupSummary' {Maybe Bool
Maybe Text
versioningSupported :: Maybe Bool
vendorName :: Maybe Text
name :: Maybe Text
description :: Maybe Text
$sel:versioningSupported:ManagedRuleGroupSummary' :: ManagedRuleGroupSummary -> Maybe Bool
$sel:vendorName:ManagedRuleGroupSummary' :: ManagedRuleGroupSummary -> Maybe Text
$sel:name:ManagedRuleGroupSummary' :: ManagedRuleGroupSummary -> Maybe Text
$sel:description:ManagedRuleGroupSummary' :: ManagedRuleGroupSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vendorName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
versioningSupported
instance Prelude.NFData ManagedRuleGroupSummary where
rnf :: ManagedRuleGroupSummary -> ()
rnf ManagedRuleGroupSummary' {Maybe Bool
Maybe Text
versioningSupported :: Maybe Bool
vendorName :: Maybe Text
name :: Maybe Text
description :: Maybe Text
$sel:versioningSupported:ManagedRuleGroupSummary' :: ManagedRuleGroupSummary -> Maybe Bool
$sel:vendorName:ManagedRuleGroupSummary' :: ManagedRuleGroupSummary -> Maybe Text
$sel:name:ManagedRuleGroupSummary' :: ManagedRuleGroupSummary -> Maybe Text
$sel:description:ManagedRuleGroupSummary' :: ManagedRuleGroupSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vendorName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
versioningSupported