diff --git a/java-aiplatform/google-cloud-aiplatform-bom/pom.xml b/java-aiplatform/google-cloud-aiplatform-bom/pom.xml index 0e26232b4b89..46b0c52396dd 100644 --- a/java-aiplatform/google-cloud-aiplatform-bom/pom.xml +++ b/java-aiplatform/google-cloud-aiplatform-bom/pom.xml @@ -57,27 +57,27 @@ com.google.cloud google-cloud-aiplatform - 3.2.1-SNAPSHOT + 3.3.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-aiplatform-v1 - 3.2.1-SNAPSHOT + 3.3.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-aiplatform-v1beta1 - 0.18.1-SNAPSHOT + 0.19.1-SNAPSHOT com.google.api.grpc proto-google-cloud-aiplatform-v1 - 3.2.1-SNAPSHOT + 3.3.1-SNAPSHOT com.google.api.grpc proto-google-cloud-aiplatform-v1beta1 - 0.18.1-SNAPSHOT + 0.19.1-SNAPSHOT diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/ModelServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/ModelServiceClientTest.java index 4c83ae059b87..5fcc4a1273f9 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/ModelServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/ModelServiceClientTest.java @@ -241,6 +241,7 @@ public void getModelTest() throws Exception { .setEtag("etag3123477") .putAllLabels(new HashMap()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setModelSourceInfo(ModelSourceInfo.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -305,6 +306,7 @@ public void getModelTest2() throws Exception { .setEtag("etag3123477") .putAllLabels(new HashMap()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setModelSourceInfo(ModelSourceInfo.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -545,6 +547,7 @@ public void updateModelTest() throws Exception { .setEtag("etag3123477") .putAllLabels(new HashMap()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setModelSourceInfo(ModelSourceInfo.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -780,6 +783,7 @@ public void mergeVersionAliasesTest() throws Exception { .setEtag("etag3123477") .putAllLabels(new HashMap()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setModelSourceInfo(ModelSourceInfo.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -847,6 +851,7 @@ public void mergeVersionAliasesTest2() throws Exception { .setEtag("etag3123477") .putAllLabels(new HashMap()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setModelSourceInfo(ModelSourceInfo.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Model.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Model.java index 0f6de358c28e..80260707f15e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Model.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Model.java @@ -378,6 +378,22 @@ private Model( versionUpdateTime_ = subBuilder.buildPartial(); } + break; + } + case 306: + { + com.google.cloud.aiplatform.v1.ModelSourceInfo.Builder subBuilder = null; + if (modelSourceInfo_ != null) { + subBuilder = modelSourceInfo_.toBuilder(); + } + modelSourceInfo_ = + input.readMessage( + com.google.cloud.aiplatform.v1.ModelSourceInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(modelSourceInfo_); + modelSourceInfo_ = subBuilder.buildPartial(); + } + break; } default: @@ -4012,6 +4028,63 @@ public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecO return getEncryptionSpec(); } + public static final int MODEL_SOURCE_INFO_FIELD_NUMBER = 38; + private com.google.cloud.aiplatform.v1.ModelSourceInfo modelSourceInfo_; + /** + * + * + *
+   * Output only. Source of a model. It can either be automl training pipeline, custom
+   * training pipeline, BigQuery ML, or existing Vertex AI Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelSourceInfo model_source_info = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the modelSourceInfo field is set. + */ + @java.lang.Override + public boolean hasModelSourceInfo() { + return modelSourceInfo_ != null; + } + /** + * + * + *
+   * Output only. Source of a model. It can either be automl training pipeline, custom
+   * training pipeline, BigQuery ML, or existing Vertex AI Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelSourceInfo model_source_info = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The modelSourceInfo. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelSourceInfo getModelSourceInfo() { + return modelSourceInfo_ == null + ? com.google.cloud.aiplatform.v1.ModelSourceInfo.getDefaultInstance() + : modelSourceInfo_; + } + /** + * + * + *
+   * Output only. Source of a model. It can either be automl training pipeline, custom
+   * training pipeline, BigQuery ML, or existing Vertex AI Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelSourceInfo model_source_info = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelSourceInfoOrBuilder getModelSourceInfoOrBuilder() { + return getModelSourceInfo(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -4107,6 +4180,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (versionUpdateTime_ != null) { output.writeMessage(32, getVersionUpdateTime()); } + if (modelSourceInfo_ != null) { + output.writeMessage(38, getModelSourceInfo()); + } unknownFields.writeTo(output); } @@ -4226,6 +4302,9 @@ public int getSerializedSize() { if (versionUpdateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(32, getVersionUpdateTime()); } + if (modelSourceInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(38, getModelSourceInfo()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -4297,6 +4376,10 @@ public boolean equals(final java.lang.Object obj) { if (hasEncryptionSpec()) { if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; } + if (hasModelSourceInfo() != other.hasModelSourceInfo()) return false; + if (hasModelSourceInfo()) { + if (!getModelSourceInfo().equals(other.getModelSourceInfo())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -4390,6 +4473,10 @@ public int hashCode() { hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; hash = (53 * hash) + getEncryptionSpec().hashCode(); } + if (hasModelSourceInfo()) { + hash = (37 * hash) + MODEL_SOURCE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getModelSourceInfo().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -4650,6 +4737,12 @@ public Builder clear() { encryptionSpec_ = null; encryptionSpecBuilder_ = null; } + if (modelSourceInfoBuilder_ == null) { + modelSourceInfo_ = null; + } else { + modelSourceInfo_ = null; + modelSourceInfoBuilder_ = null; + } return this; } @@ -4772,6 +4865,11 @@ public com.google.cloud.aiplatform.v1.Model buildPartial() { } else { result.encryptionSpec_ = encryptionSpecBuilder_.build(); } + if (modelSourceInfoBuilder_ == null) { + result.modelSourceInfo_ = modelSourceInfo_; + } else { + result.modelSourceInfo_ = modelSourceInfoBuilder_.build(); + } onBuilt(); return result; } @@ -4979,6 +5077,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.Model other) { if (other.hasEncryptionSpec()) { mergeEncryptionSpec(other.getEncryptionSpec()); } + if (other.hasModelSourceInfo()) { + mergeModelSourceInfo(other.getModelSourceInfo()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -10554,6 +10655,219 @@ public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecO return encryptionSpecBuilder_; } + private com.google.cloud.aiplatform.v1.ModelSourceInfo modelSourceInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelSourceInfo, + com.google.cloud.aiplatform.v1.ModelSourceInfo.Builder, + com.google.cloud.aiplatform.v1.ModelSourceInfoOrBuilder> + modelSourceInfoBuilder_; + /** + * + * + *
+     * Output only. Source of a model. It can either be automl training pipeline, custom
+     * training pipeline, BigQuery ML, or existing Vertex AI Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelSourceInfo model_source_info = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the modelSourceInfo field is set. + */ + public boolean hasModelSourceInfo() { + return modelSourceInfoBuilder_ != null || modelSourceInfo_ != null; + } + /** + * + * + *
+     * Output only. Source of a model. It can either be automl training pipeline, custom
+     * training pipeline, BigQuery ML, or existing Vertex AI Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelSourceInfo model_source_info = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The modelSourceInfo. + */ + public com.google.cloud.aiplatform.v1.ModelSourceInfo getModelSourceInfo() { + if (modelSourceInfoBuilder_ == null) { + return modelSourceInfo_ == null + ? com.google.cloud.aiplatform.v1.ModelSourceInfo.getDefaultInstance() + : modelSourceInfo_; + } else { + return modelSourceInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Source of a model. It can either be automl training pipeline, custom
+     * training pipeline, BigQuery ML, or existing Vertex AI Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelSourceInfo model_source_info = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setModelSourceInfo(com.google.cloud.aiplatform.v1.ModelSourceInfo value) { + if (modelSourceInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelSourceInfo_ = value; + onChanged(); + } else { + modelSourceInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Source of a model. It can either be automl training pipeline, custom
+     * training pipeline, BigQuery ML, or existing Vertex AI Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelSourceInfo model_source_info = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setModelSourceInfo( + com.google.cloud.aiplatform.v1.ModelSourceInfo.Builder builderForValue) { + if (modelSourceInfoBuilder_ == null) { + modelSourceInfo_ = builderForValue.build(); + onChanged(); + } else { + modelSourceInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Source of a model. It can either be automl training pipeline, custom
+     * training pipeline, BigQuery ML, or existing Vertex AI Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelSourceInfo model_source_info = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeModelSourceInfo(com.google.cloud.aiplatform.v1.ModelSourceInfo value) { + if (modelSourceInfoBuilder_ == null) { + if (modelSourceInfo_ != null) { + modelSourceInfo_ = + com.google.cloud.aiplatform.v1.ModelSourceInfo.newBuilder(modelSourceInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + modelSourceInfo_ = value; + } + onChanged(); + } else { + modelSourceInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Source of a model. It can either be automl training pipeline, custom
+     * training pipeline, BigQuery ML, or existing Vertex AI Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelSourceInfo model_source_info = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearModelSourceInfo() { + if (modelSourceInfoBuilder_ == null) { + modelSourceInfo_ = null; + onChanged(); + } else { + modelSourceInfo_ = null; + modelSourceInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Source of a model. It can either be automl training pipeline, custom
+     * training pipeline, BigQuery ML, or existing Vertex AI Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelSourceInfo model_source_info = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.ModelSourceInfo.Builder getModelSourceInfoBuilder() { + + onChanged(); + return getModelSourceInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Source of a model. It can either be automl training pipeline, custom
+     * training pipeline, BigQuery ML, or existing Vertex AI Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelSourceInfo model_source_info = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.ModelSourceInfoOrBuilder getModelSourceInfoOrBuilder() { + if (modelSourceInfoBuilder_ != null) { + return modelSourceInfoBuilder_.getMessageOrBuilder(); + } else { + return modelSourceInfo_ == null + ? com.google.cloud.aiplatform.v1.ModelSourceInfo.getDefaultInstance() + : modelSourceInfo_; + } + } + /** + * + * + *
+     * Output only. Source of a model. It can either be automl training pipeline, custom
+     * training pipeline, BigQuery ML, or existing Vertex AI Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelSourceInfo model_source_info = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelSourceInfo, + com.google.cloud.aiplatform.v1.ModelSourceInfo.Builder, + com.google.cloud.aiplatform.v1.ModelSourceInfoOrBuilder> + getModelSourceInfoFieldBuilder() { + if (modelSourceInfoBuilder_ == null) { + modelSourceInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelSourceInfo, + com.google.cloud.aiplatform.v1.ModelSourceInfo.Builder, + com.google.cloud.aiplatform.v1.ModelSourceInfoOrBuilder>( + getModelSourceInfo(), getParentForChildren(), isClean()); + modelSourceInfo_ = null; + } + return modelSourceInfoBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelOrBuilder.java index e2cc6a6ead30..3d4db0f1d117 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelOrBuilder.java @@ -1465,4 +1465,48 @@ java.lang.String getLabelsOrDefault( * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; */ com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); + + /** + * + * + *
+   * Output only. Source of a model. It can either be automl training pipeline, custom
+   * training pipeline, BigQuery ML, or existing Vertex AI Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelSourceInfo model_source_info = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the modelSourceInfo field is set. + */ + boolean hasModelSourceInfo(); + /** + * + * + *
+   * Output only. Source of a model. It can either be automl training pipeline, custom
+   * training pipeline, BigQuery ML, or existing Vertex AI Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelSourceInfo model_source_info = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The modelSourceInfo. + */ + com.google.cloud.aiplatform.v1.ModelSourceInfo getModelSourceInfo(); + /** + * + * + *
+   * Output only. Source of a model. It can either be automl training pipeline, custom
+   * training pipeline, BigQuery ML, or existing Vertex AI Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelSourceInfo model_source_info = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.ModelSourceInfoOrBuilder getModelSourceInfoOrBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelProto.java index 49f222a4d987..cc2bc36744d5 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelProto.java @@ -51,6 +51,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_Port_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_Port_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ModelSourceInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ModelSourceInfo_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -69,7 +73,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "cloud/aiplatform/v1/env_var.proto\032,googl" + "e/cloud/aiplatform/v1/explanation.proto\032" + "\034google/protobuf/struct.proto\032\037google/pr" - + "otobuf/timestamp.proto\"\211\016\n\005Model\022\014\n\004name" + + "otobuf/timestamp.proto\"\326\016\n\005Model\022\014\n\004name" + "\030\001 \001(\t\022\032\n\nversion_id\030\034 \001(\tB\006\340A\005\340A\003\022\027\n\017ve" + "rsion_aliases\030\035 \003(\t\022<\n\023version_create_ti" + "me\030\037 \001(\0132\032.google.protobuf.TimestampB\003\340A" @@ -102,35 +106,42 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "bels\030\021 \003(\0132-.google.cloud.aiplatform.v1." + "Model.LabelsEntry\022C\n\017encryption_spec\030\030 \001" + "(\0132*.google.cloud.aiplatform.v1.Encrypti" - + "onSpec\032\325\001\n\014ExportFormat\022\017\n\002id\030\001 \001(\tB\003\340A\003" - + "\022b\n\023exportable_contents\030\002 \003(\0162@.google.c" - + "loud.aiplatform.v1.Model.ExportFormat.Ex" - + "portableContentB\003\340A\003\"P\n\021ExportableConten" - + "t\022\"\n\036EXPORTABLE_CONTENT_UNSPECIFIED\020\000\022\014\n" - + "\010ARTIFACT\020\001\022\t\n\005IMAGE\020\002\032-\n\013LabelsEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\214\001\n\027Deploy" - + "mentResourcesType\022)\n%DEPLOYMENT_RESOURCE" - + "S_TYPE_UNSPECIFIED\020\000\022\027\n\023DEDICATED_RESOUR" - + "CES\020\001\022\027\n\023AUTOMATIC_RESOURCES\020\002\022\024\n\020SHARED" - + "_RESOURCES\020\003:\\\352AY\n\037aiplatform.googleapis" - + ".com/Model\0226projects/{project}/locations" - + "/{location}/models/{model}\"{\n\017PredictSch" - + "emata\022 \n\023instance_schema_uri\030\001 \001(\tB\003\340A\005\022" - + "\"\n\025parameters_schema_uri\030\002 \001(\tB\003\340A\005\022\"\n\025p" - + "rediction_schema_uri\030\003 \001(\tB\003\340A\005\"\373\001\n\022Mode" - + "lContainerSpec\022\031\n\timage_uri\030\001 \001(\tB\006\340A\002\340A" - + "\005\022\024\n\007command\030\002 \003(\tB\003\340A\005\022\021\n\004args\030\003 \003(\tB\003\340" - + "A\005\0224\n\003env\030\004 \003(\0132\".google.cloud.aiplatfor" - + "m.v1.EnvVarB\003\340A\005\0224\n\005ports\030\005 \003(\0132 .google" - + ".cloud.aiplatform.v1.PortB\003\340A\005\022\032\n\rpredic" - + "t_route\030\006 \001(\tB\003\340A\005\022\031\n\014health_route\030\007 \001(\t" - + "B\003\340A\005\"\036\n\004Port\022\026\n\016container_port\030\003 \001(\005B\316\001" - + "\n\036com.google.cloud.aiplatform.v1B\nModelP" - + "rotoP\001ZDgoogle.golang.org/genproto/googl" - + "eapis/cloud/aiplatform/v1;aiplatform\252\002\032G" - + "oogle.Cloud.AIPlatform.V1\312\002\032Google\\Cloud" - + "\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatfo" - + "rm::V1b\006proto3" + + "onSpec\022K\n\021model_source_info\030& \001(\0132+.goog" + + "le.cloud.aiplatform.v1.ModelSourceInfoB\003" + + "\340A\003\032\325\001\n\014ExportFormat\022\017\n\002id\030\001 \001(\tB\003\340A\003\022b\n" + + "\023exportable_contents\030\002 \003(\0162@.google.clou" + + "d.aiplatform.v1.Model.ExportFormat.Expor" + + "tableContentB\003\340A\003\"P\n\021ExportableContent\022\"" + + "\n\036EXPORTABLE_CONTENT_UNSPECIFIED\020\000\022\014\n\010AR" + + "TIFACT\020\001\022\t\n\005IMAGE\020\002\032-\n\013LabelsEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\214\001\n\027Deploymen" + + "tResourcesType\022)\n%DEPLOYMENT_RESOURCES_T" + + "YPE_UNSPECIFIED\020\000\022\027\n\023DEDICATED_RESOURCES" + + "\020\001\022\027\n\023AUTOMATIC_RESOURCES\020\002\022\024\n\020SHARED_RE" + + "SOURCES\020\003:\\\352AY\n\037aiplatform.googleapis.co" + + "m/Model\0226projects/{project}/locations/{l" + + "ocation}/models/{model}\"{\n\017PredictSchema" + + "ta\022 \n\023instance_schema_uri\030\001 \001(\tB\003\340A\005\022\"\n\025" + + "parameters_schema_uri\030\002 \001(\tB\003\340A\005\022\"\n\025pred" + + "iction_schema_uri\030\003 \001(\tB\003\340A\005\"\373\001\n\022ModelCo" + + "ntainerSpec\022\031\n\timage_uri\030\001 \001(\tB\006\340A\002\340A\005\022\024" + + "\n\007command\030\002 \003(\tB\003\340A\005\022\021\n\004args\030\003 \003(\tB\003\340A\005\022" + + "4\n\003env\030\004 \003(\0132\".google.cloud.aiplatform.v" + + "1.EnvVarB\003\340A\005\0224\n\005ports\030\005 \003(\0132 .google.cl" + + "oud.aiplatform.v1.PortB\003\340A\005\022\032\n\rpredict_r" + + "oute\030\006 \001(\tB\003\340A\005\022\031\n\014health_route\030\007 \001(\tB\003\340" + + "A\005\"\036\n\004Port\022\026\n\016container_port\030\003 \001(\005\"\273\001\n\017M" + + "odelSourceInfo\022P\n\013source_type\030\001 \001(\0162;.go" + + "ogle.cloud.aiplatform.v1.ModelSourceInfo" + + ".ModelSourceType\"V\n\017ModelSourceType\022!\n\035M" + + "ODEL_SOURCE_TYPE_UNSPECIFIED\020\000\022\n\n\006AUTOML" + + "\020\001\022\n\n\006CUSTOM\020\002\022\010\n\004BQML\020\003B\316\001\n\036com.google." + + "cloud.aiplatform.v1B\nModelProtoP\001ZDgoogl" + + "e.golang.org/genproto/googleapis/cloud/a" + + "iplatform/v1;aiplatform\252\002\032Google.Cloud.A" + + "IPlatform.V1\312\002\032Google\\Cloud\\AIPlatform\\V" + + "1\352\002\035Google::Cloud::AIPlatform::V1b\006proto" + + "3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -176,6 +187,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Etag", "Labels", "EncryptionSpec", + "ModelSourceInfo", }); internal_static_google_cloud_aiplatform_v1_Model_ExportFormat_descriptor = internal_static_google_cloud_aiplatform_v1_Model_descriptor.getNestedTypes().get(0); @@ -217,6 +229,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ContainerPort", }); + internal_static_google_cloud_aiplatform_v1_ModelSourceInfo_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_ModelSourceInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ModelSourceInfo_descriptor, + new java.lang.String[] { + "SourceType", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelSourceInfo.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelSourceInfo.java new file mode 100644 index 000000000000..0b7cbeefd3fc --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelSourceInfo.java @@ -0,0 +1,799 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/model.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Detail description of the source information of the model.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ModelSourceInfo} + */ +public final class ModelSourceInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ModelSourceInfo) + ModelSourceInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ModelSourceInfo.newBuilder() to construct. + private ModelSourceInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ModelSourceInfo() { + sourceType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ModelSourceInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ModelSourceInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + sourceType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_ModelSourceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_ModelSourceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ModelSourceInfo.class, + com.google.cloud.aiplatform.v1.ModelSourceInfo.Builder.class); + } + + /** + * + * + *
+   * Source of the model.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType} + */ + public enum ModelSourceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should not be used.
+     * 
+ * + * MODEL_SOURCE_TYPE_UNSPECIFIED = 0; + */ + MODEL_SOURCE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The Model is uploaded by automl training pipeline.
+     * 
+ * + * AUTOML = 1; + */ + AUTOML(1), + /** + * + * + *
+     * The Model is uploaded by user or custom training pipeline.
+     * 
+ * + * CUSTOM = 2; + */ + CUSTOM(2), + /** + * + * + *
+     * The Model is registered and sync'ed from BigQuery ML.
+     * 
+ * + * BQML = 3; + */ + BQML(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should not be used.
+     * 
+ * + * MODEL_SOURCE_TYPE_UNSPECIFIED = 0; + */ + public static final int MODEL_SOURCE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The Model is uploaded by automl training pipeline.
+     * 
+ * + * AUTOML = 1; + */ + public static final int AUTOML_VALUE = 1; + /** + * + * + *
+     * The Model is uploaded by user or custom training pipeline.
+     * 
+ * + * CUSTOM = 2; + */ + public static final int CUSTOM_VALUE = 2; + /** + * + * + *
+     * The Model is registered and sync'ed from BigQuery ML.
+     * 
+ * + * BQML = 3; + */ + public static final int BQML_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ModelSourceType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ModelSourceType forNumber(int value) { + switch (value) { + case 0: + return MODEL_SOURCE_TYPE_UNSPECIFIED; + case 1: + return AUTOML; + case 2: + return CUSTOM; + case 3: + return BQML; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ModelSourceType findValueByNumber(int number) { + return ModelSourceType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelSourceInfo.getDescriptor().getEnumTypes().get(0); + } + + private static final ModelSourceType[] VALUES = values(); + + public static ModelSourceType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ModelSourceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType) + } + + public static final int SOURCE_TYPE_FIELD_NUMBER = 1; + private int sourceType_; + /** + * + * + *
+   * Type of the model source.
+   * 
+ * + * .google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType source_type = 1; + * + * @return The enum numeric value on the wire for sourceType. + */ + @java.lang.Override + public int getSourceTypeValue() { + return sourceType_; + } + /** + * + * + *
+   * Type of the model source.
+   * 
+ * + * .google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType source_type = 1; + * + * @return The sourceType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType getSourceType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType result = + com.google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType.valueOf(sourceType_); + return result == null + ? com.google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sourceType_ + != com.google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType + .MODEL_SOURCE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, sourceType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceType_ + != com.google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType + .MODEL_SOURCE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, sourceType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ModelSourceInfo)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ModelSourceInfo other = + (com.google.cloud.aiplatform.v1.ModelSourceInfo) obj; + + if (sourceType_ != other.sourceType_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + sourceType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ModelSourceInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ModelSourceInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ModelSourceInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ModelSourceInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ModelSourceInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ModelSourceInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ModelSourceInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ModelSourceInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ModelSourceInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ModelSourceInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ModelSourceInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ModelSourceInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ModelSourceInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Detail description of the source information of the model.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ModelSourceInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ModelSourceInfo) + com.google.cloud.aiplatform.v1.ModelSourceInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_ModelSourceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_ModelSourceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ModelSourceInfo.class, + com.google.cloud.aiplatform.v1.ModelSourceInfo.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ModelSourceInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + sourceType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_ModelSourceInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelSourceInfo getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ModelSourceInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelSourceInfo build() { + com.google.cloud.aiplatform.v1.ModelSourceInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelSourceInfo buildPartial() { + com.google.cloud.aiplatform.v1.ModelSourceInfo result = + new com.google.cloud.aiplatform.v1.ModelSourceInfo(this); + result.sourceType_ = sourceType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ModelSourceInfo) { + return mergeFrom((com.google.cloud.aiplatform.v1.ModelSourceInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ModelSourceInfo other) { + if (other == com.google.cloud.aiplatform.v1.ModelSourceInfo.getDefaultInstance()) return this; + if (other.sourceType_ != 0) { + setSourceTypeValue(other.getSourceTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ModelSourceInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.ModelSourceInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sourceType_ = 0; + /** + * + * + *
+     * Type of the model source.
+     * 
+ * + * .google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType source_type = 1; + * + * @return The enum numeric value on the wire for sourceType. + */ + @java.lang.Override + public int getSourceTypeValue() { + return sourceType_; + } + /** + * + * + *
+     * Type of the model source.
+     * 
+ * + * .google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType source_type = 1; + * + * @param value The enum numeric value on the wire for sourceType to set. + * @return This builder for chaining. + */ + public Builder setSourceTypeValue(int value) { + + sourceType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the model source.
+     * 
+ * + * .google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType source_type = 1; + * + * @return The sourceType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType getSourceType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType result = + com.google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType.valueOf(sourceType_); + return result == null + ? com.google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of the model source.
+     * 
+ * + * .google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType source_type = 1; + * + * @param value The sourceType to set. + * @return This builder for chaining. + */ + public Builder setSourceType( + com.google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the model source.
+     * 
+ * + * .google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType source_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearSourceType() { + + sourceType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ModelSourceInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ModelSourceInfo) + private static final com.google.cloud.aiplatform.v1.ModelSourceInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ModelSourceInfo(); + } + + public static com.google.cloud.aiplatform.v1.ModelSourceInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModelSourceInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ModelSourceInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelSourceInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelSourceInfoOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelSourceInfoOrBuilder.java new file mode 100644 index 000000000000..465d72b9960e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelSourceInfoOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/model.proto + +package com.google.cloud.aiplatform.v1; + +public interface ModelSourceInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ModelSourceInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Type of the model source.
+   * 
+ * + * .google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType source_type = 1; + * + * @return The enum numeric value on the wire for sourceType. + */ + int getSourceTypeValue(); + /** + * + * + *
+   * Type of the model source.
+   * 
+ * + * .google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType source_type = 1; + * + * @return The sourceType. + */ + com.google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType getSourceType(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model.proto index 26c1d3b7f362..f34fad6ed281 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model.proto @@ -328,6 +328,10 @@ message Model { // Customer-managed encryption key spec for a Model. If set, this // Model and all sub-resources of this Model will be secured by this key. EncryptionSpec encryption_spec = 24; + + // Output only. Source of a model. It can either be automl training pipeline, custom + // training pipeline, BigQuery ML, or existing Vertex AI Model. + ModelSourceInfo model_source_info = 38 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Contains the schemata used in Model's predictions and explanations via @@ -590,3 +594,24 @@ message Port { // Must be a valid port number, between 1 and 65535 inclusive. int32 container_port = 3; } + +// Detail description of the source information of the model. +message ModelSourceInfo { + // Source of the model. + enum ModelSourceType { + // Should not be used. + MODEL_SOURCE_TYPE_UNSPECIFIED = 0; + + // The Model is uploaded by automl training pipeline. + AUTOML = 1; + + // The Model is uploaded by user or custom training pipeline. + CUSTOM = 2; + + // The Model is registered and sync'ed from BigQuery ML. + BQML = 3; + } + + // Type of the model source. + ModelSourceType source_type = 1; +}