{-# 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.PubSub.Projects.Topics.List
(
ProjectsTopicsListResource
, projectsTopicsList
, ProjectsTopicsList
, ptlXgafv
, ptlUploadProtocol
, ptlProject
, ptlAccessToken
, ptlUploadType
, ptlPageToken
, ptlPageSize
, ptlCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsTopicsListResource =
"v1" :>
Capture "project" Text :>
"topics" :>
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] ListTopicsResponse
data ProjectsTopicsList = ProjectsTopicsList'
{ _ptlXgafv :: !(Maybe Xgafv)
, _ptlUploadProtocol :: !(Maybe Text)
, _ptlProject :: !Text
, _ptlAccessToken :: !(Maybe Text)
, _ptlUploadType :: !(Maybe Text)
, _ptlPageToken :: !(Maybe Text)
, _ptlPageSize :: !(Maybe (Textual Int32))
, _ptlCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsTopicsList
:: Text
-> ProjectsTopicsList
projectsTopicsList pPtlProject_ =
ProjectsTopicsList'
{ _ptlXgafv = Nothing
, _ptlUploadProtocol = Nothing
, _ptlProject = pPtlProject_
, _ptlAccessToken = Nothing
, _ptlUploadType = Nothing
, _ptlPageToken = Nothing
, _ptlPageSize = Nothing
, _ptlCallback = Nothing
}
ptlXgafv :: Lens' ProjectsTopicsList (Maybe Xgafv)
ptlXgafv = lens _ptlXgafv (\ s a -> s{_ptlXgafv = a})
ptlUploadProtocol :: Lens' ProjectsTopicsList (Maybe Text)
ptlUploadProtocol
= lens _ptlUploadProtocol
(\ s a -> s{_ptlUploadProtocol = a})
ptlProject :: Lens' ProjectsTopicsList Text
ptlProject
= lens _ptlProject (\ s a -> s{_ptlProject = a})
ptlAccessToken :: Lens' ProjectsTopicsList (Maybe Text)
ptlAccessToken
= lens _ptlAccessToken
(\ s a -> s{_ptlAccessToken = a})
ptlUploadType :: Lens' ProjectsTopicsList (Maybe Text)
ptlUploadType
= lens _ptlUploadType
(\ s a -> s{_ptlUploadType = a})
ptlPageToken :: Lens' ProjectsTopicsList (Maybe Text)
ptlPageToken
= lens _ptlPageToken (\ s a -> s{_ptlPageToken = a})
ptlPageSize :: Lens' ProjectsTopicsList (Maybe Int32)
ptlPageSize
= lens _ptlPageSize (\ s a -> s{_ptlPageSize = a}) .
mapping _Coerce
ptlCallback :: Lens' ProjectsTopicsList (Maybe Text)
ptlCallback
= lens _ptlCallback (\ s a -> s{_ptlCallback = a})
instance GoogleRequest ProjectsTopicsList where
type Rs ProjectsTopicsList = ListTopicsResponse
type Scopes ProjectsTopicsList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient ProjectsTopicsList'{..}
= go _ptlProject _ptlXgafv _ptlUploadProtocol
_ptlAccessToken
_ptlUploadType
_ptlPageToken
_ptlPageSize
_ptlCallback
(Just AltJSON)
pubSubService
where go
= buildClient
(Proxy :: Proxy ProjectsTopicsListResource)
mempty