aboutsummaryrefslogtreecommitdiff
path: root/google/cloud/datalabeling/v1beta1/instruction.proto
diff options
context:
space:
mode:
Diffstat (limited to 'google/cloud/datalabeling/v1beta1/instruction.proto')
-rw-r--r--google/cloud/datalabeling/v1beta1/instruction.proto78
1 files changed, 78 insertions, 0 deletions
diff --git a/google/cloud/datalabeling/v1beta1/instruction.proto b/google/cloud/datalabeling/v1beta1/instruction.proto
new file mode 100644
index 000000000..d1a1e751c
--- /dev/null
+++ b/google/cloud/datalabeling/v1beta1/instruction.proto
@@ -0,0 +1,78 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.datalabeling.v1beta1;
+
+import "google/cloud/datalabeling/v1beta1/dataset.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.datalabeling.v1beta1";
+
+
+// Instruction of how to perform the labeling task for human operators.
+// Currently two types of instruction are supported - CSV file and PDF.
+// One of the two types instruction must be provided.
+// CSV file is only supported for image classification task. Instructions for
+// other task should be provided as PDF.
+// For image classification, CSV and PDF can be provided at the same time.
+message Instruction {
+ // Output only. Instruction resource name, format:
+ // projects/{project_id}/instructions/{instruction_id}
+ string name = 1;
+
+ // Required. The display name of the instruction. Maximum of 64 characters.
+ string display_name = 2;
+
+ // Optional. User-provided description of the instruction.
+ // The description can be up to 10000 characters long.
+ string description = 3;
+
+ // Output only. Creation time of instruction.
+ google.protobuf.Timestamp create_time = 4;
+
+ // Output only. Last update time of instruction.
+ google.protobuf.Timestamp update_time = 5;
+
+ // Required. The data type of this instruction.
+ DataType data_type = 6;
+
+ // One of CSV and PDF instruction is required.
+ // Instruction from a csv file, such as for classification task.
+ // Csv file should have exact two columns, in the format of:
+ // The first column is labeled data, such as image reference, text.
+ // The second column is comma separated labels associated with data.
+ CsvInstruction csv_instruction = 7;
+
+ // One of CSV and PDF instruction is required.
+ // Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+ PdfInstruction pdf_instruction = 9;
+}
+
+// Instruction from a CSV file.
+message CsvInstruction {
+ // CSV file for the instruction. Only gcs path is allowed.
+ string gcs_file_uri = 1;
+}
+
+// Instruction from a PDF file.
+message PdfInstruction {
+ // PDF file for the instruction. Only gcs path is allowed.
+ string gcs_file_uri = 1;
+}