{-# 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.BackendServices.Get
(
BackendServicesGetResource
, backendServicesGet
, BackendServicesGet
, bsgProject
, bsgBackendService
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type BackendServicesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"backendServices" :>
Capture "backendService" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] BackendService
data BackendServicesGet = BackendServicesGet'
{ _bsgProject :: !Text
, _bsgBackendService :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
backendServicesGet
:: Text
-> Text
-> BackendServicesGet
backendServicesGet pBsgProject_ pBsgBackendService_ =
BackendServicesGet'
{ _bsgProject = pBsgProject_
, _bsgBackendService = pBsgBackendService_
}
bsgProject :: Lens' BackendServicesGet Text
bsgProject
= lens _bsgProject (\ s a -> s{_bsgProject = a})
bsgBackendService :: Lens' BackendServicesGet Text
bsgBackendService
= lens _bsgBackendService
(\ s a -> s{_bsgBackendService = a})
instance GoogleRequest BackendServicesGet where
type Rs BackendServicesGet = BackendService
type Scopes BackendServicesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient BackendServicesGet'{..}
= go _bsgProject _bsgBackendService (Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy BackendServicesGetResource)
mempty