{-# 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.SMS.DeleteReplicationJob
(
deleteReplicationJob
, DeleteReplicationJob
, drjReplicationJobId
, deleteReplicationJobResponse
, DeleteReplicationJobResponse
, drjrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SMS.Types
import Network.AWS.SMS.Types.Product
newtype DeleteReplicationJob = DeleteReplicationJob'
{ _drjReplicationJobId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteReplicationJob
:: Text
-> DeleteReplicationJob
deleteReplicationJob pReplicationJobId_ =
DeleteReplicationJob' {_drjReplicationJobId = pReplicationJobId_}
drjReplicationJobId :: Lens' DeleteReplicationJob Text
drjReplicationJobId = lens _drjReplicationJobId (\ s a -> s{_drjReplicationJobId = a})
instance AWSRequest DeleteReplicationJob where
type Rs DeleteReplicationJob =
DeleteReplicationJobResponse
request = postJSON sms
response
= receiveEmpty
(\ s h x ->
DeleteReplicationJobResponse' <$>
(pure (fromEnum s)))
instance Hashable DeleteReplicationJob where
instance NFData DeleteReplicationJob where
instance ToHeaders DeleteReplicationJob where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSServerMigrationService_V2016_10_24.DeleteReplicationJob"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteReplicationJob where
toJSON DeleteReplicationJob'{..}
= object
(catMaybes
[Just ("replicationJobId" .= _drjReplicationJobId)])
instance ToPath DeleteReplicationJob where
toPath = const "/"
instance ToQuery DeleteReplicationJob where
toQuery = const mempty
newtype DeleteReplicationJobResponse = DeleteReplicationJobResponse'
{ _drjrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteReplicationJobResponse
:: Int
-> DeleteReplicationJobResponse
deleteReplicationJobResponse pResponseStatus_ =
DeleteReplicationJobResponse' {_drjrsResponseStatus = pResponseStatus_}
drjrsResponseStatus :: Lens' DeleteReplicationJobResponse Int
drjrsResponseStatus = lens _drjrsResponseStatus (\ s a -> s{_drjrsResponseStatus = a})
instance NFData DeleteReplicationJobResponse where