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/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/protobuf/struct.proto";
22import "google/protobuf/timestamp.proto";
23
24option csharp_namespace = "Google.Cloud.AIPlatform.V1";
25option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb";
26option java_multiple_files = true;
27option java_outer_classname = "DataItemProto";
28option java_package = "com.google.cloud.aiplatform.v1";
29option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
30option ruby_package = "Google::Cloud::AIPlatform::V1";
31
32// A piece of data in a Dataset. Could be an image, a video, a document or plain
33// text.
34message DataItem {
35  option (google.api.resource) = {
36    type: "aiplatform.googleapis.com/DataItem"
37    pattern: "projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}"
38  };
39
40  // Output only. The resource name of the DataItem.
41  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
42
43  // Output only. Timestamp when this DataItem was created.
44  google.protobuf.Timestamp create_time = 2
45      [(google.api.field_behavior) = OUTPUT_ONLY];
46
47  // Output only. Timestamp when this DataItem was last updated.
48  google.protobuf.Timestamp update_time = 6
49      [(google.api.field_behavior) = OUTPUT_ONLY];
50
51  // Optional. The labels with user-defined metadata to organize your DataItems.
52  //
53  // Label keys and values can be no longer than 64 characters
54  // (Unicode codepoints), can only contain lowercase letters, numeric
55  // characters, underscores and dashes. International characters are allowed.
56  // No more than 64 user labels can be associated with one DataItem(System
57  // labels are excluded).
58  //
59  // See https://goo.gl/xmQnxf for more information and examples of labels.
60  // System reserved label keys are prefixed with "aiplatform.googleapis.com/"
61  // and are immutable.
62  map<string, string> labels = 3 [(google.api.field_behavior) = OPTIONAL];
63
64  // Required. The data that the DataItem represents (for example, an image or a
65  // text snippet). The schema of the payload is stored in the parent Dataset's
66  // [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]
67  // dataItemSchemaUri field.
68  google.protobuf.Value payload = 4 [(google.api.field_behavior) = REQUIRED];
69
70  // Optional. Used to perform consistent read-modify-write updates. If not set,
71  // a blind "overwrite" update happens.
72  string etag = 7 [(google.api.field_behavior) = OPTIONAL];
73}
74