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 | namespace Google\Service\CloudDataplex\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CloudDataplex\GoogleCloudDataplexV1ListTasksResponse;
|
---|
21 | use Google\Service\CloudDataplex\GoogleCloudDataplexV1RunTaskRequest;
|
---|
22 | use Google\Service\CloudDataplex\GoogleCloudDataplexV1RunTaskResponse;
|
---|
23 | use Google\Service\CloudDataplex\GoogleCloudDataplexV1Task;
|
---|
24 | use Google\Service\CloudDataplex\GoogleIamV1Policy;
|
---|
25 | use Google\Service\CloudDataplex\GoogleIamV1SetIamPolicyRequest;
|
---|
26 | use Google\Service\CloudDataplex\GoogleIamV1TestIamPermissionsRequest;
|
---|
27 | use Google\Service\CloudDataplex\GoogleIamV1TestIamPermissionsResponse;
|
---|
28 | use Google\Service\CloudDataplex\GoogleLongrunningOperation;
|
---|
29 |
|
---|
30 | /**
|
---|
31 | * The "tasks" collection of methods.
|
---|
32 | * Typical usage is:
|
---|
33 | * <code>
|
---|
34 | * $dataplexService = new Google\Service\CloudDataplex(...);
|
---|
35 | * $tasks = $dataplexService->projects_locations_lakes_tasks;
|
---|
36 | * </code>
|
---|
37 | */
|
---|
38 | class ProjectsLocationsLakesTasks extends \Google\Service\Resource
|
---|
39 | {
|
---|
40 | /**
|
---|
41 | * Creates a task resource within a lake. (tasks.create)
|
---|
42 | *
|
---|
43 | * @param string $parent Required. The resource name of the parent lake:
|
---|
44 | * projects/{project_number}/locations/{location_id}/lakes/{lake_id}.
|
---|
45 | * @param GoogleCloudDataplexV1Task $postBody
|
---|
46 | * @param array $optParams Optional parameters.
|
---|
47 | *
|
---|
48 | * @opt_param string taskId Required. Task identifier.
|
---|
49 | * @opt_param bool validateOnly Optional. Only validate the request, but do not
|
---|
50 | * perform mutations. The default is false.
|
---|
51 | * @return GoogleLongrunningOperation
|
---|
52 | * @throws \Google\Service\Exception
|
---|
53 | */
|
---|
54 | public function create($parent, GoogleCloudDataplexV1Task $postBody, $optParams = [])
|
---|
55 | {
|
---|
56 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
57 | $params = array_merge($params, $optParams);
|
---|
58 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
59 | }
|
---|
60 | /**
|
---|
61 | * Delete the task resource. (tasks.delete)
|
---|
62 | *
|
---|
63 | * @param string $name Required. The resource name of the task: projects/{projec
|
---|
64 | * t_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}.
|
---|
65 | * @param array $optParams Optional parameters.
|
---|
66 | * @return GoogleLongrunningOperation
|
---|
67 | * @throws \Google\Service\Exception
|
---|
68 | */
|
---|
69 | public function delete($name, $optParams = [])
|
---|
70 | {
|
---|
71 | $params = ['name' => $name];
|
---|
72 | $params = array_merge($params, $optParams);
|
---|
73 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
74 | }
|
---|
75 | /**
|
---|
76 | * Get task resource. (tasks.get)
|
---|
77 | *
|
---|
78 | * @param string $name Required. The resource name of the task: projects/{projec
|
---|
79 | * t_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}.
|
---|
80 | * @param array $optParams Optional parameters.
|
---|
81 | * @return GoogleCloudDataplexV1Task
|
---|
82 | * @throws \Google\Service\Exception
|
---|
83 | */
|
---|
84 | public function get($name, $optParams = [])
|
---|
85 | {
|
---|
86 | $params = ['name' => $name];
|
---|
87 | $params = array_merge($params, $optParams);
|
---|
88 | return $this->call('get', [$params], GoogleCloudDataplexV1Task::class);
|
---|
89 | }
|
---|
90 | /**
|
---|
91 | * Gets the access control policy for a resource. Returns an empty policy if the
|
---|
92 | * resource exists and does not have a policy set. (tasks.getIamPolicy)
|
---|
93 | *
|
---|
94 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
95 | * requested. See Resource names
|
---|
96 | * (https://cloud.google.com/apis/design/resource_names) for the appropriate
|
---|
97 | * value for this field.
|
---|
98 | * @param array $optParams Optional parameters.
|
---|
99 | *
|
---|
100 | * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
|
---|
101 | * version that will be used to format the policy.Valid values are 0, 1, and 3.
|
---|
102 | * Requests specifying an invalid value will be rejected.Requests for policies
|
---|
103 | * with any conditional role bindings must specify version 3. Policies with no
|
---|
104 | * conditional role bindings may specify any valid value or leave the field
|
---|
105 | * unset.The policy in the response might use the policy version that you
|
---|
106 | * specified, or it might use a lower policy version. For example, if you
|
---|
107 | * specify version 3, but the policy has no conditional role bindings, the
|
---|
108 | * response uses version 1.To learn which resources support conditions in their
|
---|
109 | * IAM policies, see the IAM documentation
|
---|
110 | * (https://cloud.google.com/iam/help/conditions/resource-policies).
|
---|
111 | * @return GoogleIamV1Policy
|
---|
112 | * @throws \Google\Service\Exception
|
---|
113 | */
|
---|
114 | public function getIamPolicy($resource, $optParams = [])
|
---|
115 | {
|
---|
116 | $params = ['resource' => $resource];
|
---|
117 | $params = array_merge($params, $optParams);
|
---|
118 | return $this->call('getIamPolicy', [$params], GoogleIamV1Policy::class);
|
---|
119 | }
|
---|
120 | /**
|
---|
121 | * Lists tasks under the given lake. (tasks.listProjectsLocationsLakesTasks)
|
---|
122 | *
|
---|
123 | * @param string $parent Required. The resource name of the parent lake:
|
---|
124 | * projects/{project_number}/locations/{location_id}/lakes/{lake_id}.
|
---|
125 | * @param array $optParams Optional parameters.
|
---|
126 | *
|
---|
127 | * @opt_param string filter Optional. Filter request.
|
---|
128 | * @opt_param string orderBy Optional. Order by fields for the result.
|
---|
129 | * @opt_param int pageSize Optional. Maximum number of tasks to return. The
|
---|
130 | * service may return fewer than this value. If unspecified, at most 10 tasks
|
---|
131 | * will be returned. The maximum value is 1000; values above 1000 will be
|
---|
132 | * coerced to 1000.
|
---|
133 | * @opt_param string pageToken Optional. Page token received from a previous
|
---|
134 | * ListZones call. Provide this to retrieve the subsequent page. When
|
---|
135 | * paginating, all other parameters provided to ListZones must match the call
|
---|
136 | * that provided the page token.
|
---|
137 | * @return GoogleCloudDataplexV1ListTasksResponse
|
---|
138 | * @throws \Google\Service\Exception
|
---|
139 | */
|
---|
140 | public function listProjectsLocationsLakesTasks($parent, $optParams = [])
|
---|
141 | {
|
---|
142 | $params = ['parent' => $parent];
|
---|
143 | $params = array_merge($params, $optParams);
|
---|
144 | return $this->call('list', [$params], GoogleCloudDataplexV1ListTasksResponse::class);
|
---|
145 | }
|
---|
146 | /**
|
---|
147 | * Update the task resource. (tasks.patch)
|
---|
148 | *
|
---|
149 | * @param string $name Output only. The relative resource name of the task, of
|
---|
150 | * the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/
|
---|
151 | * tasks/{task_id}.
|
---|
152 | * @param GoogleCloudDataplexV1Task $postBody
|
---|
153 | * @param array $optParams Optional parameters.
|
---|
154 | *
|
---|
155 | * @opt_param string updateMask Required. Mask of fields to update.
|
---|
156 | * @opt_param bool validateOnly Optional. Only validate the request, but do not
|
---|
157 | * perform mutations. The default is false.
|
---|
158 | * @return GoogleLongrunningOperation
|
---|
159 | * @throws \Google\Service\Exception
|
---|
160 | */
|
---|
161 | public function patch($name, GoogleCloudDataplexV1Task $postBody, $optParams = [])
|
---|
162 | {
|
---|
163 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
164 | $params = array_merge($params, $optParams);
|
---|
165 | return $this->call('patch', [$params], GoogleLongrunningOperation::class);
|
---|
166 | }
|
---|
167 | /**
|
---|
168 | * Run an on demand execution of a Task. (tasks.run)
|
---|
169 | *
|
---|
170 | * @param string $name Required. The resource name of the task: projects/{projec
|
---|
171 | * t_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}.
|
---|
172 | * @param GoogleCloudDataplexV1RunTaskRequest $postBody
|
---|
173 | * @param array $optParams Optional parameters.
|
---|
174 | * @return GoogleCloudDataplexV1RunTaskResponse
|
---|
175 | * @throws \Google\Service\Exception
|
---|
176 | */
|
---|
177 | public function run($name, GoogleCloudDataplexV1RunTaskRequest $postBody, $optParams = [])
|
---|
178 | {
|
---|
179 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
180 | $params = array_merge($params, $optParams);
|
---|
181 | return $this->call('run', [$params], GoogleCloudDataplexV1RunTaskResponse::class);
|
---|
182 | }
|
---|
183 | /**
|
---|
184 | * Sets the access control policy on the specified resource. Replaces any
|
---|
185 | * existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
|
---|
186 | * errors. (tasks.setIamPolicy)
|
---|
187 | *
|
---|
188 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
189 | * specified. See Resource names
|
---|
190 | * (https://cloud.google.com/apis/design/resource_names) for the appropriate
|
---|
191 | * value for this field.
|
---|
192 | * @param GoogleIamV1SetIamPolicyRequest $postBody
|
---|
193 | * @param array $optParams Optional parameters.
|
---|
194 | * @return GoogleIamV1Policy
|
---|
195 | * @throws \Google\Service\Exception
|
---|
196 | */
|
---|
197 | public function setIamPolicy($resource, GoogleIamV1SetIamPolicyRequest $postBody, $optParams = [])
|
---|
198 | {
|
---|
199 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
200 | $params = array_merge($params, $optParams);
|
---|
201 | return $this->call('setIamPolicy', [$params], GoogleIamV1Policy::class);
|
---|
202 | }
|
---|
203 | /**
|
---|
204 | * Returns permissions that a caller has on the specified resource. If the
|
---|
205 | * resource does not exist, this will return an empty set of permissions, not a
|
---|
206 | * NOT_FOUND error.Note: This operation is designed to be used for building
|
---|
207 | * permission-aware UIs and command-line tools, not for authorization checking.
|
---|
208 | * This operation may "fail open" without warning. (tasks.testIamPermissions)
|
---|
209 | *
|
---|
210 | * @param string $resource REQUIRED: The resource for which the policy detail is
|
---|
211 | * being requested. See Resource names
|
---|
212 | * (https://cloud.google.com/apis/design/resource_names) for the appropriate
|
---|
213 | * value for this field.
|
---|
214 | * @param GoogleIamV1TestIamPermissionsRequest $postBody
|
---|
215 | * @param array $optParams Optional parameters.
|
---|
216 | * @return GoogleIamV1TestIamPermissionsResponse
|
---|
217 | * @throws \Google\Service\Exception
|
---|
218 | */
|
---|
219 | public function testIamPermissions($resource, GoogleIamV1TestIamPermissionsRequest $postBody, $optParams = [])
|
---|
220 | {
|
---|
221 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
222 | $params = array_merge($params, $optParams);
|
---|
223 | return $this->call('testIamPermissions', [$params], GoogleIamV1TestIamPermissionsResponse::class);
|
---|
224 | }
|
---|
225 | }
|
---|
226 |
|
---|
227 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
228 | class_alias(ProjectsLocationsLakesTasks::class, 'Google_Service_CloudDataplex_Resource_ProjectsLocationsLakesTasks');
|
---|