• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/explanation.proto";
26import "google/cloud/aiplatform/v1/io.proto";
27import "google/cloud/aiplatform/v1/model.proto";
28import "google/cloud/aiplatform/v1/model_evaluation.proto";
29import "google/cloud/aiplatform/v1/model_evaluation_slice.proto";
30import "google/cloud/aiplatform/v1/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.V1";
36option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb";
37option java_multiple_files = true;
38option java_outer_classname = "ModelServiceProto";
39option java_package = "com.google.cloud.aiplatform.v1";
40option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
41option ruby_package = "Google::Cloud::AIPlatform::V1";
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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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.v1.Endpoint] resource has a
114  // [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] based on the
115  // model in its
116  // [deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
117  // field.
118  rpc DeleteModel(DeleteModelRequest) returns (google.longrunning.Operation) {
119    option (google.api.http) = {
120      delete: "/v1/{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.v1.DeployedModel] created from it.
133  // Deleting the only version in the Model is not allowed. Use
134  // [DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel] for
135  // deleting the Model instead.
136  rpc DeleteModelVersion(DeleteModelVersionRequest)
137      returns (google.longrunning.Operation) {
138    option (google.api.http) = {
139      delete: "/v1/{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: "/v1/{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.v1.Model.supported_export_formats].
161  rpc ExportModel(ExportModelRequest) returns (google.longrunning.Operation) {
162    option (google.api.http) = {
163      post: "/v1/{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.v1.Model.metadata] content to be
177  // region-agnostic, as well as making sure that any resources (e.g. files) it
178  // depends on remain accessible.
179  rpc CopyModel(CopyModelRequest) returns (google.longrunning.Operation) {
180    option (google.api.http) = {
181      post: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.ListModelsResponse.next_page_token]
377  // of the previous
378  // [ModelService.ListModels][google.cloud.aiplatform.v1.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  // A comma-separated list of fields to order by, sorted in ascending order.
386  // Use "desc" after a field name for descending.
387  // Supported fields:
388  //
389  //   * `display_name`
390  //   * `create_time`
391  //   * `update_time`
392  //
393  // Example: `display_name, create_time desc`.
394  string order_by = 6;
395}
396
397// Response message for
398// [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels]
399message ListModelsResponse {
400  // List of Models in the requested page.
401  repeated Model models = 1;
402
403  // A token to retrieve next page of results.
404  // Pass to
405  // [ListModelsRequest.page_token][google.cloud.aiplatform.v1.ListModelsRequest.page_token]
406  // to obtain that page.
407  string next_page_token = 2;
408}
409
410// Request message for
411// [ModelService.ListModelVersions][google.cloud.aiplatform.v1.ModelService.ListModelVersions].
412message ListModelVersionsRequest {
413  // Required. The name of the model to list versions for.
414  string name = 1 [
415    (google.api.field_behavior) = REQUIRED,
416    (google.api.resource_reference) = {
417      type: "aiplatform.googleapis.com/Model"
418    }
419  ];
420
421  // The standard list page size.
422  int32 page_size = 2;
423
424  // The standard list page token.
425  // Typically obtained via
426  // [next_page_token][google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token]
427  // of the previous
428  // [ListModelVersions][google.cloud.aiplatform.v1.ModelService.ListModelVersions]
429  // call.
430  string page_token = 3;
431
432  // An expression for filtering the results of the request. For field names
433  // both snake_case and camelCase are supported.
434  //
435  //   * `labels` supports general map functions that is:
436  //     * `labels.key=value` - key:value equality
437  //     * `labels.key:* or labels:key - key existence
438  //     * A key including a space must be quoted. `labels."a key"`.
439  //
440  // Some examples:
441  //
442  //   * `labels.myKey="myValue"`
443  string filter = 4;
444
445  // Mask specifying which fields to read.
446  google.protobuf.FieldMask read_mask = 5;
447
448  // A comma-separated list of fields to order by, sorted in ascending order.
449  // Use "desc" after a field name for descending.
450  // Supported fields:
451  //
452  //   * `create_time`
453  //   * `update_time`
454  //
455  // Example: `update_time asc, create_time desc`.
456  string order_by = 6;
457}
458
459// Response message for
460// [ModelService.ListModelVersions][google.cloud.aiplatform.v1.ModelService.ListModelVersions]
461message ListModelVersionsResponse {
462  // List of Model versions in the requested page.
463  // In the returned Model name field, version ID instead of regvision tag will
464  // be included.
465  repeated Model models = 1;
466
467  // A token to retrieve the next page of results.
468  // Pass to
469  // [ListModelVersionsRequest.page_token][google.cloud.aiplatform.v1.ListModelVersionsRequest.page_token]
470  // to obtain that page.
471  string next_page_token = 2;
472}
473
474// Request message for
475// [ModelService.UpdateModel][google.cloud.aiplatform.v1.ModelService.UpdateModel].
476message UpdateModelRequest {
477  // Required. The Model which replaces the resource on the server.
478  // When Model Versioning is enabled, the model.name will be used to determine
479  // whether to update the model or model version.
480  // 1. model.name with the @ value, e.g. models/123@1, refers to a version
481  // specific update.
482  // 2. model.name without the @ value, e.g. models/123, refers to a model
483  // update.
484  // 3. model.name with @-, e.g. models/123@-, refers to a model update.
485  // 4. Supported model fields: display_name, description; supported
486  // version-specific fields: version_description. Labels are supported in both
487  // scenarios. Both the model labels and the version labels are merged when a
488  // model is returned. When updating labels, if the request is for
489  // model-specific update, model label gets updated. Otherwise, version labels
490  // get updated.
491  // 5. A model name or model version name fields update mismatch will cause a
492  // precondition error.
493  // 6. One request cannot update both the model and the version fields. You
494  // must update them separately.
495  Model model = 1 [(google.api.field_behavior) = REQUIRED];
496
497  // Required. The update mask applies to the resource.
498  // For the `FieldMask` definition, see
499  // [google.protobuf.FieldMask][google.protobuf.FieldMask].
500  google.protobuf.FieldMask update_mask = 2
501      [(google.api.field_behavior) = REQUIRED];
502}
503
504// Request message for
505// [ModelService.UpdateExplanationDataset][google.cloud.aiplatform.v1.ModelService.UpdateExplanationDataset].
506message UpdateExplanationDatasetRequest {
507  // Required. The resource name of the Model to update.
508  // Format: `projects/{project}/locations/{location}/models/{model}`
509  string model = 1 [
510    (google.api.field_behavior) = REQUIRED,
511    (google.api.resource_reference) = {
512      type: "aiplatform.googleapis.com/Model"
513    }
514  ];
515
516  // The example config containing the location of the dataset.
517  Examples examples = 2;
518}
519
520// Runtime operation information for
521// [ModelService.UpdateExplanationDataset][google.cloud.aiplatform.v1.ModelService.UpdateExplanationDataset].
522message UpdateExplanationDatasetOperationMetadata {
523  // The common part of the operation metadata.
524  GenericOperationMetadata generic_metadata = 1;
525}
526
527// Request message for
528// [ModelService.DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel].
529message DeleteModelRequest {
530  // Required. The name of the Model resource to be deleted.
531  // Format: `projects/{project}/locations/{location}/models/{model}`
532  string name = 1 [
533    (google.api.field_behavior) = REQUIRED,
534    (google.api.resource_reference) = {
535      type: "aiplatform.googleapis.com/Model"
536    }
537  ];
538}
539
540// Request message for
541// [ModelService.DeleteModelVersion][google.cloud.aiplatform.v1.ModelService.DeleteModelVersion].
542message DeleteModelVersionRequest {
543  // Required. The name of the model version to be deleted, with a version ID
544  // explicitly included.
545  //
546  // Example: `projects/{project}/locations/{location}/models/{model}@1234`
547  string name = 1 [
548    (google.api.field_behavior) = REQUIRED,
549    (google.api.resource_reference) = {
550      type: "aiplatform.googleapis.com/Model"
551    }
552  ];
553}
554
555// Request message for
556// [ModelService.MergeVersionAliases][google.cloud.aiplatform.v1.ModelService.MergeVersionAliases].
557message MergeVersionAliasesRequest {
558  // Required. The name of the model version to merge aliases, with a version ID
559  // explicitly included.
560  //
561  // Example: `projects/{project}/locations/{location}/models/{model}@1234`
562  string name = 1 [
563    (google.api.field_behavior) = REQUIRED,
564    (google.api.resource_reference) = {
565      type: "aiplatform.googleapis.com/Model"
566    }
567  ];
568
569  // Required. The set of version aliases to merge.
570  // The alias should be at most 128 characters, and match
571  // `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
572  // Add the `-` prefix to an alias means removing that alias from the version.
573  // `-` is NOT counted in the 128 characters. Example: `-golden` means removing
574  // the `golden` alias from the version.
575  //
576  // There is NO ordering in aliases, which means
577  // 1) The aliases returned from GetModel API might not have the exactly same
578  // order from this MergeVersionAliases API. 2) Adding and deleting the same
579  // alias in the request is not recommended, and the 2 operations will be
580  // cancelled out.
581  repeated string version_aliases = 2 [(google.api.field_behavior) = REQUIRED];
582}
583
584// Request message for
585// [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel].
586message ExportModelRequest {
587  // Output configuration for the Model export.
588  message OutputConfig {
589    // The ID of the format in which the Model must be exported. Each Model
590    // lists the [export formats it
591    // supports][google.cloud.aiplatform.v1.Model.supported_export_formats]. If
592    // no value is provided here, then the first from the list of the Model's
593    // supported formats is used by default.
594    string export_format_id = 1;
595
596    // The Cloud Storage location where the Model artifact is to be
597    // written to. Under the directory given as the destination a new one with
598    // name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
599    // where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
600    // will be created. Inside, the Model and any of its supporting files
601    // will be written.
602    // This field should only be set when the `exportableContent` field of the
603    // [Model.supported_export_formats] object contains `ARTIFACT`.
604    GcsDestination artifact_destination = 3;
605
606    // The Google Container Registry or Artifact Registry uri where the
607    // Model container image will be copied to.
608    // This field should only be set when the `exportableContent` field of the
609    // [Model.supported_export_formats] object contains `IMAGE`.
610    ContainerRegistryDestination image_destination = 4;
611  }
612
613  // Required. The resource name of the Model to export.
614  // The resource name may contain version id or version alias to specify the
615  // version, if no version is specified, the default version will be exported.
616  string name = 1 [
617    (google.api.field_behavior) = REQUIRED,
618    (google.api.resource_reference) = {
619      type: "aiplatform.googleapis.com/Model"
620    }
621  ];
622
623  // Required. The desired output location and configuration.
624  OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED];
625}
626
627// Details of
628// [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel]
629// operation.
630message ExportModelOperationMetadata {
631  // Further describes the output of the ExportModel. Supplements
632  // [ExportModelRequest.OutputConfig][google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig].
633  message OutputInfo {
634    // Output only. If the Model artifact is being exported to Google Cloud
635    // Storage this is the full path of the directory created, into which the
636    // Model files are being written to.
637    string artifact_output_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
638
639    // Output only. If the Model image is being exported to Google Container
640    // Registry or Artifact Registry this is the full path of the image created.
641    string image_output_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
642  }
643
644  // The common part of the operation metadata.
645  GenericOperationMetadata generic_metadata = 1;
646
647  // Output only. Information further describing the output of this Model
648  // export.
649  OutputInfo output_info = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
650}
651
652// Response message of
653// [ModelService.UpdateExplanationDataset][google.cloud.aiplatform.v1.ModelService.UpdateExplanationDataset]
654// operation.
655message UpdateExplanationDatasetResponse {}
656
657// Response message of
658// [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel]
659// operation.
660message ExportModelResponse {}
661
662// Request message for
663// [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel].
664message CopyModelRequest {
665  // If both fields are unset, a new Model will be created with a generated ID.
666  oneof destination_model {
667    // Optional. Copy source_model into a new Model with this ID. The ID will
668    // become the final component of the model resource name.
669    //
670    // This value may be up to 63 characters, and valid characters are
671    // `[a-z0-9_-]`. The first character cannot be a number or hyphen.
672    string model_id = 4 [(google.api.field_behavior) = OPTIONAL];
673
674    // Optional. Specify this field to copy source_model into this existing
675    // Model as a new version. Format:
676    // `projects/{project}/locations/{location}/models/{model}`
677    string parent_model = 5 [
678      (google.api.field_behavior) = OPTIONAL,
679      (google.api.resource_reference) = {
680        type: "aiplatform.googleapis.com/Model"
681      }
682    ];
683  }
684
685  // Required. The resource name of the Location into which to copy the Model.
686  // Format: `projects/{project}/locations/{location}`
687  string parent = 1 [
688    (google.api.field_behavior) = REQUIRED,
689    (google.api.resource_reference) = {
690      type: "locations.googleapis.com/Location"
691    }
692  ];
693
694  // Required. The resource name of the Model to copy. That Model must be in the
695  // same Project. Format:
696  // `projects/{project}/locations/{location}/models/{model}`
697  string source_model = 2 [
698    (google.api.field_behavior) = REQUIRED,
699    (google.api.resource_reference) = {
700      type: "aiplatform.googleapis.com/Model"
701    }
702  ];
703
704  // Customer-managed encryption key options. If this is set,
705  // then the Model copy will be encrypted with the provided encryption key.
706  EncryptionSpec encryption_spec = 3;
707}
708
709// Details of
710// [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel]
711// operation.
712message CopyModelOperationMetadata {
713  // The common part of the operation metadata.
714  GenericOperationMetadata generic_metadata = 1;
715}
716
717// Response message of
718// [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel]
719// operation.
720message CopyModelResponse {
721  // The name of the copied Model resource.
722  // Format: `projects/{project}/locations/{location}/models/{model}`
723  string model = 1 [(google.api.resource_reference) = {
724    type: "aiplatform.googleapis.com/Model"
725  }];
726
727  // Output only. The version ID of the model that is copied.
728  string model_version_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
729}
730
731// Request message for
732// [ModelService.ImportModelEvaluation][google.cloud.aiplatform.v1.ModelService.ImportModelEvaluation]
733message ImportModelEvaluationRequest {
734  // Required. The name of the parent model resource.
735  // Format: `projects/{project}/locations/{location}/models/{model}`
736  string parent = 1 [
737    (google.api.field_behavior) = REQUIRED,
738    (google.api.resource_reference) = {
739      type: "aiplatform.googleapis.com/Model"
740    }
741  ];
742
743  // Required. Model evaluation resource to be imported.
744  ModelEvaluation model_evaluation = 2 [(google.api.field_behavior) = REQUIRED];
745}
746
747// Request message for
748// [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices]
749message BatchImportModelEvaluationSlicesRequest {
750  // Required. The name of the parent ModelEvaluation resource.
751  // Format:
752  // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
753  string parent = 1 [
754    (google.api.field_behavior) = REQUIRED,
755    (google.api.resource_reference) = {
756      type: "aiplatform.googleapis.com/ModelEvaluation"
757    }
758  ];
759
760  // Required. Model evaluation slice resource to be imported.
761  repeated ModelEvaluationSlice model_evaluation_slices = 2
762      [(google.api.field_behavior) = REQUIRED];
763}
764
765// Response message for
766// [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices]
767message BatchImportModelEvaluationSlicesResponse {
768  // Output only. List of imported
769  // [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
770  repeated string imported_model_evaluation_slices = 1
771      [(google.api.field_behavior) = OUTPUT_ONLY];
772}
773
774// Request message for
775// [ModelService.BatchImportEvaluatedAnnotations][google.cloud.aiplatform.v1.ModelService.BatchImportEvaluatedAnnotations]
776message BatchImportEvaluatedAnnotationsRequest {
777  // Required. The name of the parent ModelEvaluationSlice resource.
778  // Format:
779  // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
780  string parent = 1 [
781    (google.api.field_behavior) = REQUIRED,
782    (google.api.resource_reference) = {
783      type: "aiplatform.googleapis.com/ModelEvaluationSlice"
784    }
785  ];
786
787  // Required. Evaluated annotations resource to be imported.
788  repeated EvaluatedAnnotation evaluated_annotations = 2
789      [(google.api.field_behavior) = REQUIRED];
790}
791
792// Response message for
793// [ModelService.BatchImportEvaluatedAnnotations][google.cloud.aiplatform.v1.ModelService.BatchImportEvaluatedAnnotations]
794message BatchImportEvaluatedAnnotationsResponse {
795  // Output only. Number of EvaluatedAnnotations imported.
796  int32 imported_evaluated_annotations_count = 1
797      [(google.api.field_behavior) = OUTPUT_ONLY];
798}
799
800// Request message for
801// [ModelService.GetModelEvaluation][google.cloud.aiplatform.v1.ModelService.GetModelEvaluation].
802message GetModelEvaluationRequest {
803  // Required. The name of the ModelEvaluation resource.
804  // Format:
805  // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
806  string name = 1 [
807    (google.api.field_behavior) = REQUIRED,
808    (google.api.resource_reference) = {
809      type: "aiplatform.googleapis.com/ModelEvaluation"
810    }
811  ];
812}
813
814// Request message for
815// [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations].
816message ListModelEvaluationsRequest {
817  // Required. The resource name of the Model to list the ModelEvaluations from.
818  // Format: `projects/{project}/locations/{location}/models/{model}`
819  string parent = 1 [
820    (google.api.field_behavior) = REQUIRED,
821    (google.api.resource_reference) = {
822      type: "aiplatform.googleapis.com/Model"
823    }
824  ];
825
826  // The standard list filter.
827  string filter = 2;
828
829  // The standard list page size.
830  int32 page_size = 3;
831
832  // The standard list page token.
833  // Typically obtained via
834  // [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token]
835  // of the previous
836  // [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations]
837  // call.
838  string page_token = 4;
839
840  // Mask specifying which fields to read.
841  google.protobuf.FieldMask read_mask = 5;
842}
843
844// Response message for
845// [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations].
846message ListModelEvaluationsResponse {
847  // List of ModelEvaluations in the requested page.
848  repeated ModelEvaluation model_evaluations = 1;
849
850  // A token to retrieve next page of results.
851  // Pass to
852  // [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token]
853  // to obtain that page.
854  string next_page_token = 2;
855}
856
857// Request message for
858// [ModelService.GetModelEvaluationSlice][google.cloud.aiplatform.v1.ModelService.GetModelEvaluationSlice].
859message GetModelEvaluationSliceRequest {
860  // Required. The name of the ModelEvaluationSlice resource.
861  // Format:
862  // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
863  string name = 1 [
864    (google.api.field_behavior) = REQUIRED,
865    (google.api.resource_reference) = {
866      type: "aiplatform.googleapis.com/ModelEvaluationSlice"
867    }
868  ];
869}
870
871// Request message for
872// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices].
873message ListModelEvaluationSlicesRequest {
874  // Required. The resource name of the ModelEvaluation to list the
875  // ModelEvaluationSlices from. Format:
876  // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
877  string parent = 1 [
878    (google.api.field_behavior) = REQUIRED,
879    (google.api.resource_reference) = {
880      type: "aiplatform.googleapis.com/ModelEvaluation"
881    }
882  ];
883
884  // The standard list filter.
885  //
886  //   * `slice.dimension` - for =.
887  string filter = 2;
888
889  // The standard list page size.
890  int32 page_size = 3;
891
892  // The standard list page token.
893  // Typically obtained via
894  // [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token]
895  // of the previous
896  // [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices]
897  // call.
898  string page_token = 4;
899
900  // Mask specifying which fields to read.
901  google.protobuf.FieldMask read_mask = 5;
902}
903
904// Response message for
905// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices].
906message ListModelEvaluationSlicesResponse {
907  // List of ModelEvaluations in the requested page.
908  repeated ModelEvaluationSlice model_evaluation_slices = 1;
909
910  // A token to retrieve next page of results.
911  // Pass to
912  // [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token]
913  // to obtain that page.
914  string next_page_token = 2;
915}
916