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