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