source: vendor/google/apiclient-services/src/CloudRetail/Resource/ProjectsLocationsCatalogsModels.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: 7.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\CloudRetail\Resource;
19
20use Google\Service\CloudRetail\GoogleCloudRetailV2ListModelsResponse;
21use Google\Service\CloudRetail\GoogleCloudRetailV2Model;
22use Google\Service\CloudRetail\GoogleCloudRetailV2PauseModelRequest;
23use Google\Service\CloudRetail\GoogleCloudRetailV2ResumeModelRequest;
24use Google\Service\CloudRetail\GoogleCloudRetailV2TuneModelRequest;
25use Google\Service\CloudRetail\GoogleLongrunningOperation;
26use Google\Service\CloudRetail\GoogleProtobufEmpty;
27
28/**
29 * The "models" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $retailService = new Google\Service\CloudRetail(...);
33 * $models = $retailService->projects_locations_catalogs_models;
34 * </code>
35 */
36class ProjectsLocationsCatalogsModels extends \Google\Service\Resource
37{
38 /**
39 * Creates a new model. (models.create)
40 *
41 * @param string $parent Required. The parent resource under which to create the
42 * model. Format:
43 * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
44 * @param GoogleCloudRetailV2Model $postBody
45 * @param array $optParams Optional parameters.
46 *
47 * @opt_param bool dryRun Optional. Whether to run a dry run to validate the
48 * request (without actually creating the model).
49 * @return GoogleLongrunningOperation
50 * @throws \Google\Service\Exception
51 */
52 public function create($parent, GoogleCloudRetailV2Model $postBody, $optParams = [])
53 {
54 $params = ['parent' => $parent, 'postBody' => $postBody];
55 $params = array_merge($params, $optParams);
56 return $this->call('create', [$params], GoogleLongrunningOperation::class);
57 }
58 /**
59 * Deletes an existing model. (models.delete)
60 *
61 * @param string $name Required. The resource name of the Model to delete.
62 * Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_
63 * id}/models/{model_id}`
64 * @param array $optParams Optional parameters.
65 * @return GoogleProtobufEmpty
66 * @throws \Google\Service\Exception
67 */
68 public function delete($name, $optParams = [])
69 {
70 $params = ['name' => $name];
71 $params = array_merge($params, $optParams);
72 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
73 }
74 /**
75 * Gets a model. (models.get)
76 *
77 * @param string $name Required. The resource name of the Model to get. Format:
78 * `projects/{project_number}/locations/{location_id}/catalogs/{catalog}/models/
79 * {model_id}`
80 * @param array $optParams Optional parameters.
81 * @return GoogleCloudRetailV2Model
82 * @throws \Google\Service\Exception
83 */
84 public function get($name, $optParams = [])
85 {
86 $params = ['name' => $name];
87 $params = array_merge($params, $optParams);
88 return $this->call('get', [$params], GoogleCloudRetailV2Model::class);
89 }
90 /**
91 * Lists all the models linked to this event store.
92 * (models.listProjectsLocationsCatalogsModels)
93 *
94 * @param string $parent Required. The parent for which to list models. Format:
95 * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
96 * @param array $optParams Optional parameters.
97 *
98 * @opt_param int pageSize Optional. Maximum number of results to return. If
99 * unspecified, defaults to 50. Max allowed value is 1000.
100 * @opt_param string pageToken Optional. A page token, received from a previous
101 * `ListModels` call. Provide this to retrieve the subsequent page.
102 * @return GoogleCloudRetailV2ListModelsResponse
103 * @throws \Google\Service\Exception
104 */
105 public function listProjectsLocationsCatalogsModels($parent, $optParams = [])
106 {
107 $params = ['parent' => $parent];
108 $params = array_merge($params, $optParams);
109 return $this->call('list', [$params], GoogleCloudRetailV2ListModelsResponse::class);
110 }
111 /**
112 * Update of model metadata. Only fields that currently can be updated are:
113 * `filtering_option` and `periodic_tuning_state`. If other values are provided,
114 * this API method ignores them. (models.patch)
115 *
116 * @param string $name Required. The fully qualified resource name of the model.
117 * Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_
118 * id}/models/{model_id}` catalog_id has char limit of 50.
119 * recommendation_model_id has char limit of 40.
120 * @param GoogleCloudRetailV2Model $postBody
121 * @param array $optParams Optional parameters.
122 *
123 * @opt_param string updateMask Optional. Indicates which fields in the provided
124 * 'model' to update. If not set, by default updates all fields.
125 * @return GoogleCloudRetailV2Model
126 * @throws \Google\Service\Exception
127 */
128 public function patch($name, GoogleCloudRetailV2Model $postBody, $optParams = [])
129 {
130 $params = ['name' => $name, 'postBody' => $postBody];
131 $params = array_merge($params, $optParams);
132 return $this->call('patch', [$params], GoogleCloudRetailV2Model::class);
133 }
134 /**
135 * Pauses the training of an existing model. (models.pause)
136 *
137 * @param string $name Required. The name of the model to pause. Format: `projec
138 * ts/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{mod
139 * el_id}`
140 * @param GoogleCloudRetailV2PauseModelRequest $postBody
141 * @param array $optParams Optional parameters.
142 * @return GoogleCloudRetailV2Model
143 * @throws \Google\Service\Exception
144 */
145 public function pause($name, GoogleCloudRetailV2PauseModelRequest $postBody, $optParams = [])
146 {
147 $params = ['name' => $name, 'postBody' => $postBody];
148 $params = array_merge($params, $optParams);
149 return $this->call('pause', [$params], GoogleCloudRetailV2Model::class);
150 }
151 /**
152 * Resumes the training of an existing model. (models.resume)
153 *
154 * @param string $name Required. The name of the model to resume. Format: `proje
155 * cts/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{mo
156 * del_id}`
157 * @param GoogleCloudRetailV2ResumeModelRequest $postBody
158 * @param array $optParams Optional parameters.
159 * @return GoogleCloudRetailV2Model
160 * @throws \Google\Service\Exception
161 */
162 public function resume($name, GoogleCloudRetailV2ResumeModelRequest $postBody, $optParams = [])
163 {
164 $params = ['name' => $name, 'postBody' => $postBody];
165 $params = array_merge($params, $optParams);
166 return $this->call('resume', [$params], GoogleCloudRetailV2Model::class);
167 }
168 /**
169 * Tunes an existing model. (models.tune)
170 *
171 * @param string $name Required. The resource name of the model to tune. Format:
172 * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/mode
173 * ls/{model_id}`
174 * @param GoogleCloudRetailV2TuneModelRequest $postBody
175 * @param array $optParams Optional parameters.
176 * @return GoogleLongrunningOperation
177 * @throws \Google\Service\Exception
178 */
179 public function tune($name, GoogleCloudRetailV2TuneModelRequest $postBody, $optParams = [])
180 {
181 $params = ['name' => $name, 'postBody' => $postBody];
182 $params = array_merge($params, $optParams);
183 return $this->call('tune', [$params], GoogleLongrunningOperation::class);
184 }
185}
186
187// Adding a class alias for backwards compatibility with the previous class name.
188class_alias(ProjectsLocationsCatalogsModels::class, 'Google_Service_CloudRetail_Resource_ProjectsLocationsCatalogsModels');
Note: See TracBrowser for help on using the repository browser.