{-# 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.Commit
(
ProjectsInstancesDatabasesSessionsCommitResource
, projectsInstancesDatabasesSessionsCommit
, ProjectsInstancesDatabasesSessionsCommit
, pidscXgafv
, pidscUploadProtocol
, pidscAccessToken
, pidscUploadType
, pidscPayload
, pidscSession
, pidscCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesDatabasesSessionsCommitResource
=
"v1" :>
CaptureMode "session" "commit" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CommitRequest :>
Post '[JSON] CommitResponse
data ProjectsInstancesDatabasesSessionsCommit = ProjectsInstancesDatabasesSessionsCommit'
{ _pidscXgafv :: !(Maybe Xgafv)
, _pidscUploadProtocol :: !(Maybe Text)
, _pidscAccessToken :: !(Maybe Text)
, _pidscUploadType :: !(Maybe Text)
, _pidscPayload :: !CommitRequest
, _pidscSession :: !Text
, _pidscCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesDatabasesSessionsCommit
:: CommitRequest
-> Text
-> ProjectsInstancesDatabasesSessionsCommit
projectsInstancesDatabasesSessionsCommit pPidscPayload_ pPidscSession_ =
ProjectsInstancesDatabasesSessionsCommit'
{ _pidscXgafv = Nothing
, _pidscUploadProtocol = Nothing
, _pidscAccessToken = Nothing
, _pidscUploadType = Nothing
, _pidscPayload = pPidscPayload_
, _pidscSession = pPidscSession_
, _pidscCallback = Nothing
}
pidscXgafv :: Lens' ProjectsInstancesDatabasesSessionsCommit (Maybe Xgafv)
pidscXgafv
= lens _pidscXgafv (\ s a -> s{_pidscXgafv = a})
pidscUploadProtocol :: Lens' ProjectsInstancesDatabasesSessionsCommit (Maybe Text)
pidscUploadProtocol
= lens _pidscUploadProtocol
(\ s a -> s{_pidscUploadProtocol = a})
pidscAccessToken :: Lens' ProjectsInstancesDatabasesSessionsCommit (Maybe Text)
pidscAccessToken
= lens _pidscAccessToken
(\ s a -> s{_pidscAccessToken = a})
pidscUploadType :: Lens' ProjectsInstancesDatabasesSessionsCommit (Maybe Text)
pidscUploadType
= lens _pidscUploadType
(\ s a -> s{_pidscUploadType = a})
pidscPayload :: Lens' ProjectsInstancesDatabasesSessionsCommit CommitRequest
pidscPayload
= lens _pidscPayload (\ s a -> s{_pidscPayload = a})
pidscSession :: Lens' ProjectsInstancesDatabasesSessionsCommit Text
pidscSession
= lens _pidscSession (\ s a -> s{_pidscSession = a})
pidscCallback :: Lens' ProjectsInstancesDatabasesSessionsCommit (Maybe Text)
pidscCallback
= lens _pidscCallback
(\ s a -> s{_pidscCallback = a})
instance GoogleRequest
ProjectsInstancesDatabasesSessionsCommit where
type Rs ProjectsInstancesDatabasesSessionsCommit =
CommitResponse
type Scopes ProjectsInstancesDatabasesSessionsCommit
=
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"]
requestClient
ProjectsInstancesDatabasesSessionsCommit'{..}
= go _pidscSession _pidscXgafv _pidscUploadProtocol
_pidscAccessToken
_pidscUploadType
_pidscCallback
(Just AltJSON)
_pidscPayload
spannerService
where go
= buildClient
(Proxy ::
Proxy
ProjectsInstancesDatabasesSessionsCommitResource)
mempty