1// Copyright 2023 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.aiplatform.v1; 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/aiplatform/v1/encryption_spec.proto"; 24import "google/cloud/aiplatform/v1/evaluated_annotation.proto"; 25import "google/cloud/aiplatform/v1/io.proto"; 26import "google/cloud/aiplatform/v1/model.proto"; 27import "google/cloud/aiplatform/v1/model_evaluation.proto"; 28import "google/cloud/aiplatform/v1/model_evaluation_slice.proto"; 29import "google/cloud/aiplatform/v1/operation.proto"; 30import "google/longrunning/operations.proto"; 31import "google/protobuf/empty.proto"; 32import "google/protobuf/field_mask.proto"; 33 34option csharp_namespace = "Google.Cloud.AIPlatform.V1"; 35option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; 36option java_multiple_files = true; 37option java_outer_classname = "ModelServiceProto"; 38option java_package = "com.google.cloud.aiplatform.v1"; 39option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; 40option ruby_package = "Google::Cloud::AIPlatform::V1"; 41 42// A service for managing Vertex AI's machine learning Models. 43service ModelService { 44 option (google.api.default_host) = "aiplatform.googleapis.com"; 45 option (google.api.oauth_scopes) = 46 "https://www.googleapis.com/auth/cloud-platform"; 47 48 // Uploads a Model artifact into Vertex AI. 49 rpc UploadModel(UploadModelRequest) returns (google.longrunning.Operation) { 50 option (google.api.http) = { 51 post: "/v1/{parent=projects/*/locations/*}/models:upload" 52 body: "*" 53 }; 54 option (google.api.method_signature) = "parent,model"; 55 option (google.longrunning.operation_info) = { 56 response_type: "UploadModelResponse" 57 metadata_type: "UploadModelOperationMetadata" 58 }; 59 } 60 61 // Gets a Model. 62 rpc GetModel(GetModelRequest) returns (Model) { 63 option (google.api.http) = { 64 get: "/v1/{name=projects/*/locations/*/models/*}" 65 }; 66 option (google.api.method_signature) = "name"; 67 } 68 69 // Lists Models in a Location. 70 rpc ListModels(ListModelsRequest) returns (ListModelsResponse) { 71 option (google.api.http) = { 72 get: "/v1/{parent=projects/*/locations/*}/models" 73 }; 74 option (google.api.method_signature) = "parent"; 75 } 76 77 // Lists versions of the specified model. 78 rpc ListModelVersions(ListModelVersionsRequest) 79 returns (ListModelVersionsResponse) { 80 option (google.api.http) = { 81 get: "/v1/{name=projects/*/locations/*/models/*}:listVersions" 82 }; 83 option (google.api.method_signature) = "name"; 84 } 85 86 // Updates a Model. 87 rpc UpdateModel(UpdateModelRequest) returns (Model) { 88 option (google.api.http) = { 89 patch: "/v1/{model.name=projects/*/locations/*/models/*}" 90 body: "model" 91 }; 92 option (google.api.method_signature) = "model,update_mask"; 93 } 94 95 // Deletes a Model. 96 // 97 // A model cannot be deleted if any 98 // [Endpoint][google.cloud.aiplatform.v1.Endpoint] resource has a 99 // [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] based on the 100 // model in its 101 // [deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] 102 // field. 103 rpc DeleteModel(DeleteModelRequest) returns (google.longrunning.Operation) { 104 option (google.api.http) = { 105 delete: "/v1/{name=projects/*/locations/*/models/*}" 106 }; 107 option (google.api.method_signature) = "name"; 108 option (google.longrunning.operation_info) = { 109 response_type: "google.protobuf.Empty" 110 metadata_type: "DeleteOperationMetadata" 111 }; 112 } 113 114 // Deletes a Model version. 115 // 116 // Model version can only be deleted if there are no 117 // [DeployedModels][google.cloud.aiplatform.v1.DeployedModel] created from it. 118 // Deleting the only version in the Model is not allowed. Use 119 // [DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel] for 120 // deleting the Model instead. 121 rpc DeleteModelVersion(DeleteModelVersionRequest) 122 returns (google.longrunning.Operation) { 123 option (google.api.http) = { 124 delete: "/v1/{name=projects/*/locations/*/models/*}:deleteVersion" 125 }; 126 option (google.api.method_signature) = "name"; 127 option (google.longrunning.operation_info) = { 128 response_type: "google.protobuf.Empty" 129 metadata_type: "DeleteOperationMetadata" 130 }; 131 } 132 133 // Merges a set of aliases for a Model version. 134 rpc MergeVersionAliases(MergeVersionAliasesRequest) returns (Model) { 135 option (google.api.http) = { 136 post: "/v1/{name=projects/*/locations/*/models/*}:mergeVersionAliases" 137 body: "*" 138 }; 139 option (google.api.method_signature) = "name,version_aliases"; 140 } 141 142 // Exports a trained, exportable Model to a location specified by the 143 // user. A Model is considered to be exportable if it has at least one 144 // [supported export 145 // format][google.cloud.aiplatform.v1.Model.supported_export_formats]. 146 rpc ExportModel(ExportModelRequest) returns (google.longrunning.Operation) { 147 option (google.api.http) = { 148 post: "/v1/{name=projects/*/locations/*/models/*}:export" 149 body: "*" 150 }; 151 option (google.api.method_signature) = "name,output_config"; 152 option (google.longrunning.operation_info) = { 153 response_type: "ExportModelResponse" 154 metadata_type: "ExportModelOperationMetadata" 155 }; 156 } 157 158 // Copies an already existing Vertex AI Model into the specified Location. 159 // The source Model must exist in the same Project. 160 // When copying custom Models, the users themselves are responsible for 161 // [Model.metadata][google.cloud.aiplatform.v1.Model.metadata] content to be 162 // region-agnostic, as well as making sure that any resources (e.g. files) it 163 // depends on remain accessible. 164 rpc CopyModel(CopyModelRequest) returns (google.longrunning.Operation) { 165 option (google.api.http) = { 166 post: "/v1/{parent=projects/*/locations/*}/models:copy" 167 body: "*" 168 }; 169 option (google.api.method_signature) = "parent,source_model"; 170 option (google.longrunning.operation_info) = { 171 response_type: "CopyModelResponse" 172 metadata_type: "CopyModelOperationMetadata" 173 }; 174 } 175 176 // Imports an externally generated ModelEvaluation. 177 rpc ImportModelEvaluation(ImportModelEvaluationRequest) 178 returns (ModelEvaluation) { 179 option (google.api.http) = { 180 post: "/v1/{parent=projects/*/locations/*/models/*}/evaluations:import" 181 body: "*" 182 }; 183 option (google.api.method_signature) = "parent,model_evaluation"; 184 } 185 186 // Imports a list of externally generated ModelEvaluationSlice. 187 rpc BatchImportModelEvaluationSlices(BatchImportModelEvaluationSlicesRequest) 188 returns (BatchImportModelEvaluationSlicesResponse) { 189 option (google.api.http) = { 190 post: "/v1/{parent=projects/*/locations/*/models/*/evaluations/*}/slices:batchImport" 191 body: "*" 192 }; 193 option (google.api.method_signature) = "parent,model_evaluation_slices"; 194 } 195 196 // Imports a list of externally generated EvaluatedAnnotations. 197 rpc BatchImportEvaluatedAnnotations(BatchImportEvaluatedAnnotationsRequest) 198 returns (BatchImportEvaluatedAnnotationsResponse) { 199 option (google.api.http) = { 200 post: "/v1/{parent=projects/*/locations/*/models/*/evaluations/*/slices/*}:batchImport" 201 body: "*" 202 }; 203 option (google.api.method_signature) = "parent,evaluated_annotations"; 204 } 205 206 // Gets a ModelEvaluation. 207 rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) { 208 option (google.api.http) = { 209 get: "/v1/{name=projects/*/locations/*/models/*/evaluations/*}" 210 }; 211 option (google.api.method_signature) = "name"; 212 } 213 214 // Lists ModelEvaluations in a Model. 215 rpc ListModelEvaluations(ListModelEvaluationsRequest) 216 returns (ListModelEvaluationsResponse) { 217 option (google.api.http) = { 218 get: "/v1/{parent=projects/*/locations/*/models/*}/evaluations" 219 }; 220 option (google.api.method_signature) = "parent"; 221 } 222 223 // Gets a ModelEvaluationSlice. 224 rpc GetModelEvaluationSlice(GetModelEvaluationSliceRequest) 225 returns (ModelEvaluationSlice) { 226 option (google.api.http) = { 227 get: "/v1/{name=projects/*/locations/*/models/*/evaluations/*/slices/*}" 228 }; 229 option (google.api.method_signature) = "name"; 230 } 231 232 // Lists ModelEvaluationSlices in a ModelEvaluation. 233 rpc ListModelEvaluationSlices(ListModelEvaluationSlicesRequest) 234 returns (ListModelEvaluationSlicesResponse) { 235 option (google.api.http) = { 236 get: "/v1/{parent=projects/*/locations/*/models/*/evaluations/*}/slices" 237 }; 238 option (google.api.method_signature) = "parent"; 239 } 240} 241 242// Request message for 243// [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel]. 244message UploadModelRequest { 245 // Required. The resource name of the Location into which to upload the Model. 246 // Format: `projects/{project}/locations/{location}` 247 string parent = 1 [ 248 (google.api.field_behavior) = REQUIRED, 249 (google.api.resource_reference) = { 250 type: "locations.googleapis.com/Location" 251 } 252 ]; 253 254 // Optional. The resource name of the model into which to upload the version. 255 // Only specify this field when uploading a new version. 256 string parent_model = 4 [(google.api.field_behavior) = OPTIONAL]; 257 258 // Optional. The ID to use for the uploaded Model, which will become the final 259 // component of the model resource name. 260 // 261 // This value may be up to 63 characters, and valid characters are 262 // `[a-z0-9_-]`. The first character cannot be a number or hyphen. 263 string model_id = 5 [(google.api.field_behavior) = OPTIONAL]; 264 265 // Required. The Model to create. 266 Model model = 2 [(google.api.field_behavior) = REQUIRED]; 267 268 // Optional. The user-provided custom service account to use to do the model 269 // upload. If empty, [Vertex AI Service 270 // Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) 271 // will be used. Users uploading the Model must have the 272 // `iam.serviceAccounts.actAs` permission on this service account. Also, this 273 // account must belong to the project specified in the `parent` field and have 274 // all necessary read permissions. 275 string service_account = 6 [(google.api.field_behavior) = OPTIONAL]; 276} 277 278// Details of 279// [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel] 280// operation. 281message UploadModelOperationMetadata { 282 // The common part of the operation metadata. 283 GenericOperationMetadata generic_metadata = 1; 284} 285 286// Response message of 287// [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel] 288// operation. 289message UploadModelResponse { 290 // The name of the uploaded Model resource. 291 // Format: `projects/{project}/locations/{location}/models/{model}` 292 string model = 1 [(google.api.resource_reference) = { 293 type: "aiplatform.googleapis.com/Model" 294 }]; 295 296 // Output only. The version ID of the model that is uploaded. 297 string model_version_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 298} 299 300// Request message for 301// [ModelService.GetModel][google.cloud.aiplatform.v1.ModelService.GetModel]. 302message GetModelRequest { 303 // Required. The name of the Model resource. 304 // Format: `projects/{project}/locations/{location}/models/{model}` 305 // 306 // In order to retrieve a specific version of the model, also provide 307 // the version ID or version alias. 308 // Example: `projects/{project}/locations/{location}/models/{model}@2` 309 // or 310 // `projects/{project}/locations/{location}/models/{model}@golden` 311 // If no version ID or alias is specified, the "default" version will be 312 // returned. The "default" version alias is created for the first version of 313 // the model, and can be moved to other versions later on. There will be 314 // exactly one default version. 315 string name = 1 [ 316 (google.api.field_behavior) = REQUIRED, 317 (google.api.resource_reference) = { 318 type: "aiplatform.googleapis.com/Model" 319 } 320 ]; 321} 322 323// Request message for 324// [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels]. 325message ListModelsRequest { 326 // Required. The resource name of the Location to list the Models from. 327 // Format: `projects/{project}/locations/{location}` 328 string parent = 1 [ 329 (google.api.field_behavior) = REQUIRED, 330 (google.api.resource_reference) = { 331 type: "locations.googleapis.com/Location" 332 } 333 ]; 334 335 // An expression for filtering the results of the request. For field names 336 // both snake_case and camelCase are supported. 337 // 338 // * `model` supports = and !=. `model` represents the Model ID, 339 // i.e. the last segment of the Model's [resource 340 // name][google.cloud.aiplatform.v1.Model.name]. 341 // * `display_name` supports = and != 342 // * `labels` supports general map functions that is: 343 // * `labels.key=value` - key:value equality 344 // * `labels.key:* or labels:key - key existence 345 // * A key including a space must be quoted. `labels."a key"`. 346 // 347 // Some examples: 348 // 349 // * `model=1234` 350 // * `displayName="myDisplayName"` 351 // * `labels.myKey="myValue"` 352 string filter = 2; 353 354 // The standard list page size. 355 int32 page_size = 3; 356 357 // The standard list page token. 358 // Typically obtained via 359 // [ListModelsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelsResponse.next_page_token] 360 // of the previous 361 // [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels] 362 // call. 363 string page_token = 4; 364 365 // Mask specifying which fields to read. 366 google.protobuf.FieldMask read_mask = 5; 367 368 // A comma-separated list of fields to order by, sorted in ascending order. 369 // Use "desc" after a field name for descending. 370 // Supported fields: 371 // 372 // * `display_name` 373 // * `create_time` 374 // * `update_time` 375 // 376 // Example: `display_name, create_time desc`. 377 string order_by = 6; 378} 379 380// Response message for 381// [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels] 382message ListModelsResponse { 383 // List of Models in the requested page. 384 repeated Model models = 1; 385 386 // A token to retrieve next page of results. 387 // Pass to 388 // [ListModelsRequest.page_token][google.cloud.aiplatform.v1.ListModelsRequest.page_token] 389 // to obtain that page. 390 string next_page_token = 2; 391} 392 393// Request message for 394// [ModelService.ListModelVersions][google.cloud.aiplatform.v1.ModelService.ListModelVersions]. 395message ListModelVersionsRequest { 396 // Required. The name of the model to list versions for. 397 string name = 1 [ 398 (google.api.field_behavior) = REQUIRED, 399 (google.api.resource_reference) = { 400 type: "aiplatform.googleapis.com/Model" 401 } 402 ]; 403 404 // The standard list page size. 405 int32 page_size = 2; 406 407 // The standard list page token. 408 // Typically obtained via 409 // [next_page_token][google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token] 410 // of the previous 411 // [ListModelVersions][google.cloud.aiplatform.v1.ModelService.ListModelVersions] 412 // call. 413 string page_token = 3; 414 415 // An expression for filtering the results of the request. For field names 416 // both snake_case and camelCase are supported. 417 // 418 // * `labels` supports general map functions that is: 419 // * `labels.key=value` - key:value equality 420 // * `labels.key:* or labels:key - key existence 421 // * A key including a space must be quoted. `labels."a key"`. 422 // 423 // Some examples: 424 // 425 // * `labels.myKey="myValue"` 426 string filter = 4; 427 428 // Mask specifying which fields to read. 429 google.protobuf.FieldMask read_mask = 5; 430 431 // A comma-separated list of fields to order by, sorted in ascending order. 432 // Use "desc" after a field name for descending. 433 // Supported fields: 434 // 435 // * `create_time` 436 // * `update_time` 437 // 438 // Example: `update_time asc, create_time desc`. 439 string order_by = 6; 440} 441 442// Response message for 443// [ModelService.ListModelVersions][google.cloud.aiplatform.v1.ModelService.ListModelVersions] 444message ListModelVersionsResponse { 445 // List of Model versions in the requested page. 446 // In the returned Model name field, version ID instead of regvision tag will 447 // be included. 448 repeated Model models = 1; 449 450 // A token to retrieve the next page of results. 451 // Pass to 452 // [ListModelVersionsRequest.page_token][google.cloud.aiplatform.v1.ListModelVersionsRequest.page_token] 453 // to obtain that page. 454 string next_page_token = 2; 455} 456 457// Request message for 458// [ModelService.UpdateModel][google.cloud.aiplatform.v1.ModelService.UpdateModel]. 459message UpdateModelRequest { 460 // Required. The Model which replaces the resource on the server. 461 // When Model Versioning is enabled, the model.name will be used to determine 462 // whether to update the model or model version. 463 // 1. model.name with the @ value, e.g. models/123@1, refers to a version 464 // specific update. 465 // 2. model.name without the @ value, e.g. models/123, refers to a model 466 // update. 467 // 3. model.name with @-, e.g. models/123@-, refers to a model update. 468 // 4. Supported model fields: display_name, description; supported 469 // version-specific fields: version_description. Labels are supported in both 470 // scenarios. Both the model labels and the version labels are merged when a 471 // model is returned. When updating labels, if the request is for 472 // model-specific update, model label gets updated. Otherwise, version labels 473 // get updated. 474 // 5. A model name or model version name fields update mismatch will cause a 475 // precondition error. 476 // 6. One request cannot update both the model and the version fields. You 477 // must update them separately. 478 Model model = 1 [(google.api.field_behavior) = REQUIRED]; 479 480 // Required. The update mask applies to the resource. 481 // For the `FieldMask` definition, see 482 // [google.protobuf.FieldMask][google.protobuf.FieldMask]. 483 google.protobuf.FieldMask update_mask = 2 484 [(google.api.field_behavior) = REQUIRED]; 485} 486 487// Request message for 488// [ModelService.DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel]. 489message DeleteModelRequest { 490 // Required. The name of the Model resource to be deleted. 491 // Format: `projects/{project}/locations/{location}/models/{model}` 492 string name = 1 [ 493 (google.api.field_behavior) = REQUIRED, 494 (google.api.resource_reference) = { 495 type: "aiplatform.googleapis.com/Model" 496 } 497 ]; 498} 499 500// Request message for 501// [ModelService.DeleteModelVersion][google.cloud.aiplatform.v1.ModelService.DeleteModelVersion]. 502message DeleteModelVersionRequest { 503 // Required. The name of the model version to be deleted, with a version ID 504 // explicitly included. 505 // 506 // Example: `projects/{project}/locations/{location}/models/{model}@1234` 507 string name = 1 [ 508 (google.api.field_behavior) = REQUIRED, 509 (google.api.resource_reference) = { 510 type: "aiplatform.googleapis.com/Model" 511 } 512 ]; 513} 514 515// Request message for 516// [ModelService.MergeVersionAliases][google.cloud.aiplatform.v1.ModelService.MergeVersionAliases]. 517message MergeVersionAliasesRequest { 518 // Required. The name of the model version to merge aliases, with a version ID 519 // explicitly included. 520 // 521 // Example: `projects/{project}/locations/{location}/models/{model}@1234` 522 string name = 1 [ 523 (google.api.field_behavior) = REQUIRED, 524 (google.api.resource_reference) = { 525 type: "aiplatform.googleapis.com/Model" 526 } 527 ]; 528 529 // Required. The set of version aliases to merge. 530 // The alias should be at most 128 characters, and match 531 // `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`. 532 // Add the `-` prefix to an alias means removing that alias from the version. 533 // `-` is NOT counted in the 128 characters. Example: `-golden` means removing 534 // the `golden` alias from the version. 535 // 536 // There is NO ordering in aliases, which means 537 // 1) The aliases returned from GetModel API might not have the exactly same 538 // order from this MergeVersionAliases API. 2) Adding and deleting the same 539 // alias in the request is not recommended, and the 2 operations will be 540 // cancelled out. 541 repeated string version_aliases = 2 [(google.api.field_behavior) = REQUIRED]; 542} 543 544// Request message for 545// [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel]. 546message ExportModelRequest { 547 // Output configuration for the Model export. 548 message OutputConfig { 549 // The ID of the format in which the Model must be exported. Each Model 550 // lists the [export formats it 551 // supports][google.cloud.aiplatform.v1.Model.supported_export_formats]. If 552 // no value is provided here, then the first from the list of the Model's 553 // supported formats is used by default. 554 string export_format_id = 1; 555 556 // The Cloud Storage location where the Model artifact is to be 557 // written to. Under the directory given as the destination a new one with 558 // name "`model-export-<model-display-name>-<timestamp-of-export-call>`", 559 // where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, 560 // will be created. Inside, the Model and any of its supporting files 561 // will be written. 562 // This field should only be set when the `exportableContent` field of the 563 // [Model.supported_export_formats] object contains `ARTIFACT`. 564 GcsDestination artifact_destination = 3; 565 566 // The Google Container Registry or Artifact Registry uri where the 567 // Model container image will be copied to. 568 // This field should only be set when the `exportableContent` field of the 569 // [Model.supported_export_formats] object contains `IMAGE`. 570 ContainerRegistryDestination image_destination = 4; 571 } 572 573 // Required. The resource name of the Model to export. 574 // The resource name may contain version id or version alias to specify the 575 // version, if no version is specified, the default version will be exported. 576 string name = 1 [ 577 (google.api.field_behavior) = REQUIRED, 578 (google.api.resource_reference) = { 579 type: "aiplatform.googleapis.com/Model" 580 } 581 ]; 582 583 // Required. The desired output location and configuration. 584 OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; 585} 586 587// Details of 588// [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel] 589// operation. 590message ExportModelOperationMetadata { 591 // Further describes the output of the ExportModel. Supplements 592 // [ExportModelRequest.OutputConfig][google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig]. 593 message OutputInfo { 594 // Output only. If the Model artifact is being exported to Google Cloud 595 // Storage this is the full path of the directory created, into which the 596 // Model files are being written to. 597 string artifact_output_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 598 599 // Output only. If the Model image is being exported to Google Container 600 // Registry or Artifact Registry this is the full path of the image created. 601 string image_output_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 602 } 603 604 // The common part of the operation metadata. 605 GenericOperationMetadata generic_metadata = 1; 606 607 // Output only. Information further describing the output of this Model 608 // export. 609 OutputInfo output_info = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 610} 611 612// Response message of 613// [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel] 614// operation. 615message ExportModelResponse {} 616 617// Request message for 618// [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel]. 619message CopyModelRequest { 620 // If both fields are unset, a new Model will be created with a generated ID. 621 oneof destination_model { 622 // Optional. Copy source_model into a new Model with this ID. The ID will 623 // become the final component of the model resource name. 624 // 625 // This value may be up to 63 characters, and valid characters are 626 // `[a-z0-9_-]`. The first character cannot be a number or hyphen. 627 string model_id = 4 [(google.api.field_behavior) = OPTIONAL]; 628 629 // Optional. Specify this field to copy source_model into this existing 630 // Model as a new version. Format: 631 // `projects/{project}/locations/{location}/models/{model}` 632 string parent_model = 5 [ 633 (google.api.field_behavior) = OPTIONAL, 634 (google.api.resource_reference) = { 635 type: "aiplatform.googleapis.com/Model" 636 } 637 ]; 638 } 639 640 // Required. The resource name of the Location into which to copy the Model. 641 // Format: `projects/{project}/locations/{location}` 642 string parent = 1 [ 643 (google.api.field_behavior) = REQUIRED, 644 (google.api.resource_reference) = { 645 type: "locations.googleapis.com/Location" 646 } 647 ]; 648 649 // Required. The resource name of the Model to copy. That Model must be in the 650 // same Project. Format: 651 // `projects/{project}/locations/{location}/models/{model}` 652 string source_model = 2 [ 653 (google.api.field_behavior) = REQUIRED, 654 (google.api.resource_reference) = { 655 type: "aiplatform.googleapis.com/Model" 656 } 657 ]; 658 659 // Customer-managed encryption key options. If this is set, 660 // then the Model copy will be encrypted with the provided encryption key. 661 EncryptionSpec encryption_spec = 3; 662} 663 664// Details of 665// [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel] 666// operation. 667message CopyModelOperationMetadata { 668 // The common part of the operation metadata. 669 GenericOperationMetadata generic_metadata = 1; 670} 671 672// Response message of 673// [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel] 674// operation. 675message CopyModelResponse { 676 // The name of the copied Model resource. 677 // Format: `projects/{project}/locations/{location}/models/{model}` 678 string model = 1 [(google.api.resource_reference) = { 679 type: "aiplatform.googleapis.com/Model" 680 }]; 681 682 // Output only. The version ID of the model that is copied. 683 string model_version_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 684} 685 686// Request message for 687// [ModelService.ImportModelEvaluation][google.cloud.aiplatform.v1.ModelService.ImportModelEvaluation] 688message ImportModelEvaluationRequest { 689 // Required. The name of the parent model resource. 690 // Format: `projects/{project}/locations/{location}/models/{model}` 691 string parent = 1 [ 692 (google.api.field_behavior) = REQUIRED, 693 (google.api.resource_reference) = { 694 type: "aiplatform.googleapis.com/Model" 695 } 696 ]; 697 698 // Required. Model evaluation resource to be imported. 699 ModelEvaluation model_evaluation = 2 [(google.api.field_behavior) = REQUIRED]; 700} 701 702// Request message for 703// [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices] 704message BatchImportModelEvaluationSlicesRequest { 705 // Required. The name of the parent ModelEvaluation resource. 706 // Format: 707 // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` 708 string parent = 1 [ 709 (google.api.field_behavior) = REQUIRED, 710 (google.api.resource_reference) = { 711 type: "aiplatform.googleapis.com/ModelEvaluation" 712 } 713 ]; 714 715 // Required. Model evaluation slice resource to be imported. 716 repeated ModelEvaluationSlice model_evaluation_slices = 2 717 [(google.api.field_behavior) = REQUIRED]; 718} 719 720// Response message for 721// [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices] 722message BatchImportModelEvaluationSlicesResponse { 723 // Output only. List of imported 724 // [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name]. 725 repeated string imported_model_evaluation_slices = 1 726 [(google.api.field_behavior) = OUTPUT_ONLY]; 727} 728 729// Request message for 730// [ModelService.BatchImportEvaluatedAnnotations][google.cloud.aiplatform.v1.ModelService.BatchImportEvaluatedAnnotations] 731message BatchImportEvaluatedAnnotationsRequest { 732 // Required. The name of the parent ModelEvaluationSlice resource. 733 // Format: 734 // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` 735 string parent = 1 [ 736 (google.api.field_behavior) = REQUIRED, 737 (google.api.resource_reference) = { 738 type: "aiplatform.googleapis.com/ModelEvaluationSlice" 739 } 740 ]; 741 742 // Required. Evaluated annotations resource to be imported. 743 repeated EvaluatedAnnotation evaluated_annotations = 2 744 [(google.api.field_behavior) = REQUIRED]; 745} 746 747// Response message for 748// [ModelService.BatchImportEvaluatedAnnotations][google.cloud.aiplatform.v1.ModelService.BatchImportEvaluatedAnnotations] 749message BatchImportEvaluatedAnnotationsResponse { 750 // Output only. Number of EvaluatedAnnotations imported. 751 int32 imported_evaluated_annotations_count = 1 752 [(google.api.field_behavior) = OUTPUT_ONLY]; 753} 754 755// Request message for 756// [ModelService.GetModelEvaluation][google.cloud.aiplatform.v1.ModelService.GetModelEvaluation]. 757message GetModelEvaluationRequest { 758 // Required. The name of the ModelEvaluation resource. 759 // Format: 760 // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` 761 string name = 1 [ 762 (google.api.field_behavior) = REQUIRED, 763 (google.api.resource_reference) = { 764 type: "aiplatform.googleapis.com/ModelEvaluation" 765 } 766 ]; 767} 768 769// Request message for 770// [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations]. 771message ListModelEvaluationsRequest { 772 // Required. The resource name of the Model to list the ModelEvaluations from. 773 // Format: `projects/{project}/locations/{location}/models/{model}` 774 string parent = 1 [ 775 (google.api.field_behavior) = REQUIRED, 776 (google.api.resource_reference) = { 777 type: "aiplatform.googleapis.com/Model" 778 } 779 ]; 780 781 // The standard list filter. 782 string filter = 2; 783 784 // The standard list page size. 785 int32 page_size = 3; 786 787 // The standard list page token. 788 // Typically obtained via 789 // [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token] 790 // of the previous 791 // [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations] 792 // call. 793 string page_token = 4; 794 795 // Mask specifying which fields to read. 796 google.protobuf.FieldMask read_mask = 5; 797} 798 799// Response message for 800// [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations]. 801message ListModelEvaluationsResponse { 802 // List of ModelEvaluations in the requested page. 803 repeated ModelEvaluation model_evaluations = 1; 804 805 // A token to retrieve next page of results. 806 // Pass to 807 // [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token] 808 // to obtain that page. 809 string next_page_token = 2; 810} 811 812// Request message for 813// [ModelService.GetModelEvaluationSlice][google.cloud.aiplatform.v1.ModelService.GetModelEvaluationSlice]. 814message GetModelEvaluationSliceRequest { 815 // Required. The name of the ModelEvaluationSlice resource. 816 // Format: 817 // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` 818 string name = 1 [ 819 (google.api.field_behavior) = REQUIRED, 820 (google.api.resource_reference) = { 821 type: "aiplatform.googleapis.com/ModelEvaluationSlice" 822 } 823 ]; 824} 825 826// Request message for 827// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices]. 828message ListModelEvaluationSlicesRequest { 829 // Required. The resource name of the ModelEvaluation to list the 830 // ModelEvaluationSlices from. Format: 831 // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` 832 string parent = 1 [ 833 (google.api.field_behavior) = REQUIRED, 834 (google.api.resource_reference) = { 835 type: "aiplatform.googleapis.com/ModelEvaluation" 836 } 837 ]; 838 839 // The standard list filter. 840 // 841 // * `slice.dimension` - for =. 842 string filter = 2; 843 844 // The standard list page size. 845 int32 page_size = 3; 846 847 // The standard list page token. 848 // Typically obtained via 849 // [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token] 850 // of the previous 851 // [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] 852 // call. 853 string page_token = 4; 854 855 // Mask specifying which fields to read. 856 google.protobuf.FieldMask read_mask = 5; 857} 858 859// Response message for 860// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices]. 861message ListModelEvaluationSlicesResponse { 862 // List of ModelEvaluations in the requested page. 863 repeated ModelEvaluationSlice model_evaluation_slices = 1; 864 865 // A token to retrieve next page of results. 866 // Pass to 867 // [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token] 868 // to obtain that page. 869 string next_page_token = 2; 870} 871