xref: /aosp_15_r20/external/googleapis/google/cloud/aiplatform/v1/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.v1;
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/v1/artifact.proto";
24import "google/cloud/aiplatform/v1/context.proto";
25import "google/cloud/aiplatform/v1/event.proto";
26import "google/cloud/aiplatform/v1/execution.proto";
27import "google/cloud/aiplatform/v1/lineage_subgraph.proto";
28import "google/cloud/aiplatform/v1/metadata_schema.proto";
29import "google/cloud/aiplatform/v1/metadata_store.proto";
30import "google/cloud/aiplatform/v1/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.V1";
36option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb";
37option java_multiple_files = true;
38option java_outer_classname = "MetadataServiceProto";
39option java_package = "com.google.cloud.aiplatform.v1";
40option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
41option ruby_package = "Google::Cloud::AIPlatform::V1";
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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.MetadataService.UpdateArtifact].
626message UpdateArtifactRequest {
627  // Required. The Artifact containing updates.
628  // The Artifact's [Artifact.name][google.cloud.aiplatform.v1.Artifact.name]
629  // field is used to identify the Artifact to be updated. Format:
630  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
631  Artifact artifact = 1 [(google.api.field_behavior) = REQUIRED];
632
633  // Optional. A FieldMask indicating which fields should be updated.
634  google.protobuf.FieldMask update_mask = 2
635      [(google.api.field_behavior) = OPTIONAL];
636
637  // If set to true, and the [Artifact][google.cloud.aiplatform.v1.Artifact] is
638  // not found, a new [Artifact][google.cloud.aiplatform.v1.Artifact] is
639  // created.
640  bool allow_missing = 3;
641}
642
643// Request message for
644// [MetadataService.DeleteArtifact][google.cloud.aiplatform.v1.MetadataService.DeleteArtifact].
645message DeleteArtifactRequest {
646  // Required. The resource name of the Artifact to delete.
647  // Format:
648  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
649  string name = 1 [
650    (google.api.field_behavior) = REQUIRED,
651    (google.api.resource_reference) = {
652      type: "aiplatform.googleapis.com/Artifact"
653    }
654  ];
655
656  // Optional. The etag of the Artifact to delete.
657  // If this is provided, it must match the server's etag. Otherwise, the
658  // request will fail with a FAILED_PRECONDITION.
659  string etag = 2 [(google.api.field_behavior) = OPTIONAL];
660}
661
662// Request message for
663// [MetadataService.PurgeArtifacts][google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts].
664message PurgeArtifactsRequest {
665  // Required. The metadata store to purge Artifacts from.
666  // Format:
667  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
668  string parent = 1 [
669    (google.api.field_behavior) = REQUIRED,
670    (google.api.resource_reference) = {
671      child_type: "aiplatform.googleapis.com/Artifact"
672    }
673  ];
674
675  // Required. A required filter matching the Artifacts to be purged.
676  // E.g., `update_time <= 2020-11-19T11:30:00-04:00`.
677  string filter = 2 [(google.api.field_behavior) = REQUIRED];
678
679  // Optional. Flag to indicate to actually perform the purge.
680  // If `force` is set to false, the method will return a sample of
681  // Artifact names that would be deleted.
682  bool force = 3 [(google.api.field_behavior) = OPTIONAL];
683}
684
685// Response message for
686// [MetadataService.PurgeArtifacts][google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts].
687message PurgeArtifactsResponse {
688  // The number of Artifacts that this request deleted (or, if `force` is false,
689  // the number of Artifacts that will be deleted). This can be an estimate.
690  int64 purge_count = 1;
691
692  // A sample of the Artifact names that will be deleted.
693  // Only populated if `force` is set to false. The maximum number of samples is
694  // 100 (it is possible to return fewer).
695  repeated string purge_sample = 2 [(google.api.resource_reference) = {
696    type: "aiplatform.googleapis.com/Artifact"
697  }];
698}
699
700// Details of operations that perform
701// [MetadataService.PurgeArtifacts][google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts].
702message PurgeArtifactsMetadata {
703  // Operation metadata for purging Artifacts.
704  GenericOperationMetadata generic_metadata = 1;
705}
706
707// Request message for
708// [MetadataService.CreateContext][google.cloud.aiplatform.v1.MetadataService.CreateContext].
709message CreateContextRequest {
710  // Required. The resource name of the MetadataStore where the Context should
711  // be created. Format:
712  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
713  string parent = 1 [
714    (google.api.field_behavior) = REQUIRED,
715    (google.api.resource_reference) = {
716      type: "aiplatform.googleapis.com/MetadataStore"
717    }
718  ];
719
720  // Required. The Context to create.
721  Context context = 2 [(google.api.field_behavior) = REQUIRED];
722
723  // The {context} portion of the resource name with the format:
724  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`.
725  // If not provided, the Context's ID will be a UUID generated by the service.
726  // Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
727  // Must be unique across all Contexts in the parent MetadataStore. (Otherwise
728  // the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the
729  // caller can't view the preexisting Context.)
730  string context_id = 3;
731}
732
733// Request message for
734// [MetadataService.GetContext][google.cloud.aiplatform.v1.MetadataService.GetContext].
735message GetContextRequest {
736  // Required. The resource name of the Context to retrieve.
737  // Format:
738  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
739  string name = 1 [
740    (google.api.field_behavior) = REQUIRED,
741    (google.api.resource_reference) = {
742      type: "aiplatform.googleapis.com/Context"
743    }
744  ];
745}
746
747// Request message for
748// [MetadataService.ListContexts][google.cloud.aiplatform.v1.MetadataService.ListContexts]
749message ListContextsRequest {
750  // Required. The MetadataStore whose Contexts should be listed.
751  // Format:
752  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
753  string parent = 1 [
754    (google.api.field_behavior) = REQUIRED,
755    (google.api.resource_reference) = {
756      child_type: "aiplatform.googleapis.com/Context"
757    }
758  ];
759
760  // The maximum number of Contexts to return. The service may return fewer.
761  // Must be in range 1-1000, inclusive. Defaults to 100.
762  int32 page_size = 2;
763
764  // A page token, received from a previous
765  // [MetadataService.ListContexts][google.cloud.aiplatform.v1.MetadataService.ListContexts]
766  // call. Provide this to retrieve the subsequent page.
767  //
768  // When paginating, all other provided parameters must match the call that
769  // provided the page token. (Otherwise the request will fail with
770  // INVALID_ARGUMENT error.)
771  string page_token = 3;
772
773  // Filter specifying the boolean condition for the Contexts to satisfy in
774  // order to be part of the result set.
775  // The syntax to define filter query is based on https://google.aip.dev/160.
776  // Following are the supported set of filters:
777  //
778  // *  **Attribute filtering**:
779  //    For example: `display_name = "test"`.
780  //    Supported fields include: `name`, `display_name`, `schema_title`,
781  //    `create_time`, and `update_time`.
782  //    Time fields, such as `create_time` and `update_time`, require values
783  //    specified in RFC-3339 format.
784  //    For example: `create_time = "2020-11-19T11:30:00-04:00"`.
785  // *  **Metadata field**:
786  //    To filter on metadata fields use traversal operation as follows:
787  //    `metadata.<field_name>.<type_value>`.
788  //    For example: `metadata.field_1.number_value = 10.0`.
789  //    In case the field name contains special characters (such as colon), one
790  //    can embed it inside double quote.
791  //    For example: `metadata."field:1".number_value = 10.0`
792  // *  **Parent Child filtering**:
793  //    To filter Contexts based on parent-child relationship use the HAS
794  //    operator as follows:
795  //
796  //    ```
797  //    parent_contexts:
798  //    "projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context_id>"
799  //    child_contexts:
800  //    "projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context_id>"
801  //    ```
802  //
803  // Each of the above supported filters can be combined together using
804  // logical operators (`AND` & `OR`). Maximum nested expression depth allowed
805  // is 5.
806  //
807  // For example: `display_name = "test" AND metadata.field1.bool_value = true`.
808  string filter = 4;
809
810  // How the list of messages is ordered. Specify the values to order by and an
811  // ordering operation. The default sorting order is ascending. To specify
812  // descending order for a field, users append a " desc" suffix; for example:
813  // "foo desc, bar".
814  // Subfields are specified with a `.` character, such as foo.bar.
815  // see https://google.aip.dev/132#ordering for more details.
816  string order_by = 5;
817}
818
819// Response message for
820// [MetadataService.ListContexts][google.cloud.aiplatform.v1.MetadataService.ListContexts].
821message ListContextsResponse {
822  // The Contexts retrieved from the MetadataStore.
823  repeated Context contexts = 1;
824
825  // A token, which can be sent as
826  // [ListContextsRequest.page_token][google.cloud.aiplatform.v1.ListContextsRequest.page_token]
827  // to retrieve the next page.
828  // If this field is not populated, there are no subsequent pages.
829  string next_page_token = 2;
830}
831
832// Request message for
833// [MetadataService.UpdateContext][google.cloud.aiplatform.v1.MetadataService.UpdateContext].
834message UpdateContextRequest {
835  // Required. The Context containing updates.
836  // The Context's [Context.name][google.cloud.aiplatform.v1.Context.name] field
837  // is used to identify the Context to be updated. Format:
838  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
839  Context context = 1 [(google.api.field_behavior) = REQUIRED];
840
841  // Optional. A FieldMask indicating which fields should be updated.
842  google.protobuf.FieldMask update_mask = 2
843      [(google.api.field_behavior) = OPTIONAL];
844
845  // If set to true, and the [Context][google.cloud.aiplatform.v1.Context] is
846  // not found, a new [Context][google.cloud.aiplatform.v1.Context] is created.
847  bool allow_missing = 3;
848}
849
850// Request message for
851// [MetadataService.DeleteContext][google.cloud.aiplatform.v1.MetadataService.DeleteContext].
852message DeleteContextRequest {
853  // Required. The resource name of the Context to delete.
854  // Format:
855  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
856  string name = 1 [
857    (google.api.field_behavior) = REQUIRED,
858    (google.api.resource_reference) = {
859      type: "aiplatform.googleapis.com/Context"
860    }
861  ];
862
863  // The force deletion semantics is still undefined.
864  // Users should not use this field.
865  bool force = 2;
866
867  // Optional. The etag of the Context to delete.
868  // If this is provided, it must match the server's etag. Otherwise, the
869  // request will fail with a FAILED_PRECONDITION.
870  string etag = 3 [(google.api.field_behavior) = OPTIONAL];
871}
872
873// Request message for
874// [MetadataService.PurgeContexts][google.cloud.aiplatform.v1.MetadataService.PurgeContexts].
875message PurgeContextsRequest {
876  // Required. The metadata store to purge Contexts from.
877  // Format:
878  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
879  string parent = 1 [
880    (google.api.field_behavior) = REQUIRED,
881    (google.api.resource_reference) = {
882      child_type: "aiplatform.googleapis.com/Context"
883    }
884  ];
885
886  // Required. A required filter matching the Contexts to be purged.
887  // E.g., `update_time <= 2020-11-19T11:30:00-04:00`.
888  string filter = 2 [(google.api.field_behavior) = REQUIRED];
889
890  // Optional. Flag to indicate to actually perform the purge.
891  // If `force` is set to false, the method will return a sample of
892  // Context names that would be deleted.
893  bool force = 3 [(google.api.field_behavior) = OPTIONAL];
894}
895
896// Response message for
897// [MetadataService.PurgeContexts][google.cloud.aiplatform.v1.MetadataService.PurgeContexts].
898message PurgeContextsResponse {
899  // The number of Contexts that this request deleted (or, if `force` is false,
900  // the number of Contexts that will be deleted). This can be an estimate.
901  int64 purge_count = 1;
902
903  // A sample of the Context names that will be deleted.
904  // Only populated if `force` is set to false. The maximum number of samples is
905  // 100 (it is possible to return fewer).
906  repeated string purge_sample = 2 [(google.api.resource_reference) = {
907    type: "aiplatform.googleapis.com/Context"
908  }];
909}
910
911// Details of operations that perform
912// [MetadataService.PurgeContexts][google.cloud.aiplatform.v1.MetadataService.PurgeContexts].
913message PurgeContextsMetadata {
914  // Operation metadata for purging Contexts.
915  GenericOperationMetadata generic_metadata = 1;
916}
917
918// Request message for
919// [MetadataService.AddContextArtifactsAndExecutions][google.cloud.aiplatform.v1.MetadataService.AddContextArtifactsAndExecutions].
920message AddContextArtifactsAndExecutionsRequest {
921  // Required. The resource name of the Context that the Artifacts and
922  // Executions belong to. Format:
923  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
924  string context = 1 [
925    (google.api.field_behavior) = REQUIRED,
926    (google.api.resource_reference) = {
927      type: "aiplatform.googleapis.com/Context"
928    }
929  ];
930
931  // The resource names of the Artifacts to attribute to the Context.
932  //
933  // Format:
934  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
935  repeated string artifacts = 2 [(google.api.resource_reference) = {
936    type: "aiplatform.googleapis.com/Artifact"
937  }];
938
939  // The resource names of the Executions to associate with the
940  // Context.
941  //
942  // Format:
943  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
944  repeated string executions = 3 [(google.api.resource_reference) = {
945    type: "aiplatform.googleapis.com/Execution"
946  }];
947}
948
949// Response message for
950// [MetadataService.AddContextArtifactsAndExecutions][google.cloud.aiplatform.v1.MetadataService.AddContextArtifactsAndExecutions].
951message AddContextArtifactsAndExecutionsResponse {}
952
953// Request message for
954// [MetadataService.AddContextChildren][google.cloud.aiplatform.v1.MetadataService.AddContextChildren].
955message AddContextChildrenRequest {
956  // Required. The resource name of the parent Context.
957  //
958  // Format:
959  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
960  string context = 1 [
961    (google.api.field_behavior) = REQUIRED,
962    (google.api.resource_reference) = {
963      type: "aiplatform.googleapis.com/Context"
964    }
965  ];
966
967  // The resource names of the child Contexts.
968  repeated string child_contexts = 2 [(google.api.resource_reference) = {
969    type: "aiplatform.googleapis.com/Context"
970  }];
971}
972
973// Response message for
974// [MetadataService.AddContextChildren][google.cloud.aiplatform.v1.MetadataService.AddContextChildren].
975message AddContextChildrenResponse {}
976
977// Request message for
978// [MetadataService.DeleteContextChildrenRequest][].
979message RemoveContextChildrenRequest {
980  // Required. The resource name of the parent Context.
981  //
982  // Format:
983  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
984  string context = 1 [
985    (google.api.field_behavior) = REQUIRED,
986    (google.api.resource_reference) = {
987      type: "aiplatform.googleapis.com/Context"
988    }
989  ];
990
991  // The resource names of the child Contexts.
992  repeated string child_contexts = 2 [(google.api.resource_reference) = {
993    type: "aiplatform.googleapis.com/Context"
994  }];
995}
996
997// Response message for
998// [MetadataService.RemoveContextChildren][google.cloud.aiplatform.v1.MetadataService.RemoveContextChildren].
999message RemoveContextChildrenResponse {}
1000
1001// Request message for
1002// [MetadataService.QueryContextLineageSubgraph][google.cloud.aiplatform.v1.MetadataService.QueryContextLineageSubgraph].
1003message QueryContextLineageSubgraphRequest {
1004  // Required. The resource name of the Context whose Artifacts and Executions
1005  // should be retrieved as a LineageSubgraph.
1006  // Format:
1007  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
1008  //
1009  // The request may error with FAILED_PRECONDITION if the number of Artifacts,
1010  // the number of Executions, or the number of Events that would be returned
1011  // for the Context exceeds 1000.
1012  string context = 1 [
1013    (google.api.field_behavior) = REQUIRED,
1014    (google.api.resource_reference) = {
1015      type: "aiplatform.googleapis.com/Context"
1016    }
1017  ];
1018}
1019
1020// Request message for
1021// [MetadataService.CreateExecution][google.cloud.aiplatform.v1.MetadataService.CreateExecution].
1022message CreateExecutionRequest {
1023  // Required. The resource name of the MetadataStore where the Execution should
1024  // be created.
1025  // Format:
1026  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
1027  string parent = 1 [
1028    (google.api.field_behavior) = REQUIRED,
1029    (google.api.resource_reference) = {
1030      type: "aiplatform.googleapis.com/MetadataStore"
1031    }
1032  ];
1033
1034  // Required. The Execution to create.
1035  Execution execution = 2 [(google.api.field_behavior) = REQUIRED];
1036
1037  // The {execution} portion of the resource name with the format:
1038  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
1039  // If not provided, the Execution's ID will be a UUID generated by the
1040  // service.
1041  // Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
1042  // Must be unique across all Executions in the parent MetadataStore.
1043  // (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED
1044  // if the caller can't view the preexisting Execution.)
1045  string execution_id = 3;
1046}
1047
1048// Request message for
1049// [MetadataService.GetExecution][google.cloud.aiplatform.v1.MetadataService.GetExecution].
1050message GetExecutionRequest {
1051  // Required. The resource name of the Execution to retrieve.
1052  // Format:
1053  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
1054  string name = 1 [
1055    (google.api.field_behavior) = REQUIRED,
1056    (google.api.resource_reference) = {
1057      type: "aiplatform.googleapis.com/Execution"
1058    }
1059  ];
1060}
1061
1062// Request message for
1063// [MetadataService.ListExecutions][google.cloud.aiplatform.v1.MetadataService.ListExecutions].
1064message ListExecutionsRequest {
1065  // Required. The MetadataStore whose Executions should be listed.
1066  // Format:
1067  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
1068  string parent = 1 [
1069    (google.api.field_behavior) = REQUIRED,
1070    (google.api.resource_reference) = {
1071      child_type: "aiplatform.googleapis.com/Execution"
1072    }
1073  ];
1074
1075  // The maximum number of Executions to return. The service may return fewer.
1076  // Must be in range 1-1000, inclusive. Defaults to 100.
1077  int32 page_size = 2;
1078
1079  // A page token, received from a previous
1080  // [MetadataService.ListExecutions][google.cloud.aiplatform.v1.MetadataService.ListExecutions]
1081  // call. Provide this to retrieve the subsequent page.
1082  //
1083  // When paginating, all other provided parameters must match the call that
1084  // provided the page token. (Otherwise the request will fail with an
1085  // INVALID_ARGUMENT error.)
1086  string page_token = 3;
1087
1088  // Filter specifying the boolean condition for the Executions to satisfy in
1089  // order to be part of the result set.
1090  // The syntax to define filter query is based on https://google.aip.dev/160.
1091  // Following are the supported set of filters:
1092  //
1093  // *  **Attribute filtering**:
1094  //    For example: `display_name = "test"`.
1095  //    Supported fields include: `name`, `display_name`, `state`,
1096  //    `schema_title`, `create_time`, and `update_time`.
1097  //    Time fields, such as `create_time` and `update_time`, require values
1098  //    specified in RFC-3339 format.
1099  //    For example: `create_time = "2020-11-19T11:30:00-04:00"`.
1100  // *  **Metadata field**:
1101  //    To filter on metadata fields use traversal operation as follows:
1102  //    `metadata.<field_name>.<type_value>`
1103  //    For example: `metadata.field_1.number_value = 10.0`
1104  //    In case the field name contains special characters (such as colon), one
1105  //    can embed it inside double quote.
1106  //    For example: `metadata."field:1".number_value = 10.0`
1107  // *  **Context based filtering**:
1108  //    To filter Executions based on the contexts to which they belong use
1109  //    the function operator with the full resource name:
1110  //    `in_context(<context-name>)`.
1111  //    For example:
1112  //    `in_context("projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context-id>")`
1113  //
1114  // Each of the above supported filters can be combined together using
1115  // logical operators (`AND` & `OR`). Maximum nested expression depth allowed
1116  // is 5.
1117  //
1118  // For example: `display_name = "test" AND metadata.field1.bool_value = true`.
1119  string filter = 4;
1120
1121  // How the list of messages is ordered. Specify the values to order by and an
1122  // ordering operation. The default sorting order is ascending. To specify
1123  // descending order for a field, users append a " desc" suffix; for example:
1124  // "foo desc, bar".
1125  // Subfields are specified with a `.` character, such as foo.bar.
1126  // see https://google.aip.dev/132#ordering for more details.
1127  string order_by = 5;
1128}
1129
1130// Response message for
1131// [MetadataService.ListExecutions][google.cloud.aiplatform.v1.MetadataService.ListExecutions].
1132message ListExecutionsResponse {
1133  // The Executions retrieved from the MetadataStore.
1134  repeated Execution executions = 1;
1135
1136  // A token, which can be sent as
1137  // [ListExecutionsRequest.page_token][google.cloud.aiplatform.v1.ListExecutionsRequest.page_token]
1138  // to retrieve the next page.
1139  // If this field is not populated, there are no subsequent pages.
1140  string next_page_token = 2;
1141}
1142
1143// Request message for
1144// [MetadataService.UpdateExecution][google.cloud.aiplatform.v1.MetadataService.UpdateExecution].
1145message UpdateExecutionRequest {
1146  // Required. The Execution containing updates.
1147  // The Execution's [Execution.name][google.cloud.aiplatform.v1.Execution.name]
1148  // field is used to identify the Execution to be updated. Format:
1149  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
1150  Execution execution = 1 [(google.api.field_behavior) = REQUIRED];
1151
1152  // Optional. A FieldMask indicating which fields should be updated.
1153  google.protobuf.FieldMask update_mask = 2
1154      [(google.api.field_behavior) = OPTIONAL];
1155
1156  // If set to true, and the [Execution][google.cloud.aiplatform.v1.Execution]
1157  // is not found, a new [Execution][google.cloud.aiplatform.v1.Execution] is
1158  // created.
1159  bool allow_missing = 3;
1160}
1161
1162// Request message for
1163// [MetadataService.DeleteExecution][google.cloud.aiplatform.v1.MetadataService.DeleteExecution].
1164message DeleteExecutionRequest {
1165  // Required. The resource name of the Execution to delete.
1166  // Format:
1167  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
1168  string name = 1 [
1169    (google.api.field_behavior) = REQUIRED,
1170    (google.api.resource_reference) = {
1171      type: "aiplatform.googleapis.com/Execution"
1172    }
1173  ];
1174
1175  // Optional. The etag of the Execution to delete.
1176  // If this is provided, it must match the server's etag. Otherwise, the
1177  // request will fail with a FAILED_PRECONDITION.
1178  string etag = 2 [(google.api.field_behavior) = OPTIONAL];
1179}
1180
1181// Request message for
1182// [MetadataService.PurgeExecutions][google.cloud.aiplatform.v1.MetadataService.PurgeExecutions].
1183message PurgeExecutionsRequest {
1184  // Required. The metadata store to purge Executions from.
1185  // Format:
1186  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
1187  string parent = 1 [
1188    (google.api.field_behavior) = REQUIRED,
1189    (google.api.resource_reference) = {
1190      child_type: "aiplatform.googleapis.com/Execution"
1191    }
1192  ];
1193
1194  // Required. A required filter matching the Executions to be purged.
1195  // E.g., `update_time <= 2020-11-19T11:30:00-04:00`.
1196  string filter = 2 [(google.api.field_behavior) = REQUIRED];
1197
1198  // Optional. Flag to indicate to actually perform the purge.
1199  // If `force` is set to false, the method will return a sample of
1200  // Execution names that would be deleted.
1201  bool force = 3 [(google.api.field_behavior) = OPTIONAL];
1202}
1203
1204// Response message for
1205// [MetadataService.PurgeExecutions][google.cloud.aiplatform.v1.MetadataService.PurgeExecutions].
1206message PurgeExecutionsResponse {
1207  // The number of Executions that this request deleted (or, if `force` is
1208  // false, the number of Executions that will be deleted). This can be an
1209  // estimate.
1210  int64 purge_count = 1;
1211
1212  // A sample of the Execution names that will be deleted.
1213  // Only populated if `force` is set to false. The maximum number of samples is
1214  // 100 (it is possible to return fewer).
1215  repeated string purge_sample = 2 [(google.api.resource_reference) = {
1216    type: "aiplatform.googleapis.com/Execution"
1217  }];
1218}
1219
1220// Details of operations that perform
1221// [MetadataService.PurgeExecutions][google.cloud.aiplatform.v1.MetadataService.PurgeExecutions].
1222message PurgeExecutionsMetadata {
1223  // Operation metadata for purging Executions.
1224  GenericOperationMetadata generic_metadata = 1;
1225}
1226
1227// Request message for
1228// [MetadataService.AddExecutionEvents][google.cloud.aiplatform.v1.MetadataService.AddExecutionEvents].
1229message AddExecutionEventsRequest {
1230  // Required. The resource name of the Execution that the Events connect
1231  // Artifacts with.
1232  // Format:
1233  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
1234  string execution = 1 [
1235    (google.api.field_behavior) = REQUIRED,
1236    (google.api.resource_reference) = {
1237      type: "aiplatform.googleapis.com/Execution"
1238    }
1239  ];
1240
1241  // The Events to create and add.
1242  repeated Event events = 2;
1243}
1244
1245// Response message for
1246// [MetadataService.AddExecutionEvents][google.cloud.aiplatform.v1.MetadataService.AddExecutionEvents].
1247message AddExecutionEventsResponse {}
1248
1249// Request message for
1250// [MetadataService.QueryExecutionInputsAndOutputs][google.cloud.aiplatform.v1.MetadataService.QueryExecutionInputsAndOutputs].
1251message QueryExecutionInputsAndOutputsRequest {
1252  // Required. The resource name of the Execution whose input and output
1253  // Artifacts should be retrieved as a LineageSubgraph. Format:
1254  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
1255  string execution = 1 [
1256    (google.api.field_behavior) = REQUIRED,
1257    (google.api.resource_reference) = {
1258      type: "aiplatform.googleapis.com/Execution"
1259    }
1260  ];
1261}
1262
1263// Request message for
1264// [MetadataService.CreateMetadataSchema][google.cloud.aiplatform.v1.MetadataService.CreateMetadataSchema].
1265message CreateMetadataSchemaRequest {
1266  // Required. The resource name of the MetadataStore where the MetadataSchema
1267  // should be created. Format:
1268  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
1269  string parent = 1 [
1270    (google.api.field_behavior) = REQUIRED,
1271    (google.api.resource_reference) = {
1272      type: "aiplatform.googleapis.com/MetadataStore"
1273    }
1274  ];
1275
1276  // Required. The MetadataSchema to create.
1277  MetadataSchema metadata_schema = 2 [(google.api.field_behavior) = REQUIRED];
1278
1279  // The {metadata_schema} portion of the resource name with the format:
1280  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}`
1281  // If not provided, the MetadataStore's ID will be a UUID generated by the
1282  // service.
1283  // Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
1284  // Must be unique across all MetadataSchemas in the parent Location.
1285  // (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED
1286  // if the caller can't view the preexisting MetadataSchema.)
1287  string metadata_schema_id = 3;
1288}
1289
1290// Request message for
1291// [MetadataService.GetMetadataSchema][google.cloud.aiplatform.v1.MetadataService.GetMetadataSchema].
1292message GetMetadataSchemaRequest {
1293  // Required. The resource name of the MetadataSchema to retrieve.
1294  // Format:
1295  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}`
1296  string name = 1 [
1297    (google.api.field_behavior) = REQUIRED,
1298    (google.api.resource_reference) = {
1299      type: "aiplatform.googleapis.com/MetadataSchema"
1300    }
1301  ];
1302}
1303
1304// Request message for
1305// [MetadataService.ListMetadataSchemas][google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas].
1306message ListMetadataSchemasRequest {
1307  // Required. The MetadataStore whose MetadataSchemas should be listed.
1308  // Format:
1309  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
1310  string parent = 1 [
1311    (google.api.field_behavior) = REQUIRED,
1312    (google.api.resource_reference) = {
1313      child_type: "aiplatform.googleapis.com/MetadataSchema"
1314    }
1315  ];
1316
1317  // The maximum number of MetadataSchemas to return. The service may return
1318  // fewer.
1319  // Must be in range 1-1000, inclusive. Defaults to 100.
1320  int32 page_size = 2;
1321
1322  // A page token, received from a previous
1323  // [MetadataService.ListMetadataSchemas][google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas]
1324  // call. Provide this to retrieve the next page.
1325  //
1326  // When paginating, all other provided parameters must match the call that
1327  // provided the page token. (Otherwise the request will fail with
1328  // INVALID_ARGUMENT error.)
1329  string page_token = 3;
1330
1331  // A query to filter available MetadataSchemas for matching results.
1332  string filter = 4;
1333}
1334
1335// Response message for
1336// [MetadataService.ListMetadataSchemas][google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas].
1337message ListMetadataSchemasResponse {
1338  // The MetadataSchemas found for the MetadataStore.
1339  repeated MetadataSchema metadata_schemas = 1;
1340
1341  // A token, which can be sent as
1342  // [ListMetadataSchemasRequest.page_token][google.cloud.aiplatform.v1.ListMetadataSchemasRequest.page_token]
1343  // to retrieve the next page. If this field is not populated, there are no
1344  // subsequent pages.
1345  string next_page_token = 2;
1346}
1347
1348// Request message for
1349// [MetadataService.QueryArtifactLineageSubgraph][google.cloud.aiplatform.v1.MetadataService.QueryArtifactLineageSubgraph].
1350message QueryArtifactLineageSubgraphRequest {
1351  // Required. The resource name of the Artifact whose Lineage needs to be
1352  // retrieved as a LineageSubgraph. Format:
1353  // `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
1354  //
1355  // The request may error with FAILED_PRECONDITION if the number of Artifacts,
1356  // the number of Executions, or the number of Events that would be returned
1357  // for the Context exceeds 1000.
1358  string artifact = 1 [
1359    (google.api.field_behavior) = REQUIRED,
1360    (google.api.resource_reference) = {
1361      type: "aiplatform.googleapis.com/Artifact"
1362    }
1363  ];
1364
1365  // Specifies the size of the lineage graph in terms of number of hops from the
1366  // specified artifact.
1367  // Negative Value: INVALID_ARGUMENT error is returned
1368  // 0: Only input artifact is returned.
1369  // No value: Transitive closure is performed to return the complete graph.
1370  int32 max_hops = 2;
1371
1372  // Filter specifying the boolean condition for the Artifacts to satisfy in
1373  // order to be part of the Lineage Subgraph.
1374  // The syntax to define filter query is based on https://google.aip.dev/160.
1375  // The supported set of filters include the following:
1376  //
1377  // *  **Attribute filtering**:
1378  //    For example: `display_name = "test"`
1379  //    Supported fields include: `name`, `display_name`, `uri`, `state`,
1380  //    `schema_title`, `create_time`, and `update_time`.
1381  //    Time fields, such as `create_time` and `update_time`, require values
1382  //    specified in RFC-3339 format.
1383  //    For example: `create_time = "2020-11-19T11:30:00-04:00"`
1384  // *  **Metadata field**:
1385  //    To filter on metadata fields use traversal operation as follows:
1386  //    `metadata.<field_name>.<type_value>`.
1387  //    For example: `metadata.field_1.number_value = 10.0`
1388  //    In case the field name contains special characters (such as colon), one
1389  //    can embed it inside double quote.
1390  //    For example: `metadata."field:1".number_value = 10.0`
1391  //
1392  // Each of the above supported filter types can be combined together using
1393  // logical operators (`AND` & `OR`). Maximum nested expression depth allowed
1394  // is 5.
1395  //
1396  // For example: `display_name = "test" AND metadata.field1.bool_value = true`.
1397  string filter = 3;
1398}
1399