{-# 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.Routers.Get
(
RoutersGetResource
, routersGet
, RoutersGet
, rggProject
, rggRouter
, rggRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RoutersGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"routers" :>
Capture "router" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Router
data RoutersGet = RoutersGet'
{ _rggProject :: !Text
, _rggRouter :: !Text
, _rggRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
routersGet
:: Text
-> Text
-> Text
-> RoutersGet
routersGet pRggProject_ pRggRouter_ pRggRegion_ =
RoutersGet'
{ _rggProject = pRggProject_
, _rggRouter = pRggRouter_
, _rggRegion = pRggRegion_
}
rggProject :: Lens' RoutersGet Text
rggProject
= lens _rggProject (\ s a -> s{_rggProject = a})
rggRouter :: Lens' RoutersGet Text
rggRouter
= lens _rggRouter (\ s a -> s{_rggRouter = a})
rggRegion :: Lens' RoutersGet Text
rggRegion
= lens _rggRegion (\ s a -> s{_rggRegion = a})
instance GoogleRequest RoutersGet where
type Rs RoutersGet = Router
type Scopes RoutersGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient RoutersGet'{..}
= go _rggProject _rggRegion _rggRouter (Just AltJSON)
computeService
where go
= buildClient (Proxy :: Proxy RoutersGetResource)
mempty