{-# 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.AddHealthCheck
(
TargetPoolsAddHealthCheckResource
, targetPoolsAddHealthCheck
, TargetPoolsAddHealthCheck
, tpahcRequestId
, tpahcProject
, tpahcTargetPool
, tpahcPayload
, tpahcRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type TargetPoolsAddHealthCheckResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"targetPools" :>
Capture "targetPool" Text :>
"addHealthCheck" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TargetPoolsAddHealthCheckRequest :>
Post '[JSON] Operation
data TargetPoolsAddHealthCheck = TargetPoolsAddHealthCheck'
{ _tpahcRequestId :: !(Maybe Text)
, _tpahcProject :: !Text
, _tpahcTargetPool :: !Text
, _tpahcPayload :: !TargetPoolsAddHealthCheckRequest
, _tpahcRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
targetPoolsAddHealthCheck
:: Text
-> Text
-> TargetPoolsAddHealthCheckRequest
-> Text
-> TargetPoolsAddHealthCheck
targetPoolsAddHealthCheck pTpahcProject_ pTpahcTargetPool_ pTpahcPayload_ pTpahcRegion_ =
TargetPoolsAddHealthCheck'
{ _tpahcRequestId = Nothing
, _tpahcProject = pTpahcProject_
, _tpahcTargetPool = pTpahcTargetPool_
, _tpahcPayload = pTpahcPayload_
, _tpahcRegion = pTpahcRegion_
}
tpahcRequestId :: Lens' TargetPoolsAddHealthCheck (Maybe Text)
tpahcRequestId
= lens _tpahcRequestId
(\ s a -> s{_tpahcRequestId = a})
tpahcProject :: Lens' TargetPoolsAddHealthCheck Text
tpahcProject
= lens _tpahcProject (\ s a -> s{_tpahcProject = a})
tpahcTargetPool :: Lens' TargetPoolsAddHealthCheck Text
tpahcTargetPool
= lens _tpahcTargetPool
(\ s a -> s{_tpahcTargetPool = a})
tpahcPayload :: Lens' TargetPoolsAddHealthCheck TargetPoolsAddHealthCheckRequest
tpahcPayload
= lens _tpahcPayload (\ s a -> s{_tpahcPayload = a})
tpahcRegion :: Lens' TargetPoolsAddHealthCheck Text
tpahcRegion
= lens _tpahcRegion (\ s a -> s{_tpahcRegion = a})
instance GoogleRequest TargetPoolsAddHealthCheck
where
type Rs TargetPoolsAddHealthCheck = Operation
type Scopes TargetPoolsAddHealthCheck =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient TargetPoolsAddHealthCheck'{..}
= go _tpahcProject _tpahcRegion _tpahcTargetPool
_tpahcRequestId
(Just AltJSON)
_tpahcPayload
computeService
where go
= buildClient
(Proxy :: Proxy TargetPoolsAddHealthCheckResource)
mempty