{-# 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.PartitionQuery
(
ProjectsInstancesDatabasesSessionsPartitionQueryResource
, projectsInstancesDatabasesSessionsPartitionQuery
, ProjectsInstancesDatabasesSessionsPartitionQuery
, pidspqXgafv
, pidspqUploadProtocol
, pidspqAccessToken
, pidspqUploadType
, pidspqPayload
, pidspqSession
, pidspqCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesDatabasesSessionsPartitionQueryResource
=
"v1" :>
CaptureMode "session" "partitionQuery" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] PartitionQueryRequest :>
Post '[JSON] PartitionResponse
data ProjectsInstancesDatabasesSessionsPartitionQuery = ProjectsInstancesDatabasesSessionsPartitionQuery'
{ _pidspqXgafv :: !(Maybe Xgafv)
, _pidspqUploadProtocol :: !(Maybe Text)
, _pidspqAccessToken :: !(Maybe Text)
, _pidspqUploadType :: !(Maybe Text)
, _pidspqPayload :: !PartitionQueryRequest
, _pidspqSession :: !Text
, _pidspqCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesDatabasesSessionsPartitionQuery
:: PartitionQueryRequest
-> Text
-> ProjectsInstancesDatabasesSessionsPartitionQuery
projectsInstancesDatabasesSessionsPartitionQuery pPidspqPayload_ pPidspqSession_ =
ProjectsInstancesDatabasesSessionsPartitionQuery'
{ _pidspqXgafv = Nothing
, _pidspqUploadProtocol = Nothing
, _pidspqAccessToken = Nothing
, _pidspqUploadType = Nothing
, _pidspqPayload = pPidspqPayload_
, _pidspqSession = pPidspqSession_
, _pidspqCallback = Nothing
}
pidspqXgafv :: Lens' ProjectsInstancesDatabasesSessionsPartitionQuery (Maybe Xgafv)
pidspqXgafv
= lens _pidspqXgafv (\ s a -> s{_pidspqXgafv = a})
pidspqUploadProtocol :: Lens' ProjectsInstancesDatabasesSessionsPartitionQuery (Maybe Text)
pidspqUploadProtocol
= lens _pidspqUploadProtocol
(\ s a -> s{_pidspqUploadProtocol = a})
pidspqAccessToken :: Lens' ProjectsInstancesDatabasesSessionsPartitionQuery (Maybe Text)
pidspqAccessToken
= lens _pidspqAccessToken
(\ s a -> s{_pidspqAccessToken = a})
pidspqUploadType :: Lens' ProjectsInstancesDatabasesSessionsPartitionQuery (Maybe Text)
pidspqUploadType
= lens _pidspqUploadType
(\ s a -> s{_pidspqUploadType = a})
pidspqPayload :: Lens' ProjectsInstancesDatabasesSessionsPartitionQuery PartitionQueryRequest
pidspqPayload
= lens _pidspqPayload
(\ s a -> s{_pidspqPayload = a})
pidspqSession :: Lens' ProjectsInstancesDatabasesSessionsPartitionQuery Text
pidspqSession
= lens _pidspqSession
(\ s a -> s{_pidspqSession = a})
pidspqCallback :: Lens' ProjectsInstancesDatabasesSessionsPartitionQuery (Maybe Text)
pidspqCallback
= lens _pidspqCallback
(\ s a -> s{_pidspqCallback = a})
instance GoogleRequest
ProjectsInstancesDatabasesSessionsPartitionQuery
where
type Rs
ProjectsInstancesDatabasesSessionsPartitionQuery
= PartitionResponse
type Scopes
ProjectsInstancesDatabasesSessionsPartitionQuery
=
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"]
requestClient
ProjectsInstancesDatabasesSessionsPartitionQuery'{..}
= go _pidspqSession _pidspqXgafv
_pidspqUploadProtocol
_pidspqAccessToken
_pidspqUploadType
_pidspqCallback
(Just AltJSON)
_pidspqPayload
spannerService
where go
= buildClient
(Proxy ::
Proxy
ProjectsInstancesDatabasesSessionsPartitionQueryResource)
mempty