{-# 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.Get
(
ProjectsTriggersGetResource
, projectsTriggersGet
, ProjectsTriggersGet
, ptgXgafv
, ptgUploadProtocol
, ptgTriggerId
, ptgAccessToken
, ptgUploadType
, ptgProjectId
, ptgCallback
) where
import Network.Google.ContainerBuilder.Types
import Network.Google.Prelude
type ProjectsTriggersGetResource =
"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 :> Get '[JSON] BuildTrigger
data ProjectsTriggersGet = ProjectsTriggersGet'
{ _ptgXgafv :: !(Maybe Xgafv)
, _ptgUploadProtocol :: !(Maybe Text)
, _ptgTriggerId :: !Text
, _ptgAccessToken :: !(Maybe Text)
, _ptgUploadType :: !(Maybe Text)
, _ptgProjectId :: !Text
, _ptgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsTriggersGet
:: Text
-> Text
-> ProjectsTriggersGet
projectsTriggersGet pPtgTriggerId_ pPtgProjectId_ =
ProjectsTriggersGet'
{ _ptgXgafv = Nothing
, _ptgUploadProtocol = Nothing
, _ptgTriggerId = pPtgTriggerId_
, _ptgAccessToken = Nothing
, _ptgUploadType = Nothing
, _ptgProjectId = pPtgProjectId_
, _ptgCallback = Nothing
}
ptgXgafv :: Lens' ProjectsTriggersGet (Maybe Xgafv)
ptgXgafv = lens _ptgXgafv (\ s a -> s{_ptgXgafv = a})
ptgUploadProtocol :: Lens' ProjectsTriggersGet (Maybe Text)
ptgUploadProtocol
= lens _ptgUploadProtocol
(\ s a -> s{_ptgUploadProtocol = a})
ptgTriggerId :: Lens' ProjectsTriggersGet Text
ptgTriggerId
= lens _ptgTriggerId (\ s a -> s{_ptgTriggerId = a})
ptgAccessToken :: Lens' ProjectsTriggersGet (Maybe Text)
ptgAccessToken
= lens _ptgAccessToken
(\ s a -> s{_ptgAccessToken = a})
ptgUploadType :: Lens' ProjectsTriggersGet (Maybe Text)
ptgUploadType
= lens _ptgUploadType
(\ s a -> s{_ptgUploadType = a})
ptgProjectId :: Lens' ProjectsTriggersGet Text
ptgProjectId
= lens _ptgProjectId (\ s a -> s{_ptgProjectId = a})
ptgCallback :: Lens' ProjectsTriggersGet (Maybe Text)
ptgCallback
= lens _ptgCallback (\ s a -> s{_ptgCallback = a})
instance GoogleRequest ProjectsTriggersGet where
type Rs ProjectsTriggersGet = BuildTrigger
type Scopes ProjectsTriggersGet =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsTriggersGet'{..}
= go _ptgProjectId _ptgTriggerId _ptgXgafv
_ptgUploadProtocol
_ptgAccessToken
_ptgUploadType
_ptgCallback
(Just AltJSON)
containerBuilderService
where go
= buildClient
(Proxy :: Proxy ProjectsTriggersGetResource)
mempty