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