module Network.AWS.Route53.GetReusableDelegationSet
(
getReusableDelegationSet
, GetReusableDelegationSet
, grdsId
, getReusableDelegationSetResponse
, GetReusableDelegationSetResponse
, grdsrsResponseStatus
, grdsrsDelegationSet
) where
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Route53.Types
import Network.AWS.Route53.Types.Product
newtype GetReusableDelegationSet = GetReusableDelegationSet'
{ _grdsId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getReusableDelegationSet
:: Text
-> GetReusableDelegationSet
getReusableDelegationSet pId_ =
GetReusableDelegationSet'
{ _grdsId = pId_
}
grdsId :: Lens' GetReusableDelegationSet Text
grdsId = lens _grdsId (\ s a -> s{_grdsId = a});
instance AWSRequest GetReusableDelegationSet where
type Rs GetReusableDelegationSet =
GetReusableDelegationSetResponse
request = get route53
response
= receiveXML
(\ s h x ->
GetReusableDelegationSetResponse' <$>
(pure (fromEnum s)) <*> (x .@ "DelegationSet"))
instance ToHeaders GetReusableDelegationSet where
toHeaders = const mempty
instance ToPath GetReusableDelegationSet where
toPath GetReusableDelegationSet'{..}
= mconcat
["/2013-04-01/delegationset/", toBS _grdsId]
instance ToQuery GetReusableDelegationSet where
toQuery = const mempty
data GetReusableDelegationSetResponse = GetReusableDelegationSetResponse'
{ _grdsrsResponseStatus :: !Int
, _grdsrsDelegationSet :: !DelegationSet
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getReusableDelegationSetResponse
:: Int
-> DelegationSet
-> GetReusableDelegationSetResponse
getReusableDelegationSetResponse pResponseStatus_ pDelegationSet_ =
GetReusableDelegationSetResponse'
{ _grdsrsResponseStatus = pResponseStatus_
, _grdsrsDelegationSet = pDelegationSet_
}
grdsrsResponseStatus :: Lens' GetReusableDelegationSetResponse Int
grdsrsResponseStatus = lens _grdsrsResponseStatus (\ s a -> s{_grdsrsResponseStatus = a});
grdsrsDelegationSet :: Lens' GetReusableDelegationSetResponse DelegationSet
grdsrsDelegationSet = lens _grdsrsDelegationSet (\ s a -> s{_grdsrsDelegationSet = a});