{-# 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.Rollback
(
ProjectsRollbackResource
, projectsRollback
, ProjectsRollback
, prXgafv
, prUploadProtocol
, prAccessToken
, prUploadType
, prPayload
, prProjectId
, prCallback
) where
import Network.Google.Datastore.Types
import Network.Google.Prelude
type ProjectsRollbackResource =
"v1" :>
"projects" :>
CaptureMode "projectId" "rollback" Text :>
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] RollbackResponse
data ProjectsRollback = ProjectsRollback'
{ _prXgafv :: !(Maybe Xgafv)
, _prUploadProtocol :: !(Maybe Text)
, _prAccessToken :: !(Maybe Text)
, _prUploadType :: !(Maybe Text)
, _prPayload :: !RollbackRequest
, _prProjectId :: !Text
, _prCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsRollback
:: RollbackRequest
-> Text
-> ProjectsRollback
projectsRollback pPrPayload_ pPrProjectId_ =
ProjectsRollback'
{ _prXgafv = Nothing
, _prUploadProtocol = Nothing
, _prAccessToken = Nothing
, _prUploadType = Nothing
, _prPayload = pPrPayload_
, _prProjectId = pPrProjectId_
, _prCallback = Nothing
}
prXgafv :: Lens' ProjectsRollback (Maybe Xgafv)
prXgafv = lens _prXgafv (\ s a -> s{_prXgafv = a})
prUploadProtocol :: Lens' ProjectsRollback (Maybe Text)
prUploadProtocol
= lens _prUploadProtocol
(\ s a -> s{_prUploadProtocol = a})
prAccessToken :: Lens' ProjectsRollback (Maybe Text)
prAccessToken
= lens _prAccessToken
(\ s a -> s{_prAccessToken = a})
prUploadType :: Lens' ProjectsRollback (Maybe Text)
prUploadType
= lens _prUploadType (\ s a -> s{_prUploadType = a})
prPayload :: Lens' ProjectsRollback RollbackRequest
prPayload
= lens _prPayload (\ s a -> s{_prPayload = a})
prProjectId :: Lens' ProjectsRollback Text
prProjectId
= lens _prProjectId (\ s a -> s{_prProjectId = a})
prCallback :: Lens' ProjectsRollback (Maybe Text)
prCallback
= lens _prCallback (\ s a -> s{_prCallback = a})
instance GoogleRequest ProjectsRollback where
type Rs ProjectsRollback = RollbackResponse
type Scopes ProjectsRollback =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/datastore"]
requestClient ProjectsRollback'{..}
= go _prProjectId _prXgafv _prUploadProtocol
_prAccessToken
_prUploadType
_prCallback
(Just AltJSON)
_prPayload
datastoreService
where go
= buildClient
(Proxy :: Proxy ProjectsRollbackResource)
mempty