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/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/protobuf/timestamp.proto"; 22 23option csharp_namespace = "Google.Cloud.AIPlatform.V1"; 24option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; 25option java_multiple_files = true; 26option java_outer_classname = "MigratableResourceProto"; 27option java_package = "com.google.cloud.aiplatform.v1"; 28option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; 29option ruby_package = "Google::Cloud::AIPlatform::V1"; 30option (google.api.resource_definition) = { 31 type: "ml.googleapis.com/Version" 32 pattern: "projects/{project}/models/{model}/versions/{version}" 33}; 34option (google.api.resource_definition) = { 35 type: "automl.googleapis.com/Model" 36 pattern: "projects/{project}/locations/{location}/models/{model}" 37}; 38option (google.api.resource_definition) = { 39 type: "automl.googleapis.com/Dataset" 40 pattern: "projects/{project}/locations/{location}/datasets/{dataset}" 41}; 42option (google.api.resource_definition) = { 43 type: "datalabeling.googleapis.com/Dataset" 44 pattern: "projects/{project}/datasets/{dataset}" 45}; 46option (google.api.resource_definition) = { 47 type: "datalabeling.googleapis.com/AnnotatedDataset" 48 pattern: "projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}" 49}; 50 51// Represents one resource that exists in automl.googleapis.com, 52// datalabeling.googleapis.com or ml.googleapis.com. 53message MigratableResource { 54 // Represents one model Version in ml.googleapis.com. 55 message MlEngineModelVersion { 56 // The ml.googleapis.com endpoint that this model Version currently lives 57 // in. 58 // Example values: 59 // 60 // * ml.googleapis.com 61 // * us-centrall-ml.googleapis.com 62 // * europe-west4-ml.googleapis.com 63 // * asia-east1-ml.googleapis.com 64 string endpoint = 1; 65 66 // Full resource name of ml engine model Version. 67 // Format: `projects/{project}/models/{model}/versions/{version}`. 68 string version = 2 [ 69 (google.api.resource_reference) = { type: "ml.googleapis.com/Version" } 70 ]; 71 } 72 73 // Represents one Model in automl.googleapis.com. 74 message AutomlModel { 75 // Full resource name of automl Model. 76 // Format: 77 // `projects/{project}/locations/{location}/models/{model}`. 78 string model = 1 [ 79 (google.api.resource_reference) = { type: "automl.googleapis.com/Model" } 80 ]; 81 82 // The Model's display name in automl.googleapis.com. 83 string model_display_name = 3; 84 } 85 86 // Represents one Dataset in automl.googleapis.com. 87 message AutomlDataset { 88 // Full resource name of automl Dataset. 89 // Format: 90 // `projects/{project}/locations/{location}/datasets/{dataset}`. 91 string dataset = 1 [(google.api.resource_reference) = { 92 type: "automl.googleapis.com/Dataset" 93 }]; 94 95 // The Dataset's display name in automl.googleapis.com. 96 string dataset_display_name = 4; 97 } 98 99 // Represents one Dataset in datalabeling.googleapis.com. 100 message DataLabelingDataset { 101 // Represents one AnnotatedDataset in datalabeling.googleapis.com. 102 message DataLabelingAnnotatedDataset { 103 // Full resource name of data labeling AnnotatedDataset. 104 // Format: 105 // `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`. 106 string annotated_dataset = 1 [(google.api.resource_reference) = { 107 type: "datalabeling.googleapis.com/AnnotatedDataset" 108 }]; 109 110 // The AnnotatedDataset's display name in datalabeling.googleapis.com. 111 string annotated_dataset_display_name = 3; 112 } 113 114 // Full resource name of data labeling Dataset. 115 // Format: 116 // `projects/{project}/datasets/{dataset}`. 117 string dataset = 1 [(google.api.resource_reference) = { 118 type: "datalabeling.googleapis.com/Dataset" 119 }]; 120 121 // The Dataset's display name in datalabeling.googleapis.com. 122 string dataset_display_name = 4; 123 124 // The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to 125 // the data labeling Dataset. 126 repeated DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; 127 } 128 129 oneof resource { 130 // Output only. Represents one Version in ml.googleapis.com. 131 MlEngineModelVersion ml_engine_model_version = 1 132 [(google.api.field_behavior) = OUTPUT_ONLY]; 133 134 // Output only. Represents one Model in automl.googleapis.com. 135 AutomlModel automl_model = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 136 137 // Output only. Represents one Dataset in automl.googleapis.com. 138 AutomlDataset automl_dataset = 3 139 [(google.api.field_behavior) = OUTPUT_ONLY]; 140 141 // Output only. Represents one Dataset in datalabeling.googleapis.com. 142 DataLabelingDataset data_labeling_dataset = 4 143 [(google.api.field_behavior) = OUTPUT_ONLY]; 144 } 145 146 // Output only. Timestamp when the last migration attempt on this 147 // MigratableResource started. Will not be set if there's no migration attempt 148 // on this MigratableResource. 149 google.protobuf.Timestamp last_migrate_time = 5 150 [(google.api.field_behavior) = OUTPUT_ONLY]; 151 152 // Output only. Timestamp when this MigratableResource was last updated. 153 google.protobuf.Timestamp last_update_time = 6 154 [(google.api.field_behavior) = OUTPUT_ONLY]; 155} 156