module Network.Google.Resource.StorageTransfer.TransferOperations.Pause
(
TransferOperationsPauseResource
, transferOperationsPause
, TransferOperationsPause
, topXgafv
, topUploadProtocol
, topPp
, topAccessToken
, topUploadType
, topPayload
, topBearerToken
, topName
, topCallback
) where
import Network.Google.Prelude
import Network.Google.StorageTransfer.Types
type TransferOperationsPauseResource =
"v1" :>
CaptureMode "name" "pause" Text :>
QueryParam "$.xgafv" Text :>
QueryParam "upload_protocol" Text :>
QueryParam "pp" Bool :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "bearer_token" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] PauseTransferOperationRequest :>
Post '[JSON] Empty
data TransferOperationsPause = TransferOperationsPause
{ _topXgafv :: !(Maybe Text)
, _topUploadProtocol :: !(Maybe Text)
, _topPp :: !Bool
, _topAccessToken :: !(Maybe Text)
, _topUploadType :: !(Maybe Text)
, _topPayload :: !PauseTransferOperationRequest
, _topBearerToken :: !(Maybe Text)
, _topName :: !Text
, _topCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
transferOperationsPause
:: PauseTransferOperationRequest
-> Text
-> TransferOperationsPause
transferOperationsPause pTopPayload_ pTopName_ =
TransferOperationsPause
{ _topXgafv = Nothing
, _topUploadProtocol = Nothing
, _topPp = True
, _topAccessToken = Nothing
, _topUploadType = Nothing
, _topPayload = pTopPayload_
, _topBearerToken = Nothing
, _topName = pTopName_
, _topCallback = Nothing
}
topXgafv :: Lens' TransferOperationsPause (Maybe Text)
topXgafv = lens _topXgafv (\ s a -> s{_topXgafv = a})
topUploadProtocol :: Lens' TransferOperationsPause (Maybe Text)
topUploadProtocol
= lens _topUploadProtocol
(\ s a -> s{_topUploadProtocol = a})
topPp :: Lens' TransferOperationsPause Bool
topPp = lens _topPp (\ s a -> s{_topPp = a})
topAccessToken :: Lens' TransferOperationsPause (Maybe Text)
topAccessToken
= lens _topAccessToken
(\ s a -> s{_topAccessToken = a})
topUploadType :: Lens' TransferOperationsPause (Maybe Text)
topUploadType
= lens _topUploadType
(\ s a -> s{_topUploadType = a})
topPayload :: Lens' TransferOperationsPause PauseTransferOperationRequest
topPayload
= lens _topPayload (\ s a -> s{_topPayload = a})
topBearerToken :: Lens' TransferOperationsPause (Maybe Text)
topBearerToken
= lens _topBearerToken
(\ s a -> s{_topBearerToken = a})
topName :: Lens' TransferOperationsPause Text
topName = lens _topName (\ s a -> s{_topName = a})
topCallback :: Lens' TransferOperationsPause (Maybe Text)
topCallback
= lens _topCallback (\ s a -> s{_topCallback = a})
instance GoogleRequest TransferOperationsPause where
type Rs TransferOperationsPause = Empty
requestClient TransferOperationsPause{..}
= go _topName _topXgafv _topUploadProtocol
(Just _topPp)
_topAccessToken
_topUploadType
_topBearerToken
_topCallback
(Just AltJSON)
_topPayload
storageTransferService
where go
= buildClient
(Proxy :: Proxy TransferOperationsPauseResource)
mempty