{-# 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.PartitionRead
(
ProjectsInstancesDatabasesSessionsPartitionReadResource
, projectsInstancesDatabasesSessionsPartitionRead
, ProjectsInstancesDatabasesSessionsPartitionRead
, pidsprXgafv
, pidsprUploadProtocol
, pidsprAccessToken
, pidsprUploadType
, pidsprPayload
, pidsprSession
, pidsprCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesDatabasesSessionsPartitionReadResource
=
"v1" :>
CaptureMode "session" "partitionRead" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] PartitionReadRequest :>
Post '[JSON] PartitionResponse
data ProjectsInstancesDatabasesSessionsPartitionRead = ProjectsInstancesDatabasesSessionsPartitionRead'
{ _pidsprXgafv :: !(Maybe Xgafv)
, _pidsprUploadProtocol :: !(Maybe Text)
, _pidsprAccessToken :: !(Maybe Text)
, _pidsprUploadType :: !(Maybe Text)
, _pidsprPayload :: !PartitionReadRequest
, _pidsprSession :: !Text
, _pidsprCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesDatabasesSessionsPartitionRead
:: PartitionReadRequest
-> Text
-> ProjectsInstancesDatabasesSessionsPartitionRead
projectsInstancesDatabasesSessionsPartitionRead pPidsprPayload_ pPidsprSession_ =
ProjectsInstancesDatabasesSessionsPartitionRead'
{ _pidsprXgafv = Nothing
, _pidsprUploadProtocol = Nothing
, _pidsprAccessToken = Nothing
, _pidsprUploadType = Nothing
, _pidsprPayload = pPidsprPayload_
, _pidsprSession = pPidsprSession_
, _pidsprCallback = Nothing
}
pidsprXgafv :: Lens' ProjectsInstancesDatabasesSessionsPartitionRead (Maybe Xgafv)
pidsprXgafv
= lens _pidsprXgafv (\ s a -> s{_pidsprXgafv = a})
pidsprUploadProtocol :: Lens' ProjectsInstancesDatabasesSessionsPartitionRead (Maybe Text)
pidsprUploadProtocol
= lens _pidsprUploadProtocol
(\ s a -> s{_pidsprUploadProtocol = a})
pidsprAccessToken :: Lens' ProjectsInstancesDatabasesSessionsPartitionRead (Maybe Text)
pidsprAccessToken
= lens _pidsprAccessToken
(\ s a -> s{_pidsprAccessToken = a})
pidsprUploadType :: Lens' ProjectsInstancesDatabasesSessionsPartitionRead (Maybe Text)
pidsprUploadType
= lens _pidsprUploadType
(\ s a -> s{_pidsprUploadType = a})
pidsprPayload :: Lens' ProjectsInstancesDatabasesSessionsPartitionRead PartitionReadRequest
pidsprPayload
= lens _pidsprPayload
(\ s a -> s{_pidsprPayload = a})
pidsprSession :: Lens' ProjectsInstancesDatabasesSessionsPartitionRead Text
pidsprSession
= lens _pidsprSession
(\ s a -> s{_pidsprSession = a})
pidsprCallback :: Lens' ProjectsInstancesDatabasesSessionsPartitionRead (Maybe Text)
pidsprCallback
= lens _pidsprCallback
(\ s a -> s{_pidsprCallback = a})
instance GoogleRequest
ProjectsInstancesDatabasesSessionsPartitionRead where
type Rs
ProjectsInstancesDatabasesSessionsPartitionRead
= PartitionResponse
type Scopes
ProjectsInstancesDatabasesSessionsPartitionRead
=
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"]
requestClient
ProjectsInstancesDatabasesSessionsPartitionRead'{..}
= go _pidsprSession _pidsprXgafv
_pidsprUploadProtocol
_pidsprAccessToken
_pidsprUploadType
_pidsprCallback
(Just AltJSON)
_pidsprPayload
spannerService
where go
= buildClient
(Proxy ::
Proxy
ProjectsInstancesDatabasesSessionsPartitionReadResource)
mempty