{-# 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.Insert
(
HealthChecksInsertResource
, healthChecksInsert
, HealthChecksInsert
, hciRequestId
, hciProject
, hciPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type HealthChecksInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"healthChecks" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] HealthCheck :> Post '[JSON] Operation
data HealthChecksInsert = HealthChecksInsert'
{ _hciRequestId :: !(Maybe Text)
, _hciProject :: !Text
, _hciPayload :: !HealthCheck
} deriving (Eq,Show,Data,Typeable,Generic)
healthChecksInsert
:: Text
-> HealthCheck
-> HealthChecksInsert
healthChecksInsert pHciProject_ pHciPayload_ =
HealthChecksInsert'
{ _hciRequestId = Nothing
, _hciProject = pHciProject_
, _hciPayload = pHciPayload_
}
hciRequestId :: Lens' HealthChecksInsert (Maybe Text)
hciRequestId
= lens _hciRequestId (\ s a -> s{_hciRequestId = a})
hciProject :: Lens' HealthChecksInsert Text
hciProject
= lens _hciProject (\ s a -> s{_hciProject = a})
hciPayload :: Lens' HealthChecksInsert HealthCheck
hciPayload
= lens _hciPayload (\ s a -> s{_hciPayload = a})
instance GoogleRequest HealthChecksInsert where
type Rs HealthChecksInsert = Operation
type Scopes HealthChecksInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient HealthChecksInsert'{..}
= go _hciProject _hciRequestId (Just AltJSON)
_hciPayload
computeService
where go
= buildClient
(Proxy :: Proxy HealthChecksInsertResource)
mempty