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