instruction.proto 3.1 KB

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