CloudScheduler.php 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  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 CloudScheduler (v1).
  21. *
  22. * <p>
  23. * Creates and manages jobs run on a regular recurring schedule.</p>
  24. *
  25. * <p>
  26. * For more information about this service, see the API
  27. * <a href="https://cloud.google.com/scheduler/" target="_blank">Documentation</a>
  28. * </p>
  29. *
  30. * @author Google, Inc.
  31. */
  32. class CloudScheduler extends \Google\Service
  33. {
  34. /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
  35. const CLOUD_PLATFORM =
  36. "https://www.googleapis.com/auth/cloud-platform";
  37. public $projects_locations;
  38. public $projects_locations_jobs;
  39. public $projects_locations_operations;
  40. public $rootUrlTemplate;
  41. /**
  42. * Constructs the internal representation of the CloudScheduler 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://cloudscheduler.googleapis.com/';
  52. $this->rootUrlTemplate = $rootUrl ?: 'https://cloudscheduler.UNIVERSE_DOMAIN/';
  53. $this->servicePath = '';
  54. $this->batchPath = 'batch';
  55. $this->version = 'v1';
  56. $this->serviceName = 'cloudscheduler';
  57. $this->projects_locations = new CloudScheduler\Resource\ProjectsLocations(
  58. $this,
  59. $this->serviceName,
  60. 'locations',
  61. [
  62. 'methods' => [
  63. 'get' => [
  64. 'path' => 'v1/{+name}',
  65. 'httpMethod' => 'GET',
  66. 'parameters' => [
  67. 'name' => [
  68. 'location' => 'path',
  69. 'type' => 'string',
  70. 'required' => true,
  71. ],
  72. ],
  73. ],'getCmekConfig' => [
  74. 'path' => 'v1/{+name}',
  75. 'httpMethod' => 'GET',
  76. 'parameters' => [
  77. 'name' => [
  78. 'location' => 'path',
  79. 'type' => 'string',
  80. 'required' => true,
  81. ],
  82. ],
  83. ],'list' => [
  84. 'path' => 'v1/{+name}/locations',
  85. 'httpMethod' => 'GET',
  86. 'parameters' => [
  87. 'name' => [
  88. 'location' => 'path',
  89. 'type' => 'string',
  90. 'required' => true,
  91. ],
  92. 'extraLocationTypes' => [
  93. 'location' => 'query',
  94. 'type' => 'string',
  95. 'repeated' => true,
  96. ],
  97. 'filter' => [
  98. 'location' => 'query',
  99. 'type' => 'string',
  100. ],
  101. 'pageSize' => [
  102. 'location' => 'query',
  103. 'type' => 'integer',
  104. ],
  105. 'pageToken' => [
  106. 'location' => 'query',
  107. 'type' => 'string',
  108. ],
  109. ],
  110. ],'updateCmekConfig' => [
  111. 'path' => 'v1/{+name}',
  112. 'httpMethod' => 'PATCH',
  113. 'parameters' => [
  114. 'name' => [
  115. 'location' => 'path',
  116. 'type' => 'string',
  117. 'required' => true,
  118. ],
  119. 'updateMask' => [
  120. 'location' => 'query',
  121. 'type' => 'string',
  122. ],
  123. ],
  124. ],
  125. ]
  126. ]
  127. );
  128. $this->projects_locations_jobs = new CloudScheduler\Resource\ProjectsLocationsJobs(
  129. $this,
  130. $this->serviceName,
  131. 'jobs',
  132. [
  133. 'methods' => [
  134. 'create' => [
  135. 'path' => 'v1/{+parent}/jobs',
  136. 'httpMethod' => 'POST',
  137. 'parameters' => [
  138. 'parent' => [
  139. 'location' => 'path',
  140. 'type' => 'string',
  141. 'required' => true,
  142. ],
  143. ],
  144. ],'delete' => [
  145. 'path' => 'v1/{+name}',
  146. 'httpMethod' => 'DELETE',
  147. 'parameters' => [
  148. 'name' => [
  149. 'location' => 'path',
  150. 'type' => 'string',
  151. 'required' => true,
  152. ],
  153. ],
  154. ],'get' => [
  155. 'path' => 'v1/{+name}',
  156. 'httpMethod' => 'GET',
  157. 'parameters' => [
  158. 'name' => [
  159. 'location' => 'path',
  160. 'type' => 'string',
  161. 'required' => true,
  162. ],
  163. ],
  164. ],'list' => [
  165. 'path' => 'v1/{+parent}/jobs',
  166. 'httpMethod' => 'GET',
  167. 'parameters' => [
  168. 'parent' => [
  169. 'location' => 'path',
  170. 'type' => 'string',
  171. 'required' => true,
  172. ],
  173. 'pageSize' => [
  174. 'location' => 'query',
  175. 'type' => 'integer',
  176. ],
  177. 'pageToken' => [
  178. 'location' => 'query',
  179. 'type' => 'string',
  180. ],
  181. ],
  182. ],'patch' => [
  183. 'path' => 'v1/{+name}',
  184. 'httpMethod' => 'PATCH',
  185. 'parameters' => [
  186. 'name' => [
  187. 'location' => 'path',
  188. 'type' => 'string',
  189. 'required' => true,
  190. ],
  191. 'updateMask' => [
  192. 'location' => 'query',
  193. 'type' => 'string',
  194. ],
  195. ],
  196. ],'pause' => [
  197. 'path' => 'v1/{+name}:pause',
  198. 'httpMethod' => 'POST',
  199. 'parameters' => [
  200. 'name' => [
  201. 'location' => 'path',
  202. 'type' => 'string',
  203. 'required' => true,
  204. ],
  205. ],
  206. ],'resume' => [
  207. 'path' => 'v1/{+name}:resume',
  208. 'httpMethod' => 'POST',
  209. 'parameters' => [
  210. 'name' => [
  211. 'location' => 'path',
  212. 'type' => 'string',
  213. 'required' => true,
  214. ],
  215. ],
  216. ],'run' => [
  217. 'path' => 'v1/{+name}:run',
  218. 'httpMethod' => 'POST',
  219. 'parameters' => [
  220. 'name' => [
  221. 'location' => 'path',
  222. 'type' => 'string',
  223. 'required' => true,
  224. ],
  225. ],
  226. ],
  227. ]
  228. ]
  229. );
  230. $this->projects_locations_operations = new CloudScheduler\Resource\ProjectsLocationsOperations(
  231. $this,
  232. $this->serviceName,
  233. 'operations',
  234. [
  235. 'methods' => [
  236. 'cancel' => [
  237. 'path' => 'v1/{+name}:cancel',
  238. 'httpMethod' => 'POST',
  239. 'parameters' => [
  240. 'name' => [
  241. 'location' => 'path',
  242. 'type' => 'string',
  243. 'required' => true,
  244. ],
  245. ],
  246. ],'delete' => [
  247. 'path' => 'v1/{+name}',
  248. 'httpMethod' => 'DELETE',
  249. 'parameters' => [
  250. 'name' => [
  251. 'location' => 'path',
  252. 'type' => 'string',
  253. 'required' => true,
  254. ],
  255. ],
  256. ],'get' => [
  257. 'path' => 'v1/{+name}',
  258. 'httpMethod' => 'GET',
  259. 'parameters' => [
  260. 'name' => [
  261. 'location' => 'path',
  262. 'type' => 'string',
  263. 'required' => true,
  264. ],
  265. ],
  266. ],'list' => [
  267. 'path' => 'v1/{+name}/operations',
  268. 'httpMethod' => 'GET',
  269. 'parameters' => [
  270. 'name' => [
  271. 'location' => 'path',
  272. 'type' => 'string',
  273. 'required' => true,
  274. ],
  275. 'filter' => [
  276. 'location' => 'query',
  277. 'type' => 'string',
  278. ],
  279. 'pageSize' => [
  280. 'location' => 'query',
  281. 'type' => 'integer',
  282. ],
  283. 'pageToken' => [
  284. 'location' => 'query',
  285. 'type' => 'string',
  286. ],
  287. 'returnPartialSuccess' => [
  288. 'location' => 'query',
  289. 'type' => 'boolean',
  290. ],
  291. ],
  292. ],
  293. ]
  294. ]
  295. );
  296. }
  297. }
  298. // Adding a class alias for backwards compatibility with the previous class name.
  299. class_alias(CloudScheduler::class, 'Google_Service_CloudScheduler');