{-# 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.ForwardingRules.Get
(
ForwardingRulesGetResource
, forwardingRulesGet
, ForwardingRulesGet
, frgProject
, frgForwardingRule
, frgRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type ForwardingRulesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"forwardingRules" :>
Capture "forwardingRule" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ForwardingRule
data ForwardingRulesGet = ForwardingRulesGet'
{ _frgProject :: !Text
, _frgForwardingRule :: !Text
, _frgRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
forwardingRulesGet
:: Text
-> Text
-> Text
-> ForwardingRulesGet
forwardingRulesGet pFrgProject_ pFrgForwardingRule_ pFrgRegion_ =
ForwardingRulesGet'
{ _frgProject = pFrgProject_
, _frgForwardingRule = pFrgForwardingRule_
, _frgRegion = pFrgRegion_
}
frgProject :: Lens' ForwardingRulesGet Text
frgProject
= lens _frgProject (\ s a -> s{_frgProject = a})
frgForwardingRule :: Lens' ForwardingRulesGet Text
frgForwardingRule
= lens _frgForwardingRule
(\ s a -> s{_frgForwardingRule = a})
frgRegion :: Lens' ForwardingRulesGet Text
frgRegion
= lens _frgRegion (\ s a -> s{_frgRegion = a})
instance GoogleRequest ForwardingRulesGet where
type Rs ForwardingRulesGet = ForwardingRule
type Scopes ForwardingRulesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient ForwardingRulesGet'{..}
= go _frgProject _frgRegion _frgForwardingRule
(Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy ForwardingRulesGetResource)
mempty