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