{-# 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.Route53Domains.DisableDomainAutoRenew
(
disableDomainAutoRenew
, DisableDomainAutoRenew
, ddarDomainName
, disableDomainAutoRenewResponse
, DisableDomainAutoRenewResponse
, ddarrsResponseStatus
) where
import Network.AWS.Lens
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 Hashable DisableDomainAutoRenew
instance NFData DisableDomainAutoRenew
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'
{ _ddarrsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
disableDomainAutoRenewResponse
:: Int
-> DisableDomainAutoRenewResponse
disableDomainAutoRenewResponse pResponseStatus_ =
DisableDomainAutoRenewResponse'
{ _ddarrsResponseStatus = pResponseStatus_
}
ddarrsResponseStatus :: Lens' DisableDomainAutoRenewResponse Int
ddarrsResponseStatus = lens _ddarrsResponseStatus (\ s a -> s{_ddarrsResponseStatus = a});
instance NFData DisableDomainAutoRenewResponse