{-# 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.Read
(
ProjectsInstancesDatabasesSessionsReadResource
, projectsInstancesDatabasesSessionsRead
, ProjectsInstancesDatabasesSessionsRead
, pidsrXgafv
, pidsrUploadProtocol
, pidsrAccessToken
, pidsrUploadType
, pidsrPayload
, pidsrSession
, pidsrCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesDatabasesSessionsReadResource =
"v1" :>
CaptureMode "session" "read" 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] ResultSet
data ProjectsInstancesDatabasesSessionsRead = ProjectsInstancesDatabasesSessionsRead'
{ _pidsrXgafv :: !(Maybe Xgafv)
, _pidsrUploadProtocol :: !(Maybe Text)
, _pidsrAccessToken :: !(Maybe Text)
, _pidsrUploadType :: !(Maybe Text)
, _pidsrPayload :: !ReadRequest
, _pidsrSession :: !Text
, _pidsrCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesDatabasesSessionsRead
:: ReadRequest
-> Text
-> ProjectsInstancesDatabasesSessionsRead
projectsInstancesDatabasesSessionsRead pPidsrPayload_ pPidsrSession_ =
ProjectsInstancesDatabasesSessionsRead'
{ _pidsrXgafv = Nothing
, _pidsrUploadProtocol = Nothing
, _pidsrAccessToken = Nothing
, _pidsrUploadType = Nothing
, _pidsrPayload = pPidsrPayload_
, _pidsrSession = pPidsrSession_
, _pidsrCallback = Nothing
}
pidsrXgafv :: Lens' ProjectsInstancesDatabasesSessionsRead (Maybe Xgafv)
pidsrXgafv
= lens _pidsrXgafv (\ s a -> s{_pidsrXgafv = a})
pidsrUploadProtocol :: Lens' ProjectsInstancesDatabasesSessionsRead (Maybe Text)
pidsrUploadProtocol
= lens _pidsrUploadProtocol
(\ s a -> s{_pidsrUploadProtocol = a})
pidsrAccessToken :: Lens' ProjectsInstancesDatabasesSessionsRead (Maybe Text)
pidsrAccessToken
= lens _pidsrAccessToken
(\ s a -> s{_pidsrAccessToken = a})
pidsrUploadType :: Lens' ProjectsInstancesDatabasesSessionsRead (Maybe Text)
pidsrUploadType
= lens _pidsrUploadType
(\ s a -> s{_pidsrUploadType = a})
pidsrPayload :: Lens' ProjectsInstancesDatabasesSessionsRead ReadRequest
pidsrPayload
= lens _pidsrPayload (\ s a -> s{_pidsrPayload = a})
pidsrSession :: Lens' ProjectsInstancesDatabasesSessionsRead Text
pidsrSession
= lens _pidsrSession (\ s a -> s{_pidsrSession = a})
pidsrCallback :: Lens' ProjectsInstancesDatabasesSessionsRead (Maybe Text)
pidsrCallback
= lens _pidsrCallback
(\ s a -> s{_pidsrCallback = a})
instance GoogleRequest
ProjectsInstancesDatabasesSessionsRead where
type Rs ProjectsInstancesDatabasesSessionsRead =
ResultSet
type Scopes ProjectsInstancesDatabasesSessionsRead =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"]
requestClient
ProjectsInstancesDatabasesSessionsRead'{..}
= go _pidsrSession _pidsrXgafv _pidsrUploadProtocol
_pidsrAccessToken
_pidsrUploadType
_pidsrCallback
(Just AltJSON)
_pidsrPayload
spannerService
where go
= buildClient
(Proxy ::
Proxy ProjectsInstancesDatabasesSessionsReadResource)
mempty