source: vendor/google/apiclient-services/src/CloudRun/Resource/ProjectsLocationsJobs.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload project files

  • Property mode set to 100644
File size: 9.9 KB
Line 
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
18namespace Google\Service\CloudRun\Resource;
19
20use Google\Service\CloudRun\GoogleCloudRunV2Job;
21use Google\Service\CloudRun\GoogleCloudRunV2ListJobsResponse;
22use Google\Service\CloudRun\GoogleCloudRunV2RunJobRequest;
23use Google\Service\CloudRun\GoogleIamV1Policy;
24use Google\Service\CloudRun\GoogleIamV1SetIamPolicyRequest;
25use Google\Service\CloudRun\GoogleIamV1TestIamPermissionsRequest;
26use Google\Service\CloudRun\GoogleIamV1TestIamPermissionsResponse;
27use Google\Service\CloudRun\GoogleLongrunningOperation;
28
29/**
30 * The "jobs" collection of methods.
31 * Typical usage is:
32 * <code>
33 * $runService = new Google\Service\CloudRun(...);
34 * $jobs = $runService->projects_locations_jobs;
35 * </code>
36 */
37class ProjectsLocationsJobs extends \Google\Service\Resource
38{
39 /**
40 * Creates a Job. (jobs.create)
41 *
42 * @param string $parent Required. The location and project in which this Job
43 * should be created. Format: projects/{project}/locations/{location}, where
44 * {project} can be project id or number.
45 * @param GoogleCloudRunV2Job $postBody
46 * @param array $optParams Optional parameters.
47 *
48 * @opt_param string jobId Required. The unique identifier for the Job. The name
49 * of the job becomes {parent}/jobs/{job_id}.
50 * @opt_param bool validateOnly Indicates that the request should be validated
51 * and default values populated, without persisting the request or creating any
52 * resources.
53 * @return GoogleLongrunningOperation
54 * @throws \Google\Service\Exception
55 */
56 public function create($parent, GoogleCloudRunV2Job $postBody, $optParams = [])
57 {
58 $params = ['parent' => $parent, 'postBody' => $postBody];
59 $params = array_merge($params, $optParams);
60 return $this->call('create', [$params], GoogleLongrunningOperation::class);
61 }
62 /**
63 * Deletes a Job. (jobs.delete)
64 *
65 * @param string $name Required. The full name of the Job. Format:
66 * projects/{project}/locations/{location}/jobs/{job}, where {project} can be
67 * project id or number.
68 * @param array $optParams Optional parameters.
69 *
70 * @opt_param string etag A system-generated fingerprint for this version of the
71 * resource. May be used to detect modification conflict during updates.
72 * @opt_param bool validateOnly Indicates that the request should be validated
73 * without actually deleting any resources.
74 * @return GoogleLongrunningOperation
75 * @throws \Google\Service\Exception
76 */
77 public function delete($name, $optParams = [])
78 {
79 $params = ['name' => $name];
80 $params = array_merge($params, $optParams);
81 return $this->call('delete', [$params], GoogleLongrunningOperation::class);
82 }
83 /**
84 * Gets information about a Job. (jobs.get)
85 *
86 * @param string $name Required. The full name of the Job. Format:
87 * projects/{project}/locations/{location}/jobs/{job}, where {project} can be
88 * project id or number.
89 * @param array $optParams Optional parameters.
90 * @return GoogleCloudRunV2Job
91 * @throws \Google\Service\Exception
92 */
93 public function get($name, $optParams = [])
94 {
95 $params = ['name' => $name];
96 $params = array_merge($params, $optParams);
97 return $this->call('get', [$params], GoogleCloudRunV2Job::class);
98 }
99 /**
100 * Gets the IAM Access Control policy currently in effect for the given Job.
101 * This result does not include any inherited policies. (jobs.getIamPolicy)
102 *
103 * @param string $resource REQUIRED: The resource for which the policy is being
104 * requested. See [Resource
105 * names](https://cloud.google.com/apis/design/resource_names) for the
106 * appropriate value for this field.
107 * @param array $optParams Optional parameters.
108 *
109 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
110 * version that will be used to format the policy. Valid values are 0, 1, and 3.
111 * Requests specifying an invalid value will be rejected. Requests for policies
112 * with any conditional role bindings must specify version 3. Policies with no
113 * conditional role bindings may specify any valid value or leave the field
114 * unset. The policy in the response might use the policy version that you
115 * specified, or it might use a lower policy version. For example, if you
116 * specify version 3, but the policy has no conditional role bindings, the
117 * response uses version 1. To learn which resources support conditions in their
118 * IAM policies, see the [IAM
119 * documentation](https://cloud.google.com/iam/help/conditions/resource-
120 * policies).
121 * @return GoogleIamV1Policy
122 * @throws \Google\Service\Exception
123 */
124 public function getIamPolicy($resource, $optParams = [])
125 {
126 $params = ['resource' => $resource];
127 $params = array_merge($params, $optParams);
128 return $this->call('getIamPolicy', [$params], GoogleIamV1Policy::class);
129 }
130 /**
131 * Lists Jobs. Results are sorted by creation time, descending.
132 * (jobs.listProjectsLocationsJobs)
133 *
134 * @param string $parent Required. The location and project to list resources
135 * on. Format: projects/{project}/locations/{location}, where {project} can be
136 * project id or number.
137 * @param array $optParams Optional parameters.
138 *
139 * @opt_param int pageSize Maximum number of Jobs to return in this call.
140 * @opt_param string pageToken A page token received from a previous call to
141 * ListJobs. All other parameters must match.
142 * @opt_param bool showDeleted If true, returns deleted (but unexpired)
143 * resources along with active ones.
144 * @return GoogleCloudRunV2ListJobsResponse
145 * @throws \Google\Service\Exception
146 */
147 public function listProjectsLocationsJobs($parent, $optParams = [])
148 {
149 $params = ['parent' => $parent];
150 $params = array_merge($params, $optParams);
151 return $this->call('list', [$params], GoogleCloudRunV2ListJobsResponse::class);
152 }
153 /**
154 * Updates a Job. (jobs.patch)
155 *
156 * @param string $name The fully qualified name of this Job. Format:
157 * projects/{project}/locations/{location}/jobs/{job}
158 * @param GoogleCloudRunV2Job $postBody
159 * @param array $optParams Optional parameters.
160 *
161 * @opt_param bool allowMissing Optional. If set to true, and if the Job does
162 * not exist, it will create a new one. Caller must have both create and update
163 * permissions for this call if this is set to true.
164 * @opt_param bool validateOnly Indicates that the request should be validated
165 * and default values populated, without persisting the request or updating any
166 * resources.
167 * @return GoogleLongrunningOperation
168 * @throws \Google\Service\Exception
169 */
170 public function patch($name, GoogleCloudRunV2Job $postBody, $optParams = [])
171 {
172 $params = ['name' => $name, 'postBody' => $postBody];
173 $params = array_merge($params, $optParams);
174 return $this->call('patch', [$params], GoogleLongrunningOperation::class);
175 }
176 /**
177 * Triggers creation of a new Execution of this Job. (jobs.run)
178 *
179 * @param string $name Required. The full name of the Job. Format:
180 * projects/{project}/locations/{location}/jobs/{job}, where {project} can be
181 * project id or number.
182 * @param GoogleCloudRunV2RunJobRequest $postBody
183 * @param array $optParams Optional parameters.
184 * @return GoogleLongrunningOperation
185 * @throws \Google\Service\Exception
186 */
187 public function run($name, GoogleCloudRunV2RunJobRequest $postBody, $optParams = [])
188 {
189 $params = ['name' => $name, 'postBody' => $postBody];
190 $params = array_merge($params, $optParams);
191 return $this->call('run', [$params], GoogleLongrunningOperation::class);
192 }
193 /**
194 * Sets the IAM Access control policy for the specified Job. Overwrites any
195 * existing policy. (jobs.setIamPolicy)
196 *
197 * @param string $resource REQUIRED: The resource for which the policy is being
198 * specified. See [Resource
199 * names](https://cloud.google.com/apis/design/resource_names) for the
200 * appropriate value for this field.
201 * @param GoogleIamV1SetIamPolicyRequest $postBody
202 * @param array $optParams Optional parameters.
203 * @return GoogleIamV1Policy
204 * @throws \Google\Service\Exception
205 */
206 public function setIamPolicy($resource, GoogleIamV1SetIamPolicyRequest $postBody, $optParams = [])
207 {
208 $params = ['resource' => $resource, 'postBody' => $postBody];
209 $params = array_merge($params, $optParams);
210 return $this->call('setIamPolicy', [$params], GoogleIamV1Policy::class);
211 }
212 /**
213 * Returns permissions that a caller has on the specified Project. There are no
214 * permissions required for making this API call. (jobs.testIamPermissions)
215 *
216 * @param string $resource REQUIRED: The resource for which the policy detail is
217 * being requested. See [Resource
218 * names](https://cloud.google.com/apis/design/resource_names) for the
219 * appropriate value for this field.
220 * @param GoogleIamV1TestIamPermissionsRequest $postBody
221 * @param array $optParams Optional parameters.
222 * @return GoogleIamV1TestIamPermissionsResponse
223 * @throws \Google\Service\Exception
224 */
225 public function testIamPermissions($resource, GoogleIamV1TestIamPermissionsRequest $postBody, $optParams = [])
226 {
227 $params = ['resource' => $resource, 'postBody' => $postBody];
228 $params = array_merge($params, $optParams);
229 return $this->call('testIamPermissions', [$params], GoogleIamV1TestIamPermissionsResponse::class);
230 }
231}
232
233// Adding a class alias for backwards compatibility with the previous class name.
234class_alias(ProjectsLocationsJobs::class, 'Google_Service_CloudRun_Resource_ProjectsLocationsJobs');
Note: See TracBrowser for help on using the repository browser.