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