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\Aiplatform\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1AddExecutionEventsRequest;
|
---|
21 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1AddExecutionEventsResponse;
|
---|
22 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1Execution;
|
---|
23 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1LineageSubgraph;
|
---|
24 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1ListExecutionsResponse;
|
---|
25 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1PurgeExecutionsRequest;
|
---|
26 | use Google\Service\Aiplatform\GoogleLongrunningOperation;
|
---|
27 |
|
---|
28 | /**
|
---|
29 | * The "executions" collection of methods.
|
---|
30 | * Typical usage is:
|
---|
31 | * <code>
|
---|
32 | * $aiplatformService = new Google\Service\Aiplatform(...);
|
---|
33 | * $executions = $aiplatformService->projects_locations_metadataStores_executions;
|
---|
34 | * </code>
|
---|
35 | */
|
---|
36 | class ProjectsLocationsMetadataStoresExecutions extends \Google\Service\Resource
|
---|
37 | {
|
---|
38 | /**
|
---|
39 | * Adds Events to the specified Execution. An Event indicates whether an
|
---|
40 | * Artifact was used as an input or output for an Execution. If an Event already
|
---|
41 | * exists between the Execution and the Artifact, the Event is skipped.
|
---|
42 | * (executions.addExecutionEvents)
|
---|
43 | *
|
---|
44 | * @param string $execution Required. The resource name of the Execution that
|
---|
45 | * the Events connect Artifacts with. Format: `projects/{project}/locations/{loc
|
---|
46 | * ation}/metadataStores/{metadatastore}/executions/{execution}`
|
---|
47 | * @param GoogleCloudAiplatformV1AddExecutionEventsRequest $postBody
|
---|
48 | * @param array $optParams Optional parameters.
|
---|
49 | * @return GoogleCloudAiplatformV1AddExecutionEventsResponse
|
---|
50 | * @throws \Google\Service\Exception
|
---|
51 | */
|
---|
52 | public function addExecutionEvents($execution, GoogleCloudAiplatformV1AddExecutionEventsRequest $postBody, $optParams = [])
|
---|
53 | {
|
---|
54 | $params = ['execution' => $execution, 'postBody' => $postBody];
|
---|
55 | $params = array_merge($params, $optParams);
|
---|
56 | return $this->call('addExecutionEvents', [$params], GoogleCloudAiplatformV1AddExecutionEventsResponse::class);
|
---|
57 | }
|
---|
58 | /**
|
---|
59 | * Creates an Execution associated with a MetadataStore. (executions.create)
|
---|
60 | *
|
---|
61 | * @param string $parent Required. The resource name of the MetadataStore where
|
---|
62 | * the Execution should be created. Format:
|
---|
63 | * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
|
---|
64 | * @param GoogleCloudAiplatformV1Execution $postBody
|
---|
65 | * @param array $optParams Optional parameters.
|
---|
66 | *
|
---|
67 | * @opt_param string executionId The {execution} portion of the resource name
|
---|
68 | * with the format: `projects/{project}/locations/{location}/metadataStores/{met
|
---|
69 | * adatastore}/executions/{execution}` If not provided, the Execution's ID will
|
---|
70 | * be a UUID generated by the service. Must be 4-128 characters in length. Valid
|
---|
71 | * characters are `/a-z-/`. Must be unique across all Executions in the parent
|
---|
72 | * MetadataStore. (Otherwise the request will fail with ALREADY_EXISTS, or
|
---|
73 | * PERMISSION_DENIED if the caller can't view the preexisting Execution.)
|
---|
74 | * @return GoogleCloudAiplatformV1Execution
|
---|
75 | * @throws \Google\Service\Exception
|
---|
76 | */
|
---|
77 | public function create($parent, GoogleCloudAiplatformV1Execution $postBody, $optParams = [])
|
---|
78 | {
|
---|
79 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
80 | $params = array_merge($params, $optParams);
|
---|
81 | return $this->call('create', [$params], GoogleCloudAiplatformV1Execution::class);
|
---|
82 | }
|
---|
83 | /**
|
---|
84 | * Deletes an Execution. (executions.delete)
|
---|
85 | *
|
---|
86 | * @param string $name Required. The resource name of the Execution to delete.
|
---|
87 | * Format: `projects/{project}/locations/{location}/metadataStores/{metadatastor
|
---|
88 | * e}/executions/{execution}`
|
---|
89 | * @param array $optParams Optional parameters.
|
---|
90 | *
|
---|
91 | * @opt_param string etag Optional. The etag of the Execution to delete. If this
|
---|
92 | * is provided, it must match the server's etag. Otherwise, the request will
|
---|
93 | * fail with a FAILED_PRECONDITION.
|
---|
94 | * @return GoogleLongrunningOperation
|
---|
95 | * @throws \Google\Service\Exception
|
---|
96 | */
|
---|
97 | public function delete($name, $optParams = [])
|
---|
98 | {
|
---|
99 | $params = ['name' => $name];
|
---|
100 | $params = array_merge($params, $optParams);
|
---|
101 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
102 | }
|
---|
103 | /**
|
---|
104 | * Retrieves a specific Execution. (executions.get)
|
---|
105 | *
|
---|
106 | * @param string $name Required. The resource name of the Execution to retrieve.
|
---|
107 | * Format: `projects/{project}/locations/{location}/metadataStores/{metadatastor
|
---|
108 | * e}/executions/{execution}`
|
---|
109 | * @param array $optParams Optional parameters.
|
---|
110 | * @return GoogleCloudAiplatformV1Execution
|
---|
111 | * @throws \Google\Service\Exception
|
---|
112 | */
|
---|
113 | public function get($name, $optParams = [])
|
---|
114 | {
|
---|
115 | $params = ['name' => $name];
|
---|
116 | $params = array_merge($params, $optParams);
|
---|
117 | return $this->call('get', [$params], GoogleCloudAiplatformV1Execution::class);
|
---|
118 | }
|
---|
119 | /**
|
---|
120 | * Lists Executions in the MetadataStore.
|
---|
121 | * (executions.listProjectsLocationsMetadataStoresExecutions)
|
---|
122 | *
|
---|
123 | * @param string $parent Required. The MetadataStore whose Executions should be
|
---|
124 | * listed. Format:
|
---|
125 | * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
|
---|
126 | * @param array $optParams Optional parameters.
|
---|
127 | *
|
---|
128 | * @opt_param string filter Filter specifying the boolean condition for the
|
---|
129 | * Executions to satisfy in order to be part of the result set. The syntax to
|
---|
130 | * define filter query is based on https://google.aip.dev/160. Following are the
|
---|
131 | * supported set of filters: * **Attribute filtering**: For example:
|
---|
132 | * `display_name = "test"`. Supported fields include: `name`, `display_name`,
|
---|
133 | * `state`, `schema_title`, `create_time`, and `update_time`. Time fields, such
|
---|
134 | * as `create_time` and `update_time`, require values specified in RFC-3339
|
---|
135 | * format. For example: `create_time = "2020-11-19T11:30:00-04:00"`. *
|
---|
136 | * **Metadata field**: To filter on metadata fields use traversal operation as
|
---|
137 | * follows: `metadata..` For example: `metadata.field_1.number_value = 10.0` In
|
---|
138 | * case the field name contains special characters (such as colon), one can
|
---|
139 | * embed it inside double quote. For example: `metadata."field:1".number_value =
|
---|
140 | * 10.0` * **Context based filtering**: To filter Executions based on the
|
---|
141 | * contexts to which they belong use the function operator with the full
|
---|
142 | * resource name: `in_context()`. For example:
|
---|
143 | * `in_context("projects//locations//metadataStores//contexts/")` Each of the
|
---|
144 | * above supported filters can be combined together using logical operators
|
---|
145 | * (`AND` & `OR`). Maximum nested expression depth allowed is 5. For example:
|
---|
146 | * `display_name = "test" AND metadata.field1.bool_value = true`.
|
---|
147 | * @opt_param string orderBy How the list of messages is ordered. Specify the
|
---|
148 | * values to order by and an ordering operation. The default sorting order is
|
---|
149 | * ascending. To specify descending order for a field, users append a " desc"
|
---|
150 | * suffix; for example: "foo desc, bar". Subfields are specified with a `.`
|
---|
151 | * character, such as foo.bar. see https://google.aip.dev/132#ordering for more
|
---|
152 | * details.
|
---|
153 | * @opt_param int pageSize The maximum number of Executions to return. The
|
---|
154 | * service may return fewer. Must be in range 1-1000, inclusive. Defaults to
|
---|
155 | * 100.
|
---|
156 | * @opt_param string pageToken A page token, received from a previous
|
---|
157 | * MetadataService.ListExecutions call. Provide this to retrieve the subsequent
|
---|
158 | * page. When paginating, all other provided parameters must match the call that
|
---|
159 | * provided the page token. (Otherwise the request will fail with an
|
---|
160 | * INVALID_ARGUMENT error.)
|
---|
161 | * @return GoogleCloudAiplatformV1ListExecutionsResponse
|
---|
162 | * @throws \Google\Service\Exception
|
---|
163 | */
|
---|
164 | public function listProjectsLocationsMetadataStoresExecutions($parent, $optParams = [])
|
---|
165 | {
|
---|
166 | $params = ['parent' => $parent];
|
---|
167 | $params = array_merge($params, $optParams);
|
---|
168 | return $this->call('list', [$params], GoogleCloudAiplatformV1ListExecutionsResponse::class);
|
---|
169 | }
|
---|
170 | /**
|
---|
171 | * Updates a stored Execution. (executions.patch)
|
---|
172 | *
|
---|
173 | * @param string $name Output only. The resource name of the Execution.
|
---|
174 | * @param GoogleCloudAiplatformV1Execution $postBody
|
---|
175 | * @param array $optParams Optional parameters.
|
---|
176 | *
|
---|
177 | * @opt_param bool allowMissing If set to true, and the Execution is not found,
|
---|
178 | * a new Execution is created.
|
---|
179 | * @opt_param string updateMask Optional. A FieldMask indicating which fields
|
---|
180 | * should be updated.
|
---|
181 | * @return GoogleCloudAiplatformV1Execution
|
---|
182 | * @throws \Google\Service\Exception
|
---|
183 | */
|
---|
184 | public function patch($name, GoogleCloudAiplatformV1Execution $postBody, $optParams = [])
|
---|
185 | {
|
---|
186 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
187 | $params = array_merge($params, $optParams);
|
---|
188 | return $this->call('patch', [$params], GoogleCloudAiplatformV1Execution::class);
|
---|
189 | }
|
---|
190 | /**
|
---|
191 | * Purges Executions. (executions.purge)
|
---|
192 | *
|
---|
193 | * @param string $parent Required. The metadata store to purge Executions from.
|
---|
194 | * Format:
|
---|
195 | * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
|
---|
196 | * @param GoogleCloudAiplatformV1PurgeExecutionsRequest $postBody
|
---|
197 | * @param array $optParams Optional parameters.
|
---|
198 | * @return GoogleLongrunningOperation
|
---|
199 | * @throws \Google\Service\Exception
|
---|
200 | */
|
---|
201 | public function purge($parent, GoogleCloudAiplatformV1PurgeExecutionsRequest $postBody, $optParams = [])
|
---|
202 | {
|
---|
203 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
204 | $params = array_merge($params, $optParams);
|
---|
205 | return $this->call('purge', [$params], GoogleLongrunningOperation::class);
|
---|
206 | }
|
---|
207 | /**
|
---|
208 | * Obtains the set of input and output Artifacts for this Execution, in the form
|
---|
209 | * of LineageSubgraph that also contains the Execution and connecting Events.
|
---|
210 | * (executions.queryExecutionInputsAndOutputs)
|
---|
211 | *
|
---|
212 | * @param string $execution Required. The resource name of the Execution whose
|
---|
213 | * input and output Artifacts should be retrieved as a LineageSubgraph. Format:
|
---|
214 | * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/execu
|
---|
215 | * tions/{execution}`
|
---|
216 | * @param array $optParams Optional parameters.
|
---|
217 | * @return GoogleCloudAiplatformV1LineageSubgraph
|
---|
218 | * @throws \Google\Service\Exception
|
---|
219 | */
|
---|
220 | public function queryExecutionInputsAndOutputs($execution, $optParams = [])
|
---|
221 | {
|
---|
222 | $params = ['execution' => $execution];
|
---|
223 | $params = array_merge($params, $optParams);
|
---|
224 | return $this->call('queryExecutionInputsAndOutputs', [$params], GoogleCloudAiplatformV1LineageSubgraph::class);
|
---|
225 | }
|
---|
226 | }
|
---|
227 |
|
---|
228 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
229 | class_alias(ProjectsLocationsMetadataStoresExecutions::class, 'Google_Service_Aiplatform_Resource_ProjectsLocationsMetadataStoresExecutions');
|
---|