{-# 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.BackendServices.Update
(
BackendServicesUpdateResource
, backendServicesUpdate
, BackendServicesUpdate
, bsuRequestId
, bsuProject
, bsuPayload
, bsuBackendService
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type BackendServicesUpdateResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"backendServices" :>
Capture "backendService" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BackendService :>
Put '[JSON] Operation
data BackendServicesUpdate = BackendServicesUpdate'
{ _bsuRequestId :: !(Maybe Text)
, _bsuProject :: !Text
, _bsuPayload :: !BackendService
, _bsuBackendService :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
backendServicesUpdate
:: Text
-> BackendService
-> Text
-> BackendServicesUpdate
backendServicesUpdate pBsuProject_ pBsuPayload_ pBsuBackendService_ =
BackendServicesUpdate'
{ _bsuRequestId = Nothing
, _bsuProject = pBsuProject_
, _bsuPayload = pBsuPayload_
, _bsuBackendService = pBsuBackendService_
}
bsuRequestId :: Lens' BackendServicesUpdate (Maybe Text)
bsuRequestId
= lens _bsuRequestId (\ s a -> s{_bsuRequestId = a})
bsuProject :: Lens' BackendServicesUpdate Text
bsuProject
= lens _bsuProject (\ s a -> s{_bsuProject = a})
bsuPayload :: Lens' BackendServicesUpdate BackendService
bsuPayload
= lens _bsuPayload (\ s a -> s{_bsuPayload = a})
bsuBackendService :: Lens' BackendServicesUpdate Text
bsuBackendService
= lens _bsuBackendService
(\ s a -> s{_bsuBackendService = a})
instance GoogleRequest BackendServicesUpdate where
type Rs BackendServicesUpdate = Operation
type Scopes BackendServicesUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient BackendServicesUpdate'{..}
= go _bsuProject _bsuBackendService _bsuRequestId
(Just AltJSON)
_bsuPayload
computeService
where go
= buildClient
(Proxy :: Proxy BackendServicesUpdateResource)
mempty