annotation.proto 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.cloud.aiplatform.v1beta1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/cloud/aiplatform/v1beta1/user_action_reference.proto";
  19. import "google/protobuf/struct.proto";
  20. import "google/protobuf/timestamp.proto";
  21. option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
  22. option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "AnnotationProto";
  25. option java_package = "com.google.cloud.aiplatform.v1beta1";
  26. option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
  27. option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
  28. // Used to assign specific AnnotationSpec to a particular area of a DataItem or
  29. // the whole part of the DataItem.
  30. message Annotation {
  31. option (google.api.resource) = {
  32. type: "aiplatform.googleapis.com/Annotation"
  33. pattern: "projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}/annotations/{annotation}"
  34. };
  35. // Output only. Resource name of the Annotation.
  36. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  37. // Required. Google Cloud Storage URI points to a YAML file describing [payload][google.cloud.aiplatform.v1beta1.Annotation.payload]. The
  38. // schema is defined as an [OpenAPI 3.0.2 Schema
  39. // Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
  40. // The schema files that can be used here are found in
  41. // gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the
  42. // chosen schema must be consistent with the parent Dataset's
  43. // [metadata][google.cloud.aiplatform.v1beta1.Dataset.metadata_schema_uri].
  44. string payload_schema_uri = 2 [(google.api.field_behavior) = REQUIRED];
  45. // Required. The schema of the payload can be found in
  46. // [payload_schema][google.cloud.aiplatform.v1beta1.Annotation.payload_schema_uri].
  47. google.protobuf.Value payload = 3 [(google.api.field_behavior) = REQUIRED];
  48. // Output only. Timestamp when this Annotation was created.
  49. google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  50. // Output only. Timestamp when this Annotation was last updated.
  51. google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  52. // Optional. Used to perform consistent read-modify-write updates. If not set, a blind
  53. // "overwrite" update happens.
  54. string etag = 8 [(google.api.field_behavior) = OPTIONAL];
  55. // Output only. The source of the Annotation.
  56. UserActionReference annotation_source = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  57. // Optional. The labels with user-defined metadata to organize your Annotations.
  58. //
  59. // Label keys and values can be no longer than 64 characters
  60. // (Unicode codepoints), can only contain lowercase letters, numeric
  61. // characters, underscores and dashes. International characters are allowed.
  62. // No more than 64 user labels can be associated with one Annotation(System
  63. // labels are excluded).
  64. //
  65. // See https://goo.gl/xmQnxf for more information and examples of labels.
  66. // System reserved label keys are prefixed with "aiplatform.googleapis.com/"
  67. // and are immutable. Following system labels exist for each Annotation:
  68. //
  69. // * "aiplatform.googleapis.com/annotation_set_name":
  70. // optional, name of the UI's annotation set this Annotation belongs to.
  71. // If not set, the Annotation is not visible in the UI.
  72. //
  73. // * "aiplatform.googleapis.com/payload_schema":
  74. // output only, its value is the [payload_schema's][google.cloud.aiplatform.v1beta1.Annotation.payload_schema_uri]
  75. // title.
  76. map<string, string> labels = 6 [(google.api.field_behavior) = OPTIONAL];
  77. }