{-# 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.Lambda.Types.Concurrency where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Concurrency = Concurrency'
{
Concurrency -> Maybe Natural
reservedConcurrentExecutions :: Prelude.Maybe Prelude.Natural
}
deriving (Concurrency -> Concurrency -> Bool
(Concurrency -> Concurrency -> Bool)
-> (Concurrency -> Concurrency -> Bool) -> Eq Concurrency
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Concurrency -> Concurrency -> Bool
$c/= :: Concurrency -> Concurrency -> Bool
== :: Concurrency -> Concurrency -> Bool
$c== :: Concurrency -> Concurrency -> Bool
Prelude.Eq, ReadPrec [Concurrency]
ReadPrec Concurrency
Int -> ReadS Concurrency
ReadS [Concurrency]
(Int -> ReadS Concurrency)
-> ReadS [Concurrency]
-> ReadPrec Concurrency
-> ReadPrec [Concurrency]
-> Read Concurrency
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Concurrency]
$creadListPrec :: ReadPrec [Concurrency]
readPrec :: ReadPrec Concurrency
$creadPrec :: ReadPrec Concurrency
readList :: ReadS [Concurrency]
$creadList :: ReadS [Concurrency]
readsPrec :: Int -> ReadS Concurrency
$creadsPrec :: Int -> ReadS Concurrency
Prelude.Read, Int -> Concurrency -> ShowS
[Concurrency] -> ShowS
Concurrency -> String
(Int -> Concurrency -> ShowS)
-> (Concurrency -> String)
-> ([Concurrency] -> ShowS)
-> Show Concurrency
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Concurrency] -> ShowS
$cshowList :: [Concurrency] -> ShowS
show :: Concurrency -> String
$cshow :: Concurrency -> String
showsPrec :: Int -> Concurrency -> ShowS
$cshowsPrec :: Int -> Concurrency -> ShowS
Prelude.Show, (forall x. Concurrency -> Rep Concurrency x)
-> (forall x. Rep Concurrency x -> Concurrency)
-> Generic Concurrency
forall x. Rep Concurrency x -> Concurrency
forall x. Concurrency -> Rep Concurrency x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Concurrency x -> Concurrency
$cfrom :: forall x. Concurrency -> Rep Concurrency x
Prelude.Generic)
newConcurrency ::
Concurrency
newConcurrency :: Concurrency
newConcurrency =
Concurrency' :: Maybe Natural -> Concurrency
Concurrency'
{ $sel:reservedConcurrentExecutions:Concurrency' :: Maybe Natural
reservedConcurrentExecutions =
Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
concurrency_reservedConcurrentExecutions :: Lens.Lens' Concurrency (Prelude.Maybe Prelude.Natural)
concurrency_reservedConcurrentExecutions :: (Maybe Natural -> f (Maybe Natural))
-> Concurrency -> f Concurrency
concurrency_reservedConcurrentExecutions = (Concurrency -> Maybe Natural)
-> (Concurrency -> Maybe Natural -> Concurrency)
-> Lens Concurrency Concurrency (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Concurrency' {Maybe Natural
reservedConcurrentExecutions :: Maybe Natural
$sel:reservedConcurrentExecutions:Concurrency' :: Concurrency -> Maybe Natural
reservedConcurrentExecutions} -> Maybe Natural
reservedConcurrentExecutions) (\s :: Concurrency
s@Concurrency' {} Maybe Natural
a -> Concurrency
s {$sel:reservedConcurrentExecutions:Concurrency' :: Maybe Natural
reservedConcurrentExecutions = Maybe Natural
a} :: Concurrency)
instance Core.FromJSON Concurrency where
parseJSON :: Value -> Parser Concurrency
parseJSON =
String
-> (Object -> Parser Concurrency) -> Value -> Parser Concurrency
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Concurrency"
( \Object
x ->
Maybe Natural -> Concurrency
Concurrency'
(Maybe Natural -> Concurrency)
-> Parser (Maybe Natural) -> Parser Concurrency
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReservedConcurrentExecutions")
)
instance Prelude.Hashable Concurrency
instance Prelude.NFData Concurrency