{-# 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.Datastore.Projects.Export
(
ProjectsExportResource
, projectsExport
, ProjectsExport
, peXgafv
, peUploadProtocol
, peAccessToken
, peUploadType
, pePayload
, peProjectId
, peCallback
) where
import Network.Google.Datastore.Types
import Network.Google.Prelude
type ProjectsExportResource =
"v1" :>
"projects" :>
CaptureMode "projectId" "export" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
GoogleDatastoreAdminV1ExportEntitiesRequest
:> Post '[JSON] GoogleLongrunningOperation
data ProjectsExport = ProjectsExport'
{ _peXgafv :: !(Maybe Xgafv)
, _peUploadProtocol :: !(Maybe Text)
, _peAccessToken :: !(Maybe Text)
, _peUploadType :: !(Maybe Text)
, _pePayload :: !GoogleDatastoreAdminV1ExportEntitiesRequest
, _peProjectId :: !Text
, _peCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsExport
:: GoogleDatastoreAdminV1ExportEntitiesRequest
-> Text
-> ProjectsExport
projectsExport pPePayload_ pPeProjectId_ =
ProjectsExport'
{ _peXgafv = Nothing
, _peUploadProtocol = Nothing
, _peAccessToken = Nothing
, _peUploadType = Nothing
, _pePayload = pPePayload_
, _peProjectId = pPeProjectId_
, _peCallback = Nothing
}
peXgafv :: Lens' ProjectsExport (Maybe Xgafv)
peXgafv = lens _peXgafv (\ s a -> s{_peXgafv = a})
peUploadProtocol :: Lens' ProjectsExport (Maybe Text)
peUploadProtocol
= lens _peUploadProtocol
(\ s a -> s{_peUploadProtocol = a})
peAccessToken :: Lens' ProjectsExport (Maybe Text)
peAccessToken
= lens _peAccessToken
(\ s a -> s{_peAccessToken = a})
peUploadType :: Lens' ProjectsExport (Maybe Text)
peUploadType
= lens _peUploadType (\ s a -> s{_peUploadType = a})
pePayload :: Lens' ProjectsExport GoogleDatastoreAdminV1ExportEntitiesRequest
pePayload
= lens _pePayload (\ s a -> s{_pePayload = a})
peProjectId :: Lens' ProjectsExport Text
peProjectId
= lens _peProjectId (\ s a -> s{_peProjectId = a})
peCallback :: Lens' ProjectsExport (Maybe Text)
peCallback
= lens _peCallback (\ s a -> s{_peCallback = a})
instance GoogleRequest ProjectsExport where
type Rs ProjectsExport = GoogleLongrunningOperation
type Scopes ProjectsExport =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/datastore"]
requestClient ProjectsExport'{..}
= go _peProjectId _peXgafv _peUploadProtocol
_peAccessToken
_peUploadType
_peCallback
(Just AltJSON)
_pePayload
datastoreService
where go
= buildClient (Proxy :: Proxy ProjectsExportResource)
mempty