{-# 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.Patch
(
URLMapsPatchResource
, urlMapsPatch
, URLMapsPatch
, umpRequestId
, umpURLMap
, umpProject
, umpPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type URLMapsPatchResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"urlMaps" :>
Capture "urlMap" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] URLMap :> Patch '[JSON] Operation
data URLMapsPatch = URLMapsPatch'
{ _umpRequestId :: !(Maybe Text)
, _umpURLMap :: !Text
, _umpProject :: !Text
, _umpPayload :: !URLMap
} deriving (Eq,Show,Data,Typeable,Generic)
urlMapsPatch
:: Text
-> Text
-> URLMap
-> URLMapsPatch
urlMapsPatch pUmpURLMap_ pUmpProject_ pUmpPayload_ =
URLMapsPatch'
{ _umpRequestId = Nothing
, _umpURLMap = pUmpURLMap_
, _umpProject = pUmpProject_
, _umpPayload = pUmpPayload_
}
umpRequestId :: Lens' URLMapsPatch (Maybe Text)
umpRequestId
= lens _umpRequestId (\ s a -> s{_umpRequestId = a})
umpURLMap :: Lens' URLMapsPatch Text
umpURLMap
= lens _umpURLMap (\ s a -> s{_umpURLMap = a})
umpProject :: Lens' URLMapsPatch Text
umpProject
= lens _umpProject (\ s a -> s{_umpProject = a})
umpPayload :: Lens' URLMapsPatch URLMap
umpPayload
= lens _umpPayload (\ s a -> s{_umpPayload = a})
instance GoogleRequest URLMapsPatch where
type Rs URLMapsPatch = Operation
type Scopes URLMapsPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient URLMapsPatch'{..}
= go _umpProject _umpURLMap _umpRequestId
(Just AltJSON)
_umpPayload
computeService
where go
= buildClient (Proxy :: Proxy URLMapsPatchResource)
mempty