{-# 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.Jobs.Projects.Jobs.Patch
(
ProjectsJobsPatchResource
, projectsJobsPatch
, ProjectsJobsPatch
, pjpXgafv
, pjpUploadProtocol
, pjpAccessToken
, pjpUploadType
, pjpPayload
, pjpName
, pjpCallback
) where
import Network.Google.Jobs.Types
import Network.Google.Prelude
type ProjectsJobsPatchResource =
"v3p1beta1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UpdateJobRequest :> Patch '[JSON] Job
data ProjectsJobsPatch = ProjectsJobsPatch'
{ _pjpXgafv :: !(Maybe Xgafv)
, _pjpUploadProtocol :: !(Maybe Text)
, _pjpAccessToken :: !(Maybe Text)
, _pjpUploadType :: !(Maybe Text)
, _pjpPayload :: !UpdateJobRequest
, _pjpName :: !Text
, _pjpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsJobsPatch
:: UpdateJobRequest
-> Text
-> ProjectsJobsPatch
projectsJobsPatch pPjpPayload_ pPjpName_ =
ProjectsJobsPatch'
{ _pjpXgafv = Nothing
, _pjpUploadProtocol = Nothing
, _pjpAccessToken = Nothing
, _pjpUploadType = Nothing
, _pjpPayload = pPjpPayload_
, _pjpName = pPjpName_
, _pjpCallback = Nothing
}
pjpXgafv :: Lens' ProjectsJobsPatch (Maybe Xgafv)
pjpXgafv = lens _pjpXgafv (\ s a -> s{_pjpXgafv = a})
pjpUploadProtocol :: Lens' ProjectsJobsPatch (Maybe Text)
pjpUploadProtocol
= lens _pjpUploadProtocol
(\ s a -> s{_pjpUploadProtocol = a})
pjpAccessToken :: Lens' ProjectsJobsPatch (Maybe Text)
pjpAccessToken
= lens _pjpAccessToken
(\ s a -> s{_pjpAccessToken = a})
pjpUploadType :: Lens' ProjectsJobsPatch (Maybe Text)
pjpUploadType
= lens _pjpUploadType
(\ s a -> s{_pjpUploadType = a})
pjpPayload :: Lens' ProjectsJobsPatch UpdateJobRequest
pjpPayload
= lens _pjpPayload (\ s a -> s{_pjpPayload = a})
pjpName :: Lens' ProjectsJobsPatch Text
pjpName = lens _pjpName (\ s a -> s{_pjpName = a})
pjpCallback :: Lens' ProjectsJobsPatch (Maybe Text)
pjpCallback
= lens _pjpCallback (\ s a -> s{_pjpCallback = a})
instance GoogleRequest ProjectsJobsPatch where
type Rs ProjectsJobsPatch = Job
type Scopes ProjectsJobsPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/jobs"]
requestClient ProjectsJobsPatch'{..}
= go _pjpName _pjpXgafv _pjpUploadProtocol
_pjpAccessToken
_pjpUploadType
_pjpCallback
(Just AltJSON)
_pjpPayload
jobsService
where go
= buildClient
(Proxy :: Proxy ProjectsJobsPatchResource)
mempty