source: vendor/google/apiclient-services/src/WorkflowExecutions/Resource/ProjectsLocationsWorkflowsExecutions.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 3 months ago

Upload project files

  • Property mode set to 100644
File size: 7.8 KB
Line 
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\WorkflowExecutions\Resource;
19
20use Google\Service\WorkflowExecutions\CancelExecutionRequest;
21use Google\Service\WorkflowExecutions\DeleteExecutionHistoryRequest;
22use Google\Service\WorkflowExecutions\Execution;
23use Google\Service\WorkflowExecutions\ExportDataResponse;
24use Google\Service\WorkflowExecutions\ListExecutionsResponse;
25use Google\Service\WorkflowExecutions\WorkflowexecutionsEmpty;
26
27/**
28 * The "executions" collection of methods.
29 * Typical usage is:
30 * <code>
31 * $workflowexecutionsService = new Google\Service\WorkflowExecutions(...);
32 * $executions = $workflowexecutionsService->projects_locations_workflows_executions;
33 * </code>
34 */
35class ProjectsLocationsWorkflowsExecutions extends \Google\Service\Resource
36{
37 /**
38 * Cancels an execution of the given name. (executions.cancel)
39 *
40 * @param string $name Required. Name of the execution to be cancelled. Format:
41 * projects/{project}/locations/{location}/workflows/{workflow}/executions/{exec
42 * ution}
43 * @param CancelExecutionRequest $postBody
44 * @param array $optParams Optional parameters.
45 * @return Execution
46 * @throws \Google\Service\Exception
47 */
48 public function cancel($name, CancelExecutionRequest $postBody, $optParams = [])
49 {
50 $params = ['name' => $name, 'postBody' => $postBody];
51 $params = array_merge($params, $optParams);
52 return $this->call('cancel', [$params], Execution::class);
53 }
54 /**
55 * Creates a new execution using the latest revision of the given workflow. For
56 * more information, see Execute a workflow. (executions.create)
57 *
58 * @param string $parent Required. Name of the workflow for which an execution
59 * should be created. Format:
60 * projects/{project}/locations/{location}/workflows/{workflow} The latest
61 * revision of the workflow will be used.
62 * @param Execution $postBody
63 * @param array $optParams Optional parameters.
64 * @return Execution
65 * @throws \Google\Service\Exception
66 */
67 public function create($parent, Execution $postBody, $optParams = [])
68 {
69 $params = ['parent' => $parent, 'postBody' => $postBody];
70 $params = array_merge($params, $optParams);
71 return $this->call('create', [$params], Execution::class);
72 }
73 /**
74 * Deletes all step entries for an execution.
75 * (executions.deleteExecutionHistory)
76 *
77 * @param string $name Required. Name of the execution for which step entries
78 * should be deleted. Format: projects/{project}/locations/{location}/workflows/
79 * {workflow}/executions/{execution}
80 * @param DeleteExecutionHistoryRequest $postBody
81 * @param array $optParams Optional parameters.
82 * @return WorkflowexecutionsEmpty
83 * @throws \Google\Service\Exception
84 */
85 public function deleteExecutionHistory($name, DeleteExecutionHistoryRequest $postBody, $optParams = [])
86 {
87 $params = ['name' => $name, 'postBody' => $postBody];
88 $params = array_merge($params, $optParams);
89 return $this->call('deleteExecutionHistory', [$params], WorkflowexecutionsEmpty::class);
90 }
91 /**
92 * Returns all metadata stored about an execution, excluding most data that is
93 * already accessible using other API methods. (executions.exportData)
94 *
95 * @param string $name Required. Name of the execution for which data is to be
96 * exported. Format: projects/{project}/locations/{location}/workflows/{workflow
97 * }/executions/{execution}
98 * @param array $optParams Optional parameters.
99 * @return ExportDataResponse
100 * @throws \Google\Service\Exception
101 */
102 public function exportData($name, $optParams = [])
103 {
104 $params = ['name' => $name];
105 $params = array_merge($params, $optParams);
106 return $this->call('exportData', [$params], ExportDataResponse::class);
107 }
108 /**
109 * Returns an execution of the given name. (executions.get)
110 *
111 * @param string $name Required. Name of the execution to be retrieved. Format:
112 * projects/{project}/locations/{location}/workflows/{workflow}/executions/{exec
113 * ution}
114 * @param array $optParams Optional parameters.
115 *
116 * @opt_param string view Optional. A view defining which fields should be
117 * filled in the returned execution. The API will default to the FULL view.
118 * @return Execution
119 * @throws \Google\Service\Exception
120 */
121 public function get($name, $optParams = [])
122 {
123 $params = ['name' => $name];
124 $params = array_merge($params, $optParams);
125 return $this->call('get', [$params], Execution::class);
126 }
127 /**
128 * Returns a list of executions which belong to the workflow with the given
129 * name. The method returns executions of all workflow revisions. Returned
130 * executions are ordered by their start time (newest first).
131 * (executions.listProjectsLocationsWorkflowsExecutions)
132 *
133 * @param string $parent Required. Name of the workflow for which the executions
134 * should be listed. Format:
135 * projects/{project}/locations/{location}/workflows/{workflow}
136 * @param array $optParams Optional parameters.
137 *
138 * @opt_param string filter Optional. Filters applied to the
139 * `[Executions.ListExecutions]` results. The following fields are supported for
140 * filtering: `executionId`, `state`, `createTime`, `startTime`, `endTime`,
141 * `duration`, `workflowRevisionId`, `stepName`, `label`, and
142 * `disableConcurrencyQuotaOverflowBuffering`. For details, see AIP-160. For
143 * more information, see Filter executions. For example, if you are using the
144 * Google APIs Explorer: `state="SUCCEEDED"` or `startTime>"2023-08-01" AND
145 * state="FAILED"`
146 * @opt_param string orderBy Optional. Comma-separated list of fields that
147 * specify the ordering applied to the `[Executions.ListExecutions]` results. By
148 * default the ordering is based on descending `createTime`. The following
149 * fields are supported for ordering: `executionId`, `state`, `createTime`,
150 * `startTime`, `endTime`, `duration`, and `workflowRevisionId`. For details,
151 * see AIP-132.
152 * @opt_param int pageSize Maximum number of executions to return per call. Max
153 * supported value depends on the selected Execution view: it's 1000 for BASIC
154 * and 100 for FULL. The default value used if the field is not specified is
155 * 100, regardless of the selected view. Values greater than the max value will
156 * be coerced down to it.
157 * @opt_param string pageToken A page token, received from a previous
158 * `ListExecutions` call. Provide this to retrieve the subsequent page. When
159 * paginating, all other parameters provided to `ListExecutions` must match the
160 * call that provided the page token. Note that pagination is applied to dynamic
161 * data. The list of executions returned can change between page requests.
162 * @opt_param string view Optional. A view defining which fields should be
163 * filled in the returned executions. The API will default to the BASIC view.
164 * @return ListExecutionsResponse
165 * @throws \Google\Service\Exception
166 */
167 public function listProjectsLocationsWorkflowsExecutions($parent, $optParams = [])
168 {
169 $params = ['parent' => $parent];
170 $params = array_merge($params, $optParams);
171 return $this->call('list', [$params], ListExecutionsResponse::class);
172 }
173}
174
175// Adding a class alias for backwards compatibility with the previous class name.
176class_alias(ProjectsLocationsWorkflowsExecutions::class, 'Google_Service_WorkflowExecutions_Resource_ProjectsLocationsWorkflowsExecutions');
Note: See TracBrowser for help on using the repository browser.