xref: /aosp_15_r20/external/googleapis/google/cloud/aiplatform/v1/dataset_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/annotation.proto";
24import "google/cloud/aiplatform/v1/annotation_spec.proto";
25import "google/cloud/aiplatform/v1/data_item.proto";
26import "google/cloud/aiplatform/v1/dataset.proto";
27import "google/cloud/aiplatform/v1/dataset_version.proto";
28import "google/cloud/aiplatform/v1/model.proto";
29import "google/cloud/aiplatform/v1/operation.proto";
30import "google/cloud/aiplatform/v1/saved_query.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 = "DatasetServiceProto";
39option java_package = "com.google.cloud.aiplatform.v1";
40option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
41option ruby_package = "Google::Cloud::AIPlatform::V1";
42
43// The service that manages Vertex AI Dataset and its child resources.
44service DatasetService {
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  // Creates a Dataset.
50  rpc CreateDataset(CreateDatasetRequest)
51      returns (google.longrunning.Operation) {
52    option (google.api.http) = {
53      post: "/v1/{parent=projects/*/locations/*}/datasets"
54      body: "dataset"
55    };
56    option (google.api.method_signature) = "parent,dataset";
57    option (google.longrunning.operation_info) = {
58      response_type: "Dataset"
59      metadata_type: "CreateDatasetOperationMetadata"
60    };
61  }
62
63  // Gets a Dataset.
64  rpc GetDataset(GetDatasetRequest) returns (Dataset) {
65    option (google.api.http) = {
66      get: "/v1/{name=projects/*/locations/*/datasets/*}"
67    };
68    option (google.api.method_signature) = "name";
69  }
70
71  // Updates a Dataset.
72  rpc UpdateDataset(UpdateDatasetRequest) returns (Dataset) {
73    option (google.api.http) = {
74      patch: "/v1/{dataset.name=projects/*/locations/*/datasets/*}"
75      body: "dataset"
76    };
77    option (google.api.method_signature) = "dataset,update_mask";
78  }
79
80  // Lists Datasets in a Location.
81  rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) {
82    option (google.api.http) = {
83      get: "/v1/{parent=projects/*/locations/*}/datasets"
84    };
85    option (google.api.method_signature) = "parent";
86  }
87
88  // Deletes a Dataset.
89  rpc DeleteDataset(DeleteDatasetRequest)
90      returns (google.longrunning.Operation) {
91    option (google.api.http) = {
92      delete: "/v1/{name=projects/*/locations/*/datasets/*}"
93    };
94    option (google.api.method_signature) = "name";
95    option (google.longrunning.operation_info) = {
96      response_type: "google.protobuf.Empty"
97      metadata_type: "DeleteOperationMetadata"
98    };
99  }
100
101  // Imports data into a Dataset.
102  rpc ImportData(ImportDataRequest) returns (google.longrunning.Operation) {
103    option (google.api.http) = {
104      post: "/v1/{name=projects/*/locations/*/datasets/*}:import"
105      body: "*"
106    };
107    option (google.api.method_signature) = "name,import_configs";
108    option (google.longrunning.operation_info) = {
109      response_type: "ImportDataResponse"
110      metadata_type: "ImportDataOperationMetadata"
111    };
112  }
113
114  // Exports data from a Dataset.
115  rpc ExportData(ExportDataRequest) returns (google.longrunning.Operation) {
116    option (google.api.http) = {
117      post: "/v1/{name=projects/*/locations/*/datasets/*}:export"
118      body: "*"
119    };
120    option (google.api.method_signature) = "name,export_config";
121    option (google.longrunning.operation_info) = {
122      response_type: "ExportDataResponse"
123      metadata_type: "ExportDataOperationMetadata"
124    };
125  }
126
127  // Create a version from a Dataset.
128  rpc CreateDatasetVersion(CreateDatasetVersionRequest)
129      returns (google.longrunning.Operation) {
130    option (google.api.http) = {
131      post: "/v1/{parent=projects/*/locations/*/datasets/*}/datasetVersions"
132      body: "dataset_version"
133    };
134    option (google.api.method_signature) = "parent,dataset_version";
135    option (google.longrunning.operation_info) = {
136      response_type: "DatasetVersion"
137      metadata_type: "CreateDatasetVersionOperationMetadata"
138    };
139  }
140
141  // Deletes a Dataset version.
142  rpc DeleteDatasetVersion(DeleteDatasetVersionRequest)
143      returns (google.longrunning.Operation) {
144    option (google.api.http) = {
145      delete: "/v1/{name=projects/*/locations/*/datasets/*/datasetVersions/*}"
146    };
147    option (google.api.method_signature) = "name";
148    option (google.longrunning.operation_info) = {
149      response_type: "google.protobuf.Empty"
150      metadata_type: "DeleteOperationMetadata"
151    };
152  }
153
154  // Gets a Dataset version.
155  rpc GetDatasetVersion(GetDatasetVersionRequest) returns (DatasetVersion) {
156    option (google.api.http) = {
157      get: "/v1/{name=projects/*/locations/*/datasets/*/datasetVersions/*}"
158    };
159    option (google.api.method_signature) = "name";
160  }
161
162  // Lists DatasetVersions in a Dataset.
163  rpc ListDatasetVersions(ListDatasetVersionsRequest)
164      returns (ListDatasetVersionsResponse) {
165    option (google.api.http) = {
166      get: "/v1/{parent=projects/*/locations/*/datasets/*}/datasetVersions"
167    };
168    option (google.api.method_signature) = "parent";
169  }
170
171  // Restores a dataset version.
172  rpc RestoreDatasetVersion(RestoreDatasetVersionRequest)
173      returns (google.longrunning.Operation) {
174    option (google.api.http) = {
175      get: "/v1/{name=projects/*/locations/*/datasets/*/datasetVersions/*}:restore"
176    };
177    option (google.api.method_signature) = "name";
178    option (google.longrunning.operation_info) = {
179      response_type: "DatasetVersion"
180      metadata_type: "RestoreDatasetVersionOperationMetadata"
181    };
182  }
183
184  // Lists DataItems in a Dataset.
185  rpc ListDataItems(ListDataItemsRequest) returns (ListDataItemsResponse) {
186    option (google.api.http) = {
187      get: "/v1/{parent=projects/*/locations/*/datasets/*}/dataItems"
188    };
189    option (google.api.method_signature) = "parent";
190  }
191
192  // Searches DataItems in a Dataset.
193  rpc SearchDataItems(SearchDataItemsRequest)
194      returns (SearchDataItemsResponse) {
195    option (google.api.http) = {
196      get: "/v1/{dataset=projects/*/locations/*/datasets/*}:searchDataItems"
197    };
198  }
199
200  // Lists SavedQueries in a Dataset.
201  rpc ListSavedQueries(ListSavedQueriesRequest)
202      returns (ListSavedQueriesResponse) {
203    option (google.api.http) = {
204      get: "/v1/{parent=projects/*/locations/*/datasets/*}/savedQueries"
205    };
206    option (google.api.method_signature) = "parent";
207  }
208
209  // Deletes a SavedQuery.
210  rpc DeleteSavedQuery(DeleteSavedQueryRequest)
211      returns (google.longrunning.Operation) {
212    option (google.api.http) = {
213      delete: "/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*}"
214    };
215    option (google.api.method_signature) = "name";
216    option (google.longrunning.operation_info) = {
217      response_type: "google.protobuf.Empty"
218      metadata_type: "DeleteOperationMetadata"
219    };
220  }
221
222  // Gets an AnnotationSpec.
223  rpc GetAnnotationSpec(GetAnnotationSpecRequest) returns (AnnotationSpec) {
224    option (google.api.http) = {
225      get: "/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}"
226    };
227    option (google.api.method_signature) = "name";
228  }
229
230  // Lists Annotations belongs to a dataitem
231  rpc ListAnnotations(ListAnnotationsRequest)
232      returns (ListAnnotationsResponse) {
233    option (google.api.http) = {
234      get: "/v1/{parent=projects/*/locations/*/datasets/*/dataItems/*}/annotations"
235    };
236    option (google.api.method_signature) = "parent";
237  }
238}
239
240// Request message for
241// [DatasetService.CreateDataset][google.cloud.aiplatform.v1.DatasetService.CreateDataset].
242message CreateDatasetRequest {
243  // Required. The resource name of the Location to create the Dataset in.
244  // Format: `projects/{project}/locations/{location}`
245  string parent = 1 [
246    (google.api.field_behavior) = REQUIRED,
247    (google.api.resource_reference) = {
248      type: "locations.googleapis.com/Location"
249    }
250  ];
251
252  // Required. The Dataset to create.
253  Dataset dataset = 2 [(google.api.field_behavior) = REQUIRED];
254}
255
256// Runtime operation information for
257// [DatasetService.CreateDataset][google.cloud.aiplatform.v1.DatasetService.CreateDataset].
258message CreateDatasetOperationMetadata {
259  // The operation generic information.
260  GenericOperationMetadata generic_metadata = 1;
261}
262
263// Request message for
264// [DatasetService.GetDataset][google.cloud.aiplatform.v1.DatasetService.GetDataset].
265message GetDatasetRequest {
266  // Required. The name of the Dataset resource.
267  string name = 1 [
268    (google.api.field_behavior) = REQUIRED,
269    (google.api.resource_reference) = {
270      type: "aiplatform.googleapis.com/Dataset"
271    }
272  ];
273
274  // Mask specifying which fields to read.
275  google.protobuf.FieldMask read_mask = 2;
276}
277
278// Request message for
279// [DatasetService.UpdateDataset][google.cloud.aiplatform.v1.DatasetService.UpdateDataset].
280message UpdateDatasetRequest {
281  // Required. The Dataset which replaces the resource on the server.
282  Dataset dataset = 1 [(google.api.field_behavior) = REQUIRED];
283
284  // Required. The update mask applies to the resource.
285  // For the `FieldMask` definition, see
286  // [google.protobuf.FieldMask][google.protobuf.FieldMask]. Updatable fields:
287  //
288  //   * `display_name`
289  //   * `description`
290  //   * `labels`
291  google.protobuf.FieldMask update_mask = 2
292      [(google.api.field_behavior) = REQUIRED];
293}
294
295// Request message for
296// [DatasetService.ListDatasets][google.cloud.aiplatform.v1.DatasetService.ListDatasets].
297message ListDatasetsRequest {
298  // Required. The name of the Dataset's parent resource.
299  // Format: `projects/{project}/locations/{location}`
300  string parent = 1 [
301    (google.api.field_behavior) = REQUIRED,
302    (google.api.resource_reference) = {
303      type: "locations.googleapis.com/Location"
304    }
305  ];
306
307  // An expression for filtering the results of the request. For field names
308  // both snake_case and camelCase are supported.
309  //
310  //   * `display_name`: supports = and !=
311  //   * `metadata_schema_uri`: supports = and !=
312  //   * `labels` supports general map functions that is:
313  //     * `labels.key=value` - key:value equality
314  //     * `labels.key:* or labels:key - key existence
315  //     * A key including a space must be quoted. `labels."a key"`.
316  //
317  // Some examples:
318  //
319  //   * `displayName="myDisplayName"`
320  //   * `labels.myKey="myValue"`
321  string filter = 2;
322
323  // The standard list page size.
324  int32 page_size = 3;
325
326  // The standard list page token.
327  string page_token = 4;
328
329  // Mask specifying which fields to read.
330  google.protobuf.FieldMask read_mask = 5;
331
332  // A comma-separated list of fields to order by, sorted in ascending order.
333  // Use "desc" after a field name for descending.
334  // Supported fields:
335  //
336  //   * `display_name`
337  //   * `create_time`
338  //   * `update_time`
339  string order_by = 6;
340}
341
342// Response message for
343// [DatasetService.ListDatasets][google.cloud.aiplatform.v1.DatasetService.ListDatasets].
344message ListDatasetsResponse {
345  // A list of Datasets that matches the specified filter in the request.
346  repeated Dataset datasets = 1;
347
348  // The standard List next-page token.
349  string next_page_token = 2;
350}
351
352// Request message for
353// [DatasetService.DeleteDataset][google.cloud.aiplatform.v1.DatasetService.DeleteDataset].
354message DeleteDatasetRequest {
355  // Required. The resource name of the Dataset to delete.
356  // Format:
357  // `projects/{project}/locations/{location}/datasets/{dataset}`
358  string name = 1 [
359    (google.api.field_behavior) = REQUIRED,
360    (google.api.resource_reference) = {
361      type: "aiplatform.googleapis.com/Dataset"
362    }
363  ];
364}
365
366// Request message for
367// [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData].
368message ImportDataRequest {
369  // Required. The name of the Dataset resource.
370  // Format:
371  // `projects/{project}/locations/{location}/datasets/{dataset}`
372  string name = 1 [
373    (google.api.field_behavior) = REQUIRED,
374    (google.api.resource_reference) = {
375      type: "aiplatform.googleapis.com/Dataset"
376    }
377  ];
378
379  // Required. The desired input locations. The contents of all input locations
380  // will be imported in one batch.
381  repeated ImportDataConfig import_configs = 2
382      [(google.api.field_behavior) = REQUIRED];
383}
384
385// Response message for
386// [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData].
387message ImportDataResponse {}
388
389// Runtime operation information for
390// [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData].
391message ImportDataOperationMetadata {
392  // The common part of the operation metadata.
393  GenericOperationMetadata generic_metadata = 1;
394}
395
396// Request message for
397// [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData].
398message ExportDataRequest {
399  // Required. The name of the Dataset resource.
400  // Format:
401  // `projects/{project}/locations/{location}/datasets/{dataset}`
402  string name = 1 [
403    (google.api.field_behavior) = REQUIRED,
404    (google.api.resource_reference) = {
405      type: "aiplatform.googleapis.com/Dataset"
406    }
407  ];
408
409  // Required. The desired output location.
410  ExportDataConfig export_config = 2 [(google.api.field_behavior) = REQUIRED];
411}
412
413// Response message for
414// [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData].
415message ExportDataResponse {
416  // All of the files that are exported in this export operation. For custom
417  // code training export, only three (training, validation and test)
418  // Cloud Storage paths in wildcard format are populated
419  // (for example, gs://.../training-*).
420  repeated string exported_files = 1;
421
422  // Only present for custom code training export use case. Records data stats,
423  // i.e., train/validation/test item/annotation counts calculated during
424  // the export operation.
425  Model.DataStats data_stats = 2;
426}
427
428// Runtime operation information for
429// [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData].
430message ExportDataOperationMetadata {
431  // The common part of the operation metadata.
432  GenericOperationMetadata generic_metadata = 1;
433
434  // A Google Cloud Storage directory which path ends with '/'. The exported
435  // data is stored in the directory.
436  string gcs_output_directory = 2;
437}
438
439// Request message for
440// [DatasetService.CreateDatasetVersion][google.cloud.aiplatform.v1.DatasetService.CreateDatasetVersion].
441message CreateDatasetVersionRequest {
442  // Required. The name of the Dataset resource.
443  // Format:
444  // `projects/{project}/locations/{location}/datasets/{dataset}`
445  string parent = 1 [
446    (google.api.field_behavior) = REQUIRED,
447    (google.api.resource_reference) = {
448      type: "aiplatform.googleapis.com/Dataset"
449    }
450  ];
451
452  // Required. The version to be created. The same CMEK policies with the
453  // original Dataset will be applied the dataset version. So here we don't need
454  // to specify the EncryptionSpecType here.
455  DatasetVersion dataset_version = 2 [(google.api.field_behavior) = REQUIRED];
456}
457
458// Runtime operation information for
459// [DatasetService.CreateDatasetVersion][google.cloud.aiplatform.v1.DatasetService.CreateDatasetVersion].
460message CreateDatasetVersionOperationMetadata {
461  // The common part of the operation metadata.
462  GenericOperationMetadata generic_metadata = 1;
463}
464
465// Request message for
466// [DatasetService.DeleteDatasetVersion][google.cloud.aiplatform.v1.DatasetService.DeleteDatasetVersion].
467message DeleteDatasetVersionRequest {
468  // Required. The resource name of the Dataset version to delete.
469  // Format:
470  // `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
471  string name = 1 [
472    (google.api.field_behavior) = REQUIRED,
473    (google.api.resource_reference) = {
474      type: "aiplatform.googleapis.com/DatasetVersion"
475    }
476  ];
477}
478
479// Request message for
480// [DatasetService.GetDatasetVersion][google.cloud.aiplatform.v1.DatasetService.GetDatasetVersion].
481message GetDatasetVersionRequest {
482  // Required. The resource name of the Dataset version to delete.
483  // Format:
484  // `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
485  string name = 1 [
486    (google.api.field_behavior) = REQUIRED,
487    (google.api.resource_reference) = {
488      type: "aiplatform.googleapis.com/DatasetVersion"
489    }
490  ];
491
492  // Mask specifying which fields to read.
493  google.protobuf.FieldMask read_mask = 2;
494}
495
496// Request message for
497// [DatasetService.ListDatasetVersions][google.cloud.aiplatform.v1.DatasetService.ListDatasetVersions].
498message ListDatasetVersionsRequest {
499  // Required. The resource name of the Dataset to list DatasetVersions from.
500  // Format:
501  // `projects/{project}/locations/{location}/datasets/{dataset}`
502  string parent = 1 [
503    (google.api.field_behavior) = REQUIRED,
504    (google.api.resource_reference) = {
505      type: "aiplatform.googleapis.com/Dataset"
506    }
507  ];
508
509  // Optional. The standard list filter.
510  string filter = 2 [(google.api.field_behavior) = OPTIONAL];
511
512  // Optional. The standard list page size.
513  int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
514
515  // Optional. The standard list page token.
516  string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
517
518  // Optional. Mask specifying which fields to read.
519  google.protobuf.FieldMask read_mask = 5
520      [(google.api.field_behavior) = OPTIONAL];
521
522  // Optional. A comma-separated list of fields to order by, sorted in ascending
523  // order. Use "desc" after a field name for descending.
524  string order_by = 6 [(google.api.field_behavior) = OPTIONAL];
525}
526
527// Response message for
528// [DatasetService.ListDatasetVersions][google.cloud.aiplatform.v1.DatasetService.ListDatasetVersions].
529message ListDatasetVersionsResponse {
530  // A list of DatasetVersions that matches the specified filter in the request.
531  repeated DatasetVersion dataset_versions = 1;
532
533  // The standard List next-page token.
534  string next_page_token = 2;
535}
536
537// Request message for
538// [DatasetService.RestoreDatasetVersion][google.cloud.aiplatform.v1.DatasetService.RestoreDatasetVersion].
539message RestoreDatasetVersionRequest {
540  // Required. The name of the DatasetVersion resource.
541  // Format:
542  // `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
543  string name = 1 [
544    (google.api.field_behavior) = REQUIRED,
545    (google.api.resource_reference) = {
546      type: "aiplatform.googleapis.com/DatasetVersion"
547    }
548  ];
549}
550
551// Runtime operation information for
552// [DatasetService.RestoreDatasetVersion][google.cloud.aiplatform.v1.DatasetService.RestoreDatasetVersion].
553message RestoreDatasetVersionOperationMetadata {
554  // The common part of the operation metadata.
555  GenericOperationMetadata generic_metadata = 1;
556}
557
558// Request message for
559// [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems].
560message ListDataItemsRequest {
561  // Required. The resource name of the Dataset to list DataItems from.
562  // Format:
563  // `projects/{project}/locations/{location}/datasets/{dataset}`
564  string parent = 1 [
565    (google.api.field_behavior) = REQUIRED,
566    (google.api.resource_reference) = {
567      type: "aiplatform.googleapis.com/Dataset"
568    }
569  ];
570
571  // The standard list filter.
572  string filter = 2;
573
574  // The standard list page size.
575  int32 page_size = 3;
576
577  // The standard list page token.
578  string page_token = 4;
579
580  // Mask specifying which fields to read.
581  google.protobuf.FieldMask read_mask = 5;
582
583  // A comma-separated list of fields to order by, sorted in ascending order.
584  // Use "desc" after a field name for descending.
585  string order_by = 6;
586}
587
588// Response message for
589// [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems].
590message ListDataItemsResponse {
591  // A list of DataItems that matches the specified filter in the request.
592  repeated DataItem data_items = 1;
593
594  // The standard List next-page token.
595  string next_page_token = 2;
596}
597
598// Request message for
599// [DatasetService.SearchDataItems][google.cloud.aiplatform.v1.DatasetService.SearchDataItems].
600message SearchDataItemsRequest {
601  // Expression that allows ranking results based on annotation's property.
602  message OrderByAnnotation {
603    // Required. Saved query of the Annotation. Only Annotations belong to this
604    // saved query will be considered for ordering.
605    string saved_query = 1 [(google.api.field_behavior) = REQUIRED];
606
607    // A comma-separated list of annotation fields to order by, sorted in
608    // ascending order. Use "desc" after a field name for descending. Must also
609    // specify saved_query.
610    string order_by = 2;
611  }
612
613  oneof order {
614    // A comma-separated list of data item fields to order by, sorted in
615    // ascending order. Use "desc" after a field name for descending.
616    string order_by_data_item = 12;
617
618    // Expression that allows ranking results based on annotation's property.
619    OrderByAnnotation order_by_annotation = 13;
620  }
621
622  // Required. The resource name of the Dataset from which to search DataItems.
623  // Format:
624  // `projects/{project}/locations/{location}/datasets/{dataset}`
625  string dataset = 1 [
626    (google.api.field_behavior) = REQUIRED,
627    (google.api.resource_reference) = {
628      type: "aiplatform.googleapis.com/Dataset"
629    }
630  ];
631
632  // The resource name of a SavedQuery(annotation set in UI).
633  // Format:
634  // `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}`
635  // All of the search will be done in the context of this SavedQuery.
636  string saved_query = 2 [
637    deprecated = true,
638    (google.api.resource_reference) = {
639      type: "aiplatform.googleapis.com/SavedQuery"
640    }
641  ];
642
643  // The resource name of a DataLabelingJob.
644  // Format:
645  // `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
646  // If this field is set, all of the search will be done in the context of
647  // this DataLabelingJob.
648  string data_labeling_job = 3;
649
650  // An expression for filtering the DataItem that will be returned.
651  //
652  //   * `data_item_id` - for = or !=.
653  //   * `labeled` - for = or !=.
654  //   * `has_annotation(ANNOTATION_SPEC_ID)` - true only for DataItem that
655  //     have at least one annotation with annotation_spec_id =
656  //     `ANNOTATION_SPEC_ID` in the context of SavedQuery or DataLabelingJob.
657  //
658  // For example:
659  //
660  // * `data_item=1`
661  // * `has_annotation(5)`
662  string data_item_filter = 4;
663
664  // An expression for filtering the Annotations that will be returned per
665  // DataItem.
666  //   * `annotation_spec_id` - for = or !=.
667  string annotations_filter = 5 [deprecated = true];
668
669  // An expression that specifies what Annotations will be returned per
670  // DataItem. Annotations satisfied either of the conditions will be returned.
671  //   * `annotation_spec_id` - for = or !=.
672  // Must specify `saved_query_id=` - saved query id that annotations should
673  // belong to.
674  repeated string annotation_filters = 11;
675
676  // Mask specifying which fields of
677  // [DataItemView][google.cloud.aiplatform.v1.DataItemView] to read.
678  google.protobuf.FieldMask field_mask = 6;
679
680  // If set, only up to this many of Annotations will be returned per
681  // DataItemView. The maximum value is 1000. If not set, the maximum value will
682  // be used.
683  int32 annotations_limit = 7;
684
685  // Requested page size. Server may return fewer results than requested.
686  // Default and maximum page size is 100.
687  int32 page_size = 8;
688
689  // A comma-separated list of fields to order by, sorted in ascending order.
690  // Use "desc" after a field name for descending.
691  string order_by = 9 [deprecated = true];
692
693  // A token identifying a page of results for the server to return
694  // Typically obtained via
695  // [SearchDataItemsResponse.next_page_token][google.cloud.aiplatform.v1.SearchDataItemsResponse.next_page_token]
696  // of the previous
697  // [DatasetService.SearchDataItems][google.cloud.aiplatform.v1.DatasetService.SearchDataItems]
698  // call.
699  string page_token = 10;
700}
701
702// Response message for
703// [DatasetService.SearchDataItems][google.cloud.aiplatform.v1.DatasetService.SearchDataItems].
704message SearchDataItemsResponse {
705  // The DataItemViews read.
706  repeated DataItemView data_item_views = 1;
707
708  // A token to retrieve next page of results.
709  // Pass to
710  // [SearchDataItemsRequest.page_token][google.cloud.aiplatform.v1.SearchDataItemsRequest.page_token]
711  // to obtain that page.
712  string next_page_token = 2;
713}
714
715// A container for a single DataItem and Annotations on it.
716message DataItemView {
717  // The DataItem.
718  DataItem data_item = 1;
719
720  // The Annotations on the DataItem. If too many Annotations should be returned
721  // for the DataItem, this field will be truncated per annotations_limit in
722  // request. If it was, then the has_truncated_annotations will be set to true.
723  repeated Annotation annotations = 2;
724
725  // True if and only if the Annotations field has been truncated. It happens if
726  // more Annotations for this DataItem met the request's annotation_filter than
727  // are allowed to be returned by annotations_limit.
728  // Note that if Annotations field is not being returned due to field mask,
729  // then this field will not be set to true no matter how many Annotations are
730  // there.
731  bool has_truncated_annotations = 3;
732}
733
734// Request message for
735// [DatasetService.ListSavedQueries][google.cloud.aiplatform.v1.DatasetService.ListSavedQueries].
736message ListSavedQueriesRequest {
737  // Required. The resource name of the Dataset to list SavedQueries from.
738  // Format:
739  // `projects/{project}/locations/{location}/datasets/{dataset}`
740  string parent = 1 [
741    (google.api.field_behavior) = REQUIRED,
742    (google.api.resource_reference) = {
743      type: "aiplatform.googleapis.com/Dataset"
744    }
745  ];
746
747  // The standard list filter.
748  string filter = 2;
749
750  // The standard list page size.
751  int32 page_size = 3;
752
753  // The standard list page token.
754  string page_token = 4;
755
756  // Mask specifying which fields to read.
757  google.protobuf.FieldMask read_mask = 5;
758
759  // A comma-separated list of fields to order by, sorted in ascending order.
760  // Use "desc" after a field name for descending.
761  string order_by = 6;
762}
763
764// Response message for
765// [DatasetService.ListSavedQueries][google.cloud.aiplatform.v1.DatasetService.ListSavedQueries].
766message ListSavedQueriesResponse {
767  // A list of SavedQueries that match the specified filter in the request.
768  repeated SavedQuery saved_queries = 1;
769
770  // The standard List next-page token.
771  string next_page_token = 2;
772}
773
774// Request message for
775// [DatasetService.DeleteSavedQuery][google.cloud.aiplatform.v1.DatasetService.DeleteSavedQuery].
776message DeleteSavedQueryRequest {
777  // Required. The resource name of the SavedQuery to delete.
778  // Format:
779  // `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}`
780  string name = 1 [
781    (google.api.field_behavior) = REQUIRED,
782    (google.api.resource_reference) = {
783      type: "aiplatform.googleapis.com/SavedQuery"
784    }
785  ];
786}
787
788// Request message for
789// [DatasetService.GetAnnotationSpec][google.cloud.aiplatform.v1.DatasetService.GetAnnotationSpec].
790message GetAnnotationSpecRequest {
791  // Required. The name of the AnnotationSpec resource.
792  // Format:
793  // `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
794  string name = 1 [
795    (google.api.field_behavior) = REQUIRED,
796    (google.api.resource_reference) = {
797      type: "aiplatform.googleapis.com/AnnotationSpec"
798    }
799  ];
800
801  // Mask specifying which fields to read.
802  google.protobuf.FieldMask read_mask = 2;
803}
804
805// Request message for
806// [DatasetService.ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
807message ListAnnotationsRequest {
808  // Required. The resource name of the DataItem to list Annotations from.
809  // Format:
810  // `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
811  string parent = 1 [
812    (google.api.field_behavior) = REQUIRED,
813    (google.api.resource_reference) = {
814      type: "aiplatform.googleapis.com/DataItem"
815    }
816  ];
817
818  // The standard list filter.
819  string filter = 2;
820
821  // The standard list page size.
822  int32 page_size = 3;
823
824  // The standard list page token.
825  string page_token = 4;
826
827  // Mask specifying which fields to read.
828  google.protobuf.FieldMask read_mask = 5;
829
830  // A comma-separated list of fields to order by, sorted in ascending order.
831  // Use "desc" after a field name for descending.
832  string order_by = 6;
833}
834
835// Response message for
836// [DatasetService.ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
837message ListAnnotationsResponse {
838  // A list of Annotations that matches the specified filter in the request.
839  repeated Annotation annotations = 1;
840
841  // The standard List next-page token.
842  string next_page_token = 2;
843}
844