RemoteBuildExecution.php 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  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 RemoteBuildExecution (v2).
  21. *
  22. * <p>
  23. * Supplies a Remote Execution API service for tools such as bazel.</p>
  24. *
  25. * <p>
  26. * For more information about this service, see the API
  27. * <a href="https://cloud.google.com/remote-build-execution/docs/" target="_blank">Documentation</a>
  28. * </p>
  29. *
  30. * @author Google, Inc.
  31. */
  32. class RemoteBuildExecution extends \Google\Service
  33. {
  34. /** See, edit, configure, and delete your Google Cloud Platform data. */
  35. const CLOUD_PLATFORM =
  36. "https://www.googleapis.com/auth/cloud-platform";
  37. public $actionResults;
  38. public $actions;
  39. public $blobs;
  40. public $operations;
  41. public $v2;
  42. /**
  43. * Constructs the internal representation of the RemoteBuildExecution service.
  44. *
  45. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  46. * config array to pass to a new Client instance.
  47. * @param string $rootUrl The root URL used for requests to the service.
  48. */
  49. public function __construct($clientOrConfig = [], $rootUrl = null)
  50. {
  51. parent::__construct($clientOrConfig);
  52. $this->rootUrl = $rootUrl ?: 'https://remotebuildexecution.googleapis.com/';
  53. $this->servicePath = '';
  54. $this->batchPath = 'batch';
  55. $this->version = 'v2';
  56. $this->serviceName = 'remotebuildexecution';
  57. $this->actionResults = new RemoteBuildExecution\Resource\ActionResults(
  58. $this,
  59. $this->serviceName,
  60. 'actionResults',
  61. [
  62. 'methods' => [
  63. 'get' => [
  64. 'path' => 'v2/{+instanceName}/actionResults/{hash}/{sizeBytes}',
  65. 'httpMethod' => 'GET',
  66. 'parameters' => [
  67. 'instanceName' => [
  68. 'location' => 'path',
  69. 'type' => 'string',
  70. 'required' => true,
  71. ],
  72. 'hash' => [
  73. 'location' => 'path',
  74. 'type' => 'string',
  75. 'required' => true,
  76. ],
  77. 'sizeBytes' => [
  78. 'location' => 'path',
  79. 'type' => 'string',
  80. 'required' => true,
  81. ],
  82. 'inlineOutputFiles' => [
  83. 'location' => 'query',
  84. 'type' => 'string',
  85. 'repeated' => true,
  86. ],
  87. 'inlineStderr' => [
  88. 'location' => 'query',
  89. 'type' => 'boolean',
  90. ],
  91. 'inlineStdout' => [
  92. 'location' => 'query',
  93. 'type' => 'boolean',
  94. ],
  95. ],
  96. ],'update' => [
  97. 'path' => 'v2/{+instanceName}/actionResults/{hash}/{sizeBytes}',
  98. 'httpMethod' => 'PUT',
  99. 'parameters' => [
  100. 'instanceName' => [
  101. 'location' => 'path',
  102. 'type' => 'string',
  103. 'required' => true,
  104. ],
  105. 'hash' => [
  106. 'location' => 'path',
  107. 'type' => 'string',
  108. 'required' => true,
  109. ],
  110. 'sizeBytes' => [
  111. 'location' => 'path',
  112. 'type' => 'string',
  113. 'required' => true,
  114. ],
  115. 'resultsCachePolicy.priority' => [
  116. 'location' => 'query',
  117. 'type' => 'integer',
  118. ],
  119. ],
  120. ],
  121. ]
  122. ]
  123. );
  124. $this->actions = new RemoteBuildExecution\Resource\Actions(
  125. $this,
  126. $this->serviceName,
  127. 'actions',
  128. [
  129. 'methods' => [
  130. 'execute' => [
  131. 'path' => 'v2/{+instanceName}/actions:execute',
  132. 'httpMethod' => 'POST',
  133. 'parameters' => [
  134. 'instanceName' => [
  135. 'location' => 'path',
  136. 'type' => 'string',
  137. 'required' => true,
  138. ],
  139. ],
  140. ],
  141. ]
  142. ]
  143. );
  144. $this->blobs = new RemoteBuildExecution\Resource\Blobs(
  145. $this,
  146. $this->serviceName,
  147. 'blobs',
  148. [
  149. 'methods' => [
  150. 'batchRead' => [
  151. 'path' => 'v2/{+instanceName}/blobs:batchRead',
  152. 'httpMethod' => 'POST',
  153. 'parameters' => [
  154. 'instanceName' => [
  155. 'location' => 'path',
  156. 'type' => 'string',
  157. 'required' => true,
  158. ],
  159. ],
  160. ],'batchUpdate' => [
  161. 'path' => 'v2/{+instanceName}/blobs:batchUpdate',
  162. 'httpMethod' => 'POST',
  163. 'parameters' => [
  164. 'instanceName' => [
  165. 'location' => 'path',
  166. 'type' => 'string',
  167. 'required' => true,
  168. ],
  169. ],
  170. ],'findMissing' => [
  171. 'path' => 'v2/{+instanceName}/blobs:findMissing',
  172. 'httpMethod' => 'POST',
  173. 'parameters' => [
  174. 'instanceName' => [
  175. 'location' => 'path',
  176. 'type' => 'string',
  177. 'required' => true,
  178. ],
  179. ],
  180. ],'getTree' => [
  181. 'path' => 'v2/{+instanceName}/blobs/{hash}/{sizeBytes}:getTree',
  182. 'httpMethod' => 'GET',
  183. 'parameters' => [
  184. 'instanceName' => [
  185. 'location' => 'path',
  186. 'type' => 'string',
  187. 'required' => true,
  188. ],
  189. 'hash' => [
  190. 'location' => 'path',
  191. 'type' => 'string',
  192. 'required' => true,
  193. ],
  194. 'sizeBytes' => [
  195. 'location' => 'path',
  196. 'type' => 'string',
  197. 'required' => true,
  198. ],
  199. 'pageSize' => [
  200. 'location' => 'query',
  201. 'type' => 'integer',
  202. ],
  203. 'pageToken' => [
  204. 'location' => 'query',
  205. 'type' => 'string',
  206. ],
  207. ],
  208. ],
  209. ]
  210. ]
  211. );
  212. $this->operations = new RemoteBuildExecution\Resource\Operations(
  213. $this,
  214. $this->serviceName,
  215. 'operations',
  216. [
  217. 'methods' => [
  218. 'waitExecution' => [
  219. 'path' => 'v2/{+name}:waitExecution',
  220. 'httpMethod' => 'POST',
  221. 'parameters' => [
  222. 'name' => [
  223. 'location' => 'path',
  224. 'type' => 'string',
  225. 'required' => true,
  226. ],
  227. ],
  228. ],
  229. ]
  230. ]
  231. );
  232. $this->v2 = new RemoteBuildExecution\Resource\V2(
  233. $this,
  234. $this->serviceName,
  235. 'v2',
  236. [
  237. 'methods' => [
  238. 'getCapabilities' => [
  239. 'path' => 'v2/{+instanceName}/capabilities',
  240. 'httpMethod' => 'GET',
  241. 'parameters' => [
  242. 'instanceName' => [
  243. 'location' => 'path',
  244. 'type' => 'string',
  245. 'required' => true,
  246. ],
  247. ],
  248. ],
  249. ]
  250. ]
  251. );
  252. }
  253. }
  254. // Adding a class alias for backwards compatibility with the previous class name.
  255. class_alias(RemoteBuildExecution::class, 'Google_Service_RemoteBuildExecution');