{-# 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.RegexMatchSetSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RegexMatchSetSummary = RegexMatchSetSummary'
{
RegexMatchSetSummary -> Text
regexMatchSetId :: Prelude.Text,
RegexMatchSetSummary -> Text
name :: Prelude.Text
}
deriving (RegexMatchSetSummary -> RegexMatchSetSummary -> Bool
(RegexMatchSetSummary -> RegexMatchSetSummary -> Bool)
-> (RegexMatchSetSummary -> RegexMatchSetSummary -> Bool)
-> Eq RegexMatchSetSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegexMatchSetSummary -> RegexMatchSetSummary -> Bool
$c/= :: RegexMatchSetSummary -> RegexMatchSetSummary -> Bool
== :: RegexMatchSetSummary -> RegexMatchSetSummary -> Bool
$c== :: RegexMatchSetSummary -> RegexMatchSetSummary -> Bool
Prelude.Eq, ReadPrec [RegexMatchSetSummary]
ReadPrec RegexMatchSetSummary
Int -> ReadS RegexMatchSetSummary
ReadS [RegexMatchSetSummary]
(Int -> ReadS RegexMatchSetSummary)
-> ReadS [RegexMatchSetSummary]
-> ReadPrec RegexMatchSetSummary
-> ReadPrec [RegexMatchSetSummary]
-> Read RegexMatchSetSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegexMatchSetSummary]
$creadListPrec :: ReadPrec [RegexMatchSetSummary]
readPrec :: ReadPrec RegexMatchSetSummary
$creadPrec :: ReadPrec RegexMatchSetSummary
readList :: ReadS [RegexMatchSetSummary]
$creadList :: ReadS [RegexMatchSetSummary]
readsPrec :: Int -> ReadS RegexMatchSetSummary
$creadsPrec :: Int -> ReadS RegexMatchSetSummary
Prelude.Read, Int -> RegexMatchSetSummary -> ShowS
[RegexMatchSetSummary] -> ShowS
RegexMatchSetSummary -> String
(Int -> RegexMatchSetSummary -> ShowS)
-> (RegexMatchSetSummary -> String)
-> ([RegexMatchSetSummary] -> ShowS)
-> Show RegexMatchSetSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegexMatchSetSummary] -> ShowS
$cshowList :: [RegexMatchSetSummary] -> ShowS
show :: RegexMatchSetSummary -> String
$cshow :: RegexMatchSetSummary -> String
showsPrec :: Int -> RegexMatchSetSummary -> ShowS
$cshowsPrec :: Int -> RegexMatchSetSummary -> ShowS
Prelude.Show, (forall x. RegexMatchSetSummary -> Rep RegexMatchSetSummary x)
-> (forall x. Rep RegexMatchSetSummary x -> RegexMatchSetSummary)
-> Generic RegexMatchSetSummary
forall x. Rep RegexMatchSetSummary x -> RegexMatchSetSummary
forall x. RegexMatchSetSummary -> Rep RegexMatchSetSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegexMatchSetSummary x -> RegexMatchSetSummary
$cfrom :: forall x. RegexMatchSetSummary -> Rep RegexMatchSetSummary x
Prelude.Generic)
newRegexMatchSetSummary ::
Prelude.Text ->
Prelude.Text ->
RegexMatchSetSummary
newRegexMatchSetSummary :: Text -> Text -> RegexMatchSetSummary
newRegexMatchSetSummary Text
pRegexMatchSetId_ Text
pName_ =
RegexMatchSetSummary' :: Text -> Text -> RegexMatchSetSummary
RegexMatchSetSummary'
{ $sel:regexMatchSetId:RegexMatchSetSummary' :: Text
regexMatchSetId =
Text
pRegexMatchSetId_,
$sel:name:RegexMatchSetSummary' :: Text
name = Text
pName_
}
regexMatchSetSummary_regexMatchSetId :: Lens.Lens' RegexMatchSetSummary Prelude.Text
regexMatchSetSummary_regexMatchSetId :: (Text -> f Text) -> RegexMatchSetSummary -> f RegexMatchSetSummary
regexMatchSetSummary_regexMatchSetId = (RegexMatchSetSummary -> Text)
-> (RegexMatchSetSummary -> Text -> RegexMatchSetSummary)
-> Lens RegexMatchSetSummary RegexMatchSetSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegexMatchSetSummary' {Text
regexMatchSetId :: Text
$sel:regexMatchSetId:RegexMatchSetSummary' :: RegexMatchSetSummary -> Text
regexMatchSetId} -> Text
regexMatchSetId) (\s :: RegexMatchSetSummary
s@RegexMatchSetSummary' {} Text
a -> RegexMatchSetSummary
s {$sel:regexMatchSetId:RegexMatchSetSummary' :: Text
regexMatchSetId = Text
a} :: RegexMatchSetSummary)
regexMatchSetSummary_name :: Lens.Lens' RegexMatchSetSummary Prelude.Text
regexMatchSetSummary_name :: (Text -> f Text) -> RegexMatchSetSummary -> f RegexMatchSetSummary
regexMatchSetSummary_name = (RegexMatchSetSummary -> Text)
-> (RegexMatchSetSummary -> Text -> RegexMatchSetSummary)
-> Lens RegexMatchSetSummary RegexMatchSetSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegexMatchSetSummary' {Text
name :: Text
$sel:name:RegexMatchSetSummary' :: RegexMatchSetSummary -> Text
name} -> Text
name) (\s :: RegexMatchSetSummary
s@RegexMatchSetSummary' {} Text
a -> RegexMatchSetSummary
s {$sel:name:RegexMatchSetSummary' :: Text
name = Text
a} :: RegexMatchSetSummary)
instance Core.FromJSON RegexMatchSetSummary where
parseJSON :: Value -> Parser RegexMatchSetSummary
parseJSON =
String
-> (Object -> Parser RegexMatchSetSummary)
-> Value
-> Parser RegexMatchSetSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RegexMatchSetSummary"
( \Object
x ->
Text -> Text -> RegexMatchSetSummary
RegexMatchSetSummary'
(Text -> Text -> RegexMatchSetSummary)
-> Parser Text -> Parser (Text -> RegexMatchSetSummary)
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
"RegexMatchSetId")
Parser (Text -> RegexMatchSetSummary)
-> Parser Text -> Parser RegexMatchSetSummary
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 RegexMatchSetSummary
instance Prelude.NFData RegexMatchSetSummary