{-# 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.Rollback
(
ProjectsDatabasesDocumentsRollbackResource
, projectsDatabasesDocumentsRollback
, ProjectsDatabasesDocumentsRollback
, pddrXgafv
, pddrUploadProtocol
, pddrDatabase
, pddrAccessToken
, pddrUploadType
, pddrPayload
, pddrCallback
) where
import Network.Google.FireStore.Types
import Network.Google.Prelude
type ProjectsDatabasesDocumentsRollbackResource =
"v1" :>
Capture "database" Text :>
"documents:rollback" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] RollbackRequest :> Post '[JSON] Empty
data ProjectsDatabasesDocumentsRollback = ProjectsDatabasesDocumentsRollback'
{ _pddrXgafv :: !(Maybe Xgafv)
, _pddrUploadProtocol :: !(Maybe Text)
, _pddrDatabase :: !Text
, _pddrAccessToken :: !(Maybe Text)
, _pddrUploadType :: !(Maybe Text)
, _pddrPayload :: !RollbackRequest
, _pddrCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsDatabasesDocumentsRollback
:: Text
-> RollbackRequest
-> ProjectsDatabasesDocumentsRollback
projectsDatabasesDocumentsRollback pPddrDatabase_ pPddrPayload_ =
ProjectsDatabasesDocumentsRollback'
{ _pddrXgafv = Nothing
, _pddrUploadProtocol = Nothing
, _pddrDatabase = pPddrDatabase_
, _pddrAccessToken = Nothing
, _pddrUploadType = Nothing
, _pddrPayload = pPddrPayload_
, _pddrCallback = Nothing
}
pddrXgafv :: Lens' ProjectsDatabasesDocumentsRollback (Maybe Xgafv)
pddrXgafv
= lens _pddrXgafv (\ s a -> s{_pddrXgafv = a})
pddrUploadProtocol :: Lens' ProjectsDatabasesDocumentsRollback (Maybe Text)
pddrUploadProtocol
= lens _pddrUploadProtocol
(\ s a -> s{_pddrUploadProtocol = a})
pddrDatabase :: Lens' ProjectsDatabasesDocumentsRollback Text
pddrDatabase
= lens _pddrDatabase (\ s a -> s{_pddrDatabase = a})
pddrAccessToken :: Lens' ProjectsDatabasesDocumentsRollback (Maybe Text)
pddrAccessToken
= lens _pddrAccessToken
(\ s a -> s{_pddrAccessToken = a})
pddrUploadType :: Lens' ProjectsDatabasesDocumentsRollback (Maybe Text)
pddrUploadType
= lens _pddrUploadType
(\ s a -> s{_pddrUploadType = a})
pddrPayload :: Lens' ProjectsDatabasesDocumentsRollback RollbackRequest
pddrPayload
= lens _pddrPayload (\ s a -> s{_pddrPayload = a})
pddrCallback :: Lens' ProjectsDatabasesDocumentsRollback (Maybe Text)
pddrCallback
= lens _pddrCallback (\ s a -> s{_pddrCallback = a})
instance GoogleRequest
ProjectsDatabasesDocumentsRollback where
type Rs ProjectsDatabasesDocumentsRollback = Empty
type Scopes ProjectsDatabasesDocumentsRollback =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/datastore"]
requestClient ProjectsDatabasesDocumentsRollback'{..}
= go _pddrDatabase _pddrXgafv _pddrUploadProtocol
_pddrAccessToken
_pddrUploadType
_pddrCallback
(Just AltJSON)
_pddrPayload
fireStoreService
where go
= buildClient
(Proxy ::
Proxy ProjectsDatabasesDocumentsRollbackResource)
mempty