Transcoder.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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 Transcoder (v1).
  21. *
  22. * <p>
  23. * This API converts video files into formats suitable for consumer
  24. * distribution. For more information, see the Transcoder API overview.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://cloud.google.com/transcoder/docs/" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class Transcoder extends \Google\Service
  34. {
  35. /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
  36. const CLOUD_PLATFORM =
  37. "https://www.googleapis.com/auth/cloud-platform";
  38. public $projects_locations_jobTemplates;
  39. public $projects_locations_jobs;
  40. public $rootUrlTemplate;
  41. /**
  42. * Constructs the internal representation of the Transcoder service.
  43. *
  44. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  45. * config array to pass to a new Client instance.
  46. * @param string $rootUrl The root URL used for requests to the service.
  47. */
  48. public function __construct($clientOrConfig = [], $rootUrl = null)
  49. {
  50. parent::__construct($clientOrConfig);
  51. $this->rootUrl = $rootUrl ?: 'https://transcoder.googleapis.com/';
  52. $this->rootUrlTemplate = $rootUrl ?: 'https://transcoder.UNIVERSE_DOMAIN/';
  53. $this->servicePath = '';
  54. $this->batchPath = 'batch';
  55. $this->version = 'v1';
  56. $this->serviceName = 'transcoder';
  57. $this->projects_locations_jobTemplates = new Transcoder\Resource\ProjectsLocationsJobTemplates(
  58. $this,
  59. $this->serviceName,
  60. 'jobTemplates',
  61. [
  62. 'methods' => [
  63. 'create' => [
  64. 'path' => 'v1/{+parent}/jobTemplates',
  65. 'httpMethod' => 'POST',
  66. 'parameters' => [
  67. 'parent' => [
  68. 'location' => 'path',
  69. 'type' => 'string',
  70. 'required' => true,
  71. ],
  72. 'jobTemplateId' => [
  73. 'location' => 'query',
  74. 'type' => 'string',
  75. ],
  76. ],
  77. ],'delete' => [
  78. 'path' => 'v1/{+name}',
  79. 'httpMethod' => 'DELETE',
  80. 'parameters' => [
  81. 'name' => [
  82. 'location' => 'path',
  83. 'type' => 'string',
  84. 'required' => true,
  85. ],
  86. 'allowMissing' => [
  87. 'location' => 'query',
  88. 'type' => 'boolean',
  89. ],
  90. ],
  91. ],'get' => [
  92. 'path' => 'v1/{+name}',
  93. 'httpMethod' => 'GET',
  94. 'parameters' => [
  95. 'name' => [
  96. 'location' => 'path',
  97. 'type' => 'string',
  98. 'required' => true,
  99. ],
  100. ],
  101. ],'list' => [
  102. 'path' => 'v1/{+parent}/jobTemplates',
  103. 'httpMethod' => 'GET',
  104. 'parameters' => [
  105. 'parent' => [
  106. 'location' => 'path',
  107. 'type' => 'string',
  108. 'required' => true,
  109. ],
  110. 'filter' => [
  111. 'location' => 'query',
  112. 'type' => 'string',
  113. ],
  114. 'orderBy' => [
  115. 'location' => 'query',
  116. 'type' => 'string',
  117. ],
  118. 'pageSize' => [
  119. 'location' => 'query',
  120. 'type' => 'integer',
  121. ],
  122. 'pageToken' => [
  123. 'location' => 'query',
  124. 'type' => 'string',
  125. ],
  126. ],
  127. ],
  128. ]
  129. ]
  130. );
  131. $this->projects_locations_jobs = new Transcoder\Resource\ProjectsLocationsJobs(
  132. $this,
  133. $this->serviceName,
  134. 'jobs',
  135. [
  136. 'methods' => [
  137. 'create' => [
  138. 'path' => 'v1/{+parent}/jobs',
  139. 'httpMethod' => 'POST',
  140. 'parameters' => [
  141. 'parent' => [
  142. 'location' => 'path',
  143. 'type' => 'string',
  144. 'required' => true,
  145. ],
  146. ],
  147. ],'delete' => [
  148. 'path' => 'v1/{+name}',
  149. 'httpMethod' => 'DELETE',
  150. 'parameters' => [
  151. 'name' => [
  152. 'location' => 'path',
  153. 'type' => 'string',
  154. 'required' => true,
  155. ],
  156. 'allowMissing' => [
  157. 'location' => 'query',
  158. 'type' => 'boolean',
  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/{+parent}/jobs',
  173. 'httpMethod' => 'GET',
  174. 'parameters' => [
  175. 'parent' => [
  176. 'location' => 'path',
  177. 'type' => 'string',
  178. 'required' => true,
  179. ],
  180. 'filter' => [
  181. 'location' => 'query',
  182. 'type' => 'string',
  183. ],
  184. 'orderBy' => [
  185. 'location' => 'query',
  186. 'type' => 'string',
  187. ],
  188. 'pageSize' => [
  189. 'location' => 'query',
  190. 'type' => 'integer',
  191. ],
  192. 'pageToken' => [
  193. 'location' => 'query',
  194. 'type' => 'string',
  195. ],
  196. ],
  197. ],
  198. ]
  199. ]
  200. );
  201. }
  202. }
  203. // Adding a class alias for backwards compatibility with the previous class name.
  204. class_alias(Transcoder::class, 'Google_Service_Transcoder');