module Network.Google.Resource.Compute.GlobalForwardingRules.SetTarget
(
GlobalForwardingRulesSetTargetResource
, globalForwardingRulesSetTarget
, GlobalForwardingRulesSetTarget
, gfrstProject
, gfrstForwardingRule
, gfrstPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type GlobalForwardingRulesSetTargetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"forwardingRules" :>
Capture "forwardingRule" Text :>
"setTarget" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TargetReference :>
Post '[JSON] Operation
data GlobalForwardingRulesSetTarget = GlobalForwardingRulesSetTarget'
{ _gfrstProject :: !Text
, _gfrstForwardingRule :: !Text
, _gfrstPayload :: !TargetReference
} deriving (Eq,Show,Data,Typeable,Generic)
globalForwardingRulesSetTarget
:: Text
-> Text
-> TargetReference
-> GlobalForwardingRulesSetTarget
globalForwardingRulesSetTarget pGfrstProject_ pGfrstForwardingRule_ pGfrstPayload_ =
GlobalForwardingRulesSetTarget'
{ _gfrstProject = pGfrstProject_
, _gfrstForwardingRule = pGfrstForwardingRule_
, _gfrstPayload = pGfrstPayload_
}
gfrstProject :: Lens' GlobalForwardingRulesSetTarget Text
gfrstProject
= lens _gfrstProject (\ s a -> s{_gfrstProject = a})
gfrstForwardingRule :: Lens' GlobalForwardingRulesSetTarget Text
gfrstForwardingRule
= lens _gfrstForwardingRule
(\ s a -> s{_gfrstForwardingRule = a})
gfrstPayload :: Lens' GlobalForwardingRulesSetTarget TargetReference
gfrstPayload
= lens _gfrstPayload (\ s a -> s{_gfrstPayload = a})
instance GoogleRequest GlobalForwardingRulesSetTarget
where
type Rs GlobalForwardingRulesSetTarget = Operation
type Scopes GlobalForwardingRulesSetTarget =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient GlobalForwardingRulesSetTarget'{..}
= go _gfrstProject _gfrstForwardingRule
(Just AltJSON)
_gfrstPayload
computeService
where go
= buildClient
(Proxy ::
Proxy GlobalForwardingRulesSetTargetResource)
mempty