{-# 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.WebACLSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data WebACLSummary = WebACLSummary'
{
WebACLSummary -> Text
webACLId :: Prelude.Text,
WebACLSummary -> Text
name :: Prelude.Text
}
deriving (WebACLSummary -> WebACLSummary -> Bool
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]
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
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. 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'
{ $sel:webACLId:WebACLSummary' :: Text
webACLId = Text
pWebACLId_,
$sel:name:WebACLSummary' :: Text
name = Text
pName_
}
webACLSummary_webACLId :: Lens.Lens' WebACLSummary Prelude.Text
webACLSummary_webACLId :: Lens' WebACLSummary Text
webACLSummary_webACLId = 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 :: Lens' WebACLSummary Text
webACLSummary_name = 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 Data.FromJSON WebACLSummary where
parseJSON :: Value -> Parser WebACLSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"WebACLSummary"
( \Object
x ->
Text -> Text -> WebACLSummary
WebACLSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"WebACLId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Name")
)
instance Prelude.Hashable WebACLSummary where
hashWithSalt :: Int -> WebACLSummary -> Int
hashWithSalt Int
_salt WebACLSummary' {Text
name :: Text
webACLId :: Text
$sel:name:WebACLSummary' :: WebACLSummary -> Text
$sel:webACLId:WebACLSummary' :: WebACLSummary -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
webACLId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData WebACLSummary where
rnf :: WebACLSummary -> ()
rnf WebACLSummary' {Text
name :: Text
webACLId :: Text
$sel:name:WebACLSummary' :: WebACLSummary -> Text
$sel:webACLId:WebACLSummary' :: WebACLSummary -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
webACLId seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name