{-# 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.Settings.Datasources.List
(
SettingsDatasourcesListResource
, settingsDatasourcesList
, SettingsDatasourcesList
, sdlXgafv
, sdlUploadProtocol
, sdlAccessToken
, sdlUploadType
, sdlDebugOptionsEnableDebugging
, sdlPageToken
, sdlPageSize
, sdlCallback
) where
import Network.Google.CloudSearch.Types
import Network.Google.Prelude
type SettingsDatasourcesListResource =
"v1" :>
"settings" :>
"datasources" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "debugOptions.enableDebugging" Bool :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListDataSourceResponse
data SettingsDatasourcesList = SettingsDatasourcesList'
{ _sdlXgafv :: !(Maybe Xgafv)
, _sdlUploadProtocol :: !(Maybe Text)
, _sdlAccessToken :: !(Maybe Text)
, _sdlUploadType :: !(Maybe Text)
, _sdlDebugOptionsEnableDebugging :: !(Maybe Bool)
, _sdlPageToken :: !(Maybe Text)
, _sdlPageSize :: !(Maybe (Textual Int32))
, _sdlCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
settingsDatasourcesList
:: SettingsDatasourcesList
settingsDatasourcesList =
SettingsDatasourcesList'
{ _sdlXgafv = Nothing
, _sdlUploadProtocol = Nothing
, _sdlAccessToken = Nothing
, _sdlUploadType = Nothing
, _sdlDebugOptionsEnableDebugging = Nothing
, _sdlPageToken = Nothing
, _sdlPageSize = Nothing
, _sdlCallback = Nothing
}
sdlXgafv :: Lens' SettingsDatasourcesList (Maybe Xgafv)
sdlXgafv = lens _sdlXgafv (\ s a -> s{_sdlXgafv = a})
sdlUploadProtocol :: Lens' SettingsDatasourcesList (Maybe Text)
sdlUploadProtocol
= lens _sdlUploadProtocol
(\ s a -> s{_sdlUploadProtocol = a})
sdlAccessToken :: Lens' SettingsDatasourcesList (Maybe Text)
sdlAccessToken
= lens _sdlAccessToken
(\ s a -> s{_sdlAccessToken = a})
sdlUploadType :: Lens' SettingsDatasourcesList (Maybe Text)
sdlUploadType
= lens _sdlUploadType
(\ s a -> s{_sdlUploadType = a})
sdlDebugOptionsEnableDebugging :: Lens' SettingsDatasourcesList (Maybe Bool)
sdlDebugOptionsEnableDebugging
= lens _sdlDebugOptionsEnableDebugging
(\ s a -> s{_sdlDebugOptionsEnableDebugging = a})
sdlPageToken :: Lens' SettingsDatasourcesList (Maybe Text)
sdlPageToken
= lens _sdlPageToken (\ s a -> s{_sdlPageToken = a})
sdlPageSize :: Lens' SettingsDatasourcesList (Maybe Int32)
sdlPageSize
= lens _sdlPageSize (\ s a -> s{_sdlPageSize = a}) .
mapping _Coerce
sdlCallback :: Lens' SettingsDatasourcesList (Maybe Text)
sdlCallback
= lens _sdlCallback (\ s a -> s{_sdlCallback = a})
instance GoogleRequest SettingsDatasourcesList where
type Rs SettingsDatasourcesList =
ListDataSourceResponse
type Scopes SettingsDatasourcesList =
'["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 SettingsDatasourcesList'{..}
= go _sdlXgafv _sdlUploadProtocol _sdlAccessToken
_sdlUploadType
_sdlDebugOptionsEnableDebugging
_sdlPageToken
_sdlPageSize
_sdlCallback
(Just AltJSON)
cloudSearchService
where go
= buildClient
(Proxy :: Proxy SettingsDatasourcesListResource)
mempty