{-# 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.Resume
(
TransferOperationsResumeResource
, transferOperationsResume
, TransferOperationsResume
, torXgafv
, torUploadProtocol
, torAccessToken
, torUploadType
, torPayload
, torName
, torCallback
) where
import Network.Google.Prelude
import Network.Google.StorageTransfer.Types
type TransferOperationsResumeResource =
"v1" :>
CaptureMode "name" "resume" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ResumeTransferOperationRequest :>
Post '[JSON] Empty
data TransferOperationsResume = TransferOperationsResume'
{ _torXgafv :: !(Maybe Xgafv)
, _torUploadProtocol :: !(Maybe Text)
, _torAccessToken :: !(Maybe Text)
, _torUploadType :: !(Maybe Text)
, _torPayload :: !ResumeTransferOperationRequest
, _torName :: !Text
, _torCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
transferOperationsResume
:: ResumeTransferOperationRequest
-> Text
-> TransferOperationsResume
transferOperationsResume pTorPayload_ pTorName_ =
TransferOperationsResume'
{ _torXgafv = Nothing
, _torUploadProtocol = Nothing
, _torAccessToken = Nothing
, _torUploadType = Nothing
, _torPayload = pTorPayload_
, _torName = pTorName_
, _torCallback = Nothing
}
torXgafv :: Lens' TransferOperationsResume (Maybe Xgafv)
torXgafv = lens _torXgafv (\ s a -> s{_torXgafv = a})
torUploadProtocol :: Lens' TransferOperationsResume (Maybe Text)
torUploadProtocol
= lens _torUploadProtocol
(\ s a -> s{_torUploadProtocol = a})
torAccessToken :: Lens' TransferOperationsResume (Maybe Text)
torAccessToken
= lens _torAccessToken
(\ s a -> s{_torAccessToken = a})
torUploadType :: Lens' TransferOperationsResume (Maybe Text)
torUploadType
= lens _torUploadType
(\ s a -> s{_torUploadType = a})
torPayload :: Lens' TransferOperationsResume ResumeTransferOperationRequest
torPayload
= lens _torPayload (\ s a -> s{_torPayload = a})
torName :: Lens' TransferOperationsResume Text
torName = lens _torName (\ s a -> s{_torName = a})
torCallback :: Lens' TransferOperationsResume (Maybe Text)
torCallback
= lens _torCallback (\ s a -> s{_torCallback = a})
instance GoogleRequest TransferOperationsResume where
type Rs TransferOperationsResume = Empty
type Scopes TransferOperationsResume =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient TransferOperationsResume'{..}
= go _torName _torXgafv _torUploadProtocol
_torAccessToken
_torUploadType
_torCallback
(Just AltJSON)
_torPayload
storageTransferService
where go
= buildClient
(Proxy :: Proxy TransferOperationsResumeResource)
mempty