PageRenderTime 47ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/application/third_party/google-api/vendor/google/apiclient-services/src/Google/Service/Dataproc/Resource/ProjectsRegionsJobs.php

https://gitlab.com/Anas7232/Layout-Changes
PHP | 211 lines | 58 code | 1 blank | 152 comment | 0 complexity | 774e3f91e7d46ec20030383682062561 MD5 | raw file
  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. /**
  18. * The "jobs" collection of methods.
  19. * Typical usage is:
  20. * <code>
  21. * $dataprocService = new Google_Service_Dataproc(...);
  22. * $jobs = $dataprocService->jobs;
  23. * </code>
  24. */
  25. class Google_Service_Dataproc_Resource_ProjectsRegionsJobs extends Google_Service_Resource
  26. {
  27. /**
  28. * Starts a job cancellation request. To access the job resource after
  29. * cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get.
  30. * (jobs.cancel)
  31. *
  32. * @param string $projectId Required. The ID of the Google Cloud Platform
  33. * project that the job belongs to.
  34. * @param string $region Required. The Cloud Dataproc region in which to handle
  35. * the request.
  36. * @param string $jobId Required. The job ID.
  37. * @param Google_Service_Dataproc_CancelJobRequest $postBody
  38. * @param array $optParams Optional parameters.
  39. * @return Google_Service_Dataproc_Job
  40. */
  41. public function cancel($projectId, $region, $jobId, Google_Service_Dataproc_CancelJobRequest $postBody, $optParams = array())
  42. {
  43. $params = array('projectId' => $projectId, 'region' => $region, 'jobId' => $jobId, 'postBody' => $postBody);
  44. $params = array_merge($params, $optParams);
  45. return $this->call('cancel', array($params), "Google_Service_Dataproc_Job");
  46. }
  47. /**
  48. * Deletes the job from the project. If the job is active, the delete fails, and
  49. * the response returns FAILED_PRECONDITION. (jobs.delete)
  50. *
  51. * @param string $projectId Required. The ID of the Google Cloud Platform
  52. * project that the job belongs to.
  53. * @param string $region Required. The Cloud Dataproc region in which to handle
  54. * the request.
  55. * @param string $jobId Required. The job ID.
  56. * @param array $optParams Optional parameters.
  57. * @return Google_Service_Dataproc_DataprocEmpty
  58. */
  59. public function delete($projectId, $region, $jobId, $optParams = array())
  60. {
  61. $params = array('projectId' => $projectId, 'region' => $region, 'jobId' => $jobId);
  62. $params = array_merge($params, $optParams);
  63. return $this->call('delete', array($params), "Google_Service_Dataproc_DataprocEmpty");
  64. }
  65. /**
  66. * Gets the resource representation for a job in a project. (jobs.get)
  67. *
  68. * @param string $projectId Required. The ID of the Google Cloud Platform
  69. * project that the job belongs to.
  70. * @param string $region Required. The Cloud Dataproc region in which to handle
  71. * the request.
  72. * @param string $jobId Required. The job ID.
  73. * @param array $optParams Optional parameters.
  74. * @return Google_Service_Dataproc_Job
  75. */
  76. public function get($projectId, $region, $jobId, $optParams = array())
  77. {
  78. $params = array('projectId' => $projectId, 'region' => $region, 'jobId' => $jobId);
  79. $params = array_merge($params, $optParams);
  80. return $this->call('get', array($params), "Google_Service_Dataproc_Job");
  81. }
  82. /**
  83. * Gets the access control policy for a resource. Returns an empty policy if the
  84. * resource exists and does not have a policy set. (jobs.getIamPolicy)
  85. *
  86. * @param string $resource REQUIRED: The resource for which the policy is being
  87. * requested. See the operation documentation for the appropriate value for this
  88. * field.
  89. * @param Google_Service_Dataproc_GetIamPolicyRequest $postBody
  90. * @param array $optParams Optional parameters.
  91. * @return Google_Service_Dataproc_Policy
  92. */
  93. public function getIamPolicy($resource, Google_Service_Dataproc_GetIamPolicyRequest $postBody, $optParams = array())
  94. {
  95. $params = array('resource' => $resource, 'postBody' => $postBody);
  96. $params = array_merge($params, $optParams);
  97. return $this->call('getIamPolicy', array($params), "Google_Service_Dataproc_Policy");
  98. }
  99. /**
  100. * Lists regions/{region}/jobs in a project. (jobs.listProjectsRegionsJobs)
  101. *
  102. * @param string $projectId Required. The ID of the Google Cloud Platform
  103. * project that the job belongs to.
  104. * @param string $region Required. The Cloud Dataproc region in which to handle
  105. * the request.
  106. * @param array $optParams Optional parameters.
  107. *
  108. * @opt_param string pageToken Optional. The page token, returned by a previous
  109. * call, to request the next page of results.
  110. * @opt_param int pageSize Optional. The number of results to return in each
  111. * response.
  112. * @opt_param string clusterName Optional. If set, the returned jobs list
  113. * includes only jobs that were submitted to the named cluster.
  114. * @opt_param string filter Optional. A filter constraining the jobs to list.
  115. * Filters are case-sensitive and have the following syntax:field = value AND
  116. * field = value ...where field is status.state or labels.[KEY], and [KEY] is a
  117. * label key. value can be * to match all values. status.state can be either
  118. * ACTIVE or NON_ACTIVE. Only the logical AND operator is supported; space-
  119. * separated items are treated as having an implicit AND operator.Example
  120. * filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = *
  121. * @opt_param string jobStateMatcher Optional. Specifies enumerated categories
  122. * of jobs to list. (default = match ALL jobs).If filter is provided,
  123. * jobStateMatcher will be ignored.
  124. * @return Google_Service_Dataproc_ListJobsResponse
  125. */
  126. public function listProjectsRegionsJobs($projectId, $region, $optParams = array())
  127. {
  128. $params = array('projectId' => $projectId, 'region' => $region);
  129. $params = array_merge($params, $optParams);
  130. return $this->call('list', array($params), "Google_Service_Dataproc_ListJobsResponse");
  131. }
  132. /**
  133. * Updates a job in a project. (jobs.patch)
  134. *
  135. * @param string $projectId Required. The ID of the Google Cloud Platform
  136. * project that the job belongs to.
  137. * @param string $region Required. The Cloud Dataproc region in which to handle
  138. * the request.
  139. * @param string $jobId Required. The job ID.
  140. * @param Google_Service_Dataproc_Job $postBody
  141. * @param array $optParams Optional parameters.
  142. *
  143. * @opt_param string updateMask Required. Specifies the path, relative to Job,
  144. * of the field to update. For example, to update the labels of a Job the
  145. * update_mask parameter would be specified as labels, and the PATCH request
  146. * body would specify the new value. Note: Currently, labels is the only field
  147. * that can be updated.
  148. * @return Google_Service_Dataproc_Job
  149. */
  150. public function patch($projectId, $region, $jobId, Google_Service_Dataproc_Job $postBody, $optParams = array())
  151. {
  152. $params = array('projectId' => $projectId, 'region' => $region, 'jobId' => $jobId, 'postBody' => $postBody);
  153. $params = array_merge($params, $optParams);
  154. return $this->call('patch', array($params), "Google_Service_Dataproc_Job");
  155. }
  156. /**
  157. * Sets the access control policy on the specified resource. Replaces any
  158. * existing policy. (jobs.setIamPolicy)
  159. *
  160. * @param string $resource REQUIRED: The resource for which the policy is being
  161. * specified. See the operation documentation for the appropriate value for this
  162. * field.
  163. * @param Google_Service_Dataproc_SetIamPolicyRequest $postBody
  164. * @param array $optParams Optional parameters.
  165. * @return Google_Service_Dataproc_Policy
  166. */
  167. public function setIamPolicy($resource, Google_Service_Dataproc_SetIamPolicyRequest $postBody, $optParams = array())
  168. {
  169. $params = array('resource' => $resource, 'postBody' => $postBody);
  170. $params = array_merge($params, $optParams);
  171. return $this->call('setIamPolicy', array($params), "Google_Service_Dataproc_Policy");
  172. }
  173. /**
  174. * Submits a job to a cluster. (jobs.submit)
  175. *
  176. * @param string $projectId Required. The ID of the Google Cloud Platform
  177. * project that the job belongs to.
  178. * @param string $region Required. The Cloud Dataproc region in which to handle
  179. * the request.
  180. * @param Google_Service_Dataproc_SubmitJobRequest $postBody
  181. * @param array $optParams Optional parameters.
  182. * @return Google_Service_Dataproc_Job
  183. */
  184. public function submit($projectId, $region, Google_Service_Dataproc_SubmitJobRequest $postBody, $optParams = array())
  185. {
  186. $params = array('projectId' => $projectId, 'region' => $region, 'postBody' => $postBody);
  187. $params = array_merge($params, $optParams);
  188. return $this->call('submit', array($params), "Google_Service_Dataproc_Job");
  189. }
  190. /**
  191. * Returns permissions that a caller has on the specified resource. If the
  192. * resource does not exist, this will return an empty set of permissions, not a
  193. * NOT_FOUND error.Note: This operation is designed to be used for building
  194. * permission-aware UIs and command-line tools, not for authorization checking.
  195. * This operation may "fail open" without warning. (jobs.testIamPermissions)
  196. *
  197. * @param string $resource REQUIRED: The resource for which the policy detail is
  198. * being requested. See the operation documentation for the appropriate value
  199. * for this field.
  200. * @param Google_Service_Dataproc_TestIamPermissionsRequest $postBody
  201. * @param array $optParams Optional parameters.
  202. * @return Google_Service_Dataproc_TestIamPermissionsResponse
  203. */
  204. public function testIamPermissions($resource, Google_Service_Dataproc_TestIamPermissionsRequest $postBody, $optParams = array())
  205. {
  206. $params = array('resource' => $resource, 'postBody' => $postBody);
  207. $params = array_merge($params, $optParams);
  208. return $this->call('testIamPermissions', array($params), "Google_Service_Dataproc_TestIamPermissionsResponse");
  209. }
  210. }