{-# 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.OpsWorksCM.Types.AccountAttribute 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 AccountAttribute = AccountAttribute'
{
AccountAttribute -> Maybe Int
maximum :: Prelude.Maybe Prelude.Int,
AccountAttribute -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
AccountAttribute -> Maybe Int
used :: Prelude.Maybe Prelude.Int
}
deriving (AccountAttribute -> AccountAttribute -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountAttribute -> AccountAttribute -> Bool
$c/= :: AccountAttribute -> AccountAttribute -> Bool
== :: AccountAttribute -> AccountAttribute -> Bool
$c== :: AccountAttribute -> AccountAttribute -> Bool
Prelude.Eq, ReadPrec [AccountAttribute]
ReadPrec AccountAttribute
Int -> ReadS AccountAttribute
ReadS [AccountAttribute]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccountAttribute]
$creadListPrec :: ReadPrec [AccountAttribute]
readPrec :: ReadPrec AccountAttribute
$creadPrec :: ReadPrec AccountAttribute
readList :: ReadS [AccountAttribute]
$creadList :: ReadS [AccountAttribute]
readsPrec :: Int -> ReadS AccountAttribute
$creadsPrec :: Int -> ReadS AccountAttribute
Prelude.Read, Int -> AccountAttribute -> ShowS
[AccountAttribute] -> ShowS
AccountAttribute -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountAttribute] -> ShowS
$cshowList :: [AccountAttribute] -> ShowS
show :: AccountAttribute -> String
$cshow :: AccountAttribute -> String
showsPrec :: Int -> AccountAttribute -> ShowS
$cshowsPrec :: Int -> AccountAttribute -> ShowS
Prelude.Show, forall x. Rep AccountAttribute x -> AccountAttribute
forall x. AccountAttribute -> Rep AccountAttribute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AccountAttribute x -> AccountAttribute
$cfrom :: forall x. AccountAttribute -> Rep AccountAttribute x
Prelude.Generic)
newAccountAttribute ::
AccountAttribute
newAccountAttribute :: AccountAttribute
newAccountAttribute =
AccountAttribute'
{ $sel:maximum:AccountAttribute' :: Maybe Int
maximum = forall a. Maybe a
Prelude.Nothing,
$sel:name:AccountAttribute' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:used:AccountAttribute' :: Maybe Int
used = forall a. Maybe a
Prelude.Nothing
}
accountAttribute_maximum :: Lens.Lens' AccountAttribute (Prelude.Maybe Prelude.Int)
accountAttribute_maximum :: Lens' AccountAttribute (Maybe Int)
accountAttribute_maximum = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountAttribute' {Maybe Int
maximum :: Maybe Int
$sel:maximum:AccountAttribute' :: AccountAttribute -> Maybe Int
maximum} -> Maybe Int
maximum) (\s :: AccountAttribute
s@AccountAttribute' {} Maybe Int
a -> AccountAttribute
s {$sel:maximum:AccountAttribute' :: Maybe Int
maximum = Maybe Int
a} :: AccountAttribute)
accountAttribute_name :: Lens.Lens' AccountAttribute (Prelude.Maybe Prelude.Text)
accountAttribute_name :: Lens' AccountAttribute (Maybe Text)
accountAttribute_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountAttribute' {Maybe Text
name :: Maybe Text
$sel:name:AccountAttribute' :: AccountAttribute -> Maybe Text
name} -> Maybe Text
name) (\s :: AccountAttribute
s@AccountAttribute' {} Maybe Text
a -> AccountAttribute
s {$sel:name:AccountAttribute' :: Maybe Text
name = Maybe Text
a} :: AccountAttribute)
accountAttribute_used :: Lens.Lens' AccountAttribute (Prelude.Maybe Prelude.Int)
accountAttribute_used :: Lens' AccountAttribute (Maybe Int)
accountAttribute_used = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountAttribute' {Maybe Int
used :: Maybe Int
$sel:used:AccountAttribute' :: AccountAttribute -> Maybe Int
used} -> Maybe Int
used) (\s :: AccountAttribute
s@AccountAttribute' {} Maybe Int
a -> AccountAttribute
s {$sel:used:AccountAttribute' :: Maybe Int
used = Maybe Int
a} :: AccountAttribute)
instance Data.FromJSON AccountAttribute where
parseJSON :: Value -> Parser AccountAttribute
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AccountAttribute"
( \Object
x ->
Maybe Int -> Maybe Text -> Maybe Int -> AccountAttribute
AccountAttribute'
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
"Maximum")
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
"Name")
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
"Used")
)
instance Prelude.Hashable AccountAttribute where
hashWithSalt :: Int -> AccountAttribute -> Int
hashWithSalt Int
_salt AccountAttribute' {Maybe Int
Maybe Text
used :: Maybe Int
name :: Maybe Text
maximum :: Maybe Int
$sel:used:AccountAttribute' :: AccountAttribute -> Maybe Int
$sel:name:AccountAttribute' :: AccountAttribute -> Maybe Text
$sel:maximum:AccountAttribute' :: AccountAttribute -> Maybe Int
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maximum
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
used
instance Prelude.NFData AccountAttribute where
rnf :: AccountAttribute -> ()
rnf AccountAttribute' {Maybe Int
Maybe Text
used :: Maybe Int
name :: Maybe Text
maximum :: Maybe Int
$sel:used:AccountAttribute' :: AccountAttribute -> Maybe Int
$sel:name:AccountAttribute' :: AccountAttribute -> Maybe Text
$sel:maximum:AccountAttribute' :: AccountAttribute -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maximum
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
used