xref: /aosp_15_r20/external/googleapis/google/cloud/aiplatform/v1beta1/metadata_service.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.aiplatform.v1beta1;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/cloud/aiplatform/v1beta1/artifact.proto";
24import "google/cloud/aiplatform/v1beta1/context.proto";
25import "google/cloud/aiplatform/v1beta1/event.proto";
26import "google/cloud/aiplatform/v1beta1/execution.proto";
27import "google/cloud/aiplatform/v1beta1/lineage_subgraph.proto";
28import "google/cloud/aiplatform/v1beta1/metadata_schema.proto";
29import "google/cloud/aiplatform/v1beta1/metadata_store.proto";
30import "google/cloud/aiplatform/v1beta1/operation.proto";
31import "google/longrunning/operations.proto";
32import "google/protobuf/empty.proto";
33import "google/protobuf/field_mask.proto";
34
35option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
36option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb";
37option java_multiple_files = true;
38option java_outer_classname = "MetadataServiceProto";
39option java_package = "com.google.cloud.aiplatform.v1beta1";
40option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
41option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
42
43// Service for reading and writing metadata entries.
44service MetadataService {
45  option (google.api.default_host) = "aiplatform.googleapis.com";
46  option (google.api.oauth_scopes) =
47      "https://www.googleapis.com/auth/cloud-platform";
48
49  // Initializes a MetadataStore, including allocation of resources.
50  rpc CreateMetadataStore(CreateMetadataStoreRequest)
51      returns (google.longrunning.Operation) {
52    option (google.api.http) = {
53      post: "/v1beta1/{parent=projects/*/locations/*}/metadataStores"
54      body: "metadata_store"
55    };
56    option (google.api.method_signature) =
57        "parent,metadata_store,metadata_store_id";
58    option (google.longrunning.operation_info) = {
59      response_type: "MetadataStore"
60      metadata_type: "CreateMetadataStoreOperationMetadata"
61    };
62  }
63
64  // Retrieves a specific MetadataStore.
65  rpc GetMetadataStore(GetMetadataStoreRequest) returns (MetadataStore) {
66    option (google.api.http) = {
67      get: "/v1beta1/{name=projects/*/locations/*/metadataStores/*}"
68    };
69    option (google.api.method_signature) = "name";
70  }
71
72  // Lists MetadataStores for a Location.
73  rpc ListMetadataStores(ListMetadataStoresRequest)
74      returns (ListMetadataStoresResponse) {
75    option (google.api.http) = {
76      get: "/v1beta1/{parent=projects/*/locations/*}/metadataStores"
77    };
78    option (google.api.method_signature) = "parent";
79  }
80
81  // Deletes a single MetadataStore and all its child resources (Artifacts,
82  // Executions, and Contexts).
83  rpc DeleteMetadataStore(DeleteMetadataStoreRequest)
84      returns (google.longrunning.Operation) {
85    option (google.api.http) = {
86      delete: "/v1beta1/{name=projects/*/locations/*/metadataStores/*}"
87    };
88    option (google.api.method_signature) = "name";
89    option (google.longrunning.operation_info) = {
90      response_type: "google.protobuf.Empty"
91      metadata_type: "DeleteMetadataStoreOperationMetadata"
92    };
93  }
94
95  // Creates an Artifact associated with a MetadataStore.
96  rpc CreateArtifact(CreateArtifactRequest) returns (Artifact) {
97    option (google.api.http) = {
98      post: "/v1beta1/{parent=projects/*/locations/*/metadataStores/*}/artifacts"
99      body: "artifact"
100    };
101    option (google.api.method_signature) = "parent,artifact,artifact_id";
102  }
103
104  // Retrieves a specific Artifact.
105  rpc GetArtifact(GetArtifactRequest) returns (Artifact) {
106    option (google.api.http) = {
107      get: "/v1beta1/{name=projects/*/locations/*/metadataStores/*/artifacts/*}"
108    };
109    option (google.api.method_signature) = "name";
110  }
111
112  // Lists Artifacts in the MetadataStore.
113  rpc ListArtifacts(ListArtifactsRequest) returns (ListArtifactsResponse) {
114    option (google.api.http) = {
115      get: "/v1beta1/{parent=projects/*/locations/*/metadataStores/*}/artifacts"
116    };
117    option (google.api.method_signature) = "parent";
118  }
119
120  // Updates a stored Artifact.
121  rpc UpdateArtifact(UpdateArtifactRequest) returns (Artifact) {
122    option (google.api.http) = {
123      patch: "/v1beta1/{artifact.name=projects/*/locations/*/metadataStores/*/artifacts/*}"
124      body: "artifact"
125    };
126    option (google.api.method_signature) = "artifact,update_mask";
127  }
128
129  // Deletes an Artifact.
130  rpc DeleteArtifact(DeleteArtifactRequest)
131      returns (google.longrunning.Operation) {
132    option (google.api.http) = {
133      delete: "/v1beta1/{name=projects/*/locations/*/metadataStores/*/artifacts/*}"
134    };
135    option (google.api.method_signature) = "name";
136    option (google.longrunning.operation_info) = {
137      response_type: "google.protobuf.Empty"
138      metadata_type: "DeleteOperationMetadata"
139    };
140  }
141
142  // Purges Artifacts.
143  rpc PurgeArtifacts(PurgeArtifactsRequest)
144      returns (google.longrunning.Operation) {
145    option (google.api.http) = {
146      post: "/v1beta1/{parent=projects/*/locations/*/metadataStores/*}/artifacts:purge"
147      body: "*"
148    };
149    option (google.api.method_signature) = "parent";
150    option (google.longrunning.operation_info) = {
151      response_type: "PurgeArtifactsResponse"
152      metadata_type: "PurgeArtifactsMetadata"
153    };
154  }
155
156  // Creates a Context associated with a MetadataStore.
157  rpc CreateContext(CreateContextRequest) returns (Context) {
158    option (google.api.http) = {
159      post: "/v1beta1/{parent=projects/*/locations/*/metadataStores/*}/contexts"
160      body: "context"
161    };
162    option (google.api.method_signature) = "parent,context,context_id";
163  }
164
165  // Retrieves a specific Context.
166  rpc GetContext(GetContextRequest) returns (Context) {
167    option (google.api.http) = {
168      get: "/v1beta1/{name=projects/*/locations/*/metadataStores/*/contexts/*}"
169    };
170    option (google.api.method_signature) = "name";
171  }
172
173  // Lists Contexts on the MetadataStore.
174  rpc ListContexts(ListContextsRequest) returns (ListContextsResponse) {
175    option (google.api.http) = {
176      get: "/v1beta1/{parent=projects/*/locations/*/metadataStores/*}/contexts"
177    };
178    option (google.api.method_signature) = "parent";
179  }
180
181  // Updates a stored Context.
182  rpc UpdateContext(UpdateContextRequest) returns (Context) {
183    option (google.api.http) = {
184      patch: "/v1beta1/{context.name=projects/*/locations/*/metadataStores/*/contexts/*}"
185      body: "context"
186    };
187    option (google.api.method_signature) = "context,update_mask";
188  }
189
190  // Deletes a stored Context.
191  rpc DeleteContext(DeleteContextRequest)
192      returns (google.longrunning.Operation) {
193    option (google.api.http) = {
194      delete: "/v1beta1/{name=projects/*/locations/*/metadataStores/*/contexts/*}"
195    };
196    option (google.api.method_signature) = "name";
197    option (google.longrunning.operation_info) = {
198      response_type: "google.protobuf.Empty"
199      metadata_type: "DeleteOperationMetadata"
200    };
201  }
202
203  // Purges Contexts.
204  rpc PurgeContexts(PurgeContextsRequest)
205      returns (google.longrunning.Operation) {
206    option (google.api.http) = {
207      post: "/v1beta1/{parent=projects/*/locations/*/metadataStores/*}/contexts:purge"
208      body: "*"
209    };
210    option (google.api.method_signature) = "parent";
211    option (google.longrunning.operation_info) = {
212      response_type: "PurgeContextsResponse"
213      metadata_type: "PurgeContextsMetadata"
214    };
215  }
216
217  // Adds a set of Artifacts and Executions to a Context. If any of the
218  // Artifacts or Executions have already been added to a Context, they are
219  // simply skipped.
220  rpc AddContextArtifactsAndExecutions(AddContextArtifactsAndExecutionsRequest)
221      returns (AddContextArtifactsAndExecutionsResponse) {
222    option (google.api.http) = {
223      post: "/v1beta1/{context=projects/*/locations/*/metadataStores/*/contexts/*}:addContextArtifactsAndExecutions"
224      body: "*"
225    };
226    option (google.api.method_signature) = "context,artifacts,executions";
227  }
228
229  // Adds a set of Contexts as children to a parent Context. If any of the
230  // child Contexts have already been added to the parent Context, they are
231  // simply skipped. If this call would create a cycle or cause any Context to
232  // have more than 10 parents, the request will fail with an INVALID_ARGUMENT
233  // error.
234  rpc AddContextChildren(AddContextChildrenRequest)
235      returns (AddContextChildrenResponse) {
236    option (google.api.http) = {
237      post: "/v1beta1/{context=projects/*/locations/*/metadataStores/*/contexts/*}:addContextChildren"
238      body: "*"
239    };
240    option (google.api.method_signature) = "context,child_contexts";
241  }
242
243  // Remove a set of children contexts from a parent Context. If any of the
244  // child Contexts were NOT added to the parent Context, they are
245  // simply skipped.
246  rpc RemoveContextChildren(RemoveContextChildrenRequest)
247      returns (RemoveContextChildrenResponse) {
248    option (google.api.http) = {
249      post: "/v1beta1/{context=projects/*/locations/*/metadataStores/*/contexts/*}:removeContextChildren"
250      body: "*"
251    };
252    option (google.api.method_signature) = "context,child_contexts";
253  }
254
255  // Retrieves Artifacts and Executions within the specified Context, connected
256  // by Event edges and returned as a LineageSubgraph.
257  rpc QueryContextLineageSubgraph(QueryContextLineageSubgraphRequest)
258      returns (LineageSubgraph) {
259    option (google.api.http) = {
260      get: "/v1beta1/{context=projects/*/locations/*/metadataStores/*/contexts/*}:queryContextLineageSubgraph"
261    };
262    option (google.api.method_signature) = "context";
263  }
264
265  // Creates an Execution associated with a MetadataStore.
266  rpc CreateExecution(CreateExecutionRequest) returns (Execution) {
267    option (google.api.http) = {
268      post: "/v1beta1/{parent=projects/*/locations/*/metadataStores/*}/executions"
269      body: "execution"
270    };
271    option (google.api.method_signature) = "parent,execution,execution_id";
272  }
273
274  // Retrieves a specific Execution.
275  rpc GetExecution(GetExecutionRequest) returns (Execution) {
276    option (google.api.http) = {
277      get: "/v1beta1/{name=projects/*/locations/*/metadataStores/*/executions/*}"
278    };
279    option (google.api.method_signature) = "name";
280  }
281
282  // Lists Executions in the MetadataStore.
283  rpc ListExecutions(ListExecutionsRequest) returns (ListExecutionsResponse) {
284    option (google.api.http) = {
285      get: "/v1beta1/{parent=projects/*/locations/*/metadataStores/*}/executions"
286    };
287    option (google.api.method_signature) = "parent";
288  }
289
290  // Updates a stored Execution.
291  rpc UpdateExecution(UpdateExecutionRequest) returns (Execution) {
292    option (google.api.http) = {
293      patch: "/v1beta1/{execution.name=projects/*/locations/*/metadataStores/*/executions/*}"
294      body: "execution"
295    };
296    option (google.api.method_signature) = "execution,update_mask";
297  }
298
299  // Deletes an Execution.
300  rpc DeleteExecution(DeleteExecutionRequest)
301      returns (google.longrunning.Operation) {
302    option (google.api.http) = {
303      delete: "/v1beta1/{name=projects/*/locations/*/metadataStores/*/executions/*}"
304    };
305    option (google.api.method_signature) = "name";
306    option (google.longrunning.operation_info) = {
307      response_type: "google.protobuf.Empty"
308      metadata_type: "DeleteOperationMetadata"
309    };
310  }
311
312  // Purges Executions.
313  rpc PurgeExecutions(PurgeExecutionsRequest)
314      returns (google.longrunning.Operation) {
315    option (google.api.http) = {
316      post: "/v1beta1/{parent=projects/*/locations/*/metadataStores/*}/executions:purge"
317      body: "*"
318    };
319    option (google.api.method_signature) = "parent";
320    option (google.longrunning.operation_info) = {
321      response_type: "PurgeExecutionsResponse"
322      metadata_type: "PurgeExecutionsMetadata"
323    };
324  }
325
326  // Adds Events to the specified Execution. An Event indicates whether an
327  // Artifact was used as an input or output for an Execution. If an Event
328  // already exists between the Execution and the Artifact, the Event is
329  // skipped.
330  rpc AddExecutionEvents(AddExecutionEventsRequest)
331      returns (AddExecutionEventsResponse) {
332    option (google.api.http) = {
333      post: "/v1beta1/{execution=projects/*/locations/*/metadataStores/*/executions/*}:addExecutionEvents"
334      body: "*"
335    };
336    option (google.api.method_signature) = "execution,events";
337  }
338
339  // Obtains the set of input and output Artifacts for this Execution, in the
340  // form of LineageSubgraph that also contains the Execution and connecting
341  // Events.
342  rpc QueryExecutionInputsAndOutputs(QueryExecutionInputsAndOutputsRequest)
343      returns (LineageSubgraph) {
344    option (google.api.http) = {
345      get: "/v1beta1/{execution=projects/*/locations/*/metadataStores/*/executions/*}:queryExecutionInputsAndOutputs"
346    };
347    option (google.api.method_signature) = "execution";
348  }
349
350  // Creates a MetadataSchema.
351  rpc CreateMetadataSchema(CreateMetadataSchemaRequest)
352      returns (MetadataSchema) {
353    option (google.api.http) = {
354      post: "/v1beta1/{parent=projects/*/locations/*/metadataStores/*}/metadataSchemas"
355      body: "metadata_schema"
356    };
357    option (google.api.method_signature) =
358        "parent,metadata_schema,metadata_schema_id";
359  }
360
361  // Retrieves a specific MetadataSchema.
362  rpc GetMetadataSchema(GetMetadataSchemaRequest) returns (MetadataSchema) {
363    option (google.api.http) = {
364      get: "/v1beta1/{name=projects/*/locations/*/metadataStores/*/metadataSchemas/*}"
365    };
366    option (google.api.method_signature) = "name";
367  }
368
369  // Lists MetadataSchemas.
370  rpc ListMetadataSchemas(ListMetadataSchemasRequest)
371      returns (ListMetadataSchemasResponse) {
372    option (google.api.http) = {
373      get: "/v1beta1/{parent=projects/*/locations/*/metadataStores/*}/metadataSchemas"
374    };
375    option (google.api.method_signature) = "parent";
376  }
377
378  // Retrieves lineage of an Artifact represented through Artifacts and
379  // Executions connected by Event edges and returned as a LineageSubgraph.
380  rpc QueryArtifactLineageSubgraph(QueryArtifactLineageSubgraphRequest)
381      returns (LineageSubgraph) {
382    option (google.api.http) = {
383      get: "/v1beta1/{artifact=projects/*/locations/*/metadataStores/*/artifacts/*}:queryArtifactLineageSubgraph"
384    };
385    option (google.api.method_signature) = "artifact";
386  }
387}
388
389// Request message for
390// [MetadataService.CreateMetadataStore][google.cloud.aiplatform.v1beta1.MetadataService.CreateMetadataStore].
391message CreateMetadataStoreRequest {
392  // Required. The resource name of the Location where the MetadataStore should
393  // be created.
394  // Format: `projects/{project}/locations/{location}/`
395  string parent = 1 [
396    (google.api.field_behavior) = REQUIRED,
397    (google.api.resource_reference) = {
398      type: "locations.googleapis.com/Location"
399    }
400  ];
401
402  // Required. The MetadataStore to create.
403  MetadataStore metadata_store = 2 [(google.api.field_behavior) = REQUIRED];
404
405  // The {metadatastore} portion of the resource name with the format:
406  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
407  // If not provided, the MetadataStore's ID will be a UUID generated by the
408  // service.
409  // Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
410  // Must be unique across all MetadataStores in the parent Location.
411  // (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED
412  // if the caller can't view the preexisting MetadataStore.)
413  string metadata_store_id = 3;
414}
415
416// Details of operations that perform
417// [MetadataService.CreateMetadataStore][google.cloud.aiplatform.v1beta1.MetadataService.CreateMetadataStore].
418message CreateMetadataStoreOperationMetadata {
419  // Operation metadata for creating a MetadataStore.
420  GenericOperationMetadata generic_metadata = 1;
421}
422
423// Request message for
424// [MetadataService.GetMetadataStore][google.cloud.aiplatform.v1beta1.MetadataService.GetMetadataStore].
425message GetMetadataStoreRequest {
426  // Required. The resource name of the MetadataStore to retrieve.
427  // Format:
428  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
429  string name = 1 [
430    (google.api.field_behavior) = REQUIRED,
431    (google.api.resource_reference) = {
432      type: "aiplatform.googleapis.com/MetadataStore"
433    }
434  ];
435}
436
437// Request message for
438// [MetadataService.ListMetadataStores][google.cloud.aiplatform.v1beta1.MetadataService.ListMetadataStores].
439message ListMetadataStoresRequest {
440  // Required. The Location whose MetadataStores should be listed.
441  // Format:
442  // `projects/{project}/locations/{location}`
443  string parent = 1 [
444    (google.api.field_behavior) = REQUIRED,
445    (google.api.resource_reference) = {
446      type: "locations.googleapis.com/Location"
447    }
448  ];
449
450  // The maximum number of Metadata Stores to return. The service may return
451  // fewer.
452  // Must be in range 1-1000, inclusive. Defaults to 100.
453  int32 page_size = 2;
454
455  // A page token, received from a previous
456  // [MetadataService.ListMetadataStores][google.cloud.aiplatform.v1beta1.MetadataService.ListMetadataStores]
457  // call. Provide this to retrieve the subsequent page.
458  //
459  // When paginating, all other provided parameters must match the call that
460  // provided the page token. (Otherwise the request will fail with
461  // INVALID_ARGUMENT error.)
462  string page_token = 3;
463}
464
465// Response message for
466// [MetadataService.ListMetadataStores][google.cloud.aiplatform.v1beta1.MetadataService.ListMetadataStores].
467message ListMetadataStoresResponse {
468  // The MetadataStores found for the Location.
469  repeated MetadataStore metadata_stores = 1;
470
471  // A token, which can be sent as
472  // [ListMetadataStoresRequest.page_token][google.cloud.aiplatform.v1beta1.ListMetadataStoresRequest.page_token]
473  // to retrieve the next page. If this field is not populated, there are no
474  // subsequent pages.
475  string next_page_token = 2;
476}
477
478// Request message for
479// [MetadataService.DeleteMetadataStore][google.cloud.aiplatform.v1beta1.MetadataService.DeleteMetadataStore].
480message DeleteMetadataStoreRequest {
481  // Required. The resource name of the MetadataStore to delete.
482  // Format:
483  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
484  string name = 1 [
485    (google.api.field_behavior) = REQUIRED,
486    (google.api.resource_reference) = {
487      type: "aiplatform.googleapis.com/MetadataStore"
488    }
489  ];
490
491  // Deprecated: Field is no longer supported.
492  bool force = 2 [deprecated = true];
493}
494
495// Details of operations that perform
496// [MetadataService.DeleteMetadataStore][google.cloud.aiplatform.v1beta1.MetadataService.DeleteMetadataStore].
497message DeleteMetadataStoreOperationMetadata {
498  // Operation metadata for deleting a MetadataStore.
499  GenericOperationMetadata generic_metadata = 1;
500}
501
502// Request message for
503// [MetadataService.CreateArtifact][google.cloud.aiplatform.v1beta1.MetadataService.CreateArtifact].
504message CreateArtifactRequest {
505  // Required. The resource name of the MetadataStore where the Artifact should
506  // be created.
507  // Format:
508  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
509  string parent = 1 [
510    (google.api.field_behavior) = REQUIRED,
511    (google.api.resource_reference) = {
512      type: "aiplatform.googleapis.com/MetadataStore"
513    }
514  ];
515
516  // Required. The Artifact to create.
517  Artifact artifact = 2 [(google.api.field_behavior) = REQUIRED];
518
519  // The {artifact} portion of the resource name with the format:
520  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
521  // If not provided, the Artifact's ID will be a UUID generated by the service.
522  // Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
523  // Must be unique across all Artifacts in the parent MetadataStore. (Otherwise
524  // the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the
525  // caller can't view the preexisting Artifact.)
526  string artifact_id = 3;
527}
528
529// Request message for
530// [MetadataService.GetArtifact][google.cloud.aiplatform.v1beta1.MetadataService.GetArtifact].
531message GetArtifactRequest {
532  // Required. The resource name of the Artifact to retrieve.
533  // Format:
534  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
535  string name = 1 [
536    (google.api.field_behavior) = REQUIRED,
537    (google.api.resource_reference) = {
538      type: "aiplatform.googleapis.com/Artifact"
539    }
540  ];
541}
542
543// Request message for
544// [MetadataService.ListArtifacts][google.cloud.aiplatform.v1beta1.MetadataService.ListArtifacts].
545message ListArtifactsRequest {
546  // Required. The MetadataStore whose Artifacts should be listed.
547  // Format:
548  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
549  string parent = 1 [
550    (google.api.field_behavior) = REQUIRED,
551    (google.api.resource_reference) = {
552      child_type: "aiplatform.googleapis.com/Artifact"
553    }
554  ];
555
556  // The maximum number of Artifacts to return. The service may return fewer.
557  // Must be in range 1-1000, inclusive. Defaults to 100.
558  int32 page_size = 2;
559
560  // A page token, received from a previous
561  // [MetadataService.ListArtifacts][google.cloud.aiplatform.v1beta1.MetadataService.ListArtifacts]
562  // call. Provide this to retrieve the subsequent page.
563  //
564  // When paginating, all other provided parameters must match the call that
565  // provided the page token. (Otherwise the request will fail with
566  // INVALID_ARGUMENT error.)
567  string page_token = 3;
568
569  // Filter specifying the boolean condition for the Artifacts to satisfy in
570  // order to be part of the result set.
571  // The syntax to define filter query is based on https://google.aip.dev/160.
572  // The supported set of filters include the following:
573  //
574  // *   **Attribute filtering**:
575  //     For example: `display_name = "test"`.
576  //     Supported fields include: `name`, `display_name`, `uri`, `state`,
577  //     `schema_title`, `create_time`, and `update_time`.
578  //     Time fields, such as `create_time` and `update_time`, require values
579  //     specified in RFC-3339 format.
580  //     For example: `create_time = "2020-11-19T11:30:00-04:00"`
581  // *   **Metadata field**:
582  //     To filter on metadata fields use traversal operation as follows:
583  //     `metadata.<field_name>.<type_value>`.
584  //     For example: `metadata.field_1.number_value = 10.0`
585  //     In case the field name contains special characters (such as colon), one
586  //     can embed it inside double quote.
587  //     For example: `metadata."field:1".number_value = 10.0`
588  // *   **Context based filtering**:
589  //     To filter Artifacts based on the contexts to which they belong, use the
590  //     function operator with the full resource name
591  //     `in_context(<context-name>)`.
592  //     For example:
593  //     `in_context("projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context-id>")`
594  //
595  // Each of the above supported filter types can be combined together using
596  // logical operators (`AND` & `OR`). Maximum nested expression depth allowed
597  // is 5.
598  //
599  // For example: `display_name = "test" AND metadata.field1.bool_value = true`.
600  string filter = 4;
601
602  // How the list of messages is ordered. Specify the values to order by and an
603  // ordering operation. The default sorting order is ascending. To specify
604  // descending order for a field, users append a " desc" suffix; for example:
605  // "foo desc, bar".
606  // Subfields are specified with a `.` character, such as foo.bar.
607  // see https://google.aip.dev/132#ordering for more details.
608  string order_by = 5;
609}
610
611// Response message for
612// [MetadataService.ListArtifacts][google.cloud.aiplatform.v1beta1.MetadataService.ListArtifacts].
613message ListArtifactsResponse {
614  // The Artifacts retrieved from the MetadataStore.
615  repeated Artifact artifacts = 1;
616
617  // A token, which can be sent as
618  // [ListArtifactsRequest.page_token][google.cloud.aiplatform.v1beta1.ListArtifactsRequest.page_token]
619  // to retrieve the next page.
620  // If this field is not populated, there are no subsequent pages.
621  string next_page_token = 2;
622}
623
624// Request message for
625// [MetadataService.UpdateArtifact][google.cloud.aiplatform.v1beta1.MetadataService.UpdateArtifact].
626message UpdateArtifactRequest {
627  // Required. The Artifact containing updates.
628  // The Artifact's
629  // [Artifact.name][google.cloud.aiplatform.v1beta1.Artifact.name] field is
630  // used to identify the Artifact to be updated. Format:
631  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
632  Artifact artifact = 1 [(google.api.field_behavior) = REQUIRED];
633
634  // Optional. A FieldMask indicating which fields should be updated.
635  google.protobuf.FieldMask update_mask = 2
636      [(google.api.field_behavior) = OPTIONAL];
637
638  // If set to true, and the
639  // [Artifact][google.cloud.aiplatform.v1beta1.Artifact] is not found, a new
640  // [Artifact][google.cloud.aiplatform.v1beta1.Artifact] is created.
641  bool allow_missing = 3;
642}
643
644// Request message for
645// [MetadataService.DeleteArtifact][google.cloud.aiplatform.v1beta1.MetadataService.DeleteArtifact].
646message DeleteArtifactRequest {
647  // Required. The resource name of the Artifact to delete.
648  // Format:
649  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
650  string name = 1 [
651    (google.api.field_behavior) = REQUIRED,
652    (google.api.resource_reference) = {
653      type: "aiplatform.googleapis.com/Artifact"
654    }
655  ];
656
657  // Optional. The etag of the Artifact to delete.
658  // If this is provided, it must match the server's etag. Otherwise, the
659  // request will fail with a FAILED_PRECONDITION.
660  string etag = 2 [(google.api.field_behavior) = OPTIONAL];
661}
662
663// Request message for
664// [MetadataService.PurgeArtifacts][google.cloud.aiplatform.v1beta1.MetadataService.PurgeArtifacts].
665message PurgeArtifactsRequest {
666  // Required. The metadata store to purge Artifacts from.
667  // Format:
668  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
669  string parent = 1 [
670    (google.api.field_behavior) = REQUIRED,
671    (google.api.resource_reference) = {
672      child_type: "aiplatform.googleapis.com/Artifact"
673    }
674  ];
675
676  // Required. A required filter matching the Artifacts to be purged.
677  // E.g., `update_time <= 2020-11-19T11:30:00-04:00`.
678  string filter = 2 [(google.api.field_behavior) = REQUIRED];
679
680  // Optional. Flag to indicate to actually perform the purge.
681  // If `force` is set to false, the method will return a sample of
682  // Artifact names that would be deleted.
683  bool force = 3 [(google.api.field_behavior) = OPTIONAL];
684}
685
686// Response message for
687// [MetadataService.PurgeArtifacts][google.cloud.aiplatform.v1beta1.MetadataService.PurgeArtifacts].
688message PurgeArtifactsResponse {
689  // The number of Artifacts that this request deleted (or, if `force` is false,
690  // the number of Artifacts that will be deleted). This can be an estimate.
691  int64 purge_count = 1;
692
693  // A sample of the Artifact names that will be deleted.
694  // Only populated if `force` is set to false. The maximum number of samples is
695  // 100 (it is possible to return fewer).
696  repeated string purge_sample = 2 [(google.api.resource_reference) = {
697    type: "aiplatform.googleapis.com/Artifact"
698  }];
699}
700
701// Details of operations that perform
702// [MetadataService.PurgeArtifacts][google.cloud.aiplatform.v1beta1.MetadataService.PurgeArtifacts].
703message PurgeArtifactsMetadata {
704  // Operation metadata for purging Artifacts.
705  GenericOperationMetadata generic_metadata = 1;
706}
707
708// Request message for
709// [MetadataService.CreateContext][google.cloud.aiplatform.v1beta1.MetadataService.CreateContext].
710message CreateContextRequest {
711  // Required. The resource name of the MetadataStore where the Context should
712  // be created. Format:
713  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
714  string parent = 1 [
715    (google.api.field_behavior) = REQUIRED,
716    (google.api.resource_reference) = {
717      type: "aiplatform.googleapis.com/MetadataStore"
718    }
719  ];
720
721  // Required. The Context to create.
722  Context context = 2 [(google.api.field_behavior) = REQUIRED];
723
724  // The {context} portion of the resource name with the format:
725  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`.
726  // If not provided, the Context's ID will be a UUID generated by the service.
727  // Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
728  // Must be unique across all Contexts in the parent MetadataStore. (Otherwise
729  // the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the
730  // caller can't view the preexisting Context.)
731  string context_id = 3;
732}
733
734// Request message for
735// [MetadataService.GetContext][google.cloud.aiplatform.v1beta1.MetadataService.GetContext].
736message GetContextRequest {
737  // Required. The resource name of the Context to retrieve.
738  // Format:
739  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
740  string name = 1 [
741    (google.api.field_behavior) = REQUIRED,
742    (google.api.resource_reference) = {
743      type: "aiplatform.googleapis.com/Context"
744    }
745  ];
746}
747
748// Request message for
749// [MetadataService.ListContexts][google.cloud.aiplatform.v1beta1.MetadataService.ListContexts]
750message ListContextsRequest {
751  // Required. The MetadataStore whose Contexts should be listed.
752  // Format:
753  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
754  string parent = 1 [
755    (google.api.field_behavior) = REQUIRED,
756    (google.api.resource_reference) = {
757      child_type: "aiplatform.googleapis.com/Context"
758    }
759  ];
760
761  // The maximum number of Contexts to return. The service may return fewer.
762  // Must be in range 1-1000, inclusive. Defaults to 100.
763  int32 page_size = 2;
764
765  // A page token, received from a previous
766  // [MetadataService.ListContexts][google.cloud.aiplatform.v1beta1.MetadataService.ListContexts]
767  // call. Provide this to retrieve the subsequent page.
768  //
769  // When paginating, all other provided parameters must match the call that
770  // provided the page token. (Otherwise the request will fail with
771  // INVALID_ARGUMENT error.)
772  string page_token = 3;
773
774  // Filter specifying the boolean condition for the Contexts to satisfy in
775  // order to be part of the result set.
776  // The syntax to define filter query is based on https://google.aip.dev/160.
777  // Following are the supported set of filters:
778  //
779  // *  **Attribute filtering**:
780  //    For example: `display_name = "test"`.
781  //    Supported fields include: `name`, `display_name`, `schema_title`,
782  //    `create_time`, and `update_time`.
783  //    Time fields, such as `create_time` and `update_time`, require values
784  //    specified in RFC-3339 format.
785  //    For example: `create_time = "2020-11-19T11:30:00-04:00"`.
786  // *  **Metadata field**:
787  //    To filter on metadata fields use traversal operation as follows:
788  //    `metadata.<field_name>.<type_value>`.
789  //    For example: `metadata.field_1.number_value = 10.0`.
790  //    In case the field name contains special characters (such as colon), one
791  //    can embed it inside double quote.
792  //    For example: `metadata."field:1".number_value = 10.0`
793  // *  **Parent Child filtering**:
794  //    To filter Contexts based on parent-child relationship use the HAS
795  //    operator as follows:
796  //
797  //    ```
798  //    parent_contexts:
799  //    "projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context_id>"
800  //    child_contexts:
801  //    "projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context_id>"
802  //    ```
803  //
804  // Each of the above supported filters can be combined together using
805  // logical operators (`AND` & `OR`). Maximum nested expression depth allowed
806  // is 5.
807  //
808  // For example: `display_name = "test" AND metadata.field1.bool_value = true`.
809  string filter = 4;
810
811  // How the list of messages is ordered. Specify the values to order by and an
812  // ordering operation. The default sorting order is ascending. To specify
813  // descending order for a field, users append a " desc" suffix; for example:
814  // "foo desc, bar".
815  // Subfields are specified with a `.` character, such as foo.bar.
816  // see https://google.aip.dev/132#ordering for more details.
817  string order_by = 5;
818}
819
820// Response message for
821// [MetadataService.ListContexts][google.cloud.aiplatform.v1beta1.MetadataService.ListContexts].
822message ListContextsResponse {
823  // The Contexts retrieved from the MetadataStore.
824  repeated Context contexts = 1;
825
826  // A token, which can be sent as
827  // [ListContextsRequest.page_token][google.cloud.aiplatform.v1beta1.ListContextsRequest.page_token]
828  // to retrieve the next page.
829  // If this field is not populated, there are no subsequent pages.
830  string next_page_token = 2;
831}
832
833// Request message for
834// [MetadataService.UpdateContext][google.cloud.aiplatform.v1beta1.MetadataService.UpdateContext].
835message UpdateContextRequest {
836  // Required. The Context containing updates.
837  // The Context's [Context.name][google.cloud.aiplatform.v1beta1.Context.name]
838  // field is used to identify the Context to be updated. Format:
839  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
840  Context context = 1 [(google.api.field_behavior) = REQUIRED];
841
842  // Optional. A FieldMask indicating which fields should be updated.
843  google.protobuf.FieldMask update_mask = 2
844      [(google.api.field_behavior) = OPTIONAL];
845
846  // If set to true, and the [Context][google.cloud.aiplatform.v1beta1.Context]
847  // is not found, a new [Context][google.cloud.aiplatform.v1beta1.Context] is
848  // created.
849  bool allow_missing = 3;
850}
851
852// Request message for
853// [MetadataService.DeleteContext][google.cloud.aiplatform.v1beta1.MetadataService.DeleteContext].
854message DeleteContextRequest {
855  // Required. The resource name of the Context to delete.
856  // Format:
857  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
858  string name = 1 [
859    (google.api.field_behavior) = REQUIRED,
860    (google.api.resource_reference) = {
861      type: "aiplatform.googleapis.com/Context"
862    }
863  ];
864
865  // The force deletion semantics is still undefined.
866  // Users should not use this field.
867  bool force = 2;
868
869  // Optional. The etag of the Context to delete.
870  // If this is provided, it must match the server's etag. Otherwise, the
871  // request will fail with a FAILED_PRECONDITION.
872  string etag = 3 [(google.api.field_behavior) = OPTIONAL];
873}
874
875// Request message for
876// [MetadataService.PurgeContexts][google.cloud.aiplatform.v1beta1.MetadataService.PurgeContexts].
877message PurgeContextsRequest {
878  // Required. The metadata store to purge Contexts from.
879  // Format:
880  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
881  string parent = 1 [
882    (google.api.field_behavior) = REQUIRED,
883    (google.api.resource_reference) = {
884      child_type: "aiplatform.googleapis.com/Context"
885    }
886  ];
887
888  // Required. A required filter matching the Contexts to be purged.
889  // E.g., `update_time <= 2020-11-19T11:30:00-04:00`.
890  string filter = 2 [(google.api.field_behavior) = REQUIRED];
891
892  // Optional. Flag to indicate to actually perform the purge.
893  // If `force` is set to false, the method will return a sample of
894  // Context names that would be deleted.
895  bool force = 3 [(google.api.field_behavior) = OPTIONAL];
896}
897
898// Response message for
899// [MetadataService.PurgeContexts][google.cloud.aiplatform.v1beta1.MetadataService.PurgeContexts].
900message PurgeContextsResponse {
901  // The number of Contexts that this request deleted (or, if `force` is false,
902  // the number of Contexts that will be deleted). This can be an estimate.
903  int64 purge_count = 1;
904
905  // A sample of the Context names that will be deleted.
906  // Only populated if `force` is set to false. The maximum number of samples is
907  // 100 (it is possible to return fewer).
908  repeated string purge_sample = 2 [(google.api.resource_reference) = {
909    type: "aiplatform.googleapis.com/Context"
910  }];
911}
912
913// Details of operations that perform
914// [MetadataService.PurgeContexts][google.cloud.aiplatform.v1beta1.MetadataService.PurgeContexts].
915message PurgeContextsMetadata {
916  // Operation metadata for purging Contexts.
917  GenericOperationMetadata generic_metadata = 1;
918}
919
920// Request message for
921// [MetadataService.AddContextArtifactsAndExecutions][google.cloud.aiplatform.v1beta1.MetadataService.AddContextArtifactsAndExecutions].
922message AddContextArtifactsAndExecutionsRequest {
923  // Required. The resource name of the Context that the Artifacts and
924  // Executions belong to. Format:
925  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
926  string context = 1 [
927    (google.api.field_behavior) = REQUIRED,
928    (google.api.resource_reference) = {
929      type: "aiplatform.googleapis.com/Context"
930    }
931  ];
932
933  // The resource names of the Artifacts to attribute to the Context.
934  //
935  // Format:
936  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
937  repeated string artifacts = 2 [(google.api.resource_reference) = {
938    type: "aiplatform.googleapis.com/Artifact"
939  }];
940
941  // The resource names of the Executions to associate with the
942  // Context.
943  //
944  // Format:
945  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
946  repeated string executions = 3 [(google.api.resource_reference) = {
947    type: "aiplatform.googleapis.com/Execution"
948  }];
949}
950
951// Response message for
952// [MetadataService.AddContextArtifactsAndExecutions][google.cloud.aiplatform.v1beta1.MetadataService.AddContextArtifactsAndExecutions].
953message AddContextArtifactsAndExecutionsResponse {}
954
955// Request message for
956// [MetadataService.AddContextChildren][google.cloud.aiplatform.v1beta1.MetadataService.AddContextChildren].
957message AddContextChildrenRequest {
958  // Required. The resource name of the parent Context.
959  //
960  // Format:
961  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
962  string context = 1 [
963    (google.api.field_behavior) = REQUIRED,
964    (google.api.resource_reference) = {
965      type: "aiplatform.googleapis.com/Context"
966    }
967  ];
968
969  // The resource names of the child Contexts.
970  repeated string child_contexts = 2 [(google.api.resource_reference) = {
971    type: "aiplatform.googleapis.com/Context"
972  }];
973}
974
975// Response message for
976// [MetadataService.AddContextChildren][google.cloud.aiplatform.v1beta1.MetadataService.AddContextChildren].
977message AddContextChildrenResponse {}
978
979// Request message for
980// [MetadataService.DeleteContextChildrenRequest][].
981message RemoveContextChildrenRequest {
982  // Required. The resource name of the parent Context.
983  //
984  // Format:
985  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
986  string context = 1 [
987    (google.api.field_behavior) = REQUIRED,
988    (google.api.resource_reference) = {
989      type: "aiplatform.googleapis.com/Context"
990    }
991  ];
992
993  // The resource names of the child Contexts.
994  repeated string child_contexts = 2 [(google.api.resource_reference) = {
995    type: "aiplatform.googleapis.com/Context"
996  }];
997}
998
999// Response message for
1000// [MetadataService.RemoveContextChildren][google.cloud.aiplatform.v1beta1.MetadataService.RemoveContextChildren].
1001message RemoveContextChildrenResponse {}
1002
1003// Request message for
1004// [MetadataService.QueryContextLineageSubgraph][google.cloud.aiplatform.v1beta1.MetadataService.QueryContextLineageSubgraph].
1005message QueryContextLineageSubgraphRequest {
1006  // Required. The resource name of the Context whose Artifacts and Executions
1007  // should be retrieved as a LineageSubgraph.
1008  // Format:
1009  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
1010  //
1011  // The request may error with FAILED_PRECONDITION if the number of Artifacts,
1012  // the number of Executions, or the number of Events that would be returned
1013  // for the Context exceeds 1000.
1014  string context = 1 [
1015    (google.api.field_behavior) = REQUIRED,
1016    (google.api.resource_reference) = {
1017      type: "aiplatform.googleapis.com/Context"
1018    }
1019  ];
1020}
1021
1022// Request message for
1023// [MetadataService.CreateExecution][google.cloud.aiplatform.v1beta1.MetadataService.CreateExecution].
1024message CreateExecutionRequest {
1025  // Required. The resource name of the MetadataStore where the Execution should
1026  // be created.
1027  // Format:
1028  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
1029  string parent = 1 [
1030    (google.api.field_behavior) = REQUIRED,
1031    (google.api.resource_reference) = {
1032      type: "aiplatform.googleapis.com/MetadataStore"
1033    }
1034  ];
1035
1036  // Required. The Execution to create.
1037  Execution execution = 2 [(google.api.field_behavior) = REQUIRED];
1038
1039  // The {execution} portion of the resource name with the format:
1040  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
1041  // If not provided, the Execution's ID will be a UUID generated by the
1042  // service.
1043  // Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
1044  // Must be unique across all Executions in the parent MetadataStore.
1045  // (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED
1046  // if the caller can't view the preexisting Execution.)
1047  string execution_id = 3;
1048}
1049
1050// Request message for
1051// [MetadataService.GetExecution][google.cloud.aiplatform.v1beta1.MetadataService.GetExecution].
1052message GetExecutionRequest {
1053  // Required. The resource name of the Execution to retrieve.
1054  // Format:
1055  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
1056  string name = 1 [
1057    (google.api.field_behavior) = REQUIRED,
1058    (google.api.resource_reference) = {
1059      type: "aiplatform.googleapis.com/Execution"
1060    }
1061  ];
1062}
1063
1064// Request message for
1065// [MetadataService.ListExecutions][google.cloud.aiplatform.v1beta1.MetadataService.ListExecutions].
1066message ListExecutionsRequest {
1067  // Required. The MetadataStore whose Executions should be listed.
1068  // Format:
1069  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
1070  string parent = 1 [
1071    (google.api.field_behavior) = REQUIRED,
1072    (google.api.resource_reference) = {
1073      child_type: "aiplatform.googleapis.com/Execution"
1074    }
1075  ];
1076
1077  // The maximum number of Executions to return. The service may return fewer.
1078  // Must be in range 1-1000, inclusive. Defaults to 100.
1079  int32 page_size = 2;
1080
1081  // A page token, received from a previous
1082  // [MetadataService.ListExecutions][google.cloud.aiplatform.v1beta1.MetadataService.ListExecutions]
1083  // call. Provide this to retrieve the subsequent page.
1084  //
1085  // When paginating, all other provided parameters must match the call that
1086  // provided the page token. (Otherwise the request will fail with an
1087  // INVALID_ARGUMENT error.)
1088  string page_token = 3;
1089
1090  // Filter specifying the boolean condition for the Executions to satisfy in
1091  // order to be part of the result set.
1092  // The syntax to define filter query is based on https://google.aip.dev/160.
1093  // Following are the supported set of filters:
1094  //
1095  // *  **Attribute filtering**:
1096  //    For example: `display_name = "test"`.
1097  //    Supported fields include: `name`, `display_name`, `state`,
1098  //    `schema_title`, `create_time`, and `update_time`.
1099  //    Time fields, such as `create_time` and `update_time`, require values
1100  //    specified in RFC-3339 format.
1101  //    For example: `create_time = "2020-11-19T11:30:00-04:00"`.
1102  // *  **Metadata field**:
1103  //    To filter on metadata fields use traversal operation as follows:
1104  //    `metadata.<field_name>.<type_value>`
1105  //    For example: `metadata.field_1.number_value = 10.0`
1106  //    In case the field name contains special characters (such as colon), one
1107  //    can embed it inside double quote.
1108  //    For example: `metadata."field:1".number_value = 10.0`
1109  // *  **Context based filtering**:
1110  //    To filter Executions based on the contexts to which they belong use
1111  //    the function operator with the full resource name:
1112  //    `in_context(<context-name>)`.
1113  //    For example:
1114  //    `in_context("projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context-id>")`
1115  //
1116  // Each of the above supported filters can be combined together using
1117  // logical operators (`AND` & `OR`). Maximum nested expression depth allowed
1118  // is 5.
1119  //
1120  // For example: `display_name = "test" AND metadata.field1.bool_value = true`.
1121  string filter = 4;
1122
1123  // How the list of messages is ordered. Specify the values to order by and an
1124  // ordering operation. The default sorting order is ascending. To specify
1125  // descending order for a field, users append a " desc" suffix; for example:
1126  // "foo desc, bar".
1127  // Subfields are specified with a `.` character, such as foo.bar.
1128  // see https://google.aip.dev/132#ordering for more details.
1129  string order_by = 5;
1130}
1131
1132// Response message for
1133// [MetadataService.ListExecutions][google.cloud.aiplatform.v1beta1.MetadataService.ListExecutions].
1134message ListExecutionsResponse {
1135  // The Executions retrieved from the MetadataStore.
1136  repeated Execution executions = 1;
1137
1138  // A token, which can be sent as
1139  // [ListExecutionsRequest.page_token][google.cloud.aiplatform.v1beta1.ListExecutionsRequest.page_token]
1140  // to retrieve the next page.
1141  // If this field is not populated, there are no subsequent pages.
1142  string next_page_token = 2;
1143}
1144
1145// Request message for
1146// [MetadataService.UpdateExecution][google.cloud.aiplatform.v1beta1.MetadataService.UpdateExecution].
1147message UpdateExecutionRequest {
1148  // Required. The Execution containing updates.
1149  // The Execution's
1150  // [Execution.name][google.cloud.aiplatform.v1beta1.Execution.name] field is
1151  // used to identify the Execution to be updated. Format:
1152  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
1153  Execution execution = 1 [(google.api.field_behavior) = REQUIRED];
1154
1155  // Optional. A FieldMask indicating which fields should be updated.
1156  google.protobuf.FieldMask update_mask = 2
1157      [(google.api.field_behavior) = OPTIONAL];
1158
1159  // If set to true, and the
1160  // [Execution][google.cloud.aiplatform.v1beta1.Execution] is not found, a new
1161  // [Execution][google.cloud.aiplatform.v1beta1.Execution] is created.
1162  bool allow_missing = 3;
1163}
1164
1165// Request message for
1166// [MetadataService.DeleteExecution][google.cloud.aiplatform.v1beta1.MetadataService.DeleteExecution].
1167message DeleteExecutionRequest {
1168  // Required. The resource name of the Execution to delete.
1169  // Format:
1170  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
1171  string name = 1 [
1172    (google.api.field_behavior) = REQUIRED,
1173    (google.api.resource_reference) = {
1174      type: "aiplatform.googleapis.com/Execution"
1175    }
1176  ];
1177
1178  // Optional. The etag of the Execution to delete.
1179  // If this is provided, it must match the server's etag. Otherwise, the
1180  // request will fail with a FAILED_PRECONDITION.
1181  string etag = 2 [(google.api.field_behavior) = OPTIONAL];
1182}
1183
1184// Request message for
1185// [MetadataService.PurgeExecutions][google.cloud.aiplatform.v1beta1.MetadataService.PurgeExecutions].
1186message PurgeExecutionsRequest {
1187  // Required. The metadata store to purge Executions from.
1188  // Format:
1189  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
1190  string parent = 1 [
1191    (google.api.field_behavior) = REQUIRED,
1192    (google.api.resource_reference) = {
1193      child_type: "aiplatform.googleapis.com/Execution"
1194    }
1195  ];
1196
1197  // Required. A required filter matching the Executions to be purged.
1198  // E.g., `update_time <= 2020-11-19T11:30:00-04:00`.
1199  string filter = 2 [(google.api.field_behavior) = REQUIRED];
1200
1201  // Optional. Flag to indicate to actually perform the purge.
1202  // If `force` is set to false, the method will return a sample of
1203  // Execution names that would be deleted.
1204  bool force = 3 [(google.api.field_behavior) = OPTIONAL];
1205}
1206
1207// Response message for
1208// [MetadataService.PurgeExecutions][google.cloud.aiplatform.v1beta1.MetadataService.PurgeExecutions].
1209message PurgeExecutionsResponse {
1210  // The number of Executions that this request deleted (or, if `force` is
1211  // false, the number of Executions that will be deleted). This can be an
1212  // estimate.
1213  int64 purge_count = 1;
1214
1215  // A sample of the Execution names that will be deleted.
1216  // Only populated if `force` is set to false. The maximum number of samples is
1217  // 100 (it is possible to return fewer).
1218  repeated string purge_sample = 2 [(google.api.resource_reference) = {
1219    type: "aiplatform.googleapis.com/Execution"
1220  }];
1221}
1222
1223// Details of operations that perform
1224// [MetadataService.PurgeExecutions][google.cloud.aiplatform.v1beta1.MetadataService.PurgeExecutions].
1225message PurgeExecutionsMetadata {
1226  // Operation metadata for purging Executions.
1227  GenericOperationMetadata generic_metadata = 1;
1228}
1229
1230// Request message for
1231// [MetadataService.AddExecutionEvents][google.cloud.aiplatform.v1beta1.MetadataService.AddExecutionEvents].
1232message AddExecutionEventsRequest {
1233  // Required. The resource name of the Execution that the Events connect
1234  // Artifacts with.
1235  // Format:
1236  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
1237  string execution = 1 [
1238    (google.api.field_behavior) = REQUIRED,
1239    (google.api.resource_reference) = {
1240      type: "aiplatform.googleapis.com/Execution"
1241    }
1242  ];
1243
1244  // The Events to create and add.
1245  repeated Event events = 2;
1246}
1247
1248// Response message for
1249// [MetadataService.AddExecutionEvents][google.cloud.aiplatform.v1beta1.MetadataService.AddExecutionEvents].
1250message AddExecutionEventsResponse {}
1251
1252// Request message for
1253// [MetadataService.QueryExecutionInputsAndOutputs][google.cloud.aiplatform.v1beta1.MetadataService.QueryExecutionInputsAndOutputs].
1254message QueryExecutionInputsAndOutputsRequest {
1255  // Required. The resource name of the Execution whose input and output
1256  // Artifacts should be retrieved as a LineageSubgraph. Format:
1257  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
1258  string execution = 1 [
1259    (google.api.field_behavior) = REQUIRED,
1260    (google.api.resource_reference) = {
1261      type: "aiplatform.googleapis.com/Execution"
1262    }
1263  ];
1264}
1265
1266// Request message for
1267// [MetadataService.CreateMetadataSchema][google.cloud.aiplatform.v1beta1.MetadataService.CreateMetadataSchema].
1268message CreateMetadataSchemaRequest {
1269  // Required. The resource name of the MetadataStore where the MetadataSchema
1270  // should be created. Format:
1271  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
1272  string parent = 1 [
1273    (google.api.field_behavior) = REQUIRED,
1274    (google.api.resource_reference) = {
1275      type: "aiplatform.googleapis.com/MetadataStore"
1276    }
1277  ];
1278
1279  // Required. The MetadataSchema to create.
1280  MetadataSchema metadata_schema = 2 [(google.api.field_behavior) = REQUIRED];
1281
1282  // The {metadata_schema} portion of the resource name with the format:
1283  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}`
1284  // If not provided, the MetadataStore's ID will be a UUID generated by the
1285  // service.
1286  // Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
1287  // Must be unique across all MetadataSchemas in the parent Location.
1288  // (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED
1289  // if the caller can't view the preexisting MetadataSchema.)
1290  string metadata_schema_id = 3;
1291}
1292
1293// Request message for
1294// [MetadataService.GetMetadataSchema][google.cloud.aiplatform.v1beta1.MetadataService.GetMetadataSchema].
1295message GetMetadataSchemaRequest {
1296  // Required. The resource name of the MetadataSchema to retrieve.
1297  // Format:
1298  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}`
1299  string name = 1 [
1300    (google.api.field_behavior) = REQUIRED,
1301    (google.api.resource_reference) = {
1302      type: "aiplatform.googleapis.com/MetadataSchema"
1303    }
1304  ];
1305}
1306
1307// Request message for
1308// [MetadataService.ListMetadataSchemas][google.cloud.aiplatform.v1beta1.MetadataService.ListMetadataSchemas].
1309message ListMetadataSchemasRequest {
1310  // Required. The MetadataStore whose MetadataSchemas should be listed.
1311  // Format:
1312  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
1313  string parent = 1 [
1314    (google.api.field_behavior) = REQUIRED,
1315    (google.api.resource_reference) = {
1316      child_type: "aiplatform.googleapis.com/MetadataSchema"
1317    }
1318  ];
1319
1320  // The maximum number of MetadataSchemas to return. The service may return
1321  // fewer.
1322  // Must be in range 1-1000, inclusive. Defaults to 100.
1323  int32 page_size = 2;
1324
1325  // A page token, received from a previous
1326  // [MetadataService.ListMetadataSchemas][google.cloud.aiplatform.v1beta1.MetadataService.ListMetadataSchemas]
1327  // call. Provide this to retrieve the next page.
1328  //
1329  // When paginating, all other provided parameters must match the call that
1330  // provided the page token. (Otherwise the request will fail with
1331  // INVALID_ARGUMENT error.)
1332  string page_token = 3;
1333
1334  // A query to filter available MetadataSchemas for matching results.
1335  string filter = 4;
1336}
1337
1338// Response message for
1339// [MetadataService.ListMetadataSchemas][google.cloud.aiplatform.v1beta1.MetadataService.ListMetadataSchemas].
1340message ListMetadataSchemasResponse {
1341  // The MetadataSchemas found for the MetadataStore.
1342  repeated MetadataSchema metadata_schemas = 1;
1343
1344  // A token, which can be sent as
1345  // [ListMetadataSchemasRequest.page_token][google.cloud.aiplatform.v1beta1.ListMetadataSchemasRequest.page_token]
1346  // to retrieve the next page. If this field is not populated, there are no
1347  // subsequent pages.
1348  string next_page_token = 2;
1349}
1350
1351// Request message for
1352// [MetadataService.QueryArtifactLineageSubgraph][google.cloud.aiplatform.v1beta1.MetadataService.QueryArtifactLineageSubgraph].
1353message QueryArtifactLineageSubgraphRequest {
1354  // Required. The resource name of the Artifact whose Lineage needs to be
1355  // retrieved as a LineageSubgraph. Format:
1356  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
1357  //
1358  // The request may error with FAILED_PRECONDITION if the number of Artifacts,
1359  // the number of Executions, or the number of Events that would be returned
1360  // for the Context exceeds 1000.
1361  string artifact = 1 [
1362    (google.api.field_behavior) = REQUIRED,
1363    (google.api.resource_reference) = {
1364      type: "aiplatform.googleapis.com/Artifact"
1365    }
1366  ];
1367
1368  // Specifies the size of the lineage graph in terms of number of hops from the
1369  // specified artifact.
1370  // Negative Value: INVALID_ARGUMENT error is returned
1371  // 0: Only input artifact is returned.
1372  // No value: Transitive closure is performed to return the complete graph.
1373  int32 max_hops = 2;
1374
1375  // Filter specifying the boolean condition for the Artifacts to satisfy in
1376  // order to be part of the Lineage Subgraph.
1377  // The syntax to define filter query is based on https://google.aip.dev/160.
1378  // The supported set of filters include the following:
1379  //
1380  // *  **Attribute filtering**:
1381  //    For example: `display_name = "test"`
1382  //    Supported fields include: `name`, `display_name`, `uri`, `state`,
1383  //    `schema_title`, `create_time`, and `update_time`.
1384  //    Time fields, such as `create_time` and `update_time`, require values
1385  //    specified in RFC-3339 format.
1386  //    For example: `create_time = "2020-11-19T11:30:00-04:00"`
1387  // *  **Metadata field**:
1388  //    To filter on metadata fields use traversal operation as follows:
1389  //    `metadata.<field_name>.<type_value>`.
1390  //    For example: `metadata.field_1.number_value = 10.0`
1391  //    In case the field name contains special characters (such as colon), one
1392  //    can embed it inside double quote.
1393  //    For example: `metadata."field:1".number_value = 10.0`
1394  //
1395  // Each of the above supported filter types can be combined together using
1396  // logical operators (`AND` & `OR`). Maximum nested expression depth allowed
1397  // is 5.
1398  //
1399  // For example: `display_name = "test" AND metadata.field1.bool_value = true`.
1400  string filter = 3;
1401}
1402