{-# 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.WorkDocs.DeleteComment
(
deleteComment
, DeleteComment
, delAuthenticationToken
, delDocumentId
, delVersionId
, delCommentId
, deleteCommentResponse
, DeleteCommentResponse
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.WorkDocs.Types
import Network.AWS.WorkDocs.Types.Product
data DeleteComment = DeleteComment'
{ _delAuthenticationToken :: !(Maybe (Sensitive Text))
, _delDocumentId :: !Text
, _delVersionId :: !Text
, _delCommentId :: !Text
} deriving (Eq, Show, Data, Typeable, Generic)
deleteComment
:: Text
-> Text
-> Text
-> DeleteComment
deleteComment pDocumentId_ pVersionId_ pCommentId_ =
DeleteComment'
{ _delAuthenticationToken = Nothing
, _delDocumentId = pDocumentId_
, _delVersionId = pVersionId_
, _delCommentId = pCommentId_
}
delAuthenticationToken :: Lens' DeleteComment (Maybe Text)
delAuthenticationToken = lens _delAuthenticationToken (\ s a -> s{_delAuthenticationToken = a}) . mapping _Sensitive
delDocumentId :: Lens' DeleteComment Text
delDocumentId = lens _delDocumentId (\ s a -> s{_delDocumentId = a})
delVersionId :: Lens' DeleteComment Text
delVersionId = lens _delVersionId (\ s a -> s{_delVersionId = a})
delCommentId :: Lens' DeleteComment Text
delCommentId = lens _delCommentId (\ s a -> s{_delCommentId = a})
instance AWSRequest DeleteComment where
type Rs DeleteComment = DeleteCommentResponse
request = delete workDocs
response = receiveNull DeleteCommentResponse'
instance Hashable DeleteComment where
instance NFData DeleteComment where
instance ToHeaders DeleteComment where
toHeaders DeleteComment'{..}
= mconcat
["Authentication" =# _delAuthenticationToken,
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)]
instance ToPath DeleteComment where
toPath DeleteComment'{..}
= mconcat
["/api/v1/documents/", toBS _delDocumentId,
"/versions/", toBS _delVersionId, "/comment/",
toBS _delCommentId]
instance ToQuery DeleteComment where
toQuery = const mempty
data DeleteCommentResponse =
DeleteCommentResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteCommentResponse
:: DeleteCommentResponse
deleteCommentResponse = DeleteCommentResponse'
instance NFData DeleteCommentResponse where