{-# 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.AccountLimit where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AccountLimit = AccountLimit'
{
AccountLimit -> Maybe Int
concurrentExecutions :: Prelude.Maybe Prelude.Int,
AccountLimit -> Maybe Integer
totalCodeSize :: Prelude.Maybe Prelude.Integer,
AccountLimit -> Maybe Natural
unreservedConcurrentExecutions :: Prelude.Maybe Prelude.Natural,
AccountLimit -> Maybe Integer
codeSizeUnzipped :: Prelude.Maybe Prelude.Integer,
AccountLimit -> Maybe Integer
codeSizeZipped :: Prelude.Maybe Prelude.Integer
}
deriving (AccountLimit -> AccountLimit -> Bool
(AccountLimit -> AccountLimit -> Bool)
-> (AccountLimit -> AccountLimit -> Bool) -> Eq AccountLimit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountLimit -> AccountLimit -> Bool
$c/= :: AccountLimit -> AccountLimit -> Bool
== :: AccountLimit -> AccountLimit -> Bool
$c== :: AccountLimit -> AccountLimit -> Bool
Prelude.Eq, ReadPrec [AccountLimit]
ReadPrec AccountLimit
Int -> ReadS AccountLimit
ReadS [AccountLimit]
(Int -> ReadS AccountLimit)
-> ReadS [AccountLimit]
-> ReadPrec AccountLimit
-> ReadPrec [AccountLimit]
-> Read AccountLimit
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccountLimit]
$creadListPrec :: ReadPrec [AccountLimit]
readPrec :: ReadPrec AccountLimit
$creadPrec :: ReadPrec AccountLimit
readList :: ReadS [AccountLimit]
$creadList :: ReadS [AccountLimit]
readsPrec :: Int -> ReadS AccountLimit
$creadsPrec :: Int -> ReadS AccountLimit
Prelude.Read, Int -> AccountLimit -> ShowS
[AccountLimit] -> ShowS
AccountLimit -> String
(Int -> AccountLimit -> ShowS)
-> (AccountLimit -> String)
-> ([AccountLimit] -> ShowS)
-> Show AccountLimit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountLimit] -> ShowS
$cshowList :: [AccountLimit] -> ShowS
show :: AccountLimit -> String
$cshow :: AccountLimit -> String
showsPrec :: Int -> AccountLimit -> ShowS
$cshowsPrec :: Int -> AccountLimit -> ShowS
Prelude.Show, (forall x. AccountLimit -> Rep AccountLimit x)
-> (forall x. Rep AccountLimit x -> AccountLimit)
-> Generic AccountLimit
forall x. Rep AccountLimit x -> AccountLimit
forall x. AccountLimit -> Rep AccountLimit x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AccountLimit x -> AccountLimit
$cfrom :: forall x. AccountLimit -> Rep AccountLimit x
Prelude.Generic)
newAccountLimit ::
AccountLimit
newAccountLimit :: AccountLimit
newAccountLimit =
AccountLimit' :: Maybe Int
-> Maybe Integer
-> Maybe Natural
-> Maybe Integer
-> Maybe Integer
-> AccountLimit
AccountLimit'
{ $sel:concurrentExecutions:AccountLimit' :: Maybe Int
concurrentExecutions =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:totalCodeSize:AccountLimit' :: Maybe Integer
totalCodeSize = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:unreservedConcurrentExecutions:AccountLimit' :: Maybe Natural
unreservedConcurrentExecutions = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:codeSizeUnzipped:AccountLimit' :: Maybe Integer
codeSizeUnzipped = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:codeSizeZipped:AccountLimit' :: Maybe Integer
codeSizeZipped = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
accountLimit_concurrentExecutions :: Lens.Lens' AccountLimit (Prelude.Maybe Prelude.Int)
accountLimit_concurrentExecutions :: (Maybe Int -> f (Maybe Int)) -> AccountLimit -> f AccountLimit
accountLimit_concurrentExecutions = (AccountLimit -> Maybe Int)
-> (AccountLimit -> Maybe Int -> AccountLimit)
-> Lens AccountLimit AccountLimit (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountLimit' {Maybe Int
concurrentExecutions :: Maybe Int
$sel:concurrentExecutions:AccountLimit' :: AccountLimit -> Maybe Int
concurrentExecutions} -> Maybe Int
concurrentExecutions) (\s :: AccountLimit
s@AccountLimit' {} Maybe Int
a -> AccountLimit
s {$sel:concurrentExecutions:AccountLimit' :: Maybe Int
concurrentExecutions = Maybe Int
a} :: AccountLimit)
accountLimit_totalCodeSize :: Lens.Lens' AccountLimit (Prelude.Maybe Prelude.Integer)
accountLimit_totalCodeSize :: (Maybe Integer -> f (Maybe Integer))
-> AccountLimit -> f AccountLimit
accountLimit_totalCodeSize = (AccountLimit -> Maybe Integer)
-> (AccountLimit -> Maybe Integer -> AccountLimit)
-> Lens AccountLimit AccountLimit (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountLimit' {Maybe Integer
totalCodeSize :: Maybe Integer
$sel:totalCodeSize:AccountLimit' :: AccountLimit -> Maybe Integer
totalCodeSize} -> Maybe Integer
totalCodeSize) (\s :: AccountLimit
s@AccountLimit' {} Maybe Integer
a -> AccountLimit
s {$sel:totalCodeSize:AccountLimit' :: Maybe Integer
totalCodeSize = Maybe Integer
a} :: AccountLimit)
accountLimit_unreservedConcurrentExecutions :: Lens.Lens' AccountLimit (Prelude.Maybe Prelude.Natural)
accountLimit_unreservedConcurrentExecutions :: (Maybe Natural -> f (Maybe Natural))
-> AccountLimit -> f AccountLimit
accountLimit_unreservedConcurrentExecutions = (AccountLimit -> Maybe Natural)
-> (AccountLimit -> Maybe Natural -> AccountLimit)
-> Lens AccountLimit AccountLimit (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountLimit' {Maybe Natural
unreservedConcurrentExecutions :: Maybe Natural
$sel:unreservedConcurrentExecutions:AccountLimit' :: AccountLimit -> Maybe Natural
unreservedConcurrentExecutions} -> Maybe Natural
unreservedConcurrentExecutions) (\s :: AccountLimit
s@AccountLimit' {} Maybe Natural
a -> AccountLimit
s {$sel:unreservedConcurrentExecutions:AccountLimit' :: Maybe Natural
unreservedConcurrentExecutions = Maybe Natural
a} :: AccountLimit)
accountLimit_codeSizeUnzipped :: Lens.Lens' AccountLimit (Prelude.Maybe Prelude.Integer)
accountLimit_codeSizeUnzipped :: (Maybe Integer -> f (Maybe Integer))
-> AccountLimit -> f AccountLimit
accountLimit_codeSizeUnzipped = (AccountLimit -> Maybe Integer)
-> (AccountLimit -> Maybe Integer -> AccountLimit)
-> Lens AccountLimit AccountLimit (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountLimit' {Maybe Integer
codeSizeUnzipped :: Maybe Integer
$sel:codeSizeUnzipped:AccountLimit' :: AccountLimit -> Maybe Integer
codeSizeUnzipped} -> Maybe Integer
codeSizeUnzipped) (\s :: AccountLimit
s@AccountLimit' {} Maybe Integer
a -> AccountLimit
s {$sel:codeSizeUnzipped:AccountLimit' :: Maybe Integer
codeSizeUnzipped = Maybe Integer
a} :: AccountLimit)
accountLimit_codeSizeZipped :: Lens.Lens' AccountLimit (Prelude.Maybe Prelude.Integer)
accountLimit_codeSizeZipped :: (Maybe Integer -> f (Maybe Integer))
-> AccountLimit -> f AccountLimit
accountLimit_codeSizeZipped = (AccountLimit -> Maybe Integer)
-> (AccountLimit -> Maybe Integer -> AccountLimit)
-> Lens AccountLimit AccountLimit (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountLimit' {Maybe Integer
codeSizeZipped :: Maybe Integer
$sel:codeSizeZipped:AccountLimit' :: AccountLimit -> Maybe Integer
codeSizeZipped} -> Maybe Integer
codeSizeZipped) (\s :: AccountLimit
s@AccountLimit' {} Maybe Integer
a -> AccountLimit
s {$sel:codeSizeZipped:AccountLimit' :: Maybe Integer
codeSizeZipped = Maybe Integer
a} :: AccountLimit)
instance Core.FromJSON AccountLimit where
parseJSON :: Value -> Parser AccountLimit
parseJSON =
String
-> (Object -> Parser AccountLimit) -> Value -> Parser AccountLimit
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AccountLimit"
( \Object
x ->
Maybe Int
-> Maybe Integer
-> Maybe Natural
-> Maybe Integer
-> Maybe Integer
-> AccountLimit
AccountLimit'
(Maybe Int
-> Maybe Integer
-> Maybe Natural
-> Maybe Integer
-> Maybe Integer
-> AccountLimit)
-> Parser (Maybe Int)
-> Parser
(Maybe Integer
-> Maybe Natural -> Maybe Integer -> Maybe Integer -> AccountLimit)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConcurrentExecutions")
Parser
(Maybe Integer
-> Maybe Natural -> Maybe Integer -> Maybe Integer -> AccountLimit)
-> Parser (Maybe Integer)
-> Parser
(Maybe Natural -> Maybe Integer -> Maybe Integer -> AccountLimit)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TotalCodeSize")
Parser
(Maybe Natural -> Maybe Integer -> Maybe Integer -> AccountLimit)
-> Parser (Maybe Natural)
-> Parser (Maybe Integer -> Maybe Integer -> AccountLimit)
forall (f :: * -> *) a b. Applicative f => 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
"UnreservedConcurrentExecutions")
Parser (Maybe Integer -> Maybe Integer -> AccountLimit)
-> Parser (Maybe Integer) -> Parser (Maybe Integer -> AccountLimit)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CodeSizeUnzipped")
Parser (Maybe Integer -> AccountLimit)
-> Parser (Maybe Integer) -> Parser AccountLimit
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CodeSizeZipped")
)
instance Prelude.Hashable AccountLimit
instance Prelude.NFData AccountLimit