{-# 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.HTTPSHealthChecks.Insert
(
HTTPSHealthChecksInsertResource
, httpsHealthChecksInsert
, HTTPSHealthChecksInsert
, hhciRequestId
, hhciProject
, hhciPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type HTTPSHealthChecksInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"httpsHealthChecks" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] HTTPSHealthCheck :>
Post '[JSON] Operation
data HTTPSHealthChecksInsert = HTTPSHealthChecksInsert'
{ _hhciRequestId :: !(Maybe Text)
, _hhciProject :: !Text
, _hhciPayload :: !HTTPSHealthCheck
} deriving (Eq,Show,Data,Typeable,Generic)
httpsHealthChecksInsert
:: Text
-> HTTPSHealthCheck
-> HTTPSHealthChecksInsert
httpsHealthChecksInsert pHhciProject_ pHhciPayload_ =
HTTPSHealthChecksInsert'
{ _hhciRequestId = Nothing
, _hhciProject = pHhciProject_
, _hhciPayload = pHhciPayload_
}
hhciRequestId :: Lens' HTTPSHealthChecksInsert (Maybe Text)
hhciRequestId
= lens _hhciRequestId
(\ s a -> s{_hhciRequestId = a})
hhciProject :: Lens' HTTPSHealthChecksInsert Text
hhciProject
= lens _hhciProject (\ s a -> s{_hhciProject = a})
hhciPayload :: Lens' HTTPSHealthChecksInsert HTTPSHealthCheck
hhciPayload
= lens _hhciPayload (\ s a -> s{_hhciPayload = a})
instance GoogleRequest HTTPSHealthChecksInsert where
type Rs HTTPSHealthChecksInsert = Operation
type Scopes HTTPSHealthChecksInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient HTTPSHealthChecksInsert'{..}
= go _hhciProject _hhciRequestId (Just AltJSON)
_hhciPayload
computeService
where go
= buildClient
(Proxy :: Proxy HTTPSHealthChecksInsertResource)
mempty