This repository has been archived by the owner on Sep 16, 2023. It is now read-only.
/
data_labeling_service.proto
1236 lines (1074 loc) · 44.6 KB
/
data_labeling_service.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2019 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/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/datalabeling/v1beta1/annotation_spec_set.proto";
import "google/cloud/datalabeling/v1beta1/dataset.proto";
import "google/cloud/datalabeling/v1beta1/evaluation.proto";
import "google/cloud/datalabeling/v1beta1/evaluation_job.proto";
import "google/cloud/datalabeling/v1beta1/human_annotation_config.proto";
import "google/cloud/datalabeling/v1beta1/instruction.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
option csharp_namespace = "Google.Cloud.DataLabeling.V1Beta1";
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";
option php_namespace = "Google\\Cloud\\DataLabeling\\V1beta1";
option ruby_package = "Google::Cloud::DataLabeling::V1beta1";
// Service for the AI Platform Data Labeling API.
service DataLabelingService {
option (google.api.default_host) = "datalabeling.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
// Creates dataset. If success return a Dataset resource.
rpc CreateDataset(CreateDatasetRequest) returns (Dataset) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*}/datasets"
body: "*"
};
option (google.api.method_signature) = "parent,dataset";
}
// Gets dataset by resource name.
rpc GetDataset(GetDatasetRequest) returns (Dataset) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/datasets/*}"
};
option (google.api.method_signature) = "name";
}
// Lists datasets under a project. Pagination is supported.
rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*}/datasets"
};
option (google.api.method_signature) = "parent,filter";
}
// Deletes a dataset by resource name.
rpc DeleteDataset(DeleteDatasetRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/datasets/*}"
};
option (google.api.method_signature) = "name";
}
// Imports data into dataset based on source locations defined in request.
// It can be called multiple times for the same dataset. Each dataset can
// only have one long running operation running on it. For example, no
// labeling task (also long running operation) can be started while
// importing is still ongoing. Vice versa.
rpc ImportData(ImportDataRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{name=projects/*/datasets/*}:importData"
body: "*"
};
option (google.api.method_signature) = "name,input_config";
option (google.longrunning.operation_info) = {
response_type: "ImportDataOperationResponse"
metadata_type: "ImportDataOperationMetadata"
};
}
// Exports data and annotations from dataset.
rpc ExportData(ExportDataRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{name=projects/*/datasets/*}:exportData"
body: "*"
};
option (google.api.method_signature) = "name,annotated_dataset,filter,output_config";
option (google.longrunning.operation_info) = {
response_type: "ExportDataOperationResponse"
metadata_type: "ExportDataOperationMetadata"
};
}
// Gets a data item in a dataset by resource name. This API can be
// called after data are imported into dataset.
rpc GetDataItem(GetDataItemRequest) returns (DataItem) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/datasets/*/dataItems/*}"
};
option (google.api.method_signature) = "name";
}
// Lists data items in a dataset. This API can be called after data
// are imported into dataset. Pagination is supported.
rpc ListDataItems(ListDataItemsRequest) returns (ListDataItemsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/datasets/*}/dataItems"
};
option (google.api.method_signature) = "parent,filter";
}
// Gets an annotated dataset by resource name.
rpc GetAnnotatedDataset(GetAnnotatedDatasetRequest) returns (AnnotatedDataset) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/datasets/*/annotatedDatasets/*}"
};
option (google.api.method_signature) = "name";
}
// Lists annotated datasets for a dataset. Pagination is supported.
rpc ListAnnotatedDatasets(ListAnnotatedDatasetsRequest) returns (ListAnnotatedDatasetsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/datasets/*}/annotatedDatasets"
};
option (google.api.method_signature) = "parent,filter";
}
// Deletes an annotated dataset by resource name.
rpc DeleteAnnotatedDataset(DeleteAnnotatedDatasetRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/datasets/*/annotatedDatasets/*}"
};
}
// Starts a labeling task for image. The type of image labeling task is
// configured by feature in the request.
rpc LabelImage(LabelImageRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/datasets/*}/image:label"
body: "*"
};
option (google.api.method_signature) = "parent,basic_config,feature";
option (google.longrunning.operation_info) = {
response_type: "AnnotatedDataset"
metadata_type: "LabelOperationMetadata"
};
}
// Starts a labeling task for video. The type of video labeling task is
// configured by feature in the request.
rpc LabelVideo(LabelVideoRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/datasets/*}/video:label"
body: "*"
};
option (google.api.method_signature) = "parent,basic_config,feature";
option (google.longrunning.operation_info) = {
response_type: "AnnotatedDataset"
metadata_type: "LabelOperationMetadata"
};
}
// Starts a labeling task for text. The type of text labeling task is
// configured by feature in the request.
rpc LabelText(LabelTextRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/datasets/*}/text:label"
body: "*"
};
option (google.api.method_signature) = "parent,basic_config,feature";
option (google.longrunning.operation_info) = {
response_type: "AnnotatedDataset"
metadata_type: "LabelOperationMetadata"
};
}
// Gets an example by resource name, including both data and annotation.
rpc GetExample(GetExampleRequest) returns (Example) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/datasets/*/annotatedDatasets/*/examples/*}"
};
option (google.api.method_signature) = "name,filter";
}
// Lists examples in an annotated dataset. Pagination is supported.
rpc ListExamples(ListExamplesRequest) returns (ListExamplesResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/datasets/*/annotatedDatasets/*}/examples"
};
option (google.api.method_signature) = "parent,filter";
}
// Creates an annotation spec set by providing a set of labels.
rpc CreateAnnotationSpecSet(CreateAnnotationSpecSetRequest) returns (AnnotationSpecSet) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*}/annotationSpecSets"
body: "*"
};
option (google.api.method_signature) = "parent,annotation_spec_set";
}
// Gets an annotation spec set by resource name.
rpc GetAnnotationSpecSet(GetAnnotationSpecSetRequest) returns (AnnotationSpecSet) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/annotationSpecSets/*}"
};
option (google.api.method_signature) = "name";
}
// Lists annotation spec sets for a project. Pagination is supported.
rpc ListAnnotationSpecSets(ListAnnotationSpecSetsRequest) returns (ListAnnotationSpecSetsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*}/annotationSpecSets"
};
option (google.api.method_signature) = "parent,filter";
}
// Deletes an annotation spec set by resource name.
rpc DeleteAnnotationSpecSet(DeleteAnnotationSpecSetRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/annotationSpecSets/*}"
};
option (google.api.method_signature) = "name";
}
// Creates an instruction for how data should be labeled.
rpc CreateInstruction(CreateInstructionRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*}/instructions"
body: "*"
};
option (google.api.method_signature) = "parent,instruction";
option (google.longrunning.operation_info) = {
response_type: "Instruction"
metadata_type: "CreateInstructionMetadata"
};
}
// Gets an instruction by resource name.
rpc GetInstruction(GetInstructionRequest) returns (Instruction) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/instructions/*}"
};
option (google.api.method_signature) = "name";
}
// Lists instructions for a project. Pagination is supported.
rpc ListInstructions(ListInstructionsRequest) returns (ListInstructionsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*}/instructions"
};
option (google.api.method_signature) = "parent,filter";
}
// Deletes an instruction object by resource name.
rpc DeleteInstruction(DeleteInstructionRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/instructions/*}"
};
option (google.api.method_signature) = "name";
}
// Gets an evaluation by resource name (to search, use
// [projects.evaluations.search][google.cloud.datalabeling.v1beta1.DataLabelingService.SearchEvaluations]).
rpc GetEvaluation(GetEvaluationRequest) returns (Evaluation) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/datasets/*/evaluations/*}"
};
option (google.api.method_signature) = "name";
}
// Searches [evaluations][google.cloud.datalabeling.v1beta1.Evaluation] within a project.
rpc SearchEvaluations(SearchEvaluationsRequest) returns (SearchEvaluationsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*}/evaluations:search"
};
option (google.api.method_signature) = "parent,filter";
}
// Searches example comparisons from an evaluation. The return format is a
// list of example comparisons that show ground truth and prediction(s) for
// a single input. Search by providing an evaluation ID.
rpc SearchExampleComparisons(SearchExampleComparisonsRequest) returns (SearchExampleComparisonsResponse) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/datasets/*/evaluations/*}/exampleComparisons:search"
body: "*"
};
option (google.api.method_signature) = "parent";
}
// Creates an evaluation job.
rpc CreateEvaluationJob(CreateEvaluationJobRequest) returns (EvaluationJob) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*}/evaluationJobs"
body: "*"
};
option (google.api.method_signature) = "parent,job";
}
// Updates an evaluation job. You can only update certain fields of the job's
// [EvaluationJobConfig][google.cloud.datalabeling.v1beta1.EvaluationJobConfig]: `humanAnnotationConfig.instruction`,
// `exampleCount`, and `exampleSamplePercentage`.
//
// If you want to change any other aspect of the evaluation job, you must
// delete the job and create a new one.
rpc UpdateEvaluationJob(UpdateEvaluationJobRequest) returns (EvaluationJob) {
option (google.api.http) = {
patch: "/v1beta1/{evaluation_job.name=projects/*/evaluationJobs/*}"
body: "evaluation_job"
};
option (google.api.method_signature) = "evaluation_job,update_mask";
}
// Gets an evaluation job by resource name.
rpc GetEvaluationJob(GetEvaluationJobRequest) returns (EvaluationJob) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/evaluationJobs/*}"
};
option (google.api.method_signature) = "name";
}
// Pauses an evaluation job. Pausing an evaluation job that is already in a
// `PAUSED` state is a no-op.
rpc PauseEvaluationJob(PauseEvaluationJobRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v1beta1/{name=projects/*/evaluationJobs/*}:pause"
body: "*"
};
option (google.api.method_signature) = "name";
}
// Resumes a paused evaluation job. A deleted evaluation job can't be resumed.
// Resuming a running or scheduled evaluation job is a no-op.
rpc ResumeEvaluationJob(ResumeEvaluationJobRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v1beta1/{name=projects/*/evaluationJobs/*}:resume"
body: "*"
};
option (google.api.method_signature) = "name";
}
// Stops and deletes an evaluation job.
rpc DeleteEvaluationJob(DeleteEvaluationJobRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/evaluationJobs/*}"
};
option (google.api.method_signature) = "name";
}
// Lists all evaluation jobs within a project with possible filters.
// Pagination is supported.
rpc ListEvaluationJobs(ListEvaluationJobsRequest) returns (ListEvaluationJobsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*}/evaluationJobs"
};
option (google.api.method_signature) = "parent,filter";
}
}
// Request message for CreateDataset.
message CreateDatasetRequest {
// Required. Dataset resource parent, format:
// projects/{project_id}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudresourcemanager.googleapis.com/Project"
}
];
// Required. The dataset to be created.
Dataset dataset = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for GetDataSet.
message GetDatasetRequest {
// Required. Dataset resource name, format:
// projects/{project_id}/datasets/{dataset_id}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/Dataset"
}
];
}
// Request message for ListDataset.
message ListDatasetsRequest {
// Required. Dataset resource parent, format:
// projects/{project_id}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudresourcemanager.googleapis.com/Project"
}
];
// Optional. Filter on dataset is not supported at this moment.
string filter = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. Requested page size. Server may return fewer results than
// requested. Default value is 100.
int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. A token identifying a page of results for the server to return.
// Typically obtained by
// [ListDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDatasetsResponse.next_page_token] of the previous
// [DataLabelingService.ListDatasets] call.
// Returns the first page if empty.
string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
}
// Results of listing datasets within a project.
message ListDatasetsResponse {
// The list of datasets to return.
repeated Dataset datasets = 1;
// A token to retrieve next page of results.
string next_page_token = 2;
}
// Request message for DeleteDataset.
message DeleteDatasetRequest {
// Required. Dataset resource name, format:
// projects/{project_id}/datasets/{dataset_id}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/Dataset"
}
];
}
// Request message for ImportData API.
message ImportDataRequest {
// Required. Dataset resource name, format:
// projects/{project_id}/datasets/{dataset_id}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/Dataset"
}
];
// Required. Specify the input source of the data.
InputConfig input_config = 2 [(google.api.field_behavior) = REQUIRED];
// Email of the user who started the import task and should be notified by
// email. If empty no notification will be sent.
string user_email_address = 3;
}
// Request message for ExportData API.
message ExportDataRequest {
// Required. Dataset resource name, format:
// projects/{project_id}/datasets/{dataset_id}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/Dataset"
}
];
// Required. Annotated dataset resource name. DataItem in
// Dataset and their annotations in specified annotated dataset will be
// exported. It's in format of
// projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
// {annotated_dataset_id}
string annotated_dataset = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/AnnotatedDataset"
}
];
// Optional. Filter is not supported at this moment.
string filter = 3 [(google.api.field_behavior) = OPTIONAL];
// Required. Specify the output destination.
OutputConfig output_config = 4 [(google.api.field_behavior) = REQUIRED];
// Email of the user who started the export task and should be notified by
// email. If empty no notification will be sent.
string user_email_address = 5;
}
// Request message for GetDataItem.
message GetDataItemRequest {
// Required. The name of the data item to get, format:
// projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/DataItem"
}
];
}
// Request message for ListDataItems.
message ListDataItemsRequest {
// Required. Name of the dataset to list data items, format:
// projects/{project_id}/datasets/{dataset_id}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/Dataset"
}
];
// Optional. Filter is not supported at this moment.
string filter = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. Requested page size. Server may return fewer results than
// requested. Default value is 100.
int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. A token identifying a page of results for the server to return.
// Typically obtained by
// [ListDataItemsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDataItemsResponse.next_page_token] of the previous
// [DataLabelingService.ListDataItems] call.
// Return first page if empty.
string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
}
// Results of listing data items in a dataset.
message ListDataItemsResponse {
// The list of data items to return.
repeated DataItem data_items = 1;
// A token to retrieve next page of results.
string next_page_token = 2;
}
// Request message for GetAnnotatedDataset.
message GetAnnotatedDatasetRequest {
// Required. Name of the annotated dataset to get, format:
// projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
// {annotated_dataset_id}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/AnnotatedDataset"
}
];
}
// Request message for ListAnnotatedDatasets.
message ListAnnotatedDatasetsRequest {
// Required. Name of the dataset to list annotated datasets, format:
// projects/{project_id}/datasets/{dataset_id}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/Dataset"
}
];
// Optional. Filter is not supported at this moment.
string filter = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. Requested page size. Server may return fewer results than
// requested. Default value is 100.
int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. A token identifying a page of results for the server to return.
// Typically obtained by
// [ListAnnotatedDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.next_page_token] of the previous
// [DataLabelingService.ListAnnotatedDatasets] call.
// Return first page if empty.
string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
}
// Results of listing annotated datasets for a dataset.
message ListAnnotatedDatasetsResponse {
// The list of annotated datasets to return.
repeated AnnotatedDataset annotated_datasets = 1;
// A token to retrieve next page of results.
string next_page_token = 2;
}
// Request message for DeleteAnnotatedDataset.
message DeleteAnnotatedDatasetRequest {
// Required. Name of the annotated dataset to delete, format:
// projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
// {annotated_dataset_id}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/AnnotatedDataset"
}
];
}
// Request message for starting an image labeling task.
message LabelImageRequest {
// Image labeling task feature.
enum Feature {
FEATURE_UNSPECIFIED = 0;
// Label whole image with one or more of labels.
CLASSIFICATION = 1;
// Label image with bounding boxes for labels.
BOUNDING_BOX = 2;
// Label oriented bounding box. The box does not have to be parallel to
// horizontal line.
ORIENTED_BOUNDING_BOX = 6;
// Label images with bounding poly. A bounding poly is a plane figure that
// is bounded by a finite chain of straight line segments closing in a loop.
BOUNDING_POLY = 3;
// Label images with polyline. Polyline is formed by connected line segments
// which are not in closed form.
POLYLINE = 4;
// Label images with segmentation. Segmentation is different from bounding
// poly since it is more fine-grained, pixel level annotation.
SEGMENTATION = 5;
}
// Required. Config for labeling tasks. The type of request config must
// match the selected feature.
oneof request_config {
// Configuration for image classification task.
// One of image_classification_config, bounding_poly_config,
// polyline_config and segmentation_config are required.
ImageClassificationConfig image_classification_config = 4;
// Configuration for bounding box and bounding poly task.
// One of image_classification_config, bounding_poly_config,
// polyline_config and segmentation_config are required.
BoundingPolyConfig bounding_poly_config = 5;
// Configuration for polyline task.
// One of image_classification_config, bounding_poly_config,
// polyline_config and segmentation_config are required.
PolylineConfig polyline_config = 6;
// Configuration for segmentation task.
// One of image_classification_config, bounding_poly_config,
// polyline_config and segmentation_config are required.
SegmentationConfig segmentation_config = 7;
}
// Required. Name of the dataset to request labeling task, format:
// projects/{project_id}/datasets/{dataset_id}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/Dataset"
}
];
// Required. Basic human annotation config.
HumanAnnotationConfig basic_config = 2 [(google.api.field_behavior) = REQUIRED];
// Required. The type of image labeling task.
Feature feature = 3 [(google.api.field_behavior) = REQUIRED];
}
// Request message for LabelVideo.
message LabelVideoRequest {
// Video labeling task feature.
enum Feature {
FEATURE_UNSPECIFIED = 0;
// Label whole video or video segment with one or more labels.
CLASSIFICATION = 1;
// Label objects with bounding box on image frames extracted from the video.
OBJECT_DETECTION = 2;
// Label and track objects in video.
OBJECT_TRACKING = 3;
// Label the range of video for the specified events.
EVENT = 4;
}
// Required. Config for labeling tasks. The type of request config must
// match the selected feature.
oneof request_config {
// Configuration for video classification task.
// One of video_classification_config, object_detection_config,
// object_tracking_config and event_config is required.
VideoClassificationConfig video_classification_config = 4;
// Configuration for video object detection task.
// One of video_classification_config, object_detection_config,
// object_tracking_config and event_config is required.
ObjectDetectionConfig object_detection_config = 5;
// Configuration for video object tracking task.
// One of video_classification_config, object_detection_config,
// object_tracking_config and event_config is required.
ObjectTrackingConfig object_tracking_config = 6;
// Configuration for video event task.
// One of video_classification_config, object_detection_config,
// object_tracking_config and event_config is required.
EventConfig event_config = 7;
}
// Required. Name of the dataset to request labeling task, format:
// projects/{project_id}/datasets/{dataset_id}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/Dataset"
}
];
// Required. Basic human annotation config.
HumanAnnotationConfig basic_config = 2 [(google.api.field_behavior) = REQUIRED];
// Required. The type of video labeling task.
Feature feature = 3 [(google.api.field_behavior) = REQUIRED];
}
// Request message for LabelText.
message LabelTextRequest {
// Text labeling task feature.
enum Feature {
FEATURE_UNSPECIFIED = 0;
// Label text content to one of more labels.
TEXT_CLASSIFICATION = 1;
// Label entities and their span in text.
TEXT_ENTITY_EXTRACTION = 2;
}
// Required. Config for labeling tasks. The type of request config must
// match the selected feature.
oneof request_config {
// Configuration for text classification task.
// One of text_classification_config and text_entity_extraction_config
// is required.
TextClassificationConfig text_classification_config = 4;
// Configuration for entity extraction task.
// One of text_classification_config and text_entity_extraction_config
// is required.
TextEntityExtractionConfig text_entity_extraction_config = 5;
}
// Required. Name of the data set to request labeling task, format:
// projects/{project_id}/datasets/{dataset_id}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/Dataset"
}
];
// Required. Basic human annotation config.
HumanAnnotationConfig basic_config = 2 [(google.api.field_behavior) = REQUIRED];
// Required. The type of text labeling task.
Feature feature = 6 [(google.api.field_behavior) = REQUIRED];
}
// Request message for GetExample
message GetExampleRequest {
// Required. Name of example, format:
// projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
// {annotated_dataset_id}/examples/{example_id}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/Example"
}
];
// Optional. An expression for filtering Examples. Filter by
// annotation_spec.display_name is supported. Format
// "annotation_spec.display_name = {display_name}"
string filter = 2 [(google.api.field_behavior) = OPTIONAL];
}
// Request message for ListExamples.
message ListExamplesRequest {
// Required. Example resource parent.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/AnnotatedDataset"
}
];
// Optional. An expression for filtering Examples. For annotated datasets that
// have annotation spec set, filter by
// annotation_spec.display_name is supported. Format
// "annotation_spec.display_name = {display_name}"
string filter = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. Requested page size. Server may return fewer results than
// requested. Default value is 100.
int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. A token identifying a page of results for the server to return.
// Typically obtained by
// [ListExamplesResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListExamplesResponse.next_page_token] of the previous
// [DataLabelingService.ListExamples] call.
// Return first page if empty.
string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
}
// Results of listing Examples in and annotated dataset.
message ListExamplesResponse {
// The list of examples to return.
repeated Example examples = 1;
// A token to retrieve next page of results.
string next_page_token = 2;
}
// Request message for CreateAnnotationSpecSet.
message CreateAnnotationSpecSetRequest {
// Required. AnnotationSpecSet resource parent, format:
// projects/{project_id}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudresourcemanager.googleapis.com/Project"
}
];
// Required. Annotation spec set to create. Annotation specs must be included.
// Only one annotation spec will be accepted for annotation specs with same
// display_name.
AnnotationSpecSet annotation_spec_set = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for GetAnnotationSpecSet.
message GetAnnotationSpecSetRequest {
// Required. AnnotationSpecSet resource name, format:
// projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/AnnotationSpecSet"
}
];
}
// Request message for ListAnnotationSpecSets.
message ListAnnotationSpecSetsRequest {
// Required. Parent of AnnotationSpecSet resource, format:
// projects/{project_id}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudresourcemanager.googleapis.com/Project"
}
];
// Optional. Filter is not supported at this moment.
string filter = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. Requested page size. Server may return fewer results than
// requested. Default value is 100.
int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. A token identifying a page of results for the server to return.
// Typically obtained by
// [ListAnnotationSpecSetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.next_page_token] of the previous
// [DataLabelingService.ListAnnotationSpecSets] call.
// Return first page if empty.
string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
}
// Results of listing annotation spec set under a project.
message ListAnnotationSpecSetsResponse {
// The list of annotation spec sets.
repeated AnnotationSpecSet annotation_spec_sets = 1;
// A token to retrieve next page of results.
string next_page_token = 2;
}
// Request message for DeleteAnnotationSpecSet.
message DeleteAnnotationSpecSetRequest {
// Required. AnnotationSpec resource name, format:
// `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/AnnotationSpecSet"
}
];
}
// Request message for CreateInstruction.
message CreateInstructionRequest {
// Required. Instruction resource parent, format:
// projects/{project_id}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudresourcemanager.googleapis.com/Project"
}
];
// Required. Instruction of how to perform the labeling task.
Instruction instruction = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for GetInstruction.
message GetInstructionRequest {
// Required. Instruction resource name, format:
// projects/{project_id}/instructions/{instruction_id}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/Instruction"
}
];
}
// Request message for DeleteInstruction.
message DeleteInstructionRequest {
// Required. Instruction resource name, format:
// projects/{project_id}/instructions/{instruction_id}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/Instruction"
}
];
}
// Request message for ListInstructions.
message ListInstructionsRequest {
// Required. Instruction resource parent, format:
// projects/{project_id}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudresourcemanager.googleapis.com/Project"
}
];
// Optional. Filter is not supported at this moment.
string filter = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. Requested page size. Server may return fewer results than
// requested. Default value is 100.
int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. A token identifying a page of results for the server to return.
// Typically obtained by
// [ListInstructionsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListInstructionsResponse.next_page_token] of the previous
// [DataLabelingService.ListInstructions] call.
// Return first page if empty.
string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
}
// Results of listing instructions under a project.
message ListInstructionsResponse {
// The list of Instructions to return.
repeated Instruction instructions = 1;
// A token to retrieve next page of results.
string next_page_token = 2;
}
// Request message for GetEvaluation.
message GetEvaluationRequest {
// Required. Name of the evaluation. Format:
//
// "projects/<var>{project_id}</var>/datasets/<var>{dataset_id}</var>/evaluations/<var>{evaluation_id}</var>'
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datalabeling.googleapis.com/Evaluation"
}
];
}
// Request message for SearchEvaluation.
message SearchEvaluationsRequest {