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