{-# 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.ExecuteSQL
(
ProjectsInstancesDatabasesSessionsExecuteSQLResource
, projectsInstancesDatabasesSessionsExecuteSQL
, ProjectsInstancesDatabasesSessionsExecuteSQL
, pidsesqlXgafv
, pidsesqlUploadProtocol
, pidsesqlAccessToken
, pidsesqlUploadType
, pidsesqlPayload
, pidsesqlSession
, pidsesqlCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesDatabasesSessionsExecuteSQLResource
=
"v1" :>
CaptureMode "session" "executeSql" 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] ResultSet
data ProjectsInstancesDatabasesSessionsExecuteSQL = ProjectsInstancesDatabasesSessionsExecuteSQL'
{ _pidsesqlXgafv :: !(Maybe Xgafv)
, _pidsesqlUploadProtocol :: !(Maybe Text)
, _pidsesqlAccessToken :: !(Maybe Text)
, _pidsesqlUploadType :: !(Maybe Text)
, _pidsesqlPayload :: !ExecuteSQLRequest
, _pidsesqlSession :: !Text
, _pidsesqlCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesDatabasesSessionsExecuteSQL
:: ExecuteSQLRequest
-> Text
-> ProjectsInstancesDatabasesSessionsExecuteSQL
projectsInstancesDatabasesSessionsExecuteSQL pPidsesqlPayload_ pPidsesqlSession_ =
ProjectsInstancesDatabasesSessionsExecuteSQL'
{ _pidsesqlXgafv = Nothing
, _pidsesqlUploadProtocol = Nothing
, _pidsesqlAccessToken = Nothing
, _pidsesqlUploadType = Nothing
, _pidsesqlPayload = pPidsesqlPayload_
, _pidsesqlSession = pPidsesqlSession_
, _pidsesqlCallback = Nothing
}
pidsesqlXgafv :: Lens' ProjectsInstancesDatabasesSessionsExecuteSQL (Maybe Xgafv)
pidsesqlXgafv
= lens _pidsesqlXgafv
(\ s a -> s{_pidsesqlXgafv = a})
pidsesqlUploadProtocol :: Lens' ProjectsInstancesDatabasesSessionsExecuteSQL (Maybe Text)
pidsesqlUploadProtocol
= lens _pidsesqlUploadProtocol
(\ s a -> s{_pidsesqlUploadProtocol = a})
pidsesqlAccessToken :: Lens' ProjectsInstancesDatabasesSessionsExecuteSQL (Maybe Text)
pidsesqlAccessToken
= lens _pidsesqlAccessToken
(\ s a -> s{_pidsesqlAccessToken = a})
pidsesqlUploadType :: Lens' ProjectsInstancesDatabasesSessionsExecuteSQL (Maybe Text)
pidsesqlUploadType
= lens _pidsesqlUploadType
(\ s a -> s{_pidsesqlUploadType = a})
pidsesqlPayload :: Lens' ProjectsInstancesDatabasesSessionsExecuteSQL ExecuteSQLRequest
pidsesqlPayload
= lens _pidsesqlPayload
(\ s a -> s{_pidsesqlPayload = a})
pidsesqlSession :: Lens' ProjectsInstancesDatabasesSessionsExecuteSQL Text
pidsesqlSession
= lens _pidsesqlSession
(\ s a -> s{_pidsesqlSession = a})
pidsesqlCallback :: Lens' ProjectsInstancesDatabasesSessionsExecuteSQL (Maybe Text)
pidsesqlCallback
= lens _pidsesqlCallback
(\ s a -> s{_pidsesqlCallback = a})
instance GoogleRequest
ProjectsInstancesDatabasesSessionsExecuteSQL where
type Rs ProjectsInstancesDatabasesSessionsExecuteSQL
= ResultSet
type Scopes
ProjectsInstancesDatabasesSessionsExecuteSQL
=
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"]
requestClient
ProjectsInstancesDatabasesSessionsExecuteSQL'{..}
= go _pidsesqlSession _pidsesqlXgafv
_pidsesqlUploadProtocol
_pidsesqlAccessToken
_pidsesqlUploadType
_pidsesqlCallback
(Just AltJSON)
_pidsesqlPayload
spannerService
where go
= buildClient
(Proxy ::
Proxy
ProjectsInstancesDatabasesSessionsExecuteSQLResource)
mempty