{-# 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.MediaStoreData.DeleteObject
(
deleteObject
, DeleteObject
, doPath
, deleteObjectResponse
, DeleteObjectResponse
, dorsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.MediaStoreData.Types
import Network.AWS.MediaStoreData.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteObject = DeleteObject'
{ _doPath :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteObject
:: Text
-> DeleteObject
deleteObject pPath_ = DeleteObject' {_doPath = pPath_}
doPath :: Lens' DeleteObject Text
doPath = lens _doPath (\ s a -> s{_doPath = a})
instance AWSRequest DeleteObject where
type Rs DeleteObject = DeleteObjectResponse
request = delete mediaStoreData
response
= receiveEmpty
(\ s h x ->
DeleteObjectResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteObject where
instance NFData DeleteObject where
instance ToHeaders DeleteObject where
toHeaders = const mempty
instance ToPath DeleteObject where
toPath DeleteObject'{..}
= mconcat ["/", toBS _doPath]
instance ToQuery DeleteObject where
toQuery = const mempty
newtype DeleteObjectResponse = DeleteObjectResponse'
{ _dorsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteObjectResponse
:: Int
-> DeleteObjectResponse
deleteObjectResponse pResponseStatus_ =
DeleteObjectResponse' {_dorsResponseStatus = pResponseStatus_}
dorsResponseStatus :: Lens' DeleteObjectResponse Int
dorsResponseStatus = lens _dorsResponseStatus (\ s a -> s{_dorsResponseStatus = a})
instance NFData DeleteObjectResponse where