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\RecommendationsAI\Resource;
19
20use Google\Service\RecommendationsAI\GoogleCloudRecommendationengineV1beta1Catalog;
21use Google\Service\RecommendationsAI\GoogleCloudRecommendationengineV1beta1ListCatalogsResponse;
22
23/**
24 * The "catalogs" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $recommendationengineService = new Google\Service\RecommendationsAI(...);
28 *   $catalogs = $recommendationengineService->catalogs;
29 *  </code>
30 */
31class ProjectsLocationsCatalogs extends \Google\Service\Resource
32{
33  /**
34   * Lists all the catalog configurations associated with the project.
35   * (catalogs.listProjectsLocationsCatalogs)
36   *
37   * @param string $parent Required. The account resource name with an associated
38   * location.
39   * @param array $optParams Optional parameters.
40   *
41   * @opt_param int pageSize Optional. Maximum number of results to return. If
42   * unspecified, defaults to 50. Max allowed value is 1000.
43   * @opt_param string pageToken Optional. A page token, received from a previous
44   * `ListCatalogs` call. Provide this to retrieve the subsequent page.
45   * @return GoogleCloudRecommendationengineV1beta1ListCatalogsResponse
46   */
47  public function listProjectsLocationsCatalogs($parent, $optParams = [])
48  {
49    $params = ['parent' => $parent];
50    $params = array_merge($params, $optParams);
51    return $this->call('list', [$params], GoogleCloudRecommendationengineV1beta1ListCatalogsResponse::class);
52  }
53  /**
54   * Updates the catalog configuration. (catalogs.patch)
55   *
56   * @param string $name The fully qualified resource name of the catalog.
57   * @param GoogleCloudRecommendationengineV1beta1Catalog $postBody
58   * @param array $optParams Optional parameters.
59   *
60   * @opt_param string updateMask Optional. Indicates which fields in the provided
61   * 'catalog' to update. If not set, will only update the
62   * catalog_item_level_config field. Currently only fields that can be updated
63   * are catalog_item_level_config.
64   * @return GoogleCloudRecommendationengineV1beta1Catalog
65   */
66  public function patch($name, GoogleCloudRecommendationengineV1beta1Catalog $postBody, $optParams = [])
67  {
68    $params = ['name' => $name, 'postBody' => $postBody];
69    $params = array_merge($params, $optParams);
70    return $this->call('patch', [$params], GoogleCloudRecommendationengineV1beta1Catalog::class);
71  }
72}
73
74// Adding a class alias for backwards compatibility with the previous class name.
75class_alias(ProjectsLocationsCatalogs::class, 'Google_Service_RecommendationsAI_Resource_ProjectsLocationsCatalogs');
76