{-# 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.Insert
(
URLMapsInsertResource
, urlMapsInsert
, URLMapsInsert
, umiRequestId
, umiProject
, umiPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type URLMapsInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"urlMaps" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] URLMap :> Post '[JSON] Operation
data URLMapsInsert = URLMapsInsert'
{ _umiRequestId :: !(Maybe Text)
, _umiProject :: !Text
, _umiPayload :: !URLMap
} deriving (Eq,Show,Data,Typeable,Generic)
urlMapsInsert
:: Text
-> URLMap
-> URLMapsInsert
urlMapsInsert pUmiProject_ pUmiPayload_ =
URLMapsInsert'
{ _umiRequestId = Nothing
, _umiProject = pUmiProject_
, _umiPayload = pUmiPayload_
}
umiRequestId :: Lens' URLMapsInsert (Maybe Text)
umiRequestId
= lens _umiRequestId (\ s a -> s{_umiRequestId = a})
umiProject :: Lens' URLMapsInsert Text
umiProject
= lens _umiProject (\ s a -> s{_umiProject = a})
umiPayload :: Lens' URLMapsInsert URLMap
umiPayload
= lens _umiPayload (\ s a -> s{_umiPayload = a})
instance GoogleRequest URLMapsInsert where
type Rs URLMapsInsert = Operation
type Scopes URLMapsInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient URLMapsInsert'{..}
= go _umiProject _umiRequestId (Just AltJSON)
_umiPayload
computeService
where go
= buildClient (Proxy :: Proxy URLMapsInsertResource)
mempty