{-# 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.Index
(
IndexingDatasourcesItemsIndexResource
, indexingDatasourcesItemsIndex
, IndexingDatasourcesItemsIndex
, idiiXgafv
, idiiUploadProtocol
, idiiAccessToken
, idiiUploadType
, idiiPayload
, idiiName
, idiiCallback
) where
import Network.Google.CloudSearch.Types
import Network.Google.Prelude
type IndexingDatasourcesItemsIndexResource =
"v1" :>
"indexing" :>
CaptureMode "name" "index" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] IndexItemRequest :>
Post '[JSON] Operation
data IndexingDatasourcesItemsIndex = IndexingDatasourcesItemsIndex'
{ _idiiXgafv :: !(Maybe Xgafv)
, _idiiUploadProtocol :: !(Maybe Text)
, _idiiAccessToken :: !(Maybe Text)
, _idiiUploadType :: !(Maybe Text)
, _idiiPayload :: !IndexItemRequest
, _idiiName :: !Text
, _idiiCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
indexingDatasourcesItemsIndex
:: IndexItemRequest
-> Text
-> IndexingDatasourcesItemsIndex
indexingDatasourcesItemsIndex pIdiiPayload_ pIdiiName_ =
IndexingDatasourcesItemsIndex'
{ _idiiXgafv = Nothing
, _idiiUploadProtocol = Nothing
, _idiiAccessToken = Nothing
, _idiiUploadType = Nothing
, _idiiPayload = pIdiiPayload_
, _idiiName = pIdiiName_
, _idiiCallback = Nothing
}
idiiXgafv :: Lens' IndexingDatasourcesItemsIndex (Maybe Xgafv)
idiiXgafv
= lens _idiiXgafv (\ s a -> s{_idiiXgafv = a})
idiiUploadProtocol :: Lens' IndexingDatasourcesItemsIndex (Maybe Text)
idiiUploadProtocol
= lens _idiiUploadProtocol
(\ s a -> s{_idiiUploadProtocol = a})
idiiAccessToken :: Lens' IndexingDatasourcesItemsIndex (Maybe Text)
idiiAccessToken
= lens _idiiAccessToken
(\ s a -> s{_idiiAccessToken = a})
idiiUploadType :: Lens' IndexingDatasourcesItemsIndex (Maybe Text)
idiiUploadType
= lens _idiiUploadType
(\ s a -> s{_idiiUploadType = a})
idiiPayload :: Lens' IndexingDatasourcesItemsIndex IndexItemRequest
idiiPayload
= lens _idiiPayload (\ s a -> s{_idiiPayload = a})
idiiName :: Lens' IndexingDatasourcesItemsIndex Text
idiiName = lens _idiiName (\ s a -> s{_idiiName = a})
idiiCallback :: Lens' IndexingDatasourcesItemsIndex (Maybe Text)
idiiCallback
= lens _idiiCallback (\ s a -> s{_idiiCallback = a})
instance GoogleRequest IndexingDatasourcesItemsIndex
where
type Rs IndexingDatasourcesItemsIndex = Operation
type Scopes IndexingDatasourcesItemsIndex =
'["https://www.googleapis.com/auth/cloud_search",
"https://www.googleapis.com/auth/cloud_search.indexing"]
requestClient IndexingDatasourcesItemsIndex'{..}
= go _idiiName _idiiXgafv _idiiUploadProtocol
_idiiAccessToken
_idiiUploadType
_idiiCallback
(Just AltJSON)
_idiiPayload
cloudSearchService
where go
= buildClient
(Proxy ::
Proxy IndexingDatasourcesItemsIndexResource)
mempty