{-# 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.Subscriptions.Get
(
ProjectsSubscriptionsGetResource
, projectsSubscriptionsGet
, ProjectsSubscriptionsGet
, psgXgafv
, psgUploadProtocol
, psgAccessToken
, psgUploadType
, psgSubscription
, psgCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsSubscriptionsGetResource =
"v1" :>
Capture "subscription" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Subscription
data ProjectsSubscriptionsGet = ProjectsSubscriptionsGet'
{ _psgXgafv :: !(Maybe Xgafv)
, _psgUploadProtocol :: !(Maybe Text)
, _psgAccessToken :: !(Maybe Text)
, _psgUploadType :: !(Maybe Text)
, _psgSubscription :: !Text
, _psgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSubscriptionsGet
:: Text
-> ProjectsSubscriptionsGet
projectsSubscriptionsGet pPsgSubscription_ =
ProjectsSubscriptionsGet'
{ _psgXgafv = Nothing
, _psgUploadProtocol = Nothing
, _psgAccessToken = Nothing
, _psgUploadType = Nothing
, _psgSubscription = pPsgSubscription_
, _psgCallback = Nothing
}
psgXgafv :: Lens' ProjectsSubscriptionsGet (Maybe Xgafv)
psgXgafv = lens _psgXgafv (\ s a -> s{_psgXgafv = a})
psgUploadProtocol :: Lens' ProjectsSubscriptionsGet (Maybe Text)
psgUploadProtocol
= lens _psgUploadProtocol
(\ s a -> s{_psgUploadProtocol = a})
psgAccessToken :: Lens' ProjectsSubscriptionsGet (Maybe Text)
psgAccessToken
= lens _psgAccessToken
(\ s a -> s{_psgAccessToken = a})
psgUploadType :: Lens' ProjectsSubscriptionsGet (Maybe Text)
psgUploadType
= lens _psgUploadType
(\ s a -> s{_psgUploadType = a})
psgSubscription :: Lens' ProjectsSubscriptionsGet Text
psgSubscription
= lens _psgSubscription
(\ s a -> s{_psgSubscription = a})
psgCallback :: Lens' ProjectsSubscriptionsGet (Maybe Text)
psgCallback
= lens _psgCallback (\ s a -> s{_psgCallback = a})
instance GoogleRequest ProjectsSubscriptionsGet where
type Rs ProjectsSubscriptionsGet = Subscription
type Scopes ProjectsSubscriptionsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient ProjectsSubscriptionsGet'{..}
= go _psgSubscription _psgXgafv _psgUploadProtocol
_psgAccessToken
_psgUploadType
_psgCallback
(Just AltJSON)
pubSubService
where go
= buildClient
(Proxy :: Proxy ProjectsSubscriptionsGetResource)
mempty