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