RecommendationsAI.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  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. namespace Google\Service;
  18. use Google\Client;
  19. /**
  20. * Service definition for RecommendationsAI (v1beta1).
  21. *
  22. * <p>
  23. * Note that we now highly recommend new customers to use Retail API, which
  24. * incorporates the GA version of the Recommendations AI funtionalities. To
  25. * enable Retail API, please visit
  26. * https://console.cloud.google.com/apis/library/retail.googleapis.com. The
  27. * Recommendations AI service enables customers to build end-to-end personalized
  28. * recommendation systems without requiring a high level of expertise in machine
  29. * learning, recommendation system, or Google Cloud.</p>
  30. *
  31. * <p>
  32. * For more information about this service, see the API
  33. * <a href="https://cloud.google.com/recommendations-ai/docs" target="_blank">Documentation</a>
  34. * </p>
  35. *
  36. * @author Google, Inc.
  37. */
  38. class RecommendationsAI extends \Google\Service
  39. {
  40. /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
  41. const CLOUD_PLATFORM =
  42. "https://www.googleapis.com/auth/cloud-platform";
  43. public $projects_locations_catalogs;
  44. public $projects_locations_catalogs_catalogItems;
  45. public $projects_locations_catalogs_eventStores_operations;
  46. public $projects_locations_catalogs_eventStores_placements;
  47. public $projects_locations_catalogs_eventStores_predictionApiKeyRegistrations;
  48. public $projects_locations_catalogs_eventStores_userEvents;
  49. public $projects_locations_catalogs_operations;
  50. public $rootUrlTemplate;
  51. /**
  52. * Constructs the internal representation of the RecommendationsAI service.
  53. *
  54. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  55. * config array to pass to a new Client instance.
  56. * @param string $rootUrl The root URL used for requests to the service.
  57. */
  58. public function __construct($clientOrConfig = [], $rootUrl = null)
  59. {
  60. parent::__construct($clientOrConfig);
  61. $this->rootUrl = $rootUrl ?: 'https://recommendationengine.googleapis.com/';
  62. $this->rootUrlTemplate = $rootUrl ?: 'https://recommendationengine.UNIVERSE_DOMAIN/';
  63. $this->servicePath = '';
  64. $this->batchPath = 'batch';
  65. $this->version = 'v1beta1';
  66. $this->serviceName = 'recommendationengine';
  67. $this->projects_locations_catalogs = new RecommendationsAI\Resource\ProjectsLocationsCatalogs(
  68. $this,
  69. $this->serviceName,
  70. 'catalogs',
  71. [
  72. 'methods' => [
  73. 'list' => [
  74. 'path' => 'v1beta1/{+parent}/catalogs',
  75. 'httpMethod' => 'GET',
  76. 'parameters' => [
  77. 'parent' => [
  78. 'location' => 'path',
  79. 'type' => 'string',
  80. 'required' => true,
  81. ],
  82. 'pageSize' => [
  83. 'location' => 'query',
  84. 'type' => 'integer',
  85. ],
  86. 'pageToken' => [
  87. 'location' => 'query',
  88. 'type' => 'string',
  89. ],
  90. ],
  91. ],'patch' => [
  92. 'path' => 'v1beta1/{+name}',
  93. 'httpMethod' => 'PATCH',
  94. 'parameters' => [
  95. 'name' => [
  96. 'location' => 'path',
  97. 'type' => 'string',
  98. 'required' => true,
  99. ],
  100. 'updateMask' => [
  101. 'location' => 'query',
  102. 'type' => 'string',
  103. ],
  104. ],
  105. ],
  106. ]
  107. ]
  108. );
  109. $this->projects_locations_catalogs_catalogItems = new RecommendationsAI\Resource\ProjectsLocationsCatalogsCatalogItems(
  110. $this,
  111. $this->serviceName,
  112. 'catalogItems',
  113. [
  114. 'methods' => [
  115. 'create' => [
  116. 'path' => 'v1beta1/{+parent}/catalogItems',
  117. 'httpMethod' => 'POST',
  118. 'parameters' => [
  119. 'parent' => [
  120. 'location' => 'path',
  121. 'type' => 'string',
  122. 'required' => true,
  123. ],
  124. ],
  125. ],'delete' => [
  126. 'path' => 'v1beta1/{+name}',
  127. 'httpMethod' => 'DELETE',
  128. 'parameters' => [
  129. 'name' => [
  130. 'location' => 'path',
  131. 'type' => 'string',
  132. 'required' => true,
  133. ],
  134. ],
  135. ],'get' => [
  136. 'path' => 'v1beta1/{+name}',
  137. 'httpMethod' => 'GET',
  138. 'parameters' => [
  139. 'name' => [
  140. 'location' => 'path',
  141. 'type' => 'string',
  142. 'required' => true,
  143. ],
  144. ],
  145. ],'import' => [
  146. 'path' => 'v1beta1/{+parent}/catalogItems:import',
  147. 'httpMethod' => 'POST',
  148. 'parameters' => [
  149. 'parent' => [
  150. 'location' => 'path',
  151. 'type' => 'string',
  152. 'required' => true,
  153. ],
  154. ],
  155. ],'list' => [
  156. 'path' => 'v1beta1/{+parent}/catalogItems',
  157. 'httpMethod' => 'GET',
  158. 'parameters' => [
  159. 'parent' => [
  160. 'location' => 'path',
  161. 'type' => 'string',
  162. 'required' => true,
  163. ],
  164. 'filter' => [
  165. 'location' => 'query',
  166. 'type' => 'string',
  167. ],
  168. 'pageSize' => [
  169. 'location' => 'query',
  170. 'type' => 'integer',
  171. ],
  172. 'pageToken' => [
  173. 'location' => 'query',
  174. 'type' => 'string',
  175. ],
  176. ],
  177. ],'patch' => [
  178. 'path' => 'v1beta1/{+name}',
  179. 'httpMethod' => 'PATCH',
  180. 'parameters' => [
  181. 'name' => [
  182. 'location' => 'path',
  183. 'type' => 'string',
  184. 'required' => true,
  185. ],
  186. 'updateMask' => [
  187. 'location' => 'query',
  188. 'type' => 'string',
  189. ],
  190. ],
  191. ],
  192. ]
  193. ]
  194. );
  195. $this->projects_locations_catalogs_eventStores_operations = new RecommendationsAI\Resource\ProjectsLocationsCatalogsEventStoresOperations(
  196. $this,
  197. $this->serviceName,
  198. 'operations',
  199. [
  200. 'methods' => [
  201. 'get' => [
  202. 'path' => 'v1beta1/{+name}',
  203. 'httpMethod' => 'GET',
  204. 'parameters' => [
  205. 'name' => [
  206. 'location' => 'path',
  207. 'type' => 'string',
  208. 'required' => true,
  209. ],
  210. ],
  211. ],'list' => [
  212. 'path' => 'v1beta1/{+name}/operations',
  213. 'httpMethod' => 'GET',
  214. 'parameters' => [
  215. 'name' => [
  216. 'location' => 'path',
  217. 'type' => 'string',
  218. 'required' => true,
  219. ],
  220. 'filter' => [
  221. 'location' => 'query',
  222. 'type' => 'string',
  223. ],
  224. 'pageSize' => [
  225. 'location' => 'query',
  226. 'type' => 'integer',
  227. ],
  228. 'pageToken' => [
  229. 'location' => 'query',
  230. 'type' => 'string',
  231. ],
  232. 'returnPartialSuccess' => [
  233. 'location' => 'query',
  234. 'type' => 'boolean',
  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. 'returnPartialSuccess' => [
  441. 'location' => 'query',
  442. 'type' => 'boolean',
  443. ],
  444. ],
  445. ],
  446. ]
  447. ]
  448. );
  449. }
  450. }
  451. // Adding a class alias for backwards compatibility with the previous class name.
  452. class_alias(RecommendationsAI::class, 'Google_Service_RecommendationsAI');