Transcoder.php 6.4 KB

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