{-# 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.Spanner.Projects.Instances.Databases.Sessions.Rollback
(
ProjectsInstancesDatabasesSessionsRollbackResource
, projectsInstancesDatabasesSessionsRollback
, ProjectsInstancesDatabasesSessionsRollback
, proXgafv
, proUploadProtocol
, proAccessToken
, proUploadType
, proPayload
, proSession
, proCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesDatabasesSessionsRollbackResource
=
"v1" :>
CaptureMode "session" "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] Empty
data ProjectsInstancesDatabasesSessionsRollback = ProjectsInstancesDatabasesSessionsRollback'
{ _proXgafv :: !(Maybe Xgafv)
, _proUploadProtocol :: !(Maybe Text)
, _proAccessToken :: !(Maybe Text)
, _proUploadType :: !(Maybe Text)
, _proPayload :: !RollbackRequest
, _proSession :: !Text
, _proCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesDatabasesSessionsRollback
:: RollbackRequest
-> Text
-> ProjectsInstancesDatabasesSessionsRollback
projectsInstancesDatabasesSessionsRollback pProPayload_ pProSession_ =
ProjectsInstancesDatabasesSessionsRollback'
{ _proXgafv = Nothing
, _proUploadProtocol = Nothing
, _proAccessToken = Nothing
, _proUploadType = Nothing
, _proPayload = pProPayload_
, _proSession = pProSession_
, _proCallback = Nothing
}
proXgafv :: Lens' ProjectsInstancesDatabasesSessionsRollback (Maybe Xgafv)
proXgafv = lens _proXgafv (\ s a -> s{_proXgafv = a})
proUploadProtocol :: Lens' ProjectsInstancesDatabasesSessionsRollback (Maybe Text)
proUploadProtocol
= lens _proUploadProtocol
(\ s a -> s{_proUploadProtocol = a})
proAccessToken :: Lens' ProjectsInstancesDatabasesSessionsRollback (Maybe Text)
proAccessToken
= lens _proAccessToken
(\ s a -> s{_proAccessToken = a})
proUploadType :: Lens' ProjectsInstancesDatabasesSessionsRollback (Maybe Text)
proUploadType
= lens _proUploadType
(\ s a -> s{_proUploadType = a})
proPayload :: Lens' ProjectsInstancesDatabasesSessionsRollback RollbackRequest
proPayload
= lens _proPayload (\ s a -> s{_proPayload = a})
proSession :: Lens' ProjectsInstancesDatabasesSessionsRollback Text
proSession
= lens _proSession (\ s a -> s{_proSession = a})
proCallback :: Lens' ProjectsInstancesDatabasesSessionsRollback (Maybe Text)
proCallback
= lens _proCallback (\ s a -> s{_proCallback = a})
instance GoogleRequest
ProjectsInstancesDatabasesSessionsRollback where
type Rs ProjectsInstancesDatabasesSessionsRollback =
Empty
type Scopes
ProjectsInstancesDatabasesSessionsRollback
=
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"]
requestClient
ProjectsInstancesDatabasesSessionsRollback'{..}
= go _proSession _proXgafv _proUploadProtocol
_proAccessToken
_proUploadType
_proCallback
(Just AltJSON)
_proPayload
spannerService
where go
= buildClient
(Proxy ::
Proxy
ProjectsInstancesDatabasesSessionsRollbackResource)
mempty