{-# 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.HTTPHealthChecks.Insert
(
HTTPHealthChecksInsertResource
, hTTPHealthChecksInsert
, HTTPHealthChecksInsert
, httphciRequestId
, httphciProject
, httphciPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type HTTPHealthChecksInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"httpHealthChecks" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] HTTPHealthCheck :>
Post '[JSON] Operation
data HTTPHealthChecksInsert = HTTPHealthChecksInsert'
{ _httphciRequestId :: !(Maybe Text)
, _httphciProject :: !Text
, _httphciPayload :: !HTTPHealthCheck
} deriving (Eq,Show,Data,Typeable,Generic)
hTTPHealthChecksInsert
:: Text
-> HTTPHealthCheck
-> HTTPHealthChecksInsert
hTTPHealthChecksInsert pHttphciProject_ pHttphciPayload_ =
HTTPHealthChecksInsert'
{ _httphciRequestId = Nothing
, _httphciProject = pHttphciProject_
, _httphciPayload = pHttphciPayload_
}
httphciRequestId :: Lens' HTTPHealthChecksInsert (Maybe Text)
httphciRequestId
= lens _httphciRequestId
(\ s a -> s{_httphciRequestId = a})
httphciProject :: Lens' HTTPHealthChecksInsert Text
httphciProject
= lens _httphciProject
(\ s a -> s{_httphciProject = a})
httphciPayload :: Lens' HTTPHealthChecksInsert HTTPHealthCheck
httphciPayload
= lens _httphciPayload
(\ s a -> s{_httphciPayload = a})
instance GoogleRequest HTTPHealthChecksInsert where
type Rs HTTPHealthChecksInsert = Operation
type Scopes HTTPHealthChecksInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient HTTPHealthChecksInsert'{..}
= go _httphciProject _httphciRequestId (Just AltJSON)
_httphciPayload
computeService
where go
= buildClient
(Proxy :: Proxy HTTPHealthChecksInsertResource)
mempty