{-# 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.FireStore.Projects.Databases.Documents.BeginTransaction
(
ProjectsDatabasesDocumentsBeginTransactionResource
, projectsDatabasesDocumentsBeginTransaction
, ProjectsDatabasesDocumentsBeginTransaction
, pddbtXgafv
, pddbtUploadProtocol
, pddbtDatabase
, pddbtAccessToken
, pddbtUploadType
, pddbtPayload
, pddbtCallback
) where
import Network.Google.FireStore.Types
import Network.Google.Prelude
type ProjectsDatabasesDocumentsBeginTransactionResource
=
"v1" :>
Capture "database" Text :>
"documents:beginTransaction" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BeginTransactionRequest :>
Post '[JSON] BeginTransactionResponse
data ProjectsDatabasesDocumentsBeginTransaction = ProjectsDatabasesDocumentsBeginTransaction'
{ _pddbtXgafv :: !(Maybe Xgafv)
, _pddbtUploadProtocol :: !(Maybe Text)
, _pddbtDatabase :: !Text
, _pddbtAccessToken :: !(Maybe Text)
, _pddbtUploadType :: !(Maybe Text)
, _pddbtPayload :: !BeginTransactionRequest
, _pddbtCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsDatabasesDocumentsBeginTransaction
:: Text
-> BeginTransactionRequest
-> ProjectsDatabasesDocumentsBeginTransaction
projectsDatabasesDocumentsBeginTransaction pPddbtDatabase_ pPddbtPayload_ =
ProjectsDatabasesDocumentsBeginTransaction'
{ _pddbtXgafv = Nothing
, _pddbtUploadProtocol = Nothing
, _pddbtDatabase = pPddbtDatabase_
, _pddbtAccessToken = Nothing
, _pddbtUploadType = Nothing
, _pddbtPayload = pPddbtPayload_
, _pddbtCallback = Nothing
}
pddbtXgafv :: Lens' ProjectsDatabasesDocumentsBeginTransaction (Maybe Xgafv)
pddbtXgafv
= lens _pddbtXgafv (\ s a -> s{_pddbtXgafv = a})
pddbtUploadProtocol :: Lens' ProjectsDatabasesDocumentsBeginTransaction (Maybe Text)
pddbtUploadProtocol
= lens _pddbtUploadProtocol
(\ s a -> s{_pddbtUploadProtocol = a})
pddbtDatabase :: Lens' ProjectsDatabasesDocumentsBeginTransaction Text
pddbtDatabase
= lens _pddbtDatabase
(\ s a -> s{_pddbtDatabase = a})
pddbtAccessToken :: Lens' ProjectsDatabasesDocumentsBeginTransaction (Maybe Text)
pddbtAccessToken
= lens _pddbtAccessToken
(\ s a -> s{_pddbtAccessToken = a})
pddbtUploadType :: Lens' ProjectsDatabasesDocumentsBeginTransaction (Maybe Text)
pddbtUploadType
= lens _pddbtUploadType
(\ s a -> s{_pddbtUploadType = a})
pddbtPayload :: Lens' ProjectsDatabasesDocumentsBeginTransaction BeginTransactionRequest
pddbtPayload
= lens _pddbtPayload (\ s a -> s{_pddbtPayload = a})
pddbtCallback :: Lens' ProjectsDatabasesDocumentsBeginTransaction (Maybe Text)
pddbtCallback
= lens _pddbtCallback
(\ s a -> s{_pddbtCallback = a})
instance GoogleRequest
ProjectsDatabasesDocumentsBeginTransaction where
type Rs ProjectsDatabasesDocumentsBeginTransaction =
BeginTransactionResponse
type Scopes
ProjectsDatabasesDocumentsBeginTransaction
=
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/datastore"]
requestClient
ProjectsDatabasesDocumentsBeginTransaction'{..}
= go _pddbtDatabase _pddbtXgafv _pddbtUploadProtocol
_pddbtAccessToken
_pddbtUploadType
_pddbtCallback
(Just AltJSON)
_pddbtPayload
fireStoreService
where go
= buildClient
(Proxy ::
Proxy
ProjectsDatabasesDocumentsBeginTransactionResource)
mempty