{-# 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.GetSchema
(
IndexingDatasourcesGetSchemaResource
, indexingDatasourcesGetSchema
, IndexingDatasourcesGetSchema
, idgsXgafv
, idgsUploadProtocol
, idgsAccessToken
, idgsUploadType
, idgsName
, idgsDebugOptionsEnableDebugging
, idgsCallback
) where
import Network.Google.CloudSearch.Types
import Network.Google.Prelude
type IndexingDatasourcesGetSchemaResource =
"v1" :>
"indexing" :>
Capture "name" Text :>
"schema" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "debugOptions.enableDebugging" Bool :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Schema
data IndexingDatasourcesGetSchema = IndexingDatasourcesGetSchema'
{ _idgsXgafv :: !(Maybe Xgafv)
, _idgsUploadProtocol :: !(Maybe Text)
, _idgsAccessToken :: !(Maybe Text)
, _idgsUploadType :: !(Maybe Text)
, _idgsName :: !Text
, _idgsDebugOptionsEnableDebugging :: !(Maybe Bool)
, _idgsCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
indexingDatasourcesGetSchema
:: Text
-> IndexingDatasourcesGetSchema
indexingDatasourcesGetSchema pIdgsName_ =
IndexingDatasourcesGetSchema'
{ _idgsXgafv = Nothing
, _idgsUploadProtocol = Nothing
, _idgsAccessToken = Nothing
, _idgsUploadType = Nothing
, _idgsName = pIdgsName_
, _idgsDebugOptionsEnableDebugging = Nothing
, _idgsCallback = Nothing
}
idgsXgafv :: Lens' IndexingDatasourcesGetSchema (Maybe Xgafv)
idgsXgafv
= lens _idgsXgafv (\ s a -> s{_idgsXgafv = a})
idgsUploadProtocol :: Lens' IndexingDatasourcesGetSchema (Maybe Text)
idgsUploadProtocol
= lens _idgsUploadProtocol
(\ s a -> s{_idgsUploadProtocol = a})
idgsAccessToken :: Lens' IndexingDatasourcesGetSchema (Maybe Text)
idgsAccessToken
= lens _idgsAccessToken
(\ s a -> s{_idgsAccessToken = a})
idgsUploadType :: Lens' IndexingDatasourcesGetSchema (Maybe Text)
idgsUploadType
= lens _idgsUploadType
(\ s a -> s{_idgsUploadType = a})
idgsName :: Lens' IndexingDatasourcesGetSchema Text
idgsName = lens _idgsName (\ s a -> s{_idgsName = a})
idgsDebugOptionsEnableDebugging :: Lens' IndexingDatasourcesGetSchema (Maybe Bool)
idgsDebugOptionsEnableDebugging
= lens _idgsDebugOptionsEnableDebugging
(\ s a -> s{_idgsDebugOptionsEnableDebugging = a})
idgsCallback :: Lens' IndexingDatasourcesGetSchema (Maybe Text)
idgsCallback
= lens _idgsCallback (\ s a -> s{_idgsCallback = a})
instance GoogleRequest IndexingDatasourcesGetSchema
where
type Rs IndexingDatasourcesGetSchema = Schema
type Scopes IndexingDatasourcesGetSchema =
'["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 IndexingDatasourcesGetSchema'{..}
= go _idgsName _idgsXgafv _idgsUploadProtocol
_idgsAccessToken
_idgsUploadType
_idgsDebugOptionsEnableDebugging
_idgsCallback
(Just AltJSON)
cloudSearchService
where go
= buildClient
(Proxy :: Proxy IndexingDatasourcesGetSchemaResource)
mempty