{-# 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.TargetHTTPProxies.Insert
(
TargetHTTPProxiesInsertResource
, targetHTTPProxiesInsert
, TargetHTTPProxiesInsert
, thttppiRequestId
, thttppiProject
, thttppiPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type TargetHTTPProxiesInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"targetHttpProxies" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TargetHTTPProxy :>
Post '[JSON] Operation
data TargetHTTPProxiesInsert = TargetHTTPProxiesInsert'
{ _thttppiRequestId :: !(Maybe Text)
, _thttppiProject :: !Text
, _thttppiPayload :: !TargetHTTPProxy
} deriving (Eq,Show,Data,Typeable,Generic)
targetHTTPProxiesInsert
:: Text
-> TargetHTTPProxy
-> TargetHTTPProxiesInsert
targetHTTPProxiesInsert pThttppiProject_ pThttppiPayload_ =
TargetHTTPProxiesInsert'
{ _thttppiRequestId = Nothing
, _thttppiProject = pThttppiProject_
, _thttppiPayload = pThttppiPayload_
}
thttppiRequestId :: Lens' TargetHTTPProxiesInsert (Maybe Text)
thttppiRequestId
= lens _thttppiRequestId
(\ s a -> s{_thttppiRequestId = a})
thttppiProject :: Lens' TargetHTTPProxiesInsert Text
thttppiProject
= lens _thttppiProject
(\ s a -> s{_thttppiProject = a})
thttppiPayload :: Lens' TargetHTTPProxiesInsert TargetHTTPProxy
thttppiPayload
= lens _thttppiPayload
(\ s a -> s{_thttppiPayload = a})
instance GoogleRequest TargetHTTPProxiesInsert where
type Rs TargetHTTPProxiesInsert = Operation
type Scopes TargetHTTPProxiesInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient TargetHTTPProxiesInsert'{..}
= go _thttppiProject _thttppiRequestId (Just AltJSON)
_thttppiPayload
computeService
where go
= buildClient
(Proxy :: Proxy TargetHTTPProxiesInsertResource)
mempty