{-# 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.ForwardingRules.SetTarget
(
ForwardingRulesSetTargetResource
, forwardingRulesSetTarget
, ForwardingRulesSetTarget
, frstRequestId
, frstProject
, frstForwardingRule
, frstPayload
, frstRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type ForwardingRulesSetTargetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"forwardingRules" :>
Capture "forwardingRule" Text :>
"setTarget" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TargetReference :>
Post '[JSON] Operation
data ForwardingRulesSetTarget = ForwardingRulesSetTarget'
{ _frstRequestId :: !(Maybe Text)
, _frstProject :: !Text
, _frstForwardingRule :: !Text
, _frstPayload :: !TargetReference
, _frstRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
forwardingRulesSetTarget
:: Text
-> Text
-> TargetReference
-> Text
-> ForwardingRulesSetTarget
forwardingRulesSetTarget pFrstProject_ pFrstForwardingRule_ pFrstPayload_ pFrstRegion_ =
ForwardingRulesSetTarget'
{ _frstRequestId = Nothing
, _frstProject = pFrstProject_
, _frstForwardingRule = pFrstForwardingRule_
, _frstPayload = pFrstPayload_
, _frstRegion = pFrstRegion_
}
frstRequestId :: Lens' ForwardingRulesSetTarget (Maybe Text)
frstRequestId
= lens _frstRequestId
(\ s a -> s{_frstRequestId = a})
frstProject :: Lens' ForwardingRulesSetTarget Text
frstProject
= lens _frstProject (\ s a -> s{_frstProject = a})
frstForwardingRule :: Lens' ForwardingRulesSetTarget Text
frstForwardingRule
= lens _frstForwardingRule
(\ s a -> s{_frstForwardingRule = a})
frstPayload :: Lens' ForwardingRulesSetTarget TargetReference
frstPayload
= lens _frstPayload (\ s a -> s{_frstPayload = a})
frstRegion :: Lens' ForwardingRulesSetTarget Text
frstRegion
= lens _frstRegion (\ s a -> s{_frstRegion = a})
instance GoogleRequest ForwardingRulesSetTarget where
type Rs ForwardingRulesSetTarget = Operation
type Scopes ForwardingRulesSetTarget =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient ForwardingRulesSetTarget'{..}
= go _frstProject _frstRegion _frstForwardingRule
_frstRequestId
(Just AltJSON)
_frstPayload
computeService
where go
= buildClient
(Proxy :: Proxy ForwardingRulesSetTargetResource)
mempty