{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.StorageTransfer.TransferOperations.Cancel
(
TransferOperationsCancelResource
, transferOperationsCancel
, TransferOperationsCancel
, tocXgafv
, tocUploadProtocol
, tocAccessToken
, tocUploadType
, tocName
, tocCallback
) where
import Network.Google.Prelude
import Network.Google.StorageTransfer.Types
type TransferOperationsCancelResource =
"v1" :>
CaptureMode "name" "cancel" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] Empty
data TransferOperationsCancel = TransferOperationsCancel'
{ _tocXgafv :: !(Maybe Xgafv)
, _tocUploadProtocol :: !(Maybe Text)
, _tocAccessToken :: !(Maybe Text)
, _tocUploadType :: !(Maybe Text)
, _tocName :: !Text
, _tocCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
transferOperationsCancel
:: Text
-> TransferOperationsCancel
transferOperationsCancel pTocName_ =
TransferOperationsCancel'
{ _tocXgafv = Nothing
, _tocUploadProtocol = Nothing
, _tocAccessToken = Nothing
, _tocUploadType = Nothing
, _tocName = pTocName_
, _tocCallback = Nothing
}
tocXgafv :: Lens' TransferOperationsCancel (Maybe Xgafv)
tocXgafv = lens _tocXgafv (\ s a -> s{_tocXgafv = a})
tocUploadProtocol :: Lens' TransferOperationsCancel (Maybe Text)
tocUploadProtocol
= lens _tocUploadProtocol
(\ s a -> s{_tocUploadProtocol = a})
tocAccessToken :: Lens' TransferOperationsCancel (Maybe Text)
tocAccessToken
= lens _tocAccessToken
(\ s a -> s{_tocAccessToken = a})
tocUploadType :: Lens' TransferOperationsCancel (Maybe Text)
tocUploadType
= lens _tocUploadType
(\ s a -> s{_tocUploadType = a})
tocName :: Lens' TransferOperationsCancel Text
tocName = lens _tocName (\ s a -> s{_tocName = a})
tocCallback :: Lens' TransferOperationsCancel (Maybe Text)
tocCallback
= lens _tocCallback (\ s a -> s{_tocCallback = a})
instance GoogleRequest TransferOperationsCancel where
type Rs TransferOperationsCancel = Empty
type Scopes TransferOperationsCancel =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient TransferOperationsCancel'{..}
= go _tocName _tocXgafv _tocUploadProtocol
_tocAccessToken
_tocUploadType
_tocCallback
(Just AltJSON)
storageTransferService
where go
= buildClient
(Proxy :: Proxy TransferOperationsCancelResource)
mempty