{-# 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.Commit
(
ProjectsDatabasesDocumentsCommitResource
, projectsDatabasesDocumentsCommit
, ProjectsDatabasesDocumentsCommit
, pddcXgafv
, pddcUploadProtocol
, pddcDatabase
, pddcAccessToken
, pddcUploadType
, pddcPayload
, pddcCallback
) where
import Network.Google.FireStore.Types
import Network.Google.Prelude
type ProjectsDatabasesDocumentsCommitResource =
"v1" :>
Capture "database" Text :>
"documents:commit" :>
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 ProjectsDatabasesDocumentsCommit = ProjectsDatabasesDocumentsCommit'
{ _pddcXgafv :: !(Maybe Xgafv)
, _pddcUploadProtocol :: !(Maybe Text)
, _pddcDatabase :: !Text
, _pddcAccessToken :: !(Maybe Text)
, _pddcUploadType :: !(Maybe Text)
, _pddcPayload :: !CommitRequest
, _pddcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsDatabasesDocumentsCommit
:: Text
-> CommitRequest
-> ProjectsDatabasesDocumentsCommit
projectsDatabasesDocumentsCommit pPddcDatabase_ pPddcPayload_ =
ProjectsDatabasesDocumentsCommit'
{ _pddcXgafv = Nothing
, _pddcUploadProtocol = Nothing
, _pddcDatabase = pPddcDatabase_
, _pddcAccessToken = Nothing
, _pddcUploadType = Nothing
, _pddcPayload = pPddcPayload_
, _pddcCallback = Nothing
}
pddcXgafv :: Lens' ProjectsDatabasesDocumentsCommit (Maybe Xgafv)
pddcXgafv
= lens _pddcXgafv (\ s a -> s{_pddcXgafv = a})
pddcUploadProtocol :: Lens' ProjectsDatabasesDocumentsCommit (Maybe Text)
pddcUploadProtocol
= lens _pddcUploadProtocol
(\ s a -> s{_pddcUploadProtocol = a})
pddcDatabase :: Lens' ProjectsDatabasesDocumentsCommit Text
pddcDatabase
= lens _pddcDatabase (\ s a -> s{_pddcDatabase = a})
pddcAccessToken :: Lens' ProjectsDatabasesDocumentsCommit (Maybe Text)
pddcAccessToken
= lens _pddcAccessToken
(\ s a -> s{_pddcAccessToken = a})
pddcUploadType :: Lens' ProjectsDatabasesDocumentsCommit (Maybe Text)
pddcUploadType
= lens _pddcUploadType
(\ s a -> s{_pddcUploadType = a})
pddcPayload :: Lens' ProjectsDatabasesDocumentsCommit CommitRequest
pddcPayload
= lens _pddcPayload (\ s a -> s{_pddcPayload = a})
pddcCallback :: Lens' ProjectsDatabasesDocumentsCommit (Maybe Text)
pddcCallback
= lens _pddcCallback (\ s a -> s{_pddcCallback = a})
instance GoogleRequest
ProjectsDatabasesDocumentsCommit where
type Rs ProjectsDatabasesDocumentsCommit =
CommitResponse
type Scopes ProjectsDatabasesDocumentsCommit =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/datastore"]
requestClient ProjectsDatabasesDocumentsCommit'{..}
= go _pddcDatabase _pddcXgafv _pddcUploadProtocol
_pddcAccessToken
_pddcUploadType
_pddcCallback
(Just AltJSON)
_pddcPayload
fireStoreService
where go
= buildClient
(Proxy ::
Proxy ProjectsDatabasesDocumentsCommitResource)
mempty