{-# 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.UpdateDdl
(
ProjectsInstancesDatabasesUpdateDdlResource
, projectsInstancesDatabasesUpdateDdl
, ProjectsInstancesDatabasesUpdateDdl
, pidudXgafv
, pidudUploadProtocol
, pidudDatabase
, pidudAccessToken
, pidudUploadType
, pidudPayload
, pidudCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesDatabasesUpdateDdlResource =
"v1" :>
Capture "database" Text :>
"ddl" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UpdateDatabaseDdlRequest :>
Patch '[JSON] Operation
data ProjectsInstancesDatabasesUpdateDdl = ProjectsInstancesDatabasesUpdateDdl'
{ _pidudXgafv :: !(Maybe Xgafv)
, _pidudUploadProtocol :: !(Maybe Text)
, _pidudDatabase :: !Text
, _pidudAccessToken :: !(Maybe Text)
, _pidudUploadType :: !(Maybe Text)
, _pidudPayload :: !UpdateDatabaseDdlRequest
, _pidudCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesDatabasesUpdateDdl
:: Text
-> UpdateDatabaseDdlRequest
-> ProjectsInstancesDatabasesUpdateDdl
projectsInstancesDatabasesUpdateDdl pPidudDatabase_ pPidudPayload_ =
ProjectsInstancesDatabasesUpdateDdl'
{ _pidudXgafv = Nothing
, _pidudUploadProtocol = Nothing
, _pidudDatabase = pPidudDatabase_
, _pidudAccessToken = Nothing
, _pidudUploadType = Nothing
, _pidudPayload = pPidudPayload_
, _pidudCallback = Nothing
}
pidudXgafv :: Lens' ProjectsInstancesDatabasesUpdateDdl (Maybe Xgafv)
pidudXgafv
= lens _pidudXgafv (\ s a -> s{_pidudXgafv = a})
pidudUploadProtocol :: Lens' ProjectsInstancesDatabasesUpdateDdl (Maybe Text)
pidudUploadProtocol
= lens _pidudUploadProtocol
(\ s a -> s{_pidudUploadProtocol = a})
pidudDatabase :: Lens' ProjectsInstancesDatabasesUpdateDdl Text
pidudDatabase
= lens _pidudDatabase
(\ s a -> s{_pidudDatabase = a})
pidudAccessToken :: Lens' ProjectsInstancesDatabasesUpdateDdl (Maybe Text)
pidudAccessToken
= lens _pidudAccessToken
(\ s a -> s{_pidudAccessToken = a})
pidudUploadType :: Lens' ProjectsInstancesDatabasesUpdateDdl (Maybe Text)
pidudUploadType
= lens _pidudUploadType
(\ s a -> s{_pidudUploadType = a})
pidudPayload :: Lens' ProjectsInstancesDatabasesUpdateDdl UpdateDatabaseDdlRequest
pidudPayload
= lens _pidudPayload (\ s a -> s{_pidudPayload = a})
pidudCallback :: Lens' ProjectsInstancesDatabasesUpdateDdl (Maybe Text)
pidudCallback
= lens _pidudCallback
(\ s a -> s{_pidudCallback = a})
instance GoogleRequest
ProjectsInstancesDatabasesUpdateDdl where
type Rs ProjectsInstancesDatabasesUpdateDdl =
Operation
type Scopes ProjectsInstancesDatabasesUpdateDdl =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"]
requestClient
ProjectsInstancesDatabasesUpdateDdl'{..}
= go _pidudDatabase _pidudXgafv _pidudUploadProtocol
_pidudAccessToken
_pidudUploadType
_pidudCallback
(Just AltJSON)
_pidudPayload
spannerService
where go
= buildClient
(Proxy ::
Proxy ProjectsInstancesDatabasesUpdateDdlResource)
mempty