{-# 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.Validate
(
URLMapsValidateResource
, urlMapsValidate
, URLMapsValidate
, umvURLMap
, umvProject
, umvPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type URLMapsValidateResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"urlMaps" :>
Capture "urlMap" Text :>
"validate" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] URLMapsValidateRequest :>
Post '[JSON] URLMapsValidateResponse
data URLMapsValidate = URLMapsValidate'
{ _umvURLMap :: !Text
, _umvProject :: !Text
, _umvPayload :: !URLMapsValidateRequest
} deriving (Eq,Show,Data,Typeable,Generic)
urlMapsValidate
:: Text
-> Text
-> URLMapsValidateRequest
-> URLMapsValidate
urlMapsValidate pUmvURLMap_ pUmvProject_ pUmvPayload_ =
URLMapsValidate'
{ _umvURLMap = pUmvURLMap_
, _umvProject = pUmvProject_
, _umvPayload = pUmvPayload_
}
umvURLMap :: Lens' URLMapsValidate Text
umvURLMap
= lens _umvURLMap (\ s a -> s{_umvURLMap = a})
umvProject :: Lens' URLMapsValidate Text
umvProject
= lens _umvProject (\ s a -> s{_umvProject = a})
umvPayload :: Lens' URLMapsValidate URLMapsValidateRequest
umvPayload
= lens _umvPayload (\ s a -> s{_umvPayload = a})
instance GoogleRequest URLMapsValidate where
type Rs URLMapsValidate = URLMapsValidateResponse
type Scopes URLMapsValidate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient URLMapsValidate'{..}
= go _umvProject _umvURLMap (Just AltJSON)
_umvPayload
computeService
where go
= buildClient
(Proxy :: Proxy URLMapsValidateResource)
mempty