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; 19 20use Google\Client; 21 22/** 23 * Service definition for RecommendationsAI (v1beta1). 24 * 25 * <p> 26 * Note that we now highly recommend new customers to use Retail API, which 27 * incorporates the GA version of the Recommendations AI funtionalities. To 28 * enable Retail API, please visit 29 * https://console.cloud.google.com/apis/library/retail.googleapis.com. The 30 * Recommendations AI service enables customers to build end-to-end personalized 31 * recommendation systems without requiring a high level of expertise in machine 32 * learning, recommendation system, or Google Cloud.</p> 33 * 34 * <p> 35 * For more information about this service, see the API 36 * <a href="https://cloud.google.com/recommendations-ai/docs" target="_blank">Documentation</a> 37 * </p> 38 * 39 * @author Google, Inc. 40 */ 41class RecommendationsAI extends \Google\Service 42{ 43 /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */ 44 const CLOUD_PLATFORM = 45 "https://www.googleapis.com/auth/cloud-platform"; 46 47 public $projects_locations_catalogs; 48 public $projects_locations_catalogs_catalogItems; 49 public $projects_locations_catalogs_eventStores_operations; 50 public $projects_locations_catalogs_eventStores_placements; 51 public $projects_locations_catalogs_eventStores_predictionApiKeyRegistrations; 52 public $projects_locations_catalogs_eventStores_userEvents; 53 public $projects_locations_catalogs_operations; 54 55 /** 56 * Constructs the internal representation of the RecommendationsAI service. 57 * 58 * @param Client|array $clientOrConfig The client used to deliver requests, or a 59 * config array to pass to a new Client instance. 60 * @param string $rootUrl The root URL used for requests to the service. 61 */ 62 public function __construct($clientOrConfig = [], $rootUrl = null) 63 { 64 parent::__construct($clientOrConfig); 65 $this->rootUrl = $rootUrl ?: 'https://recommendationengine.googleapis.com/'; 66 $this->servicePath = ''; 67 $this->batchPath = 'batch'; 68 $this->version = 'v1beta1'; 69 $this->serviceName = 'recommendationengine'; 70 71 $this->projects_locations_catalogs = new RecommendationsAI\Resource\ProjectsLocationsCatalogs( 72 $this, 73 $this->serviceName, 74 'catalogs', 75 [ 76 'methods' => [ 77 'list' => [ 78 'path' => 'v1beta1/{+parent}/catalogs', 79 'httpMethod' => 'GET', 80 'parameters' => [ 81 'parent' => [ 82 'location' => 'path', 83 'type' => 'string', 84 'required' => true, 85 ], 86 'pageSize' => [ 87 'location' => 'query', 88 'type' => 'integer', 89 ], 90 'pageToken' => [ 91 'location' => 'query', 92 'type' => 'string', 93 ], 94 ], 95 ],'patch' => [ 96 'path' => 'v1beta1/{+name}', 97 'httpMethod' => 'PATCH', 98 'parameters' => [ 99 'name' => [ 100 'location' => 'path', 101 'type' => 'string', 102 'required' => true, 103 ], 104 'updateMask' => [ 105 'location' => 'query', 106 'type' => 'string', 107 ], 108 ], 109 ], 110 ] 111 ] 112 ); 113 $this->projects_locations_catalogs_catalogItems = new RecommendationsAI\Resource\ProjectsLocationsCatalogsCatalogItems( 114 $this, 115 $this->serviceName, 116 'catalogItems', 117 [ 118 'methods' => [ 119 'create' => [ 120 'path' => 'v1beta1/{+parent}/catalogItems', 121 'httpMethod' => 'POST', 122 'parameters' => [ 123 'parent' => [ 124 'location' => 'path', 125 'type' => 'string', 126 'required' => true, 127 ], 128 ], 129 ],'delete' => [ 130 'path' => 'v1beta1/{+name}', 131 'httpMethod' => 'DELETE', 132 'parameters' => [ 133 'name' => [ 134 'location' => 'path', 135 'type' => 'string', 136 'required' => true, 137 ], 138 ], 139 ],'get' => [ 140 'path' => 'v1beta1/{+name}', 141 'httpMethod' => 'GET', 142 'parameters' => [ 143 'name' => [ 144 'location' => 'path', 145 'type' => 'string', 146 'required' => true, 147 ], 148 ], 149 ],'import' => [ 150 'path' => 'v1beta1/{+parent}/catalogItems:import', 151 'httpMethod' => 'POST', 152 'parameters' => [ 153 'parent' => [ 154 'location' => 'path', 155 'type' => 'string', 156 'required' => true, 157 ], 158 ], 159 ],'list' => [ 160 'path' => 'v1beta1/{+parent}/catalogItems', 161 'httpMethod' => 'GET', 162 'parameters' => [ 163 'parent' => [ 164 'location' => 'path', 165 'type' => 'string', 166 'required' => true, 167 ], 168 'filter' => [ 169 'location' => 'query', 170 'type' => 'string', 171 ], 172 'pageSize' => [ 173 'location' => 'query', 174 'type' => 'integer', 175 ], 176 'pageToken' => [ 177 'location' => 'query', 178 'type' => 'string', 179 ], 180 ], 181 ],'patch' => [ 182 'path' => 'v1beta1/{+name}', 183 'httpMethod' => 'PATCH', 184 'parameters' => [ 185 'name' => [ 186 'location' => 'path', 187 'type' => 'string', 188 'required' => true, 189 ], 190 'updateMask' => [ 191 'location' => 'query', 192 'type' => 'string', 193 ], 194 ], 195 ], 196 ] 197 ] 198 ); 199 $this->projects_locations_catalogs_eventStores_operations = new RecommendationsAI\Resource\ProjectsLocationsCatalogsEventStoresOperations( 200 $this, 201 $this->serviceName, 202 'operations', 203 [ 204 'methods' => [ 205 'get' => [ 206 'path' => 'v1beta1/{+name}', 207 'httpMethod' => 'GET', 208 'parameters' => [ 209 'name' => [ 210 'location' => 'path', 211 'type' => 'string', 212 'required' => true, 213 ], 214 ], 215 ],'list' => [ 216 'path' => 'v1beta1/{+name}/operations', 217 'httpMethod' => 'GET', 218 'parameters' => [ 219 'name' => [ 220 'location' => 'path', 221 'type' => 'string', 222 'required' => true, 223 ], 224 'filter' => [ 225 'location' => 'query', 226 'type' => 'string', 227 ], 228 'pageSize' => [ 229 'location' => 'query', 230 'type' => 'integer', 231 ], 232 'pageToken' => [ 233 'location' => 'query', 234 'type' => 'string', 235 ], 236 ], 237 ], 238 ] 239 ] 240 ); 241 $this->projects_locations_catalogs_eventStores_placements = new RecommendationsAI\Resource\ProjectsLocationsCatalogsEventStoresPlacements( 242 $this, 243 $this->serviceName, 244 'placements', 245 [ 246 'methods' => [ 247 'predict' => [ 248 'path' => 'v1beta1/{+name}:predict', 249 'httpMethod' => 'POST', 250 'parameters' => [ 251 'name' => [ 252 'location' => 'path', 253 'type' => 'string', 254 'required' => true, 255 ], 256 ], 257 ], 258 ] 259 ] 260 ); 261 $this->projects_locations_catalogs_eventStores_predictionApiKeyRegistrations = new RecommendationsAI\Resource\ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrations( 262 $this, 263 $this->serviceName, 264 'predictionApiKeyRegistrations', 265 [ 266 'methods' => [ 267 'create' => [ 268 'path' => 'v1beta1/{+parent}/predictionApiKeyRegistrations', 269 'httpMethod' => 'POST', 270 'parameters' => [ 271 'parent' => [ 272 'location' => 'path', 273 'type' => 'string', 274 'required' => true, 275 ], 276 ], 277 ],'delete' => [ 278 'path' => 'v1beta1/{+name}', 279 'httpMethod' => 'DELETE', 280 'parameters' => [ 281 'name' => [ 282 'location' => 'path', 283 'type' => 'string', 284 'required' => true, 285 ], 286 ], 287 ],'list' => [ 288 'path' => 'v1beta1/{+parent}/predictionApiKeyRegistrations', 289 'httpMethod' => 'GET', 290 'parameters' => [ 291 'parent' => [ 292 'location' => 'path', 293 'type' => 'string', 294 'required' => true, 295 ], 296 'pageSize' => [ 297 'location' => 'query', 298 'type' => 'integer', 299 ], 300 'pageToken' => [ 301 'location' => 'query', 302 'type' => 'string', 303 ], 304 ], 305 ], 306 ] 307 ] 308 ); 309 $this->projects_locations_catalogs_eventStores_userEvents = new RecommendationsAI\Resource\ProjectsLocationsCatalogsEventStoresUserEvents( 310 $this, 311 $this->serviceName, 312 'userEvents', 313 [ 314 'methods' => [ 315 'collect' => [ 316 'path' => 'v1beta1/{+parent}/userEvents:collect', 317 'httpMethod' => 'GET', 318 'parameters' => [ 319 'parent' => [ 320 'location' => 'path', 321 'type' => 'string', 322 'required' => true, 323 ], 324 'ets' => [ 325 'location' => 'query', 326 'type' => 'string', 327 ], 328 'uri' => [ 329 'location' => 'query', 330 'type' => 'string', 331 ], 332 'userEvent' => [ 333 'location' => 'query', 334 'type' => 'string', 335 ], 336 ], 337 ],'import' => [ 338 'path' => 'v1beta1/{+parent}/userEvents:import', 339 'httpMethod' => 'POST', 340 'parameters' => [ 341 'parent' => [ 342 'location' => 'path', 343 'type' => 'string', 344 'required' => true, 345 ], 346 ], 347 ],'list' => [ 348 'path' => 'v1beta1/{+parent}/userEvents', 349 'httpMethod' => 'GET', 350 'parameters' => [ 351 'parent' => [ 352 'location' => 'path', 353 'type' => 'string', 354 'required' => true, 355 ], 356 'filter' => [ 357 'location' => 'query', 358 'type' => 'string', 359 ], 360 'pageSize' => [ 361 'location' => 'query', 362 'type' => 'integer', 363 ], 364 'pageToken' => [ 365 'location' => 'query', 366 'type' => 'string', 367 ], 368 ], 369 ],'purge' => [ 370 'path' => 'v1beta1/{+parent}/userEvents:purge', 371 'httpMethod' => 'POST', 372 'parameters' => [ 373 'parent' => [ 374 'location' => 'path', 375 'type' => 'string', 376 'required' => true, 377 ], 378 ], 379 ],'rejoin' => [ 380 'path' => 'v1beta1/{+parent}/userEvents:rejoin', 381 'httpMethod' => 'POST', 382 'parameters' => [ 383 'parent' => [ 384 'location' => 'path', 385 'type' => 'string', 386 'required' => true, 387 ], 388 ], 389 ],'write' => [ 390 'path' => 'v1beta1/{+parent}/userEvents:write', 391 'httpMethod' => 'POST', 392 'parameters' => [ 393 'parent' => [ 394 'location' => 'path', 395 'type' => 'string', 396 'required' => true, 397 ], 398 ], 399 ], 400 ] 401 ] 402 ); 403 $this->projects_locations_catalogs_operations = new RecommendationsAI\Resource\ProjectsLocationsCatalogsOperations( 404 $this, 405 $this->serviceName, 406 'operations', 407 [ 408 'methods' => [ 409 'get' => [ 410 'path' => 'v1beta1/{+name}', 411 'httpMethod' => 'GET', 412 'parameters' => [ 413 'name' => [ 414 'location' => 'path', 415 'type' => 'string', 416 'required' => true, 417 ], 418 ], 419 ],'list' => [ 420 'path' => 'v1beta1/{+name}/operations', 421 'httpMethod' => 'GET', 422 'parameters' => [ 423 'name' => [ 424 'location' => 'path', 425 'type' => 'string', 426 'required' => true, 427 ], 428 'filter' => [ 429 'location' => 'query', 430 'type' => 'string', 431 ], 432 'pageSize' => [ 433 'location' => 'query', 434 'type' => 'integer', 435 ], 436 'pageToken' => [ 437 'location' => 'query', 438 'type' => 'string', 439 ], 440 ], 441 ], 442 ] 443 ] 444 ); 445 } 446} 447 448// Adding a class alias for backwards compatibility with the previous class name. 449class_alias(RecommendationsAI::class, 'Google_Service_RecommendationsAI'); 450