{-# 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.GetDdl
(
ProjectsInstancesDatabasesGetDdlResource
, projectsInstancesDatabasesGetDdl
, ProjectsInstancesDatabasesGetDdl
, pidgdXgafv
, pidgdUploadProtocol
, pidgdDatabase
, pidgdAccessToken
, pidgdUploadType
, pidgdCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesDatabasesGetDdlResource =
"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 :>
Get '[JSON] GetDatabaseDdlResponse
data ProjectsInstancesDatabasesGetDdl = ProjectsInstancesDatabasesGetDdl'
{ _pidgdXgafv :: !(Maybe Xgafv)
, _pidgdUploadProtocol :: !(Maybe Text)
, _pidgdDatabase :: !Text
, _pidgdAccessToken :: !(Maybe Text)
, _pidgdUploadType :: !(Maybe Text)
, _pidgdCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesDatabasesGetDdl
:: Text
-> ProjectsInstancesDatabasesGetDdl
projectsInstancesDatabasesGetDdl pPidgdDatabase_ =
ProjectsInstancesDatabasesGetDdl'
{ _pidgdXgafv = Nothing
, _pidgdUploadProtocol = Nothing
, _pidgdDatabase = pPidgdDatabase_
, _pidgdAccessToken = Nothing
, _pidgdUploadType = Nothing
, _pidgdCallback = Nothing
}
pidgdXgafv :: Lens' ProjectsInstancesDatabasesGetDdl (Maybe Xgafv)
pidgdXgafv
= lens _pidgdXgafv (\ s a -> s{_pidgdXgafv = a})
pidgdUploadProtocol :: Lens' ProjectsInstancesDatabasesGetDdl (Maybe Text)
pidgdUploadProtocol
= lens _pidgdUploadProtocol
(\ s a -> s{_pidgdUploadProtocol = a})
pidgdDatabase :: Lens' ProjectsInstancesDatabasesGetDdl Text
pidgdDatabase
= lens _pidgdDatabase
(\ s a -> s{_pidgdDatabase = a})
pidgdAccessToken :: Lens' ProjectsInstancesDatabasesGetDdl (Maybe Text)
pidgdAccessToken
= lens _pidgdAccessToken
(\ s a -> s{_pidgdAccessToken = a})
pidgdUploadType :: Lens' ProjectsInstancesDatabasesGetDdl (Maybe Text)
pidgdUploadType
= lens _pidgdUploadType
(\ s a -> s{_pidgdUploadType = a})
pidgdCallback :: Lens' ProjectsInstancesDatabasesGetDdl (Maybe Text)
pidgdCallback
= lens _pidgdCallback
(\ s a -> s{_pidgdCallback = a})
instance GoogleRequest
ProjectsInstancesDatabasesGetDdl where
type Rs ProjectsInstancesDatabasesGetDdl =
GetDatabaseDdlResponse
type Scopes ProjectsInstancesDatabasesGetDdl =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"]
requestClient ProjectsInstancesDatabasesGetDdl'{..}
= go _pidgdDatabase _pidgdXgafv _pidgdUploadProtocol
_pidgdAccessToken
_pidgdUploadType
_pidgdCallback
(Just AltJSON)
spannerService
where go
= buildClient
(Proxy ::
Proxy ProjectsInstancesDatabasesGetDdlResource)
mempty