{-# 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.CloudSearch.Indexing.Datasources.Items.Unreserve
(
IndexingDatasourcesItemsUnreserveResource
, indexingDatasourcesItemsUnreserve
, IndexingDatasourcesItemsUnreserve
, idiuXgafv
, idiuUploadProtocol
, idiuAccessToken
, idiuUploadType
, idiuPayload
, idiuName
, idiuCallback
) where
import Network.Google.CloudSearch.Types
import Network.Google.Prelude
type IndexingDatasourcesItemsUnreserveResource =
"v1" :>
"indexing" :>
Capture "name" Text :>
"items:unreserve" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UnreserveItemsRequest :>
Post '[JSON] Operation
data IndexingDatasourcesItemsUnreserve = IndexingDatasourcesItemsUnreserve'
{ _idiuXgafv :: !(Maybe Xgafv)
, _idiuUploadProtocol :: !(Maybe Text)
, _idiuAccessToken :: !(Maybe Text)
, _idiuUploadType :: !(Maybe Text)
, _idiuPayload :: !UnreserveItemsRequest
, _idiuName :: !Text
, _idiuCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
indexingDatasourcesItemsUnreserve
:: UnreserveItemsRequest
-> Text
-> IndexingDatasourcesItemsUnreserve
indexingDatasourcesItemsUnreserve pIdiuPayload_ pIdiuName_ =
IndexingDatasourcesItemsUnreserve'
{ _idiuXgafv = Nothing
, _idiuUploadProtocol = Nothing
, _idiuAccessToken = Nothing
, _idiuUploadType = Nothing
, _idiuPayload = pIdiuPayload_
, _idiuName = pIdiuName_
, _idiuCallback = Nothing
}
idiuXgafv :: Lens' IndexingDatasourcesItemsUnreserve (Maybe Xgafv)
idiuXgafv
= lens _idiuXgafv (\ s a -> s{_idiuXgafv = a})
idiuUploadProtocol :: Lens' IndexingDatasourcesItemsUnreserve (Maybe Text)
idiuUploadProtocol
= lens _idiuUploadProtocol
(\ s a -> s{_idiuUploadProtocol = a})
idiuAccessToken :: Lens' IndexingDatasourcesItemsUnreserve (Maybe Text)
idiuAccessToken
= lens _idiuAccessToken
(\ s a -> s{_idiuAccessToken = a})
idiuUploadType :: Lens' IndexingDatasourcesItemsUnreserve (Maybe Text)
idiuUploadType
= lens _idiuUploadType
(\ s a -> s{_idiuUploadType = a})
idiuPayload :: Lens' IndexingDatasourcesItemsUnreserve UnreserveItemsRequest
idiuPayload
= lens _idiuPayload (\ s a -> s{_idiuPayload = a})
idiuName :: Lens' IndexingDatasourcesItemsUnreserve Text
idiuName = lens _idiuName (\ s a -> s{_idiuName = a})
idiuCallback :: Lens' IndexingDatasourcesItemsUnreserve (Maybe Text)
idiuCallback
= lens _idiuCallback (\ s a -> s{_idiuCallback = a})
instance GoogleRequest
IndexingDatasourcesItemsUnreserve where
type Rs IndexingDatasourcesItemsUnreserve = Operation
type Scopes IndexingDatasourcesItemsUnreserve =
'["https://www.googleapis.com/auth/cloud_search",
"https://www.googleapis.com/auth/cloud_search.indexing"]
requestClient IndexingDatasourcesItemsUnreserve'{..}
= go _idiuName _idiuXgafv _idiuUploadProtocol
_idiuAccessToken
_idiuUploadType
_idiuCallback
(Just AltJSON)
_idiuPayload
cloudSearchService
where go
= buildClient
(Proxy ::
Proxy IndexingDatasourcesItemsUnreserveResource)
mempty