{-# 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.Get
(
ProjectsTopicsGetResource
, projectsTopicsGet
, ProjectsTopicsGet
, ptgXgafv
, ptgUploadProtocol
, ptgAccessToken
, ptgUploadType
, ptgTopic
, ptgCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsTopicsGetResource =
"v1" :>
Capture "topic" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Topic
data ProjectsTopicsGet = ProjectsTopicsGet'
{ _ptgXgafv :: !(Maybe Xgafv)
, _ptgUploadProtocol :: !(Maybe Text)
, _ptgAccessToken :: !(Maybe Text)
, _ptgUploadType :: !(Maybe Text)
, _ptgTopic :: !Text
, _ptgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsTopicsGet
:: Text
-> ProjectsTopicsGet
projectsTopicsGet pPtgTopic_ =
ProjectsTopicsGet'
{ _ptgXgafv = Nothing
, _ptgUploadProtocol = Nothing
, _ptgAccessToken = Nothing
, _ptgUploadType = Nothing
, _ptgTopic = pPtgTopic_
, _ptgCallback = Nothing
}
ptgXgafv :: Lens' ProjectsTopicsGet (Maybe Xgafv)
ptgXgafv = lens _ptgXgafv (\ s a -> s{_ptgXgafv = a})
ptgUploadProtocol :: Lens' ProjectsTopicsGet (Maybe Text)
ptgUploadProtocol
= lens _ptgUploadProtocol
(\ s a -> s{_ptgUploadProtocol = a})
ptgAccessToken :: Lens' ProjectsTopicsGet (Maybe Text)
ptgAccessToken
= lens _ptgAccessToken
(\ s a -> s{_ptgAccessToken = a})
ptgUploadType :: Lens' ProjectsTopicsGet (Maybe Text)
ptgUploadType
= lens _ptgUploadType
(\ s a -> s{_ptgUploadType = a})
ptgTopic :: Lens' ProjectsTopicsGet Text
ptgTopic = lens _ptgTopic (\ s a -> s{_ptgTopic = a})
ptgCallback :: Lens' ProjectsTopicsGet (Maybe Text)
ptgCallback
= lens _ptgCallback (\ s a -> s{_ptgCallback = a})
instance GoogleRequest ProjectsTopicsGet where
type Rs ProjectsTopicsGet = Topic
type Scopes ProjectsTopicsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient ProjectsTopicsGet'{..}
= go _ptgTopic _ptgXgafv _ptgUploadProtocol
_ptgAccessToken
_ptgUploadType
_ptgCallback
(Just AltJSON)
pubSubService
where go
= buildClient
(Proxy :: Proxy ProjectsTopicsGetResource)
mempty