annotation_spec_set.proto 2.9 KB

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