{-# 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.Poll
(
IndexingDatasourcesItemsPollResource
, indexingDatasourcesItemsPoll
, IndexingDatasourcesItemsPoll
, idipdXgafv
, idipdUploadProtocol
, idipdAccessToken
, idipdUploadType
, idipdPayload
, idipdName
, idipdCallback
) where
import Network.Google.CloudSearch.Types
import Network.Google.Prelude
type IndexingDatasourcesItemsPollResource =
"v1" :>
"indexing" :>
Capture "name" Text :>
"items:poll" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] PollItemsRequest :>
Post '[JSON] PollItemsResponse
data IndexingDatasourcesItemsPoll = IndexingDatasourcesItemsPoll'
{ _idipdXgafv :: !(Maybe Xgafv)
, _idipdUploadProtocol :: !(Maybe Text)
, _idipdAccessToken :: !(Maybe Text)
, _idipdUploadType :: !(Maybe Text)
, _idipdPayload :: !PollItemsRequest
, _idipdName :: !Text
, _idipdCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
indexingDatasourcesItemsPoll
:: PollItemsRequest
-> Text
-> IndexingDatasourcesItemsPoll
indexingDatasourcesItemsPoll pIdipdPayload_ pIdipdName_ =
IndexingDatasourcesItemsPoll'
{ _idipdXgafv = Nothing
, _idipdUploadProtocol = Nothing
, _idipdAccessToken = Nothing
, _idipdUploadType = Nothing
, _idipdPayload = pIdipdPayload_
, _idipdName = pIdipdName_
, _idipdCallback = Nothing
}
idipdXgafv :: Lens' IndexingDatasourcesItemsPoll (Maybe Xgafv)
idipdXgafv
= lens _idipdXgafv (\ s a -> s{_idipdXgafv = a})
idipdUploadProtocol :: Lens' IndexingDatasourcesItemsPoll (Maybe Text)
idipdUploadProtocol
= lens _idipdUploadProtocol
(\ s a -> s{_idipdUploadProtocol = a})
idipdAccessToken :: Lens' IndexingDatasourcesItemsPoll (Maybe Text)
idipdAccessToken
= lens _idipdAccessToken
(\ s a -> s{_idipdAccessToken = a})
idipdUploadType :: Lens' IndexingDatasourcesItemsPoll (Maybe Text)
idipdUploadType
= lens _idipdUploadType
(\ s a -> s{_idipdUploadType = a})
idipdPayload :: Lens' IndexingDatasourcesItemsPoll PollItemsRequest
idipdPayload
= lens _idipdPayload (\ s a -> s{_idipdPayload = a})
idipdName :: Lens' IndexingDatasourcesItemsPoll Text
idipdName
= lens _idipdName (\ s a -> s{_idipdName = a})
idipdCallback :: Lens' IndexingDatasourcesItemsPoll (Maybe Text)
idipdCallback
= lens _idipdCallback
(\ s a -> s{_idipdCallback = a})
instance GoogleRequest IndexingDatasourcesItemsPoll
where
type Rs IndexingDatasourcesItemsPoll =
PollItemsResponse
type Scopes IndexingDatasourcesItemsPoll =
'["https://www.googleapis.com/auth/cloud_search",
"https://www.googleapis.com/auth/cloud_search.indexing"]
requestClient IndexingDatasourcesItemsPoll'{..}
= go _idipdName _idipdXgafv _idipdUploadProtocol
_idipdAccessToken
_idipdUploadType
_idipdCallback
(Just AltJSON)
_idipdPayload
cloudSearchService
where go
= buildClient
(Proxy :: Proxy IndexingDatasourcesItemsPollResource)
mempty