{-# 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.TargetPools.Get
(
TargetPoolsGetResource
, targetPoolsGet
, TargetPoolsGet
, tpgProject
, tpgTargetPool
, tpgRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type TargetPoolsGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"targetPools" :>
Capture "targetPool" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] TargetPool
data TargetPoolsGet = TargetPoolsGet'
{ _tpgProject :: !Text
, _tpgTargetPool :: !Text
, _tpgRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
targetPoolsGet
:: Text
-> Text
-> Text
-> TargetPoolsGet
targetPoolsGet pTpgProject_ pTpgTargetPool_ pTpgRegion_ =
TargetPoolsGet'
{ _tpgProject = pTpgProject_
, _tpgTargetPool = pTpgTargetPool_
, _tpgRegion = pTpgRegion_
}
tpgProject :: Lens' TargetPoolsGet Text
tpgProject
= lens _tpgProject (\ s a -> s{_tpgProject = a})
tpgTargetPool :: Lens' TargetPoolsGet Text
tpgTargetPool
= lens _tpgTargetPool
(\ s a -> s{_tpgTargetPool = a})
tpgRegion :: Lens' TargetPoolsGet Text
tpgRegion
= lens _tpgRegion (\ s a -> s{_tpgRegion = a})
instance GoogleRequest TargetPoolsGet where
type Rs TargetPoolsGet = TargetPool
type Scopes TargetPoolsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient TargetPoolsGet'{..}
= go _tpgProject _tpgRegion _tpgTargetPool
(Just AltJSON)
computeService
where go
= buildClient (Proxy :: Proxy TargetPoolsGetResource)
mempty