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