{-# 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.SQL.Databases.Get
(
DatabasesGetResource
, databasesGet
, DatabasesGet
, dgProject
, dgDatabase
, dgInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type DatabasesGetResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"databases" :>
Capture "database" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Database
data DatabasesGet = DatabasesGet'
{ _dgProject :: !Text
, _dgDatabase :: !Text
, _dgInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
databasesGet
:: Text
-> Text
-> Text
-> DatabasesGet
databasesGet pDgProject_ pDgDatabase_ pDgInstance_ =
DatabasesGet'
{ _dgProject = pDgProject_
, _dgDatabase = pDgDatabase_
, _dgInstance = pDgInstance_
}
dgProject :: Lens' DatabasesGet Text
dgProject
= lens _dgProject (\ s a -> s{_dgProject = a})
dgDatabase :: Lens' DatabasesGet Text
dgDatabase
= lens _dgDatabase (\ s a -> s{_dgDatabase = a})
dgInstance :: Lens' DatabasesGet Text
dgInstance
= lens _dgInstance (\ s a -> s{_dgInstance = a})
instance GoogleRequest DatabasesGet where
type Rs DatabasesGet = Database
type Scopes DatabasesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient DatabasesGet'{..}
= go _dgProject _dgInstance _dgDatabase
(Just AltJSON)
sQLAdminService
where go
= buildClient (Proxy :: Proxy DatabasesGetResource)
mempty