{-# 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.Pause
(
TransferOperationsPauseResource
, transferOperationsPause
, TransferOperationsPause
, topXgafv
, topUploadProtocol
, topAccessToken
, topUploadType
, topPayload
, topName
, topCallback
) where
import Network.Google.Prelude
import Network.Google.StorageTransfer.Types
type TransferOperationsPauseResource =
"v1" :>
CaptureMode "name" "pause" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] PauseTransferOperationRequest :>
Post '[JSON] Empty
data TransferOperationsPause = TransferOperationsPause'
{ _topXgafv :: !(Maybe Xgafv)
, _topUploadProtocol :: !(Maybe Text)
, _topAccessToken :: !(Maybe Text)
, _topUploadType :: !(Maybe Text)
, _topPayload :: !PauseTransferOperationRequest
, _topName :: !Text
, _topCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
transferOperationsPause
:: PauseTransferOperationRequest
-> Text
-> TransferOperationsPause
transferOperationsPause pTopPayload_ pTopName_ =
TransferOperationsPause'
{ _topXgafv = Nothing
, _topUploadProtocol = Nothing
, _topAccessToken = Nothing
, _topUploadType = Nothing
, _topPayload = pTopPayload_
, _topName = pTopName_
, _topCallback = Nothing
}
topXgafv :: Lens' TransferOperationsPause (Maybe Xgafv)
topXgafv = lens _topXgafv (\ s a -> s{_topXgafv = a})
topUploadProtocol :: Lens' TransferOperationsPause (Maybe Text)
topUploadProtocol
= lens _topUploadProtocol
(\ s a -> s{_topUploadProtocol = 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})
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
type Scopes TransferOperationsPause =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient TransferOperationsPause'{..}
= go _topName _topXgafv _topUploadProtocol
_topAccessToken
_topUploadType
_topCallback
(Just AltJSON)
_topPayload
storageTransferService
where go
= buildClient
(Proxy :: Proxy TransferOperationsPauseResource)
mempty