{-# 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.ExecuteStreamingSQL
(
ProjectsInstancesDatabasesSessionsExecuteStreamingSQLResource
, projectsInstancesDatabasesSessionsExecuteStreamingSQL
, ProjectsInstancesDatabasesSessionsExecuteStreamingSQL
, pidsessqlXgafv
, pidsessqlUploadProtocol
, pidsessqlAccessToken
, pidsessqlUploadType
, pidsessqlPayload
, pidsessqlSession
, pidsessqlCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesDatabasesSessionsExecuteStreamingSQLResource
=
"v1" :>
CaptureMode "session" "executeStreamingSql" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ExecuteSQLRequest :>
Post '[JSON] PartialResultSet
data ProjectsInstancesDatabasesSessionsExecuteStreamingSQL = ProjectsInstancesDatabasesSessionsExecuteStreamingSQL'
{ _pidsessqlXgafv :: !(Maybe Xgafv)
, _pidsessqlUploadProtocol :: !(Maybe Text)
, _pidsessqlAccessToken :: !(Maybe Text)
, _pidsessqlUploadType :: !(Maybe Text)
, _pidsessqlPayload :: !ExecuteSQLRequest
, _pidsessqlSession :: !Text
, _pidsessqlCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesDatabasesSessionsExecuteStreamingSQL
:: ExecuteSQLRequest
-> Text
-> ProjectsInstancesDatabasesSessionsExecuteStreamingSQL
projectsInstancesDatabasesSessionsExecuteStreamingSQL pPidsessqlPayload_ pPidsessqlSession_ =
ProjectsInstancesDatabasesSessionsExecuteStreamingSQL'
{ _pidsessqlXgafv = Nothing
, _pidsessqlUploadProtocol = Nothing
, _pidsessqlAccessToken = Nothing
, _pidsessqlUploadType = Nothing
, _pidsessqlPayload = pPidsessqlPayload_
, _pidsessqlSession = pPidsessqlSession_
, _pidsessqlCallback = Nothing
}
pidsessqlXgafv :: Lens' ProjectsInstancesDatabasesSessionsExecuteStreamingSQL (Maybe Xgafv)
pidsessqlXgafv
= lens _pidsessqlXgafv
(\ s a -> s{_pidsessqlXgafv = a})
pidsessqlUploadProtocol :: Lens' ProjectsInstancesDatabasesSessionsExecuteStreamingSQL (Maybe Text)
pidsessqlUploadProtocol
= lens _pidsessqlUploadProtocol
(\ s a -> s{_pidsessqlUploadProtocol = a})
pidsessqlAccessToken :: Lens' ProjectsInstancesDatabasesSessionsExecuteStreamingSQL (Maybe Text)
pidsessqlAccessToken
= lens _pidsessqlAccessToken
(\ s a -> s{_pidsessqlAccessToken = a})
pidsessqlUploadType :: Lens' ProjectsInstancesDatabasesSessionsExecuteStreamingSQL (Maybe Text)
pidsessqlUploadType
= lens _pidsessqlUploadType
(\ s a -> s{_pidsessqlUploadType = a})
pidsessqlPayload :: Lens' ProjectsInstancesDatabasesSessionsExecuteStreamingSQL ExecuteSQLRequest
pidsessqlPayload
= lens _pidsessqlPayload
(\ s a -> s{_pidsessqlPayload = a})
pidsessqlSession :: Lens' ProjectsInstancesDatabasesSessionsExecuteStreamingSQL Text
pidsessqlSession
= lens _pidsessqlSession
(\ s a -> s{_pidsessqlSession = a})
pidsessqlCallback :: Lens' ProjectsInstancesDatabasesSessionsExecuteStreamingSQL (Maybe Text)
pidsessqlCallback
= lens _pidsessqlCallback
(\ s a -> s{_pidsessqlCallback = a})
instance GoogleRequest
ProjectsInstancesDatabasesSessionsExecuteStreamingSQL
where
type Rs
ProjectsInstancesDatabasesSessionsExecuteStreamingSQL
= PartialResultSet
type Scopes
ProjectsInstancesDatabasesSessionsExecuteStreamingSQL
=
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"]
requestClient
ProjectsInstancesDatabasesSessionsExecuteStreamingSQL'{..}
= go _pidsessqlSession _pidsessqlXgafv
_pidsessqlUploadProtocol
_pidsessqlAccessToken
_pidsessqlUploadType
_pidsessqlCallback
(Just AltJSON)
_pidsessqlPayload
spannerService
where go
= buildClient
(Proxy ::
Proxy
ProjectsInstancesDatabasesSessionsExecuteStreamingSQLResource)
mempty