{-# 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.Get
(
TransferJobsGetResource
, transferJobsGet
, TransferJobsGet
, tjgXgafv
, tjgUploadProtocol
, tjgAccessToken
, tjgJobName
, tjgUploadType
, tjgProjectId
, tjgCallback
) where
import Network.Google.Prelude
import Network.Google.StorageTransfer.Types
type TransferJobsGetResource =
"v1" :>
Capture "jobName" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "projectId" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] TransferJob
data TransferJobsGet = TransferJobsGet'
{ _tjgXgafv :: !(Maybe Xgafv)
, _tjgUploadProtocol :: !(Maybe Text)
, _tjgAccessToken :: !(Maybe Text)
, _tjgJobName :: !Text
, _tjgUploadType :: !(Maybe Text)
, _tjgProjectId :: !(Maybe Text)
, _tjgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
transferJobsGet
:: Text
-> TransferJobsGet
transferJobsGet pTjgJobName_ =
TransferJobsGet'
{ _tjgXgafv = Nothing
, _tjgUploadProtocol = Nothing
, _tjgAccessToken = Nothing
, _tjgJobName = pTjgJobName_
, _tjgUploadType = Nothing
, _tjgProjectId = Nothing
, _tjgCallback = Nothing
}
tjgXgafv :: Lens' TransferJobsGet (Maybe Xgafv)
tjgXgafv = lens _tjgXgafv (\ s a -> s{_tjgXgafv = a})
tjgUploadProtocol :: Lens' TransferJobsGet (Maybe Text)
tjgUploadProtocol
= lens _tjgUploadProtocol
(\ s a -> s{_tjgUploadProtocol = a})
tjgAccessToken :: Lens' TransferJobsGet (Maybe Text)
tjgAccessToken
= lens _tjgAccessToken
(\ s a -> s{_tjgAccessToken = a})
tjgJobName :: Lens' TransferJobsGet Text
tjgJobName
= lens _tjgJobName (\ s a -> s{_tjgJobName = a})
tjgUploadType :: Lens' TransferJobsGet (Maybe Text)
tjgUploadType
= lens _tjgUploadType
(\ s a -> s{_tjgUploadType = a})
tjgProjectId :: Lens' TransferJobsGet (Maybe Text)
tjgProjectId
= lens _tjgProjectId (\ s a -> s{_tjgProjectId = a})
tjgCallback :: Lens' TransferJobsGet (Maybe Text)
tjgCallback
= lens _tjgCallback (\ s a -> s{_tjgCallback = a})
instance GoogleRequest TransferJobsGet where
type Rs TransferJobsGet = TransferJob
type Scopes TransferJobsGet =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient TransferJobsGet'{..}
= go _tjgJobName _tjgXgafv _tjgUploadProtocol
_tjgAccessToken
_tjgUploadType
_tjgProjectId
_tjgCallback
(Just AltJSON)
storageTransferService
where go
= buildClient
(Proxy :: Proxy TransferJobsGetResource)
mempty