module Network.AWS.Route53Domains.DisableDomainAutoRenew
(
disableDomainAutoRenew
, DisableDomainAutoRenew
, ddarDomainName
, disableDomainAutoRenewResponse
, DisableDomainAutoRenewResponse
, ddarrsStatus
) where
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Route53Domains.Types
import Network.AWS.Route53Domains.Types.Product
newtype DisableDomainAutoRenew = DisableDomainAutoRenew'
{ _ddarDomainName :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
disableDomainAutoRenew
:: Text
-> DisableDomainAutoRenew
disableDomainAutoRenew pDomainName_ =
DisableDomainAutoRenew'
{ _ddarDomainName = pDomainName_
}
ddarDomainName :: Lens' DisableDomainAutoRenew Text
ddarDomainName = lens _ddarDomainName (\ s a -> s{_ddarDomainName = a});
instance AWSRequest DisableDomainAutoRenew where
type Rs DisableDomainAutoRenew =
DisableDomainAutoRenewResponse
request = postJSON route53Domains
response
= receiveEmpty
(\ s h x ->
DisableDomainAutoRenewResponse' <$>
(pure (fromEnum s)))
instance ToHeaders DisableDomainAutoRenew where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("Route53Domains_v20140515.DisableDomainAutoRenew" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DisableDomainAutoRenew where
toJSON DisableDomainAutoRenew'{..}
= object
(catMaybes [Just ("DomainName" .= _ddarDomainName)])
instance ToPath DisableDomainAutoRenew where
toPath = const "/"
instance ToQuery DisableDomainAutoRenew where
toQuery = const mempty
newtype DisableDomainAutoRenewResponse = DisableDomainAutoRenewResponse'
{ _ddarrsStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
disableDomainAutoRenewResponse
:: Int
-> DisableDomainAutoRenewResponse
disableDomainAutoRenewResponse pStatus_ =
DisableDomainAutoRenewResponse'
{ _ddarrsStatus = pStatus_
}
ddarrsStatus :: Lens' DisableDomainAutoRenewResponse Int
ddarrsStatus = lens _ddarrsStatus (\ s a -> s{_ddarrsStatus = a});