CloudVideoIntelligence.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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 CloudVideoIntelligence (v1).
  21. *
  22. * <p>
  23. * Detects objects, explicit content, and scene changes in videos. It also
  24. * specifies the region for annotation and transcribes speech to text. Supports
  25. * both asynchronous API and streaming API.</p>
  26. *
  27. * <p>
  28. * For more information about this service, see the API
  29. * <a href="https://cloud.google.com/video-intelligence/docs/" target="_blank">Documentation</a>
  30. * </p>
  31. *
  32. * @author Google, Inc.
  33. */
  34. class CloudVideoIntelligence extends \Google\Service
  35. {
  36. /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
  37. const CLOUD_PLATFORM =
  38. "https://www.googleapis.com/auth/cloud-platform";
  39. public $operations_projects_locations_operations;
  40. public $projects_locations_operations;
  41. public $videos;
  42. /**
  43. * Constructs the internal representation of the CloudVideoIntelligence
  44. * service.
  45. *
  46. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  47. * config array to pass to a new Client instance.
  48. * @param string $rootUrl The root URL used for requests to the service.
  49. */
  50. public function __construct($clientOrConfig = [], $rootUrl = null)
  51. {
  52. parent::__construct($clientOrConfig);
  53. $this->rootUrl = $rootUrl ?: 'https://videointelligence.googleapis.com/';
  54. $this->servicePath = '';
  55. $this->batchPath = 'batch';
  56. $this->version = 'v1';
  57. $this->serviceName = 'videointelligence';
  58. $this->operations_projects_locations_operations = new CloudVideoIntelligence\Resource\OperationsProjectsLocationsOperations(
  59. $this,
  60. $this->serviceName,
  61. 'operations',
  62. [
  63. 'methods' => [
  64. 'cancel' => [
  65. 'path' => 'v1/operations/{+name}:cancel',
  66. 'httpMethod' => 'POST',
  67. 'parameters' => [
  68. 'name' => [
  69. 'location' => 'path',
  70. 'type' => 'string',
  71. 'required' => true,
  72. ],
  73. ],
  74. ],'delete' => [
  75. 'path' => 'v1/operations/{+name}',
  76. 'httpMethod' => 'DELETE',
  77. 'parameters' => [
  78. 'name' => [
  79. 'location' => 'path',
  80. 'type' => 'string',
  81. 'required' => true,
  82. ],
  83. ],
  84. ],'get' => [
  85. 'path' => 'v1/operations/{+name}',
  86. 'httpMethod' => 'GET',
  87. 'parameters' => [
  88. 'name' => [
  89. 'location' => 'path',
  90. 'type' => 'string',
  91. 'required' => true,
  92. ],
  93. ],
  94. ],
  95. ]
  96. ]
  97. );
  98. $this->projects_locations_operations = new CloudVideoIntelligence\Resource\ProjectsLocationsOperations(
  99. $this,
  100. $this->serviceName,
  101. 'operations',
  102. [
  103. 'methods' => [
  104. 'cancel' => [
  105. 'path' => 'v1/{+name}:cancel',
  106. 'httpMethod' => 'POST',
  107. 'parameters' => [
  108. 'name' => [
  109. 'location' => 'path',
  110. 'type' => 'string',
  111. 'required' => true,
  112. ],
  113. ],
  114. ],'delete' => [
  115. 'path' => 'v1/{+name}',
  116. 'httpMethod' => 'DELETE',
  117. 'parameters' => [
  118. 'name' => [
  119. 'location' => 'path',
  120. 'type' => 'string',
  121. 'required' => true,
  122. ],
  123. ],
  124. ],'get' => [
  125. 'path' => 'v1/{+name}',
  126. 'httpMethod' => 'GET',
  127. 'parameters' => [
  128. 'name' => [
  129. 'location' => 'path',
  130. 'type' => 'string',
  131. 'required' => true,
  132. ],
  133. ],
  134. ],'list' => [
  135. 'path' => 'v1/{+name}/operations',
  136. 'httpMethod' => 'GET',
  137. 'parameters' => [
  138. 'name' => [
  139. 'location' => 'path',
  140. 'type' => 'string',
  141. 'required' => true,
  142. ],
  143. 'filter' => [
  144. 'location' => 'query',
  145. 'type' => 'string',
  146. ],
  147. 'pageSize' => [
  148. 'location' => 'query',
  149. 'type' => 'integer',
  150. ],
  151. 'pageToken' => [
  152. 'location' => 'query',
  153. 'type' => 'string',
  154. ],
  155. ],
  156. ],
  157. ]
  158. ]
  159. );
  160. $this->videos = new CloudVideoIntelligence\Resource\Videos(
  161. $this,
  162. $this->serviceName,
  163. 'videos',
  164. [
  165. 'methods' => [
  166. 'annotate' => [
  167. 'path' => 'v1/videos:annotate',
  168. 'httpMethod' => 'POST',
  169. 'parameters' => [],
  170. ],
  171. ]
  172. ]
  173. );
  174. }
  175. }
  176. // Adding a class alias for backwards compatibility with the previous class name.
  177. class_alias(CloudVideoIntelligence::class, 'Google_Service_CloudVideoIntelligence');