{-# 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.ExecuteBatchDml
(
ProjectsInstancesDatabasesSessionsExecuteBatchDmlResource
, projectsInstancesDatabasesSessionsExecuteBatchDml
, ProjectsInstancesDatabasesSessionsExecuteBatchDml
, pidsebdXgafv
, pidsebdUploadProtocol
, pidsebdAccessToken
, pidsebdUploadType
, pidsebdPayload
, pidsebdSession
, pidsebdCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesDatabasesSessionsExecuteBatchDmlResource
=
"v1" :>
CaptureMode "session" "executeBatchDml" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ExecuteBatchDmlRequest :>
Post '[JSON] ExecuteBatchDmlResponse
data ProjectsInstancesDatabasesSessionsExecuteBatchDml =
ProjectsInstancesDatabasesSessionsExecuteBatchDml'
{ _pidsebdXgafv :: !(Maybe Xgafv)
, _pidsebdUploadProtocol :: !(Maybe Text)
, _pidsebdAccessToken :: !(Maybe Text)
, _pidsebdUploadType :: !(Maybe Text)
, _pidsebdPayload :: !ExecuteBatchDmlRequest
, _pidsebdSession :: !Text
, _pidsebdCallback :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
projectsInstancesDatabasesSessionsExecuteBatchDml
:: ExecuteBatchDmlRequest
-> Text
-> ProjectsInstancesDatabasesSessionsExecuteBatchDml
projectsInstancesDatabasesSessionsExecuteBatchDml pPidsebdPayload_ pPidsebdSession_ =
ProjectsInstancesDatabasesSessionsExecuteBatchDml'
{ _pidsebdXgafv = Nothing
, _pidsebdUploadProtocol = Nothing
, _pidsebdAccessToken = Nothing
, _pidsebdUploadType = Nothing
, _pidsebdPayload = pPidsebdPayload_
, _pidsebdSession = pPidsebdSession_
, _pidsebdCallback = Nothing
}
pidsebdXgafv :: Lens' ProjectsInstancesDatabasesSessionsExecuteBatchDml (Maybe Xgafv)
pidsebdXgafv
= lens _pidsebdXgafv (\ s a -> s{_pidsebdXgafv = a})
pidsebdUploadProtocol :: Lens' ProjectsInstancesDatabasesSessionsExecuteBatchDml (Maybe Text)
pidsebdUploadProtocol
= lens _pidsebdUploadProtocol
(\ s a -> s{_pidsebdUploadProtocol = a})
pidsebdAccessToken :: Lens' ProjectsInstancesDatabasesSessionsExecuteBatchDml (Maybe Text)
pidsebdAccessToken
= lens _pidsebdAccessToken
(\ s a -> s{_pidsebdAccessToken = a})
pidsebdUploadType :: Lens' ProjectsInstancesDatabasesSessionsExecuteBatchDml (Maybe Text)
pidsebdUploadType
= lens _pidsebdUploadType
(\ s a -> s{_pidsebdUploadType = a})
pidsebdPayload :: Lens' ProjectsInstancesDatabasesSessionsExecuteBatchDml ExecuteBatchDmlRequest
pidsebdPayload
= lens _pidsebdPayload
(\ s a -> s{_pidsebdPayload = a})
pidsebdSession :: Lens' ProjectsInstancesDatabasesSessionsExecuteBatchDml Text
pidsebdSession
= lens _pidsebdSession
(\ s a -> s{_pidsebdSession = a})
pidsebdCallback :: Lens' ProjectsInstancesDatabasesSessionsExecuteBatchDml (Maybe Text)
pidsebdCallback
= lens _pidsebdCallback
(\ s a -> s{_pidsebdCallback = a})
instance GoogleRequest
ProjectsInstancesDatabasesSessionsExecuteBatchDml
where
type Rs
ProjectsInstancesDatabasesSessionsExecuteBatchDml
= ExecuteBatchDmlResponse
type Scopes
ProjectsInstancesDatabasesSessionsExecuteBatchDml
=
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"]
requestClient
ProjectsInstancesDatabasesSessionsExecuteBatchDml'{..}
= go _pidsebdSession _pidsebdXgafv
_pidsebdUploadProtocol
_pidsebdAccessToken
_pidsebdUploadType
_pidsebdCallback
(Just AltJSON)
_pidsebdPayload
spannerService
where go
= buildClient
(Proxy ::
Proxy
ProjectsInstancesDatabasesSessionsExecuteBatchDmlResource)
mempty