{-# 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.RegionBackendServices.GetHealth
(
RegionBackendServicesGetHealthResource
, regionBackendServicesGetHealth
, RegionBackendServicesGetHealth
, rbsghProject
, rbsghPayload
, rbsghRegion
, rbsghBackendService
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RegionBackendServicesGetHealthResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"backendServices" :>
Capture "backendService" Text :>
"getHealth" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ResourceGroupReference :>
Post '[JSON] BackendServiceGroupHealth
data RegionBackendServicesGetHealth = RegionBackendServicesGetHealth'
{ _rbsghProject :: !Text
, _rbsghPayload :: !ResourceGroupReference
, _rbsghRegion :: !Text
, _rbsghBackendService :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
regionBackendServicesGetHealth
:: Text
-> ResourceGroupReference
-> Text
-> Text
-> RegionBackendServicesGetHealth
regionBackendServicesGetHealth pRbsghProject_ pRbsghPayload_ pRbsghRegion_ pRbsghBackendService_ =
RegionBackendServicesGetHealth'
{ _rbsghProject = pRbsghProject_
, _rbsghPayload = pRbsghPayload_
, _rbsghRegion = pRbsghRegion_
, _rbsghBackendService = pRbsghBackendService_
}
rbsghProject :: Lens' RegionBackendServicesGetHealth Text
rbsghProject
= lens _rbsghProject (\ s a -> s{_rbsghProject = a})
rbsghPayload :: Lens' RegionBackendServicesGetHealth ResourceGroupReference
rbsghPayload
= lens _rbsghPayload (\ s a -> s{_rbsghPayload = a})
rbsghRegion :: Lens' RegionBackendServicesGetHealth Text
rbsghRegion
= lens _rbsghRegion (\ s a -> s{_rbsghRegion = a})
rbsghBackendService :: Lens' RegionBackendServicesGetHealth Text
rbsghBackendService
= lens _rbsghBackendService
(\ s a -> s{_rbsghBackendService = a})
instance GoogleRequest RegionBackendServicesGetHealth
where
type Rs RegionBackendServicesGetHealth =
BackendServiceGroupHealth
type Scopes RegionBackendServicesGetHealth =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient RegionBackendServicesGetHealth'{..}
= go _rbsghProject _rbsghRegion _rbsghBackendService
(Just AltJSON)
_rbsghPayload
computeService
where go
= buildClient
(Proxy ::
Proxy RegionBackendServicesGetHealthResource)
mempty