{-# 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.GetReusableDelegationSet
(
getReusableDelegationSet
, GetReusableDelegationSet
, grdsId
, getReusableDelegationSetResponse
, GetReusableDelegationSetResponse
, grdsrsResponseStatus
, grdsrsDelegationSet
) 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
newtype GetReusableDelegationSet = GetReusableDelegationSet'
{ _grdsId :: ResourceId
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getReusableDelegationSet
:: ResourceId
-> GetReusableDelegationSet
getReusableDelegationSet pId_ = GetReusableDelegationSet' {_grdsId = pId_}
grdsId :: Lens' GetReusableDelegationSet ResourceId
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 Hashable GetReusableDelegationSet where
instance NFData GetReusableDelegationSet where
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})
instance NFData GetReusableDelegationSetResponse
where