1// Copyright 2020 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 15syntax = "proto3"; 16 17package google.cloud.automl.v1beta1; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23import "google/cloud/automl/v1beta1/annotation_payload.proto"; 24import "google/cloud/automl/v1beta1/annotation_spec.proto"; 25import "google/cloud/automl/v1beta1/column_spec.proto"; 26import "google/cloud/automl/v1beta1/dataset.proto"; 27import "google/cloud/automl/v1beta1/image.proto"; 28import "google/cloud/automl/v1beta1/io.proto"; 29import "google/cloud/automl/v1beta1/model.proto"; 30import "google/cloud/automl/v1beta1/model_evaluation.proto"; 31import "google/cloud/automl/v1beta1/operations.proto"; 32import "google/cloud/automl/v1beta1/table_spec.proto"; 33import "google/longrunning/operations.proto"; 34import "google/protobuf/field_mask.proto"; 35 36option go_package = "cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb"; 37option java_multiple_files = true; 38option java_outer_classname = "AutoMlProto"; 39option java_package = "com.google.cloud.automl.v1beta1"; 40option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; 41option ruby_package = "Google::Cloud::AutoML::V1beta1"; 42 43// AutoML Server API. 44// 45// The resource names are assigned by the server. 46// The server never reuses names that it has created after the resources with 47// those names are deleted. 48// 49// An ID of a resource is the last element of the item's resource name. For 50// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then 51// the id for the item is `{dataset_id}`. 52// 53// Currently the only supported `location_id` is "us-central1". 54// 55// On any input that is documented to expect a string parameter in 56// snake_case or kebab-case, either of those cases is accepted. 57service AutoMl { 58 option (google.api.default_host) = "automl.googleapis.com"; 59 option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; 60 61 // Creates a dataset. 62 rpc CreateDataset(CreateDatasetRequest) returns (Dataset) { 63 option (google.api.http) = { 64 post: "/v1beta1/{parent=projects/*/locations/*}/datasets" 65 body: "dataset" 66 }; 67 option (google.api.method_signature) = "parent,dataset"; 68 } 69 70 // Gets a dataset. 71 rpc GetDataset(GetDatasetRequest) returns (Dataset) { 72 option (google.api.http) = { 73 get: "/v1beta1/{name=projects/*/locations/*/datasets/*}" 74 }; 75 option (google.api.method_signature) = "name"; 76 } 77 78 // Lists datasets in a project. 79 rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) { 80 option (google.api.http) = { 81 get: "/v1beta1/{parent=projects/*/locations/*}/datasets" 82 }; 83 option (google.api.method_signature) = "parent"; 84 } 85 86 // Updates a dataset. 87 rpc UpdateDataset(UpdateDatasetRequest) returns (Dataset) { 88 option (google.api.http) = { 89 patch: "/v1beta1/{dataset.name=projects/*/locations/*/datasets/*}" 90 body: "dataset" 91 }; 92 option (google.api.method_signature) = "dataset"; 93 } 94 95 // Deletes a dataset and all of its contents. 96 // Returns empty response in the 97 // [response][google.longrunning.Operation.response] field when it completes, 98 // and `delete_details` in the 99 // [metadata][google.longrunning.Operation.metadata] field. 100 rpc DeleteDataset(DeleteDatasetRequest) returns (google.longrunning.Operation) { 101 option (google.api.http) = { 102 delete: "/v1beta1/{name=projects/*/locations/*/datasets/*}" 103 }; 104 option (google.api.method_signature) = "name"; 105 option (google.longrunning.operation_info) = { 106 response_type: "google.protobuf.Empty" 107 metadata_type: "OperationMetadata" 108 }; 109 } 110 111 // Imports data into a dataset. 112 // For Tables this method can only be called on an empty Dataset. 113 // 114 // For Tables: 115 // * A 116 // [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] 117 // parameter must be explicitly set. 118 // Returns an empty response in the 119 // [response][google.longrunning.Operation.response] field when it completes. 120 rpc ImportData(ImportDataRequest) returns (google.longrunning.Operation) { 121 option (google.api.http) = { 122 post: "/v1beta1/{name=projects/*/locations/*/datasets/*}:importData" 123 body: "*" 124 }; 125 option (google.api.method_signature) = "name,input_config"; 126 option (google.longrunning.operation_info) = { 127 response_type: "google.protobuf.Empty" 128 metadata_type: "OperationMetadata" 129 }; 130 } 131 132 // Exports dataset's data to the provided output location. 133 // Returns an empty response in the 134 // [response][google.longrunning.Operation.response] field when it completes. 135 rpc ExportData(ExportDataRequest) returns (google.longrunning.Operation) { 136 option (google.api.http) = { 137 post: "/v1beta1/{name=projects/*/locations/*/datasets/*}:exportData" 138 body: "*" 139 }; 140 option (google.api.method_signature) = "name,output_config"; 141 option (google.longrunning.operation_info) = { 142 response_type: "google.protobuf.Empty" 143 metadata_type: "OperationMetadata" 144 }; 145 } 146 147 // Gets an annotation spec. 148 rpc GetAnnotationSpec(GetAnnotationSpecRequest) returns (AnnotationSpec) { 149 option (google.api.http) = { 150 get: "/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}" 151 }; 152 option (google.api.method_signature) = "name"; 153 } 154 155 // Gets a table spec. 156 rpc GetTableSpec(GetTableSpecRequest) returns (TableSpec) { 157 option (google.api.http) = { 158 get: "/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*}" 159 }; 160 option (google.api.method_signature) = "name"; 161 } 162 163 // Lists table specs in a dataset. 164 rpc ListTableSpecs(ListTableSpecsRequest) returns (ListTableSpecsResponse) { 165 option (google.api.http) = { 166 get: "/v1beta1/{parent=projects/*/locations/*/datasets/*}/tableSpecs" 167 }; 168 option (google.api.method_signature) = "parent"; 169 } 170 171 // Updates a table spec. 172 rpc UpdateTableSpec(UpdateTableSpecRequest) returns (TableSpec) { 173 option (google.api.http) = { 174 patch: "/v1beta1/{table_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*}" 175 body: "table_spec" 176 }; 177 option (google.api.method_signature) = "table_spec"; 178 } 179 180 // Gets a column spec. 181 rpc GetColumnSpec(GetColumnSpecRequest) returns (ColumnSpec) { 182 option (google.api.http) = { 183 get: "/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}" 184 }; 185 option (google.api.method_signature) = "name"; 186 } 187 188 // Lists column specs in a table spec. 189 rpc ListColumnSpecs(ListColumnSpecsRequest) returns (ListColumnSpecsResponse) { 190 option (google.api.http) = { 191 get: "/v1beta1/{parent=projects/*/locations/*/datasets/*/tableSpecs/*}/columnSpecs" 192 }; 193 option (google.api.method_signature) = "parent"; 194 } 195 196 // Updates a column spec. 197 rpc UpdateColumnSpec(UpdateColumnSpecRequest) returns (ColumnSpec) { 198 option (google.api.http) = { 199 patch: "/v1beta1/{column_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}" 200 body: "column_spec" 201 }; 202 option (google.api.method_signature) = "column_spec"; 203 } 204 205 // Creates a model. 206 // Returns a Model in the [response][google.longrunning.Operation.response] 207 // field when it completes. 208 // When you create a model, several model evaluations are created for it: 209 // a global evaluation, and one evaluation for each annotation spec. 210 rpc CreateModel(CreateModelRequest) returns (google.longrunning.Operation) { 211 option (google.api.http) = { 212 post: "/v1beta1/{parent=projects/*/locations/*}/models" 213 body: "model" 214 }; 215 option (google.api.method_signature) = "parent,model"; 216 option (google.longrunning.operation_info) = { 217 response_type: "Model" 218 metadata_type: "OperationMetadata" 219 }; 220 } 221 222 // Gets a model. 223 rpc GetModel(GetModelRequest) returns (Model) { 224 option (google.api.http) = { 225 get: "/v1beta1/{name=projects/*/locations/*/models/*}" 226 }; 227 option (google.api.method_signature) = "name"; 228 } 229 230 // Lists models. 231 rpc ListModels(ListModelsRequest) returns (ListModelsResponse) { 232 option (google.api.http) = { 233 get: "/v1beta1/{parent=projects/*/locations/*}/models" 234 }; 235 option (google.api.method_signature) = "parent"; 236 } 237 238 // Deletes a model. 239 // Returns `google.protobuf.Empty` in the 240 // [response][google.longrunning.Operation.response] field when it completes, 241 // and `delete_details` in the 242 // [metadata][google.longrunning.Operation.metadata] field. 243 rpc DeleteModel(DeleteModelRequest) returns (google.longrunning.Operation) { 244 option (google.api.http) = { 245 delete: "/v1beta1/{name=projects/*/locations/*/models/*}" 246 }; 247 option (google.api.method_signature) = "name"; 248 option (google.longrunning.operation_info) = { 249 response_type: "google.protobuf.Empty" 250 metadata_type: "OperationMetadata" 251 }; 252 } 253 254 // Deploys a model. If a model is already deployed, deploying it with the 255 // same parameters has no effect. Deploying with different parametrs 256 // (as e.g. changing 257 // 258 // [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) 259 // will reset the deployment state without pausing the model's availability. 260 // 261 // Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage 262 // deployment automatically. 263 // 264 // Returns an empty response in the 265 // [response][google.longrunning.Operation.response] field when it completes. 266 rpc DeployModel(DeployModelRequest) returns (google.longrunning.Operation) { 267 option (google.api.http) = { 268 post: "/v1beta1/{name=projects/*/locations/*/models/*}:deploy" 269 body: "*" 270 }; 271 option (google.api.method_signature) = "name"; 272 option (google.longrunning.operation_info) = { 273 response_type: "google.protobuf.Empty" 274 metadata_type: "OperationMetadata" 275 }; 276 } 277 278 // Undeploys a model. If the model is not deployed this method has no effect. 279 // 280 // Only applicable for Text Classification, Image Object Detection and Tables; 281 // all other domains manage deployment automatically. 282 // 283 // Returns an empty response in the 284 // [response][google.longrunning.Operation.response] field when it completes. 285 rpc UndeployModel(UndeployModelRequest) returns (google.longrunning.Operation) { 286 option (google.api.http) = { 287 post: "/v1beta1/{name=projects/*/locations/*/models/*}:undeploy" 288 body: "*" 289 }; 290 option (google.api.method_signature) = "name"; 291 option (google.longrunning.operation_info) = { 292 response_type: "google.protobuf.Empty" 293 metadata_type: "OperationMetadata" 294 }; 295 } 296 297 // Exports a trained, "export-able", model to a user specified Google Cloud 298 // Storage location. A model is considered export-able if and only if it has 299 // an export format defined for it in 300 // 301 // [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. 302 // 303 // Returns an empty response in the 304 // [response][google.longrunning.Operation.response] field when it completes. 305 rpc ExportModel(ExportModelRequest) returns (google.longrunning.Operation) { 306 option (google.api.http) = { 307 post: "/v1beta1/{name=projects/*/locations/*/models/*}:export" 308 body: "*" 309 }; 310 option (google.api.method_signature) = "name,output_config"; 311 option (google.longrunning.operation_info) = { 312 response_type: "google.protobuf.Empty" 313 metadata_type: "OperationMetadata" 314 }; 315 } 316 317 // Exports examples on which the model was evaluated (i.e. which were in the 318 // TEST set of the dataset the model was created from), together with their 319 // ground truth annotations and the annotations created (predicted) by the 320 // model. 321 // The examples, ground truth and predictions are exported in the state 322 // they were at the moment the model was evaluated. 323 // 324 // This export is available only for 30 days since the model evaluation is 325 // created. 326 // 327 // Currently only available for Tables. 328 // 329 // Returns an empty response in the 330 // [response][google.longrunning.Operation.response] field when it completes. 331 rpc ExportEvaluatedExamples(ExportEvaluatedExamplesRequest) returns (google.longrunning.Operation) { 332 option (google.api.http) = { 333 post: "/v1beta1/{name=projects/*/locations/*/models/*}:exportEvaluatedExamples" 334 body: "*" 335 }; 336 option (google.api.method_signature) = "name,output_config"; 337 option (google.longrunning.operation_info) = { 338 response_type: "google.protobuf.Empty" 339 metadata_type: "OperationMetadata" 340 }; 341 } 342 343 // Gets a model evaluation. 344 rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) { 345 option (google.api.http) = { 346 get: "/v1beta1/{name=projects/*/locations/*/models/*/modelEvaluations/*}" 347 }; 348 option (google.api.method_signature) = "name"; 349 } 350 351 // Lists model evaluations. 352 rpc ListModelEvaluations(ListModelEvaluationsRequest) returns (ListModelEvaluationsResponse) { 353 option (google.api.http) = { 354 get: "/v1beta1/{parent=projects/*/locations/*/models/*}/modelEvaluations" 355 }; 356 option (google.api.method_signature) = "parent"; 357 } 358} 359 360// Request message for [AutoMl.CreateDataset][google.cloud.automl.v1beta1.AutoMl.CreateDataset]. 361message CreateDatasetRequest { 362 // Required. The resource name of the project to create the dataset for. 363 string parent = 1 [ 364 (google.api.field_behavior) = REQUIRED, 365 (google.api.resource_reference) = { 366 type: "locations.googleapis.com/Location" 367 } 368 ]; 369 370 // Required. The dataset to create. 371 Dataset dataset = 2 [(google.api.field_behavior) = REQUIRED]; 372} 373 374// Request message for [AutoMl.GetDataset][google.cloud.automl.v1beta1.AutoMl.GetDataset]. 375message GetDatasetRequest { 376 // Required. The resource name of the dataset to retrieve. 377 string name = 1 [ 378 (google.api.field_behavior) = REQUIRED, 379 (google.api.resource_reference) = { 380 type: "automl.googleapis.com/Dataset" 381 } 382 ]; 383} 384 385// Request message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets]. 386message ListDatasetsRequest { 387 // Required. The resource name of the project from which to list datasets. 388 string parent = 1 [ 389 (google.api.field_behavior) = REQUIRED, 390 (google.api.resource_reference) = { 391 type: "locations.googleapis.com/Location" 392 } 393 ]; 394 395 // An expression for filtering the results of the request. 396 // 397 // * `dataset_metadata` - for existence of the case (e.g. 398 // `image_classification_dataset_metadata:*`). Some examples of 399 // using the filter are: 400 // 401 // * `translation_dataset_metadata:*` --> The dataset has 402 // `translation_dataset_metadata`. 403 string filter = 3; 404 405 // Requested page size. Server may return fewer results than requested. 406 // If unspecified, server will pick a default size. 407 int32 page_size = 4; 408 409 // A token identifying a page of results for the server to return 410 // Typically obtained via 411 // [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous 412 // [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call. 413 string page_token = 6; 414} 415 416// Response message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets]. 417message ListDatasetsResponse { 418 // The datasets read. 419 repeated Dataset datasets = 1; 420 421 // A token to retrieve next page of results. 422 // Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.page_token] to obtain that page. 423 string next_page_token = 2; 424} 425 426// Request message for [AutoMl.UpdateDataset][google.cloud.automl.v1beta1.AutoMl.UpdateDataset] 427message UpdateDatasetRequest { 428 // Required. The dataset which replaces the resource on the server. 429 Dataset dataset = 1 [(google.api.field_behavior) = REQUIRED]; 430 431 // The update mask applies to the resource. 432 google.protobuf.FieldMask update_mask = 2; 433} 434 435// Request message for [AutoMl.DeleteDataset][google.cloud.automl.v1beta1.AutoMl.DeleteDataset]. 436message DeleteDatasetRequest { 437 // Required. The resource name of the dataset to delete. 438 string name = 1 [ 439 (google.api.field_behavior) = REQUIRED, 440 (google.api.resource_reference) = { 441 type: "automl.googleapis.com/Dataset" 442 } 443 ]; 444} 445 446// Request message for [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData]. 447message ImportDataRequest { 448 // Required. Dataset name. Dataset must already exist. All imported 449 // annotations and examples will be added. 450 string name = 1 [ 451 (google.api.field_behavior) = REQUIRED, 452 (google.api.resource_reference) = { 453 type: "automl.googleapis.com/Dataset" 454 } 455 ]; 456 457 // Required. The desired input location and its domain specific semantics, 458 // if any. 459 InputConfig input_config = 3 [(google.api.field_behavior) = REQUIRED]; 460} 461 462// Request message for [AutoMl.ExportData][google.cloud.automl.v1beta1.AutoMl.ExportData]. 463message ExportDataRequest { 464 // Required. The resource name of the dataset. 465 string name = 1 [ 466 (google.api.field_behavior) = REQUIRED, 467 (google.api.resource_reference) = { 468 type: "automl.googleapis.com/Dataset" 469 } 470 ]; 471 472 // Required. The desired output location. 473 OutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; 474} 475 476// Request message for [AutoMl.GetAnnotationSpec][google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec]. 477message GetAnnotationSpecRequest { 478 // Required. The resource name of the annotation spec to retrieve. 479 string name = 1 [ 480 (google.api.field_behavior) = REQUIRED, 481 (google.api.resource_reference) = { 482 type: "automl.googleapis.com/AnnotationSpec" 483 } 484 ]; 485} 486 487// Request message for [AutoMl.GetTableSpec][google.cloud.automl.v1beta1.AutoMl.GetTableSpec]. 488message GetTableSpecRequest { 489 // Required. The resource name of the table spec to retrieve. 490 string name = 1 [ 491 (google.api.field_behavior) = REQUIRED, 492 (google.api.resource_reference) = { 493 type: "automl.googleapis.com/TableSpec" 494 } 495 ]; 496 497 // Mask specifying which fields to read. 498 google.protobuf.FieldMask field_mask = 2; 499} 500 501// Request message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs]. 502message ListTableSpecsRequest { 503 // Required. The resource name of the dataset to list table specs from. 504 string parent = 1 [ 505 (google.api.field_behavior) = REQUIRED, 506 (google.api.resource_reference) = { 507 type: "automl.googleapis.com/Dataset" 508 } 509 ]; 510 511 // Mask specifying which fields to read. 512 google.protobuf.FieldMask field_mask = 2; 513 514 // Filter expression, see go/filtering. 515 string filter = 3; 516 517 // Requested page size. The server can return fewer results than requested. 518 // If unspecified, the server will pick a default size. 519 int32 page_size = 4; 520 521 // A token identifying a page of results for the server to return. 522 // Typically obtained from the 523 // [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous 524 // [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call. 525 string page_token = 6; 526} 527 528// Response message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs]. 529message ListTableSpecsResponse { 530 // The table specs read. 531 repeated TableSpec table_specs = 1; 532 533 // A token to retrieve next page of results. 534 // Pass to [ListTableSpecsRequest.page_token][google.cloud.automl.v1beta1.ListTableSpecsRequest.page_token] to obtain that page. 535 string next_page_token = 2; 536} 537 538// Request message for [AutoMl.UpdateTableSpec][google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec] 539message UpdateTableSpecRequest { 540 // Required. The table spec which replaces the resource on the server. 541 TableSpec table_spec = 1 [(google.api.field_behavior) = REQUIRED]; 542 543 // The update mask applies to the resource. 544 google.protobuf.FieldMask update_mask = 2; 545} 546 547// Request message for [AutoMl.GetColumnSpec][google.cloud.automl.v1beta1.AutoMl.GetColumnSpec]. 548message GetColumnSpecRequest { 549 // Required. The resource name of the column spec to retrieve. 550 string name = 1 [ 551 (google.api.field_behavior) = REQUIRED, 552 (google.api.resource_reference) = { 553 type: "automl.googleapis.com/ColumnSpec" 554 } 555 ]; 556 557 // Mask specifying which fields to read. 558 google.protobuf.FieldMask field_mask = 2; 559} 560 561// Request message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs]. 562message ListColumnSpecsRequest { 563 // Required. The resource name of the table spec to list column specs from. 564 string parent = 1 [ 565 (google.api.field_behavior) = REQUIRED, 566 (google.api.resource_reference) = { 567 type: "automl.googleapis.com/TableSpec" 568 } 569 ]; 570 571 // Mask specifying which fields to read. 572 google.protobuf.FieldMask field_mask = 2; 573 574 // Filter expression, see go/filtering. 575 string filter = 3; 576 577 // Requested page size. The server can return fewer results than requested. 578 // If unspecified, the server will pick a default size. 579 int32 page_size = 4; 580 581 // A token identifying a page of results for the server to return. 582 // Typically obtained from the 583 // [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous 584 // [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call. 585 string page_token = 6; 586} 587 588// Response message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs]. 589message ListColumnSpecsResponse { 590 // The column specs read. 591 repeated ColumnSpec column_specs = 1; 592 593 // A token to retrieve next page of results. 594 // Pass to [ListColumnSpecsRequest.page_token][google.cloud.automl.v1beta1.ListColumnSpecsRequest.page_token] to obtain that page. 595 string next_page_token = 2; 596} 597 598// Request message for [AutoMl.UpdateColumnSpec][google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec] 599message UpdateColumnSpecRequest { 600 // Required. The column spec which replaces the resource on the server. 601 ColumnSpec column_spec = 1 [(google.api.field_behavior) = REQUIRED]; 602 603 // The update mask applies to the resource. 604 google.protobuf.FieldMask update_mask = 2; 605} 606 607// Request message for [AutoMl.CreateModel][google.cloud.automl.v1beta1.AutoMl.CreateModel]. 608message CreateModelRequest { 609 // Required. Resource name of the parent project where the model is being created. 610 string parent = 1 [ 611 (google.api.field_behavior) = REQUIRED, 612 (google.api.resource_reference) = { 613 type: "locations.googleapis.com/Location" 614 } 615 ]; 616 617 // Required. The model to create. 618 Model model = 4 [(google.api.field_behavior) = REQUIRED]; 619} 620 621// Request message for [AutoMl.GetModel][google.cloud.automl.v1beta1.AutoMl.GetModel]. 622message GetModelRequest { 623 // Required. Resource name of the model. 624 string name = 1 [ 625 (google.api.field_behavior) = REQUIRED, 626 (google.api.resource_reference) = { 627 type: "automl.googleapis.com/Model" 628 } 629 ]; 630} 631 632// Request message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels]. 633message ListModelsRequest { 634 // Required. Resource name of the project, from which to list the models. 635 string parent = 1 [ 636 (google.api.field_behavior) = REQUIRED, 637 (google.api.resource_reference) = { 638 type: "locations.googleapis.com/Location" 639 } 640 ]; 641 642 // An expression for filtering the results of the request. 643 // 644 // * `model_metadata` - for existence of the case (e.g. 645 // `video_classification_model_metadata:*`). 646 // * `dataset_id` - for = or !=. Some examples of using the filter are: 647 // 648 // * `image_classification_model_metadata:*` --> The model has 649 // `image_classification_model_metadata`. 650 // * `dataset_id=5` --> The model was created from a dataset with ID 5. 651 string filter = 3; 652 653 // Requested page size. 654 int32 page_size = 4; 655 656 // A token identifying a page of results for the server to return 657 // Typically obtained via 658 // [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous 659 // [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call. 660 string page_token = 6; 661} 662 663// Response message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels]. 664message ListModelsResponse { 665 // List of models in the requested page. 666 repeated Model model = 1; 667 668 // A token to retrieve next page of results. 669 // Pass to [ListModelsRequest.page_token][google.cloud.automl.v1beta1.ListModelsRequest.page_token] to obtain that page. 670 string next_page_token = 2; 671} 672 673// Request message for [AutoMl.DeleteModel][google.cloud.automl.v1beta1.AutoMl.DeleteModel]. 674message DeleteModelRequest { 675 // Required. Resource name of the model being deleted. 676 string name = 1 [ 677 (google.api.field_behavior) = REQUIRED, 678 (google.api.resource_reference) = { 679 type: "automl.googleapis.com/Model" 680 } 681 ]; 682} 683 684// Request message for [AutoMl.DeployModel][google.cloud.automl.v1beta1.AutoMl.DeployModel]. 685message DeployModelRequest { 686 // The per-domain specific deployment parameters. 687 oneof model_deployment_metadata { 688 // Model deployment metadata specific to Image Object Detection. 689 ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; 690 691 // Model deployment metadata specific to Image Classification. 692 ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; 693 } 694 695 // Required. Resource name of the model to deploy. 696 string name = 1 [ 697 (google.api.field_behavior) = REQUIRED, 698 (google.api.resource_reference) = { 699 type: "automl.googleapis.com/Model" 700 } 701 ]; 702} 703 704// Request message for [AutoMl.UndeployModel][google.cloud.automl.v1beta1.AutoMl.UndeployModel]. 705message UndeployModelRequest { 706 // Required. Resource name of the model to undeploy. 707 string name = 1 [ 708 (google.api.field_behavior) = REQUIRED, 709 (google.api.resource_reference) = { 710 type: "automl.googleapis.com/Model" 711 } 712 ]; 713} 714 715// Request message for [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]. 716// Models need to be enabled for exporting, otherwise an error code will be 717// returned. 718message ExportModelRequest { 719 // Required. The resource name of the model to export. 720 string name = 1 [ 721 (google.api.field_behavior) = REQUIRED, 722 (google.api.resource_reference) = { 723 type: "automl.googleapis.com/Model" 724 } 725 ]; 726 727 // Required. The desired output location and configuration. 728 ModelExportOutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; 729} 730 731// Request message for [AutoMl.ExportEvaluatedExamples][google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples]. 732message ExportEvaluatedExamplesRequest { 733 // Required. The resource name of the model whose evaluated examples are to 734 // be exported. 735 string name = 1 [ 736 (google.api.field_behavior) = REQUIRED, 737 (google.api.resource_reference) = { 738 type: "automl.googleapis.com/Model" 739 } 740 ]; 741 742 // Required. The desired output location and configuration. 743 ExportEvaluatedExamplesOutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; 744} 745 746// Request message for [AutoMl.GetModelEvaluation][google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation]. 747message GetModelEvaluationRequest { 748 // Required. Resource name for the model evaluation. 749 string name = 1 [ 750 (google.api.field_behavior) = REQUIRED, 751 (google.api.resource_reference) = { 752 type: "automl.googleapis.com/ModelEvaluation" 753 } 754 ]; 755} 756 757// Request message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations]. 758message ListModelEvaluationsRequest { 759 // Required. Resource name of the model to list the model evaluations for. 760 // If modelId is set as "-", this will list model evaluations from across all 761 // models of the parent location. 762 string parent = 1 [ 763 (google.api.field_behavior) = REQUIRED, 764 (google.api.resource_reference) = { 765 type: "automl.googleapis.com/Model" 766 } 767 ]; 768 769 // An expression for filtering the results of the request. 770 // 771 // * `annotation_spec_id` - for =, != or existence. See example below for 772 // the last. 773 // 774 // Some examples of using the filter are: 775 // 776 // * `annotation_spec_id!=4` --> The model evaluation was done for 777 // annotation spec with ID different than 4. 778 // * `NOT annotation_spec_id:*` --> The model evaluation was done for 779 // aggregate of all annotation specs. 780 string filter = 3; 781 782 // Requested page size. 783 int32 page_size = 4; 784 785 // A token identifying a page of results for the server to return. 786 // Typically obtained via 787 // [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous 788 // [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call. 789 string page_token = 6; 790} 791 792// Response message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations]. 793message ListModelEvaluationsResponse { 794 // List of model evaluations in the requested page. 795 repeated ModelEvaluation model_evaluation = 1; 796 797 // A token to retrieve next page of results. 798 // Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1beta1.ListModelEvaluationsRequest.page_token] field of a new 799 // [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] request to obtain that page. 800 string next_page_token = 2; 801} 802