{-# 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.ElasticBeanstalk.Types.ResourceQuota 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 ResourceQuota = ResourceQuota'
{
ResourceQuota -> Maybe Int
maximum :: Prelude.Maybe Prelude.Int
}
deriving (ResourceQuota -> ResourceQuota -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResourceQuota -> ResourceQuota -> Bool
$c/= :: ResourceQuota -> ResourceQuota -> Bool
== :: ResourceQuota -> ResourceQuota -> Bool
$c== :: ResourceQuota -> ResourceQuota -> Bool
Prelude.Eq, ReadPrec [ResourceQuota]
ReadPrec ResourceQuota
Int -> ReadS ResourceQuota
ReadS [ResourceQuota]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResourceQuota]
$creadListPrec :: ReadPrec [ResourceQuota]
readPrec :: ReadPrec ResourceQuota
$creadPrec :: ReadPrec ResourceQuota
readList :: ReadS [ResourceQuota]
$creadList :: ReadS [ResourceQuota]
readsPrec :: Int -> ReadS ResourceQuota
$creadsPrec :: Int -> ReadS ResourceQuota
Prelude.Read, Int -> ResourceQuota -> ShowS
[ResourceQuota] -> ShowS
ResourceQuota -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResourceQuota] -> ShowS
$cshowList :: [ResourceQuota] -> ShowS
show :: ResourceQuota -> String
$cshow :: ResourceQuota -> String
showsPrec :: Int -> ResourceQuota -> ShowS
$cshowsPrec :: Int -> ResourceQuota -> ShowS
Prelude.Show, forall x. Rep ResourceQuota x -> ResourceQuota
forall x. ResourceQuota -> Rep ResourceQuota x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResourceQuota x -> ResourceQuota
$cfrom :: forall x. ResourceQuota -> Rep ResourceQuota x
Prelude.Generic)
newResourceQuota ::
ResourceQuota
newResourceQuota :: ResourceQuota
newResourceQuota =
ResourceQuota' {$sel:maximum:ResourceQuota' :: Maybe Int
maximum = forall a. Maybe a
Prelude.Nothing}
resourceQuota_maximum :: Lens.Lens' ResourceQuota (Prelude.Maybe Prelude.Int)
resourceQuota_maximum :: Lens' ResourceQuota (Maybe Int)
resourceQuota_maximum = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceQuota' {Maybe Int
maximum :: Maybe Int
$sel:maximum:ResourceQuota' :: ResourceQuota -> Maybe Int
maximum} -> Maybe Int
maximum) (\s :: ResourceQuota
s@ResourceQuota' {} Maybe Int
a -> ResourceQuota
s {$sel:maximum:ResourceQuota' :: Maybe Int
maximum = Maybe Int
a} :: ResourceQuota)
instance Data.FromXML ResourceQuota where
parseXML :: [Node] -> Either String ResourceQuota
parseXML [Node]
x =
Maybe Int -> ResourceQuota
ResourceQuota' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Maximum")
instance Prelude.Hashable ResourceQuota where
hashWithSalt :: Int -> ResourceQuota -> Int
hashWithSalt Int
_salt ResourceQuota' {Maybe Int
maximum :: Maybe Int
$sel:maximum:ResourceQuota' :: ResourceQuota -> Maybe Int
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maximum
instance Prelude.NFData ResourceQuota where
rnf :: ResourceQuota -> ()
rnf ResourceQuota' {Maybe Int
maximum :: Maybe Int
$sel:maximum:ResourceQuota' :: ResourceQuota -> Maybe Int
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maximum