annotation.proto 4.2 KB

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