1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\CloudSearch\Resource;
19
20use Google\Service\CloudSearch\ListQuerySourcesResponse;
21
22/**
23 * The "sources" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $cloudsearchService = new Google\Service\CloudSearch(...);
27 *   $sources = $cloudsearchService->sources;
28 *  </code>
29 */
30class QuerySources extends \Google\Service\Resource
31{
32  /**
33   * Returns list of sources that user can use for Search and Suggest APIs.
34   * **Note:** This API requires a standard end user account to execute. A service
35   * account can't perform Query API requests directly; to use a service account
36   * to perform queries, set up [Google Workspace domain-wide delegation of
37   * authority](https://developers.google.com/cloud-
38   * search/docs/guides/delegation/). (sources.listQuerySources)
39   *
40   * @param array $optParams Optional parameters.
41   *
42   * @opt_param string pageToken Number of sources to return in the response.
43   * @opt_param bool requestOptions.debugOptions.enableDebugging If you are asked
44   * by Google to help with debugging, set this field. Otherwise, ignore this
45   * field.
46   * @opt_param string requestOptions.languageCode The BCP-47 language code, such
47   * as "en-US" or "sr-Latn". For more information, see
48   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. For
49   * translations. Set this field using the language set in browser or for the
50   * page. In the event that the user's language preference is known, set this
51   * field to the known user language. When specified, the documents in search
52   * results are biased towards the specified language. The suggest API does not
53   * use this parameter. Instead, suggest autocompletes only based on characters
54   * in the query.
55   * @opt_param string requestOptions.searchApplicationId The ID generated when
56   * you create a search application using the [admin
57   * console](https://support.google.com/a/answer/9043922).
58   * @opt_param string requestOptions.timeZone Current user's time zone id, such
59   * as "America/Los_Angeles" or "Australia/Sydney". These IDs are defined by
60   * [Unicode Common Locale Data Repository (CLDR)](http://cldr.unicode.org/)
61   * project, and currently available in the file [timezone.xml](http://unicode.or
62   * g/repos/cldr/trunk/common/bcp47/timezone.xml). This field is used to
63   * correctly interpret date and time queries. If this field is not specified,
64   * the default time zone (UTC) is used.
65   * @return ListQuerySourcesResponse
66   */
67  public function listQuerySources($optParams = [])
68  {
69    $params = [];
70    $params = array_merge($params, $optParams);
71    return $this->call('list', [$params], ListQuerySourcesResponse::class);
72  }
73}
74
75// Adding a class alias for backwards compatibility with the previous class name.
76class_alias(QuerySources::class, 'Google_Service_CloudSearch_Resource_QuerySources');
77