{-# 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.Get
(
ProjectsInstancesDatabasesSessionsGetResource
, projectsInstancesDatabasesSessionsGet
, ProjectsInstancesDatabasesSessionsGet
, pidsgXgafv
, pidsgUploadProtocol
, pidsgAccessToken
, pidsgUploadType
, pidsgName
, pidsgCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesDatabasesSessionsGetResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Session
data ProjectsInstancesDatabasesSessionsGet = ProjectsInstancesDatabasesSessionsGet'
{ _pidsgXgafv :: !(Maybe Xgafv)
, _pidsgUploadProtocol :: !(Maybe Text)
, _pidsgAccessToken :: !(Maybe Text)
, _pidsgUploadType :: !(Maybe Text)
, _pidsgName :: !Text
, _pidsgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesDatabasesSessionsGet
:: Text
-> ProjectsInstancesDatabasesSessionsGet
projectsInstancesDatabasesSessionsGet pPidsgName_ =
ProjectsInstancesDatabasesSessionsGet'
{ _pidsgXgafv = Nothing
, _pidsgUploadProtocol = Nothing
, _pidsgAccessToken = Nothing
, _pidsgUploadType = Nothing
, _pidsgName = pPidsgName_
, _pidsgCallback = Nothing
}
pidsgXgafv :: Lens' ProjectsInstancesDatabasesSessionsGet (Maybe Xgafv)
pidsgXgafv
= lens _pidsgXgafv (\ s a -> s{_pidsgXgafv = a})
pidsgUploadProtocol :: Lens' ProjectsInstancesDatabasesSessionsGet (Maybe Text)
pidsgUploadProtocol
= lens _pidsgUploadProtocol
(\ s a -> s{_pidsgUploadProtocol = a})
pidsgAccessToken :: Lens' ProjectsInstancesDatabasesSessionsGet (Maybe Text)
pidsgAccessToken
= lens _pidsgAccessToken
(\ s a -> s{_pidsgAccessToken = a})
pidsgUploadType :: Lens' ProjectsInstancesDatabasesSessionsGet (Maybe Text)
pidsgUploadType
= lens _pidsgUploadType
(\ s a -> s{_pidsgUploadType = a})
pidsgName :: Lens' ProjectsInstancesDatabasesSessionsGet Text
pidsgName
= lens _pidsgName (\ s a -> s{_pidsgName = a})
pidsgCallback :: Lens' ProjectsInstancesDatabasesSessionsGet (Maybe Text)
pidsgCallback
= lens _pidsgCallback
(\ s a -> s{_pidsgCallback = a})
instance GoogleRequest
ProjectsInstancesDatabasesSessionsGet where
type Rs ProjectsInstancesDatabasesSessionsGet =
Session
type Scopes ProjectsInstancesDatabasesSessionsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"]
requestClient
ProjectsInstancesDatabasesSessionsGet'{..}
= go _pidsgName _pidsgXgafv _pidsgUploadProtocol
_pidsgAccessToken
_pidsgUploadType
_pidsgCallback
(Just AltJSON)
spannerService
where go
= buildClient
(Proxy ::
Proxy ProjectsInstancesDatabasesSessionsGetResource)
mempty