instruction.proto 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. import "google/cloud/datalabeling/v1beta1/dataset.proto";
  20. import "google/protobuf/timestamp.proto";
  21. option csharp_namespace = "Google.Cloud.DataLabeling.V1Beta1";
  22. option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling";
  23. option java_multiple_files = true;
  24. option java_package = "com.google.cloud.datalabeling.v1beta1";
  25. option php_namespace = "Google\\Cloud\\DataLabeling\\V1beta1";
  26. option ruby_package = "Google::Cloud::DataLabeling::V1beta1";
  27. // Instruction of how to perform the labeling task for human operators.
  28. // Currently only PDF instruction is supported.
  29. message Instruction {
  30. option (google.api.resource) = {
  31. type: "datalabeling.googleapis.com/Instruction"
  32. pattern: "projects/{project}/instructions/{instruction}"
  33. };
  34. // Output only. Instruction resource name, format:
  35. // projects/{project_id}/instructions/{instruction_id}
  36. string name = 1;
  37. // Required. The display name of the instruction. Maximum of 64 characters.
  38. string display_name = 2;
  39. // Optional. User-provided description of the instruction.
  40. // The description can be up to 10000 characters long.
  41. string description = 3;
  42. // Output only. Creation time of instruction.
  43. google.protobuf.Timestamp create_time = 4;
  44. // Output only. Last update time of instruction.
  45. google.protobuf.Timestamp update_time = 5;
  46. // Required. The data type of this instruction.
  47. DataType data_type = 6;
  48. // Deprecated: this instruction format is not supported any more.
  49. // Instruction from a CSV file, such as for classification task.
  50. // The CSV file should have exact two columns, in the following format:
  51. //
  52. // * The first column is labeled data, such as an image reference, text.
  53. // * The second column is comma separated labels associated with data.
  54. CsvInstruction csv_instruction = 7 [deprecated = true];
  55. // Instruction from a PDF document. The PDF should be in a Cloud Storage
  56. // bucket.
  57. PdfInstruction pdf_instruction = 9;
  58. // Output only. The names of any related resources that are blocking changes
  59. // to the instruction.
  60. repeated string blocking_resources = 10;
  61. }
  62. // Deprecated: this instruction format is not supported any more.
  63. // Instruction from a CSV file.
  64. message CsvInstruction {
  65. // CSV file for the instruction. Only gcs path is allowed.
  66. string gcs_file_uri = 1;
  67. }
  68. // Instruction from a PDF file.
  69. message PdfInstruction {
  70. // PDF file for the instruction. Only gcs path is allowed.
  71. string gcs_file_uri = 1;
  72. }