{-# 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.GlobalForwardingRules.Get
(
GlobalForwardingRulesGetResource
, globalForwardingRulesGet
, GlobalForwardingRulesGet
, gfrgProject
, gfrgForwardingRule
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type GlobalForwardingRulesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"forwardingRules" :>
Capture "forwardingRule" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ForwardingRule
data GlobalForwardingRulesGet = GlobalForwardingRulesGet'
{ _gfrgProject :: !Text
, _gfrgForwardingRule :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
globalForwardingRulesGet
:: Text
-> Text
-> GlobalForwardingRulesGet
globalForwardingRulesGet pGfrgProject_ pGfrgForwardingRule_ =
GlobalForwardingRulesGet'
{ _gfrgProject = pGfrgProject_
, _gfrgForwardingRule = pGfrgForwardingRule_
}
gfrgProject :: Lens' GlobalForwardingRulesGet Text
gfrgProject
= lens _gfrgProject (\ s a -> s{_gfrgProject = a})
gfrgForwardingRule :: Lens' GlobalForwardingRulesGet Text
gfrgForwardingRule
= lens _gfrgForwardingRule
(\ s a -> s{_gfrgForwardingRule = a})
instance GoogleRequest GlobalForwardingRulesGet where
type Rs GlobalForwardingRulesGet = ForwardingRule
type Scopes GlobalForwardingRulesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient GlobalForwardingRulesGet'{..}
= go _gfrgProject _gfrgForwardingRule (Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy GlobalForwardingRulesGetResource)
mempty