annotation_spec_set.proto 2.9 KB

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