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 18/** 19 * Service definition for Vision (v1). 20 * 21 * <p> 22 * Integrates Google Vision features, including image labeling, face, logo, and 23 * landmark detection, optical character recognition (OCR), and detection of 24 * explicit content, into applications.</p> 25 * 26 * <p> 27 * For more information about this service, see the API 28 * <a href="https://cloud.google.com/vision/" target="_blank">Documentation</a> 29 * </p> 30 * 31 * @author Google, Inc. 32 */ 33class Google_Service_Vision extends Google_Service 34{ 35 /** View and manage your data across Google Cloud Platform services. */ 36 const CLOUD_PLATFORM = 37 "https://www.googleapis.com/auth/cloud-platform"; 38 /** Apply machine learning models to understand and label images. */ 39 const CLOUD_VISION = 40 "https://www.googleapis.com/auth/cloud-vision"; 41 42 public $files; 43 public $images; 44 public $locations_operations; 45 public $operations; 46 public $projects_locations_operations; 47 public $projects_locations_productSets; 48 public $projects_locations_productSets_products; 49 public $projects_locations_products; 50 public $projects_locations_products_referenceImages; 51 public $projects_operations; 52 53 /** 54 * Constructs the internal representation of the Vision service. 55 * 56 * @param Google_Client $client 57 */ 58 public function __construct(Google_Client $client) 59 { 60 parent::__construct($client); 61 $this->rootUrl = 'https://vision.googleapis.com/'; 62 $this->servicePath = ''; 63 $this->batchPath = 'batch'; 64 $this->version = 'v1'; 65 $this->serviceName = 'vision'; 66 67 $this->files = new Google_Service_Vision_Resource_Files( 68 $this, 69 $this->serviceName, 70 'files', 71 array( 72 'methods' => array( 73 'annotate' => array( 74 'path' => 'v1/files:annotate', 75 'httpMethod' => 'POST', 76 'parameters' => array(), 77 ),'asyncBatchAnnotate' => array( 78 'path' => 'v1/files:asyncBatchAnnotate', 79 'httpMethod' => 'POST', 80 'parameters' => array(), 81 ), 82 ) 83 ) 84 ); 85 $this->images = new Google_Service_Vision_Resource_Images( 86 $this, 87 $this->serviceName, 88 'images', 89 array( 90 'methods' => array( 91 'annotate' => array( 92 'path' => 'v1/images:annotate', 93 'httpMethod' => 'POST', 94 'parameters' => array(), 95 ),'asyncBatchAnnotate' => array( 96 'path' => 'v1/images:asyncBatchAnnotate', 97 'httpMethod' => 'POST', 98 'parameters' => array(), 99 ), 100 ) 101 ) 102 ); 103 $this->locations_operations = new Google_Service_Vision_Resource_LocationsOperations( 104 $this, 105 $this->serviceName, 106 'operations', 107 array( 108 'methods' => array( 109 'get' => array( 110 'path' => 'v1/{+name}', 111 'httpMethod' => 'GET', 112 'parameters' => array( 113 'name' => array( 114 'location' => 'path', 115 'type' => 'string', 116 'required' => true, 117 ), 118 ), 119 ), 120 ) 121 ) 122 ); 123 $this->operations = new Google_Service_Vision_Resource_Operations( 124 $this, 125 $this->serviceName, 126 'operations', 127 array( 128 'methods' => array( 129 'cancel' => array( 130 'path' => 'v1/{+name}:cancel', 131 'httpMethod' => 'POST', 132 'parameters' => array( 133 'name' => array( 134 'location' => 'path', 135 'type' => 'string', 136 'required' => true, 137 ), 138 ), 139 ),'delete' => array( 140 'path' => 'v1/{+name}', 141 'httpMethod' => 'DELETE', 142 'parameters' => array( 143 'name' => array( 144 'location' => 'path', 145 'type' => 'string', 146 'required' => true, 147 ), 148 ), 149 ),'get' => array( 150 'path' => 'v1/{+name}', 151 'httpMethod' => 'GET', 152 'parameters' => array( 153 'name' => array( 154 'location' => 'path', 155 'type' => 'string', 156 'required' => true, 157 ), 158 ), 159 ),'list' => array( 160 'path' => 'v1/{+name}', 161 'httpMethod' => 'GET', 162 'parameters' => array( 163 'name' => array( 164 'location' => 'path', 165 'type' => 'string', 166 'required' => true, 167 ), 168 'filter' => array( 169 'location' => 'query', 170 'type' => 'string', 171 ), 172 'pageToken' => array( 173 'location' => 'query', 174 'type' => 'string', 175 ), 176 'pageSize' => array( 177 'location' => 'query', 178 'type' => 'integer', 179 ), 180 ), 181 ), 182 ) 183 ) 184 ); 185 $this->projects_locations_operations = new Google_Service_Vision_Resource_ProjectsLocationsOperations( 186 $this, 187 $this->serviceName, 188 'operations', 189 array( 190 'methods' => array( 191 'get' => array( 192 'path' => 'v1/{+name}', 193 'httpMethod' => 'GET', 194 'parameters' => array( 195 'name' => array( 196 'location' => 'path', 197 'type' => 'string', 198 'required' => true, 199 ), 200 ), 201 ), 202 ) 203 ) 204 ); 205 $this->projects_locations_productSets = new Google_Service_Vision_Resource_ProjectsLocationsProductSets( 206 $this, 207 $this->serviceName, 208 'productSets', 209 array( 210 'methods' => array( 211 'addProduct' => array( 212 'path' => 'v1/{+name}:addProduct', 213 'httpMethod' => 'POST', 214 'parameters' => array( 215 'name' => array( 216 'location' => 'path', 217 'type' => 'string', 218 'required' => true, 219 ), 220 ), 221 ),'create' => array( 222 'path' => 'v1/{+parent}/productSets', 223 'httpMethod' => 'POST', 224 'parameters' => array( 225 'parent' => array( 226 'location' => 'path', 227 'type' => 'string', 228 'required' => true, 229 ), 230 'productSetId' => array( 231 'location' => 'query', 232 'type' => 'string', 233 ), 234 ), 235 ),'delete' => array( 236 'path' => 'v1/{+name}', 237 'httpMethod' => 'DELETE', 238 'parameters' => array( 239 'name' => array( 240 'location' => 'path', 241 'type' => 'string', 242 'required' => true, 243 ), 244 ), 245 ),'get' => array( 246 'path' => 'v1/{+name}', 247 'httpMethod' => 'GET', 248 'parameters' => array( 249 'name' => array( 250 'location' => 'path', 251 'type' => 'string', 252 'required' => true, 253 ), 254 ), 255 ),'import' => array( 256 'path' => 'v1/{+parent}/productSets:import', 257 'httpMethod' => 'POST', 258 'parameters' => array( 259 'parent' => array( 260 'location' => 'path', 261 'type' => 'string', 262 'required' => true, 263 ), 264 ), 265 ),'list' => array( 266 'path' => 'v1/{+parent}/productSets', 267 'httpMethod' => 'GET', 268 'parameters' => array( 269 'parent' => array( 270 'location' => 'path', 271 'type' => 'string', 272 'required' => true, 273 ), 274 'pageToken' => array( 275 'location' => 'query', 276 'type' => 'string', 277 ), 278 'pageSize' => array( 279 'location' => 'query', 280 'type' => 'integer', 281 ), 282 ), 283 ),'patch' => array( 284 'path' => 'v1/{+name}', 285 'httpMethod' => 'PATCH', 286 'parameters' => array( 287 'name' => array( 288 'location' => 'path', 289 'type' => 'string', 290 'required' => true, 291 ), 292 'updateMask' => array( 293 'location' => 'query', 294 'type' => 'string', 295 ), 296 ), 297 ),'removeProduct' => array( 298 'path' => 'v1/{+name}:removeProduct', 299 'httpMethod' => 'POST', 300 'parameters' => array( 301 'name' => array( 302 'location' => 'path', 303 'type' => 'string', 304 'required' => true, 305 ), 306 ), 307 ), 308 ) 309 ) 310 ); 311 $this->projects_locations_productSets_products = new Google_Service_Vision_Resource_ProjectsLocationsProductSetsProducts( 312 $this, 313 $this->serviceName, 314 'products', 315 array( 316 'methods' => array( 317 'list' => array( 318 'path' => 'v1/{+name}/products', 319 'httpMethod' => 'GET', 320 'parameters' => array( 321 'name' => array( 322 'location' => 'path', 323 'type' => 'string', 324 'required' => true, 325 ), 326 'pageToken' => array( 327 'location' => 'query', 328 'type' => 'string', 329 ), 330 'pageSize' => array( 331 'location' => 'query', 332 'type' => 'integer', 333 ), 334 ), 335 ), 336 ) 337 ) 338 ); 339 $this->projects_locations_products = new Google_Service_Vision_Resource_ProjectsLocationsProducts( 340 $this, 341 $this->serviceName, 342 'products', 343 array( 344 'methods' => array( 345 'create' => array( 346 'path' => 'v1/{+parent}/products', 347 'httpMethod' => 'POST', 348 'parameters' => array( 349 'parent' => array( 350 'location' => 'path', 351 'type' => 'string', 352 'required' => true, 353 ), 354 'productId' => array( 355 'location' => 'query', 356 'type' => 'string', 357 ), 358 ), 359 ),'delete' => array( 360 'path' => 'v1/{+name}', 361 'httpMethod' => 'DELETE', 362 'parameters' => array( 363 'name' => array( 364 'location' => 'path', 365 'type' => 'string', 366 'required' => true, 367 ), 368 ), 369 ),'get' => array( 370 'path' => 'v1/{+name}', 371 'httpMethod' => 'GET', 372 'parameters' => array( 373 'name' => array( 374 'location' => 'path', 375 'type' => 'string', 376 'required' => true, 377 ), 378 ), 379 ),'list' => array( 380 'path' => 'v1/{+parent}/products', 381 'httpMethod' => 'GET', 382 'parameters' => array( 383 'parent' => array( 384 'location' => 'path', 385 'type' => 'string', 386 'required' => true, 387 ), 388 'pageToken' => array( 389 'location' => 'query', 390 'type' => 'string', 391 ), 392 'pageSize' => array( 393 'location' => 'query', 394 'type' => 'integer', 395 ), 396 ), 397 ),'patch' => array( 398 'path' => 'v1/{+name}', 399 'httpMethod' => 'PATCH', 400 'parameters' => array( 401 'name' => array( 402 'location' => 'path', 403 'type' => 'string', 404 'required' => true, 405 ), 406 'updateMask' => array( 407 'location' => 'query', 408 'type' => 'string', 409 ), 410 ), 411 ), 412 ) 413 ) 414 ); 415 $this->projects_locations_products_referenceImages = new Google_Service_Vision_Resource_ProjectsLocationsProductsReferenceImages( 416 $this, 417 $this->serviceName, 418 'referenceImages', 419 array( 420 'methods' => array( 421 'create' => array( 422 'path' => 'v1/{+parent}/referenceImages', 423 'httpMethod' => 'POST', 424 'parameters' => array( 425 'parent' => array( 426 'location' => 'path', 427 'type' => 'string', 428 'required' => true, 429 ), 430 'referenceImageId' => array( 431 'location' => 'query', 432 'type' => 'string', 433 ), 434 ), 435 ),'delete' => array( 436 'path' => 'v1/{+name}', 437 'httpMethod' => 'DELETE', 438 'parameters' => array( 439 'name' => array( 440 'location' => 'path', 441 'type' => 'string', 442 'required' => true, 443 ), 444 ), 445 ),'get' => array( 446 'path' => 'v1/{+name}', 447 'httpMethod' => 'GET', 448 'parameters' => array( 449 'name' => array( 450 'location' => 'path', 451 'type' => 'string', 452 'required' => true, 453 ), 454 ), 455 ),'list' => array( 456 'path' => 'v1/{+parent}/referenceImages', 457 'httpMethod' => 'GET', 458 'parameters' => array( 459 'parent' => array( 460 'location' => 'path', 461 'type' => 'string', 462 'required' => true, 463 ), 464 'pageToken' => array( 465 'location' => 'query', 466 'type' => 'string', 467 ), 468 'pageSize' => array( 469 'location' => 'query', 470 'type' => 'integer', 471 ), 472 ), 473 ), 474 ) 475 ) 476 ); 477 $this->projects_operations = new Google_Service_Vision_Resource_ProjectsOperations( 478 $this, 479 $this->serviceName, 480 'operations', 481 array( 482 'methods' => array( 483 'get' => array( 484 'path' => 'v1/{+name}', 485 'httpMethod' => 'GET', 486 'parameters' => array( 487 'name' => array( 488 'location' => 'path', 489 'type' => 'string', 490 'required' => true, 491 ), 492 ), 493 ), 494 ) 495 ) 496 ); 497 } 498} 499