{-# 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.TransferJobs.Patch
(
TransferJobsPatchResource
, transferJobsPatch
, TransferJobsPatch
, tjpXgafv
, tjpUploadProtocol
, tjpAccessToken
, tjpJobName
, tjpUploadType
, tjpPayload
, tjpCallback
) where
import Network.Google.Prelude
import Network.Google.StorageTransfer.Types
type TransferJobsPatchResource =
"v1" :>
Capture "jobName" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UpdateTransferJobRequest :>
Patch '[JSON] TransferJob
data TransferJobsPatch = TransferJobsPatch'
{ _tjpXgafv :: !(Maybe Xgafv)
, _tjpUploadProtocol :: !(Maybe Text)
, _tjpAccessToken :: !(Maybe Text)
, _tjpJobName :: !Text
, _tjpUploadType :: !(Maybe Text)
, _tjpPayload :: !UpdateTransferJobRequest
, _tjpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
transferJobsPatch
:: Text
-> UpdateTransferJobRequest
-> TransferJobsPatch
transferJobsPatch pTjpJobName_ pTjpPayload_ =
TransferJobsPatch'
{ _tjpXgafv = Nothing
, _tjpUploadProtocol = Nothing
, _tjpAccessToken = Nothing
, _tjpJobName = pTjpJobName_
, _tjpUploadType = Nothing
, _tjpPayload = pTjpPayload_
, _tjpCallback = Nothing
}
tjpXgafv :: Lens' TransferJobsPatch (Maybe Xgafv)
tjpXgafv = lens _tjpXgafv (\ s a -> s{_tjpXgafv = a})
tjpUploadProtocol :: Lens' TransferJobsPatch (Maybe Text)
tjpUploadProtocol
= lens _tjpUploadProtocol
(\ s a -> s{_tjpUploadProtocol = a})
tjpAccessToken :: Lens' TransferJobsPatch (Maybe Text)
tjpAccessToken
= lens _tjpAccessToken
(\ s a -> s{_tjpAccessToken = a})
tjpJobName :: Lens' TransferJobsPatch Text
tjpJobName
= lens _tjpJobName (\ s a -> s{_tjpJobName = a})
tjpUploadType :: Lens' TransferJobsPatch (Maybe Text)
tjpUploadType
= lens _tjpUploadType
(\ s a -> s{_tjpUploadType = a})
tjpPayload :: Lens' TransferJobsPatch UpdateTransferJobRequest
tjpPayload
= lens _tjpPayload (\ s a -> s{_tjpPayload = a})
tjpCallback :: Lens' TransferJobsPatch (Maybe Text)
tjpCallback
= lens _tjpCallback (\ s a -> s{_tjpCallback = a})
instance GoogleRequest TransferJobsPatch where
type Rs TransferJobsPatch = TransferJob
type Scopes TransferJobsPatch =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient TransferJobsPatch'{..}
= go _tjpJobName _tjpXgafv _tjpUploadProtocol
_tjpAccessToken
_tjpUploadType
_tjpCallback
(Just AltJSON)
_tjpPayload
storageTransferService
where go
= buildClient
(Proxy :: Proxy TransferJobsPatchResource)
mempty