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\DataplexEmpty;
|
---|
21 | use Google\Service\CloudDataplex\GoogleCloudDataplexV1CancelJobRequest;
|
---|
22 | use Google\Service\CloudDataplex\GoogleCloudDataplexV1Job;
|
---|
23 | use Google\Service\CloudDataplex\GoogleCloudDataplexV1ListJobsResponse;
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * The "jobs" collection of methods.
|
---|
27 | * Typical usage is:
|
---|
28 | * <code>
|
---|
29 | * $dataplexService = new Google\Service\CloudDataplex(...);
|
---|
30 | * $jobs = $dataplexService->projects_locations_lakes_tasks_jobs;
|
---|
31 | * </code>
|
---|
32 | */
|
---|
33 | class ProjectsLocationsLakesTasksJobs extends \Google\Service\Resource
|
---|
34 | {
|
---|
35 | /**
|
---|
36 | * Cancel jobs running for the task resource. (jobs.cancel)
|
---|
37 | *
|
---|
38 | * @param string $name Required. The resource name of the job: projects/{project
|
---|
39 | * _number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}.
|
---|
40 | * @param GoogleCloudDataplexV1CancelJobRequest $postBody
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | * @return DataplexEmpty
|
---|
43 | * @throws \Google\Service\Exception
|
---|
44 | */
|
---|
45 | public function cancel($name, GoogleCloudDataplexV1CancelJobRequest $postBody, $optParams = [])
|
---|
46 | {
|
---|
47 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
48 | $params = array_merge($params, $optParams);
|
---|
49 | return $this->call('cancel', [$params], DataplexEmpty::class);
|
---|
50 | }
|
---|
51 | /**
|
---|
52 | * Get job resource. (jobs.get)
|
---|
53 | *
|
---|
54 | * @param string $name Required. The resource name of the job: projects/{project
|
---|
55 | * _number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id
|
---|
56 | * }.
|
---|
57 | * @param array $optParams Optional parameters.
|
---|
58 | * @return GoogleCloudDataplexV1Job
|
---|
59 | * @throws \Google\Service\Exception
|
---|
60 | */
|
---|
61 | public function get($name, $optParams = [])
|
---|
62 | {
|
---|
63 | $params = ['name' => $name];
|
---|
64 | $params = array_merge($params, $optParams);
|
---|
65 | return $this->call('get', [$params], GoogleCloudDataplexV1Job::class);
|
---|
66 | }
|
---|
67 | /**
|
---|
68 | * Lists Jobs under the given task. (jobs.listProjectsLocationsLakesTasksJobs)
|
---|
69 | *
|
---|
70 | * @param string $parent Required. The resource name of the parent environment:
|
---|
71 | * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task
|
---|
72 | * _id}.
|
---|
73 | * @param array $optParams Optional parameters.
|
---|
74 | *
|
---|
75 | * @opt_param int pageSize Optional. Maximum number of jobs to return. The
|
---|
76 | * service may return fewer than this value. If unspecified, at most 10 jobs
|
---|
77 | * will be returned. The maximum value is 1000; values above 1000 will be
|
---|
78 | * coerced to 1000.
|
---|
79 | * @opt_param string pageToken Optional. Page token received from a previous
|
---|
80 | * ListJobs call. Provide this to retrieve the subsequent page. When paginating,
|
---|
81 | * all other parameters provided to ListJobs must match the call that provided
|
---|
82 | * the page token.
|
---|
83 | * @return GoogleCloudDataplexV1ListJobsResponse
|
---|
84 | * @throws \Google\Service\Exception
|
---|
85 | */
|
---|
86 | public function listProjectsLocationsLakesTasksJobs($parent, $optParams = [])
|
---|
87 | {
|
---|
88 | $params = ['parent' => $parent];
|
---|
89 | $params = array_merge($params, $optParams);
|
---|
90 | return $this->call('list', [$params], GoogleCloudDataplexV1ListJobsResponse::class);
|
---|
91 | }
|
---|
92 | }
|
---|
93 |
|
---|
94 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
95 | class_alias(ProjectsLocationsLakesTasksJobs::class, 'Google_Service_CloudDataplex_Resource_ProjectsLocationsLakesTasksJobs');
|
---|