{-# 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.WAF.Types.RegexPatternSetSummary 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 RegexPatternSetSummary = RegexPatternSetSummary'
{
RegexPatternSetSummary -> Text
regexPatternSetId :: Prelude.Text,
RegexPatternSetSummary -> Text
name :: Prelude.Text
}
deriving (RegexPatternSetSummary -> RegexPatternSetSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegexPatternSetSummary -> RegexPatternSetSummary -> Bool
$c/= :: RegexPatternSetSummary -> RegexPatternSetSummary -> Bool
== :: RegexPatternSetSummary -> RegexPatternSetSummary -> Bool
$c== :: RegexPatternSetSummary -> RegexPatternSetSummary -> Bool
Prelude.Eq, ReadPrec [RegexPatternSetSummary]
ReadPrec RegexPatternSetSummary
Int -> ReadS RegexPatternSetSummary
ReadS [RegexPatternSetSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegexPatternSetSummary]
$creadListPrec :: ReadPrec [RegexPatternSetSummary]
readPrec :: ReadPrec RegexPatternSetSummary
$creadPrec :: ReadPrec RegexPatternSetSummary
readList :: ReadS [RegexPatternSetSummary]
$creadList :: ReadS [RegexPatternSetSummary]
readsPrec :: Int -> ReadS RegexPatternSetSummary
$creadsPrec :: Int -> ReadS RegexPatternSetSummary
Prelude.Read, Int -> RegexPatternSetSummary -> ShowS
[RegexPatternSetSummary] -> ShowS
RegexPatternSetSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegexPatternSetSummary] -> ShowS
$cshowList :: [RegexPatternSetSummary] -> ShowS
show :: RegexPatternSetSummary -> String
$cshow :: RegexPatternSetSummary -> String
showsPrec :: Int -> RegexPatternSetSummary -> ShowS
$cshowsPrec :: Int -> RegexPatternSetSummary -> ShowS
Prelude.Show, forall x. Rep RegexPatternSetSummary x -> RegexPatternSetSummary
forall x. RegexPatternSetSummary -> Rep RegexPatternSetSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegexPatternSetSummary x -> RegexPatternSetSummary
$cfrom :: forall x. RegexPatternSetSummary -> Rep RegexPatternSetSummary x
Prelude.Generic)
newRegexPatternSetSummary ::
Prelude.Text ->
Prelude.Text ->
RegexPatternSetSummary
newRegexPatternSetSummary :: Text -> Text -> RegexPatternSetSummary
newRegexPatternSetSummary Text
pRegexPatternSetId_ Text
pName_ =
RegexPatternSetSummary'
{ $sel:regexPatternSetId:RegexPatternSetSummary' :: Text
regexPatternSetId =
Text
pRegexPatternSetId_,
$sel:name:RegexPatternSetSummary' :: Text
name = Text
pName_
}
regexPatternSetSummary_regexPatternSetId :: Lens.Lens' RegexPatternSetSummary Prelude.Text
regexPatternSetSummary_regexPatternSetId :: Lens' RegexPatternSetSummary Text
regexPatternSetSummary_regexPatternSetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegexPatternSetSummary' {Text
regexPatternSetId :: Text
$sel:regexPatternSetId:RegexPatternSetSummary' :: RegexPatternSetSummary -> Text
regexPatternSetId} -> Text
regexPatternSetId) (\s :: RegexPatternSetSummary
s@RegexPatternSetSummary' {} Text
a -> RegexPatternSetSummary
s {$sel:regexPatternSetId:RegexPatternSetSummary' :: Text
regexPatternSetId = Text
a} :: RegexPatternSetSummary)
regexPatternSetSummary_name :: Lens.Lens' RegexPatternSetSummary Prelude.Text
regexPatternSetSummary_name :: Lens' RegexPatternSetSummary Text
regexPatternSetSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegexPatternSetSummary' {Text
name :: Text
$sel:name:RegexPatternSetSummary' :: RegexPatternSetSummary -> Text
name} -> Text
name) (\s :: RegexPatternSetSummary
s@RegexPatternSetSummary' {} Text
a -> RegexPatternSetSummary
s {$sel:name:RegexPatternSetSummary' :: Text
name = Text
a} :: RegexPatternSetSummary)
instance Data.FromJSON RegexPatternSetSummary where
parseJSON :: Value -> Parser RegexPatternSetSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RegexPatternSetSummary"
( \Object
x ->
Text -> Text -> RegexPatternSetSummary
RegexPatternSetSummary'
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
"RegexPatternSetId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Name")
)
instance Prelude.Hashable RegexPatternSetSummary where
hashWithSalt :: Int -> RegexPatternSetSummary -> Int
hashWithSalt Int
_salt RegexPatternSetSummary' {Text
name :: Text
regexPatternSetId :: Text
$sel:name:RegexPatternSetSummary' :: RegexPatternSetSummary -> Text
$sel:regexPatternSetId:RegexPatternSetSummary' :: RegexPatternSetSummary -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
regexPatternSetId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData RegexPatternSetSummary where
rnf :: RegexPatternSetSummary -> ()
rnf RegexPatternSetSummary' {Text
name :: Text
regexPatternSetId :: Text
$sel:name:RegexPatternSetSummary' :: RegexPatternSetSummary -> Text
$sel:regexPatternSetId:RegexPatternSetSummary' :: RegexPatternSetSummary -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
regexPatternSetId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name