{-# 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.Patch
(
HealthChecksPatchResource
, healthChecksPatch
, HealthChecksPatch
, hcpRequestId
, hcpHealthCheck
, hcpProject
, hcpPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type HealthChecksPatchResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"healthChecks" :>
Capture "healthCheck" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] HealthCheck :>
Patch '[JSON] Operation
data HealthChecksPatch = HealthChecksPatch'
{ _hcpRequestId :: !(Maybe Text)
, _hcpHealthCheck :: !Text
, _hcpProject :: !Text
, _hcpPayload :: !HealthCheck
} deriving (Eq,Show,Data,Typeable,Generic)
healthChecksPatch
:: Text
-> Text
-> HealthCheck
-> HealthChecksPatch
healthChecksPatch pHcpHealthCheck_ pHcpProject_ pHcpPayload_ =
HealthChecksPatch'
{ _hcpRequestId = Nothing
, _hcpHealthCheck = pHcpHealthCheck_
, _hcpProject = pHcpProject_
, _hcpPayload = pHcpPayload_
}
hcpRequestId :: Lens' HealthChecksPatch (Maybe Text)
hcpRequestId
= lens _hcpRequestId (\ s a -> s{_hcpRequestId = a})
hcpHealthCheck :: Lens' HealthChecksPatch Text
hcpHealthCheck
= lens _hcpHealthCheck
(\ s a -> s{_hcpHealthCheck = a})
hcpProject :: Lens' HealthChecksPatch Text
hcpProject
= lens _hcpProject (\ s a -> s{_hcpProject = a})
hcpPayload :: Lens' HealthChecksPatch HealthCheck
hcpPayload
= lens _hcpPayload (\ s a -> s{_hcpPayload = a})
instance GoogleRequest HealthChecksPatch where
type Rs HealthChecksPatch = Operation
type Scopes HealthChecksPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient HealthChecksPatch'{..}
= go _hcpProject _hcpHealthCheck _hcpRequestId
(Just AltJSON)
_hcpPayload
computeService
where go
= buildClient
(Proxy :: Proxy HealthChecksPatchResource)
mempty