CloudVideoIntelligence.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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. public $rootUrlTemplate;
  43. /**
  44. * Constructs the internal representation of the CloudVideoIntelligence
  45. * service.
  46. *
  47. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  48. * config array to pass to a new Client instance.
  49. * @param string $rootUrl The root URL used for requests to the service.
  50. */
  51. public function __construct($clientOrConfig = [], $rootUrl = null)
  52. {
  53. parent::__construct($clientOrConfig);
  54. $this->rootUrl = $rootUrl ?: 'https://videointelligence.googleapis.com/';
  55. $this->rootUrlTemplate = $rootUrl ?: 'https://videointelligence.UNIVERSE_DOMAIN/';
  56. $this->servicePath = '';
  57. $this->batchPath = 'batch';
  58. $this->version = 'v1';
  59. $this->serviceName = 'videointelligence';
  60. $this->operations_projects_locations_operations = new CloudVideoIntelligence\Resource\OperationsProjectsLocationsOperations(
  61. $this,
  62. $this->serviceName,
  63. 'operations',
  64. [
  65. 'methods' => [
  66. 'cancel' => [
  67. 'path' => 'v1/operations/{+name}:cancel',
  68. 'httpMethod' => 'POST',
  69. 'parameters' => [
  70. 'name' => [
  71. 'location' => 'path',
  72. 'type' => 'string',
  73. 'required' => true,
  74. ],
  75. ],
  76. ],'delete' => [
  77. 'path' => 'v1/operations/{+name}',
  78. 'httpMethod' => 'DELETE',
  79. 'parameters' => [
  80. 'name' => [
  81. 'location' => 'path',
  82. 'type' => 'string',
  83. 'required' => true,
  84. ],
  85. ],
  86. ],'get' => [
  87. 'path' => 'v1/operations/{+name}',
  88. 'httpMethod' => 'GET',
  89. 'parameters' => [
  90. 'name' => [
  91. 'location' => 'path',
  92. 'type' => 'string',
  93. 'required' => true,
  94. ],
  95. ],
  96. ],
  97. ]
  98. ]
  99. );
  100. $this->projects_locations_operations = new CloudVideoIntelligence\Resource\ProjectsLocationsOperations(
  101. $this,
  102. $this->serviceName,
  103. 'operations',
  104. [
  105. 'methods' => [
  106. 'cancel' => [
  107. 'path' => 'v1/{+name}:cancel',
  108. 'httpMethod' => 'POST',
  109. 'parameters' => [
  110. 'name' => [
  111. 'location' => 'path',
  112. 'type' => 'string',
  113. 'required' => true,
  114. ],
  115. ],
  116. ],'delete' => [
  117. 'path' => 'v1/{+name}',
  118. 'httpMethod' => 'DELETE',
  119. 'parameters' => [
  120. 'name' => [
  121. 'location' => 'path',
  122. 'type' => 'string',
  123. 'required' => true,
  124. ],
  125. ],
  126. ],'get' => [
  127. 'path' => 'v1/{+name}',
  128. 'httpMethod' => 'GET',
  129. 'parameters' => [
  130. 'name' => [
  131. 'location' => 'path',
  132. 'type' => 'string',
  133. 'required' => true,
  134. ],
  135. ],
  136. ],'list' => [
  137. 'path' => 'v1/{+name}/operations',
  138. 'httpMethod' => 'GET',
  139. 'parameters' => [
  140. 'name' => [
  141. 'location' => 'path',
  142. 'type' => 'string',
  143. 'required' => true,
  144. ],
  145. 'filter' => [
  146. 'location' => 'query',
  147. 'type' => 'string',
  148. ],
  149. 'pageSize' => [
  150. 'location' => 'query',
  151. 'type' => 'integer',
  152. ],
  153. 'pageToken' => [
  154. 'location' => 'query',
  155. 'type' => 'string',
  156. ],
  157. ],
  158. ],
  159. ]
  160. ]
  161. );
  162. $this->videos = new CloudVideoIntelligence\Resource\Videos(
  163. $this,
  164. $this->serviceName,
  165. 'videos',
  166. [
  167. 'methods' => [
  168. 'annotate' => [
  169. 'path' => 'v1/videos:annotate',
  170. 'httpMethod' => 'POST',
  171. 'parameters' => [],
  172. ],
  173. ]
  174. ]
  175. );
  176. }
  177. }
  178. // Adding a class alias for backwards compatibility with the previous class name.
  179. class_alias(CloudVideoIntelligence::class, 'Google_Service_CloudVideoIntelligence');