{-# 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.Instances.Get
(
InstancesGetResource
, instancesGet
, InstancesGet
, igProject
, igInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type InstancesGetResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] DatabaseInstance
data InstancesGet = InstancesGet'
{ _igProject :: !Text
, _igInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesGet
:: Text
-> Text
-> InstancesGet
instancesGet pIgProject_ pIgInstance_ =
InstancesGet'
{ _igProject = pIgProject_
, _igInstance = pIgInstance_
}
igProject :: Lens' InstancesGet Text
igProject
= lens _igProject (\ s a -> s{_igProject = a})
igInstance :: Lens' InstancesGet Text
igInstance
= lens _igInstance (\ s a -> s{_igInstance = a})
instance GoogleRequest InstancesGet where
type Rs InstancesGet = DatabaseInstance
type Scopes InstancesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient InstancesGet'{..}
= go _igProject _igInstance (Just AltJSON)
sQLAdminService
where go
= buildClient (Proxy :: Proxy InstancesGetResource)
mempty