{-# 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.Repos.List
(
ProjectsReposListResource
, projectsReposList
, ProjectsReposList
, prlXgafv
, prlUploadProtocol
, prlAccessToken
, prlUploadType
, prlName
, prlPageToken
, prlPageSize
, prlCallback
) where
import Network.Google.Prelude
import Network.Google.SourceRepo.Types
type ProjectsReposListResource =
"v1" :>
Capture "name" Text :>
"repos" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListReposResponse
data ProjectsReposList = ProjectsReposList'
{ _prlXgafv :: !(Maybe Xgafv)
, _prlUploadProtocol :: !(Maybe Text)
, _prlAccessToken :: !(Maybe Text)
, _prlUploadType :: !(Maybe Text)
, _prlName :: !Text
, _prlPageToken :: !(Maybe Text)
, _prlPageSize :: !(Maybe (Textual Int32))
, _prlCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsReposList
:: Text
-> ProjectsReposList
projectsReposList pPrlName_ =
ProjectsReposList'
{ _prlXgafv = Nothing
, _prlUploadProtocol = Nothing
, _prlAccessToken = Nothing
, _prlUploadType = Nothing
, _prlName = pPrlName_
, _prlPageToken = Nothing
, _prlPageSize = Nothing
, _prlCallback = Nothing
}
prlXgafv :: Lens' ProjectsReposList (Maybe Xgafv)
prlXgafv = lens _prlXgafv (\ s a -> s{_prlXgafv = a})
prlUploadProtocol :: Lens' ProjectsReposList (Maybe Text)
prlUploadProtocol
= lens _prlUploadProtocol
(\ s a -> s{_prlUploadProtocol = a})
prlAccessToken :: Lens' ProjectsReposList (Maybe Text)
prlAccessToken
= lens _prlAccessToken
(\ s a -> s{_prlAccessToken = a})
prlUploadType :: Lens' ProjectsReposList (Maybe Text)
prlUploadType
= lens _prlUploadType
(\ s a -> s{_prlUploadType = a})
prlName :: Lens' ProjectsReposList Text
prlName = lens _prlName (\ s a -> s{_prlName = a})
prlPageToken :: Lens' ProjectsReposList (Maybe Text)
prlPageToken
= lens _prlPageToken (\ s a -> s{_prlPageToken = a})
prlPageSize :: Lens' ProjectsReposList (Maybe Int32)
prlPageSize
= lens _prlPageSize (\ s a -> s{_prlPageSize = a}) .
mapping _Coerce
prlCallback :: Lens' ProjectsReposList (Maybe Text)
prlCallback
= lens _prlCallback (\ s a -> s{_prlCallback = a})
instance GoogleRequest ProjectsReposList where
type Rs ProjectsReposList = ListReposResponse
type Scopes ProjectsReposList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/source.full_control",
"https://www.googleapis.com/auth/source.read_only",
"https://www.googleapis.com/auth/source.read_write"]
requestClient ProjectsReposList'{..}
= go _prlName _prlXgafv _prlUploadProtocol
_prlAccessToken
_prlUploadType
_prlPageToken
_prlPageSize
_prlCallback
(Just AltJSON)
sourceRepoService
where go
= buildClient
(Proxy :: Proxy ProjectsReposListResource)
mempty