source: vendor/google/apiclient-services/src/RecommendationsAI/Resource/ProjectsLocationsCatalogsCatalogItems.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload project files

  • Property mode set to 100644
File size: 6.7 KB
Line 
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\GoogleCloudRecommendationengineV1beta1CatalogItem;
21use Google\Service\RecommendationsAI\GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest;
22use Google\Service\RecommendationsAI\GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse;
23use Google\Service\RecommendationsAI\GoogleLongrunningOperation;
24use Google\Service\RecommendationsAI\GoogleProtobufEmpty;
25
26/**
27 * The "catalogItems" collection of methods.
28 * Typical usage is:
29 * <code>
30 * $recommendationengineService = new Google\Service\RecommendationsAI(...);
31 * $catalogItems = $recommendationengineService->projects_locations_catalogs_catalogItems;
32 * </code>
33 */
34class ProjectsLocationsCatalogsCatalogItems extends \Google\Service\Resource
35{
36 /**
37 * Creates a catalog item. (catalogItems.create)
38 *
39 * @param string $parent Required. The parent catalog resource name, such as
40 * `projects/locations/global/catalogs/default_catalog`.
41 * @param GoogleCloudRecommendationengineV1beta1CatalogItem $postBody
42 * @param array $optParams Optional parameters.
43 * @return GoogleCloudRecommendationengineV1beta1CatalogItem
44 * @throws \Google\Service\Exception
45 */
46 public function create($parent, GoogleCloudRecommendationengineV1beta1CatalogItem $postBody, $optParams = [])
47 {
48 $params = ['parent' => $parent, 'postBody' => $postBody];
49 $params = array_merge($params, $optParams);
50 return $this->call('create', [$params], GoogleCloudRecommendationengineV1beta1CatalogItem::class);
51 }
52 /**
53 * Deletes a catalog item. (catalogItems.delete)
54 *
55 * @param string $name Required. Full resource name of catalog item, such as `pr
56 * ojects/locations/global/catalogs/default_catalog/catalogItems/some_catalog_it
57 * em_id`.
58 * @param array $optParams Optional parameters.
59 * @return GoogleProtobufEmpty
60 * @throws \Google\Service\Exception
61 */
62 public function delete($name, $optParams = [])
63 {
64 $params = ['name' => $name];
65 $params = array_merge($params, $optParams);
66 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
67 }
68 /**
69 * Gets a specific catalog item. (catalogItems.get)
70 *
71 * @param string $name Required. Full resource name of catalog item, such as `pr
72 * ojects/locations/global/catalogs/default_catalog/catalogitems/some_catalog_it
73 * em_id`.
74 * @param array $optParams Optional parameters.
75 * @return GoogleCloudRecommendationengineV1beta1CatalogItem
76 * @throws \Google\Service\Exception
77 */
78 public function get($name, $optParams = [])
79 {
80 $params = ['name' => $name];
81 $params = array_merge($params, $optParams);
82 return $this->call('get', [$params], GoogleCloudRecommendationengineV1beta1CatalogItem::class);
83 }
84 /**
85 * Bulk import of multiple catalog items. Request processing may be synchronous.
86 * No partial updating supported. Non-existing items will be created.
87 * Operation.response is of type ImportResponse. Note that it is possible for a
88 * subset of the items to be successfully updated. (catalogItems.import)
89 *
90 * @param string $parent Required.
91 * `projects/1234/locations/global/catalogs/default_catalog` If no updateMask is
92 * specified, requires catalogItems.create permission. If updateMask is
93 * specified, requires catalogItems.update permission.
94 * @param GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest $postBody
95 * @param array $optParams Optional parameters.
96 * @return GoogleLongrunningOperation
97 * @throws \Google\Service\Exception
98 */
99 public function import($parent, GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest $postBody, $optParams = [])
100 {
101 $params = ['parent' => $parent, 'postBody' => $postBody];
102 $params = array_merge($params, $optParams);
103 return $this->call('import', [$params], GoogleLongrunningOperation::class);
104 }
105 /**
106 * Gets a list of catalog items.
107 * (catalogItems.listProjectsLocationsCatalogsCatalogItems)
108 *
109 * @param string $parent Required. The parent catalog resource name, such as
110 * `projects/locations/global/catalogs/default_catalog`.
111 * @param array $optParams Optional parameters.
112 *
113 * @opt_param string filter Optional. Use of this field is not supported by
114 * version v1beta1.
115 * @opt_param int pageSize Optional. Maximum number of results to return per
116 * page. If zero, the service will choose a reasonable default.
117 * @opt_param string pageToken Optional. The previous
118 * ListCatalogItemsResponse.next_page_token.
119 * @return GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse
120 * @throws \Google\Service\Exception
121 */
122 public function listProjectsLocationsCatalogsCatalogItems($parent, $optParams = [])
123 {
124 $params = ['parent' => $parent];
125 $params = array_merge($params, $optParams);
126 return $this->call('list', [$params], GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse::class);
127 }
128 /**
129 * Updates a catalog item. Partial updating is supported. Non-existing items
130 * will be created. (catalogItems.patch)
131 *
132 * @param string $name Required. Full resource name of catalog item, such as `pr
133 * ojects/locations/global/catalogs/default_catalog/catalogItems/some_catalog_it
134 * em_id`.
135 * @param GoogleCloudRecommendationengineV1beta1CatalogItem $postBody
136 * @param array $optParams Optional parameters.
137 *
138 * @opt_param string updateMask Optional. Indicates which fields in the provided
139 * 'item' to update. If not set, will by default update all fields.
140 * @return GoogleCloudRecommendationengineV1beta1CatalogItem
141 * @throws \Google\Service\Exception
142 */
143 public function patch($name, GoogleCloudRecommendationengineV1beta1CatalogItem $postBody, $optParams = [])
144 {
145 $params = ['name' => $name, 'postBody' => $postBody];
146 $params = array_merge($params, $optParams);
147 return $this->call('patch', [$params], GoogleCloudRecommendationengineV1beta1CatalogItem::class);
148 }
149}
150
151// Adding a class alias for backwards compatibility with the previous class name.
152class_alias(ProjectsLocationsCatalogsCatalogItems::class, 'Google_Service_RecommendationsAI_Resource_ProjectsLocationsCatalogsCatalogItems');
Note: See TracBrowser for help on using the repository browser.