{-# 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.EnableDomainAutoRenew
(
enableDomainAutoRenew
, EnableDomainAutoRenew
, edarDomainName
, enableDomainAutoRenewResponse
, EnableDomainAutoRenewResponse
, edarrsResponseStatus
) 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 EnableDomainAutoRenew = EnableDomainAutoRenew'
{ _edarDomainName :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
enableDomainAutoRenew
:: Text
-> EnableDomainAutoRenew
enableDomainAutoRenew pDomainName_ =
EnableDomainAutoRenew'
{ _edarDomainName = pDomainName_
}
edarDomainName :: Lens' EnableDomainAutoRenew Text
edarDomainName = lens _edarDomainName (\ s a -> s{_edarDomainName = a});
instance AWSRequest EnableDomainAutoRenew where
type Rs EnableDomainAutoRenew =
EnableDomainAutoRenewResponse
request = postJSON route53Domains
response
= receiveEmpty
(\ s h x ->
EnableDomainAutoRenewResponse' <$>
(pure (fromEnum s)))
instance Hashable EnableDomainAutoRenew
instance NFData EnableDomainAutoRenew
instance ToHeaders EnableDomainAutoRenew where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("Route53Domains_v20140515.EnableDomainAutoRenew" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON EnableDomainAutoRenew where
toJSON EnableDomainAutoRenew'{..}
= object
(catMaybes [Just ("DomainName" .= _edarDomainName)])
instance ToPath EnableDomainAutoRenew where
toPath = const "/"
instance ToQuery EnableDomainAutoRenew where
toQuery = const mempty
newtype EnableDomainAutoRenewResponse = EnableDomainAutoRenewResponse'
{ _edarrsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
enableDomainAutoRenewResponse
:: Int
-> EnableDomainAutoRenewResponse
enableDomainAutoRenewResponse pResponseStatus_ =
EnableDomainAutoRenewResponse'
{ _edarrsResponseStatus = pResponseStatus_
}
edarrsResponseStatus :: Lens' EnableDomainAutoRenewResponse Int
edarrsResponseStatus = lens _edarrsResponseStatus (\ s a -> s{_edarrsResponseStatus = a});
instance NFData EnableDomainAutoRenewResponse