{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data Concurrency = Concurrency'
{
Concurrency -> Maybe Natural
reservedConcurrentExecutions :: Prelude.Maybe Prelude.Natural
}
deriving (Concurrency -> Concurrency -> Bool
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]
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
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. 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'
{ $sel:reservedConcurrentExecutions:Concurrency' :: Maybe Natural
reservedConcurrentExecutions =
forall a. Maybe a
Prelude.Nothing
}
concurrency_reservedConcurrentExecutions :: Lens.Lens' Concurrency (Prelude.Maybe Prelude.Natural)
concurrency_reservedConcurrentExecutions :: Lens' Concurrency (Maybe Natural)
concurrency_reservedConcurrentExecutions = 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 Data.FromJSON Concurrency where
parseJSON :: Value -> Parser Concurrency
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Concurrency"
( \Object
x ->
Maybe Natural -> Concurrency
Concurrency'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ReservedConcurrentExecutions")
)
instance Prelude.Hashable Concurrency where
hashWithSalt :: Int -> Concurrency -> Int
hashWithSalt Int
_salt Concurrency' {Maybe Natural
reservedConcurrentExecutions :: Maybe Natural
$sel:reservedConcurrentExecutions:Concurrency' :: Concurrency -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
reservedConcurrentExecutions
instance Prelude.NFData Concurrency where
rnf :: Concurrency -> ()
rnf Concurrency' {Maybe Natural
reservedConcurrentExecutions :: Maybe Natural
$sel:reservedConcurrentExecutions:Concurrency' :: Concurrency -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
reservedConcurrentExecutions