xref: /aosp_15_r20/external/googleapis/google/cloud/datalabeling/v1beta1/annotation_spec_set.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2019 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//
15
16syntax = "proto3";
17
18package google.cloud.datalabeling.v1beta1;
19
20import "google/api/resource.proto";
21
22option csharp_namespace = "Google.Cloud.DataLabeling.V1Beta1";
23option go_package = "cloud.google.com/go/datalabeling/apiv1beta1/datalabelingpb;datalabelingpb";
24option java_multiple_files = true;
25option java_package = "com.google.cloud.datalabeling.v1beta1";
26option php_namespace = "Google\\Cloud\\DataLabeling\\V1beta1";
27option ruby_package = "Google::Cloud::DataLabeling::V1beta1";
28
29// An AnnotationSpecSet is a collection of label definitions. For example, in
30// image classification tasks, you define a set of possible labels for images as
31// an AnnotationSpecSet. An AnnotationSpecSet is immutable upon creation.
32message AnnotationSpecSet {
33  option (google.api.resource) = {
34    type: "datalabeling.googleapis.com/AnnotationSpecSet"
35    pattern: "projects/{project}/annotationSpecSets/{annotation_spec_set}"
36  };
37
38  // Output only. The AnnotationSpecSet resource name in the following format:
39  //
40  // "projects/<var>{project_id}</var>/annotationSpecSets/<var>{annotation_spec_set_id}</var>"
41  string name = 1;
42
43  // Required. The display name for AnnotationSpecSet that you define when you
44  // create it. Maximum of 64 characters.
45  string display_name = 2;
46
47  // Optional. User-provided description of the annotation specification set.
48  // The description can be up to 10,000 characters long.
49  string description = 3;
50
51  // Required. The array of AnnotationSpecs that you define when you create the
52  // AnnotationSpecSet. These are the possible labels for the labeling task.
53  repeated AnnotationSpec annotation_specs = 4;
54
55  // Output only. The names of any related resources that are blocking changes
56  // to the annotation spec set.
57  repeated string blocking_resources = 5;
58}
59
60// Container of information related to one possible annotation that can be used
61// in a labeling task. For example, an image classification task where images
62// are labeled as `dog` or `cat` must reference an AnnotationSpec for `dog` and
63// an AnnotationSpec for `cat`.
64message AnnotationSpec {
65  // Required. The display name of the AnnotationSpec. Maximum of 64 characters.
66  string display_name = 1;
67
68  // Optional. User-provided description of the annotation specification.
69  // The description can be up to 10,000 characters long.
70  string description = 2;
71}
72