{-# 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.Routers.Update
(
RoutersUpdateResource
, routersUpdate
, RoutersUpdate
, ruRequestId
, ruProject
, ruRouter
, ruPayload
, ruRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RoutersUpdateResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"routers" :>
Capture "router" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Router :> Put '[JSON] Operation
data RoutersUpdate = RoutersUpdate'
{ _ruRequestId :: !(Maybe Text)
, _ruProject :: !Text
, _ruRouter :: !Text
, _ruPayload :: !Router
, _ruRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
routersUpdate
:: Text
-> Text
-> Router
-> Text
-> RoutersUpdate
routersUpdate pRuProject_ pRuRouter_ pRuPayload_ pRuRegion_ =
RoutersUpdate'
{ _ruRequestId = Nothing
, _ruProject = pRuProject_
, _ruRouter = pRuRouter_
, _ruPayload = pRuPayload_
, _ruRegion = pRuRegion_
}
ruRequestId :: Lens' RoutersUpdate (Maybe Text)
ruRequestId
= lens _ruRequestId (\ s a -> s{_ruRequestId = a})
ruProject :: Lens' RoutersUpdate Text
ruProject
= lens _ruProject (\ s a -> s{_ruProject = a})
ruRouter :: Lens' RoutersUpdate Text
ruRouter = lens _ruRouter (\ s a -> s{_ruRouter = a})
ruPayload :: Lens' RoutersUpdate Router
ruPayload
= lens _ruPayload (\ s a -> s{_ruPayload = a})
ruRegion :: Lens' RoutersUpdate Text
ruRegion = lens _ruRegion (\ s a -> s{_ruRegion = a})
instance GoogleRequest RoutersUpdate where
type Rs RoutersUpdate = Operation
type Scopes RoutersUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient RoutersUpdate'{..}
= go _ruProject _ruRegion _ruRouter _ruRequestId
(Just AltJSON)
_ruPayload
computeService
where go
= buildClient (Proxy :: Proxy RoutersUpdateResource)
mempty