{-# 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.Run
(
ProjectsTriggersRunResource
, projectsTriggersRun
, ProjectsTriggersRun
, ptrXgafv
, ptrUploadProtocol
, ptrTriggerId
, ptrAccessToken
, ptrUploadType
, ptrPayload
, ptrProjectId
, ptrCallback
) where
import Network.Google.ContainerBuilder.Types
import Network.Google.Prelude
type ProjectsTriggersRunResource =
"v1" :>
"projects" :>
Capture "projectId" Text :>
"triggers" :>
CaptureMode "triggerId" "run" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] RepoSource :> Post '[JSON] Operation
data ProjectsTriggersRun = ProjectsTriggersRun'
{ _ptrXgafv :: !(Maybe Xgafv)
, _ptrUploadProtocol :: !(Maybe Text)
, _ptrTriggerId :: !Text
, _ptrAccessToken :: !(Maybe Text)
, _ptrUploadType :: !(Maybe Text)
, _ptrPayload :: !RepoSource
, _ptrProjectId :: !Text
, _ptrCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsTriggersRun
:: Text
-> RepoSource
-> Text
-> ProjectsTriggersRun
projectsTriggersRun pPtrTriggerId_ pPtrPayload_ pPtrProjectId_ =
ProjectsTriggersRun'
{ _ptrXgafv = Nothing
, _ptrUploadProtocol = Nothing
, _ptrTriggerId = pPtrTriggerId_
, _ptrAccessToken = Nothing
, _ptrUploadType = Nothing
, _ptrPayload = pPtrPayload_
, _ptrProjectId = pPtrProjectId_
, _ptrCallback = Nothing
}
ptrXgafv :: Lens' ProjectsTriggersRun (Maybe Xgafv)
ptrXgafv = lens _ptrXgafv (\ s a -> s{_ptrXgafv = a})
ptrUploadProtocol :: Lens' ProjectsTriggersRun (Maybe Text)
ptrUploadProtocol
= lens _ptrUploadProtocol
(\ s a -> s{_ptrUploadProtocol = a})
ptrTriggerId :: Lens' ProjectsTriggersRun Text
ptrTriggerId
= lens _ptrTriggerId (\ s a -> s{_ptrTriggerId = a})
ptrAccessToken :: Lens' ProjectsTriggersRun (Maybe Text)
ptrAccessToken
= lens _ptrAccessToken
(\ s a -> s{_ptrAccessToken = a})
ptrUploadType :: Lens' ProjectsTriggersRun (Maybe Text)
ptrUploadType
= lens _ptrUploadType
(\ s a -> s{_ptrUploadType = a})
ptrPayload :: Lens' ProjectsTriggersRun RepoSource
ptrPayload
= lens _ptrPayload (\ s a -> s{_ptrPayload = a})
ptrProjectId :: Lens' ProjectsTriggersRun Text
ptrProjectId
= lens _ptrProjectId (\ s a -> s{_ptrProjectId = a})
ptrCallback :: Lens' ProjectsTriggersRun (Maybe Text)
ptrCallback
= lens _ptrCallback (\ s a -> s{_ptrCallback = a})
instance GoogleRequest ProjectsTriggersRun where
type Rs ProjectsTriggersRun = Operation
type Scopes ProjectsTriggersRun =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsTriggersRun'{..}
= go _ptrProjectId _ptrTriggerId _ptrXgafv
_ptrUploadProtocol
_ptrAccessToken
_ptrUploadType
_ptrCallback
(Just AltJSON)
_ptrPayload
containerBuilderService
where go
= buildClient
(Proxy :: Proxy ProjectsTriggersRunResource)
mempty