{-# 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.Companies.Patch
(
ProjectsCompaniesPatchResource
, projectsCompaniesPatch
, ProjectsCompaniesPatch
, pcpXgafv
, pcpUploadProtocol
, pcpAccessToken
, pcpUploadType
, pcpPayload
, pcpName
, pcpCallback
) where
import Network.Google.Jobs.Types
import Network.Google.Prelude
type ProjectsCompaniesPatchResource =
"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] UpdateCompanyRequest :>
Patch '[JSON] Company
data ProjectsCompaniesPatch = ProjectsCompaniesPatch'
{ _pcpXgafv :: !(Maybe Xgafv)
, _pcpUploadProtocol :: !(Maybe Text)
, _pcpAccessToken :: !(Maybe Text)
, _pcpUploadType :: !(Maybe Text)
, _pcpPayload :: !UpdateCompanyRequest
, _pcpName :: !Text
, _pcpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsCompaniesPatch
:: UpdateCompanyRequest
-> Text
-> ProjectsCompaniesPatch
projectsCompaniesPatch pPcpPayload_ pPcpName_ =
ProjectsCompaniesPatch'
{ _pcpXgafv = Nothing
, _pcpUploadProtocol = Nothing
, _pcpAccessToken = Nothing
, _pcpUploadType = Nothing
, _pcpPayload = pPcpPayload_
, _pcpName = pPcpName_
, _pcpCallback = Nothing
}
pcpXgafv :: Lens' ProjectsCompaniesPatch (Maybe Xgafv)
pcpXgafv = lens _pcpXgafv (\ s a -> s{_pcpXgafv = a})
pcpUploadProtocol :: Lens' ProjectsCompaniesPatch (Maybe Text)
pcpUploadProtocol
= lens _pcpUploadProtocol
(\ s a -> s{_pcpUploadProtocol = a})
pcpAccessToken :: Lens' ProjectsCompaniesPatch (Maybe Text)
pcpAccessToken
= lens _pcpAccessToken
(\ s a -> s{_pcpAccessToken = a})
pcpUploadType :: Lens' ProjectsCompaniesPatch (Maybe Text)
pcpUploadType
= lens _pcpUploadType
(\ s a -> s{_pcpUploadType = a})
pcpPayload :: Lens' ProjectsCompaniesPatch UpdateCompanyRequest
pcpPayload
= lens _pcpPayload (\ s a -> s{_pcpPayload = a})
pcpName :: Lens' ProjectsCompaniesPatch Text
pcpName = lens _pcpName (\ s a -> s{_pcpName = a})
pcpCallback :: Lens' ProjectsCompaniesPatch (Maybe Text)
pcpCallback
= lens _pcpCallback (\ s a -> s{_pcpCallback = a})
instance GoogleRequest ProjectsCompaniesPatch where
type Rs ProjectsCompaniesPatch = Company
type Scopes ProjectsCompaniesPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/jobs"]
requestClient ProjectsCompaniesPatch'{..}
= go _pcpName _pcpXgafv _pcpUploadProtocol
_pcpAccessToken
_pcpUploadType
_pcpCallback
(Just AltJSON)
_pcpPayload
jobsService
where go
= buildClient
(Proxy :: Proxy ProjectsCompaniesPatchResource)
mempty