{-# 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.AccountUsage 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 AccountUsage = AccountUsage'
{
AccountUsage -> Maybe Integer
functionCount :: Prelude.Maybe Prelude.Integer,
AccountUsage -> Maybe Integer
totalCodeSize :: Prelude.Maybe Prelude.Integer
}
deriving (AccountUsage -> AccountUsage -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountUsage -> AccountUsage -> Bool
$c/= :: AccountUsage -> AccountUsage -> Bool
== :: AccountUsage -> AccountUsage -> Bool
$c== :: AccountUsage -> AccountUsage -> Bool
Prelude.Eq, ReadPrec [AccountUsage]
ReadPrec AccountUsage
Int -> ReadS AccountUsage
ReadS [AccountUsage]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccountUsage]
$creadListPrec :: ReadPrec [AccountUsage]
readPrec :: ReadPrec AccountUsage
$creadPrec :: ReadPrec AccountUsage
readList :: ReadS [AccountUsage]
$creadList :: ReadS [AccountUsage]
readsPrec :: Int -> ReadS AccountUsage
$creadsPrec :: Int -> ReadS AccountUsage
Prelude.Read, Int -> AccountUsage -> ShowS
[AccountUsage] -> ShowS
AccountUsage -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountUsage] -> ShowS
$cshowList :: [AccountUsage] -> ShowS
show :: AccountUsage -> String
$cshow :: AccountUsage -> String
showsPrec :: Int -> AccountUsage -> ShowS
$cshowsPrec :: Int -> AccountUsage -> ShowS
Prelude.Show, forall x. Rep AccountUsage x -> AccountUsage
forall x. AccountUsage -> Rep AccountUsage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AccountUsage x -> AccountUsage
$cfrom :: forall x. AccountUsage -> Rep AccountUsage x
Prelude.Generic)
newAccountUsage ::
AccountUsage
newAccountUsage :: AccountUsage
newAccountUsage =
AccountUsage'
{ $sel:functionCount:AccountUsage' :: Maybe Integer
functionCount = forall a. Maybe a
Prelude.Nothing,
$sel:totalCodeSize:AccountUsage' :: Maybe Integer
totalCodeSize = forall a. Maybe a
Prelude.Nothing
}
accountUsage_functionCount :: Lens.Lens' AccountUsage (Prelude.Maybe Prelude.Integer)
accountUsage_functionCount :: Lens' AccountUsage (Maybe Integer)
accountUsage_functionCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountUsage' {Maybe Integer
functionCount :: Maybe Integer
$sel:functionCount:AccountUsage' :: AccountUsage -> Maybe Integer
functionCount} -> Maybe Integer
functionCount) (\s :: AccountUsage
s@AccountUsage' {} Maybe Integer
a -> AccountUsage
s {$sel:functionCount:AccountUsage' :: Maybe Integer
functionCount = Maybe Integer
a} :: AccountUsage)
accountUsage_totalCodeSize :: Lens.Lens' AccountUsage (Prelude.Maybe Prelude.Integer)
accountUsage_totalCodeSize :: Lens' AccountUsage (Maybe Integer)
accountUsage_totalCodeSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountUsage' {Maybe Integer
totalCodeSize :: Maybe Integer
$sel:totalCodeSize:AccountUsage' :: AccountUsage -> Maybe Integer
totalCodeSize} -> Maybe Integer
totalCodeSize) (\s :: AccountUsage
s@AccountUsage' {} Maybe Integer
a -> AccountUsage
s {$sel:totalCodeSize:AccountUsage' :: Maybe Integer
totalCodeSize = Maybe Integer
a} :: AccountUsage)
instance Data.FromJSON AccountUsage where
parseJSON :: Value -> Parser AccountUsage
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AccountUsage"
( \Object
x ->
Maybe Integer -> Maybe Integer -> AccountUsage
AccountUsage'
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
"FunctionCount")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TotalCodeSize")
)
instance Prelude.Hashable AccountUsage where
hashWithSalt :: Int -> AccountUsage -> Int
hashWithSalt Int
_salt AccountUsage' {Maybe Integer
totalCodeSize :: Maybe Integer
functionCount :: Maybe Integer
$sel:totalCodeSize:AccountUsage' :: AccountUsage -> Maybe Integer
$sel:functionCount:AccountUsage' :: AccountUsage -> Maybe Integer
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
functionCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
totalCodeSize
instance Prelude.NFData AccountUsage where
rnf :: AccountUsage -> ()
rnf AccountUsage' {Maybe Integer
totalCodeSize :: Maybe Integer
functionCount :: Maybe Integer
$sel:totalCodeSize:AccountUsage' :: AccountUsage -> Maybe Integer
$sel:functionCount:AccountUsage' :: AccountUsage -> Maybe Integer
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
functionCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
totalCodeSize