{-# 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.Operations.Get
(
OperationsGetResource
, operationsGet
, OperationsGet
, ogProject
, ogOperation
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type OperationsGetResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"operations" :>
Capture "operation" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Operation
data OperationsGet = OperationsGet'
{ _ogProject :: !Text
, _ogOperation :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
operationsGet
:: Text
-> Text
-> OperationsGet
operationsGet pOgProject_ pOgOperation_ =
OperationsGet'
{ _ogProject = pOgProject_
, _ogOperation = pOgOperation_
}
ogProject :: Lens' OperationsGet Text
ogProject
= lens _ogProject (\ s a -> s{_ogProject = a})
ogOperation :: Lens' OperationsGet Text
ogOperation
= lens _ogOperation (\ s a -> s{_ogOperation = a})
instance GoogleRequest OperationsGet where
type Rs OperationsGet = Operation
type Scopes OperationsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient OperationsGet'{..}
= go _ogProject _ogOperation (Just AltJSON)
sQLAdminService
where go
= buildClient (Proxy :: Proxy OperationsGetResource)
mempty