{-# 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.URLMaps.Update
(
URLMapsUpdateResource
, urlMapsUpdate
, URLMapsUpdate
, umuRequestId
, umuURLMap
, umuProject
, umuPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type URLMapsUpdateResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"urlMaps" :>
Capture "urlMap" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] URLMap :> Put '[JSON] Operation
data URLMapsUpdate = URLMapsUpdate'
{ _umuRequestId :: !(Maybe Text)
, _umuURLMap :: !Text
, _umuProject :: !Text
, _umuPayload :: !URLMap
} deriving (Eq,Show,Data,Typeable,Generic)
urlMapsUpdate
:: Text
-> Text
-> URLMap
-> URLMapsUpdate
urlMapsUpdate pUmuURLMap_ pUmuProject_ pUmuPayload_ =
URLMapsUpdate'
{ _umuRequestId = Nothing
, _umuURLMap = pUmuURLMap_
, _umuProject = pUmuProject_
, _umuPayload = pUmuPayload_
}
umuRequestId :: Lens' URLMapsUpdate (Maybe Text)
umuRequestId
= lens _umuRequestId (\ s a -> s{_umuRequestId = a})
umuURLMap :: Lens' URLMapsUpdate Text
umuURLMap
= lens _umuURLMap (\ s a -> s{_umuURLMap = a})
umuProject :: Lens' URLMapsUpdate Text
umuProject
= lens _umuProject (\ s a -> s{_umuProject = a})
umuPayload :: Lens' URLMapsUpdate URLMap
umuPayload
= lens _umuPayload (\ s a -> s{_umuPayload = a})
instance GoogleRequest URLMapsUpdate where
type Rs URLMapsUpdate = Operation
type Scopes URLMapsUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient URLMapsUpdate'{..}
= go _umuProject _umuURLMap _umuRequestId
(Just AltJSON)
_umuPayload
computeService
where go
= buildClient (Proxy :: Proxy URLMapsUpdateResource)
mempty