{-# 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.SageMaker.DeleteModel
(
deleteModel
, DeleteModel
, dmModelName
, deleteModelResponse
, DeleteModelResponse
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SageMaker.Types
import Network.AWS.SageMaker.Types.Product
newtype DeleteModel = DeleteModel'
{ _dmModelName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteModel
:: Text
-> DeleteModel
deleteModel pModelName_ = DeleteModel' {_dmModelName = pModelName_}
dmModelName :: Lens' DeleteModel Text
dmModelName = lens _dmModelName (\ s a -> s{_dmModelName = a})
instance AWSRequest DeleteModel where
type Rs DeleteModel = DeleteModelResponse
request = postJSON sageMaker
response = receiveNull DeleteModelResponse'
instance Hashable DeleteModel where
instance NFData DeleteModel where
instance ToHeaders DeleteModel where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("SageMaker.DeleteModel" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteModel where
toJSON DeleteModel'{..}
= object
(catMaybes [Just ("ModelName" .= _dmModelName)])
instance ToPath DeleteModel where
toPath = const "/"
instance ToQuery DeleteModel where
toQuery = const mempty
data DeleteModelResponse =
DeleteModelResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteModelResponse
:: DeleteModelResponse
deleteModelResponse = DeleteModelResponse'
instance NFData DeleteModelResponse where