{-# 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.SetURLMap
(
TargetHTTPProxiesSetURLMapResource
, targetHTTPProxiesSetURLMap
, TargetHTTPProxiesSetURLMap
, thttppsumRequestId
, thttppsumProject
, thttppsumPayload
, thttppsumTargetHTTPProxy
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type TargetHTTPProxiesSetURLMapResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"targetHttpProxies" :>
Capture "targetHttpProxy" Text :>
"setUrlMap" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] URLMapReference :>
Post '[JSON] Operation
data TargetHTTPProxiesSetURLMap =
TargetHTTPProxiesSetURLMap'
{ _thttppsumRequestId :: !(Maybe Text)
, _thttppsumProject :: !Text
, _thttppsumPayload :: !URLMapReference
, _thttppsumTargetHTTPProxy :: !Text
}
deriving (Eq, Show, Data, Typeable, Generic)
targetHTTPProxiesSetURLMap
:: Text
-> URLMapReference
-> Text
-> TargetHTTPProxiesSetURLMap
targetHTTPProxiesSetURLMap pThttppsumProject_ pThttppsumPayload_ pThttppsumTargetHTTPProxy_ =
TargetHTTPProxiesSetURLMap'
{ _thttppsumRequestId = Nothing
, _thttppsumProject = pThttppsumProject_
, _thttppsumPayload = pThttppsumPayload_
, _thttppsumTargetHTTPProxy = pThttppsumTargetHTTPProxy_
}
thttppsumRequestId :: Lens' TargetHTTPProxiesSetURLMap (Maybe Text)
thttppsumRequestId
= lens _thttppsumRequestId
(\ s a -> s{_thttppsumRequestId = a})
thttppsumProject :: Lens' TargetHTTPProxiesSetURLMap Text
thttppsumProject
= lens _thttppsumProject
(\ s a -> s{_thttppsumProject = a})
thttppsumPayload :: Lens' TargetHTTPProxiesSetURLMap URLMapReference
thttppsumPayload
= lens _thttppsumPayload
(\ s a -> s{_thttppsumPayload = a})
thttppsumTargetHTTPProxy :: Lens' TargetHTTPProxiesSetURLMap Text
thttppsumTargetHTTPProxy
= lens _thttppsumTargetHTTPProxy
(\ s a -> s{_thttppsumTargetHTTPProxy = a})
instance GoogleRequest TargetHTTPProxiesSetURLMap
where
type Rs TargetHTTPProxiesSetURLMap = Operation
type Scopes TargetHTTPProxiesSetURLMap =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient TargetHTTPProxiesSetURLMap'{..}
= go _thttppsumProject _thttppsumTargetHTTPProxy
_thttppsumRequestId
(Just AltJSON)
_thttppsumPayload
computeService
where go
= buildClient
(Proxy :: Proxy TargetHTTPProxiesSetURLMapResource)
mempty