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\DataCatalog\Resource;
19
20use Google\Service\DataCatalog\GoogleCloudDatacatalogV1SearchCatalogRequest;
21use Google\Service\DataCatalog\GoogleCloudDatacatalogV1SearchCatalogResponse;
22
23/**
24 * The "catalog" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $datacatalogService = new Google\Service\DataCatalog(...);
28 *   $catalog = $datacatalogService->catalog;
29 *  </code>
30 */
31class Catalog extends \Google\Service\Resource
32{
33  /**
34   * Searches Data Catalog for multiple resources like entries and tags that match
35   * a query. This is a [Custom Method]
36   * (https://cloud.google.com/apis/design/custom_methods) that doesn't return all
37   * information on a resource, only its ID and high level fields. To get more
38   * information, you can subsequently call specific get methods. Note: Data
39   * Catalog search queries don't guarantee full recall. Results that match your
40   * query might not be returned, even in subsequent result pages. Additionally,
41   * returned (and not returned) results can vary if you repeat search queries.
42   * For more information, see [Data Catalog search syntax]
43   * (https://cloud.google.com/data-catalog/docs/how-to/search-reference).
44   * (catalog.search)
45   *
46   * @param GoogleCloudDatacatalogV1SearchCatalogRequest $postBody
47   * @param array $optParams Optional parameters.
48   * @return GoogleCloudDatacatalogV1SearchCatalogResponse
49   */
50  public function search(GoogleCloudDatacatalogV1SearchCatalogRequest $postBody, $optParams = [])
51  {
52    $params = ['postBody' => $postBody];
53    $params = array_merge($params, $optParams);
54    return $this->call('search', [$params], GoogleCloudDatacatalogV1SearchCatalogResponse::class);
55  }
56}
57
58// Adding a class alias for backwards compatibility with the previous class name.
59class_alias(Catalog::class, 'Google_Service_DataCatalog_Resource_Catalog');
60