source: vendor/google/apiclient-services/src/Vision.php

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

Upload project files

  • Property mode set to 100644
File size: 19.3 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;
19
20use Google\Client;
21
22/**
23 * Service definition for Vision (v1).
24 *
25 * <p>
26 * Integrates Google Vision features, including image labeling, face, logo, and
27 * landmark detection, optical character recognition (OCR), and detection of
28 * explicit content, into applications.</p>
29 *
30 * <p>
31 * For more information about this service, see the API
32 * <a href="https://cloud.google.com/vision/" target="_blank">Documentation</a>
33 * </p>
34 *
35 * @author Google, Inc.
36 */
37class Vision extends \Google\Service
38{
39 /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
40 const CLOUD_PLATFORM =
41 "https://www.googleapis.com/auth/cloud-platform";
42 /** Apply machine learning models to understand and label images. */
43 const CLOUD_VISION =
44 "https://www.googleapis.com/auth/cloud-vision";
45
46 public $files;
47 public $images;
48 public $locations_operations;
49 public $operations;
50 public $projects_files;
51 public $projects_images;
52 public $projects_locations_files;
53 public $projects_locations_images;
54 public $projects_locations_operations;
55 public $projects_locations_productSets;
56 public $projects_locations_productSets_products;
57 public $projects_locations_products;
58 public $projects_locations_products_referenceImages;
59 public $projects_operations;
60 public $rootUrlTemplate;
61
62 /**
63 * Constructs the internal representation of the Vision service.
64 *
65 * @param Client|array $clientOrConfig The client used to deliver requests, or a
66 * config array to pass to a new Client instance.
67 * @param string $rootUrl The root URL used for requests to the service.
68 */
69 public function __construct($clientOrConfig = [], $rootUrl = null)
70 {
71 parent::__construct($clientOrConfig);
72 $this->rootUrl = $rootUrl ?: 'https://vision.googleapis.com/';
73 $this->rootUrlTemplate = $rootUrl ?: 'https://vision.UNIVERSE_DOMAIN/';
74 $this->servicePath = '';
75 $this->batchPath = 'batch';
76 $this->version = 'v1';
77 $this->serviceName = 'vision';
78
79 $this->files = new Vision\Resource\Files(
80 $this,
81 $this->serviceName,
82 'files',
83 [
84 'methods' => [
85 'annotate' => [
86 'path' => 'v1/files:annotate',
87 'httpMethod' => 'POST',
88 'parameters' => [],
89 ],'asyncBatchAnnotate' => [
90 'path' => 'v1/files:asyncBatchAnnotate',
91 'httpMethod' => 'POST',
92 'parameters' => [],
93 ],
94 ]
95 ]
96 );
97 $this->images = new Vision\Resource\Images(
98 $this,
99 $this->serviceName,
100 'images',
101 [
102 'methods' => [
103 'annotate' => [
104 'path' => 'v1/images:annotate',
105 'httpMethod' => 'POST',
106 'parameters' => [],
107 ],'asyncBatchAnnotate' => [
108 'path' => 'v1/images:asyncBatchAnnotate',
109 'httpMethod' => 'POST',
110 'parameters' => [],
111 ],
112 ]
113 ]
114 );
115 $this->locations_operations = new Vision\Resource\LocationsOperations(
116 $this,
117 $this->serviceName,
118 'operations',
119 [
120 'methods' => [
121 'get' => [
122 'path' => 'v1/{+name}',
123 'httpMethod' => 'GET',
124 'parameters' => [
125 'name' => [
126 'location' => 'path',
127 'type' => 'string',
128 'required' => true,
129 ],
130 ],
131 ],
132 ]
133 ]
134 );
135 $this->operations = new Vision\Resource\Operations(
136 $this,
137 $this->serviceName,
138 'operations',
139 [
140 'methods' => [
141 'cancel' => [
142 'path' => 'v1/{+name}:cancel',
143 'httpMethod' => 'POST',
144 'parameters' => [
145 'name' => [
146 'location' => 'path',
147 'type' => 'string',
148 'required' => true,
149 ],
150 ],
151 ],'delete' => [
152 'path' => 'v1/{+name}',
153 'httpMethod' => 'DELETE',
154 'parameters' => [
155 'name' => [
156 'location' => 'path',
157 'type' => 'string',
158 'required' => true,
159 ],
160 ],
161 ],'get' => [
162 'path' => 'v1/{+name}',
163 'httpMethod' => 'GET',
164 'parameters' => [
165 'name' => [
166 'location' => 'path',
167 'type' => 'string',
168 'required' => true,
169 ],
170 ],
171 ],'list' => [
172 'path' => 'v1/{+name}',
173 'httpMethod' => 'GET',
174 'parameters' => [
175 'name' => [
176 'location' => 'path',
177 'type' => 'string',
178 'required' => true,
179 ],
180 'filter' => [
181 'location' => 'query',
182 'type' => 'string',
183 ],
184 'pageSize' => [
185 'location' => 'query',
186 'type' => 'integer',
187 ],
188 'pageToken' => [
189 'location' => 'query',
190 'type' => 'string',
191 ],
192 ],
193 ],
194 ]
195 ]
196 );
197 $this->projects_files = new Vision\Resource\ProjectsFiles(
198 $this,
199 $this->serviceName,
200 'files',
201 [
202 'methods' => [
203 'annotate' => [
204 'path' => 'v1/{+parent}/files:annotate',
205 'httpMethod' => 'POST',
206 'parameters' => [
207 'parent' => [
208 'location' => 'path',
209 'type' => 'string',
210 'required' => true,
211 ],
212 ],
213 ],'asyncBatchAnnotate' => [
214 'path' => 'v1/{+parent}/files:asyncBatchAnnotate',
215 'httpMethod' => 'POST',
216 'parameters' => [
217 'parent' => [
218 'location' => 'path',
219 'type' => 'string',
220 'required' => true,
221 ],
222 ],
223 ],
224 ]
225 ]
226 );
227 $this->projects_images = new Vision\Resource\ProjectsImages(
228 $this,
229 $this->serviceName,
230 'images',
231 [
232 'methods' => [
233 'annotate' => [
234 'path' => 'v1/{+parent}/images:annotate',
235 'httpMethod' => 'POST',
236 'parameters' => [
237 'parent' => [
238 'location' => 'path',
239 'type' => 'string',
240 'required' => true,
241 ],
242 ],
243 ],'asyncBatchAnnotate' => [
244 'path' => 'v1/{+parent}/images:asyncBatchAnnotate',
245 'httpMethod' => 'POST',
246 'parameters' => [
247 'parent' => [
248 'location' => 'path',
249 'type' => 'string',
250 'required' => true,
251 ],
252 ],
253 ],
254 ]
255 ]
256 );
257 $this->projects_locations_files = new Vision\Resource\ProjectsLocationsFiles(
258 $this,
259 $this->serviceName,
260 'files',
261 [
262 'methods' => [
263 'annotate' => [
264 'path' => 'v1/{+parent}/files:annotate',
265 'httpMethod' => 'POST',
266 'parameters' => [
267 'parent' => [
268 'location' => 'path',
269 'type' => 'string',
270 'required' => true,
271 ],
272 ],
273 ],'asyncBatchAnnotate' => [
274 'path' => 'v1/{+parent}/files:asyncBatchAnnotate',
275 'httpMethod' => 'POST',
276 'parameters' => [
277 'parent' => [
278 'location' => 'path',
279 'type' => 'string',
280 'required' => true,
281 ],
282 ],
283 ],
284 ]
285 ]
286 );
287 $this->projects_locations_images = new Vision\Resource\ProjectsLocationsImages(
288 $this,
289 $this->serviceName,
290 'images',
291 [
292 'methods' => [
293 'annotate' => [
294 'path' => 'v1/{+parent}/images:annotate',
295 'httpMethod' => 'POST',
296 'parameters' => [
297 'parent' => [
298 'location' => 'path',
299 'type' => 'string',
300 'required' => true,
301 ],
302 ],
303 ],'asyncBatchAnnotate' => [
304 'path' => 'v1/{+parent}/images:asyncBatchAnnotate',
305 'httpMethod' => 'POST',
306 'parameters' => [
307 'parent' => [
308 'location' => 'path',
309 'type' => 'string',
310 'required' => true,
311 ],
312 ],
313 ],
314 ]
315 ]
316 );
317 $this->projects_locations_operations = new Vision\Resource\ProjectsLocationsOperations(
318 $this,
319 $this->serviceName,
320 'operations',
321 [
322 'methods' => [
323 'get' => [
324 'path' => 'v1/{+name}',
325 'httpMethod' => 'GET',
326 'parameters' => [
327 'name' => [
328 'location' => 'path',
329 'type' => 'string',
330 'required' => true,
331 ],
332 ],
333 ],
334 ]
335 ]
336 );
337 $this->projects_locations_productSets = new Vision\Resource\ProjectsLocationsProductSets(
338 $this,
339 $this->serviceName,
340 'productSets',
341 [
342 'methods' => [
343 'addProduct' => [
344 'path' => 'v1/{+name}:addProduct',
345 'httpMethod' => 'POST',
346 'parameters' => [
347 'name' => [
348 'location' => 'path',
349 'type' => 'string',
350 'required' => true,
351 ],
352 ],
353 ],'create' => [
354 'path' => 'v1/{+parent}/productSets',
355 'httpMethod' => 'POST',
356 'parameters' => [
357 'parent' => [
358 'location' => 'path',
359 'type' => 'string',
360 'required' => true,
361 ],
362 'productSetId' => [
363 'location' => 'query',
364 'type' => 'string',
365 ],
366 ],
367 ],'delete' => [
368 'path' => 'v1/{+name}',
369 'httpMethod' => 'DELETE',
370 'parameters' => [
371 'name' => [
372 'location' => 'path',
373 'type' => 'string',
374 'required' => true,
375 ],
376 ],
377 ],'get' => [
378 'path' => 'v1/{+name}',
379 'httpMethod' => 'GET',
380 'parameters' => [
381 'name' => [
382 'location' => 'path',
383 'type' => 'string',
384 'required' => true,
385 ],
386 ],
387 ],'import' => [
388 'path' => 'v1/{+parent}/productSets:import',
389 'httpMethod' => 'POST',
390 'parameters' => [
391 'parent' => [
392 'location' => 'path',
393 'type' => 'string',
394 'required' => true,
395 ],
396 ],
397 ],'list' => [
398 'path' => 'v1/{+parent}/productSets',
399 'httpMethod' => 'GET',
400 'parameters' => [
401 'parent' => [
402 'location' => 'path',
403 'type' => 'string',
404 'required' => true,
405 ],
406 'pageSize' => [
407 'location' => 'query',
408 'type' => 'integer',
409 ],
410 'pageToken' => [
411 'location' => 'query',
412 'type' => 'string',
413 ],
414 ],
415 ],'patch' => [
416 'path' => 'v1/{+name}',
417 'httpMethod' => 'PATCH',
418 'parameters' => [
419 'name' => [
420 'location' => 'path',
421 'type' => 'string',
422 'required' => true,
423 ],
424 'updateMask' => [
425 'location' => 'query',
426 'type' => 'string',
427 ],
428 ],
429 ],'removeProduct' => [
430 'path' => 'v1/{+name}:removeProduct',
431 'httpMethod' => 'POST',
432 'parameters' => [
433 'name' => [
434 'location' => 'path',
435 'type' => 'string',
436 'required' => true,
437 ],
438 ],
439 ],
440 ]
441 ]
442 );
443 $this->projects_locations_productSets_products = new Vision\Resource\ProjectsLocationsProductSetsProducts(
444 $this,
445 $this->serviceName,
446 'products',
447 [
448 'methods' => [
449 'list' => [
450 'path' => 'v1/{+name}/products',
451 'httpMethod' => 'GET',
452 'parameters' => [
453 'name' => [
454 'location' => 'path',
455 'type' => 'string',
456 'required' => true,
457 ],
458 'pageSize' => [
459 'location' => 'query',
460 'type' => 'integer',
461 ],
462 'pageToken' => [
463 'location' => 'query',
464 'type' => 'string',
465 ],
466 ],
467 ],
468 ]
469 ]
470 );
471 $this->projects_locations_products = new Vision\Resource\ProjectsLocationsProducts(
472 $this,
473 $this->serviceName,
474 'products',
475 [
476 'methods' => [
477 'create' => [
478 'path' => 'v1/{+parent}/products',
479 'httpMethod' => 'POST',
480 'parameters' => [
481 'parent' => [
482 'location' => 'path',
483 'type' => 'string',
484 'required' => true,
485 ],
486 'productId' => [
487 'location' => 'query',
488 'type' => 'string',
489 ],
490 ],
491 ],'delete' => [
492 'path' => 'v1/{+name}',
493 'httpMethod' => 'DELETE',
494 'parameters' => [
495 'name' => [
496 'location' => 'path',
497 'type' => 'string',
498 'required' => true,
499 ],
500 ],
501 ],'get' => [
502 'path' => 'v1/{+name}',
503 'httpMethod' => 'GET',
504 'parameters' => [
505 'name' => [
506 'location' => 'path',
507 'type' => 'string',
508 'required' => true,
509 ],
510 ],
511 ],'list' => [
512 'path' => 'v1/{+parent}/products',
513 'httpMethod' => 'GET',
514 'parameters' => [
515 'parent' => [
516 'location' => 'path',
517 'type' => 'string',
518 'required' => true,
519 ],
520 'pageSize' => [
521 'location' => 'query',
522 'type' => 'integer',
523 ],
524 'pageToken' => [
525 'location' => 'query',
526 'type' => 'string',
527 ],
528 ],
529 ],'patch' => [
530 'path' => 'v1/{+name}',
531 'httpMethod' => 'PATCH',
532 'parameters' => [
533 'name' => [
534 'location' => 'path',
535 'type' => 'string',
536 'required' => true,
537 ],
538 'updateMask' => [
539 'location' => 'query',
540 'type' => 'string',
541 ],
542 ],
543 ],'purge' => [
544 'path' => 'v1/{+parent}/products:purge',
545 'httpMethod' => 'POST',
546 'parameters' => [
547 'parent' => [
548 'location' => 'path',
549 'type' => 'string',
550 'required' => true,
551 ],
552 ],
553 ],
554 ]
555 ]
556 );
557 $this->projects_locations_products_referenceImages = new Vision\Resource\ProjectsLocationsProductsReferenceImages(
558 $this,
559 $this->serviceName,
560 'referenceImages',
561 [
562 'methods' => [
563 'create' => [
564 'path' => 'v1/{+parent}/referenceImages',
565 'httpMethod' => 'POST',
566 'parameters' => [
567 'parent' => [
568 'location' => 'path',
569 'type' => 'string',
570 'required' => true,
571 ],
572 'referenceImageId' => [
573 'location' => 'query',
574 'type' => 'string',
575 ],
576 ],
577 ],'delete' => [
578 'path' => 'v1/{+name}',
579 'httpMethod' => 'DELETE',
580 'parameters' => [
581 'name' => [
582 'location' => 'path',
583 'type' => 'string',
584 'required' => true,
585 ],
586 ],
587 ],'get' => [
588 'path' => 'v1/{+name}',
589 'httpMethod' => 'GET',
590 'parameters' => [
591 'name' => [
592 'location' => 'path',
593 'type' => 'string',
594 'required' => true,
595 ],
596 ],
597 ],'list' => [
598 'path' => 'v1/{+parent}/referenceImages',
599 'httpMethod' => 'GET',
600 'parameters' => [
601 'parent' => [
602 'location' => 'path',
603 'type' => 'string',
604 'required' => true,
605 ],
606 'pageSize' => [
607 'location' => 'query',
608 'type' => 'integer',
609 ],
610 'pageToken' => [
611 'location' => 'query',
612 'type' => 'string',
613 ],
614 ],
615 ],
616 ]
617 ]
618 );
619 $this->projects_operations = new Vision\Resource\ProjectsOperations(
620 $this,
621 $this->serviceName,
622 'operations',
623 [
624 'methods' => [
625 'get' => [
626 'path' => 'v1/{+name}',
627 'httpMethod' => 'GET',
628 'parameters' => [
629 'name' => [
630 'location' => 'path',
631 'type' => 'string',
632 'required' => true,
633 ],
634 ],
635 ],
636 ]
637 ]
638 );
639 }
640}
641
642// Adding a class alias for backwards compatibility with the previous class name.
643class_alias(Vision::class, 'Google_Service_Vision');
Note: See TracBrowser for help on using the repository browser.