{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Route53.GetAccountLimit
(
GetAccountLimit (..),
newGetAccountLimit,
getAccountLimit_type,
GetAccountLimitResponse (..),
newGetAccountLimitResponse,
getAccountLimitResponse_httpStatus,
getAccountLimitResponse_limit,
getAccountLimitResponse_count,
)
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 qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Route53.Types
data GetAccountLimit = GetAccountLimit'
{
GetAccountLimit -> AccountLimitType
type' :: AccountLimitType
}
deriving (GetAccountLimit -> GetAccountLimit -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAccountLimit -> GetAccountLimit -> Bool
$c/= :: GetAccountLimit -> GetAccountLimit -> Bool
== :: GetAccountLimit -> GetAccountLimit -> Bool
$c== :: GetAccountLimit -> GetAccountLimit -> Bool
Prelude.Eq, ReadPrec [GetAccountLimit]
ReadPrec GetAccountLimit
Int -> ReadS GetAccountLimit
ReadS [GetAccountLimit]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAccountLimit]
$creadListPrec :: ReadPrec [GetAccountLimit]
readPrec :: ReadPrec GetAccountLimit
$creadPrec :: ReadPrec GetAccountLimit
readList :: ReadS [GetAccountLimit]
$creadList :: ReadS [GetAccountLimit]
readsPrec :: Int -> ReadS GetAccountLimit
$creadsPrec :: Int -> ReadS GetAccountLimit
Prelude.Read, Int -> GetAccountLimit -> ShowS
[GetAccountLimit] -> ShowS
GetAccountLimit -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAccountLimit] -> ShowS
$cshowList :: [GetAccountLimit] -> ShowS
show :: GetAccountLimit -> String
$cshow :: GetAccountLimit -> String
showsPrec :: Int -> GetAccountLimit -> ShowS
$cshowsPrec :: Int -> GetAccountLimit -> ShowS
Prelude.Show, forall x. Rep GetAccountLimit x -> GetAccountLimit
forall x. GetAccountLimit -> Rep GetAccountLimit x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetAccountLimit x -> GetAccountLimit
$cfrom :: forall x. GetAccountLimit -> Rep GetAccountLimit x
Prelude.Generic)
newGetAccountLimit ::
AccountLimitType ->
GetAccountLimit
newGetAccountLimit :: AccountLimitType -> GetAccountLimit
newGetAccountLimit AccountLimitType
pType_ =
GetAccountLimit' {$sel:type':GetAccountLimit' :: AccountLimitType
type' = AccountLimitType
pType_}
getAccountLimit_type :: Lens.Lens' GetAccountLimit AccountLimitType
getAccountLimit_type :: Lens' GetAccountLimit AccountLimitType
getAccountLimit_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAccountLimit' {AccountLimitType
type' :: AccountLimitType
$sel:type':GetAccountLimit' :: GetAccountLimit -> AccountLimitType
type'} -> AccountLimitType
type') (\s :: GetAccountLimit
s@GetAccountLimit' {} AccountLimitType
a -> GetAccountLimit
s {$sel:type':GetAccountLimit' :: AccountLimitType
type' = AccountLimitType
a} :: GetAccountLimit)
instance Core.AWSRequest GetAccountLimit where
type
AWSResponse GetAccountLimit =
GetAccountLimitResponse
request :: (Service -> Service) -> GetAccountLimit -> Request GetAccountLimit
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetAccountLimit
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetAccountLimit)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> AccountLimit -> Natural -> GetAccountLimitResponse
GetAccountLimitResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
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
"Limit")
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
"Count")
)
instance Prelude.Hashable GetAccountLimit where
hashWithSalt :: Int -> GetAccountLimit -> Int
hashWithSalt Int
_salt GetAccountLimit' {AccountLimitType
type' :: AccountLimitType
$sel:type':GetAccountLimit' :: GetAccountLimit -> AccountLimitType
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` AccountLimitType
type'
instance Prelude.NFData GetAccountLimit where
rnf :: GetAccountLimit -> ()
rnf GetAccountLimit' {AccountLimitType
type' :: AccountLimitType
$sel:type':GetAccountLimit' :: GetAccountLimit -> AccountLimitType
..} = forall a. NFData a => a -> ()
Prelude.rnf AccountLimitType
type'
instance Data.ToHeaders GetAccountLimit where
toHeaders :: GetAccountLimit -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath GetAccountLimit where
toPath :: GetAccountLimit -> ByteString
toPath GetAccountLimit' {AccountLimitType
type' :: AccountLimitType
$sel:type':GetAccountLimit' :: GetAccountLimit -> AccountLimitType
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/2013-04-01/accountlimit/", forall a. ToByteString a => a -> ByteString
Data.toBS AccountLimitType
type']
instance Data.ToQuery GetAccountLimit where
toQuery :: GetAccountLimit -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetAccountLimitResponse = GetAccountLimitResponse'
{
GetAccountLimitResponse -> Int
httpStatus :: Prelude.Int,
GetAccountLimitResponse -> AccountLimit
limit :: AccountLimit,
GetAccountLimitResponse -> Natural
count :: Prelude.Natural
}
deriving (GetAccountLimitResponse -> GetAccountLimitResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAccountLimitResponse -> GetAccountLimitResponse -> Bool
$c/= :: GetAccountLimitResponse -> GetAccountLimitResponse -> Bool
== :: GetAccountLimitResponse -> GetAccountLimitResponse -> Bool
$c== :: GetAccountLimitResponse -> GetAccountLimitResponse -> Bool
Prelude.Eq, ReadPrec [GetAccountLimitResponse]
ReadPrec GetAccountLimitResponse
Int -> ReadS GetAccountLimitResponse
ReadS [GetAccountLimitResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAccountLimitResponse]
$creadListPrec :: ReadPrec [GetAccountLimitResponse]
readPrec :: ReadPrec GetAccountLimitResponse
$creadPrec :: ReadPrec GetAccountLimitResponse
readList :: ReadS [GetAccountLimitResponse]
$creadList :: ReadS [GetAccountLimitResponse]
readsPrec :: Int -> ReadS GetAccountLimitResponse
$creadsPrec :: Int -> ReadS GetAccountLimitResponse
Prelude.Read, Int -> GetAccountLimitResponse -> ShowS
[GetAccountLimitResponse] -> ShowS
GetAccountLimitResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAccountLimitResponse] -> ShowS
$cshowList :: [GetAccountLimitResponse] -> ShowS
show :: GetAccountLimitResponse -> String
$cshow :: GetAccountLimitResponse -> String
showsPrec :: Int -> GetAccountLimitResponse -> ShowS
$cshowsPrec :: Int -> GetAccountLimitResponse -> ShowS
Prelude.Show, forall x. Rep GetAccountLimitResponse x -> GetAccountLimitResponse
forall x. GetAccountLimitResponse -> Rep GetAccountLimitResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetAccountLimitResponse x -> GetAccountLimitResponse
$cfrom :: forall x. GetAccountLimitResponse -> Rep GetAccountLimitResponse x
Prelude.Generic)
newGetAccountLimitResponse ::
Prelude.Int ->
AccountLimit ->
Prelude.Natural ->
GetAccountLimitResponse
newGetAccountLimitResponse :: Int -> AccountLimit -> Natural -> GetAccountLimitResponse
newGetAccountLimitResponse
Int
pHttpStatus_
AccountLimit
pLimit_
Natural
pCount_ =
GetAccountLimitResponse'
{ $sel:httpStatus:GetAccountLimitResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:limit:GetAccountLimitResponse' :: AccountLimit
limit = AccountLimit
pLimit_,
$sel:count:GetAccountLimitResponse' :: Natural
count = Natural
pCount_
}
getAccountLimitResponse_httpStatus :: Lens.Lens' GetAccountLimitResponse Prelude.Int
getAccountLimitResponse_httpStatus :: Lens' GetAccountLimitResponse Int
getAccountLimitResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAccountLimitResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetAccountLimitResponse' :: GetAccountLimitResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetAccountLimitResponse
s@GetAccountLimitResponse' {} Int
a -> GetAccountLimitResponse
s {$sel:httpStatus:GetAccountLimitResponse' :: Int
httpStatus = Int
a} :: GetAccountLimitResponse)
getAccountLimitResponse_limit :: Lens.Lens' GetAccountLimitResponse AccountLimit
getAccountLimitResponse_limit :: Lens' GetAccountLimitResponse AccountLimit
getAccountLimitResponse_limit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAccountLimitResponse' {AccountLimit
limit :: AccountLimit
$sel:limit:GetAccountLimitResponse' :: GetAccountLimitResponse -> AccountLimit
limit} -> AccountLimit
limit) (\s :: GetAccountLimitResponse
s@GetAccountLimitResponse' {} AccountLimit
a -> GetAccountLimitResponse
s {$sel:limit:GetAccountLimitResponse' :: AccountLimit
limit = AccountLimit
a} :: GetAccountLimitResponse)
getAccountLimitResponse_count :: Lens.Lens' GetAccountLimitResponse Prelude.Natural
getAccountLimitResponse_count :: Lens' GetAccountLimitResponse Natural
getAccountLimitResponse_count = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAccountLimitResponse' {Natural
count :: Natural
$sel:count:GetAccountLimitResponse' :: GetAccountLimitResponse -> Natural
count} -> Natural
count) (\s :: GetAccountLimitResponse
s@GetAccountLimitResponse' {} Natural
a -> GetAccountLimitResponse
s {$sel:count:GetAccountLimitResponse' :: Natural
count = Natural
a} :: GetAccountLimitResponse)
instance Prelude.NFData GetAccountLimitResponse where
rnf :: GetAccountLimitResponse -> ()
rnf GetAccountLimitResponse' {Int
Natural
AccountLimit
count :: Natural
limit :: AccountLimit
httpStatus :: Int
$sel:count:GetAccountLimitResponse' :: GetAccountLimitResponse -> Natural
$sel:limit:GetAccountLimitResponse' :: GetAccountLimitResponse -> AccountLimit
$sel:httpStatus:GetAccountLimitResponse' :: GetAccountLimitResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf AccountLimit
limit
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
count