{-# 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.BigtableAdmin.Projects.Instances.Tables.GenerateConsistencyToken
(
ProjectsInstancesTablesGenerateConsistencyTokenResource
, projectsInstancesTablesGenerateConsistencyToken
, ProjectsInstancesTablesGenerateConsistencyToken
, pitgctXgafv
, pitgctUploadProtocol
, pitgctAccessToken
, pitgctUploadType
, pitgctPayload
, pitgctName
, pitgctCallback
) where
import Network.Google.BigtableAdmin.Types
import Network.Google.Prelude
type ProjectsInstancesTablesGenerateConsistencyTokenResource
=
"v2" :>
CaptureMode "name" "generateConsistencyToken" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GenerateConsistencyTokenRequest :>
Post '[JSON] GenerateConsistencyTokenResponse
data ProjectsInstancesTablesGenerateConsistencyToken = ProjectsInstancesTablesGenerateConsistencyToken'
{ _pitgctXgafv :: !(Maybe Xgafv)
, _pitgctUploadProtocol :: !(Maybe Text)
, _pitgctAccessToken :: !(Maybe Text)
, _pitgctUploadType :: !(Maybe Text)
, _pitgctPayload :: !GenerateConsistencyTokenRequest
, _pitgctName :: !Text
, _pitgctCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesTablesGenerateConsistencyToken
:: GenerateConsistencyTokenRequest
-> Text
-> ProjectsInstancesTablesGenerateConsistencyToken
projectsInstancesTablesGenerateConsistencyToken pPitgctPayload_ pPitgctName_ =
ProjectsInstancesTablesGenerateConsistencyToken'
{ _pitgctXgafv = Nothing
, _pitgctUploadProtocol = Nothing
, _pitgctAccessToken = Nothing
, _pitgctUploadType = Nothing
, _pitgctPayload = pPitgctPayload_
, _pitgctName = pPitgctName_
, _pitgctCallback = Nothing
}
pitgctXgafv :: Lens' ProjectsInstancesTablesGenerateConsistencyToken (Maybe Xgafv)
pitgctXgafv
= lens _pitgctXgafv (\ s a -> s{_pitgctXgafv = a})
pitgctUploadProtocol :: Lens' ProjectsInstancesTablesGenerateConsistencyToken (Maybe Text)
pitgctUploadProtocol
= lens _pitgctUploadProtocol
(\ s a -> s{_pitgctUploadProtocol = a})
pitgctAccessToken :: Lens' ProjectsInstancesTablesGenerateConsistencyToken (Maybe Text)
pitgctAccessToken
= lens _pitgctAccessToken
(\ s a -> s{_pitgctAccessToken = a})
pitgctUploadType :: Lens' ProjectsInstancesTablesGenerateConsistencyToken (Maybe Text)
pitgctUploadType
= lens _pitgctUploadType
(\ s a -> s{_pitgctUploadType = a})
pitgctPayload :: Lens' ProjectsInstancesTablesGenerateConsistencyToken GenerateConsistencyTokenRequest
pitgctPayload
= lens _pitgctPayload
(\ s a -> s{_pitgctPayload = a})
pitgctName :: Lens' ProjectsInstancesTablesGenerateConsistencyToken Text
pitgctName
= lens _pitgctName (\ s a -> s{_pitgctName = a})
pitgctCallback :: Lens' ProjectsInstancesTablesGenerateConsistencyToken (Maybe Text)
pitgctCallback
= lens _pitgctCallback
(\ s a -> s{_pitgctCallback = a})
instance GoogleRequest
ProjectsInstancesTablesGenerateConsistencyToken where
type Rs
ProjectsInstancesTablesGenerateConsistencyToken
= GenerateConsistencyTokenResponse
type Scopes
ProjectsInstancesTablesGenerateConsistencyToken
=
'["https://www.googleapis.com/auth/bigtable.admin",
"https://www.googleapis.com/auth/bigtable.admin.table",
"https://www.googleapis.com/auth/cloud-bigtable.admin",
"https://www.googleapis.com/auth/cloud-bigtable.admin.table",
"https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsInstancesTablesGenerateConsistencyToken'{..}
= go _pitgctName _pitgctXgafv _pitgctUploadProtocol
_pitgctAccessToken
_pitgctUploadType
_pitgctCallback
(Just AltJSON)
_pitgctPayload
bigtableAdminService
where go
= buildClient
(Proxy ::
Proxy
ProjectsInstancesTablesGenerateConsistencyTokenResource)
mempty