{-# 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.S3.DeleteObjectTagging
(
deleteObjectTagging
, DeleteObjectTagging
, dotVersionId
, dotBucket
, dotKey
, deleteObjectTaggingResponse
, DeleteObjectTaggingResponse
, dotrsVersionId
, dotrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.S3.Types
import Network.AWS.S3.Types.Product
data DeleteObjectTagging = DeleteObjectTagging'
{ _dotVersionId :: !(Maybe ObjectVersionId)
, _dotBucket :: !BucketName
, _dotKey :: !ObjectKey
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteObjectTagging
:: BucketName
-> ObjectKey
-> DeleteObjectTagging
deleteObjectTagging pBucket_ pKey_ =
DeleteObjectTagging'
{_dotVersionId = Nothing, _dotBucket = pBucket_, _dotKey = pKey_}
dotVersionId :: Lens' DeleteObjectTagging (Maybe ObjectVersionId)
dotVersionId = lens _dotVersionId (\ s a -> s{_dotVersionId = a})
dotBucket :: Lens' DeleteObjectTagging BucketName
dotBucket = lens _dotBucket (\ s a -> s{_dotBucket = a})
dotKey :: Lens' DeleteObjectTagging ObjectKey
dotKey = lens _dotKey (\ s a -> s{_dotKey = a})
instance AWSRequest DeleteObjectTagging where
type Rs DeleteObjectTagging =
DeleteObjectTaggingResponse
request = delete s3
response
= receiveEmpty
(\ s h x ->
DeleteObjectTaggingResponse' <$>
(h .#? "x-amz-version-id") <*> (pure (fromEnum s)))
instance Hashable DeleteObjectTagging where
instance NFData DeleteObjectTagging where
instance ToHeaders DeleteObjectTagging where
toHeaders = const mempty
instance ToPath DeleteObjectTagging where
toPath DeleteObjectTagging'{..}
= mconcat ["/", toBS _dotBucket, "/", toBS _dotKey]
instance ToQuery DeleteObjectTagging where
toQuery DeleteObjectTagging'{..}
= mconcat ["versionId" =: _dotVersionId, "tagging"]
data DeleteObjectTaggingResponse = DeleteObjectTaggingResponse'
{ _dotrsVersionId :: !(Maybe ObjectVersionId)
, _dotrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteObjectTaggingResponse
:: Int
-> DeleteObjectTaggingResponse
deleteObjectTaggingResponse pResponseStatus_ =
DeleteObjectTaggingResponse'
{_dotrsVersionId = Nothing, _dotrsResponseStatus = pResponseStatus_}
dotrsVersionId :: Lens' DeleteObjectTaggingResponse (Maybe ObjectVersionId)
dotrsVersionId = lens _dotrsVersionId (\ s a -> s{_dotrsVersionId = a})
dotrsResponseStatus :: Lens' DeleteObjectTaggingResponse Int
dotrsResponseStatus = lens _dotrsResponseStatus (\ s a -> s{_dotrsResponseStatus = a})
instance NFData DeleteObjectTaggingResponse where