No Description

Vision.php 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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. * Service definition for Vision (v1).
  19. *
  20. * <p>
  21. * Integrates Google Vision features, including image labeling, face, logo, and
  22. * landmark detection, optical character recognition (OCR), and detection of
  23. * explicit content, into applications.</p>
  24. *
  25. * <p>
  26. * For more information about this service, see the API
  27. * <a href="https://cloud.google.com/vision/" target="_blank">Documentation</a>
  28. * </p>
  29. *
  30. * @author Google, Inc.
  31. */
  32. class Google_Service_Vision extends Google_Service
  33. {
  34. /** View and manage your data across Google Cloud Platform services. */
  35. const CLOUD_PLATFORM =
  36. "https://www.googleapis.com/auth/cloud-platform";
  37. /** Apply machine learning models to understand and label images. */
  38. const CLOUD_VISION =
  39. "https://www.googleapis.com/auth/cloud-vision";
  40. public $files;
  41. public $images;
  42. public $locations_operations;
  43. public $operations;
  44. /**
  45. * Constructs the internal representation of the Vision service.
  46. *
  47. * @param Google_Client $client
  48. */
  49. public function __construct(Google_Client $client)
  50. {
  51. parent::__construct($client);
  52. $this->rootUrl = 'https://vision.googleapis.com/';
  53. $this->servicePath = '';
  54. $this->version = 'v1';
  55. $this->serviceName = 'vision';
  56. $this->files = new Google_Service_Vision_Resource_Files(
  57. $this,
  58. $this->serviceName,
  59. 'files',
  60. array(
  61. 'methods' => array(
  62. 'asyncBatchAnnotate' => array(
  63. 'path' => 'v1/files:asyncBatchAnnotate',
  64. 'httpMethod' => 'POST',
  65. 'parameters' => array(),
  66. ),
  67. )
  68. )
  69. );
  70. $this->images = new Google_Service_Vision_Resource_Images(
  71. $this,
  72. $this->serviceName,
  73. 'images',
  74. array(
  75. 'methods' => array(
  76. 'annotate' => array(
  77. 'path' => 'v1/images:annotate',
  78. 'httpMethod' => 'POST',
  79. 'parameters' => array(),
  80. ),
  81. )
  82. )
  83. );
  84. $this->locations_operations = new Google_Service_Vision_Resource_LocationsOperations(
  85. $this,
  86. $this->serviceName,
  87. 'operations',
  88. array(
  89. 'methods' => array(
  90. 'get' => array(
  91. 'path' => 'v1/{+name}',
  92. 'httpMethod' => 'GET',
  93. 'parameters' => array(
  94. 'name' => array(
  95. 'location' => 'path',
  96. 'type' => 'string',
  97. 'required' => true,
  98. ),
  99. ),
  100. ),
  101. )
  102. )
  103. );
  104. $this->operations = new Google_Service_Vision_Resource_Operations(
  105. $this,
  106. $this->serviceName,
  107. 'operations',
  108. array(
  109. 'methods' => array(
  110. 'cancel' => array(
  111. 'path' => 'v1/{+name}:cancel',
  112. 'httpMethod' => 'POST',
  113. 'parameters' => array(
  114. 'name' => array(
  115. 'location' => 'path',
  116. 'type' => 'string',
  117. 'required' => true,
  118. ),
  119. ),
  120. ),'delete' => array(
  121. 'path' => 'v1/{+name}',
  122. 'httpMethod' => 'DELETE',
  123. 'parameters' => array(
  124. 'name' => array(
  125. 'location' => 'path',
  126. 'type' => 'string',
  127. 'required' => true,
  128. ),
  129. ),
  130. ),'get' => array(
  131. 'path' => 'v1/{+name}',
  132. 'httpMethod' => 'GET',
  133. 'parameters' => array(
  134. 'name' => array(
  135. 'location' => 'path',
  136. 'type' => 'string',
  137. 'required' => true,
  138. ),
  139. ),
  140. ),'list' => array(
  141. 'path' => 'v1/{+name}',
  142. 'httpMethod' => 'GET',
  143. 'parameters' => array(
  144. 'name' => array(
  145. 'location' => 'path',
  146. 'type' => 'string',
  147. 'required' => true,
  148. ),
  149. 'pageToken' => array(
  150. 'location' => 'query',
  151. 'type' => 'string',
  152. ),
  153. 'pageSize' => array(
  154. 'location' => 'query',
  155. 'type' => 'integer',
  156. ),
  157. 'filter' => array(
  158. 'location' => 'query',
  159. 'type' => 'string',
  160. ),
  161. ),
  162. ),
  163. )
  164. )
  165. );
  166. }
  167. }