{-# 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.Regions.Get
(
RegionsGetResource
, regionsGet
, RegionsGet
, rgProject
, rgRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RegionsGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Region
data RegionsGet = RegionsGet'
{ _rgProject :: !Text
, _rgRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
regionsGet
:: Text
-> Text
-> RegionsGet
regionsGet pRgProject_ pRgRegion_ =
RegionsGet'
{ _rgProject = pRgProject_
, _rgRegion = pRgRegion_
}
rgProject :: Lens' RegionsGet Text
rgProject
= lens _rgProject (\ s a -> s{_rgProject = a})
rgRegion :: Lens' RegionsGet Text
rgRegion = lens _rgRegion (\ s a -> s{_rgRegion = a})
instance GoogleRequest RegionsGet where
type Rs RegionsGet = Region
type Scopes RegionsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient RegionsGet'{..}
= go _rgProject _rgRegion (Just AltJSON)
computeService
where go
= buildClient (Proxy :: Proxy RegionsGetResource)
mempty