{-# 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.TargetTCPProxies.SetBackendService
(
TargetTCPProxiesSetBackendServiceResource
, targetTCPProxiesSetBackendService
, TargetTCPProxiesSetBackendService
, ttpsbsRequestId
, ttpsbsProject
, ttpsbsPayload
, ttpsbsTargetTCPProxy
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type TargetTCPProxiesSetBackendServiceResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"targetTcpProxies" :>
Capture "targetTcpProxy" Text :>
"setBackendService" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
TargetTCPProxiesSetBackendServiceRequest
:> Post '[JSON] Operation
data TargetTCPProxiesSetBackendService = TargetTCPProxiesSetBackendService'
{ _ttpsbsRequestId :: !(Maybe Text)
, _ttpsbsProject :: !Text
, _ttpsbsPayload :: !TargetTCPProxiesSetBackendServiceRequest
, _ttpsbsTargetTCPProxy :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
targetTCPProxiesSetBackendService
:: Text
-> TargetTCPProxiesSetBackendServiceRequest
-> Text
-> TargetTCPProxiesSetBackendService
targetTCPProxiesSetBackendService pTtpsbsProject_ pTtpsbsPayload_ pTtpsbsTargetTCPProxy_ =
TargetTCPProxiesSetBackendService'
{ _ttpsbsRequestId = Nothing
, _ttpsbsProject = pTtpsbsProject_
, _ttpsbsPayload = pTtpsbsPayload_
, _ttpsbsTargetTCPProxy = pTtpsbsTargetTCPProxy_
}
ttpsbsRequestId :: Lens' TargetTCPProxiesSetBackendService (Maybe Text)
ttpsbsRequestId
= lens _ttpsbsRequestId
(\ s a -> s{_ttpsbsRequestId = a})
ttpsbsProject :: Lens' TargetTCPProxiesSetBackendService Text
ttpsbsProject
= lens _ttpsbsProject
(\ s a -> s{_ttpsbsProject = a})
ttpsbsPayload :: Lens' TargetTCPProxiesSetBackendService TargetTCPProxiesSetBackendServiceRequest
ttpsbsPayload
= lens _ttpsbsPayload
(\ s a -> s{_ttpsbsPayload = a})
ttpsbsTargetTCPProxy :: Lens' TargetTCPProxiesSetBackendService Text
ttpsbsTargetTCPProxy
= lens _ttpsbsTargetTCPProxy
(\ s a -> s{_ttpsbsTargetTCPProxy = a})
instance GoogleRequest
TargetTCPProxiesSetBackendService where
type Rs TargetTCPProxiesSetBackendService = Operation
type Scopes TargetTCPProxiesSetBackendService =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient TargetTCPProxiesSetBackendService'{..}
= go _ttpsbsProject _ttpsbsTargetTCPProxy
_ttpsbsRequestId
(Just AltJSON)
_ttpsbsPayload
computeService
where go
= buildClient
(Proxy ::
Proxy TargetTCPProxiesSetBackendServiceResource)
mempty