{-# 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.EnableDomainTransferLock
(
enableDomainTransferLock
, EnableDomainTransferLock
, edtlDomainName
, enableDomainTransferLockResponse
, EnableDomainTransferLockResponse
, edtlrsResponseStatus
, edtlrsOperationId
) 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 EnableDomainTransferLock = EnableDomainTransferLock'
{ _edtlDomainName :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
enableDomainTransferLock
:: Text
-> EnableDomainTransferLock
enableDomainTransferLock pDomainName_ =
EnableDomainTransferLock'
{ _edtlDomainName = pDomainName_
}
edtlDomainName :: Lens' EnableDomainTransferLock Text
edtlDomainName = lens _edtlDomainName (\ s a -> s{_edtlDomainName = a});
instance AWSRequest EnableDomainTransferLock where
type Rs EnableDomainTransferLock =
EnableDomainTransferLockResponse
request = postJSON route53Domains
response
= receiveJSON
(\ s h x ->
EnableDomainTransferLockResponse' <$>
(pure (fromEnum s)) <*> (x .:> "OperationId"))
instance Hashable EnableDomainTransferLock
instance NFData EnableDomainTransferLock
instance ToHeaders EnableDomainTransferLock where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("Route53Domains_v20140515.EnableDomainTransferLock"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON EnableDomainTransferLock where
toJSON EnableDomainTransferLock'{..}
= object
(catMaybes [Just ("DomainName" .= _edtlDomainName)])
instance ToPath EnableDomainTransferLock where
toPath = const "/"
instance ToQuery EnableDomainTransferLock where
toQuery = const mempty
data EnableDomainTransferLockResponse = EnableDomainTransferLockResponse'
{ _edtlrsResponseStatus :: !Int
, _edtlrsOperationId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
enableDomainTransferLockResponse
:: Int
-> Text
-> EnableDomainTransferLockResponse
enableDomainTransferLockResponse pResponseStatus_ pOperationId_ =
EnableDomainTransferLockResponse'
{ _edtlrsResponseStatus = pResponseStatus_
, _edtlrsOperationId = pOperationId_
}
edtlrsResponseStatus :: Lens' EnableDomainTransferLockResponse Int
edtlrsResponseStatus = lens _edtlrsResponseStatus (\ s a -> s{_edtlrsResponseStatus = a});
edtlrsOperationId :: Lens' EnableDomainTransferLockResponse Text
edtlrsOperationId = lens _edtlrsOperationId (\ s a -> s{_edtlrsOperationId = a});
instance NFData EnableDomainTransferLockResponse