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\CloudRun\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CloudRun\GoogleCloudRunV2CancelExecutionRequest;
|
---|
21 | use Google\Service\CloudRun\GoogleCloudRunV2Execution;
|
---|
22 | use Google\Service\CloudRun\GoogleCloudRunV2ExportStatusResponse;
|
---|
23 | use Google\Service\CloudRun\GoogleCloudRunV2ListExecutionsResponse;
|
---|
24 | use Google\Service\CloudRun\GoogleLongrunningOperation;
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * The "executions" collection of methods.
|
---|
28 | * Typical usage is:
|
---|
29 | * <code>
|
---|
30 | * $runService = new Google\Service\CloudRun(...);
|
---|
31 | * $executions = $runService->projects_locations_jobs_executions;
|
---|
32 | * </code>
|
---|
33 | */
|
---|
34 | class ProjectsLocationsJobsExecutions extends \Google\Service\Resource
|
---|
35 | {
|
---|
36 | /**
|
---|
37 | * Cancels an Execution. (executions.cancel)
|
---|
38 | *
|
---|
39 | * @param string $name Required. The name of the Execution to cancel. Format:
|
---|
40 | * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
|
---|
41 | * where `{project}` can be project id or number.
|
---|
42 | * @param GoogleCloudRunV2CancelExecutionRequest $postBody
|
---|
43 | * @param array $optParams Optional parameters.
|
---|
44 | * @return GoogleLongrunningOperation
|
---|
45 | * @throws \Google\Service\Exception
|
---|
46 | */
|
---|
47 | public function cancel($name, GoogleCloudRunV2CancelExecutionRequest $postBody, $optParams = [])
|
---|
48 | {
|
---|
49 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
50 | $params = array_merge($params, $optParams);
|
---|
51 | return $this->call('cancel', [$params], GoogleLongrunningOperation::class);
|
---|
52 | }
|
---|
53 | /**
|
---|
54 | * Deletes an Execution. (executions.delete)
|
---|
55 | *
|
---|
56 | * @param string $name Required. The name of the Execution to delete. Format:
|
---|
57 | * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
|
---|
58 | * where `{project}` can be project id or number.
|
---|
59 | * @param array $optParams Optional parameters.
|
---|
60 | *
|
---|
61 | * @opt_param string etag A system-generated fingerprint for this version of the
|
---|
62 | * resource. This may be used to detect modification conflict during updates.
|
---|
63 | * @opt_param bool validateOnly Indicates that the request should be validated
|
---|
64 | * without actually deleting any resources.
|
---|
65 | * @return GoogleLongrunningOperation
|
---|
66 | * @throws \Google\Service\Exception
|
---|
67 | */
|
---|
68 | public function delete($name, $optParams = [])
|
---|
69 | {
|
---|
70 | $params = ['name' => $name];
|
---|
71 | $params = array_merge($params, $optParams);
|
---|
72 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
73 | }
|
---|
74 | /**
|
---|
75 | * Read the status of an image export operation. (executions.exportStatus)
|
---|
76 | *
|
---|
77 | * @param string $name Required. The name of the resource of which image export
|
---|
78 | * operation status has to be fetched. Format: `projects/{project_id_or_number}/
|
---|
79 | * locations/{location}/services/{service}/revisions/{revision}` for Revision `p
|
---|
80 | * rojects/{project_id_or_number}/locations/{location}/jobs/{job}/executions/{ex
|
---|
81 | * ecution}` for Execution
|
---|
82 | * @param string $operationId Required. The operation id returned from
|
---|
83 | * ExportImage.
|
---|
84 | * @param array $optParams Optional parameters.
|
---|
85 | * @return GoogleCloudRunV2ExportStatusResponse
|
---|
86 | * @throws \Google\Service\Exception
|
---|
87 | */
|
---|
88 | public function exportStatus($name, $operationId, $optParams = [])
|
---|
89 | {
|
---|
90 | $params = ['name' => $name, 'operationId' => $operationId];
|
---|
91 | $params = array_merge($params, $optParams);
|
---|
92 | return $this->call('exportStatus', [$params], GoogleCloudRunV2ExportStatusResponse::class);
|
---|
93 | }
|
---|
94 | /**
|
---|
95 | * Gets information about an Execution. (executions.get)
|
---|
96 | *
|
---|
97 | * @param string $name Required. The full name of the Execution. Format:
|
---|
98 | * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
|
---|
99 | * where `{project}` can be project id or number.
|
---|
100 | * @param array $optParams Optional parameters.
|
---|
101 | * @return GoogleCloudRunV2Execution
|
---|
102 | * @throws \Google\Service\Exception
|
---|
103 | */
|
---|
104 | public function get($name, $optParams = [])
|
---|
105 | {
|
---|
106 | $params = ['name' => $name];
|
---|
107 | $params = array_merge($params, $optParams);
|
---|
108 | return $this->call('get', [$params], GoogleCloudRunV2Execution::class);
|
---|
109 | }
|
---|
110 | /**
|
---|
111 | * Lists Executions from a Job. Results are sorted by creation time, descending.
|
---|
112 | * (executions.listProjectsLocationsJobsExecutions)
|
---|
113 | *
|
---|
114 | * @param string $parent Required. The Execution from which the Executions
|
---|
115 | * should be listed. To list all Executions across Jobs, use "-" instead of Job
|
---|
116 | * name. Format: `projects/{project}/locations/{location}/jobs/{job}`, where
|
---|
117 | * `{project}` can be project id or number.
|
---|
118 | * @param array $optParams Optional parameters.
|
---|
119 | *
|
---|
120 | * @opt_param int pageSize Maximum number of Executions to return in this call.
|
---|
121 | * @opt_param string pageToken A page token received from a previous call to
|
---|
122 | * ListExecutions. All other parameters must match.
|
---|
123 | * @opt_param bool showDeleted If true, returns deleted (but unexpired)
|
---|
124 | * resources along with active ones.
|
---|
125 | * @return GoogleCloudRunV2ListExecutionsResponse
|
---|
126 | * @throws \Google\Service\Exception
|
---|
127 | */
|
---|
128 | public function listProjectsLocationsJobsExecutions($parent, $optParams = [])
|
---|
129 | {
|
---|
130 | $params = ['parent' => $parent];
|
---|
131 | $params = array_merge($params, $optParams);
|
---|
132 | return $this->call('list', [$params], GoogleCloudRunV2ListExecutionsResponse::class);
|
---|
133 | }
|
---|
134 | }
|
---|
135 |
|
---|
136 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
137 | class_alias(ProjectsLocationsJobsExecutions::class, 'Google_Service_CloudRun_Resource_ProjectsLocationsJobsExecutions');
|
---|