{-# 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.Get
(
ProjectsInstancesDatabasesGetResource
, projectsInstancesDatabasesGet
, ProjectsInstancesDatabasesGet
, pidgXgafv
, pidgUploadProtocol
, pidgAccessToken
, pidgUploadType
, pidgName
, pidgCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesDatabasesGetResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Database
data ProjectsInstancesDatabasesGet = ProjectsInstancesDatabasesGet'
{ _pidgXgafv :: !(Maybe Xgafv)
, _pidgUploadProtocol :: !(Maybe Text)
, _pidgAccessToken :: !(Maybe Text)
, _pidgUploadType :: !(Maybe Text)
, _pidgName :: !Text
, _pidgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesDatabasesGet
:: Text
-> ProjectsInstancesDatabasesGet
projectsInstancesDatabasesGet pPidgName_ =
ProjectsInstancesDatabasesGet'
{ _pidgXgafv = Nothing
, _pidgUploadProtocol = Nothing
, _pidgAccessToken = Nothing
, _pidgUploadType = Nothing
, _pidgName = pPidgName_
, _pidgCallback = Nothing
}
pidgXgafv :: Lens' ProjectsInstancesDatabasesGet (Maybe Xgafv)
pidgXgafv
= lens _pidgXgafv (\ s a -> s{_pidgXgafv = a})
pidgUploadProtocol :: Lens' ProjectsInstancesDatabasesGet (Maybe Text)
pidgUploadProtocol
= lens _pidgUploadProtocol
(\ s a -> s{_pidgUploadProtocol = a})
pidgAccessToken :: Lens' ProjectsInstancesDatabasesGet (Maybe Text)
pidgAccessToken
= lens _pidgAccessToken
(\ s a -> s{_pidgAccessToken = a})
pidgUploadType :: Lens' ProjectsInstancesDatabasesGet (Maybe Text)
pidgUploadType
= lens _pidgUploadType
(\ s a -> s{_pidgUploadType = a})
pidgName :: Lens' ProjectsInstancesDatabasesGet Text
pidgName = lens _pidgName (\ s a -> s{_pidgName = a})
pidgCallback :: Lens' ProjectsInstancesDatabasesGet (Maybe Text)
pidgCallback
= lens _pidgCallback (\ s a -> s{_pidgCallback = a})
instance GoogleRequest ProjectsInstancesDatabasesGet
where
type Rs ProjectsInstancesDatabasesGet = Database
type Scopes ProjectsInstancesDatabasesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"]
requestClient ProjectsInstancesDatabasesGet'{..}
= go _pidgName _pidgXgafv _pidgUploadProtocol
_pidgAccessToken
_pidgUploadType
_pidgCallback
(Just AltJSON)
spannerService
where go
= buildClient
(Proxy ::
Proxy ProjectsInstancesDatabasesGetResource)
mempty