{-# 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.Update
(
HealthChecksUpdateResource
, healthChecksUpdate
, HealthChecksUpdate
, hcuRequestId
, hcuHealthCheck
, hcuProject
, hcuPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type HealthChecksUpdateResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"healthChecks" :>
Capture "healthCheck" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] HealthCheck :> Put '[JSON] Operation
data HealthChecksUpdate = HealthChecksUpdate'
{ _hcuRequestId :: !(Maybe Text)
, _hcuHealthCheck :: !Text
, _hcuProject :: !Text
, _hcuPayload :: !HealthCheck
} deriving (Eq,Show,Data,Typeable,Generic)
healthChecksUpdate
:: Text
-> Text
-> HealthCheck
-> HealthChecksUpdate
healthChecksUpdate pHcuHealthCheck_ pHcuProject_ pHcuPayload_ =
HealthChecksUpdate'
{ _hcuRequestId = Nothing
, _hcuHealthCheck = pHcuHealthCheck_
, _hcuProject = pHcuProject_
, _hcuPayload = pHcuPayload_
}
hcuRequestId :: Lens' HealthChecksUpdate (Maybe Text)
hcuRequestId
= lens _hcuRequestId (\ s a -> s{_hcuRequestId = a})
hcuHealthCheck :: Lens' HealthChecksUpdate Text
hcuHealthCheck
= lens _hcuHealthCheck
(\ s a -> s{_hcuHealthCheck = a})
hcuProject :: Lens' HealthChecksUpdate Text
hcuProject
= lens _hcuProject (\ s a -> s{_hcuProject = a})
hcuPayload :: Lens' HealthChecksUpdate HealthCheck
hcuPayload
= lens _hcuPayload (\ s a -> s{_hcuPayload = a})
instance GoogleRequest HealthChecksUpdate where
type Rs HealthChecksUpdate = Operation
type Scopes HealthChecksUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient HealthChecksUpdate'{..}
= go _hcuProject _hcuHealthCheck _hcuRequestId
(Just AltJSON)
_hcuPayload
computeService
where go
= buildClient
(Proxy :: Proxy HealthChecksUpdateResource)
mempty