{-# 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.HealthChecks.Get
(
HealthChecksGetResource
, healthChecksGet
, HealthChecksGet
, hcgHealthCheck
, hcgProject
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type HealthChecksGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"healthChecks" :>
Capture "healthCheck" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] HealthCheck
data HealthChecksGet = HealthChecksGet'
{ _hcgHealthCheck :: !Text
, _hcgProject :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
healthChecksGet
:: Text
-> Text
-> HealthChecksGet
healthChecksGet pHcgHealthCheck_ pHcgProject_ =
HealthChecksGet'
{ _hcgHealthCheck = pHcgHealthCheck_
, _hcgProject = pHcgProject_
}
hcgHealthCheck :: Lens' HealthChecksGet Text
hcgHealthCheck
= lens _hcgHealthCheck
(\ s a -> s{_hcgHealthCheck = a})
hcgProject :: Lens' HealthChecksGet Text
hcgProject
= lens _hcgProject (\ s a -> s{_hcgProject = a})
instance GoogleRequest HealthChecksGet where
type Rs HealthChecksGet = HealthCheck
type Scopes HealthChecksGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient HealthChecksGet'{..}
= go _hcgProject _hcgHealthCheck (Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy HealthChecksGetResource)
mempty