{-# 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.RegionBackendServices.Update
(
RegionBackendServicesUpdateResource
, regionBackendServicesUpdate
, RegionBackendServicesUpdate
, rbsuRequestId
, rbsuProject
, rbsuPayload
, rbsuRegion
, rbsuBackendService
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RegionBackendServicesUpdateResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"backendServices" :>
Capture "backendService" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BackendService :>
Put '[JSON] Operation
data RegionBackendServicesUpdate = RegionBackendServicesUpdate'
{ _rbsuRequestId :: !(Maybe Text)
, _rbsuProject :: !Text
, _rbsuPayload :: !BackendService
, _rbsuRegion :: !Text
, _rbsuBackendService :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
regionBackendServicesUpdate
:: Text
-> BackendService
-> Text
-> Text
-> RegionBackendServicesUpdate
regionBackendServicesUpdate pRbsuProject_ pRbsuPayload_ pRbsuRegion_ pRbsuBackendService_ =
RegionBackendServicesUpdate'
{ _rbsuRequestId = Nothing
, _rbsuProject = pRbsuProject_
, _rbsuPayload = pRbsuPayload_
, _rbsuRegion = pRbsuRegion_
, _rbsuBackendService = pRbsuBackendService_
}
rbsuRequestId :: Lens' RegionBackendServicesUpdate (Maybe Text)
rbsuRequestId
= lens _rbsuRequestId
(\ s a -> s{_rbsuRequestId = a})
rbsuProject :: Lens' RegionBackendServicesUpdate Text
rbsuProject
= lens _rbsuProject (\ s a -> s{_rbsuProject = a})
rbsuPayload :: Lens' RegionBackendServicesUpdate BackendService
rbsuPayload
= lens _rbsuPayload (\ s a -> s{_rbsuPayload = a})
rbsuRegion :: Lens' RegionBackendServicesUpdate Text
rbsuRegion
= lens _rbsuRegion (\ s a -> s{_rbsuRegion = a})
rbsuBackendService :: Lens' RegionBackendServicesUpdate Text
rbsuBackendService
= lens _rbsuBackendService
(\ s a -> s{_rbsuBackendService = a})
instance GoogleRequest RegionBackendServicesUpdate
where
type Rs RegionBackendServicesUpdate = Operation
type Scopes RegionBackendServicesUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient RegionBackendServicesUpdate'{..}
= go _rbsuProject _rbsuRegion _rbsuBackendService
_rbsuRequestId
(Just AltJSON)
_rbsuPayload
computeService
where go
= buildClient
(Proxy :: Proxy RegionBackendServicesUpdateResource)
mempty