{-# 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.GetHealth
(
BackendServicesGetHealthResource
, backendServicesGetHealth
, BackendServicesGetHealth
, bsghProject
, bsghPayload
, bsghBackendService
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type BackendServicesGetHealthResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"backendServices" :>
Capture "backendService" Text :>
"getHealth" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ResourceGroupReference :>
Post '[JSON] BackendServiceGroupHealth
data BackendServicesGetHealth = BackendServicesGetHealth'
{ _bsghProject :: !Text
, _bsghPayload :: !ResourceGroupReference
, _bsghBackendService :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
backendServicesGetHealth
:: Text
-> ResourceGroupReference
-> Text
-> BackendServicesGetHealth
backendServicesGetHealth pBsghProject_ pBsghPayload_ pBsghBackendService_ =
BackendServicesGetHealth'
{ _bsghProject = pBsghProject_
, _bsghPayload = pBsghPayload_
, _bsghBackendService = pBsghBackendService_
}
bsghProject :: Lens' BackendServicesGetHealth Text
bsghProject
= lens _bsghProject (\ s a -> s{_bsghProject = a})
bsghPayload :: Lens' BackendServicesGetHealth ResourceGroupReference
bsghPayload
= lens _bsghPayload (\ s a -> s{_bsghPayload = a})
bsghBackendService :: Lens' BackendServicesGetHealth Text
bsghBackendService
= lens _bsghBackendService
(\ s a -> s{_bsghBackendService = a})
instance GoogleRequest BackendServicesGetHealth where
type Rs BackendServicesGetHealth =
BackendServiceGroupHealth
type Scopes BackendServicesGetHealth =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient BackendServicesGetHealth'{..}
= go _bsghProject _bsghBackendService (Just AltJSON)
_bsghPayload
computeService
where go
= buildClient
(Proxy :: Proxy BackendServicesGetHealthResource)
mempty