{-# 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.BigQuery.Projects.List
(
ProjectsListResource
, projectsList
, ProjectsList
, plPageToken
, plMaxResults
) where
import Network.Google.BigQuery.Types
import Network.Google.Prelude
type ProjectsListResource =
"bigquery" :>
"v2" :>
"projects" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] ProjectList
data ProjectsList = ProjectsList'
{ _plPageToken :: !(Maybe Text)
, _plMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
projectsList
:: ProjectsList
projectsList =
ProjectsList'
{ _plPageToken = Nothing
, _plMaxResults = Nothing
}
plPageToken :: Lens' ProjectsList (Maybe Text)
plPageToken
= lens _plPageToken (\ s a -> s{_plPageToken = a})
plMaxResults :: Lens' ProjectsList (Maybe Word32)
plMaxResults
= lens _plMaxResults (\ s a -> s{_plMaxResults = a})
. mapping _Coerce
instance GoogleRequest ProjectsList where
type Rs ProjectsList = ProjectList
type Scopes ProjectsList =
'["https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only"]
requestClient ProjectsList'{..}
= go _plPageToken _plMaxResults (Just AltJSON)
bigQueryService
where go
= buildClient (Proxy :: Proxy ProjectsListResource)
mempty