{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.Route53.GetReusableDelegationSetLimit
(
getReusableDelegationSetLimit
, GetReusableDelegationSetLimit
, grdslType
, grdslDelegationSetId
, getReusableDelegationSetLimitResponse
, GetReusableDelegationSetLimitResponse
, grdslrsResponseStatus
, grdslrsLimit
, grdslrsCount
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Route53.Types
import Network.AWS.Route53.Types.Product
data GetReusableDelegationSetLimit = GetReusableDelegationSetLimit'
{ _grdslType :: !ReusableDelegationSetLimitType
, _grdslDelegationSetId :: !ResourceId
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getReusableDelegationSetLimit
:: ReusableDelegationSetLimitType
-> ResourceId
-> GetReusableDelegationSetLimit
getReusableDelegationSetLimit pType_ pDelegationSetId_ =
GetReusableDelegationSetLimit'
{_grdslType = pType_, _grdslDelegationSetId = pDelegationSetId_}
grdslType :: Lens' GetReusableDelegationSetLimit ReusableDelegationSetLimitType
grdslType = lens _grdslType (\ s a -> s{_grdslType = a})
grdslDelegationSetId :: Lens' GetReusableDelegationSetLimit ResourceId
grdslDelegationSetId = lens _grdslDelegationSetId (\ s a -> s{_grdslDelegationSetId = a})
instance AWSRequest GetReusableDelegationSetLimit
where
type Rs GetReusableDelegationSetLimit =
GetReusableDelegationSetLimitResponse
request = get route53
response
= receiveXML
(\ s h x ->
GetReusableDelegationSetLimitResponse' <$>
(pure (fromEnum s)) <*> (x .@ "Limit") <*>
(x .@ "Count"))
instance Hashable GetReusableDelegationSetLimit where
instance NFData GetReusableDelegationSetLimit where
instance ToHeaders GetReusableDelegationSetLimit
where
toHeaders = const mempty
instance ToPath GetReusableDelegationSetLimit where
toPath GetReusableDelegationSetLimit'{..}
= mconcat
["/2013-04-01/reusabledelegationsetlimit/",
toBS _grdslDelegationSetId, "/", toBS _grdslType]
instance ToQuery GetReusableDelegationSetLimit where
toQuery = const mempty
data GetReusableDelegationSetLimitResponse = GetReusableDelegationSetLimitResponse'
{ _grdslrsResponseStatus :: !Int
, _grdslrsLimit :: !ReusableDelegationSetLimit
, _grdslrsCount :: !Nat
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getReusableDelegationSetLimitResponse
:: Int
-> ReusableDelegationSetLimit
-> Natural
-> GetReusableDelegationSetLimitResponse
getReusableDelegationSetLimitResponse pResponseStatus_ pLimit_ pCount_ =
GetReusableDelegationSetLimitResponse'
{ _grdslrsResponseStatus = pResponseStatus_
, _grdslrsLimit = pLimit_
, _grdslrsCount = _Nat # pCount_
}
grdslrsResponseStatus :: Lens' GetReusableDelegationSetLimitResponse Int
grdslrsResponseStatus = lens _grdslrsResponseStatus (\ s a -> s{_grdslrsResponseStatus = a})
grdslrsLimit :: Lens' GetReusableDelegationSetLimitResponse ReusableDelegationSetLimit
grdslrsLimit = lens _grdslrsLimit (\ s a -> s{_grdslrsLimit = a})
grdslrsCount :: Lens' GetReusableDelegationSetLimitResponse Natural
grdslrsCount = lens _grdslrsCount (\ s a -> s{_grdslrsCount = a}) . _Nat
instance NFData GetReusableDelegationSetLimitResponse
where