{-# 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.Insert
(
RegionBackendServicesInsertResource
, regionBackendServicesInsert
, RegionBackendServicesInsert
, rbsiRequestId
, rbsiProject
, rbsiPayload
, rbsiRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RegionBackendServicesInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"backendServices" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BackendService :>
Post '[JSON] Operation
data RegionBackendServicesInsert = RegionBackendServicesInsert'
{ _rbsiRequestId :: !(Maybe Text)
, _rbsiProject :: !Text
, _rbsiPayload :: !BackendService
, _rbsiRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
regionBackendServicesInsert
:: Text
-> BackendService
-> Text
-> RegionBackendServicesInsert
regionBackendServicesInsert pRbsiProject_ pRbsiPayload_ pRbsiRegion_ =
RegionBackendServicesInsert'
{ _rbsiRequestId = Nothing
, _rbsiProject = pRbsiProject_
, _rbsiPayload = pRbsiPayload_
, _rbsiRegion = pRbsiRegion_
}
rbsiRequestId :: Lens' RegionBackendServicesInsert (Maybe Text)
rbsiRequestId
= lens _rbsiRequestId
(\ s a -> s{_rbsiRequestId = a})
rbsiProject :: Lens' RegionBackendServicesInsert Text
rbsiProject
= lens _rbsiProject (\ s a -> s{_rbsiProject = a})
rbsiPayload :: Lens' RegionBackendServicesInsert BackendService
rbsiPayload
= lens _rbsiPayload (\ s a -> s{_rbsiPayload = a})
rbsiRegion :: Lens' RegionBackendServicesInsert Text
rbsiRegion
= lens _rbsiRegion (\ s a -> s{_rbsiRegion = a})
instance GoogleRequest RegionBackendServicesInsert
where
type Rs RegionBackendServicesInsert = Operation
type Scopes RegionBackendServicesInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient RegionBackendServicesInsert'{..}
= go _rbsiProject _rbsiRegion _rbsiRequestId
(Just AltJSON)
_rbsiPayload
computeService
where go
= buildClient
(Proxy :: Proxy RegionBackendServicesInsertResource)
mempty