module Network.AWS.S3.AbortMultipartUpload
(
AbortMultipartUpload
, abortMultipartUpload
, amuBucket
, amuKey
, amuUploadId
, AbortMultipartUploadResponse
, abortMultipartUploadResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.RestXML
import Network.AWS.S3.Types
import qualified GHC.Exts
data AbortMultipartUpload = AbortMultipartUpload
{ _amuBucket :: Text
, _amuKey :: Text
, _amuUploadId :: Text
} deriving (Eq, Ord, Show)
abortMultipartUpload :: Text
-> Text
-> Text
-> AbortMultipartUpload
abortMultipartUpload p1 p2 p3 = AbortMultipartUpload
{ _amuBucket = p1
, _amuKey = p2
, _amuUploadId = p3
}
amuBucket :: Lens' AbortMultipartUpload Text
amuBucket = lens _amuBucket (\s a -> s { _amuBucket = a })
amuKey :: Lens' AbortMultipartUpload Text
amuKey = lens _amuKey (\s a -> s { _amuKey = a })
amuUploadId :: Lens' AbortMultipartUpload Text
amuUploadId = lens _amuUploadId (\s a -> s { _amuUploadId = a })
data AbortMultipartUploadResponse = AbortMultipartUploadResponse
deriving (Eq, Ord, Show, Generic)
abortMultipartUploadResponse :: AbortMultipartUploadResponse
abortMultipartUploadResponse = AbortMultipartUploadResponse
instance ToPath AbortMultipartUpload where
toPath AbortMultipartUpload{..} = mconcat
[ "/"
, toText _amuBucket
, "/"
, toText _amuKey
]
instance ToQuery AbortMultipartUpload where
toQuery rq = "uploadId" =? _amuUploadId rq
instance ToHeaders AbortMultipartUpload
instance ToXMLRoot AbortMultipartUpload where
toXMLRoot = const (namespaced ns "AbortMultipartUpload" [])
instance ToXML AbortMultipartUpload
instance AWSRequest AbortMultipartUpload where
type Sv AbortMultipartUpload = S3
type Rs AbortMultipartUpload = AbortMultipartUploadResponse
request = delete
response = nullResponse AbortMultipartUploadResponse