{-# 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.CloudScheduler.Projects.Locations.Jobs.Patch
(
ProjectsLocationsJobsPatchResource
, projectsLocationsJobsPatch
, ProjectsLocationsJobsPatch
, pljpXgafv
, pljpUploadProtocol
, pljpUpdateMask
, pljpAccessToken
, pljpUploadType
, pljpPayload
, pljpName
, pljpCallback
) where
import Network.Google.CloudScheduler.Types
import Network.Google.Prelude
type ProjectsLocationsJobsPatchResource =
"v1beta1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Job :> Patch '[JSON] Job
data ProjectsLocationsJobsPatch = ProjectsLocationsJobsPatch'
{ _pljpXgafv :: !(Maybe Xgafv)
, _pljpUploadProtocol :: !(Maybe Text)
, _pljpUpdateMask :: !(Maybe GFieldMask)
, _pljpAccessToken :: !(Maybe Text)
, _pljpUploadType :: !(Maybe Text)
, _pljpPayload :: !Job
, _pljpName :: !Text
, _pljpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsJobsPatch
:: Job
-> Text
-> ProjectsLocationsJobsPatch
projectsLocationsJobsPatch pPljpPayload_ pPljpName_ =
ProjectsLocationsJobsPatch'
{ _pljpXgafv = Nothing
, _pljpUploadProtocol = Nothing
, _pljpUpdateMask = Nothing
, _pljpAccessToken = Nothing
, _pljpUploadType = Nothing
, _pljpPayload = pPljpPayload_
, _pljpName = pPljpName_
, _pljpCallback = Nothing
}
pljpXgafv :: Lens' ProjectsLocationsJobsPatch (Maybe Xgafv)
pljpXgafv
= lens _pljpXgafv (\ s a -> s{_pljpXgafv = a})
pljpUploadProtocol :: Lens' ProjectsLocationsJobsPatch (Maybe Text)
pljpUploadProtocol
= lens _pljpUploadProtocol
(\ s a -> s{_pljpUploadProtocol = a})
pljpUpdateMask :: Lens' ProjectsLocationsJobsPatch (Maybe GFieldMask)
pljpUpdateMask
= lens _pljpUpdateMask
(\ s a -> s{_pljpUpdateMask = a})
pljpAccessToken :: Lens' ProjectsLocationsJobsPatch (Maybe Text)
pljpAccessToken
= lens _pljpAccessToken
(\ s a -> s{_pljpAccessToken = a})
pljpUploadType :: Lens' ProjectsLocationsJobsPatch (Maybe Text)
pljpUploadType
= lens _pljpUploadType
(\ s a -> s{_pljpUploadType = a})
pljpPayload :: Lens' ProjectsLocationsJobsPatch Job
pljpPayload
= lens _pljpPayload (\ s a -> s{_pljpPayload = a})
pljpName :: Lens' ProjectsLocationsJobsPatch Text
pljpName = lens _pljpName (\ s a -> s{_pljpName = a})
pljpCallback :: Lens' ProjectsLocationsJobsPatch (Maybe Text)
pljpCallback
= lens _pljpCallback (\ s a -> s{_pljpCallback = a})
instance GoogleRequest ProjectsLocationsJobsPatch
where
type Rs ProjectsLocationsJobsPatch = Job
type Scopes ProjectsLocationsJobsPatch =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsLocationsJobsPatch'{..}
= go _pljpName _pljpXgafv _pljpUploadProtocol
_pljpUpdateMask
_pljpAccessToken
_pljpUploadType
_pljpCallback
(Just AltJSON)
_pljpPayload
cloudSchedulerService
where go
= buildClient
(Proxy :: Proxy ProjectsLocationsJobsPatchResource)
mempty