{-# 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.Builds.Get
(
ProjectsBuildsGetResource
, projectsBuildsGet
, ProjectsBuildsGet
, pbgXgafv
, pbgUploadProtocol
, pbgAccessToken
, pbgUploadType
, pbgId
, pbgProjectId
, pbgCallback
) where
import Network.Google.ContainerBuilder.Types
import Network.Google.Prelude
type ProjectsBuildsGetResource =
"v1" :>
"projects" :>
Capture "projectId" Text :>
"builds" :>
Capture "id" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Build
data ProjectsBuildsGet = ProjectsBuildsGet'
{ _pbgXgafv :: !(Maybe Xgafv)
, _pbgUploadProtocol :: !(Maybe Text)
, _pbgAccessToken :: !(Maybe Text)
, _pbgUploadType :: !(Maybe Text)
, _pbgId :: !Text
, _pbgProjectId :: !Text
, _pbgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsBuildsGet
:: Text
-> Text
-> ProjectsBuildsGet
projectsBuildsGet pPbgId_ pPbgProjectId_ =
ProjectsBuildsGet'
{ _pbgXgafv = Nothing
, _pbgUploadProtocol = Nothing
, _pbgAccessToken = Nothing
, _pbgUploadType = Nothing
, _pbgId = pPbgId_
, _pbgProjectId = pPbgProjectId_
, _pbgCallback = Nothing
}
pbgXgafv :: Lens' ProjectsBuildsGet (Maybe Xgafv)
pbgXgafv = lens _pbgXgafv (\ s a -> s{_pbgXgafv = a})
pbgUploadProtocol :: Lens' ProjectsBuildsGet (Maybe Text)
pbgUploadProtocol
= lens _pbgUploadProtocol
(\ s a -> s{_pbgUploadProtocol = a})
pbgAccessToken :: Lens' ProjectsBuildsGet (Maybe Text)
pbgAccessToken
= lens _pbgAccessToken
(\ s a -> s{_pbgAccessToken = a})
pbgUploadType :: Lens' ProjectsBuildsGet (Maybe Text)
pbgUploadType
= lens _pbgUploadType
(\ s a -> s{_pbgUploadType = a})
pbgId :: Lens' ProjectsBuildsGet Text
pbgId = lens _pbgId (\ s a -> s{_pbgId = a})
pbgProjectId :: Lens' ProjectsBuildsGet Text
pbgProjectId
= lens _pbgProjectId (\ s a -> s{_pbgProjectId = a})
pbgCallback :: Lens' ProjectsBuildsGet (Maybe Text)
pbgCallback
= lens _pbgCallback (\ s a -> s{_pbgCallback = a})
instance GoogleRequest ProjectsBuildsGet where
type Rs ProjectsBuildsGet = Build
type Scopes ProjectsBuildsGet =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsBuildsGet'{..}
= go _pbgProjectId _pbgId _pbgXgafv
_pbgUploadProtocol
_pbgAccessToken
_pbgUploadType
_pbgCallback
(Just AltJSON)
containerBuilderService
where go
= buildClient
(Proxy :: Proxy ProjectsBuildsGetResource)
mempty