{-# 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.Routes.Get
(
RoutesGetResource
, routesGet
, RoutesGet
, rrProject
, rrRoute
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RoutesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"routes" :>
Capture "route" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Route
data RoutesGet = RoutesGet'
{ _rrProject :: !Text
, _rrRoute :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
routesGet
:: Text
-> Text
-> RoutesGet
routesGet pRrProject_ pRrRoute_ =
RoutesGet'
{ _rrProject = pRrProject_
, _rrRoute = pRrRoute_
}
rrProject :: Lens' RoutesGet Text
rrProject
= lens _rrProject (\ s a -> s{_rrProject = a})
rrRoute :: Lens' RoutesGet Text
rrRoute = lens _rrRoute (\ s a -> s{_rrRoute = a})
instance GoogleRequest RoutesGet where
type Rs RoutesGet = Route
type Scopes RoutesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient RoutesGet'{..}
= go _rrProject _rrRoute (Just AltJSON)
computeService
where go
= buildClient (Proxy :: Proxy RoutesGetResource)
mempty