{-# 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.Spanner.Projects.Instances.Databases.Sessions.StreamingRead
(
ProjectsInstancesDatabasesSessionsStreamingReadResource
, projectsInstancesDatabasesSessionsStreamingRead
, ProjectsInstancesDatabasesSessionsStreamingRead
, pidssrXgafv
, pidssrUploadProtocol
, pidssrAccessToken
, pidssrUploadType
, pidssrPayload
, pidssrSession
, pidssrCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesDatabasesSessionsStreamingReadResource
=
"v1" :>
CaptureMode "session" "streamingRead" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ReadRequest :>
Post '[JSON] PartialResultSet
data ProjectsInstancesDatabasesSessionsStreamingRead = ProjectsInstancesDatabasesSessionsStreamingRead'
{ _pidssrXgafv :: !(Maybe Xgafv)
, _pidssrUploadProtocol :: !(Maybe Text)
, _pidssrAccessToken :: !(Maybe Text)
, _pidssrUploadType :: !(Maybe Text)
, _pidssrPayload :: !ReadRequest
, _pidssrSession :: !Text
, _pidssrCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesDatabasesSessionsStreamingRead
:: ReadRequest
-> Text
-> ProjectsInstancesDatabasesSessionsStreamingRead
projectsInstancesDatabasesSessionsStreamingRead pPidssrPayload_ pPidssrSession_ =
ProjectsInstancesDatabasesSessionsStreamingRead'
{ _pidssrXgafv = Nothing
, _pidssrUploadProtocol = Nothing
, _pidssrAccessToken = Nothing
, _pidssrUploadType = Nothing
, _pidssrPayload = pPidssrPayload_
, _pidssrSession = pPidssrSession_
, _pidssrCallback = Nothing
}
pidssrXgafv :: Lens' ProjectsInstancesDatabasesSessionsStreamingRead (Maybe Xgafv)
pidssrXgafv
= lens _pidssrXgafv (\ s a -> s{_pidssrXgafv = a})
pidssrUploadProtocol :: Lens' ProjectsInstancesDatabasesSessionsStreamingRead (Maybe Text)
pidssrUploadProtocol
= lens _pidssrUploadProtocol
(\ s a -> s{_pidssrUploadProtocol = a})
pidssrAccessToken :: Lens' ProjectsInstancesDatabasesSessionsStreamingRead (Maybe Text)
pidssrAccessToken
= lens _pidssrAccessToken
(\ s a -> s{_pidssrAccessToken = a})
pidssrUploadType :: Lens' ProjectsInstancesDatabasesSessionsStreamingRead (Maybe Text)
pidssrUploadType
= lens _pidssrUploadType
(\ s a -> s{_pidssrUploadType = a})
pidssrPayload :: Lens' ProjectsInstancesDatabasesSessionsStreamingRead ReadRequest
pidssrPayload
= lens _pidssrPayload
(\ s a -> s{_pidssrPayload = a})
pidssrSession :: Lens' ProjectsInstancesDatabasesSessionsStreamingRead Text
pidssrSession
= lens _pidssrSession
(\ s a -> s{_pidssrSession = a})
pidssrCallback :: Lens' ProjectsInstancesDatabasesSessionsStreamingRead (Maybe Text)
pidssrCallback
= lens _pidssrCallback
(\ s a -> s{_pidssrCallback = a})
instance GoogleRequest
ProjectsInstancesDatabasesSessionsStreamingRead where
type Rs
ProjectsInstancesDatabasesSessionsStreamingRead
= PartialResultSet
type Scopes
ProjectsInstancesDatabasesSessionsStreamingRead
=
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"]
requestClient
ProjectsInstancesDatabasesSessionsStreamingRead'{..}
= go _pidssrSession _pidssrXgafv
_pidssrUploadProtocol
_pidssrAccessToken
_pidssrUploadType
_pidssrCallback
(Just AltJSON)
_pidssrPayload
spannerService
where go
= buildClient
(Proxy ::
Proxy
ProjectsInstancesDatabasesSessionsStreamingReadResource)
mempty