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