Workflows.php 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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 Workflows (v1).
  21. *
  22. * <p>
  23. * Manage workflow definitions. To execute workflows and manage executions, see
  24. * the Workflows Executions API.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://cloud.google.com/workflows" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class Workflows 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;
  39. public $projects_locations_operations;
  40. public $projects_locations_workflows;
  41. public $rootUrlTemplate;
  42. /**
  43. * Constructs the internal representation of the Workflows 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://workflows.googleapis.com/';
  53. $this->rootUrlTemplate = $rootUrl ?: 'https://workflows.UNIVERSE_DOMAIN/';
  54. $this->servicePath = '';
  55. $this->batchPath = 'batch';
  56. $this->version = 'v1';
  57. $this->serviceName = 'workflows';
  58. $this->projects_locations = new Workflows\Resource\ProjectsLocations(
  59. $this,
  60. $this->serviceName,
  61. 'locations',
  62. [
  63. 'methods' => [
  64. 'get' => [
  65. 'path' => 'v1/{+name}',
  66. 'httpMethod' => 'GET',
  67. 'parameters' => [
  68. 'name' => [
  69. 'location' => 'path',
  70. 'type' => 'string',
  71. 'required' => true,
  72. ],
  73. ],
  74. ],'list' => [
  75. 'path' => 'v1/{+name}/locations',
  76. 'httpMethod' => 'GET',
  77. 'parameters' => [
  78. 'name' => [
  79. 'location' => 'path',
  80. 'type' => 'string',
  81. 'required' => true,
  82. ],
  83. 'extraLocationTypes' => [
  84. 'location' => 'query',
  85. 'type' => 'string',
  86. 'repeated' => true,
  87. ],
  88. 'filter' => [
  89. 'location' => 'query',
  90. 'type' => 'string',
  91. ],
  92. 'pageSize' => [
  93. 'location' => 'query',
  94. 'type' => 'integer',
  95. ],
  96. 'pageToken' => [
  97. 'location' => 'query',
  98. 'type' => 'string',
  99. ],
  100. ],
  101. ],
  102. ]
  103. ]
  104. );
  105. $this->projects_locations_operations = new Workflows\Resource\ProjectsLocationsOperations(
  106. $this,
  107. $this->serviceName,
  108. 'operations',
  109. [
  110. 'methods' => [
  111. 'delete' => [
  112. 'path' => 'v1/{+name}',
  113. 'httpMethod' => 'DELETE',
  114. 'parameters' => [
  115. 'name' => [
  116. 'location' => 'path',
  117. 'type' => 'string',
  118. 'required' => true,
  119. ],
  120. ],
  121. ],'get' => [
  122. 'path' => 'v1/{+name}',
  123. 'httpMethod' => 'GET',
  124. 'parameters' => [
  125. 'name' => [
  126. 'location' => 'path',
  127. 'type' => 'string',
  128. 'required' => true,
  129. ],
  130. ],
  131. ],'list' => [
  132. 'path' => 'v1/{+name}/operations',
  133. 'httpMethod' => 'GET',
  134. 'parameters' => [
  135. 'name' => [
  136. 'location' => 'path',
  137. 'type' => 'string',
  138. 'required' => true,
  139. ],
  140. 'filter' => [
  141. 'location' => 'query',
  142. 'type' => 'string',
  143. ],
  144. 'pageSize' => [
  145. 'location' => 'query',
  146. 'type' => 'integer',
  147. ],
  148. 'pageToken' => [
  149. 'location' => 'query',
  150. 'type' => 'string',
  151. ],
  152. 'returnPartialSuccess' => [
  153. 'location' => 'query',
  154. 'type' => 'boolean',
  155. ],
  156. ],
  157. ],
  158. ]
  159. ]
  160. );
  161. $this->projects_locations_workflows = new Workflows\Resource\ProjectsLocationsWorkflows(
  162. $this,
  163. $this->serviceName,
  164. 'workflows',
  165. [
  166. 'methods' => [
  167. 'create' => [
  168. 'path' => 'v1/{+parent}/workflows',
  169. 'httpMethod' => 'POST',
  170. 'parameters' => [
  171. 'parent' => [
  172. 'location' => 'path',
  173. 'type' => 'string',
  174. 'required' => true,
  175. ],
  176. 'workflowId' => [
  177. 'location' => 'query',
  178. 'type' => 'string',
  179. ],
  180. ],
  181. ],'delete' => [
  182. 'path' => 'v1/{+name}',
  183. 'httpMethod' => 'DELETE',
  184. 'parameters' => [
  185. 'name' => [
  186. 'location' => 'path',
  187. 'type' => 'string',
  188. 'required' => true,
  189. ],
  190. ],
  191. ],'get' => [
  192. 'path' => 'v1/{+name}',
  193. 'httpMethod' => 'GET',
  194. 'parameters' => [
  195. 'name' => [
  196. 'location' => 'path',
  197. 'type' => 'string',
  198. 'required' => true,
  199. ],
  200. 'revisionId' => [
  201. 'location' => 'query',
  202. 'type' => 'string',
  203. ],
  204. ],
  205. ],'list' => [
  206. 'path' => 'v1/{+parent}/workflows',
  207. 'httpMethod' => 'GET',
  208. 'parameters' => [
  209. 'parent' => [
  210. 'location' => 'path',
  211. 'type' => 'string',
  212. 'required' => true,
  213. ],
  214. 'filter' => [
  215. 'location' => 'query',
  216. 'type' => 'string',
  217. ],
  218. 'orderBy' => [
  219. 'location' => 'query',
  220. 'type' => 'string',
  221. ],
  222. 'pageSize' => [
  223. 'location' => 'query',
  224. 'type' => 'integer',
  225. ],
  226. 'pageToken' => [
  227. 'location' => 'query',
  228. 'type' => 'string',
  229. ],
  230. ],
  231. ],'listRevisions' => [
  232. 'path' => 'v1/{+name}:listRevisions',
  233. 'httpMethod' => 'GET',
  234. 'parameters' => [
  235. 'name' => [
  236. 'location' => 'path',
  237. 'type' => 'string',
  238. 'required' => true,
  239. ],
  240. 'pageSize' => [
  241. 'location' => 'query',
  242. 'type' => 'integer',
  243. ],
  244. 'pageToken' => [
  245. 'location' => 'query',
  246. 'type' => 'string',
  247. ],
  248. ],
  249. ],'patch' => [
  250. 'path' => 'v1/{+name}',
  251. 'httpMethod' => 'PATCH',
  252. 'parameters' => [
  253. 'name' => [
  254. 'location' => 'path',
  255. 'type' => 'string',
  256. 'required' => true,
  257. ],
  258. 'updateMask' => [
  259. 'location' => 'query',
  260. 'type' => 'string',
  261. ],
  262. ],
  263. ],
  264. ]
  265. ]
  266. );
  267. }
  268. }
  269. // Adding a class alias for backwards compatibility with the previous class name.
  270. class_alias(Workflows::class, 'Google_Service_Workflows');