{-# 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.RegionOperations.Get
(
RegionOperationsGetResource
, regionOperationsGet
, RegionOperationsGet
, rogProject
, rogOperation
, rogRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RegionOperationsGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"operations" :>
Capture "operation" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Operation
data RegionOperationsGet = RegionOperationsGet'
{ _rogProject :: !Text
, _rogOperation :: !Text
, _rogRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
regionOperationsGet
:: Text
-> Text
-> Text
-> RegionOperationsGet
regionOperationsGet pRogProject_ pRogOperation_ pRogRegion_ =
RegionOperationsGet'
{ _rogProject = pRogProject_
, _rogOperation = pRogOperation_
, _rogRegion = pRogRegion_
}
rogProject :: Lens' RegionOperationsGet Text
rogProject
= lens _rogProject (\ s a -> s{_rogProject = a})
rogOperation :: Lens' RegionOperationsGet Text
rogOperation
= lens _rogOperation (\ s a -> s{_rogOperation = a})
rogRegion :: Lens' RegionOperationsGet Text
rogRegion
= lens _rogRegion (\ s a -> s{_rogRegion = a})
instance GoogleRequest RegionOperationsGet where
type Rs RegionOperationsGet = Operation
type Scopes RegionOperationsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient RegionOperationsGet'{..}
= go _rogProject _rogRegion _rogOperation
(Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy RegionOperationsGetResource)
mempty