{-# 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.Snapshots.Get
(
ProjectsSnapshotsGetResource
, projectsSnapshotsGet
, ProjectsSnapshotsGet
, psgsXgafv
, psgsSnapshot
, psgsUploadProtocol
, psgsAccessToken
, psgsUploadType
, psgsCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsSnapshotsGetResource =
"v1" :>
Capture "snapshot" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Snapshot
data ProjectsSnapshotsGet = ProjectsSnapshotsGet'
{ _psgsXgafv :: !(Maybe Xgafv)
, _psgsSnapshot :: !Text
, _psgsUploadProtocol :: !(Maybe Text)
, _psgsAccessToken :: !(Maybe Text)
, _psgsUploadType :: !(Maybe Text)
, _psgsCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSnapshotsGet
:: Text
-> ProjectsSnapshotsGet
projectsSnapshotsGet pPsgsSnapshot_ =
ProjectsSnapshotsGet'
{ _psgsXgafv = Nothing
, _psgsSnapshot = pPsgsSnapshot_
, _psgsUploadProtocol = Nothing
, _psgsAccessToken = Nothing
, _psgsUploadType = Nothing
, _psgsCallback = Nothing
}
psgsXgafv :: Lens' ProjectsSnapshotsGet (Maybe Xgafv)
psgsXgafv
= lens _psgsXgafv (\ s a -> s{_psgsXgafv = a})
psgsSnapshot :: Lens' ProjectsSnapshotsGet Text
psgsSnapshot
= lens _psgsSnapshot (\ s a -> s{_psgsSnapshot = a})
psgsUploadProtocol :: Lens' ProjectsSnapshotsGet (Maybe Text)
psgsUploadProtocol
= lens _psgsUploadProtocol
(\ s a -> s{_psgsUploadProtocol = a})
psgsAccessToken :: Lens' ProjectsSnapshotsGet (Maybe Text)
psgsAccessToken
= lens _psgsAccessToken
(\ s a -> s{_psgsAccessToken = a})
psgsUploadType :: Lens' ProjectsSnapshotsGet (Maybe Text)
psgsUploadType
= lens _psgsUploadType
(\ s a -> s{_psgsUploadType = a})
psgsCallback :: Lens' ProjectsSnapshotsGet (Maybe Text)
psgsCallback
= lens _psgsCallback (\ s a -> s{_psgsCallback = a})
instance GoogleRequest ProjectsSnapshotsGet where
type Rs ProjectsSnapshotsGet = Snapshot
type Scopes ProjectsSnapshotsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient ProjectsSnapshotsGet'{..}
= go _psgsSnapshot _psgsXgafv _psgsUploadProtocol
_psgsAccessToken
_psgsUploadType
_psgsCallback
(Just AltJSON)
pubSubService
where go
= buildClient
(Proxy :: Proxy ProjectsSnapshotsGetResource)
mempty