{-# 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.Cloudbuild.Projects.Triggers.Patch
(
ProjectsTriggersPatchResource
, projectsTriggersPatch
, ProjectsTriggersPatch
, ptpXgafv
, ptpUploadProtocol
, ptpTriggerId
, ptpAccessToken
, ptpUploadType
, ptpPayload
, ptpProjectId
, ptpCallback
) where
import Network.Google.ContainerBuilder.Types
import Network.Google.Prelude
type ProjectsTriggersPatchResource =
"v1" :>
"projects" :>
Capture "projectId" Text :>
"triggers" :>
Capture "triggerId" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BuildTrigger :>
Patch '[JSON] BuildTrigger
data ProjectsTriggersPatch = ProjectsTriggersPatch'
{ _ptpXgafv :: !(Maybe Xgafv)
, _ptpUploadProtocol :: !(Maybe Text)
, _ptpTriggerId :: !Text
, _ptpAccessToken :: !(Maybe Text)
, _ptpUploadType :: !(Maybe Text)
, _ptpPayload :: !BuildTrigger
, _ptpProjectId :: !Text
, _ptpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsTriggersPatch
:: Text
-> BuildTrigger
-> Text
-> ProjectsTriggersPatch
projectsTriggersPatch pPtpTriggerId_ pPtpPayload_ pPtpProjectId_ =
ProjectsTriggersPatch'
{ _ptpXgafv = Nothing
, _ptpUploadProtocol = Nothing
, _ptpTriggerId = pPtpTriggerId_
, _ptpAccessToken = Nothing
, _ptpUploadType = Nothing
, _ptpPayload = pPtpPayload_
, _ptpProjectId = pPtpProjectId_
, _ptpCallback = Nothing
}
ptpXgafv :: Lens' ProjectsTriggersPatch (Maybe Xgafv)
ptpXgafv = lens _ptpXgafv (\ s a -> s{_ptpXgafv = a})
ptpUploadProtocol :: Lens' ProjectsTriggersPatch (Maybe Text)
ptpUploadProtocol
= lens _ptpUploadProtocol
(\ s a -> s{_ptpUploadProtocol = a})
ptpTriggerId :: Lens' ProjectsTriggersPatch Text
ptpTriggerId
= lens _ptpTriggerId (\ s a -> s{_ptpTriggerId = a})
ptpAccessToken :: Lens' ProjectsTriggersPatch (Maybe Text)
ptpAccessToken
= lens _ptpAccessToken
(\ s a -> s{_ptpAccessToken = a})
ptpUploadType :: Lens' ProjectsTriggersPatch (Maybe Text)
ptpUploadType
= lens _ptpUploadType
(\ s a -> s{_ptpUploadType = a})
ptpPayload :: Lens' ProjectsTriggersPatch BuildTrigger
ptpPayload
= lens _ptpPayload (\ s a -> s{_ptpPayload = a})
ptpProjectId :: Lens' ProjectsTriggersPatch Text
ptpProjectId
= lens _ptpProjectId (\ s a -> s{_ptpProjectId = a})
ptpCallback :: Lens' ProjectsTriggersPatch (Maybe Text)
ptpCallback
= lens _ptpCallback (\ s a -> s{_ptpCallback = a})
instance GoogleRequest ProjectsTriggersPatch where
type Rs ProjectsTriggersPatch = BuildTrigger
type Scopes ProjectsTriggersPatch =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsTriggersPatch'{..}
= go _ptpProjectId _ptpTriggerId _ptpXgafv
_ptpUploadProtocol
_ptpAccessToken
_ptpUploadType
_ptpCallback
(Just AltJSON)
_ptpPayload
containerBuilderService
where go
= buildClient
(Proxy :: Proxy ProjectsTriggersPatchResource)
mempty