{-# 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.Patch
(
RegionBackendServicesPatchResource
, regionBackendServicesPatch
, RegionBackendServicesPatch
, rbspRequestId
, rbspProject
, rbspPayload
, rbspRegion
, rbspBackendService
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RegionBackendServicesPatchResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"backendServices" :>
Capture "backendService" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BackendService :>
Patch '[JSON] Operation
data RegionBackendServicesPatch = RegionBackendServicesPatch'
{ _rbspRequestId :: !(Maybe Text)
, _rbspProject :: !Text
, _rbspPayload :: !BackendService
, _rbspRegion :: !Text
, _rbspBackendService :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
regionBackendServicesPatch
:: Text
-> BackendService
-> Text
-> Text
-> RegionBackendServicesPatch
regionBackendServicesPatch pRbspProject_ pRbspPayload_ pRbspRegion_ pRbspBackendService_ =
RegionBackendServicesPatch'
{ _rbspRequestId = Nothing
, _rbspProject = pRbspProject_
, _rbspPayload = pRbspPayload_
, _rbspRegion = pRbspRegion_
, _rbspBackendService = pRbspBackendService_
}
rbspRequestId :: Lens' RegionBackendServicesPatch (Maybe Text)
rbspRequestId
= lens _rbspRequestId
(\ s a -> s{_rbspRequestId = a})
rbspProject :: Lens' RegionBackendServicesPatch Text
rbspProject
= lens _rbspProject (\ s a -> s{_rbspProject = a})
rbspPayload :: Lens' RegionBackendServicesPatch BackendService
rbspPayload
= lens _rbspPayload (\ s a -> s{_rbspPayload = a})
rbspRegion :: Lens' RegionBackendServicesPatch Text
rbspRegion
= lens _rbspRegion (\ s a -> s{_rbspRegion = a})
rbspBackendService :: Lens' RegionBackendServicesPatch Text
rbspBackendService
= lens _rbspBackendService
(\ s a -> s{_rbspBackendService = a})
instance GoogleRequest RegionBackendServicesPatch
where
type Rs RegionBackendServicesPatch = Operation
type Scopes RegionBackendServicesPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient RegionBackendServicesPatch'{..}
= go _rbspProject _rbspRegion _rbspBackendService
_rbspRequestId
(Just AltJSON)
_rbspPayload
computeService
where go
= buildClient
(Proxy :: Proxy RegionBackendServicesPatchResource)
mempty