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\GoogleCloudRunV2Execution;
21use Google\Service\CloudRun\GoogleCloudRunV2ListExecutionsResponse;
22use Google\Service\CloudRun\GoogleLongrunningOperation;
23
24/**
25 * The "executions" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $runService = new Google\Service\CloudRun(...);
29 *   $executions = $runService->executions;
30 *  </code>
31 */
32class ProjectsLocationsJobsExecutions extends \Google\Service\Resource
33{
34  /**
35   * Delete an Execution. (executions.delete)
36   *
37   * @param string $name Required. The name of the Execution to delete. Format:
38   * projects/{project}/locations/{location}/jobs/{job}/executions/{execution}
39   * @param array $optParams Optional parameters.
40   *
41   * @opt_param string etag A system-generated fingerprint for this version of the
42   * resource. This may be used to detect modification conflict during updates.
43   * @opt_param bool validateOnly Indicates that the request should be validated
44   * without actually deleting any resources.
45   * @return GoogleLongrunningOperation
46   */
47  public function delete($name, $optParams = [])
48  {
49    $params = ['name' => $name];
50    $params = array_merge($params, $optParams);
51    return $this->call('delete', [$params], GoogleLongrunningOperation::class);
52  }
53  /**
54   * Gets information about a Execution. (executions.get)
55   *
56   * @param string $name Required. The full name of the Execution. Format:
57   * projects/{project}/locations/{location}/jobs/{job}/executions/{execution}
58   * @param array $optParams Optional parameters.
59   * @return GoogleCloudRunV2Execution
60   */
61  public function get($name, $optParams = [])
62  {
63    $params = ['name' => $name];
64    $params = array_merge($params, $optParams);
65    return $this->call('get', [$params], GoogleCloudRunV2Execution::class);
66  }
67  /**
68   * List Executions from a Job. (executions.listProjectsLocationsJobsExecutions)
69   *
70   * @param string $parent Required. The Execution from which the Executions
71   * should be listed. To list all Executions across Jobs, use "-" instead of Job
72   * name. Format: projects/{project}/locations/{location}/jobs/{job}
73   * @param array $optParams Optional parameters.
74   *
75   * @opt_param int pageSize Maximum number of Executions to return in this call.
76   * @opt_param string pageToken A page token received from a previous call to
77   * ListExecutions. All other parameters must match.
78   * @opt_param bool showDeleted If true, returns deleted (but unexpired)
79   * resources along with active ones.
80   * @return GoogleCloudRunV2ListExecutionsResponse
81   */
82  public function listProjectsLocationsJobsExecutions($parent, $optParams = [])
83  {
84    $params = ['parent' => $parent];
85    $params = array_merge($params, $optParams);
86    return $this->call('list', [$params], GoogleCloudRunV2ListExecutionsResponse::class);
87  }
88}
89
90// Adding a class alias for backwards compatibility with the previous class name.
91class_alias(ProjectsLocationsJobsExecutions::class, 'Google_Service_CloudRun_Resource_ProjectsLocationsJobsExecutions');
92