{-# 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.AppMesh.Types.VirtualGatewayGrpcConnectionPool where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VirtualGatewayGrpcConnectionPool = VirtualGatewayGrpcConnectionPool'
{
VirtualGatewayGrpcConnectionPool -> Natural
maxRequests :: Prelude.Natural
}
deriving (VirtualGatewayGrpcConnectionPool
-> VirtualGatewayGrpcConnectionPool -> Bool
(VirtualGatewayGrpcConnectionPool
-> VirtualGatewayGrpcConnectionPool -> Bool)
-> (VirtualGatewayGrpcConnectionPool
-> VirtualGatewayGrpcConnectionPool -> Bool)
-> Eq VirtualGatewayGrpcConnectionPool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VirtualGatewayGrpcConnectionPool
-> VirtualGatewayGrpcConnectionPool -> Bool
$c/= :: VirtualGatewayGrpcConnectionPool
-> VirtualGatewayGrpcConnectionPool -> Bool
== :: VirtualGatewayGrpcConnectionPool
-> VirtualGatewayGrpcConnectionPool -> Bool
$c== :: VirtualGatewayGrpcConnectionPool
-> VirtualGatewayGrpcConnectionPool -> Bool
Prelude.Eq, ReadPrec [VirtualGatewayGrpcConnectionPool]
ReadPrec VirtualGatewayGrpcConnectionPool
Int -> ReadS VirtualGatewayGrpcConnectionPool
ReadS [VirtualGatewayGrpcConnectionPool]
(Int -> ReadS VirtualGatewayGrpcConnectionPool)
-> ReadS [VirtualGatewayGrpcConnectionPool]
-> ReadPrec VirtualGatewayGrpcConnectionPool
-> ReadPrec [VirtualGatewayGrpcConnectionPool]
-> Read VirtualGatewayGrpcConnectionPool
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VirtualGatewayGrpcConnectionPool]
$creadListPrec :: ReadPrec [VirtualGatewayGrpcConnectionPool]
readPrec :: ReadPrec VirtualGatewayGrpcConnectionPool
$creadPrec :: ReadPrec VirtualGatewayGrpcConnectionPool
readList :: ReadS [VirtualGatewayGrpcConnectionPool]
$creadList :: ReadS [VirtualGatewayGrpcConnectionPool]
readsPrec :: Int -> ReadS VirtualGatewayGrpcConnectionPool
$creadsPrec :: Int -> ReadS VirtualGatewayGrpcConnectionPool
Prelude.Read, Int -> VirtualGatewayGrpcConnectionPool -> ShowS
[VirtualGatewayGrpcConnectionPool] -> ShowS
VirtualGatewayGrpcConnectionPool -> String
(Int -> VirtualGatewayGrpcConnectionPool -> ShowS)
-> (VirtualGatewayGrpcConnectionPool -> String)
-> ([VirtualGatewayGrpcConnectionPool] -> ShowS)
-> Show VirtualGatewayGrpcConnectionPool
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VirtualGatewayGrpcConnectionPool] -> ShowS
$cshowList :: [VirtualGatewayGrpcConnectionPool] -> ShowS
show :: VirtualGatewayGrpcConnectionPool -> String
$cshow :: VirtualGatewayGrpcConnectionPool -> String
showsPrec :: Int -> VirtualGatewayGrpcConnectionPool -> ShowS
$cshowsPrec :: Int -> VirtualGatewayGrpcConnectionPool -> ShowS
Prelude.Show, (forall x.
VirtualGatewayGrpcConnectionPool
-> Rep VirtualGatewayGrpcConnectionPool x)
-> (forall x.
Rep VirtualGatewayGrpcConnectionPool x
-> VirtualGatewayGrpcConnectionPool)
-> Generic VirtualGatewayGrpcConnectionPool
forall x.
Rep VirtualGatewayGrpcConnectionPool x
-> VirtualGatewayGrpcConnectionPool
forall x.
VirtualGatewayGrpcConnectionPool
-> Rep VirtualGatewayGrpcConnectionPool x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep VirtualGatewayGrpcConnectionPool x
-> VirtualGatewayGrpcConnectionPool
$cfrom :: forall x.
VirtualGatewayGrpcConnectionPool
-> Rep VirtualGatewayGrpcConnectionPool x
Prelude.Generic)
newVirtualGatewayGrpcConnectionPool ::
Prelude.Natural ->
VirtualGatewayGrpcConnectionPool
newVirtualGatewayGrpcConnectionPool :: Natural -> VirtualGatewayGrpcConnectionPool
newVirtualGatewayGrpcConnectionPool Natural
pMaxRequests_ =
VirtualGatewayGrpcConnectionPool' :: Natural -> VirtualGatewayGrpcConnectionPool
VirtualGatewayGrpcConnectionPool'
{ $sel:maxRequests:VirtualGatewayGrpcConnectionPool' :: Natural
maxRequests =
Natural
pMaxRequests_
}
virtualGatewayGrpcConnectionPool_maxRequests :: Lens.Lens' VirtualGatewayGrpcConnectionPool Prelude.Natural
virtualGatewayGrpcConnectionPool_maxRequests :: (Natural -> f Natural)
-> VirtualGatewayGrpcConnectionPool
-> f VirtualGatewayGrpcConnectionPool
virtualGatewayGrpcConnectionPool_maxRequests = (VirtualGatewayGrpcConnectionPool -> Natural)
-> (VirtualGatewayGrpcConnectionPool
-> Natural -> VirtualGatewayGrpcConnectionPool)
-> Lens
VirtualGatewayGrpcConnectionPool
VirtualGatewayGrpcConnectionPool
Natural
Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualGatewayGrpcConnectionPool' {Natural
maxRequests :: Natural
$sel:maxRequests:VirtualGatewayGrpcConnectionPool' :: VirtualGatewayGrpcConnectionPool -> Natural
maxRequests} -> Natural
maxRequests) (\s :: VirtualGatewayGrpcConnectionPool
s@VirtualGatewayGrpcConnectionPool' {} Natural
a -> VirtualGatewayGrpcConnectionPool
s {$sel:maxRequests:VirtualGatewayGrpcConnectionPool' :: Natural
maxRequests = Natural
a} :: VirtualGatewayGrpcConnectionPool)
instance
Core.FromJSON
VirtualGatewayGrpcConnectionPool
where
parseJSON :: Value -> Parser VirtualGatewayGrpcConnectionPool
parseJSON =
String
-> (Object -> Parser VirtualGatewayGrpcConnectionPool)
-> Value
-> Parser VirtualGatewayGrpcConnectionPool
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VirtualGatewayGrpcConnectionPool"
( \Object
x ->
Natural -> VirtualGatewayGrpcConnectionPool
VirtualGatewayGrpcConnectionPool'
(Natural -> VirtualGatewayGrpcConnectionPool)
-> Parser Natural -> Parser VirtualGatewayGrpcConnectionPool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"maxRequests")
)
instance
Prelude.Hashable
VirtualGatewayGrpcConnectionPool
instance
Prelude.NFData
VirtualGatewayGrpcConnectionPool
instance Core.ToJSON VirtualGatewayGrpcConnectionPool where
toJSON :: VirtualGatewayGrpcConnectionPool -> Value
toJSON VirtualGatewayGrpcConnectionPool' {Natural
maxRequests :: Natural
$sel:maxRequests:VirtualGatewayGrpcConnectionPool' :: VirtualGatewayGrpcConnectionPool -> Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"maxRequests" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
maxRequests)]
)