{-# 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.SourceRepo.Projects.GetConfig
(
ProjectsGetConfigResource
, projectsGetConfig
, ProjectsGetConfig
, pgcXgafv
, pgcUploadProtocol
, pgcAccessToken
, pgcUploadType
, pgcName
, pgcCallback
) where
import Network.Google.Prelude
import Network.Google.SourceRepo.Types
type ProjectsGetConfigResource =
"v1" :>
Capture "name" Text :>
"config" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] ProjectConfig
data ProjectsGetConfig = ProjectsGetConfig'
{ _pgcXgafv :: !(Maybe Xgafv)
, _pgcUploadProtocol :: !(Maybe Text)
, _pgcAccessToken :: !(Maybe Text)
, _pgcUploadType :: !(Maybe Text)
, _pgcName :: !Text
, _pgcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsGetConfig
:: Text
-> ProjectsGetConfig
projectsGetConfig pPgcName_ =
ProjectsGetConfig'
{ _pgcXgafv = Nothing
, _pgcUploadProtocol = Nothing
, _pgcAccessToken = Nothing
, _pgcUploadType = Nothing
, _pgcName = pPgcName_
, _pgcCallback = Nothing
}
pgcXgafv :: Lens' ProjectsGetConfig (Maybe Xgafv)
pgcXgafv = lens _pgcXgafv (\ s a -> s{_pgcXgafv = a})
pgcUploadProtocol :: Lens' ProjectsGetConfig (Maybe Text)
pgcUploadProtocol
= lens _pgcUploadProtocol
(\ s a -> s{_pgcUploadProtocol = a})
pgcAccessToken :: Lens' ProjectsGetConfig (Maybe Text)
pgcAccessToken
= lens _pgcAccessToken
(\ s a -> s{_pgcAccessToken = a})
pgcUploadType :: Lens' ProjectsGetConfig (Maybe Text)
pgcUploadType
= lens _pgcUploadType
(\ s a -> s{_pgcUploadType = a})
pgcName :: Lens' ProjectsGetConfig Text
pgcName = lens _pgcName (\ s a -> s{_pgcName = a})
pgcCallback :: Lens' ProjectsGetConfig (Maybe Text)
pgcCallback
= lens _pgcCallback (\ s a -> s{_pgcCallback = a})
instance GoogleRequest ProjectsGetConfig where
type Rs ProjectsGetConfig = ProjectConfig
type Scopes ProjectsGetConfig =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsGetConfig'{..}
= go _pgcName _pgcXgafv _pgcUploadProtocol
_pgcAccessToken
_pgcUploadType
_pgcCallback
(Just AltJSON)
sourceRepoService
where go
= buildClient
(Proxy :: Proxy ProjectsGetConfigResource)
mempty