{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RegexPatternSetSummary = RegexPatternSetSummary'
{
RegexPatternSetSummary -> Text
regexPatternSetId :: Prelude.Text,
RegexPatternSetSummary -> Text
name :: Prelude.Text
}
deriving (RegexPatternSetSummary -> RegexPatternSetSummary -> Bool
(RegexPatternSetSummary -> RegexPatternSetSummary -> Bool)
-> (RegexPatternSetSummary -> RegexPatternSetSummary -> Bool)
-> Eq RegexPatternSetSummary
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]
(Int -> ReadS RegexPatternSetSummary)
-> ReadS [RegexPatternSetSummary]
-> ReadPrec RegexPatternSetSummary
-> ReadPrec [RegexPatternSetSummary]
-> Read 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
(Int -> RegexPatternSetSummary -> ShowS)
-> (RegexPatternSetSummary -> String)
-> ([RegexPatternSetSummary] -> ShowS)
-> Show RegexPatternSetSummary
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. RegexPatternSetSummary -> Rep RegexPatternSetSummary x)
-> (forall x.
Rep RegexPatternSetSummary x -> RegexPatternSetSummary)
-> Generic RegexPatternSetSummary
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' :: Text -> Text -> RegexPatternSetSummary
RegexPatternSetSummary'
{ $sel:regexPatternSetId:RegexPatternSetSummary' :: Text
regexPatternSetId =
Text
pRegexPatternSetId_,
$sel:name:RegexPatternSetSummary' :: Text
name = Text
pName_
}
regexPatternSetSummary_regexPatternSetId :: Lens.Lens' RegexPatternSetSummary Prelude.Text
regexPatternSetSummary_regexPatternSetId :: (Text -> f Text)
-> RegexPatternSetSummary -> f RegexPatternSetSummary
regexPatternSetSummary_regexPatternSetId = (RegexPatternSetSummary -> Text)
-> (RegexPatternSetSummary -> Text -> RegexPatternSetSummary)
-> Lens RegexPatternSetSummary RegexPatternSetSummary Text Text
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 :: (Text -> f Text)
-> RegexPatternSetSummary -> f RegexPatternSetSummary
regexPatternSetSummary_name = (RegexPatternSetSummary -> Text)
-> (RegexPatternSetSummary -> Text -> RegexPatternSetSummary)
-> Lens RegexPatternSetSummary RegexPatternSetSummary Text Text
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 Core.FromJSON RegexPatternSetSummary where
parseJSON :: Value -> Parser RegexPatternSetSummary
parseJSON =
String
-> (Object -> Parser RegexPatternSetSummary)
-> Value
-> Parser RegexPatternSetSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RegexPatternSetSummary"
( \Object
x ->
Text -> Text -> RegexPatternSetSummary
RegexPatternSetSummary'
(Text -> Text -> RegexPatternSetSummary)
-> Parser Text -> Parser (Text -> RegexPatternSetSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"RegexPatternSetId")
Parser (Text -> RegexPatternSetSummary)
-> Parser Text -> Parser RegexPatternSetSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Name")
)
instance Prelude.Hashable RegexPatternSetSummary
instance Prelude.NFData RegexPatternSetSummary