{-# 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.Compute.GlobalOperations.Get
(
GlobalOperationsGetResource
, globalOperationsGet
, GlobalOperationsGet
, gogProject
, gogOperation
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type GlobalOperationsGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"operations" :>
Capture "operation" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Operation
data GlobalOperationsGet = GlobalOperationsGet'
{ _gogProject :: !Text
, _gogOperation :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
globalOperationsGet
:: Text
-> Text
-> GlobalOperationsGet
globalOperationsGet pGogProject_ pGogOperation_ =
GlobalOperationsGet'
{ _gogProject = pGogProject_
, _gogOperation = pGogOperation_
}
gogProject :: Lens' GlobalOperationsGet Text
gogProject
= lens _gogProject (\ s a -> s{_gogProject = a})
gogOperation :: Lens' GlobalOperationsGet Text
gogOperation
= lens _gogOperation (\ s a -> s{_gogOperation = a})
instance GoogleRequest GlobalOperationsGet where
type Rs GlobalOperationsGet = Operation
type Scopes GlobalOperationsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient GlobalOperationsGet'{..}
= go _gogProject _gogOperation (Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy GlobalOperationsGetResource)
mempty