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 |
|
---|
18 | namespace Google\Service\RecommendationsAI\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\RecommendationsAI\GoogleCloudRecommendationengineV1beta1Catalog;
|
---|
21 | use 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->projects_locations_catalogs;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class 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 | * @throws \Google\Service\Exception
|
---|
47 | */
|
---|
48 | public function listProjectsLocationsCatalogs($parent, $optParams = [])
|
---|
49 | {
|
---|
50 | $params = ['parent' => $parent];
|
---|
51 | $params = array_merge($params, $optParams);
|
---|
52 | return $this->call('list', [$params], GoogleCloudRecommendationengineV1beta1ListCatalogsResponse::class);
|
---|
53 | }
|
---|
54 | /**
|
---|
55 | * Updates the catalog configuration. (catalogs.patch)
|
---|
56 | *
|
---|
57 | * @param string $name The fully qualified resource name of the catalog.
|
---|
58 | * @param GoogleCloudRecommendationengineV1beta1Catalog $postBody
|
---|
59 | * @param array $optParams Optional parameters.
|
---|
60 | *
|
---|
61 | * @opt_param string updateMask Optional. Indicates which fields in the provided
|
---|
62 | * 'catalog' to update. If not set, will only update the
|
---|
63 | * catalog_item_level_config field. Currently only fields that can be updated
|
---|
64 | * are catalog_item_level_config.
|
---|
65 | * @return GoogleCloudRecommendationengineV1beta1Catalog
|
---|
66 | * @throws \Google\Service\Exception
|
---|
67 | */
|
---|
68 | public function patch($name, GoogleCloudRecommendationengineV1beta1Catalog $postBody, $optParams = [])
|
---|
69 | {
|
---|
70 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
71 | $params = array_merge($params, $optParams);
|
---|
72 | return $this->call('patch', [$params], GoogleCloudRecommendationengineV1beta1Catalog::class);
|
---|
73 | }
|
---|
74 | }
|
---|
75 |
|
---|
76 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
77 | class_alias(ProjectsLocationsCatalogs::class, 'Google_Service_RecommendationsAI_Resource_ProjectsLocationsCatalogs');
|
---|