{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ResourceQuota = ResourceQuota'
{
ResourceQuota -> Maybe Int
maximum :: Prelude.Maybe Prelude.Int
}
deriving (ResourceQuota -> ResourceQuota -> Bool
(ResourceQuota -> ResourceQuota -> Bool)
-> (ResourceQuota -> ResourceQuota -> Bool) -> Eq ResourceQuota
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]
(Int -> ReadS ResourceQuota)
-> ReadS [ResourceQuota]
-> ReadPrec ResourceQuota
-> ReadPrec [ResourceQuota]
-> Read 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
(Int -> ResourceQuota -> ShowS)
-> (ResourceQuota -> String)
-> ([ResourceQuota] -> ShowS)
-> Show ResourceQuota
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. ResourceQuota -> Rep ResourceQuota x)
-> (forall x. Rep ResourceQuota x -> ResourceQuota)
-> Generic ResourceQuota
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' :: Maybe Int -> ResourceQuota
ResourceQuota' {$sel:maximum:ResourceQuota' :: Maybe Int
maximum = Maybe Int
forall a. Maybe a
Prelude.Nothing}
resourceQuota_maximum :: Lens.Lens' ResourceQuota (Prelude.Maybe Prelude.Int)
resourceQuota_maximum :: (Maybe Int -> f (Maybe Int)) -> ResourceQuota -> f ResourceQuota
resourceQuota_maximum = (ResourceQuota -> Maybe Int)
-> (ResourceQuota -> Maybe Int -> ResourceQuota)
-> Lens ResourceQuota ResourceQuota (Maybe Int) (Maybe Int)
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 Core.FromXML ResourceQuota where
parseXML :: [Node] -> Either String ResourceQuota
parseXML [Node]
x =
Maybe Int -> ResourceQuota
ResourceQuota' (Maybe Int -> ResourceQuota)
-> Either String (Maybe Int) -> Either String ResourceQuota
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Maximum")
instance Prelude.Hashable ResourceQuota
instance Prelude.NFData ResourceQuota