{-# 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.ImportDocuments
(
ProjectsDatabasesImportDocumentsResource
, projectsDatabasesImportDocuments
, ProjectsDatabasesImportDocuments
, pdidXgafv
, pdidUploadProtocol
, pdidAccessToken
, pdidUploadType
, pdidPayload
, pdidName
, pdidCallback
) where
import Network.Google.FireStore.Types
import Network.Google.Prelude
type ProjectsDatabasesImportDocumentsResource =
"v1" :>
CaptureMode "name" "importDocuments" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
GoogleFirestoreAdminV1ImportDocumentsRequest
:> Post '[JSON] GoogleLongrunningOperation
data ProjectsDatabasesImportDocuments = ProjectsDatabasesImportDocuments'
{ _pdidXgafv :: !(Maybe Xgafv)
, _pdidUploadProtocol :: !(Maybe Text)
, _pdidAccessToken :: !(Maybe Text)
, _pdidUploadType :: !(Maybe Text)
, _pdidPayload :: !GoogleFirestoreAdminV1ImportDocumentsRequest
, _pdidName :: !Text
, _pdidCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsDatabasesImportDocuments
:: GoogleFirestoreAdminV1ImportDocumentsRequest
-> Text
-> ProjectsDatabasesImportDocuments
projectsDatabasesImportDocuments pPdidPayload_ pPdidName_ =
ProjectsDatabasesImportDocuments'
{ _pdidXgafv = Nothing
, _pdidUploadProtocol = Nothing
, _pdidAccessToken = Nothing
, _pdidUploadType = Nothing
, _pdidPayload = pPdidPayload_
, _pdidName = pPdidName_
, _pdidCallback = Nothing
}
pdidXgafv :: Lens' ProjectsDatabasesImportDocuments (Maybe Xgafv)
pdidXgafv
= lens _pdidXgafv (\ s a -> s{_pdidXgafv = a})
pdidUploadProtocol :: Lens' ProjectsDatabasesImportDocuments (Maybe Text)
pdidUploadProtocol
= lens _pdidUploadProtocol
(\ s a -> s{_pdidUploadProtocol = a})
pdidAccessToken :: Lens' ProjectsDatabasesImportDocuments (Maybe Text)
pdidAccessToken
= lens _pdidAccessToken
(\ s a -> s{_pdidAccessToken = a})
pdidUploadType :: Lens' ProjectsDatabasesImportDocuments (Maybe Text)
pdidUploadType
= lens _pdidUploadType
(\ s a -> s{_pdidUploadType = a})
pdidPayload :: Lens' ProjectsDatabasesImportDocuments GoogleFirestoreAdminV1ImportDocumentsRequest
pdidPayload
= lens _pdidPayload (\ s a -> s{_pdidPayload = a})
pdidName :: Lens' ProjectsDatabasesImportDocuments Text
pdidName = lens _pdidName (\ s a -> s{_pdidName = a})
pdidCallback :: Lens' ProjectsDatabasesImportDocuments (Maybe Text)
pdidCallback
= lens _pdidCallback (\ s a -> s{_pdidCallback = a})
instance GoogleRequest
ProjectsDatabasesImportDocuments where
type Rs ProjectsDatabasesImportDocuments =
GoogleLongrunningOperation
type Scopes ProjectsDatabasesImportDocuments =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/datastore"]
requestClient ProjectsDatabasesImportDocuments'{..}
= go _pdidName _pdidXgafv _pdidUploadProtocol
_pdidAccessToken
_pdidUploadType
_pdidCallback
(Just AltJSON)
_pdidPayload
fireStoreService
where go
= buildClient
(Proxy ::
Proxy ProjectsDatabasesImportDocumentsResource)
mempty