{-# 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.WAFRegional.Types.XssMatchSetSummary 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 XssMatchSetSummary = XssMatchSetSummary'
{
XssMatchSetSummary -> Text
xssMatchSetId :: Prelude.Text,
XssMatchSetSummary -> Text
name :: Prelude.Text
}
deriving (XssMatchSetSummary -> XssMatchSetSummary -> Bool
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]
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
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. 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'
{ $sel:xssMatchSetId:XssMatchSetSummary' :: Text
xssMatchSetId =
Text
pXssMatchSetId_,
$sel:name:XssMatchSetSummary' :: Text
name = Text
pName_
}
xssMatchSetSummary_xssMatchSetId :: Lens.Lens' XssMatchSetSummary Prelude.Text
xssMatchSetSummary_xssMatchSetId :: Lens' XssMatchSetSummary Text
xssMatchSetSummary_xssMatchSetId = 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 :: Lens' XssMatchSetSummary Text
xssMatchSetSummary_name = 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 Data.FromJSON XssMatchSetSummary where
parseJSON :: Value -> Parser XssMatchSetSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"XssMatchSetSummary"
( \Object
x ->
Text -> Text -> XssMatchSetSummary
XssMatchSetSummary'
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
"XssMatchSetId")
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 XssMatchSetSummary where
hashWithSalt :: Int -> XssMatchSetSummary -> Int
hashWithSalt Int
_salt XssMatchSetSummary' {Text
name :: Text
xssMatchSetId :: Text
$sel:name:XssMatchSetSummary' :: XssMatchSetSummary -> Text
$sel:xssMatchSetId:XssMatchSetSummary' :: XssMatchSetSummary -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
xssMatchSetId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData XssMatchSetSummary where
rnf :: XssMatchSetSummary -> ()
rnf XssMatchSetSummary' {Text
name :: Text
xssMatchSetId :: Text
$sel:name:XssMatchSetSummary' :: XssMatchSetSummary -> Text
$sel:xssMatchSetId:XssMatchSetSummary' :: XssMatchSetSummary -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
xssMatchSetId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name