{-# 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.InvalidateCache
(
URLMapsInvalidateCacheResource
, urlMapsInvalidateCache
, URLMapsInvalidateCache
, umicRequestId
, umicURLMap
, umicProject
, umicPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type URLMapsInvalidateCacheResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"urlMaps" :>
Capture "urlMap" Text :>
"invalidateCache" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CacheInvalidationRule :>
Post '[JSON] Operation
data URLMapsInvalidateCache = URLMapsInvalidateCache'
{ _umicRequestId :: !(Maybe Text)
, _umicURLMap :: !Text
, _umicProject :: !Text
, _umicPayload :: !CacheInvalidationRule
} deriving (Eq,Show,Data,Typeable,Generic)
urlMapsInvalidateCache
:: Text
-> Text
-> CacheInvalidationRule
-> URLMapsInvalidateCache
urlMapsInvalidateCache pUmicURLMap_ pUmicProject_ pUmicPayload_ =
URLMapsInvalidateCache'
{ _umicRequestId = Nothing
, _umicURLMap = pUmicURLMap_
, _umicProject = pUmicProject_
, _umicPayload = pUmicPayload_
}
umicRequestId :: Lens' URLMapsInvalidateCache (Maybe Text)
umicRequestId
= lens _umicRequestId
(\ s a -> s{_umicRequestId = a})
umicURLMap :: Lens' URLMapsInvalidateCache Text
umicURLMap
= lens _umicURLMap (\ s a -> s{_umicURLMap = a})
umicProject :: Lens' URLMapsInvalidateCache Text
umicProject
= lens _umicProject (\ s a -> s{_umicProject = a})
umicPayload :: Lens' URLMapsInvalidateCache CacheInvalidationRule
umicPayload
= lens _umicPayload (\ s a -> s{_umicPayload = a})
instance GoogleRequest URLMapsInvalidateCache where
type Rs URLMapsInvalidateCache = Operation
type Scopes URLMapsInvalidateCache =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient URLMapsInvalidateCache'{..}
= go _umicProject _umicURLMap _umicRequestId
(Just AltJSON)
_umicPayload
computeService
where go
= buildClient
(Proxy :: Proxy URLMapsInvalidateCacheResource)
mempty