{-# 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.UpdateSchema
(
IndexingDatasourcesUpdateSchemaResource
, indexingDatasourcesUpdateSchema
, IndexingDatasourcesUpdateSchema
, idusXgafv
, idusUploadProtocol
, idusAccessToken
, idusUploadType
, idusPayload
, idusName
, idusCallback
) where
import Network.Google.CloudSearch.Types
import Network.Google.Prelude
type IndexingDatasourcesUpdateSchemaResource =
"v1" :>
"indexing" :>
Capture "name" Text :>
"schema" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UpdateSchemaRequest :>
Put '[JSON] Operation
data IndexingDatasourcesUpdateSchema = IndexingDatasourcesUpdateSchema'
{ _idusXgafv :: !(Maybe Xgafv)
, _idusUploadProtocol :: !(Maybe Text)
, _idusAccessToken :: !(Maybe Text)
, _idusUploadType :: !(Maybe Text)
, _idusPayload :: !UpdateSchemaRequest
, _idusName :: !Text
, _idusCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
indexingDatasourcesUpdateSchema
:: UpdateSchemaRequest
-> Text
-> IndexingDatasourcesUpdateSchema
indexingDatasourcesUpdateSchema pIdusPayload_ pIdusName_ =
IndexingDatasourcesUpdateSchema'
{ _idusXgafv = Nothing
, _idusUploadProtocol = Nothing
, _idusAccessToken = Nothing
, _idusUploadType = Nothing
, _idusPayload = pIdusPayload_
, _idusName = pIdusName_
, _idusCallback = Nothing
}
idusXgafv :: Lens' IndexingDatasourcesUpdateSchema (Maybe Xgafv)
idusXgafv
= lens _idusXgafv (\ s a -> s{_idusXgafv = a})
idusUploadProtocol :: Lens' IndexingDatasourcesUpdateSchema (Maybe Text)
idusUploadProtocol
= lens _idusUploadProtocol
(\ s a -> s{_idusUploadProtocol = a})
idusAccessToken :: Lens' IndexingDatasourcesUpdateSchema (Maybe Text)
idusAccessToken
= lens _idusAccessToken
(\ s a -> s{_idusAccessToken = a})
idusUploadType :: Lens' IndexingDatasourcesUpdateSchema (Maybe Text)
idusUploadType
= lens _idusUploadType
(\ s a -> s{_idusUploadType = a})
idusPayload :: Lens' IndexingDatasourcesUpdateSchema UpdateSchemaRequest
idusPayload
= lens _idusPayload (\ s a -> s{_idusPayload = a})
idusName :: Lens' IndexingDatasourcesUpdateSchema Text
idusName = lens _idusName (\ s a -> s{_idusName = a})
idusCallback :: Lens' IndexingDatasourcesUpdateSchema (Maybe Text)
idusCallback
= lens _idusCallback (\ s a -> s{_idusCallback = a})
instance GoogleRequest
IndexingDatasourcesUpdateSchema where
type Rs IndexingDatasourcesUpdateSchema = Operation
type Scopes IndexingDatasourcesUpdateSchema =
'["https://www.googleapis.com/auth/cloud_search",
"https://www.googleapis.com/auth/cloud_search.settings",
"https://www.googleapis.com/auth/cloud_search.settings.indexing"]
requestClient IndexingDatasourcesUpdateSchema'{..}
= go _idusName _idusXgafv _idusUploadProtocol
_idusAccessToken
_idusUploadType
_idusCallback
(Just AltJSON)
_idusPayload
cloudSearchService
where go
= buildClient
(Proxy ::
Proxy IndexingDatasourcesUpdateSchemaResource)
mempty