module Network.AWS.MachineLearning.DeleteRealtimeEndpoint
(
deleteRealtimeEndpoint
, DeleteRealtimeEndpoint
, dreMLModelId
, deleteRealtimeEndpointResponse
, DeleteRealtimeEndpointResponse
, drersRealtimeEndpointInfo
, drersMLModelId
, drersStatus
) where
import Network.AWS.MachineLearning.Types
import Network.AWS.MachineLearning.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteRealtimeEndpoint = DeleteRealtimeEndpoint'
{ _dreMLModelId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteRealtimeEndpoint
:: Text
-> DeleteRealtimeEndpoint
deleteRealtimeEndpoint pMLModelId_ =
DeleteRealtimeEndpoint'
{ _dreMLModelId = pMLModelId_
}
dreMLModelId :: Lens' DeleteRealtimeEndpoint Text
dreMLModelId = lens _dreMLModelId (\ s a -> s{_dreMLModelId = a});
instance AWSRequest DeleteRealtimeEndpoint where
type Rs DeleteRealtimeEndpoint =
DeleteRealtimeEndpointResponse
request = postJSON machineLearning
response
= receiveJSON
(\ s h x ->
DeleteRealtimeEndpointResponse' <$>
(x .?> "RealtimeEndpointInfo") <*>
(x .?> "MLModelId")
<*> (pure (fromEnum s)))
instance ToHeaders DeleteRealtimeEndpoint where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AmazonML_20141212.DeleteRealtimeEndpoint" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteRealtimeEndpoint where
toJSON DeleteRealtimeEndpoint'{..}
= object
(catMaybes [Just ("MLModelId" .= _dreMLModelId)])
instance ToPath DeleteRealtimeEndpoint where
toPath = const "/"
instance ToQuery DeleteRealtimeEndpoint where
toQuery = const mempty
data DeleteRealtimeEndpointResponse = DeleteRealtimeEndpointResponse'
{ _drersRealtimeEndpointInfo :: !(Maybe RealtimeEndpointInfo)
, _drersMLModelId :: !(Maybe Text)
, _drersStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteRealtimeEndpointResponse
:: Int
-> DeleteRealtimeEndpointResponse
deleteRealtimeEndpointResponse pStatus_ =
DeleteRealtimeEndpointResponse'
{ _drersRealtimeEndpointInfo = Nothing
, _drersMLModelId = Nothing
, _drersStatus = pStatus_
}
drersRealtimeEndpointInfo :: Lens' DeleteRealtimeEndpointResponse (Maybe RealtimeEndpointInfo)
drersRealtimeEndpointInfo = lens _drersRealtimeEndpointInfo (\ s a -> s{_drersRealtimeEndpointInfo = a});
drersMLModelId :: Lens' DeleteRealtimeEndpointResponse (Maybe Text)
drersMLModelId = lens _drersMLModelId (\ s a -> s{_drersMLModelId = a});
drersStatus :: Lens' DeleteRealtimeEndpointResponse Int
drersStatus = lens _drersStatus (\ s a -> s{_drersStatus = a});