{-# 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.Route53.Types.AccountLimit 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
import Amazonka.Route53.Internal
import Amazonka.Route53.Types.AccountLimitType
data AccountLimit = AccountLimit'
{
AccountLimit -> AccountLimitType
type' :: AccountLimitType,
AccountLimit -> Natural
value :: Prelude.Natural
}
deriving (AccountLimit -> AccountLimit -> Bool
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]
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
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. 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 ::
AccountLimitType ->
Prelude.Natural ->
AccountLimit
newAccountLimit :: AccountLimitType -> Natural -> AccountLimit
newAccountLimit AccountLimitType
pType_ Natural
pValue_ =
AccountLimit' {$sel:type':AccountLimit' :: AccountLimitType
type' = AccountLimitType
pType_, $sel:value:AccountLimit' :: Natural
value = Natural
pValue_}
accountLimit_type :: Lens.Lens' AccountLimit AccountLimitType
accountLimit_type :: Lens' AccountLimit AccountLimitType
accountLimit_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountLimit' {AccountLimitType
type' :: AccountLimitType
$sel:type':AccountLimit' :: AccountLimit -> AccountLimitType
type'} -> AccountLimitType
type') (\s :: AccountLimit
s@AccountLimit' {} AccountLimitType
a -> AccountLimit
s {$sel:type':AccountLimit' :: AccountLimitType
type' = AccountLimitType
a} :: AccountLimit)
accountLimit_value :: Lens.Lens' AccountLimit Prelude.Natural
accountLimit_value :: Lens' AccountLimit Natural
accountLimit_value = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountLimit' {Natural
value :: Natural
$sel:value:AccountLimit' :: AccountLimit -> Natural
value} -> Natural
value) (\s :: AccountLimit
s@AccountLimit' {} Natural
a -> AccountLimit
s {$sel:value:AccountLimit' :: Natural
value = Natural
a} :: AccountLimit)
instance Data.FromXML AccountLimit where
parseXML :: [Node] -> Either String AccountLimit
parseXML [Node]
x =
AccountLimitType -> Natural -> AccountLimit
AccountLimit'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"Type")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"Value")
instance Prelude.Hashable AccountLimit where
hashWithSalt :: Int -> AccountLimit -> Int
hashWithSalt Int
_salt AccountLimit' {Natural
AccountLimitType
value :: Natural
type' :: AccountLimitType
$sel:value:AccountLimit' :: AccountLimit -> Natural
$sel:type':AccountLimit' :: AccountLimit -> AccountLimitType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` AccountLimitType
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
value
instance Prelude.NFData AccountLimit where
rnf :: AccountLimit -> ()
rnf AccountLimit' {Natural
AccountLimitType
value :: Natural
type' :: AccountLimitType
$sel:value:AccountLimit' :: AccountLimit -> Natural
$sel:type':AccountLimit' :: AccountLimit -> AccountLimitType
..} =
forall a. NFData a => a -> ()
Prelude.rnf AccountLimitType
type' seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
value