{-# 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.AbortDocumentVersionUpload
(
abortDocumentVersionUpload
, AbortDocumentVersionUpload
, advuAuthenticationToken
, advuDocumentId
, advuVersionId
, abortDocumentVersionUploadResponse
, AbortDocumentVersionUploadResponse
) 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 AbortDocumentVersionUpload = AbortDocumentVersionUpload'
{ _advuAuthenticationToken :: !(Maybe (Sensitive Text))
, _advuDocumentId :: !Text
, _advuVersionId :: !Text
} deriving (Eq, Show, Data, Typeable, Generic)
abortDocumentVersionUpload
:: Text
-> Text
-> AbortDocumentVersionUpload
abortDocumentVersionUpload pDocumentId_ pVersionId_ =
AbortDocumentVersionUpload'
{ _advuAuthenticationToken = Nothing
, _advuDocumentId = pDocumentId_
, _advuVersionId = pVersionId_
}
advuAuthenticationToken :: Lens' AbortDocumentVersionUpload (Maybe Text)
advuAuthenticationToken = lens _advuAuthenticationToken (\ s a -> s{_advuAuthenticationToken = a}) . mapping _Sensitive
advuDocumentId :: Lens' AbortDocumentVersionUpload Text
advuDocumentId = lens _advuDocumentId (\ s a -> s{_advuDocumentId = a})
advuVersionId :: Lens' AbortDocumentVersionUpload Text
advuVersionId = lens _advuVersionId (\ s a -> s{_advuVersionId = a})
instance AWSRequest AbortDocumentVersionUpload where
type Rs AbortDocumentVersionUpload =
AbortDocumentVersionUploadResponse
request = delete workDocs
response
= receiveNull AbortDocumentVersionUploadResponse'
instance Hashable AbortDocumentVersionUpload where
instance NFData AbortDocumentVersionUpload where
instance ToHeaders AbortDocumentVersionUpload where
toHeaders AbortDocumentVersionUpload'{..}
= mconcat
["Authentication" =# _advuAuthenticationToken,
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)]
instance ToPath AbortDocumentVersionUpload where
toPath AbortDocumentVersionUpload'{..}
= mconcat
["/api/v1/documents/", toBS _advuDocumentId,
"/versions/", toBS _advuVersionId]
instance ToQuery AbortDocumentVersionUpload where
toQuery = const mempty
data AbortDocumentVersionUploadResponse =
AbortDocumentVersionUploadResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
abortDocumentVersionUploadResponse
:: AbortDocumentVersionUploadResponse
abortDocumentVersionUploadResponse = AbortDocumentVersionUploadResponse'
instance NFData AbortDocumentVersionUploadResponse
where