{-# 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.List
(
ProjectsSnapshotsListResource
, projectsSnapshotsList
, ProjectsSnapshotsList
, pslsXgafv
, pslsUploadProtocol
, pslsProject
, pslsAccessToken
, pslsUploadType
, pslsPageToken
, pslsPageSize
, pslsCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsSnapshotsListResource =
"v1" :>
Capture "project" Text :>
"snapshots" :>
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] ListSnapshotsResponse
data ProjectsSnapshotsList = ProjectsSnapshotsList'
{ _pslsXgafv :: !(Maybe Xgafv)
, _pslsUploadProtocol :: !(Maybe Text)
, _pslsProject :: !Text
, _pslsAccessToken :: !(Maybe Text)
, _pslsUploadType :: !(Maybe Text)
, _pslsPageToken :: !(Maybe Text)
, _pslsPageSize :: !(Maybe (Textual Int32))
, _pslsCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSnapshotsList
:: Text
-> ProjectsSnapshotsList
projectsSnapshotsList pPslsProject_ =
ProjectsSnapshotsList'
{ _pslsXgafv = Nothing
, _pslsUploadProtocol = Nothing
, _pslsProject = pPslsProject_
, _pslsAccessToken = Nothing
, _pslsUploadType = Nothing
, _pslsPageToken = Nothing
, _pslsPageSize = Nothing
, _pslsCallback = Nothing
}
pslsXgafv :: Lens' ProjectsSnapshotsList (Maybe Xgafv)
pslsXgafv
= lens _pslsXgafv (\ s a -> s{_pslsXgafv = a})
pslsUploadProtocol :: Lens' ProjectsSnapshotsList (Maybe Text)
pslsUploadProtocol
= lens _pslsUploadProtocol
(\ s a -> s{_pslsUploadProtocol = a})
pslsProject :: Lens' ProjectsSnapshotsList Text
pslsProject
= lens _pslsProject (\ s a -> s{_pslsProject = a})
pslsAccessToken :: Lens' ProjectsSnapshotsList (Maybe Text)
pslsAccessToken
= lens _pslsAccessToken
(\ s a -> s{_pslsAccessToken = a})
pslsUploadType :: Lens' ProjectsSnapshotsList (Maybe Text)
pslsUploadType
= lens _pslsUploadType
(\ s a -> s{_pslsUploadType = a})
pslsPageToken :: Lens' ProjectsSnapshotsList (Maybe Text)
pslsPageToken
= lens _pslsPageToken
(\ s a -> s{_pslsPageToken = a})
pslsPageSize :: Lens' ProjectsSnapshotsList (Maybe Int32)
pslsPageSize
= lens _pslsPageSize (\ s a -> s{_pslsPageSize = a})
. mapping _Coerce
pslsCallback :: Lens' ProjectsSnapshotsList (Maybe Text)
pslsCallback
= lens _pslsCallback (\ s a -> s{_pslsCallback = a})
instance GoogleRequest ProjectsSnapshotsList where
type Rs ProjectsSnapshotsList = ListSnapshotsResponse
type Scopes ProjectsSnapshotsList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient ProjectsSnapshotsList'{..}
= go _pslsProject _pslsXgafv _pslsUploadProtocol
_pslsAccessToken
_pslsUploadType
_pslsPageToken
_pslsPageSize
_pslsCallback
(Just AltJSON)
pubSubService
where go
= buildClient
(Proxy :: Proxy ProjectsSnapshotsListResource)
mempty