diff --git a/generation_config.yaml b/generation_config.yaml index 364dd75246a5..148228783b15 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.63.0 -googleapis_commitish: 979af4bd0c12f882dfeb87e89461aa7ccd1ea4b4 +googleapis_commitish: c288189b43c016dd3cf1ec73ce3cadee8b732f07 libraries_bom_version: 26.70.0 # the libraries are ordered with respect to library name, which is diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1/reflect-config.json b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1/reflect-config.json index ac4cd4c38c9a..86376e8db829 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1/reflect-config.json +++ b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1/reflect-config.json @@ -14705,6 +14705,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.PreTunedModel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.PreTunedModel$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.PredefinedSplit", "queryAllDeclaredConstructors": true, diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json index 328315ecfa8c..7d71b832c53f 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json +++ b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json @@ -9737,6 +9737,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.FunctionResponsePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.FunctionResponsePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.GcsDestination", "queryAllDeclaredConstructors": true, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PreTunedModel.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PreTunedModel.java new file mode 100644 index 000000000000..8a6a630f74b5 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PreTunedModel.java @@ -0,0 +1,1088 @@ +/* + * Copyright 2025 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/tuning_job.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A pre-tuned model for continuous tuning.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PreTunedModel} + */ +public final class PreTunedModel extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.PreTunedModel) + PreTunedModelOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PreTunedModel.newBuilder() to construct. + private PreTunedModel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PreTunedModel() { + tunedModelName_ = ""; + checkpointId_ = ""; + baseModel_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PreTunedModel(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_PreTunedModel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_PreTunedModel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PreTunedModel.class, + com.google.cloud.aiplatform.v1.PreTunedModel.Builder.class); + } + + public static final int TUNED_MODEL_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object tunedModelName_ = ""; + + /** + * + * + *
+   * The resource name of the Model.
+   * E.g., a model resource name with a specified version id or alias:
+   *
+   * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+   *
+   * `projects/{project}/locations/{location}/models/{model}@{alias}`
+   *
+   * Or, omit the version id to use the default version:
+   *
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * string tuned_model_name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The tunedModelName. + */ + @java.lang.Override + public java.lang.String getTunedModelName() { + java.lang.Object ref = tunedModelName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tunedModelName_ = s; + return s; + } + } + + /** + * + * + *
+   * The resource name of the Model.
+   * E.g., a model resource name with a specified version id or alias:
+   *
+   * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+   *
+   * `projects/{project}/locations/{location}/models/{model}@{alias}`
+   *
+   * Or, omit the version id to use the default version:
+   *
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * string tuned_model_name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for tunedModelName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTunedModelNameBytes() { + java.lang.Object ref = tunedModelName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tunedModelName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHECKPOINT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object checkpointId_ = ""; + + /** + * + * + *
+   * Optional. The source checkpoint id. If not specified, the default
+   * checkpoint will be used.
+   * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The checkpointId. + */ + @java.lang.Override + public java.lang.String getCheckpointId() { + java.lang.Object ref = checkpointId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + checkpointId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The source checkpoint id. If not specified, the default
+   * checkpoint will be used.
+   * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for checkpointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCheckpointIdBytes() { + java.lang.Object ref = checkpointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + checkpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE_MODEL_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object baseModel_ = ""; + + /** + * + * + *
+   * Output only. The name of the base model this
+   * [PreTunedModel][google.cloud.aiplatform.v1.PreTunedModel] was tuned from.
+   * 
+ * + * string base_model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The baseModel. + */ + @java.lang.Override + public java.lang.String getBaseModel() { + java.lang.Object ref = baseModel_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseModel_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The name of the base model this
+   * [PreTunedModel][google.cloud.aiplatform.v1.PreTunedModel] was tuned from.
+   * 
+ * + * string base_model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for baseModel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaseModelBytes() { + java.lang.Object ref = baseModel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tunedModelName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tunedModelName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(checkpointId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, checkpointId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseModel_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, baseModel_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tunedModelName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tunedModelName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(checkpointId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, checkpointId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseModel_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, baseModel_); + } + size += getUnknownFields().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.PreTunedModel)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.PreTunedModel other = + (com.google.cloud.aiplatform.v1.PreTunedModel) obj; + + if (!getTunedModelName().equals(other.getTunedModelName())) return false; + if (!getCheckpointId().equals(other.getCheckpointId())) return false; + if (!getBaseModel().equals(other.getBaseModel())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + TUNED_MODEL_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTunedModelName().hashCode(); + hash = (37 * hash) + CHECKPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getCheckpointId().hashCode(); + hash = (37 * hash) + BASE_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getBaseModel().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.PreTunedModel parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PreTunedModel 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.PreTunedModel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PreTunedModel 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.PreTunedModel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PreTunedModel 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.PreTunedModel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PreTunedModel 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.PreTunedModel parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PreTunedModel 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.PreTunedModel 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.PreTunedModel 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.PreTunedModel 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; + } + + /** + * + * + *
+   * A pre-tuned model for continuous tuning.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PreTunedModel} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.PreTunedModel) + com.google.cloud.aiplatform.v1.PreTunedModelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_PreTunedModel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_PreTunedModel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PreTunedModel.class, + com.google.cloud.aiplatform.v1.PreTunedModel.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.PreTunedModel.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tunedModelName_ = ""; + checkpointId_ = ""; + baseModel_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_PreTunedModel_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PreTunedModel getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.PreTunedModel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PreTunedModel build() { + com.google.cloud.aiplatform.v1.PreTunedModel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PreTunedModel buildPartial() { + com.google.cloud.aiplatform.v1.PreTunedModel result = + new com.google.cloud.aiplatform.v1.PreTunedModel(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.PreTunedModel result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tunedModelName_ = tunedModelName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.checkpointId_ = checkpointId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.baseModel_ = baseModel_; + } + } + + @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.PreTunedModel) { + return mergeFrom((com.google.cloud.aiplatform.v1.PreTunedModel) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.PreTunedModel other) { + if (other == com.google.cloud.aiplatform.v1.PreTunedModel.getDefaultInstance()) return this; + if (!other.getTunedModelName().isEmpty()) { + tunedModelName_ = other.tunedModelName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCheckpointId().isEmpty()) { + checkpointId_ = other.checkpointId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getBaseModel().isEmpty()) { + baseModel_ = other.baseModel_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + tunedModelName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + checkpointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + baseModel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object tunedModelName_ = ""; + + /** + * + * + *
+     * The resource name of the Model.
+     * E.g., a model resource name with a specified version id or alias:
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{alias}`
+     *
+     * Or, omit the version id to use the default version:
+     *
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string tuned_model_name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The tunedModelName. + */ + public java.lang.String getTunedModelName() { + java.lang.Object ref = tunedModelName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tunedModelName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The resource name of the Model.
+     * E.g., a model resource name with a specified version id or alias:
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{alias}`
+     *
+     * Or, omit the version id to use the default version:
+     *
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string tuned_model_name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for tunedModelName. + */ + public com.google.protobuf.ByteString getTunedModelNameBytes() { + java.lang.Object ref = tunedModelName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tunedModelName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The resource name of the Model.
+     * E.g., a model resource name with a specified version id or alias:
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{alias}`
+     *
+     * Or, omit the version id to use the default version:
+     *
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string tuned_model_name = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The tunedModelName to set. + * @return This builder for chaining. + */ + public Builder setTunedModelName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tunedModelName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The resource name of the Model.
+     * E.g., a model resource name with a specified version id or alias:
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{alias}`
+     *
+     * Or, omit the version id to use the default version:
+     *
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string tuned_model_name = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearTunedModelName() { + tunedModelName_ = getDefaultInstance().getTunedModelName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The resource name of the Model.
+     * E.g., a model resource name with a specified version id or alias:
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{alias}`
+     *
+     * Or, omit the version id to use the default version:
+     *
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string tuned_model_name = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for tunedModelName to set. + * @return This builder for chaining. + */ + public Builder setTunedModelNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tunedModelName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object checkpointId_ = ""; + + /** + * + * + *
+     * Optional. The source checkpoint id. If not specified, the default
+     * checkpoint will be used.
+     * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The checkpointId. + */ + public java.lang.String getCheckpointId() { + java.lang.Object ref = checkpointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + checkpointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The source checkpoint id. If not specified, the default
+     * checkpoint will be used.
+     * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for checkpointId. + */ + public com.google.protobuf.ByteString getCheckpointIdBytes() { + java.lang.Object ref = checkpointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + checkpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The source checkpoint id. If not specified, the default
+     * checkpoint will be used.
+     * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The checkpointId to set. + * @return This builder for chaining. + */ + public Builder setCheckpointId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + checkpointId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The source checkpoint id. If not specified, the default
+     * checkpoint will be used.
+     * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCheckpointId() { + checkpointId_ = getDefaultInstance().getCheckpointId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The source checkpoint id. If not specified, the default
+     * checkpoint will be used.
+     * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for checkpointId to set. + * @return This builder for chaining. + */ + public Builder setCheckpointIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + checkpointId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object baseModel_ = ""; + + /** + * + * + *
+     * Output only. The name of the base model this
+     * [PreTunedModel][google.cloud.aiplatform.v1.PreTunedModel] was tuned from.
+     * 
+ * + * string base_model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The baseModel. + */ + public java.lang.String getBaseModel() { + java.lang.Object ref = baseModel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseModel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The name of the base model this
+     * [PreTunedModel][google.cloud.aiplatform.v1.PreTunedModel] was tuned from.
+     * 
+ * + * string base_model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for baseModel. + */ + public com.google.protobuf.ByteString getBaseModelBytes() { + java.lang.Object ref = baseModel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The name of the base model this
+     * [PreTunedModel][google.cloud.aiplatform.v1.PreTunedModel] was tuned from.
+     * 
+ * + * string base_model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The baseModel to set. + * @return This builder for chaining. + */ + public Builder setBaseModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + baseModel_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The name of the base model this
+     * [PreTunedModel][google.cloud.aiplatform.v1.PreTunedModel] was tuned from.
+     * 
+ * + * string base_model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBaseModel() { + baseModel_ = getDefaultInstance().getBaseModel(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The name of the base model this
+     * [PreTunedModel][google.cloud.aiplatform.v1.PreTunedModel] was tuned from.
+     * 
+ * + * string base_model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for baseModel to set. + * @return This builder for chaining. + */ + public Builder setBaseModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + baseModel_ = value; + bitField0_ |= 0x00000004; + 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.PreTunedModel) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.PreTunedModel) + private static final com.google.cloud.aiplatform.v1.PreTunedModel DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.PreTunedModel(); + } + + public static com.google.cloud.aiplatform.v1.PreTunedModel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PreTunedModel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.PreTunedModel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PreTunedModelOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PreTunedModelOrBuilder.java new file mode 100644 index 000000000000..2329e5b9d76e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PreTunedModelOrBuilder.java @@ -0,0 +1,126 @@ +/* + * Copyright 2025 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/tuning_job.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.aiplatform.v1; + +public interface PreTunedModelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.PreTunedModel) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the Model.
+   * E.g., a model resource name with a specified version id or alias:
+   *
+   * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+   *
+   * `projects/{project}/locations/{location}/models/{model}@{alias}`
+   *
+   * Or, omit the version id to use the default version:
+   *
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * string tuned_model_name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The tunedModelName. + */ + java.lang.String getTunedModelName(); + + /** + * + * + *
+   * The resource name of the Model.
+   * E.g., a model resource name with a specified version id or alias:
+   *
+   * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+   *
+   * `projects/{project}/locations/{location}/models/{model}@{alias}`
+   *
+   * Or, omit the version id to use the default version:
+   *
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * string tuned_model_name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for tunedModelName. + */ + com.google.protobuf.ByteString getTunedModelNameBytes(); + + /** + * + * + *
+   * Optional. The source checkpoint id. If not specified, the default
+   * checkpoint will be used.
+   * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The checkpointId. + */ + java.lang.String getCheckpointId(); + + /** + * + * + *
+   * Optional. The source checkpoint id. If not specified, the default
+   * checkpoint will be used.
+   * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for checkpointId. + */ + com.google.protobuf.ByteString getCheckpointIdBytes(); + + /** + * + * + *
+   * Output only. The name of the base model this
+   * [PreTunedModel][google.cloud.aiplatform.v1.PreTunedModel] was tuned from.
+   * 
+ * + * string base_model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The baseModel. + */ + java.lang.String getBaseModel(); + + /** + * + * + *
+   * Output only. The name of the base model this
+   * [PreTunedModel][google.cloud.aiplatform.v1.PreTunedModel] was tuned from.
+   * 
+ * + * string base_model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for baseModel. + */ + com.google.protobuf.ByteString getBaseModelBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStats.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStats.java index da3aa5be84f8..048e3fb96d8a 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStats.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStats.java @@ -122,7 +122,7 @@ public long getTotalTuningCharacterCount() { * * * @deprecated google.cloud.aiplatform.v1.SupervisedTuningDataStats.total_billable_character_count - * is deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=228 + * is deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=245 * @return The totalBillableCharacterCount. */ @java.lang.Override @@ -1501,7 +1501,7 @@ public Builder clearTotalTuningCharacterCount() { * * @deprecated * google.cloud.aiplatform.v1.SupervisedTuningDataStats.total_billable_character_count is - * deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=228 + * deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=245 * @return The totalBillableCharacterCount. */ @java.lang.Override @@ -1523,7 +1523,7 @@ public long getTotalBillableCharacterCount() { * * @deprecated * google.cloud.aiplatform.v1.SupervisedTuningDataStats.total_billable_character_count is - * deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=228 + * deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=245 * @param value The totalBillableCharacterCount to set. * @return This builder for chaining. */ @@ -1549,7 +1549,7 @@ public Builder setTotalBillableCharacterCount(long value) { * * @deprecated * google.cloud.aiplatform.v1.SupervisedTuningDataStats.total_billable_character_count is - * deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=228 + * deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=245 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStatsOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStatsOrBuilder.java index 2742d0c2fde7..ac692affe123 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStatsOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStatsOrBuilder.java @@ -64,7 +64,7 @@ public interface SupervisedTuningDataStatsOrBuilder * * * @deprecated google.cloud.aiplatform.v1.SupervisedTuningDataStats.total_billable_character_count - * is deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=228 + * is deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=245 * @return The totalBillableCharacterCount. */ @java.lang.Deprecated diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TunedModel.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TunedModel.java index 49857e562bb5..5bf291180fd0 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TunedModel.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TunedModel.java @@ -77,7 +77,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Output only. The resource name of the TunedModel. Format:
-   * `projects/{project}/locations/{location}/models/{model}`.
+   *
+   * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+   *
+   * When tuning from a base model, the version ID will be 1.
+   *
+   * For continuous tuning, if the provided tuned_model_display_name is set and
+   * different from parent model's display name, the tuned model will have a new
+   * parent model with version 1. Otherwise the version id will be incremented
+   * by 1 from the last version ID in the parent model. E.g.,
+   *
+   * `projects/{project}/locations/{location}/models/{model}@{last_version_id +
+   * 1}`
    * 
* * @@ -104,7 +115,18 @@ public java.lang.String getModel() { * *
    * Output only. The resource name of the TunedModel. Format:
-   * `projects/{project}/locations/{location}/models/{model}`.
+   *
+   * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+   *
+   * When tuning from a base model, the version ID will be 1.
+   *
+   * For continuous tuning, if the provided tuned_model_display_name is set and
+   * different from parent model's display name, the tuned model will have a new
+   * parent model with version 1. Otherwise the version id will be incremented
+   * by 1 from the last version ID in the parent model. E.g.,
+   *
+   * `projects/{project}/locations/{location}/models/{model}@{last_version_id +
+   * 1}`
    * 
* * @@ -728,7 +750,18 @@ public Builder mergeFrom( * *
      * Output only. The resource name of the TunedModel. Format:
-     * `projects/{project}/locations/{location}/models/{model}`.
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+     *
+     * When tuning from a base model, the version ID will be 1.
+     *
+     * For continuous tuning, if the provided tuned_model_display_name is set and
+     * different from parent model's display name, the tuned model will have a new
+     * parent model with version 1. Otherwise the version id will be incremented
+     * by 1 from the last version ID in the parent model. E.g.,
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{last_version_id +
+     * 1}`
      * 
* * @@ -754,7 +787,18 @@ public java.lang.String getModel() { * *
      * Output only. The resource name of the TunedModel. Format:
-     * `projects/{project}/locations/{location}/models/{model}`.
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+     *
+     * When tuning from a base model, the version ID will be 1.
+     *
+     * For continuous tuning, if the provided tuned_model_display_name is set and
+     * different from parent model's display name, the tuned model will have a new
+     * parent model with version 1. Otherwise the version id will be incremented
+     * by 1 from the last version ID in the parent model. E.g.,
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{last_version_id +
+     * 1}`
      * 
* * @@ -780,7 +824,18 @@ public com.google.protobuf.ByteString getModelBytes() { * *
      * Output only. The resource name of the TunedModel. Format:
-     * `projects/{project}/locations/{location}/models/{model}`.
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+     *
+     * When tuning from a base model, the version ID will be 1.
+     *
+     * For continuous tuning, if the provided tuned_model_display_name is set and
+     * different from parent model's display name, the tuned model will have a new
+     * parent model with version 1. Otherwise the version id will be incremented
+     * by 1 from the last version ID in the parent model. E.g.,
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{last_version_id +
+     * 1}`
      * 
* * @@ -805,7 +860,18 @@ public Builder setModel(java.lang.String value) { * *
      * Output only. The resource name of the TunedModel. Format:
-     * `projects/{project}/locations/{location}/models/{model}`.
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+     *
+     * When tuning from a base model, the version ID will be 1.
+     *
+     * For continuous tuning, if the provided tuned_model_display_name is set and
+     * different from parent model's display name, the tuned model will have a new
+     * parent model with version 1. Otherwise the version id will be incremented
+     * by 1 from the last version ID in the parent model. E.g.,
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{last_version_id +
+     * 1}`
      * 
* * @@ -826,7 +892,18 @@ public Builder clearModel() { * *
      * Output only. The resource name of the TunedModel. Format:
-     * `projects/{project}/locations/{location}/models/{model}`.
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+     *
+     * When tuning from a base model, the version ID will be 1.
+     *
+     * For continuous tuning, if the provided tuned_model_display_name is set and
+     * different from parent model's display name, the tuned model will have a new
+     * parent model with version 1. Otherwise the version id will be incremented
+     * by 1 from the last version ID in the parent model. E.g.,
+     *
+     * `projects/{project}/locations/{location}/models/{model}@{last_version_id +
+     * 1}`
      * 
* * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TunedModelOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TunedModelOrBuilder.java index e4173854fbbe..a73865c1cc08 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TunedModelOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TunedModelOrBuilder.java @@ -29,7 +29,18 @@ public interface TunedModelOrBuilder * *
    * Output only. The resource name of the TunedModel. Format:
-   * `projects/{project}/locations/{location}/models/{model}`.
+   *
+   * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+   *
+   * When tuning from a base model, the version ID will be 1.
+   *
+   * For continuous tuning, if the provided tuned_model_display_name is set and
+   * different from parent model's display name, the tuned model will have a new
+   * parent model with version 1. Otherwise the version id will be incremented
+   * by 1 from the last version ID in the parent model. E.g.,
+   *
+   * `projects/{project}/locations/{location}/models/{model}@{last_version_id +
+   * 1}`
    * 
* * @@ -45,7 +56,18 @@ public interface TunedModelOrBuilder * *
    * Output only. The resource name of the TunedModel. Format:
-   * `projects/{project}/locations/{location}/models/{model}`.
+   *
+   * `projects/{project}/locations/{location}/models/{model}@{version_id}`
+   *
+   * When tuning from a base model, the version ID will be 1.
+   *
+   * For continuous tuning, if the provided tuned_model_display_name is set and
+   * different from parent model's display name, the tuned model will have a new
+   * parent model with version 1. Otherwise the version id will be incremented
+   * by 1 from the last version ID in the parent model. E.g.,
+   *
+   * `projects/{project}/locations/{location}/models/{model}@{last_version_id +
+   * 1}`
    * 
* * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJob.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJob.java index 92224224bd8e..2cb9a029e31b 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJob.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJob.java @@ -92,6 +92,7 @@ public enum SourceModelCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { BASE_MODEL(4), + PRE_TUNED_MODEL(31), SOURCEMODEL_NOT_SET(0); private final int value; @@ -113,6 +114,8 @@ public static SourceModelCase forNumber(int value) { switch (value) { case 4: return BASE_MODEL; + case 31: + return PRE_TUNED_MODEL; case 0: return SOURCEMODEL_NOT_SET; default: @@ -252,6 +255,60 @@ public com.google.protobuf.ByteString getBaseModelBytes() { } } + public static final int PRE_TUNED_MODEL_FIELD_NUMBER = 31; + + /** + * + * + *
+   * The pre-tuned model for continuous tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1.PreTunedModel pre_tuned_model = 31; + * + * @return Whether the preTunedModel field is set. + */ + @java.lang.Override + public boolean hasPreTunedModel() { + return sourceModelCase_ == 31; + } + + /** + * + * + *
+   * The pre-tuned model for continuous tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1.PreTunedModel pre_tuned_model = 31; + * + * @return The preTunedModel. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PreTunedModel getPreTunedModel() { + if (sourceModelCase_ == 31) { + return (com.google.cloud.aiplatform.v1.PreTunedModel) sourceModel_; + } + return com.google.cloud.aiplatform.v1.PreTunedModel.getDefaultInstance(); + } + + /** + * + * + *
+   * The pre-tuned model for continuous tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1.PreTunedModel pre_tuned_model = 31; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PreTunedModelOrBuilder getPreTunedModelOrBuilder() { + if (sourceModelCase_ == 31) { + return (com.google.cloud.aiplatform.v1.PreTunedModel) sourceModel_; + } + return com.google.cloud.aiplatform.v1.PreTunedModel.getDefaultInstance(); + } + public static final int SUPERVISED_TUNING_SPEC_FIELD_NUMBER = 5; /** @@ -377,7 +434,10 @@ public com.google.protobuf.ByteString getNameBytes() { *
    * Optional. The display name of the
    * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
-   * characters long and can consist of any UTF-8 characters.
+   * characters long and can consist of any UTF-8 characters. For continuous
+   * tuning, tuned_model_display_name will by default use the same display name
+   * as the pre-tuned model. If a new display name is provided, the tuning job
+   * will create a new model instead of a new version.
    * 
* * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -403,7 +463,10 @@ public java.lang.String getTunedModelDisplayName() { *
    * Optional. The display name of the
    * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
-   * characters long and can consist of any UTF-8 characters.
+   * characters long and can consist of any UTF-8 characters. For continuous
+   * tuning, tuned_model_display_name will by default use the same display name
+   * as the pre-tuned model. If a new display name is provided, the tuning job
+   * will create a new model instead of a new version.
    * 
* * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1314,6 +1377,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 22, serviceAccount_); } + if (sourceModelCase_ == 31) { + output.writeMessage(31, (com.google.cloud.aiplatform.v1.PreTunedModel) sourceModel_); + } getUnknownFields().writeTo(output); } @@ -1383,6 +1449,11 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, serviceAccount_); } + if (sourceModelCase_ == 31) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 31, (com.google.cloud.aiplatform.v1.PreTunedModel) sourceModel_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1442,6 +1513,9 @@ public boolean equals(final java.lang.Object obj) { case 4: if (!getBaseModel().equals(other.getBaseModel())) return false; break; + case 31: + if (!getPreTunedModel().equals(other.getPreTunedModel())) return false; + break; case 0: default: } @@ -1517,6 +1591,10 @@ public int hashCode() { hash = (37 * hash) + BASE_MODEL_FIELD_NUMBER; hash = (53 * hash) + getBaseModel().hashCode(); break; + case 31: + hash = (37 * hash) + PRE_TUNED_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getPreTunedModel().hashCode(); + break; case 0: default: } @@ -1706,6 +1784,9 @@ private void maybeForceBuilderInitialization() { public Builder clear() { super.clear(); bitField0_ = 0; + if (preTunedModelBuilder_ != null) { + preTunedModelBuilder_.clear(); + } if (supervisedTuningSpecBuilder_ != null) { supervisedTuningSpecBuilder_.clear(); } @@ -1797,61 +1878,61 @@ public com.google.cloud.aiplatform.v1.TuningJob buildPartial() { private void buildPartial0(com.google.cloud.aiplatform.v1.TuningJob result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000004) != 0)) { + if (((from_bitField0_ & 0x00000008) != 0)) { result.name_ = name_; } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.tunedModelDisplayName_ = tunedModelDisplayName_; } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.description_ = description_; } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.state_ = state_; } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); to_bitField0_ |= 0x00000008; } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build(); to_bitField0_ |= 0x00000010; } - if (((from_bitField0_ & 0x00000800) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } - if (((from_bitField0_ & 0x00001000) != 0)) { + if (((from_bitField0_ & 0x00002000) != 0)) { result.experiment_ = experiment_; } - if (((from_bitField0_ & 0x00002000) != 0)) { + if (((from_bitField0_ & 0x00004000) != 0)) { result.tunedModel_ = tunedModelBuilder_ == null ? tunedModel_ : tunedModelBuilder_.build(); to_bitField0_ |= 0x00000020; } - if (((from_bitField0_ & 0x00004000) != 0)) { + if (((from_bitField0_ & 0x00008000) != 0)) { result.tuningDataStats_ = tuningDataStatsBuilder_ == null ? tuningDataStats_ : tuningDataStatsBuilder_.build(); to_bitField0_ |= 0x00000040; } - if (((from_bitField0_ & 0x00008000) != 0)) { + if (((from_bitField0_ & 0x00010000) != 0)) { result.encryptionSpec_ = encryptionSpecBuilder_ == null ? encryptionSpec_ : encryptionSpecBuilder_.build(); to_bitField0_ |= 0x00000080; } - if (((from_bitField0_ & 0x00010000) != 0)) { + if (((from_bitField0_ & 0x00020000) != 0)) { result.serviceAccount_ = serviceAccount_; } result.bitField0_ |= to_bitField0_; @@ -1860,6 +1941,9 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.TuningJob result) { private void buildPartialOneofs(com.google.cloud.aiplatform.v1.TuningJob result) { result.sourceModelCase_ = sourceModelCase_; result.sourceModel_ = this.sourceModel_; + if (sourceModelCase_ == 31 && preTunedModelBuilder_ != null) { + result.sourceModel_ = preTunedModelBuilder_.build(); + } result.tuningSpecCase_ = tuningSpecCase_; result.tuningSpec_ = this.tuningSpec_; if (tuningSpecCase_ == 5 && supervisedTuningSpecBuilder_ != null) { @@ -1914,17 +1998,17 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.TuningJob other) { if (other == com.google.cloud.aiplatform.v1.TuningJob.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } if (!other.getTunedModelDisplayName().isEmpty()) { tunedModelDisplayName_ = other.tunedModelDisplayName_; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); } if (!other.getDescription().isEmpty()) { description_ = other.description_; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); } if (other.state_ != 0) { @@ -1946,10 +2030,10 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.TuningJob other) { mergeError(other.getError()); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; if (!other.getExperiment().isEmpty()) { experiment_ = other.experiment_; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); } if (other.hasTunedModel()) { @@ -1963,7 +2047,7 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.TuningJob other) { } if (!other.getServiceAccount().isEmpty()) { serviceAccount_ = other.serviceAccount_; - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); } switch (other.getSourceModelCase()) { @@ -1974,6 +2058,11 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.TuningJob other) { onChanged(); break; } + case PRE_TUNED_MODEL: + { + mergePreTunedModel(other.getPreTunedModel()); + break; + } case SOURCEMODEL_NOT_SET: { break; @@ -2019,19 +2108,19 @@ public Builder mergeFrom( case 10: { name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 10 case 18: { tunedModelDisplayName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 18 case 26: { description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 26 case 34: @@ -2051,37 +2140,37 @@ public Builder mergeFrom( case 48: { state_ = input.readEnum(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 48 case 58: { input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 58 case 66: { input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 66 case 74: { input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 74 case 82: { input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 82 case 90: { input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 90 case 98: @@ -2093,39 +2182,45 @@ public Builder mergeFrom( internalGetMutableLabels() .getMutableMap() .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; break; } // case 98 case 106: { experiment_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; break; } // case 106 case 114: { input.readMessage(getTunedModelFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; break; } // case 114 case 122: { input.readMessage(getTuningDataStatsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; break; } // case 122 case 130: { input.readMessage(getEncryptionSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; break; } // case 130 case 178: { serviceAccount_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; break; } // case 178 + case 250: + { + input.readMessage(getPreTunedModelFieldBuilder().getBuilder(), extensionRegistry); + sourceModelCase_ = 31; + break; + } // case 250 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2318,6 +2413,224 @@ public Builder setBaseModelBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PreTunedModel, + com.google.cloud.aiplatform.v1.PreTunedModel.Builder, + com.google.cloud.aiplatform.v1.PreTunedModelOrBuilder> + preTunedModelBuilder_; + + /** + * + * + *
+     * The pre-tuned model for continuous tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.PreTunedModel pre_tuned_model = 31; + * + * @return Whether the preTunedModel field is set. + */ + @java.lang.Override + public boolean hasPreTunedModel() { + return sourceModelCase_ == 31; + } + + /** + * + * + *
+     * The pre-tuned model for continuous tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.PreTunedModel pre_tuned_model = 31; + * + * @return The preTunedModel. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PreTunedModel getPreTunedModel() { + if (preTunedModelBuilder_ == null) { + if (sourceModelCase_ == 31) { + return (com.google.cloud.aiplatform.v1.PreTunedModel) sourceModel_; + } + return com.google.cloud.aiplatform.v1.PreTunedModel.getDefaultInstance(); + } else { + if (sourceModelCase_ == 31) { + return preTunedModelBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.PreTunedModel.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The pre-tuned model for continuous tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.PreTunedModel pre_tuned_model = 31; + */ + public Builder setPreTunedModel(com.google.cloud.aiplatform.v1.PreTunedModel value) { + if (preTunedModelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceModel_ = value; + onChanged(); + } else { + preTunedModelBuilder_.setMessage(value); + } + sourceModelCase_ = 31; + return this; + } + + /** + * + * + *
+     * The pre-tuned model for continuous tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.PreTunedModel pre_tuned_model = 31; + */ + public Builder setPreTunedModel( + com.google.cloud.aiplatform.v1.PreTunedModel.Builder builderForValue) { + if (preTunedModelBuilder_ == null) { + sourceModel_ = builderForValue.build(); + onChanged(); + } else { + preTunedModelBuilder_.setMessage(builderForValue.build()); + } + sourceModelCase_ = 31; + return this; + } + + /** + * + * + *
+     * The pre-tuned model for continuous tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.PreTunedModel pre_tuned_model = 31; + */ + public Builder mergePreTunedModel(com.google.cloud.aiplatform.v1.PreTunedModel value) { + if (preTunedModelBuilder_ == null) { + if (sourceModelCase_ == 31 + && sourceModel_ != com.google.cloud.aiplatform.v1.PreTunedModel.getDefaultInstance()) { + sourceModel_ = + com.google.cloud.aiplatform.v1.PreTunedModel.newBuilder( + (com.google.cloud.aiplatform.v1.PreTunedModel) sourceModel_) + .mergeFrom(value) + .buildPartial(); + } else { + sourceModel_ = value; + } + onChanged(); + } else { + if (sourceModelCase_ == 31) { + preTunedModelBuilder_.mergeFrom(value); + } else { + preTunedModelBuilder_.setMessage(value); + } + } + sourceModelCase_ = 31; + return this; + } + + /** + * + * + *
+     * The pre-tuned model for continuous tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.PreTunedModel pre_tuned_model = 31; + */ + public Builder clearPreTunedModel() { + if (preTunedModelBuilder_ == null) { + if (sourceModelCase_ == 31) { + sourceModelCase_ = 0; + sourceModel_ = null; + onChanged(); + } + } else { + if (sourceModelCase_ == 31) { + sourceModelCase_ = 0; + sourceModel_ = null; + } + preTunedModelBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The pre-tuned model for continuous tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.PreTunedModel pre_tuned_model = 31; + */ + public com.google.cloud.aiplatform.v1.PreTunedModel.Builder getPreTunedModelBuilder() { + return getPreTunedModelFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The pre-tuned model for continuous tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.PreTunedModel pre_tuned_model = 31; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PreTunedModelOrBuilder getPreTunedModelOrBuilder() { + if ((sourceModelCase_ == 31) && (preTunedModelBuilder_ != null)) { + return preTunedModelBuilder_.getMessageOrBuilder(); + } else { + if (sourceModelCase_ == 31) { + return (com.google.cloud.aiplatform.v1.PreTunedModel) sourceModel_; + } + return com.google.cloud.aiplatform.v1.PreTunedModel.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The pre-tuned model for continuous tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.PreTunedModel pre_tuned_model = 31; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PreTunedModel, + com.google.cloud.aiplatform.v1.PreTunedModel.Builder, + com.google.cloud.aiplatform.v1.PreTunedModelOrBuilder> + getPreTunedModelFieldBuilder() { + if (preTunedModelBuilder_ == null) { + if (!(sourceModelCase_ == 31)) { + sourceModel_ = com.google.cloud.aiplatform.v1.PreTunedModel.getDefaultInstance(); + } + preTunedModelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PreTunedModel, + com.google.cloud.aiplatform.v1.PreTunedModel.Builder, + com.google.cloud.aiplatform.v1.PreTunedModelOrBuilder>( + (com.google.cloud.aiplatform.v1.PreTunedModel) sourceModel_, + getParentForChildren(), + isClean()); + sourceModel_ = null; + } + sourceModelCase_ = 31; + onChanged(); + return preTunedModelBuilder_; + } + private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.aiplatform.v1.SupervisedTuningSpec, com.google.cloud.aiplatform.v1.SupervisedTuningSpec.Builder, @@ -2615,7 +2928,7 @@ public Builder setName(java.lang.String value) { throw new NullPointerException(); } name_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2636,7 +2949,7 @@ public Builder setName(java.lang.String value) { */ public Builder clearName() { name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -2662,7 +2975,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); name_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2675,7 +2988,10 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { *
      * Optional. The display name of the
      * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
-     * characters long and can consist of any UTF-8 characters.
+     * characters long and can consist of any UTF-8 characters. For continuous
+     * tuning, tuned_model_display_name will by default use the same display name
+     * as the pre-tuned model. If a new display name is provided, the tuning job
+     * will create a new model instead of a new version.
      * 
* * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2700,7 +3016,10 @@ public java.lang.String getTunedModelDisplayName() { *
      * Optional. The display name of the
      * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
-     * characters long and can consist of any UTF-8 characters.
+     * characters long and can consist of any UTF-8 characters. For continuous
+     * tuning, tuned_model_display_name will by default use the same display name
+     * as the pre-tuned model. If a new display name is provided, the tuning job
+     * will create a new model instead of a new version.
      * 
* * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2725,7 +3044,10 @@ public com.google.protobuf.ByteString getTunedModelDisplayNameBytes() { *
      * Optional. The display name of the
      * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
-     * characters long and can consist of any UTF-8 characters.
+     * characters long and can consist of any UTF-8 characters. For continuous
+     * tuning, tuned_model_display_name will by default use the same display name
+     * as the pre-tuned model. If a new display name is provided, the tuning job
+     * will create a new model instead of a new version.
      * 
* * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2738,7 +3060,7 @@ public Builder setTunedModelDisplayName(java.lang.String value) { throw new NullPointerException(); } tunedModelDisplayName_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2749,7 +3071,10 @@ public Builder setTunedModelDisplayName(java.lang.String value) { *
      * Optional. The display name of the
      * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
-     * characters long and can consist of any UTF-8 characters.
+     * characters long and can consist of any UTF-8 characters. For continuous
+     * tuning, tuned_model_display_name will by default use the same display name
+     * as the pre-tuned model. If a new display name is provided, the tuning job
+     * will create a new model instead of a new version.
      * 
* * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2758,7 +3083,7 @@ public Builder setTunedModelDisplayName(java.lang.String value) { */ public Builder clearTunedModelDisplayName() { tunedModelDisplayName_ = getDefaultInstance().getTunedModelDisplayName(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -2769,7 +3094,10 @@ public Builder clearTunedModelDisplayName() { *
      * Optional. The display name of the
      * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
-     * characters long and can consist of any UTF-8 characters.
+     * characters long and can consist of any UTF-8 characters. For continuous
+     * tuning, tuned_model_display_name will by default use the same display name
+     * as the pre-tuned model. If a new display name is provided, the tuning job
+     * will create a new model instead of a new version.
      * 
* * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2783,7 +3111,7 @@ public Builder setTunedModelDisplayNameBytes(com.google.protobuf.ByteString valu } checkByteStringIsUtf8(value); tunedModelDisplayName_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2856,7 +3184,7 @@ public Builder setDescription(java.lang.String value) { throw new NullPointerException(); } description_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2875,7 +3203,7 @@ public Builder setDescription(java.lang.String value) { */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } @@ -2899,7 +3227,7 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); description_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2940,7 +3268,7 @@ public int getStateValue() { */ public Builder setStateValue(int value) { state_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2983,7 +3311,7 @@ public Builder setState(com.google.cloud.aiplatform.v1.JobState value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; state_ = value.getNumber(); onChanged(); return this; @@ -3003,7 +3331,7 @@ public Builder setState(com.google.cloud.aiplatform.v1.JobState value) { * @return This builder for chaining. */ public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); state_ = 0; onChanged(); return this; @@ -3031,7 +3359,7 @@ public Builder clearState() { * @return Whether the createTime field is set. */ public boolean hasCreateTime() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** @@ -3079,7 +3407,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { } else { createTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3102,7 +3430,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal } else { createTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3121,7 +3449,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) + if (((bitField0_ & 0x00000080) != 0) && createTime_ != null && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCreateTimeBuilder().mergeFrom(value); @@ -3132,7 +3460,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { createTimeBuilder_.mergeFrom(value); } if (createTime_ != null) { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); } return this; @@ -3151,7 +3479,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { *
*/ public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); @@ -3174,7 +3502,7 @@ public Builder clearCreateTime() { *
*/ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } @@ -3252,7 +3580,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * @return Whether the startTime field is set. */ public boolean hasStartTime() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** @@ -3298,7 +3626,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { } else { startTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3321,7 +3649,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu } else { startTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3340,7 +3668,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu */ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { if (startTimeBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) + if (((bitField0_ & 0x00000100) != 0) && startTime_ != null && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getStartTimeBuilder().mergeFrom(value); @@ -3351,7 +3679,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { startTimeBuilder_.mergeFrom(value); } if (startTime_ != null) { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); } return this; @@ -3370,7 +3698,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { *
*/ public Builder clearStartTime() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); startTime_ = null; if (startTimeBuilder_ != null) { startTimeBuilder_.dispose(); @@ -3393,7 +3721,7 @@ public Builder clearStartTime() { *
*/ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return getStartTimeFieldBuilder().getBuilder(); } @@ -3469,7 +3797,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * @return Whether the endTime field is set. */ public boolean hasEndTime() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** @@ -3515,7 +3843,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { } else { endTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3538,7 +3866,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) } else { endTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3557,7 +3885,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) */ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00000200) != 0) && endTime_ != null && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getEndTimeBuilder().mergeFrom(value); @@ -3568,7 +3896,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { endTimeBuilder_.mergeFrom(value); } if (endTime_ != null) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); } return this; @@ -3587,7 +3915,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { *
*/ public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); endTime_ = null; if (endTimeBuilder_ != null) { endTimeBuilder_.dispose(); @@ -3610,7 +3938,7 @@ public Builder clearEndTime() { *
*/ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return getEndTimeFieldBuilder().getBuilder(); } @@ -3687,7 +4015,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * @return Whether the updateTime field is set. */ public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** @@ -3737,7 +4065,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { } else { updateTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3761,7 +4089,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal } else { updateTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3781,7 +4109,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) + if (((bitField0_ & 0x00000400) != 0) && updateTime_ != null && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getUpdateTimeBuilder().mergeFrom(value); @@ -3792,7 +4120,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { updateTimeBuilder_.mergeFrom(value); } if (updateTime_ != null) { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); } return this; @@ -3812,7 +4140,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { *
*/ public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); updateTime_ = null; if (updateTimeBuilder_ != null) { updateTimeBuilder_.dispose(); @@ -3836,7 +4164,7 @@ public Builder clearUpdateTime() { *
*/ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return getUpdateTimeFieldBuilder().getBuilder(); } @@ -3912,7 +4240,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * @return Whether the error field is set. */ public boolean hasError() { - return ((bitField0_ & 0x00000400) != 0); + return ((bitField0_ & 0x00000800) != 0); } /** @@ -3954,7 +4282,7 @@ public Builder setError(com.google.rpc.Status value) { } else { errorBuilder_.setMessage(value); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -3975,7 +4303,7 @@ public Builder setError(com.google.rpc.Status.Builder builderForValue) { } else { errorBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -3992,7 +4320,7 @@ public Builder setError(com.google.rpc.Status.Builder builderForValue) { */ public Builder mergeError(com.google.rpc.Status value) { if (errorBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0) + if (((bitField0_ & 0x00000800) != 0) && error_ != null && error_ != com.google.rpc.Status.getDefaultInstance()) { getErrorBuilder().mergeFrom(value); @@ -4003,7 +4331,7 @@ public Builder mergeError(com.google.rpc.Status value) { errorBuilder_.mergeFrom(value); } if (error_ != null) { - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); } return this; @@ -4020,7 +4348,7 @@ public Builder mergeError(com.google.rpc.Status value) { * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder clearError() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); error_ = null; if (errorBuilder_ != null) { errorBuilder_.dispose(); @@ -4041,7 +4369,7 @@ public Builder clearError() { * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.rpc.Status.Builder getErrorBuilder() { - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return getErrorFieldBuilder().getBuilder(); } @@ -4105,7 +4433,7 @@ private com.google.protobuf.MapField interna if (!labels_.isMutable()) { labels_ = labels_.copy(); } - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return labels_; } @@ -4231,7 +4559,7 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { } public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); internalGetMutableLabels().getMutableMap().clear(); return this; } @@ -4265,7 +4593,7 @@ public Builder removeLabels(java.lang.String key) { /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; return internalGetMutableLabels().getMutableMap(); } @@ -4295,7 +4623,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { throw new NullPointerException("map value"); } internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; return this; } @@ -4319,7 +4647,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { */ public Builder putAllLabels(java.util.Map values) { internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; return this; } @@ -4397,7 +4725,7 @@ public Builder setExperiment(java.lang.String value) { throw new NullPointerException(); } experiment_ = value; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4418,7 +4746,7 @@ public Builder setExperiment(java.lang.String value) { */ public Builder clearExperiment() { experiment_ = getDefaultInstance().getExperiment(); - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00002000); onChanged(); return this; } @@ -4444,7 +4772,7 @@ public Builder setExperimentBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); experiment_ = value; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4471,7 +4799,7 @@ public Builder setExperimentBytes(com.google.protobuf.ByteString value) { * @return Whether the tunedModel field is set. */ public boolean hasTunedModel() { - return ((bitField0_ & 0x00002000) != 0); + return ((bitField0_ & 0x00004000) != 0); } /** @@ -4519,7 +4847,7 @@ public Builder setTunedModel(com.google.cloud.aiplatform.v1.TunedModel value) { } else { tunedModelBuilder_.setMessage(value); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -4543,7 +4871,7 @@ public Builder setTunedModel( } else { tunedModelBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -4562,7 +4890,7 @@ public Builder setTunedModel( */ public Builder mergeTunedModel(com.google.cloud.aiplatform.v1.TunedModel value) { if (tunedModelBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0) + if (((bitField0_ & 0x00004000) != 0) && tunedModel_ != null && tunedModel_ != com.google.cloud.aiplatform.v1.TunedModel.getDefaultInstance()) { getTunedModelBuilder().mergeFrom(value); @@ -4573,7 +4901,7 @@ public Builder mergeTunedModel(com.google.cloud.aiplatform.v1.TunedModel value) tunedModelBuilder_.mergeFrom(value); } if (tunedModel_ != null) { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); } return this; @@ -4592,7 +4920,7 @@ public Builder mergeTunedModel(com.google.cloud.aiplatform.v1.TunedModel value) * */ public Builder clearTunedModel() { - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00004000); tunedModel_ = null; if (tunedModelBuilder_ != null) { tunedModelBuilder_.dispose(); @@ -4615,7 +4943,7 @@ public Builder clearTunedModel() { * */ public com.google.cloud.aiplatform.v1.TunedModel.Builder getTunedModelBuilder() { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return getTunedModelFieldBuilder().getBuilder(); } @@ -4693,7 +5021,7 @@ public com.google.cloud.aiplatform.v1.TunedModelOrBuilder getTunedModelOrBuilder * @return Whether the tuningDataStats field is set. */ public boolean hasTuningDataStats() { - return ((bitField0_ & 0x00004000) != 0); + return ((bitField0_ & 0x00008000) != 0); } /** @@ -4741,7 +5069,7 @@ public Builder setTuningDataStats(com.google.cloud.aiplatform.v1.TuningDataStats } else { tuningDataStatsBuilder_.setMessage(value); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4765,7 +5093,7 @@ public Builder setTuningDataStats( } else { tuningDataStatsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4784,7 +5112,7 @@ public Builder setTuningDataStats( */ public Builder mergeTuningDataStats(com.google.cloud.aiplatform.v1.TuningDataStats value) { if (tuningDataStatsBuilder_ == null) { - if (((bitField0_ & 0x00004000) != 0) + if (((bitField0_ & 0x00008000) != 0) && tuningDataStats_ != null && tuningDataStats_ != com.google.cloud.aiplatform.v1.TuningDataStats.getDefaultInstance()) { @@ -4796,7 +5124,7 @@ public Builder mergeTuningDataStats(com.google.cloud.aiplatform.v1.TuningDataSta tuningDataStatsBuilder_.mergeFrom(value); } if (tuningDataStats_ != null) { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); } return this; @@ -4815,7 +5143,7 @@ public Builder mergeTuningDataStats(com.google.cloud.aiplatform.v1.TuningDataSta * */ public Builder clearTuningDataStats() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); tuningDataStats_ = null; if (tuningDataStatsBuilder_ != null) { tuningDataStatsBuilder_.dispose(); @@ -4838,7 +5166,7 @@ public Builder clearTuningDataStats() { * */ public com.google.cloud.aiplatform.v1.TuningDataStats.Builder getTuningDataStatsBuilder() { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return getTuningDataStatsFieldBuilder().getBuilder(); } @@ -4915,7 +5243,7 @@ public com.google.cloud.aiplatform.v1.TuningDataStatsOrBuilder getTuningDataStat * @return Whether the encryptionSpec field is set. */ public boolean hasEncryptionSpec() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** @@ -4961,7 +5289,7 @@ public Builder setEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec v } else { encryptionSpecBuilder_.setMessage(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4984,7 +5312,7 @@ public Builder setEncryptionSpec( } else { encryptionSpecBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -5002,7 +5330,7 @@ public Builder setEncryptionSpec( */ public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { if (encryptionSpecBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) + if (((bitField0_ & 0x00010000) != 0) && encryptionSpec_ != null && encryptionSpec_ != com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance()) { @@ -5014,7 +5342,7 @@ public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpecBuilder_.mergeFrom(value); } if (encryptionSpec_ != null) { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); } return this; @@ -5032,7 +5360,7 @@ public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 16; */ public Builder clearEncryptionSpec() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00010000); encryptionSpec_ = null; if (encryptionSpecBuilder_ != null) { encryptionSpecBuilder_.dispose(); @@ -5054,7 +5382,7 @@ public Builder clearEncryptionSpec() { * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 16; */ public com.google.cloud.aiplatform.v1.EncryptionSpec.Builder getEncryptionSpecBuilder() { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return getEncryptionSpecFieldBuilder().getBuilder(); } @@ -5191,7 +5519,7 @@ public Builder setServiceAccount(java.lang.String value) { throw new NullPointerException(); } serviceAccount_ = value; - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -5215,7 +5543,7 @@ public Builder setServiceAccount(java.lang.String value) { */ public Builder clearServiceAccount() { serviceAccount_ = getDefaultInstance().getServiceAccount(); - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); onChanged(); return this; } @@ -5244,7 +5572,7 @@ public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); serviceAccount_ = value; - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobOrBuilder.java index 033f36e9bb00..13b5094e4595 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobOrBuilder.java @@ -66,6 +66,43 @@ public interface TuningJobOrBuilder */ com.google.protobuf.ByteString getBaseModelBytes(); + /** + * + * + *
+   * The pre-tuned model for continuous tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1.PreTunedModel pre_tuned_model = 31; + * + * @return Whether the preTunedModel field is set. + */ + boolean hasPreTunedModel(); + + /** + * + * + *
+   * The pre-tuned model for continuous tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1.PreTunedModel pre_tuned_model = 31; + * + * @return The preTunedModel. + */ + com.google.cloud.aiplatform.v1.PreTunedModel getPreTunedModel(); + + /** + * + * + *
+   * The pre-tuned model for continuous tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1.PreTunedModel pre_tuned_model = 31; + */ + com.google.cloud.aiplatform.v1.PreTunedModelOrBuilder getPreTunedModelOrBuilder(); + /** * * @@ -141,7 +178,10 @@ public interface TuningJobOrBuilder *
    * Optional. The display name of the
    * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
-   * characters long and can consist of any UTF-8 characters.
+   * characters long and can consist of any UTF-8 characters. For continuous
+   * tuning, tuned_model_display_name will by default use the same display name
+   * as the pre-tuned model. If a new display name is provided, the tuning job
+   * will create a new model instead of a new version.
    * 
* * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -156,7 +196,10 @@ public interface TuningJobOrBuilder *
    * Optional. The display name of the
    * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
-   * characters long and can consist of any UTF-8 characters.
+   * characters long and can consist of any UTF-8 characters. For continuous
+   * tuning, tuned_model_display_name will by default use the same display name
+   * as the pre-tuned model. If a new display name is provided, the tuning job
+   * will create a new model instead of a new version.
    * 
* * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobProto.java index 7b4cc43a29cb..dc3e991e724e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobProto.java @@ -72,6 +72,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_TunedModelCheckpoint_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_TunedModelCheckpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_PreTunedModel_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_PreTunedModel_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -88,11 +92,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "esource.proto\032(google/cloud/aiplatform/v1/content.proto\0320google/cloud/aiplatform" + "/v1/encryption_spec.proto\032*google/cloud/" + "aiplatform/v1/job_state.proto\032\037google/pr" - + "otobuf/timestamp.proto\032\027google/rpc/status.proto\"\307\010\n" + + "otobuf/timestamp.proto\032\027google/rpc/status.proto\"\215\t\n" + "\tTuningJob\022\024\n\n" - + "base_model\030\004 \001(\tH\000\022R\n" - + "\026supervised_tuning_spec\030\005 \001(\01320.go" - + "ogle.cloud.aiplatform.v1.SupervisedTuningSpecH\001\022\024\n" + + "base_model\030\004 \001(\tH\000\022D\n" + + "\017pre_tuned_model\030\037" + + " \001(\0132).google.cloud.aiplatform.v1.PreTunedModelH\000\022R\n" + + "\026supervised_tuning_spec\030\005" + + " \001(\01320.google.cloud.aiplatform.v1.SupervisedTuningSpecH\001\022\024\n" + "\004name\030\001 \001(\tB\006\340A\010\340A\003\022%\n" + "\030tuned_model_display_name\030\002 \001(\tB\003\340A\001\022\030\n" + "\013description\030\003 \001(\tB\003\340A\001\0228\n" @@ -109,18 +115,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "experiment\030\r" + " \001(\tB)\340A\003\372A#\n" + "!aiplatform.googleapis.com/Context\022@\n" - + "\013tuned_model\030\016 \001(\013" - + "2&.google.cloud.aiplatform.v1.TunedModelB\003\340A\003\022K\n" - + "\021tuning_data_stats\030\017 \001(\0132+.googl" - + "e.cloud.aiplatform.v1.TuningDataStatsB\003\340A\003\022C\n" + + "\013tuned_model\030\016" + + " \001(\0132&.google.cloud.aiplatform.v1.TunedModelB\003\340A\003\022K\n" + + "\021tuning_data_stats\030\017" + + " \001(\0132+.google.cloud.aiplatform.v1.TuningDataStatsB\003\340A\003\022C\n" + "\017encryption_spec\030\020" + " \001(\0132*.google.cloud.aiplatform.v1.EncryptionSpec\022\027\n" + "\017service_account\030\026 \001(\t\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001:\200\001\352A}\n" - + "#aiplatform.googleapis.com/TuningJob\022?projects/{pr" - + "oject}/locations/{location}/tuningJobs/{tuning_job}*\n" + + "#aiplatform.googleapis.com/TuningJob\022?projects/{project}/loc" + + "ations/{location}/tuningJobs/{tuning_job}*\n" + "tuningJobs2\ttuningJobB\016\n" + "\014source_modelB\r\n" + "\013tuning_spec\"\316\001\n\n" @@ -140,8 +146,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006median\030\005 \001(\001B\003\340A\003\022\017\n" + "\002p5\030\006 \001(\001B\003\340A\003\022\020\n" + "\003p95\030\007 \001(\001B\003\340A\003\022c\n" - + "\007buckets\030\010 \003(\0132M.google.cloud.aiplatform.v1.Sup" - + "ervisedTuningDatasetDistribution.DatasetBucketB\003\340A\003\032J\n\r" + + "\007buckets\030\010 \003(\0132M.google.cloud.aiplatform.v1.SupervisedTun" + + "ingDatasetDistribution.DatasetBucketB\003\340A\003\032J\n\r" + "DatasetBucket\022\022\n" + "\005count\030\001 \001(\001B\003\340A\003\022\021\n" + "\004left\030\002 \001(\001B\003\340A\003\022\022\n" @@ -152,27 +158,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\036total_billable_character_count\030\003 \001(\003B\005\030\001\340A\003\022\'\n" + "\032total_billable_token_count\030\t \001(\003B\003\340A\003\022\036\n" + "\021tuning_step_count\030\004 \001(\003B\003\340A\003\022k\n" - + "\035user_input_token_distribution\030\005 \001" - + "(\0132?.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionB\003\340A\003\022l\n" - + "\036user_output_token_distribution\030\006 \001(\0132?.googl" - + "e.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionB\003\340A\003\022s\n" - + "%user_message_per_example_distribution\030\007 \001(\0132?.google.c" - + "loud.aiplatform.v1.SupervisedTuningDatasetDistributionB\003\340A\003\022G\n" - + "\025user_dataset_examples\030\010" - + " \003(\0132#.google.cloud.aiplatform.v1.ContentB\003\340A\003\022*\n" + + "\035user_input_token_distribution\030\005 \001(\0132?.googl" + + "e.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionB\003\340A\003\022l\n" + + "\036user_output_token_distribution\030\006 \001(\0132?.google.cloud.ai" + + "platform.v1.SupervisedTuningDatasetDistributionB\003\340A\003\022s\n" + + "%user_message_per_example_distribution\030\007 \001(\0132?.google.cloud.aipla" + + "tform.v1.SupervisedTuningDatasetDistributionB\003\340A\003\022G\n" + + "\025user_dataset_examples\030\010 \003(\013" + + "2#.google.cloud.aiplatform.v1.ContentB\003\340A\003\022*\n" + "\035total_truncated_example_count\030\n" + " \001(\003B\003\340A\003\022&\n" + "\031truncated_example_indices\030\013 \003(\003B\003\340A\003\022$\n" + "\027dropped_example_reasons\030\014 \003(\tB\003\340A\003\"\205\001\n" + "\017TuningDataStats\022]\n" - + "\034supervised_tuning_data_stats\030\001 \001(\01325.googl" - + "e.cloud.aiplatform.v1.SupervisedTuningDataStatsH\000B\023\n" + + "\034supervised_tuning_data_stats\030\001 \001(\01325.google.cloud.ai" + + "platform.v1.SupervisedTuningDataStatsH\000B\023\n" + "\021tuning_data_stats\"\372\002\n" + "\031SupervisedHyperParameters\022\030\n" + "\013epoch_count\030\001 \001(\003B\003\340A\001\022%\n" + "\030learning_rate_multiplier\030\002 \001(\001B\003\340A\001\022\\\n" - + "\014adapter_size\030\003 \001(\0162A.google.clo" - + "ud.aiplatform.v1.SupervisedHyperParameters.AdapterSizeB\003\340A\001\"\275\001\n" + + "\014adapter_size\030\003 \001(\0162A.google.cloud.aiplatf" + + "orm.v1.SupervisedHyperParameters.AdapterSizeB\003\340A\001\"\275\001\n" + "\013AdapterSize\022\034\n" + "\030ADAPTER_SIZE_UNSPECIFIED\020\000\022\024\n" + "\020ADAPTER_SIZE_ONE\020\001\022\024\n" @@ -186,8 +192,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\026validation_dataset_uri\030\002 \001(\tB\003\340A\001\022T\n" + "\020hyper_parameters\030\003" + " \001(\01325.google.cloud.aiplatform.v1.SupervisedHyperParametersB\003\340A\001\022(\n" - + "\033export_last_checkpoint_only\030\006 \001(\010B\003\340A\001\"\343\001\n" - + "\r" + + "\033export_last_checkpoint_only\030\006 \001(\010B\003\340A\001\"\343\001\n\r" + "TunedModelRef\022;\n" + "\013tuned_model\030\001 \001(\tB$\372A!\n" + "\037aiplatform.googleapis.com/ModelH\000\022>\n\n" @@ -200,11 +205,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "checkpoint_id\030\001 \001(\t\022\r\n" + "\005epoch\030\002 \001(\003\022\014\n" + "\004step\030\003 \001(\003\022\020\n" - + "\010endpoint\030\004 \001(\tB\314\001\n" - + "\036com.google.cloud.aiplatform.v1B\016TuningJobProtoP\001Z>cloud.google.com/go/aipla" - + "tform/apiv1/aiplatformpb;aiplatformpb\252\002\032" - + "Google.Cloud.AIPlatform.V1\312\002\032Google\\Clou" - + "d\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006proto3" + + "\010endpoint\030\004 \001(\t\"\204\001\n\r" + + "PreTunedModel\022>\n" + + "\020tuned_model_name\030\001 \001(\tB$\372A!\n" + + "\037aiplatform.googleapis.com/Model\022\032\n\r" + + "checkpoint_id\030\002 \001(\tB\003\340A\001\022\027\n\n" + + "base_model\030\003 \001(\tB\003\340A\003B\314\001\n" + + "\036com.google.cloud.aiplatform.v1B\016TuningJobProtoP\001Z>cloud.google.com/go/" + + "aiplatform/apiv1/aiplatformpb;aiplatform" + + "pb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Google" + + "\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -225,6 +235,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_aiplatform_v1_TuningJob_descriptor, new java.lang.String[] { "BaseModel", + "PreTunedModel", "SupervisedTuningSpec", "Name", "TunedModelDisplayName", @@ -340,6 +351,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "CheckpointId", "Epoch", "Step", "Endpoint", }); + internal_static_google_cloud_aiplatform_v1_PreTunedModel_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1_PreTunedModel_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_PreTunedModel_descriptor, + new java.lang.String[] { + "TunedModelName", "CheckpointId", "BaseModel", + }); 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/proto/google/cloud/aiplatform/v1/tuning_job.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tuning_job.proto index dc773999069a..93134c5ec03b 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tuning_job.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tuning_job.proto @@ -45,6 +45,9 @@ message TuningJob { // The base model that is being tuned. See [Supported // models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models). string base_model = 4; + + // The pre-tuned model for continuous tuning. + PreTunedModel pre_tuned_model = 31; } oneof tuning_spec { @@ -61,7 +64,10 @@ message TuningJob { // Optional. The display name of the // [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128 - // characters long and can consist of any UTF-8 characters. + // characters long and can consist of any UTF-8 characters. For continuous + // tuning, tuned_model_display_name will by default use the same display name + // as the pre-tuned model. If a new display name is provided, the tuning job + // will create a new model instead of a new version. string tuned_model_display_name = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The description of the @@ -147,7 +153,18 @@ message TuningJob { // this [TuningJob][google.cloud.aiplatform.v1.TuningJob]. message TunedModel { // Output only. The resource name of the TunedModel. Format: - // `projects/{project}/locations/{location}/models/{model}`. + // + // `projects/{project}/locations/{location}/models/{model}@{version_id}` + // + // When tuning from a base model, the version ID will be 1. + // + // For continuous tuning, if the provided tuned_model_display_name is set and + // different from parent model's display name, the tuned model will have a new + // parent model with version 1. Otherwise the version id will be incremented + // by 1 from the last version ID in the parent model. E.g., + // + // `projects/{project}/locations/{location}/models/{model}@{last_version_id + + // 1}` string model = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -373,3 +390,28 @@ message TunedModelCheckpoint { // `projects/{project}/locations/{location}/endpoints/{endpoint}`. string endpoint = 4; } + +// A pre-tuned model for continuous tuning. +message PreTunedModel { + // The resource name of the Model. + // E.g., a model resource name with a specified version id or alias: + // + // `projects/{project}/locations/{location}/models/{model}@{version_id}` + // + // `projects/{project}/locations/{location}/models/{model}@{alias}` + // + // Or, omit the version id to use the default version: + // + // `projects/{project}/locations/{location}/models/{model}` + string tuned_model_name = 1 [(google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + }]; + + // Optional. The source checkpoint id. If not specified, the default + // checkpoint will be used. + string checkpoint_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The name of the base model this + // [PreTunedModel][google.cloud.aiplatform.v1.PreTunedModel] was tuned from. + string base_model = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponse.java index dc822de61c0f..e7bece9ebc14 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponse.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponse.java @@ -45,6 +45,7 @@ private FunctionResponse(com.google.protobuf.GeneratedMessageV3.Builder build private FunctionResponse() { id_ = ""; name_ = ""; + parts_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -237,6 +238,98 @@ public com.google.protobuf.StructOrBuilder getResponseOrBuilder() { return response_ == null ? com.google.protobuf.Struct.getDefaultInstance() : response_; } + public static final int PARTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List parts_; + + /** + * + * + *
+   * Optional. Ordered `Parts` that constitute a function response. Parts may
+   * have different IANA MIME types.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getPartsList() { + return parts_; + } + + /** + * + * + *
+   * Optional. Ordered `Parts` that constitute a function response. Parts may
+   * have different IANA MIME types.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getPartsOrBuilderList() { + return parts_; + } + + /** + * + * + *
+   * Optional. Ordered `Parts` that constitute a function response. Parts may
+   * have different IANA MIME types.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getPartsCount() { + return parts_.size(); + } + + /** + * + * + *
+   * Optional. Ordered `Parts` that constitute a function response. Parts may
+   * have different IANA MIME types.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponsePart getParts(int index) { + return parts_.get(index); + } + + /** + * + * + *
+   * Optional. Ordered `Parts` that constitute a function response. Parts may
+   * have different IANA MIME types.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponsePartOrBuilder getPartsOrBuilder( + int index) { + return parts_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -260,6 +353,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, id_); } + for (int i = 0; i < parts_.size(); i++) { + output.writeMessage(4, parts_.get(i)); + } getUnknownFields().writeTo(output); } @@ -278,6 +374,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, id_); } + for (int i = 0; i < parts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, parts_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -300,6 +399,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResponse()) { if (!getResponse().equals(other.getResponse())) return false; } + if (!getPartsList().equals(other.getPartsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,6 +419,10 @@ public int hashCode() { hash = (37 * hash) + RESPONSE_FIELD_NUMBER; hash = (53 * hash) + getResponse().hashCode(); } + if (getPartsCount() > 0) { + hash = (37 * hash) + PARTS_FIELD_NUMBER; + hash = (53 * hash) + getPartsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -464,6 +568,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getResponseFieldBuilder(); + getPartsFieldBuilder(); } } @@ -478,6 +583,13 @@ public Builder clear() { responseBuilder_.dispose(); responseBuilder_ = null; } + if (partsBuilder_ == null) { + parts_ = java.util.Collections.emptyList(); + } else { + parts_ = null; + partsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -505,6 +617,7 @@ public com.google.cloud.aiplatform.v1beta1.FunctionResponse build() { public com.google.cloud.aiplatform.v1beta1.FunctionResponse buildPartial() { com.google.cloud.aiplatform.v1beta1.FunctionResponse result = new com.google.cloud.aiplatform.v1beta1.FunctionResponse(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -512,6 +625,19 @@ public com.google.cloud.aiplatform.v1beta1.FunctionResponse buildPartial() { return result; } + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.FunctionResponse result) { + if (partsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + parts_ = java.util.Collections.unmodifiableList(parts_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.parts_ = parts_; + } else { + result.parts_ = partsBuilder_.build(); + } + } + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.FunctionResponse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { @@ -587,6 +713,33 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.FunctionResponse ot if (other.hasResponse()) { mergeResponse(other.getResponse()); } + if (partsBuilder_ == null) { + if (!other.parts_.isEmpty()) { + if (parts_.isEmpty()) { + parts_ = other.parts_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePartsIsMutable(); + parts_.addAll(other.parts_); + } + onChanged(); + } + } else { + if (!other.parts_.isEmpty()) { + if (partsBuilder_.isEmpty()) { + partsBuilder_.dispose(); + partsBuilder_ = null; + parts_ = other.parts_; + bitField0_ = (bitField0_ & ~0x00000008); + partsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPartsFieldBuilder() + : null; + } else { + partsBuilder_.addAllMessages(other.parts_); + } + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -631,6 +784,20 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 26 + case 34: + { + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.parser(), + extensionRegistry); + if (partsBuilder_ == null) { + ensurePartsIsMutable(); + parts_.add(m); + } else { + partsBuilder_.addMessage(m); + } + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1099,6 +1266,440 @@ public com.google.protobuf.StructOrBuilder getResponseOrBuilder() { return responseBuilder_; } + private java.util.List parts_ = + java.util.Collections.emptyList(); + + private void ensurePartsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + parts_ = + new java.util.ArrayList( + parts_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart, + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.Builder, + com.google.cloud.aiplatform.v1beta1.FunctionResponsePartOrBuilder> + partsBuilder_; + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getPartsList() { + if (partsBuilder_ == null) { + return java.util.Collections.unmodifiableList(parts_); + } else { + return partsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getPartsCount() { + if (partsBuilder_ == null) { + return parts_.size(); + } else { + return partsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.FunctionResponsePart getParts(int index) { + if (partsBuilder_ == null) { + return parts_.get(index); + } else { + return partsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setParts( + int index, com.google.cloud.aiplatform.v1beta1.FunctionResponsePart value) { + if (partsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartsIsMutable(); + parts_.set(index, value); + onChanged(); + } else { + partsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setParts( + int index, + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.Builder builderForValue) { + if (partsBuilder_ == null) { + ensurePartsIsMutable(); + parts_.set(index, builderForValue.build()); + onChanged(); + } else { + partsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParts(com.google.cloud.aiplatform.v1beta1.FunctionResponsePart value) { + if (partsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartsIsMutable(); + parts_.add(value); + onChanged(); + } else { + partsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParts( + int index, com.google.cloud.aiplatform.v1beta1.FunctionResponsePart value) { + if (partsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartsIsMutable(); + parts_.add(index, value); + onChanged(); + } else { + partsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParts( + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.Builder builderForValue) { + if (partsBuilder_ == null) { + ensurePartsIsMutable(); + parts_.add(builderForValue.build()); + onChanged(); + } else { + partsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParts( + int index, + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.Builder builderForValue) { + if (partsBuilder_ == null) { + ensurePartsIsMutable(); + parts_.add(index, builderForValue.build()); + onChanged(); + } else { + partsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllParts( + java.lang.Iterable + values) { + if (partsBuilder_ == null) { + ensurePartsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parts_); + onChanged(); + } else { + partsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearParts() { + if (partsBuilder_ == null) { + parts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + partsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeParts(int index) { + if (partsBuilder_ == null) { + ensurePartsIsMutable(); + parts_.remove(index); + onChanged(); + } else { + partsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.Builder getPartsBuilder( + int index) { + return getPartsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.FunctionResponsePartOrBuilder getPartsOrBuilder( + int index) { + if (partsBuilder_ == null) { + return parts_.get(index); + } else { + return partsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.aiplatform.v1beta1.FunctionResponsePartOrBuilder> + getPartsOrBuilderList() { + if (partsBuilder_ != null) { + return partsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(parts_); + } + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.Builder addPartsBuilder() { + return getPartsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.Builder addPartsBuilder( + int index) { + return getPartsFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Ordered `Parts` that constitute a function response. Parts may
+     * have different IANA MIME types.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getPartsBuilderList() { + return getPartsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart, + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.Builder, + com.google.cloud.aiplatform.v1beta1.FunctionResponsePartOrBuilder> + getPartsFieldBuilder() { + if (partsBuilder_ == null) { + partsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart, + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.Builder, + com.google.cloud.aiplatform.v1beta1.FunctionResponsePartOrBuilder>( + parts_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + parts_ = null; + } + return partsBuilder_; + } + @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-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponseBlob.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponseBlob.java new file mode 100644 index 000000000000..e600b12c4c5f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponseBlob.java @@ -0,0 +1,970 @@ +/* + * Copyright 2025 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/v1beta1/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Raw media bytes for function response.
+ *
+ * Text should not be sent as raw bytes, use the 'text' field.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.FunctionResponseBlob} + */ +public final class FunctionResponseBlob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.FunctionResponseBlob) + FunctionResponseBlobOrBuilder { + private static final long serialVersionUID = 0L; + + // Use FunctionResponseBlob.newBuilder() to construct. + private FunctionResponseBlob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FunctionResponseBlob() { + mimeType_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FunctionResponseBlob(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseBlob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseBlob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.class, + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.Builder.class); + } + + public static final int MIME_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object mimeType_ = ""; + + /** + * + * + *
+   * Required. The IANA standard MIME type of the source data.
+   * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The IANA standard MIME type of the source data.
+   * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * Required. Raw bytes.
+   * 
+ * + * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. Display name of the blob.
+   *
+   * Used to provide a label or filename to distinguish blobs.
+   *
+   * This field is only returned in PromptMessage for prompt management.
+   * It is currently used in the Gemini GenerateContent calls only when server
+   * side tools (code_execution, google_search, and url_context) are enabled.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Display name of the blob.
+   *
+   * Used to provide a label or filename to distinguish blobs.
+   *
+   * This field is only returned in PromptMessage for prompt management.
+   * It is currently used in the Gemini GenerateContent calls only when server
+   * side tools (code_execution, google_search, and url_context) are enabled.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mimeType_); + } + if (!data_.isEmpty()) { + output.writeBytes(2, data_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mimeType_); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, data_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); + } + size += getUnknownFields().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.v1beta1.FunctionResponseBlob)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob other = + (com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob) obj; + + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getData().equals(other.getData())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob 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.v1beta1.FunctionResponseBlob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob 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.v1beta1.FunctionResponseBlob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob 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.v1beta1.FunctionResponseBlob parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob 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.v1beta1.FunctionResponseBlob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob 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.v1beta1.FunctionResponseBlob 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; + } + + /** + * + * + *
+   * Raw media bytes for function response.
+   *
+   * Text should not be sent as raw bytes, use the 'text' field.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.FunctionResponseBlob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.FunctionResponseBlob) + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseBlob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseBlob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.class, + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mimeType_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + displayName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseBlob_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob build() { + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob buildPartial() { + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob result = + new com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mimeType_ = mimeType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.data_ = data_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + } + } + + @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.v1beta1.FunctionResponseBlob) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob other) { + if (other == com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.getDefaultInstance()) + return this; + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + mimeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + data_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object mimeType_ = ""; + + /** + * + * + *
+     * Required. The IANA standard MIME type of the source data.
+     * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The IANA standard MIME type of the source data.
+     * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The IANA standard MIME type of the source data.
+     * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mimeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The IANA standard MIME type of the source data.
+     * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + mimeType_ = getDefaultInstance().getMimeType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The IANA standard MIME type of the source data.
+     * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mimeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * Required. Raw bytes.
+     * 
+ * + * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + /** + * + * + *
+     * Required. Raw bytes.
+     * 
+ * + * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Raw bytes.
+     * 
+ * + * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000002); + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. Display name of the blob.
+     *
+     * Used to provide a label or filename to distinguish blobs.
+     *
+     * This field is only returned in PromptMessage for prompt management.
+     * It is currently used in the Gemini GenerateContent calls only when server
+     * side tools (code_execution, google_search, and url_context) are enabled.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Display name of the blob.
+     *
+     * Used to provide a label or filename to distinguish blobs.
+     *
+     * This field is only returned in PromptMessage for prompt management.
+     * It is currently used in the Gemini GenerateContent calls only when server
+     * side tools (code_execution, google_search, and url_context) are enabled.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Display name of the blob.
+     *
+     * Used to provide a label or filename to distinguish blobs.
+     *
+     * This field is only returned in PromptMessage for prompt management.
+     * It is currently used in the Gemini GenerateContent calls only when server
+     * side tools (code_execution, google_search, and url_context) are enabled.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Display name of the blob.
+     *
+     * Used to provide a label or filename to distinguish blobs.
+     *
+     * This field is only returned in PromptMessage for prompt management.
+     * It is currently used in the Gemini GenerateContent calls only when server
+     * side tools (code_execution, google_search, and url_context) are enabled.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Display name of the blob.
+     *
+     * Used to provide a label or filename to distinguish blobs.
+     *
+     * This field is only returned in PromptMessage for prompt management.
+     * It is currently used in the Gemini GenerateContent calls only when server
+     * side tools (code_execution, google_search, and url_context) are enabled.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000004; + 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.v1beta1.FunctionResponseBlob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.FunctionResponseBlob) + private static final com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob(); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FunctionResponseBlob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v1beta1.FunctionResponseBlob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponseBlobOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponseBlobOrBuilder.java new file mode 100644 index 000000000000..961ab3bf6809 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponseBlobOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2025 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/v1beta1/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.aiplatform.v1beta1; + +public interface FunctionResponseBlobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.FunctionResponseBlob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The IANA standard MIME type of the source data.
+   * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + + /** + * + * + *
+   * Required. The IANA standard MIME type of the source data.
+   * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + /** + * + * + *
+   * Required. Raw bytes.
+   * 
+ * + * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The data. + */ + com.google.protobuf.ByteString getData(); + + /** + * + * + *
+   * Optional. Display name of the blob.
+   *
+   * Used to provide a label or filename to distinguish blobs.
+   *
+   * This field is only returned in PromptMessage for prompt management.
+   * It is currently used in the Gemini GenerateContent calls only when server
+   * side tools (code_execution, google_search, and url_context) are enabled.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. Display name of the blob.
+   *
+   * Used to provide a label or filename to distinguish blobs.
+   *
+   * This field is only returned in PromptMessage for prompt management.
+   * It is currently used in the Gemini GenerateContent calls only when server
+   * side tools (code_execution, google_search, and url_context) are enabled.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponseFileData.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponseFileData.java new file mode 100644 index 000000000000..69e1dc64e450 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponseFileData.java @@ -0,0 +1,1059 @@ +/* + * Copyright 2025 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/v1beta1/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * URI based data for function response.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.FunctionResponseFileData} + */ +public final class FunctionResponseFileData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.FunctionResponseFileData) + FunctionResponseFileDataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use FunctionResponseFileData.newBuilder() to construct. + private FunctionResponseFileData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FunctionResponseFileData() { + mimeType_ = ""; + fileUri_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FunctionResponseFileData(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseFileData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseFileData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.class, + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.Builder.class); + } + + public static final int MIME_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object mimeType_ = ""; + + /** + * + * + *
+   * Required. The IANA standard MIME type of the source data.
+   * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The IANA standard MIME type of the source data.
+   * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILE_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object fileUri_ = ""; + + /** + * + * + *
+   * Required. URI.
+   * 
+ * + * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fileUri. + */ + @java.lang.Override + public java.lang.String getFileUri() { + java.lang.Object ref = fileUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. URI.
+   * 
+ * + * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fileUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFileUriBytes() { + java.lang.Object ref = fileUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fileUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. Display name of the file data.
+   *
+   * Used to provide a label or filename to distinguish file datas.
+   *
+   * This field is only returned in PromptMessage for prompt management.
+   * It is currently used in the Gemini GenerateContent calls only when server
+   * side tools (code_execution, google_search, and url_context) are enabled.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Display name of the file data.
+   *
+   * Used to provide a label or filename to distinguish file datas.
+   *
+   * This field is only returned in PromptMessage for prompt management.
+   * It is currently used in the Gemini GenerateContent calls only when server
+   * side tools (code_execution, google_search, and url_context) are enabled.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mimeType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fileUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fileUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mimeType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fileUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fileUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + size += getUnknownFields().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.v1beta1.FunctionResponseFileData)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData other = + (com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData) obj; + + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getFileUri().equals(other.getFileUri())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (37 * hash) + FILE_URI_FIELD_NUMBER; + hash = (53 * hash) + getFileUri().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData 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.v1beta1.FunctionResponseFileData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData 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.v1beta1.FunctionResponseFileData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData 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.v1beta1.FunctionResponseFileData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData 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.v1beta1.FunctionResponseFileData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData 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.v1beta1.FunctionResponseFileData 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; + } + + /** + * + * + *
+   * URI based data for function response.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.FunctionResponseFileData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.FunctionResponseFileData) + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseFileData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseFileData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.class, + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mimeType_ = ""; + fileUri_ = ""; + displayName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseFileData_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData build() { + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData buildPartial() { + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData result = + new com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mimeType_ = mimeType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fileUri_ = fileUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + } + } + + @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.v1beta1.FunctionResponseFileData) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData other) { + if (other + == com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.getDefaultInstance()) + return this; + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFileUri().isEmpty()) { + fileUri_ = other.fileUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + mimeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + fileUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object mimeType_ = ""; + + /** + * + * + *
+     * Required. The IANA standard MIME type of the source data.
+     * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The IANA standard MIME type of the source data.
+     * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The IANA standard MIME type of the source data.
+     * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mimeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The IANA standard MIME type of the source data.
+     * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + mimeType_ = getDefaultInstance().getMimeType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The IANA standard MIME type of the source data.
+     * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mimeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object fileUri_ = ""; + + /** + * + * + *
+     * Required. URI.
+     * 
+ * + * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fileUri. + */ + public java.lang.String getFileUri() { + java.lang.Object ref = fileUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. URI.
+     * 
+ * + * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fileUri. + */ + public com.google.protobuf.ByteString getFileUriBytes() { + java.lang.Object ref = fileUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fileUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. URI.
+     * 
+ * + * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The fileUri to set. + * @return This builder for chaining. + */ + public Builder setFileUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fileUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. URI.
+     * 
+ * + * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFileUri() { + fileUri_ = getDefaultInstance().getFileUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. URI.
+     * 
+ * + * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for fileUri to set. + * @return This builder for chaining. + */ + public Builder setFileUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fileUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. Display name of the file data.
+     *
+     * Used to provide a label or filename to distinguish file datas.
+     *
+     * This field is only returned in PromptMessage for prompt management.
+     * It is currently used in the Gemini GenerateContent calls only when server
+     * side tools (code_execution, google_search, and url_context) are enabled.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Display name of the file data.
+     *
+     * Used to provide a label or filename to distinguish file datas.
+     *
+     * This field is only returned in PromptMessage for prompt management.
+     * It is currently used in the Gemini GenerateContent calls only when server
+     * side tools (code_execution, google_search, and url_context) are enabled.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Display name of the file data.
+     *
+     * Used to provide a label or filename to distinguish file datas.
+     *
+     * This field is only returned in PromptMessage for prompt management.
+     * It is currently used in the Gemini GenerateContent calls only when server
+     * side tools (code_execution, google_search, and url_context) are enabled.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Display name of the file data.
+     *
+     * Used to provide a label or filename to distinguish file datas.
+     *
+     * This field is only returned in PromptMessage for prompt management.
+     * It is currently used in the Gemini GenerateContent calls only when server
+     * side tools (code_execution, google_search, and url_context) are enabled.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Display name of the file data.
+     *
+     * Used to provide a label or filename to distinguish file datas.
+     *
+     * This field is only returned in PromptMessage for prompt management.
+     * It is currently used in the Gemini GenerateContent calls only when server
+     * side tools (code_execution, google_search, and url_context) are enabled.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000004; + 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.v1beta1.FunctionResponseFileData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.FunctionResponseFileData) + private static final com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData(); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FunctionResponseFileData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v1beta1.FunctionResponseFileData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponseFileDataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponseFileDataOrBuilder.java new file mode 100644 index 000000000000..bbb8a875e510 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponseFileDataOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2025 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/v1beta1/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.aiplatform.v1beta1; + +public interface FunctionResponseFileDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.FunctionResponseFileData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The IANA standard MIME type of the source data.
+   * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + + /** + * + * + *
+   * Required. The IANA standard MIME type of the source data.
+   * 
+ * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + /** + * + * + *
+   * Required. URI.
+   * 
+ * + * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fileUri. + */ + java.lang.String getFileUri(); + + /** + * + * + *
+   * Required. URI.
+   * 
+ * + * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fileUri. + */ + com.google.protobuf.ByteString getFileUriBytes(); + + /** + * + * + *
+   * Optional. Display name of the file data.
+   *
+   * Used to provide a label or filename to distinguish file datas.
+   *
+   * This field is only returned in PromptMessage for prompt management.
+   * It is currently used in the Gemini GenerateContent calls only when server
+   * side tools (code_execution, google_search, and url_context) are enabled.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. Display name of the file data.
+   *
+   * Used to provide a label or filename to distinguish file datas.
+   *
+   * This field is only returned in PromptMessage for prompt management.
+   * It is currently used in the Gemini GenerateContent calls only when server
+   * side tools (code_execution, google_search, and url_context) are enabled.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponseOrBuilder.java index c1cda85b1b4d..0584df06fe6d 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponseOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponseOrBuilder.java @@ -125,4 +125,75 @@ public interface FunctionResponseOrBuilder * .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED]; */ com.google.protobuf.StructOrBuilder getResponseOrBuilder(); + + /** + * + * + *
+   * Optional. Ordered `Parts` that constitute a function response. Parts may
+   * have different IANA MIME types.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getPartsList(); + + /** + * + * + *
+   * Optional. Ordered `Parts` that constitute a function response. Parts may
+   * have different IANA MIME types.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart getParts(int index); + + /** + * + * + *
+   * Optional. Ordered `Parts` that constitute a function response. Parts may
+   * have different IANA MIME types.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getPartsCount(); + + /** + * + * + *
+   * Optional. Ordered `Parts` that constitute a function response. Parts may
+   * have different IANA MIME types.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getPartsOrBuilderList(); + + /** + * + * + *
+   * Optional. Ordered `Parts` that constitute a function response. Parts may
+   * have different IANA MIME types.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.FunctionResponsePartOrBuilder getPartsOrBuilder(int index); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponsePart.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponsePart.java new file mode 100644 index 000000000000..5a04be9717d2 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponsePart.java @@ -0,0 +1,1166 @@ +/* + * Copyright 2025 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/v1beta1/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * A datatype containing media that is part of a `FunctionResponse` message.
+ *
+ * A `FunctionResponsePart` consists of data which has an associated datatype. A
+ * `FunctionResponsePart` can only contain one of the accepted types in
+ * `FunctionResponsePart.data`.
+ *
+ * A `FunctionResponsePart` must have a fixed IANA MIME type identifying the
+ * type and subtype of the media if the `inline_data` field is filled with raw
+ * bytes.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.FunctionResponsePart} + */ +public final class FunctionResponsePart extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.FunctionResponsePart) + FunctionResponsePartOrBuilder { + private static final long serialVersionUID = 0L; + + // Use FunctionResponsePart.newBuilder() to construct. + private FunctionResponsePart(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FunctionResponsePart() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FunctionResponsePart(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_FunctionResponsePart_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_FunctionResponsePart_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.class, + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.Builder.class); + } + + private int dataCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object data_; + + public enum DataCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INLINE_DATA(1), + FILE_DATA(2), + DATA_NOT_SET(0); + private final int value; + + private DataCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataCase valueOf(int value) { + return forNumber(value); + } + + public static DataCase forNumber(int value) { + switch (value) { + case 1: + return INLINE_DATA; + case 2: + return FILE_DATA; + case 0: + return DATA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DataCase getDataCase() { + return DataCase.forNumber(dataCase_); + } + + public static final int INLINE_DATA_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Inline media bytes.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseBlob inline_data = 1; + * + * @return Whether the inlineData field is set. + */ + @java.lang.Override + public boolean hasInlineData() { + return dataCase_ == 1; + } + + /** + * + * + *
+   * Inline media bytes.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseBlob inline_data = 1; + * + * @return The inlineData. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob getInlineData() { + if (dataCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob) data_; + } + return com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.getDefaultInstance(); + } + + /** + * + * + *
+   * Inline media bytes.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseBlob inline_data = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponseBlobOrBuilder + getInlineDataOrBuilder() { + if (dataCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob) data_; + } + return com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.getDefaultInstance(); + } + + public static final int FILE_DATA_FIELD_NUMBER = 2; + + /** + * + * + *
+   * URI based data.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseFileData file_data = 2; + * + * @return Whether the fileData field is set. + */ + @java.lang.Override + public boolean hasFileData() { + return dataCase_ == 2; + } + + /** + * + * + *
+   * URI based data.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseFileData file_data = 2; + * + * @return The fileData. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData getFileData() { + if (dataCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData) data_; + } + return com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.getDefaultInstance(); + } + + /** + * + * + *
+   * URI based data.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseFileData file_data = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponseFileDataOrBuilder + getFileDataOrBuilder() { + if (dataCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData) data_; + } + return com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.getDefaultInstance(); + } + + 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 (dataCase_ == 1) { + output.writeMessage(1, (com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob) data_); + } + if (dataCase_ == 2) { + output.writeMessage(2, (com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData) data_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob) data_); + } + if (dataCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData) data_); + } + size += getUnknownFields().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.v1beta1.FunctionResponsePart)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart other = + (com.google.cloud.aiplatform.v1beta1.FunctionResponsePart) obj; + + if (!getDataCase().equals(other.getDataCase())) return false; + switch (dataCase_) { + case 1: + if (!getInlineData().equals(other.getInlineData())) return false; + break; + case 2: + if (!getFileData().equals(other.getFileData())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (dataCase_) { + case 1: + hash = (37 * hash) + INLINE_DATA_FIELD_NUMBER; + hash = (53 * hash) + getInlineData().hashCode(); + break; + case 2: + hash = (37 * hash) + FILE_DATA_FIELD_NUMBER; + hash = (53 * hash) + getFileData().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponsePart parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponsePart 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.v1beta1.FunctionResponsePart parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponsePart 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.v1beta1.FunctionResponsePart parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponsePart parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponsePart parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponsePart 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.v1beta1.FunctionResponsePart parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponsePart 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.v1beta1.FunctionResponsePart parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponsePart 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.v1beta1.FunctionResponsePart 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; + } + + /** + * + * + *
+   * A datatype containing media that is part of a `FunctionResponse` message.
+   *
+   * A `FunctionResponsePart` consists of data which has an associated datatype. A
+   * `FunctionResponsePart` can only contain one of the accepted types in
+   * `FunctionResponsePart.data`.
+   *
+   * A `FunctionResponsePart` must have a fixed IANA MIME type identifying the
+   * type and subtype of the media if the `inline_data` field is filled with raw
+   * bytes.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.FunctionResponsePart} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.FunctionResponsePart) + com.google.cloud.aiplatform.v1beta1.FunctionResponsePartOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_FunctionResponsePart_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_FunctionResponsePart_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.class, + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (inlineDataBuilder_ != null) { + inlineDataBuilder_.clear(); + } + if (fileDataBuilder_ != null) { + fileDataBuilder_.clear(); + } + dataCase_ = 0; + data_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_FunctionResponsePart_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponsePart getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponsePart build() { + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponsePart buildPartial() { + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart result = + new com.google.cloud.aiplatform.v1beta1.FunctionResponsePart(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.FunctionResponsePart result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart result) { + result.dataCase_ = dataCase_; + result.data_ = this.data_; + if (dataCase_ == 1 && inlineDataBuilder_ != null) { + result.data_ = inlineDataBuilder_.build(); + } + if (dataCase_ == 2 && fileDataBuilder_ != null) { + result.data_ = fileDataBuilder_.build(); + } + } + + @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.v1beta1.FunctionResponsePart) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.FunctionResponsePart) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.FunctionResponsePart other) { + if (other == com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.getDefaultInstance()) + return this; + switch (other.getDataCase()) { + case INLINE_DATA: + { + mergeInlineData(other.getInlineData()); + break; + } + case FILE_DATA: + { + mergeFileData(other.getFileData()); + break; + } + case DATA_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getInlineDataFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getFileDataFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int dataCase_ = 0; + private java.lang.Object data_; + + public DataCase getDataCase() { + return DataCase.forNumber(dataCase_); + } + + public Builder clearData() { + dataCase_ = 0; + data_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob, + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.Builder, + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlobOrBuilder> + inlineDataBuilder_; + + /** + * + * + *
+     * Inline media bytes.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseBlob inline_data = 1; + * + * @return Whether the inlineData field is set. + */ + @java.lang.Override + public boolean hasInlineData() { + return dataCase_ == 1; + } + + /** + * + * + *
+     * Inline media bytes.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseBlob inline_data = 1; + * + * @return The inlineData. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob getInlineData() { + if (inlineDataBuilder_ == null) { + if (dataCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob) data_; + } + return com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.getDefaultInstance(); + } else { + if (dataCase_ == 1) { + return inlineDataBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Inline media bytes.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseBlob inline_data = 1; + */ + public Builder setInlineData(com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob value) { + if (inlineDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + inlineDataBuilder_.setMessage(value); + } + dataCase_ = 1; + return this; + } + + /** + * + * + *
+     * Inline media bytes.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseBlob inline_data = 1; + */ + public Builder setInlineData( + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.Builder builderForValue) { + if (inlineDataBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + inlineDataBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 1; + return this; + } + + /** + * + * + *
+     * Inline media bytes.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseBlob inline_data = 1; + */ + public Builder mergeInlineData(com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob value) { + if (inlineDataBuilder_ == null) { + if (dataCase_ == 1 + && data_ + != com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.getDefaultInstance()) { + data_ = + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.newBuilder( + (com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 1) { + inlineDataBuilder_.mergeFrom(value); + } else { + inlineDataBuilder_.setMessage(value); + } + } + dataCase_ = 1; + return this; + } + + /** + * + * + *
+     * Inline media bytes.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseBlob inline_data = 1; + */ + public Builder clearInlineData() { + if (inlineDataBuilder_ == null) { + if (dataCase_ == 1) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 1) { + dataCase_ = 0; + data_ = null; + } + inlineDataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Inline media bytes.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseBlob inline_data = 1; + */ + public com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.Builder getInlineDataBuilder() { + return getInlineDataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Inline media bytes.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseBlob inline_data = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponseBlobOrBuilder + getInlineDataOrBuilder() { + if ((dataCase_ == 1) && (inlineDataBuilder_ != null)) { + return inlineDataBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob) data_; + } + return com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Inline media bytes.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseBlob inline_data = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob, + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.Builder, + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlobOrBuilder> + getInlineDataFieldBuilder() { + if (inlineDataBuilder_ == null) { + if (!(dataCase_ == 1)) { + data_ = com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.getDefaultInstance(); + } + inlineDataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob, + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.Builder, + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlobOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 1; + onChanged(); + return inlineDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData, + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.Builder, + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileDataOrBuilder> + fileDataBuilder_; + + /** + * + * + *
+     * URI based data.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseFileData file_data = 2; + * + * @return Whether the fileData field is set. + */ + @java.lang.Override + public boolean hasFileData() { + return dataCase_ == 2; + } + + /** + * + * + *
+     * URI based data.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseFileData file_data = 2; + * + * @return The fileData. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData getFileData() { + if (fileDataBuilder_ == null) { + if (dataCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData) data_; + } + return com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.getDefaultInstance(); + } else { + if (dataCase_ == 2) { + return fileDataBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.getDefaultInstance(); + } + } + + /** + * + * + *
+     * URI based data.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseFileData file_data = 2; + */ + public Builder setFileData(com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData value) { + if (fileDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + fileDataBuilder_.setMessage(value); + } + dataCase_ = 2; + return this; + } + + /** + * + * + *
+     * URI based data.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseFileData file_data = 2; + */ + public Builder setFileData( + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.Builder builderForValue) { + if (fileDataBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + fileDataBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 2; + return this; + } + + /** + * + * + *
+     * URI based data.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseFileData file_data = 2; + */ + public Builder mergeFileData( + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData value) { + if (fileDataBuilder_ == null) { + if (dataCase_ == 2 + && data_ + != com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData + .getDefaultInstance()) { + data_ = + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.newBuilder( + (com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 2) { + fileDataBuilder_.mergeFrom(value); + } else { + fileDataBuilder_.setMessage(value); + } + } + dataCase_ = 2; + return this; + } + + /** + * + * + *
+     * URI based data.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseFileData file_data = 2; + */ + public Builder clearFileData() { + if (fileDataBuilder_ == null) { + if (dataCase_ == 2) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 2) { + dataCase_ = 0; + data_ = null; + } + fileDataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * URI based data.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseFileData file_data = 2; + */ + public com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.Builder + getFileDataBuilder() { + return getFileDataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * URI based data.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseFileData file_data = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FunctionResponseFileDataOrBuilder + getFileDataOrBuilder() { + if ((dataCase_ == 2) && (fileDataBuilder_ != null)) { + return fileDataBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData) data_; + } + return com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.getDefaultInstance(); + } + } + + /** + * + * + *
+     * URI based data.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseFileData file_data = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData, + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.Builder, + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileDataOrBuilder> + getFileDataFieldBuilder() { + if (fileDataBuilder_ == null) { + if (!(dataCase_ == 2)) { + data_ = com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.getDefaultInstance(); + } + fileDataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData, + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.Builder, + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileDataOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 2; + onChanged(); + return fileDataBuilder_; + } + + @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.v1beta1.FunctionResponsePart) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.FunctionResponsePart) + private static final com.google.cloud.aiplatform.v1beta1.FunctionResponsePart DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.FunctionResponsePart(); + } + + public static com.google.cloud.aiplatform.v1beta1.FunctionResponsePart getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FunctionResponsePart parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v1beta1.FunctionResponsePart getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponsePartOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponsePartOrBuilder.java new file mode 100644 index 000000000000..680e689a5c9b --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionResponsePartOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2025 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/v1beta1/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.aiplatform.v1beta1; + +public interface FunctionResponsePartOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.FunctionResponsePart) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Inline media bytes.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseBlob inline_data = 1; + * + * @return Whether the inlineData field is set. + */ + boolean hasInlineData(); + + /** + * + * + *
+   * Inline media bytes.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseBlob inline_data = 1; + * + * @return The inlineData. + */ + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlob getInlineData(); + + /** + * + * + *
+   * Inline media bytes.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseBlob inline_data = 1; + */ + com.google.cloud.aiplatform.v1beta1.FunctionResponseBlobOrBuilder getInlineDataOrBuilder(); + + /** + * + * + *
+   * URI based data.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseFileData file_data = 2; + * + * @return Whether the fileData field is set. + */ + boolean hasFileData(); + + /** + * + * + *
+   * URI based data.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseFileData file_data = 2; + * + * @return The fileData. + */ + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileData getFileData(); + + /** + * + * + *
+   * URI based data.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.FunctionResponseFileData file_data = 2; + */ + com.google.cloud.aiplatform.v1beta1.FunctionResponseFileDataOrBuilder getFileDataOrBuilder(); + + com.google.cloud.aiplatform.v1beta1.FunctionResponsePart.DataCase getDataCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Retrieval.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Retrieval.java index b7a6075c7ea6..a1d40dafe0c6 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Retrieval.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Retrieval.java @@ -238,7 +238,7 @@ public com.google.cloud.aiplatform.v1beta1.VertexRagStoreOrBuilder getVertexRagS * * * @deprecated google.cloud.aiplatform.v1beta1.Retrieval.disable_attribution is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=361 + * google/cloud/aiplatform/v1beta1/tool.proto;l=433 * @return The disableAttribution. */ @java.lang.Override @@ -1149,7 +1149,7 @@ public com.google.cloud.aiplatform.v1beta1.VertexRagStore.Builder getVertexRagSt * * * @deprecated google.cloud.aiplatform.v1beta1.Retrieval.disable_attribution is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=361 + * google/cloud/aiplatform/v1beta1/tool.proto;l=433 * @return The disableAttribution. */ @java.lang.Override @@ -1170,7 +1170,7 @@ public boolean getDisableAttribution() { * * * @deprecated google.cloud.aiplatform.v1beta1.Retrieval.disable_attribution is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=361 + * google/cloud/aiplatform/v1beta1/tool.proto;l=433 * @param value The disableAttribution to set. * @return This builder for chaining. */ @@ -1195,7 +1195,7 @@ public Builder setDisableAttribution(boolean value) { * * * @deprecated google.cloud.aiplatform.v1beta1.Retrieval.disable_attribution is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=361 + * google/cloud/aiplatform/v1beta1/tool.proto;l=433 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrievalOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrievalOrBuilder.java index 8e69abfaa1ad..3722b8952c6f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrievalOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrievalOrBuilder.java @@ -113,7 +113,7 @@ public interface RetrievalOrBuilder * * * @deprecated google.cloud.aiplatform.v1beta1.Retrieval.disable_attribution is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=361 + * google/cloud/aiplatform/v1beta1/tool.proto;l=433 * @return The disableAttribution. */ @java.lang.Deprecated diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Tool.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Tool.java index 24131006ff3e..ac89847d85c7 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Tool.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Tool.java @@ -1891,6 +1891,88 @@ public interface ComputerUseOrBuilder * @return The environment. */ com.google.cloud.aiplatform.v1beta1.Tool.ComputerUse.Environment getEnvironment(); + + /** + * + * + *
+     * Optional. By default, [predefined
+     * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+     * are included in the final model call. Some of them can be explicitly
+     * excluded from being automatically included. This can serve two purposes:
+     * 1. Using a more restricted / different action space.
+     * 2. Improving the definitions / instructions of predefined functions.
+     * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludedPredefinedFunctions. + */ + java.util.List getExcludedPredefinedFunctionsList(); + + /** + * + * + *
+     * Optional. By default, [predefined
+     * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+     * are included in the final model call. Some of them can be explicitly
+     * excluded from being automatically included. This can serve two purposes:
+     * 1. Using a more restricted / different action space.
+     * 2. Improving the definitions / instructions of predefined functions.
+     * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludedPredefinedFunctions. + */ + int getExcludedPredefinedFunctionsCount(); + + /** + * + * + *
+     * Optional. By default, [predefined
+     * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+     * are included in the final model call. Some of them can be explicitly
+     * excluded from being automatically included. This can serve two purposes:
+     * 1. Using a more restricted / different action space.
+     * 2. Improving the definitions / instructions of predefined functions.
+     * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludedPredefinedFunctions at the given index. + */ + java.lang.String getExcludedPredefinedFunctions(int index); + + /** + * + * + *
+     * Optional. By default, [predefined
+     * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+     * are included in the final model call. Some of them can be explicitly
+     * excluded from being automatically included. This can serve two purposes:
+     * 1. Using a more restricted / different action space.
+     * 2. Improving the definitions / instructions of predefined functions.
+     * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludedPredefinedFunctions at the given index. + */ + com.google.protobuf.ByteString getExcludedPredefinedFunctionsBytes(int index); } /** @@ -1915,6 +1997,7 @@ private ComputerUse(com.google.protobuf.GeneratedMessageV3.Builder builder) { private ComputerUse() { environment_ = 0; + excludedPredefinedFunctions_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @@ -2119,6 +2202,102 @@ public com.google.cloud.aiplatform.v1beta1.Tool.ComputerUse.Environment getEnvir : result; } + public static final int EXCLUDED_PREDEFINED_FUNCTIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList excludedPredefinedFunctions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+     * Optional. By default, [predefined
+     * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+     * are included in the final model call. Some of them can be explicitly
+     * excluded from being automatically included. This can serve two purposes:
+     * 1. Using a more restricted / different action space.
+     * 2. Improving the definitions / instructions of predefined functions.
+     * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludedPredefinedFunctions. + */ + public com.google.protobuf.ProtocolStringList getExcludedPredefinedFunctionsList() { + return excludedPredefinedFunctions_; + } + + /** + * + * + *
+     * Optional. By default, [predefined
+     * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+     * are included in the final model call. Some of them can be explicitly
+     * excluded from being automatically included. This can serve two purposes:
+     * 1. Using a more restricted / different action space.
+     * 2. Improving the definitions / instructions of predefined functions.
+     * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludedPredefinedFunctions. + */ + public int getExcludedPredefinedFunctionsCount() { + return excludedPredefinedFunctions_.size(); + } + + /** + * + * + *
+     * Optional. By default, [predefined
+     * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+     * are included in the final model call. Some of them can be explicitly
+     * excluded from being automatically included. This can serve two purposes:
+     * 1. Using a more restricted / different action space.
+     * 2. Improving the definitions / instructions of predefined functions.
+     * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludedPredefinedFunctions at the given index. + */ + public java.lang.String getExcludedPredefinedFunctions(int index) { + return excludedPredefinedFunctions_.get(index); + } + + /** + * + * + *
+     * Optional. By default, [predefined
+     * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+     * are included in the final model call. Some of them can be explicitly
+     * excluded from being automatically included. This can serve two purposes:
+     * 1. Using a more restricted / different action space.
+     * 2. Improving the definitions / instructions of predefined functions.
+     * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludedPredefinedFunctions at the given index. + */ + public com.google.protobuf.ByteString getExcludedPredefinedFunctionsBytes(int index) { + return excludedPredefinedFunctions_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2139,6 +2318,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, environment_); } + for (int i = 0; i < excludedPredefinedFunctions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, excludedPredefinedFunctions_.getRaw(i)); + } getUnknownFields().writeTo(output); } @@ -2154,6 +2337,14 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, environment_); } + { + int dataSize = 0; + for (int i = 0; i < excludedPredefinedFunctions_.size(); i++) { + dataSize += computeStringSizeNoTag(excludedPredefinedFunctions_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludedPredefinedFunctionsList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2171,6 +2362,8 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.aiplatform.v1beta1.Tool.ComputerUse) obj; if (environment_ != other.environment_) return false; + if (!getExcludedPredefinedFunctionsList().equals(other.getExcludedPredefinedFunctionsList())) + return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2184,6 +2377,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; hash = (53 * hash) + environment_; + if (getExcludedPredefinedFunctionsCount() > 0) { + hash = (37 * hash) + EXCLUDED_PREDEFINED_FUNCTIONS_FIELD_NUMBER; + hash = (53 * hash) + getExcludedPredefinedFunctionsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2328,6 +2525,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; environment_ = 0; + excludedPredefinedFunctions_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @@ -2367,6 +2565,10 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.Tool.ComputerUse if (((from_bitField0_ & 0x00000001) != 0)) { result.environment_ = environment_; } + if (((from_bitField0_ & 0x00000002) != 0)) { + excludedPredefinedFunctions_.makeImmutable(); + result.excludedPredefinedFunctions_ = excludedPredefinedFunctions_; + } } @java.lang.Override @@ -2420,6 +2622,16 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.Tool.ComputerUse ot if (other.environment_ != 0) { setEnvironmentValue(other.getEnvironmentValue()); } + if (!other.excludedPredefinedFunctions_.isEmpty()) { + if (excludedPredefinedFunctions_.isEmpty()) { + excludedPredefinedFunctions_ = other.excludedPredefinedFunctions_; + bitField0_ |= 0x00000002; + } else { + ensureExcludedPredefinedFunctionsIsMutable(); + excludedPredefinedFunctions_.addAll(other.excludedPredefinedFunctions_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2452,6 +2664,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludedPredefinedFunctionsIsMutable(); + excludedPredefinedFunctions_.add(s); + break; + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2580,6 +2799,255 @@ public Builder clearEnvironment() { return this; } + private com.google.protobuf.LazyStringArrayList excludedPredefinedFunctions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExcludedPredefinedFunctionsIsMutable() { + if (!excludedPredefinedFunctions_.isModifiable()) { + excludedPredefinedFunctions_ = + new com.google.protobuf.LazyStringArrayList(excludedPredefinedFunctions_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+       * Optional. By default, [predefined
+       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+       * are included in the final model call. Some of them can be explicitly
+       * excluded from being automatically included. This can serve two purposes:
+       * 1. Using a more restricted / different action space.
+       * 2. Improving the definitions / instructions of predefined functions.
+       * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludedPredefinedFunctions. + */ + public com.google.protobuf.ProtocolStringList getExcludedPredefinedFunctionsList() { + excludedPredefinedFunctions_.makeImmutable(); + return excludedPredefinedFunctions_; + } + + /** + * + * + *
+       * Optional. By default, [predefined
+       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+       * are included in the final model call. Some of them can be explicitly
+       * excluded from being automatically included. This can serve two purposes:
+       * 1. Using a more restricted / different action space.
+       * 2. Improving the definitions / instructions of predefined functions.
+       * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludedPredefinedFunctions. + */ + public int getExcludedPredefinedFunctionsCount() { + return excludedPredefinedFunctions_.size(); + } + + /** + * + * + *
+       * Optional. By default, [predefined
+       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+       * are included in the final model call. Some of them can be explicitly
+       * excluded from being automatically included. This can serve two purposes:
+       * 1. Using a more restricted / different action space.
+       * 2. Improving the definitions / instructions of predefined functions.
+       * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludedPredefinedFunctions at the given index. + */ + public java.lang.String getExcludedPredefinedFunctions(int index) { + return excludedPredefinedFunctions_.get(index); + } + + /** + * + * + *
+       * Optional. By default, [predefined
+       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+       * are included in the final model call. Some of them can be explicitly
+       * excluded from being automatically included. This can serve two purposes:
+       * 1. Using a more restricted / different action space.
+       * 2. Improving the definitions / instructions of predefined functions.
+       * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludedPredefinedFunctions at the given index. + */ + public com.google.protobuf.ByteString getExcludedPredefinedFunctionsBytes(int index) { + return excludedPredefinedFunctions_.getByteString(index); + } + + /** + * + * + *
+       * Optional. By default, [predefined
+       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+       * are included in the final model call. Some of them can be explicitly
+       * excluded from being automatically included. This can serve two purposes:
+       * 1. Using a more restricted / different action space.
+       * 2. Improving the definitions / instructions of predefined functions.
+       * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The excludedPredefinedFunctions to set. + * @return This builder for chaining. + */ + public Builder setExcludedPredefinedFunctions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludedPredefinedFunctionsIsMutable(); + excludedPredefinedFunctions_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. By default, [predefined
+       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+       * are included in the final model call. Some of them can be explicitly
+       * excluded from being automatically included. This can serve two purposes:
+       * 1. Using a more restricted / different action space.
+       * 2. Improving the definitions / instructions of predefined functions.
+       * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The excludedPredefinedFunctions to add. + * @return This builder for chaining. + */ + public Builder addExcludedPredefinedFunctions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludedPredefinedFunctionsIsMutable(); + excludedPredefinedFunctions_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. By default, [predefined
+       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+       * are included in the final model call. Some of them can be explicitly
+       * excluded from being automatically included. This can serve two purposes:
+       * 1. Using a more restricted / different action space.
+       * 2. Improving the definitions / instructions of predefined functions.
+       * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The excludedPredefinedFunctions to add. + * @return This builder for chaining. + */ + public Builder addAllExcludedPredefinedFunctions( + java.lang.Iterable values) { + ensureExcludedPredefinedFunctionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, excludedPredefinedFunctions_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. By default, [predefined
+       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+       * are included in the final model call. Some of them can be explicitly
+       * excluded from being automatically included. This can serve two purposes:
+       * 1. Using a more restricted / different action space.
+       * 2. Improving the definitions / instructions of predefined functions.
+       * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearExcludedPredefinedFunctions() { + excludedPredefinedFunctions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. By default, [predefined
+       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
+       * are included in the final model call. Some of them can be explicitly
+       * excluded from being automatically included. This can serve two purposes:
+       * 1. Using a more restricted / different action space.
+       * 2. Improving the definitions / instructions of predefined functions.
+       * 
+ * + * + * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the excludedPredefinedFunctions to add. + * @return This builder for chaining. + */ + public Builder addExcludedPredefinedFunctionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludedPredefinedFunctionsIsMutable(); + excludedPredefinedFunctions_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolProto.java index c942a1096d13..9f88cd727a0a 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolProto.java @@ -64,6 +64,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_FunctionCall_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_FunctionCall_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_FunctionResponsePart_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_FunctionResponsePart_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseBlob_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseBlob_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseFileData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseFileData_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_FunctionResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -163,7 +175,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oogle/api/field_behavior.proto\032\031google/a" + "pi/resource.proto\032-google/cloud/aiplatfo" + "rm/v1beta1/openapi.proto\032\034google/protobu" - + "f/struct.proto\032\030google/type/latlng.proto\"\252\n\n" + + "f/struct.proto\032\030google/type/latlng.proto\"\326\n\n" + "\004Tool\022X\n" + "\025function_declarations\030\001 \003(\013" + "24.google.cloud.aiplatform.v1beta1.FunctionDeclarationB\003\340A\001\022B\n" @@ -188,10 +200,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\023blocking_confidence\030\004 \001(\01629.google.cloud.aiplatform.v1be" + "ta1.Tool.PhishBlockThresholdB\003\340A\001H\000\210\001\001B\026\n" + "\024_blocking_confidence\032\017\n\r" - + "CodeExecution\032\253\001\n" + + "CodeExecution\032\327\001\n" + "\013ComputerUse\022W\n" + "\013environment\030\001 \001(\0162=.g" - + "oogle.cloud.aiplatform.v1beta1.Tool.ComputerUse.EnvironmentB\003\340A\002\"C\n" + + "oogle.cloud.aiplatform.v1beta1.Tool.ComputerUse.EnvironmentB\003\340A\002\022*\n" + + "\035excluded_predefined_functions\030\002 \003(\tB\003\340A\001\"C\n" + "\013Environment\022\033\n" + "\027ENVIRONMENT_UNSPECIFIED\020\000\022\027\n" + "\023ENVIRONMENT_BROWSER\020\001\"\345\001\n" @@ -206,8 +219,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "UrlContext\"\260\003\n" + "\016ToolUseExample\022a\n" + "\023extension_operation\030\n" - + " \001(\0132B.google.clo" - + "ud.aiplatform.v1beta1.ToolUseExample.ExtensionOperationH\000\022\027\n\r" + + " \001(\0132B.google" + + ".cloud.aiplatform.v1beta1.ToolUseExample.ExtensionOperationH\000\022\027\n\r" + "function_name\030\013 \001(\tH\000\022\031\n" + "\014display_name\030\001 \001(\tB\003\340A\002\022\022\n" + "\005query\030\002 \001(\tB\003\340A\002\022/\n" @@ -226,28 +239,44 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\0132\'.google.cloud.aiplatform.v1beta1.SchemaB\003\340A\001\022;\n" + "\026parameters_json_schema\030\005" + " \001(\0132\026.google.protobuf.ValueB\003\340A\001\022>\n" - + "\010response\030\004" - + " \001(\0132\'.google.cloud.aiplatform.v1beta1.SchemaB\003\340A\001\0229\n" + + "\010response\030\004 \001(\0132\'.googl" + + "e.cloud.aiplatform.v1beta1.SchemaB\003\340A\001\0229\n" + "\024response_json_schema\030\006" + " \001(\0132\026.google.protobuf.ValueB\003\340A\001\"^\n" + "\014FunctionCall\022\017\n" + "\002id\030\003 \001(\tB\003\340A\001\022\021\n" + "\004name\030\001 \001(\tB\003\340A\002\022*\n" - + "\004args\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\001\"f\n" + + "\004args\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\001\"\274\001\n" + + "\024FunctionResponsePart\022L\n" + + "\013inline_data\030\001 \001(\0132" + + "5.google.cloud.aiplatform.v1beta1.FunctionResponseBlobH\000\022N\n" + + "\tfile_data\030\002 \001(\01329.go" + + "ogle.cloud.aiplatform.v1beta1.FunctionResponseFileDataH\000B\006\n" + + "\004data\"\\\n" + + "\024FunctionResponseBlob\022\026\n" + + "\tmime_type\030\001 \001(\tB\003\340A\002\022\021\n" + + "\004data\030\002 \001(\014B\003\340A\002\022\031\n" + + "\014display_name\030\004 \001(\tB\003\340A\001\"d\n" + + "\030FunctionResponseFileData\022\026\n" + + "\tmime_type\030\001 \001(\tB\003\340A\002\022\025\n" + + "\010file_uri\030\002 \001(\tB\003\340A\002\022\031\n" + + "\014display_name\030\003 \001(\tB\003\340A\001\"\261\001\n" + "\020FunctionResponse\022\017\n" + "\002id\030\003 \001(\tB\003\340A\001\022\021\n" + "\004name\030\001 \001(\tB\003\340A\002\022.\n" - + "\010response\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\002\"\246\001\n" + + "\010response\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\002\022I\n" + + "\005parts\030\004 \003(\01325.google.cloud.aipl" + + "atform.v1beta1.FunctionResponsePartB\003\340A\001\"\246\001\n" + "\016ExecutableCode\022O\n" - + "\010language\030\001" - + " \001(\01628.google.cloud.aiplatform.v1beta1.ExecutableCode.LanguageB\003\340A\002\022\021\n" + + "\010language\030\001 \001(\01628." + + "google.cloud.aiplatform.v1beta1.ExecutableCode.LanguageB\003\340A\002\022\021\n" + "\004code\030\002 \001(\tB\003\340A\002\"0\n" + "\010Language\022\030\n" + "\024LANGUAGE_UNSPECIFIED\020\000\022\n\n" + "\006PYTHON\020\001\"\345\001\n" + "\023CodeExecutionResult\022R\n" - + "\007outcome\030\001 \001(\0162<.google.cloud.a" - + "iplatform.v1beta1.CodeExecutionResult.OutcomeB\003\340A\002\022\023\n" + + "\007outcome\030\001" + + " \001(\0162<.google.cloud.aiplatform.v1beta1.CodeExecutionResult.OutcomeB\003\340A\002\022\023\n" + "\006output\030\002 \001(\tB\003\340A\001\"e\n" + "\007Outcome\022\027\n" + "\023OUTCOME_UNSPECIFIED\020\000\022\016\n\n" @@ -255,22 +284,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\016OUTCOME_FAILED\020\002\022\035\n" + "\031OUTCOME_DEADLINE_EXCEEDED\020\003\"\323\001\n" + "\tRetrieval\022K\n" - + "\020vertex_ai_search\030\002" - + " \001(\0132/.google.cloud.aiplatform.v1beta1.VertexAISearchH\000\022K\n" - + "\020vertex_rag_store\030\004" - + " \001(\0132/.google.cloud.aiplatform.v1beta1.VertexRagStoreH\000\022\"\n" + + "\020vertex_ai_search\030\002 \001(" + + "\0132/.google.cloud.aiplatform.v1beta1.VertexAISearchH\000\022K\n" + + "\020vertex_rag_store\030\004 \001(\0132/" + + ".google.cloud.aiplatform.v1beta1.VertexRagStoreH\000\022\"\n" + "\023disable_attribution\030\003 \001(\010B\005\030\001\340A\001B\010\n" + "\006source\"\224\004\n" + "\016VertexRagStore\022B\n" + "\013rag_corpora\030\001 \003(\tB-\030\001\340A\001\372A%\n" + "#aiplatform.googleapis.com/RagCorpus\022W\n\r" - + "rag_resources\030\004 \003(\0132;.google.cloud.aiplat" - + "form.v1beta1.VertexRagStore.RagResourceB\003\340A\001\022$\n" + + "rag_resources\030\004" + + " \003(\0132;.google.cloud.aiplatform.v1beta1.VertexRagStore.RagResourceB\003\340A\001\022$\n" + "\020similarity_top_k\030\002 \001(\005B\005\030\001\340A\001H\000\210\001\001\022-\n" + "\031vector_distance_threshold\030\003" + " \001(\001B\005\030\001\340A\001H\001\210\001\001\022V\n" - + "\024rag_retrieval_config\030\006 \001(\0132" - + "3.google.cloud.aiplatform.v1beta1.RagRetrievalConfigB\003\340A\001\022\032\n\r" + + "\024rag_retrieval_config\030\006 \001(\01323.google.clou" + + "d.aiplatform.v1beta1.RagRetrievalConfigB\003\340A\001\022\032\n\r" + "store_context\030\007 \001(\010B\003\340A\001\032i\n" + "\013RagResource\022?\n\n" + "rag_corpus\030\001 \001(\tB+\340A\001\372A%\n" @@ -283,37 +312,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006engine\030\002 \001(\tB\003\340A\001\022\030\n" + "\013max_results\030\003 \001(\005B\003\340A\001\022\023\n" + "\006filter\030\004 \001(\tB\003\340A\001\022W\n" - + "\020data_store_specs\030\005 \003(\0132=.google.cloud.aipl" - + "atform.v1beta1.VertexAISearch.DataStoreSpec\0328\n\r" + + "\020data_store_specs\030\005" + + " \003(\0132=.google.cloud.aiplatform.v1beta1.VertexAISearch.DataStoreSpec\0328\n\r" + "DataStoreSpec\022\022\n\n" + "data_store\030\001 \001(\t\022\023\n" + "\006filter\030\002 \001(\tB\003\340A\001\"r\n" + "\025GoogleSearchRetrieval\022Y\n" - + "\030dynamic_retrieval_config\030\002 \001(\013" - + "27.google.cloud.aiplatform.v1beta1.DynamicRetrievalConfig\"(\n\n" + + "\030dynamic_retrieval_config\030\002 \001(\01327.google.clo" + + "ud.aiplatform.v1beta1.DynamicRetrievalConfig\"(\n\n" + "GoogleMaps\022\032\n\r" + "enable_widget\030\001 \001(\010B\003\340A\001\"\255\001\n" + "\023EnterpriseWebSearch\022\034\n" + "\017exclude_domains\030\001 \003(\tB\003\340A\001\022`\n" - + "\023blocking_confidence\030\004 \001(\01629.google.cloud.ai" - + "platform.v1beta1.Tool.PhishBlockThresholdB\003\340A\001H\000\210\001\001B\026\n" + + "\023blocking_confidence\030\004 \001(\01629.google.cloud.aiplatform.v1be" + + "ta1.Tool.PhishBlockThresholdB\003\340A\001H\000\210\001\001B\026\n" + "\024_blocking_confidence\"\317\001\n" + "\026DynamicRetrievalConfig\022J\n" - + "\004mode\030\001 \001(\0162<.g" - + "oogle.cloud.aiplatform.v1beta1.DynamicRetrievalConfig.Mode\022#\n" + + "\004mode\030\001 \001(\0162<.google.cloud.a" + + "iplatform.v1beta1.DynamicRetrievalConfig.Mode\022#\n" + "\021dynamic_threshold\030\002 \001(\002B\003\340A\001H\000\210\001\001\".\n" + "\004Mode\022\024\n" + "\020MODE_UNSPECIFIED\020\000\022\020\n" + "\014MODE_DYNAMIC\020\001B\024\n" + "\022_dynamic_threshold\"\273\001\n\n" + "ToolConfig\022\\\n" - + "\027function_calling_config\030\001" - + " \001(\01326.google.cloud.aiplatform.v1beta1.FunctionCallingConfigB\003\340A\001\022O\n" + + "\027function_calling_config\030\001 \001(\013" + + "26.google.cloud.aiplatform.v1beta1.FunctionCallingConfigB\003\340A\001\022O\n" + "\020retrieval_config\030\002" + " \001(\01320.google.cloud.aiplatform.v1beta1.RetrievalConfigB\003\340A\001\"\334\001\n" + "\025FunctionCallingConfig\022N\n" - + "\004mode\030\001 \001(\0162;.go" - + "ogle.cloud.aiplatform.v1beta1.FunctionCallingConfig.ModeB\003\340A\001\022#\n" + + "\004mode\030\001 \001(\0162;.google.cloud.ai" + + "platform.v1beta1.FunctionCallingConfig.ModeB\003\340A\001\022#\n" + "\026allowed_function_names\030\002 \003(\tB\003\340A\001\"N\n" + "\004Mode\022\024\n" + "\020MODE_UNSPECIFIED\020\000\022\010\n" @@ -328,12 +357,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\016_language_code\"\317\006\n" + "\022RagRetrievalConfig\022\022\n" + "\005top_k\030\001 \001(\005B\003\340A\001\022\\\n\r" - + "hybrid_search\030\002" - + " \001(\0132@.google.cloud.aiplatform.v1beta1.RagRetrievalConfig.HybridSearchB\003\340A\001\022O\n" - + "\006filter\030\003" - + " \001(\0132:.google.cloud.aiplatform.v1beta1.RagRetrievalConfig.FilterB\003\340A\001\022Q\n" - + "\007ranking\030\004 \001(\0132;.google.cloud.aiplatform." - + "v1beta1.RagRetrievalConfig.RankingB\003\340A\001\0321\n" + + "hybrid_search\030\002 \001(\0132@.google" + + ".cloud.aiplatform.v1beta1.RagRetrievalConfig.HybridSearchB\003\340A\001\022O\n" + + "\006filter\030\003 \001(\0132:" + + ".google.cloud.aiplatform.v1beta1.RagRetrievalConfig.FilterB\003\340A\001\022Q\n" + + "\007ranking\030\004 \001(\013" + + "2;.google.cloud.aiplatform.v1beta1.RagRetrievalConfig.RankingB\003\340A\001\0321\n" + "\014HybridSearch\022\027\n" + "\005alpha\030\001 \001(\002B\003\340A\001H\000\210\001\001B\010\n" + "\006_alpha\032\223\001\n" @@ -343,10 +372,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\017metadata_filter\030\002 \001(\tB\003\340A\001B\025\n" + "\023vector_db_threshold\032\331\002\n" + "\007Ranking\022d\n" - + "\014rank_service\030\001 \001(\0132G.goo" - + "gle.cloud.aiplatform.v1beta1.RagRetrievalConfig.Ranking.RankServiceB\003\340A\001H\000\022`\n\n" - + "llm_ranker\030\003 \001(\0132E.google.cloud.aiplatform" - + ".v1beta1.RagRetrievalConfig.Ranking.LlmRankerB\003\340A\001H\000\032:\n" + + "\014rank_service\030\001 \001(\0132G.google.cloud.aip" + + "latform.v1beta1.RagRetrievalConfig.Ranking.RankServiceB\003\340A\001H\000\022`\n\n" + + "llm_ranker\030\003 \001(\0132E.google.cloud.aiplatform.v1beta1.RagR" + + "etrievalConfig.Ranking.LlmRankerB\003\340A\001H\000\032:\n" + "\013RankService\022\034\n\n" + "model_name\030\001 \001(\tB\003\340A\001H\000\210\001\001B\r\n" + "\013_model_name\0328\n" @@ -354,11 +383,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "model_name\030\001 \001(\tB\003\340A\001H\000\210\001\001B\r\n" + "\013_model_nameB\020\n" + "\016ranking_configB\340\001\n" - + "#com.google.cloud.aiplatform.v1beta1B\tToolProtoP" - + "\001ZCcloud.google.com/go/aiplatform/apiv1b" - + "eta1/aiplatformpb;aiplatformpb\252\002\037Google." - + "Cloud.AIPlatform.V1Beta1\312\002\037Google\\Cloud\\" - + "AIPlatform\\V1beta1\352\002\"Google::Cloud::AIPlatform::V1beta1b\006proto3" + + "#com.google.cloud.aiplatform.v1beta1B\tToolProtoP\001ZCcloud.goog" + + "le.com/go/aiplatform/apiv1beta1/aiplatfo" + + "rmpb;aiplatformpb\252\002\037Google.Cloud.AIPlatf" + + "orm.V1Beta1\312\002\037Google\\Cloud\\AIPlatform\\V1" + + "beta1\352\002\"Google::Cloud::AIPlatform::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -406,7 +435,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_Tool_ComputerUse_descriptor, new java.lang.String[] { - "Environment", + "Environment", "ExcludedPredefinedFunctions", }); internal_static_google_cloud_aiplatform_v1beta1_UrlContext_descriptor = getDescriptor().getMessageTypes().get(1); @@ -460,16 +489,40 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Id", "Name", "Args", }); - internal_static_google_cloud_aiplatform_v1beta1_FunctionResponse_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_FunctionResponsePart_descriptor = getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1beta1_FunctionResponsePart_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_FunctionResponsePart_descriptor, + new java.lang.String[] { + "InlineData", "FileData", "Data", + }); + internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseBlob_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseBlob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseBlob_descriptor, + new java.lang.String[] { + "MimeType", "Data", "DisplayName", + }); + internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseFileData_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseFileData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_FunctionResponseFileData_descriptor, + new java.lang.String[] { + "MimeType", "FileUri", "DisplayName", + }); + internal_static_google_cloud_aiplatform_v1beta1_FunctionResponse_descriptor = + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_aiplatform_v1beta1_FunctionResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_FunctionResponse_descriptor, new java.lang.String[] { - "Id", "Name", "Response", + "Id", "Name", "Response", "Parts", }); internal_static_google_cloud_aiplatform_v1beta1_ExecutableCode_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_aiplatform_v1beta1_ExecutableCode_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ExecutableCode_descriptor, @@ -477,7 +530,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Language", "Code", }); internal_static_google_cloud_aiplatform_v1beta1_CodeExecutionResult_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_aiplatform_v1beta1_CodeExecutionResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_CodeExecutionResult_descriptor, @@ -485,7 +538,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Outcome", "Output", }); internal_static_google_cloud_aiplatform_v1beta1_Retrieval_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_aiplatform_v1beta1_Retrieval_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_Retrieval_descriptor, @@ -493,7 +546,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "VertexAiSearch", "VertexRagStore", "DisableAttribution", "Source", }); internal_static_google_cloud_aiplatform_v1beta1_VertexRagStore_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_aiplatform_v1beta1_VertexRagStore_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_VertexRagStore_descriptor, @@ -516,7 +569,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RagCorpus", "RagFileIds", }); internal_static_google_cloud_aiplatform_v1beta1_VertexAISearch_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_aiplatform_v1beta1_VertexAISearch_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_VertexAISearch_descriptor, @@ -534,7 +587,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DataStore", "Filter", }); internal_static_google_cloud_aiplatform_v1beta1_GoogleSearchRetrieval_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_aiplatform_v1beta1_GoogleSearchRetrieval_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_GoogleSearchRetrieval_descriptor, @@ -542,7 +595,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DynamicRetrievalConfig", }); internal_static_google_cloud_aiplatform_v1beta1_GoogleMaps_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_aiplatform_v1beta1_GoogleMaps_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_GoogleMaps_descriptor, @@ -550,7 +603,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EnableWidget", }); internal_static_google_cloud_aiplatform_v1beta1_EnterpriseWebSearch_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_aiplatform_v1beta1_EnterpriseWebSearch_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_EnterpriseWebSearch_descriptor, @@ -558,7 +611,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ExcludeDomains", "BlockingConfidence", }); internal_static_google_cloud_aiplatform_v1beta1_DynamicRetrievalConfig_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_aiplatform_v1beta1_DynamicRetrievalConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_DynamicRetrievalConfig_descriptor, @@ -566,7 +619,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Mode", "DynamicThreshold", }); internal_static_google_cloud_aiplatform_v1beta1_ToolConfig_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_aiplatform_v1beta1_ToolConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ToolConfig_descriptor, @@ -574,7 +627,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FunctionCallingConfig", "RetrievalConfig", }); internal_static_google_cloud_aiplatform_v1beta1_FunctionCallingConfig_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_aiplatform_v1beta1_FunctionCallingConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_FunctionCallingConfig_descriptor, @@ -582,7 +635,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Mode", "AllowedFunctionNames", }); internal_static_google_cloud_aiplatform_v1beta1_RetrievalConfig_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_aiplatform_v1beta1_RetrievalConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_RetrievalConfig_descriptor, @@ -590,7 +643,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LatLng", "LanguageCode", }); internal_static_google_cloud_aiplatform_v1beta1_RagRetrievalConfig_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_aiplatform_v1beta1_RagRetrievalConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_RagRetrievalConfig_descriptor, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStore.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStore.java index 6f248e74747d..186da3603bfa 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStore.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStore.java @@ -1141,7 +1141,7 @@ public com.google.protobuf.Parser getParserForType() { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @return A list containing the ragCorpora. */ @java.lang.Deprecated @@ -1161,7 +1161,7 @@ public com.google.protobuf.ProtocolStringList getRagCorporaList() { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @return The count of ragCorpora. */ @java.lang.Deprecated @@ -1181,7 +1181,7 @@ public int getRagCorporaCount() { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @param index The index of the element to return. * @return The ragCorpora at the given index. */ @@ -1202,7 +1202,7 @@ public java.lang.String getRagCorpora(int index) { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @param index The index of the value to return. * @return The bytes of the ragCorpora at the given index. */ @@ -1331,7 +1331,7 @@ public com.google.cloud.aiplatform.v1beta1.VertexRagStore.RagResource getRagReso * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.similarity_top_k is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=401 + * google/cloud/aiplatform/v1beta1/tool.proto;l=473 * @return Whether the similarityTopK field is set. */ @java.lang.Override @@ -1352,7 +1352,7 @@ public boolean hasSimilarityTopK() { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.similarity_top_k is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=401 + * google/cloud/aiplatform/v1beta1/tool.proto;l=473 * @return The similarityTopK. */ @java.lang.Override @@ -1377,7 +1377,7 @@ public int getSimilarityTopK() { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.vector_distance_threshold is - * deprecated. See google/cloud/aiplatform/v1beta1/tool.proto;l=406 + * deprecated. See google/cloud/aiplatform/v1beta1/tool.proto;l=478 * @return Whether the vectorDistanceThreshold field is set. */ @java.lang.Override @@ -1399,7 +1399,7 @@ public boolean hasVectorDistanceThreshold() { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.vector_distance_threshold is - * deprecated. See google/cloud/aiplatform/v1beta1/tool.proto;l=406 + * deprecated. See google/cloud/aiplatform/v1beta1/tool.proto;l=478 * @return The vectorDistanceThreshold. */ @java.lang.Override @@ -2075,7 +2075,7 @@ private void ensureRagCorporaIsMutable() { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @return A list containing the ragCorpora. */ @java.lang.Deprecated @@ -2096,7 +2096,7 @@ public com.google.protobuf.ProtocolStringList getRagCorporaList() { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @return The count of ragCorpora. */ @java.lang.Deprecated @@ -2116,7 +2116,7 @@ public int getRagCorporaCount() { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @param index The index of the element to return. * @return The ragCorpora at the given index. */ @@ -2137,7 +2137,7 @@ public java.lang.String getRagCorpora(int index) { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @param index The index of the value to return. * @return The bytes of the ragCorpora at the given index. */ @@ -2158,7 +2158,7 @@ public com.google.protobuf.ByteString getRagCorporaBytes(int index) { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @param index The index to set the value at. * @param value The ragCorpora to set. * @return This builder for chaining. @@ -2187,7 +2187,7 @@ public Builder setRagCorpora(int index, java.lang.String value) { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @param value The ragCorpora to add. * @return This builder for chaining. */ @@ -2215,7 +2215,7 @@ public Builder addRagCorpora(java.lang.String value) { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @param values The ragCorpora to add. * @return This builder for chaining. */ @@ -2240,7 +2240,7 @@ public Builder addAllRagCorpora(java.lang.Iterable values) { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @return This builder for chaining. */ @java.lang.Deprecated @@ -2264,7 +2264,7 @@ public Builder clearRagCorpora() { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @param value The bytes of the ragCorpora to add. * @return This builder for chaining. */ @@ -2770,7 +2770,7 @@ public Builder removeRagResources(int index) { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.similarity_top_k is deprecated. - * See google/cloud/aiplatform/v1beta1/tool.proto;l=401 + * See google/cloud/aiplatform/v1beta1/tool.proto;l=473 * @return Whether the similarityTopK field is set. */ @java.lang.Override @@ -2791,7 +2791,7 @@ public boolean hasSimilarityTopK() { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.similarity_top_k is deprecated. - * See google/cloud/aiplatform/v1beta1/tool.proto;l=401 + * See google/cloud/aiplatform/v1beta1/tool.proto;l=473 * @return The similarityTopK. */ @java.lang.Override @@ -2812,7 +2812,7 @@ public int getSimilarityTopK() { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.similarity_top_k is deprecated. - * See google/cloud/aiplatform/v1beta1/tool.proto;l=401 + * See google/cloud/aiplatform/v1beta1/tool.proto;l=473 * @param value The similarityTopK to set. * @return This builder for chaining. */ @@ -2837,7 +2837,7 @@ public Builder setSimilarityTopK(int value) { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.similarity_top_k is deprecated. - * See google/cloud/aiplatform/v1beta1/tool.proto;l=401 + * See google/cloud/aiplatform/v1beta1/tool.proto;l=473 * @return This builder for chaining. */ @java.lang.Deprecated @@ -2863,7 +2863,7 @@ public Builder clearSimilarityTopK() { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.vector_distance_threshold is - * deprecated. See google/cloud/aiplatform/v1beta1/tool.proto;l=406 + * deprecated. See google/cloud/aiplatform/v1beta1/tool.proto;l=478 * @return Whether the vectorDistanceThreshold field is set. */ @java.lang.Override @@ -2885,7 +2885,7 @@ public boolean hasVectorDistanceThreshold() { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.vector_distance_threshold is - * deprecated. See google/cloud/aiplatform/v1beta1/tool.proto;l=406 + * deprecated. See google/cloud/aiplatform/v1beta1/tool.proto;l=478 * @return The vectorDistanceThreshold. */ @java.lang.Override @@ -2907,7 +2907,7 @@ public double getVectorDistanceThreshold() { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.vector_distance_threshold is - * deprecated. See google/cloud/aiplatform/v1beta1/tool.proto;l=406 + * deprecated. See google/cloud/aiplatform/v1beta1/tool.proto;l=478 * @param value The vectorDistanceThreshold to set. * @return This builder for chaining. */ @@ -2933,7 +2933,7 @@ public Builder setVectorDistanceThreshold(double value) { * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.vector_distance_threshold is - * deprecated. See google/cloud/aiplatform/v1beta1/tool.proto;l=406 + * deprecated. See google/cloud/aiplatform/v1beta1/tool.proto;l=478 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStoreOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStoreOrBuilder.java index 292615197738..29a2dc96bd03 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStoreOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStoreOrBuilder.java @@ -36,7 +36,7 @@ public interface VertexRagStoreOrBuilder * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @return A list containing the ragCorpora. */ @java.lang.Deprecated @@ -54,7 +54,7 @@ public interface VertexRagStoreOrBuilder * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @return The count of ragCorpora. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface VertexRagStoreOrBuilder * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @param index The index of the element to return. * @return The ragCorpora at the given index. */ @@ -91,7 +91,7 @@ public interface VertexRagStoreOrBuilder * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.rag_corpora is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=385 + * google/cloud/aiplatform/v1beta1/tool.proto;l=457 * @param index The index of the value to return. * @return The bytes of the ragCorpora at the given index. */ @@ -193,7 +193,7 @@ com.google.cloud.aiplatform.v1beta1.VertexRagStore.RagResourceOrBuilder getRagRe * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.similarity_top_k is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=401 + * google/cloud/aiplatform/v1beta1/tool.proto;l=473 * @return Whether the similarityTopK field is set. */ @java.lang.Deprecated @@ -211,7 +211,7 @@ com.google.cloud.aiplatform.v1beta1.VertexRagStore.RagResourceOrBuilder getRagRe * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.similarity_top_k is deprecated. See - * google/cloud/aiplatform/v1beta1/tool.proto;l=401 + * google/cloud/aiplatform/v1beta1/tool.proto;l=473 * @return The similarityTopK. */ @java.lang.Deprecated @@ -230,7 +230,7 @@ com.google.cloud.aiplatform.v1beta1.VertexRagStore.RagResourceOrBuilder getRagRe * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.vector_distance_threshold is - * deprecated. See google/cloud/aiplatform/v1beta1/tool.proto;l=406 + * deprecated. See google/cloud/aiplatform/v1beta1/tool.proto;l=478 * @return Whether the vectorDistanceThreshold field is set. */ @java.lang.Deprecated @@ -249,7 +249,7 @@ com.google.cloud.aiplatform.v1beta1.VertexRagStore.RagResourceOrBuilder getRagRe * * * @deprecated google.cloud.aiplatform.v1beta1.VertexRagStore.vector_distance_threshold is - * deprecated. See google/cloud/aiplatform/v1beta1/tool.proto;l=406 + * deprecated. See google/cloud/aiplatform/v1beta1/tool.proto;l=478 * @return The vectorDistanceThreshold. */ @java.lang.Deprecated diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/tool.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/tool.proto index f324634d11c7..177aedfd3f2e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/tool.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/tool.proto @@ -99,6 +99,15 @@ message Tool { // Required. The environment being operated. Environment environment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. By default, [predefined + // functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) + // are included in the final model call. Some of them can be explicitly + // excluded from being automatically included. This can serve two purposes: + // 1. Using a more restricted / different action space. + // 2. Improving the definitions / instructions of predefined functions. + repeated string excluded_predefined_functions = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Optional. Function tool type. @@ -275,6 +284,64 @@ message FunctionCall { google.protobuf.Struct args = 2 [(google.api.field_behavior) = OPTIONAL]; } +// A datatype containing media that is part of a `FunctionResponse` message. +// +// A `FunctionResponsePart` consists of data which has an associated datatype. A +// `FunctionResponsePart` can only contain one of the accepted types in +// `FunctionResponsePart.data`. +// +// A `FunctionResponsePart` must have a fixed IANA MIME type identifying the +// type and subtype of the media if the `inline_data` field is filled with raw +// bytes. +message FunctionResponsePart { + // The data of the function response part. + oneof data { + // Inline media bytes. + FunctionResponseBlob inline_data = 1; + + // URI based data. + FunctionResponseFileData file_data = 2; + } +} + +// Raw media bytes for function response. +// +// Text should not be sent as raw bytes, use the 'text' field. +message FunctionResponseBlob { + // Required. The IANA standard MIME type of the source data. + string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Raw bytes. + bytes data = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Display name of the blob. + // + // Used to provide a label or filename to distinguish blobs. + // + // This field is only returned in PromptMessage for prompt management. + // It is currently used in the Gemini GenerateContent calls only when server + // side tools (code_execution, google_search, and url_context) are enabled. + string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// URI based data for function response. +message FunctionResponseFileData { + // Required. The IANA standard MIME type of the source data. + string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. URI. + string file_uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Display name of the file data. + // + // Used to provide a label or filename to distinguish file datas. + // + // This field is only returned in PromptMessage for prompt management. + // It is currently used in the Gemini GenerateContent calls only when server + // side tools (code_execution, google_search, and url_context) are enabled. + string display_name = 3 [(google.api.field_behavior) = OPTIONAL]; +} + // The result output from a [FunctionCall] that contains a string representing // the [FunctionDeclaration.name] and a structured JSON object containing any // output from the function is used as context to the model. This should contain @@ -293,6 +360,11 @@ message FunctionResponse { // error details (if any). If "output" and "error" keys are not specified, // then whole "response" is treated as function output. google.protobuf.Struct response = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Ordered `Parts` that constitute a function response. Parts may + // have different IANA MIME types. + repeated FunctionResponsePart parts = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Code generated by the model that is meant to be executed, and the result diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1/ConversationalSearchServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1/ConversationalSearchServiceClientHttpJsonTest.java index aa942d67b239..ce299e8dbaeb 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1/ConversationalSearchServiceClientHttpJsonTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1/ConversationalSearchServiceClientHttpJsonTest.java @@ -896,6 +896,7 @@ public void createSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -953,6 +954,7 @@ public void createSessionTest2() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -1094,6 +1096,7 @@ public void updateSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -1109,6 +1112,7 @@ public void updateSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -1150,6 +1154,7 @@ public void updateSessionExceptionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -1173,6 +1178,7 @@ public void getSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -1230,6 +1236,7 @@ public void getSessionTest2() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1/ConversationalSearchServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1/ConversationalSearchServiceClientTest.java index 48e7616f2c6f..a61aa416b851 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1/ConversationalSearchServiceClientTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1/ConversationalSearchServiceClientTest.java @@ -891,6 +891,7 @@ public void createSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -943,6 +944,7 @@ public void createSessionTest2() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -1065,6 +1067,7 @@ public void updateSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -1115,6 +1118,7 @@ public void getSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -1166,6 +1170,7 @@ public void getSessionTest2() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1/SessionServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1/SessionServiceClientHttpJsonTest.java index eb4d9e9d400a..694ee8b7574b 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1/SessionServiceClientHttpJsonTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1/SessionServiceClientHttpJsonTest.java @@ -90,6 +90,7 @@ public void createSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -147,6 +148,7 @@ public void createSessionTest2() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -288,6 +290,7 @@ public void updateSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -303,6 +306,7 @@ public void updateSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -344,6 +348,7 @@ public void updateSessionExceptionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -367,6 +372,7 @@ public void getSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -424,6 +430,7 @@ public void getSessionTest2() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1/SessionServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1/SessionServiceClientTest.java index f2be29b8a18b..7f4f8c6449a3 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1/SessionServiceClientTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1/SessionServiceClientTest.java @@ -96,6 +96,7 @@ public void createSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -148,6 +149,7 @@ public void createSessionTest2() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -270,6 +272,7 @@ public void updateSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -320,6 +323,7 @@ public void getSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) @@ -371,6 +375,7 @@ public void getSessionTest2() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/java/com/google/cloud/discoveryengine/v1/Session.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/java/com/google/cloud/discoveryengine/v1/Session.java index 0d8c3fd62536..16d32d11391f 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/java/com/google/cloud/discoveryengine/v1/Session.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/java/com/google/cloud/discoveryengine/v1/Session.java @@ -45,6 +45,7 @@ private Session() { state_ = 0; userPseudoId_ = ""; turns_ = java.util.Collections.emptyList(); + labels_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @@ -349,6 +350,64 @@ public interface TurnOrBuilder */ com.google.cloud.discoveryengine.v1.AnswerOrBuilder getDetailedAnswerOrBuilder(); + /** + * + * + *
+     * Output only. In
+     * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
+     * API, if
+     * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
+     * is set to true, this field will be populated when getting assistant
+     * session.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the detailedAssistAnswer field is set. + */ + boolean hasDetailedAssistAnswer(); + + /** + * + * + *
+     * Output only. In
+     * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
+     * API, if
+     * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
+     * is set to true, this field will be populated when getting assistant
+     * session.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The detailedAssistAnswer. + */ + com.google.cloud.discoveryengine.v1.AssistAnswer getDetailedAssistAnswer(); + + /** + * + * + *
+     * Output only. In
+     * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
+     * API, if
+     * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
+     * is set to true, this field will be populated when getting assistant
+     * session.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1.AssistAnswerOrBuilder getDetailedAssistAnswerOrBuilder(); + /** * * @@ -691,6 +750,81 @@ public com.google.cloud.discoveryengine.v1.AnswerOrBuilder getDetailedAnswerOrBu : detailedAnswer_; } + public static final int DETAILED_ASSIST_ANSWER_FIELD_NUMBER = 8; + private com.google.cloud.discoveryengine.v1.AssistAnswer detailedAssistAnswer_; + + /** + * + * + *
+     * Output only. In
+     * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
+     * API, if
+     * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
+     * is set to true, this field will be populated when getting assistant
+     * session.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the detailedAssistAnswer field is set. + */ + @java.lang.Override + public boolean hasDetailedAssistAnswer() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. In
+     * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
+     * API, if
+     * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
+     * is set to true, this field will be populated when getting assistant
+     * session.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The detailedAssistAnswer. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1.AssistAnswer getDetailedAssistAnswer() { + return detailedAssistAnswer_ == null + ? com.google.cloud.discoveryengine.v1.AssistAnswer.getDefaultInstance() + : detailedAssistAnswer_; + } + + /** + * + * + *
+     * Output only. In
+     * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
+     * API, if
+     * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
+     * is set to true, this field will be populated when getting assistant
+     * session.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1.AssistAnswerOrBuilder + getDetailedAssistAnswerOrBuilder() { + return detailedAssistAnswer_ == null + ? com.google.cloud.discoveryengine.v1.AssistAnswer.getDefaultInstance() + : detailedAssistAnswer_; + } + public static final int QUERY_CONFIG_FIELD_NUMBER = 16; private static final class QueryConfigDefaultEntryHolder { @@ -839,6 +973,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(7, getDetailedAnswer()); } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getDetailedAssistAnswer()); + } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetQueryConfig(), QueryConfigDefaultEntryHolder.defaultEntry, 16); getUnknownFields().writeTo(output); @@ -859,6 +996,10 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getDetailedAnswer()); } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, getDetailedAssistAnswer()); + } for (java.util.Map.Entry entry : internalGetQueryConfig().getMap().entrySet()) { com.google.protobuf.MapEntry queryConfig__ = @@ -894,6 +1035,10 @@ public boolean equals(final java.lang.Object obj) { if (hasDetailedAnswer()) { if (!getDetailedAnswer().equals(other.getDetailedAnswer())) return false; } + if (hasDetailedAssistAnswer() != other.hasDetailedAssistAnswer()) return false; + if (hasDetailedAssistAnswer()) { + if (!getDetailedAssistAnswer().equals(other.getDetailedAssistAnswer())) return false; + } if (!internalGetQueryConfig().equals(other.internalGetQueryConfig())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -916,6 +1061,10 @@ public int hashCode() { hash = (37 * hash) + DETAILED_ANSWER_FIELD_NUMBER; hash = (53 * hash) + getDetailedAnswer().hashCode(); } + if (hasDetailedAssistAnswer()) { + hash = (37 * hash) + DETAILED_ASSIST_ANSWER_FIELD_NUMBER; + hash = (53 * hash) + getDetailedAssistAnswer().hashCode(); + } if (!internalGetQueryConfig().getMap().isEmpty()) { hash = (37 * hash) + QUERY_CONFIG_FIELD_NUMBER; hash = (53 * hash) + internalGetQueryConfig().hashCode(); @@ -1088,6 +1237,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getQueryFieldBuilder(); getDetailedAnswerFieldBuilder(); + getDetailedAssistAnswerFieldBuilder(); } } @@ -1106,6 +1256,11 @@ public Builder clear() { detailedAnswerBuilder_.dispose(); detailedAnswerBuilder_ = null; } + detailedAssistAnswer_ = null; + if (detailedAssistAnswerBuilder_ != null) { + detailedAssistAnswerBuilder_.dispose(); + detailedAssistAnswerBuilder_ = null; + } internalGetMutableQueryConfig().clear(); return this; } @@ -1157,6 +1312,13 @@ private void buildPartial0(com.google.cloud.discoveryengine.v1.Session.Turn resu to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000008) != 0)) { + result.detailedAssistAnswer_ = + detailedAssistAnswerBuilder_ == null + ? detailedAssistAnswer_ + : detailedAssistAnswerBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000010) != 0)) { result.queryConfig_ = internalGetQueryConfig(); result.queryConfig_.makeImmutable(); } @@ -1222,8 +1384,11 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1.Session.Turn other) if (other.hasDetailedAnswer()) { mergeDetailedAnswer(other.getDetailedAnswer()); } + if (other.hasDetailedAssistAnswer()) { + mergeDetailedAssistAnswer(other.getDetailedAssistAnswer()); + } internalGetMutableQueryConfig().mergeFrom(other.internalGetQueryConfig()); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1269,6 +1434,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 58 + case 66: + { + input.readMessage( + getDetailedAssistAnswerFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 66 case 130: { com.google.protobuf.MapEntry queryConfig__ = @@ -1278,7 +1450,7 @@ public Builder mergeFrom( internalGetMutableQueryConfig() .getMutableMap() .put(queryConfig__.getKey(), queryConfig__.getValue()); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 130 default: @@ -1843,18 +2015,280 @@ public Builder clearDetailedAnswer() { * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession] * API, if * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details] - * is set to true, this field will be populated when getting answer query + * is set to true, this field will be populated when getting answer query + * session. + * + * + * + * .google.cloud.discoveryengine.v1.Answer detailed_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1.Answer.Builder getDetailedAnswerBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDetailedAnswerFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Output only. In
+       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
+       * API, if
+       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
+       * is set to true, this field will be populated when getting answer query
+       * session.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1.Answer detailed_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1.AnswerOrBuilder getDetailedAnswerOrBuilder() { + if (detailedAnswerBuilder_ != null) { + return detailedAnswerBuilder_.getMessageOrBuilder(); + } else { + return detailedAnswer_ == null + ? com.google.cloud.discoveryengine.v1.Answer.getDefaultInstance() + : detailedAnswer_; + } + } + + /** + * + * + *
+       * Output only. In
+       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
+       * API, if
+       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
+       * is set to true, this field will be populated when getting answer query
+       * session.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1.Answer detailed_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1.Answer, + com.google.cloud.discoveryengine.v1.Answer.Builder, + com.google.cloud.discoveryengine.v1.AnswerOrBuilder> + getDetailedAnswerFieldBuilder() { + if (detailedAnswerBuilder_ == null) { + detailedAnswerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1.Answer, + com.google.cloud.discoveryengine.v1.Answer.Builder, + com.google.cloud.discoveryengine.v1.AnswerOrBuilder>( + getDetailedAnswer(), getParentForChildren(), isClean()); + detailedAnswer_ = null; + } + return detailedAnswerBuilder_; + } + + private com.google.cloud.discoveryengine.v1.AssistAnswer detailedAssistAnswer_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1.AssistAnswer, + com.google.cloud.discoveryengine.v1.AssistAnswer.Builder, + com.google.cloud.discoveryengine.v1.AssistAnswerOrBuilder> + detailedAssistAnswerBuilder_; + + /** + * + * + *
+       * Output only. In
+       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
+       * API, if
+       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
+       * is set to true, this field will be populated when getting assistant
+       * session.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the detailedAssistAnswer field is set. + */ + public boolean hasDetailedAssistAnswer() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+       * Output only. In
+       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
+       * API, if
+       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
+       * is set to true, this field will be populated when getting assistant
+       * session.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The detailedAssistAnswer. + */ + public com.google.cloud.discoveryengine.v1.AssistAnswer getDetailedAssistAnswer() { + if (detailedAssistAnswerBuilder_ == null) { + return detailedAssistAnswer_ == null + ? com.google.cloud.discoveryengine.v1.AssistAnswer.getDefaultInstance() + : detailedAssistAnswer_; + } else { + return detailedAssistAnswerBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Output only. In
+       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
+       * API, if
+       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
+       * is set to true, this field will be populated when getting assistant
+       * session.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDetailedAssistAnswer( + com.google.cloud.discoveryengine.v1.AssistAnswer value) { + if (detailedAssistAnswerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detailedAssistAnswer_ = value; + } else { + detailedAssistAnswerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. In
+       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
+       * API, if
+       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
+       * is set to true, this field will be populated when getting assistant
+       * session.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDetailedAssistAnswer( + com.google.cloud.discoveryengine.v1.AssistAnswer.Builder builderForValue) { + if (detailedAssistAnswerBuilder_ == null) { + detailedAssistAnswer_ = builderForValue.build(); + } else { + detailedAssistAnswerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. In
+       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
+       * API, if
+       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
+       * is set to true, this field will be populated when getting assistant
+       * session.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDetailedAssistAnswer( + com.google.cloud.discoveryengine.v1.AssistAnswer value) { + if (detailedAssistAnswerBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && detailedAssistAnswer_ != null + && detailedAssistAnswer_ + != com.google.cloud.discoveryengine.v1.AssistAnswer.getDefaultInstance()) { + getDetailedAssistAnswerBuilder().mergeFrom(value); + } else { + detailedAssistAnswer_ = value; + } + } else { + detailedAssistAnswerBuilder_.mergeFrom(value); + } + if (detailedAssistAnswer_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Output only. In
+       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
+       * API, if
+       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
+       * is set to true, this field will be populated when getting assistant
+       * session.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDetailedAssistAnswer() { + bitField0_ = (bitField0_ & ~0x00000008); + detailedAssistAnswer_ = null; + if (detailedAssistAnswerBuilder_ != null) { + detailedAssistAnswerBuilder_.dispose(); + detailedAssistAnswerBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. In
+       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
+       * API, if
+       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
+       * is set to true, this field will be populated when getting assistant
        * session.
        * 
* * - * .google.cloud.discoveryengine.v1.Answer detailed_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.discoveryengine.v1.Answer.Builder getDetailedAnswerBuilder() { - bitField0_ |= 0x00000004; + public com.google.cloud.discoveryengine.v1.AssistAnswer.Builder + getDetailedAssistAnswerBuilder() { + bitField0_ |= 0x00000008; onChanged(); - return getDetailedAnswerFieldBuilder().getBuilder(); + return getDetailedAssistAnswerFieldBuilder().getBuilder(); } /** @@ -1865,21 +2299,22 @@ public com.google.cloud.discoveryengine.v1.Answer.Builder getDetailedAnswerBuild * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession] * API, if * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details] - * is set to true, this field will be populated when getting answer query + * is set to true, this field will be populated when getting assistant * session. * * * - * .google.cloud.discoveryengine.v1.Answer detailed_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.discoveryengine.v1.AnswerOrBuilder getDetailedAnswerOrBuilder() { - if (detailedAnswerBuilder_ != null) { - return detailedAnswerBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1.AssistAnswerOrBuilder + getDetailedAssistAnswerOrBuilder() { + if (detailedAssistAnswerBuilder_ != null) { + return detailedAssistAnswerBuilder_.getMessageOrBuilder(); } else { - return detailedAnswer_ == null - ? com.google.cloud.discoveryengine.v1.Answer.getDefaultInstance() - : detailedAnswer_; + return detailedAssistAnswer_ == null + ? com.google.cloud.discoveryengine.v1.AssistAnswer.getDefaultInstance() + : detailedAssistAnswer_; } } @@ -1891,29 +2326,29 @@ public com.google.cloud.discoveryengine.v1.AnswerOrBuilder getDetailedAnswerOrBu * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession] * API, if * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details] - * is set to true, this field will be populated when getting answer query + * is set to true, this field will be populated when getting assistant * session. * * * - * .google.cloud.discoveryengine.v1.Answer detailed_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.discoveryengine.v1.Answer, - com.google.cloud.discoveryengine.v1.Answer.Builder, - com.google.cloud.discoveryengine.v1.AnswerOrBuilder> - getDetailedAnswerFieldBuilder() { - if (detailedAnswerBuilder_ == null) { - detailedAnswerBuilder_ = + com.google.cloud.discoveryengine.v1.AssistAnswer, + com.google.cloud.discoveryengine.v1.AssistAnswer.Builder, + com.google.cloud.discoveryengine.v1.AssistAnswerOrBuilder> + getDetailedAssistAnswerFieldBuilder() { + if (detailedAssistAnswerBuilder_ == null) { + detailedAssistAnswerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.discoveryengine.v1.Answer, - com.google.cloud.discoveryengine.v1.Answer.Builder, - com.google.cloud.discoveryengine.v1.AnswerOrBuilder>( - getDetailedAnswer(), getParentForChildren(), isClean()); - detailedAnswer_ = null; + com.google.cloud.discoveryengine.v1.AssistAnswer, + com.google.cloud.discoveryengine.v1.AssistAnswer.Builder, + com.google.cloud.discoveryengine.v1.AssistAnswerOrBuilder>( + getDetailedAssistAnswer(), getParentForChildren(), isClean()); + detailedAssistAnswer_ = null; } - return detailedAnswerBuilder_; + return detailedAssistAnswerBuilder_; } private com.google.protobuf.MapField queryConfig_; @@ -1936,7 +2371,7 @@ public com.google.cloud.discoveryengine.v1.AnswerOrBuilder getDetailedAnswerOrBu if (!queryConfig_.isMutable()) { queryConfig_ = queryConfig_.copy(); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return queryConfig_; } @@ -2046,7 +2481,7 @@ public java.lang.String getQueryConfigOrThrow(java.lang.String key) { } public Builder clearQueryConfig() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); internalGetMutableQueryConfig().getMutableMap().clear(); return this; } @@ -2076,7 +2511,7 @@ public Builder removeQueryConfig(java.lang.String key) { /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableQueryConfig() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; return internalGetMutableQueryConfig().getMutableMap(); } @@ -2102,7 +2537,7 @@ public Builder putQueryConfig(java.lang.String key, java.lang.String value) { throw new NullPointerException("map value"); } internalGetMutableQueryConfig().getMutableMap().put(key, value); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; return this; } @@ -2122,7 +2557,7 @@ public Builder putQueryConfig(java.lang.String key, java.lang.String value) { */ public Builder putAllQueryConfig(java.util.Map values) { internalGetMutableQueryConfig().getMutableMap().putAll(values); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; return this; } @@ -2471,6 +2906,78 @@ public com.google.cloud.discoveryengine.v1.Session.TurnOrBuilder getTurnsOrBuild return turns_.get(index); } + public static final int LABELS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList labels_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. The labels for the session.
+   * Can be set as filter in ListSessionsRequest.
+   * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the labels. + */ + public com.google.protobuf.ProtocolStringList getLabelsList() { + return labels_; + } + + /** + * + * + *
+   * Optional. The labels for the session.
+   * Can be set as filter in ListSessionsRequest.
+   * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of labels. + */ + public int getLabelsCount() { + return labels_.size(); + } + + /** + * + * + *
+   * Optional. The labels for the session.
+   * Can be set as filter in ListSessionsRequest.
+   * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The labels at the given index. + */ + public java.lang.String getLabels(int index) { + return labels_.get(index); + } + + /** + * + * + *
+   * Optional. The labels for the session.
+   * Can be set as filter in ListSessionsRequest.
+   * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the labels at the given index. + */ + public com.google.protobuf.ByteString getLabelsBytes(int index) { + return labels_.getByteString(index); + } + public static final int START_TIME_FIELD_NUMBER = 5; private com.google.protobuf.Timestamp startTime_; @@ -2633,6 +3140,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (isPinned_ != false) { output.writeBool(8, isPinned_); } + for (int i = 0; i < labels_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, labels_.getRaw(i)); + } getUnknownFields().writeTo(output); } @@ -2666,6 +3176,14 @@ public int getSerializedSize() { if (isPinned_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, isPinned_); } + { + int dataSize = 0; + for (int i = 0; i < labels_.size(); i++) { + dataSize += computeStringSizeNoTag(labels_.getRaw(i)); + } + size += dataSize; + size += 1 * getLabelsList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2687,6 +3205,7 @@ public boolean equals(final java.lang.Object obj) { if (state_ != other.state_) return false; if (!getUserPseudoId().equals(other.getUserPseudoId())) return false; if (!getTurnsList().equals(other.getTurnsList())) return false; + if (!getLabelsList().equals(other.getLabelsList())) return false; if (hasStartTime() != other.hasStartTime()) return false; if (hasStartTime()) { if (!getStartTime().equals(other.getStartTime())) return false; @@ -2719,6 +3238,10 @@ public int hashCode() { hash = (37 * hash) + TURNS_FIELD_NUMBER; hash = (53 * hash) + getTurnsList().hashCode(); } + if (getLabelsCount() > 0) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + getLabelsList().hashCode(); + } if (hasStartTime()) { hash = (37 * hash) + START_TIME_FIELD_NUMBER; hash = (53 * hash) + getStartTime().hashCode(); @@ -2891,6 +3414,7 @@ public Builder clear() { turnsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); + labels_ = com.google.protobuf.LazyStringArrayList.emptyList(); startTime_ = null; if (startTimeBuilder_ != null) { startTimeBuilder_.dispose(); @@ -2963,16 +3487,20 @@ private void buildPartial0(com.google.cloud.discoveryengine.v1.Session result) { if (((from_bitField0_ & 0x00000008) != 0)) { result.userPseudoId_ = userPseudoId_; } - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000020) != 0)) { + labels_.makeImmutable(); + result.labels_ = labels_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.isPinned_ = isPinned_; } result.bitField0_ |= to_bitField0_; @@ -3068,6 +3596,16 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1.Session other) { } } } + if (!other.labels_.isEmpty()) { + if (labels_.isEmpty()) { + labels_ = other.labels_; + bitField0_ |= 0x00000020; + } else { + ensureLabelsIsMutable(); + labels_.addAll(other.labels_); + } + onChanged(); + } if (other.hasStartTime()) { mergeStartTime(other.getStartTime()); } @@ -3138,13 +3676,13 @@ public Builder mergeFrom( case 42: { input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 42 case 50: { input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 50 case 58: @@ -3156,9 +3694,16 @@ public Builder mergeFrom( case 64: { isPinned_ = input.readBool(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 64 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLabelsIsMutable(); + labels_.add(s); + break; + } // case 74 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3995,6 +4540,198 @@ public com.google.cloud.discoveryengine.v1.Session.Turn.Builder addTurnsBuilder( return turnsBuilder_; } + private com.google.protobuf.LazyStringArrayList labels_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureLabelsIsMutable() { + if (!labels_.isModifiable()) { + labels_ = new com.google.protobuf.LazyStringArrayList(labels_); + } + bitField0_ |= 0x00000020; + } + + /** + * + * + *
+     * Optional. The labels for the session.
+     * Can be set as filter in ListSessionsRequest.
+     * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the labels. + */ + public com.google.protobuf.ProtocolStringList getLabelsList() { + labels_.makeImmutable(); + return labels_; + } + + /** + * + * + *
+     * Optional. The labels for the session.
+     * Can be set as filter in ListSessionsRequest.
+     * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of labels. + */ + public int getLabelsCount() { + return labels_.size(); + } + + /** + * + * + *
+     * Optional. The labels for the session.
+     * Can be set as filter in ListSessionsRequest.
+     * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The labels at the given index. + */ + public java.lang.String getLabels(int index) { + return labels_.get(index); + } + + /** + * + * + *
+     * Optional. The labels for the session.
+     * Can be set as filter in ListSessionsRequest.
+     * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the labels at the given index. + */ + public com.google.protobuf.ByteString getLabelsBytes(int index) { + return labels_.getByteString(index); + } + + /** + * + * + *
+     * Optional. The labels for the session.
+     * Can be set as filter in ListSessionsRequest.
+     * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The labels to set. + * @return This builder for chaining. + */ + public Builder setLabels(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The labels for the session.
+     * Can be set as filter in ListSessionsRequest.
+     * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The labels to add. + * @return This builder for chaining. + */ + public Builder addLabels(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The labels for the session.
+     * Can be set as filter in ListSessionsRequest.
+     * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The labels to add. + * @return This builder for chaining. + */ + public Builder addAllLabels(java.lang.Iterable values) { + ensureLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, labels_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The labels for the session.
+     * Can be set as filter in ListSessionsRequest.
+     * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLabels() { + labels_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The labels for the session.
+     * Can be set as filter in ListSessionsRequest.
+     * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the labels to add. + * @return This builder for chaining. + */ + public Builder addLabelsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLabelsIsMutable(); + labels_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + private com.google.protobuf.Timestamp startTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -4015,7 +4752,7 @@ public com.google.cloud.discoveryengine.v1.Session.Turn.Builder addTurnsBuilder( * @return Whether the startTime field is set. */ public boolean hasStartTime() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** @@ -4057,7 +4794,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { } else { startTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -4078,7 +4815,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu } else { startTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -4095,7 +4832,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu */ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { if (startTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) + if (((bitField0_ & 0x00000040) != 0) && startTime_ != null && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getStartTimeBuilder().mergeFrom(value); @@ -4106,7 +4843,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { startTimeBuilder_.mergeFrom(value); } if (startTime_ != null) { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); } return this; @@ -4123,7 +4860,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { * */ public Builder clearStartTime() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); startTime_ = null; if (startTimeBuilder_ != null) { startTimeBuilder_.dispose(); @@ -4144,7 +4881,7 @@ public Builder clearStartTime() { * */ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return getStartTimeFieldBuilder().getBuilder(); } @@ -4214,7 +4951,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * @return Whether the endTime field is set. */ public boolean hasEndTime() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** @@ -4256,7 +4993,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { } else { endTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -4277,7 +5014,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) } else { endTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -4294,7 +5031,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) */ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) + if (((bitField0_ & 0x00000080) != 0) && endTime_ != null && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getEndTimeBuilder().mergeFrom(value); @@ -4305,7 +5042,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { endTimeBuilder_.mergeFrom(value); } if (endTime_ != null) { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); } return this; @@ -4322,7 +5059,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { * */ public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); endTime_ = null; if (endTimeBuilder_ != null) { endTimeBuilder_.dispose(); @@ -4343,7 +5080,7 @@ public Builder clearEndTime() { * */ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return getEndTimeFieldBuilder().getBuilder(); } @@ -4428,7 +5165,7 @@ public boolean getIsPinned() { public Builder setIsPinned(boolean value) { isPinned_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -4446,7 +5183,7 @@ public Builder setIsPinned(boolean value) { * @return This builder for chaining. */ public Builder clearIsPinned() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); isPinned_ = false; onChanged(); return this; diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/java/com/google/cloud/discoveryengine/v1/SessionOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/java/com/google/cloud/discoveryengine/v1/SessionOrBuilder.java index b0ef44bb3965..f3e1cfafba64 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/java/com/google/cloud/discoveryengine/v1/SessionOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/java/com/google/cloud/discoveryengine/v1/SessionOrBuilder.java @@ -192,6 +192,64 @@ public interface SessionOrBuilder */ com.google.cloud.discoveryengine.v1.Session.TurnOrBuilder getTurnsOrBuilder(int index); + /** + * + * + *
+   * Optional. The labels for the session.
+   * Can be set as filter in ListSessionsRequest.
+   * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the labels. + */ + java.util.List getLabelsList(); + + /** + * + * + *
+   * Optional. The labels for the session.
+   * Can be set as filter in ListSessionsRequest.
+   * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of labels. + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. The labels for the session.
+   * Can be set as filter in ListSessionsRequest.
+   * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The labels at the given index. + */ + java.lang.String getLabels(int index); + + /** + * + * + *
+   * Optional. The labels for the session.
+   * Can be set as filter in ListSessionsRequest.
+   * 
+ * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the labels at the given index. + */ + com.google.protobuf.ByteString getLabelsBytes(int index); + /** * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/java/com/google/cloud/discoveryengine/v1/SessionProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/java/com/google/cloud/discoveryengine/v1/SessionProto.java index 6c0b38002de7..185c2b7f2559 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/java/com/google/cloud/discoveryengine/v1/SessionProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/java/com/google/cloud/discoveryengine/v1/SessionProto.java @@ -56,47 +56,50 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n" + "-google/cloud/discoveryengine/v1/session.proto\022\037google.cloud.discoveryengine.v1" + "\032\037google/api/field_behavior.proto\032\031googl" - + "e/api/resource.proto\032,google/cloud/disco" - + "veryengine/v1/answer.proto\032\037google/protobuf/timestamp.proto\"\300\010\n" + + "e/api/resource.proto\032,google/cloud/discoveryengine/v1/answer.proto\0323google/cloud" + + "/discoveryengine/v1/assist_answer.proto\032\037google/protobuf/timestamp.proto\"\251" + + "\t\n" + "\007Session\022\021\n" + "\004name\030\001 \001(\tB\003\340A\005\022\031\n" + "\014display_name\030\007 \001(\tB\003\340A\001\022=\n" + "\005state\030\002 \001(\0162..google.cloud.discoveryengine.v1.Session.State\022\026\n" + "\016user_pseudo_id\030\003 \001(\t\022<\n" - + "\005turns\030\004 \003(\0132-.google.cloud.discoveryengine.v1.Session.Turn\0223\n\n" + + "\005turns\030\004 \003(\0132-.google.cloud.discoveryengine.v1.Session.Turn\022\023\n" + + "\006labels\030\t \003(\tB\003\340A\001\0223\n\n" + "start_time\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + "\010end_time\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\026\n" - + "\tis_pinned\030\010 \001(\010B\003\340A\001\032\327\002\n" + + "\tis_pinned\030\010 \001(\010B\003\340A\001\032\253\003\n" + "\004Turn\022:\n" + "\005query\030\001" + " \001(\0132&.google.cloud.discoveryengine.v1.QueryB\003\340A\001\022=\n" + "\006answer\030\002 \001(\tB-\340A\001\372A\'\n" + "%discoveryengine.googleapis.com/Answer\022E\n" + "\017detailed_answer\030\007" - + " \001(\0132\'.google.cloud.discoveryengine.v1.AnswerB\003\340A\003\022Y\n" - + "\014query_config\030\020 \003(\0132>.google.cloud.disco" - + "veryengine.v1.Session.Turn.QueryConfigEntryB\003\340A\001\0322\n" + + " \001(\0132\'.google.cloud.discoveryengine.v1.AnswerB\003\340A\003\022R\n" + + "\026detailed_assist_answer\030\010" + + " \001(\0132-.google.cloud.discoveryengine.v1.AssistAnswerB\003\340A\003\022Y\n" + + "\014query_config\030\020 \003(\0132>.google.cloud.discove" + + "ryengine.v1.Session.Turn.QueryConfigEntryB\003\340A\001\0322\n" + "\020QueryConfigEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001\"/\n" + "\005State\022\025\n" + "\021STATE_UNSPECIFIED\020\000\022\017\n" + "\013IN_PROGRESS\020\001:\346\002\352A\342\002\n" - + "&discoveryengine.googleapis.com/Session\022Rprojects/{project}/locations/{location}/da" - + "taStores/{data_store}/sessions/{session}\022kprojects/{project}/locations/{location" - + "}/collections/{collection}/dataStores/{data_store}/sessions/{session}\022dprojects/" - + "{project}/locations/{location}/collectio" - + "ns/{collection}/engines/{engine}/sessions/{session}*\010sessions2\007session\"9\n" + + "&discoveryengine.googleapis.com/Session\022Rproj" + + "ects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}\022k" + + "projects/{project}/locations/{location}/collections/{collection}/dataStores/{dat" + + "a_store}/sessions/{session}\022dprojects/{project}/locations/{location}/collections" + + "/{collection}/engines/{engine}/sessions/{session}*\010sessions2\007session\"9\n" + "\005Query\022\016\n" + "\004text\030\002 \001(\tH\000\022\025\n" + "\010query_id\030\001 \001(\tB\003\340A\003B\t\n" + "\007contentB\377\001\n" - + "#com.google.cloud.discoveryengine.v1B\014SessionProtoP\001ZMcloud.google." - + "com/go/discoveryengine/apiv1/discoveryen" - + "ginepb;discoveryenginepb\242\002\017DISCOVERYENGI" - + "NE\252\002\037Google.Cloud.DiscoveryEngine.V1\312\002\037G" - + "oogle\\Cloud\\DiscoveryEngine\\V1\352\002\"Google:" - + ":Cloud::DiscoveryEngine::V1b\006proto3" + + "#com.google.cloud.discoveryengine.v1B\014SessionProtoP\001ZMcloud.google.co" + + "m/go/discoveryengine/apiv1/discoveryengi" + + "nepb;discoveryenginepb\242\002\017DISCOVERYENGINE" + + "\252\002\037Google.Cloud.DiscoveryEngine.V1\312\002\037Goo" + + "gle\\Cloud\\DiscoveryEngine\\V1\352\002\"Google::Cloud::DiscoveryEngine::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -105,6 +108,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.discoveryengine.v1.AnswerProto.getDescriptor(), + com.google.cloud.discoveryengine.v1.AssistAnswerProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_discoveryengine_v1_Session_descriptor = @@ -118,6 +122,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "State", "UserPseudoId", "Turns", + "Labels", "StartTime", "EndTime", "IsPinned", @@ -128,7 +133,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1_Session_Turn_descriptor, new java.lang.String[] { - "Query", "Answer", "DetailedAnswer", "QueryConfig", + "Query", "Answer", "DetailedAnswer", "DetailedAssistAnswer", "QueryConfig", }); internal_static_google_cloud_discoveryengine_v1_Session_Turn_QueryConfigEntry_descriptor = internal_static_google_cloud_discoveryengine_v1_Session_Turn_descriptor @@ -158,6 +163,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.discoveryengine.v1.AnswerProto.getDescriptor(); + com.google.cloud.discoveryengine.v1.AssistAnswerProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/proto/google/cloud/discoveryengine/v1/session.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/proto/google/cloud/discoveryengine/v1/session.proto index 61838ea95fd0..cb333fe95111 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/proto/google/cloud/discoveryengine/v1/session.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/proto/google/cloud/discoveryengine/v1/session.proto @@ -19,6 +19,7 @@ package google.cloud.discoveryengine.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/discoveryengine/v1/answer.proto"; +import "google/cloud/discoveryengine/v1/assist_answer.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1"; @@ -67,6 +68,15 @@ message Session { // session. Answer detailed_answer = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. In + // [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession] + // API, if + // [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details] + // is set to true, this field will be populated when getting assistant + // session. + AssistAnswer detailed_assist_answer = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // Optional. Represents metadata related to the query config, for example // LLM model and version used, model parameters (temperature, grounding // parameters, etc.). The prefix "google." is reserved for Google-developed @@ -103,6 +113,10 @@ message Session { // Turns. repeated Turn turns = 4; + // Optional. The labels for the session. + // Can be set as filter in ListSessionsRequest. + repeated string labels = 9 [(google.api.field_behavior) = OPTIONAL]; + // Output only. The time the session started. google.protobuf.Timestamp start_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AdvancedVoiceOptions.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AdvancedVoiceOptions.java index e92e19c7470d..690689132b25 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AdvancedVoiceOptions.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AdvancedVoiceOptions.java @@ -100,6 +100,30 @@ public boolean getLowLatencyJourneySynthesis() { return lowLatencyJourneySynthesis_; } + public static final int RELAX_SAFETY_FILTERS_FIELD_NUMBER = 8; + private boolean relaxSafetyFilters_ = false; + + /** + * + * + *
+   * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
+   * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
+   * Otherwise, will return result
+   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+   * 
+ * + * + * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The relaxSafetyFilters. + */ + @java.lang.Override + public boolean getRelaxSafetyFilters() { + return relaxSafetyFilters_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -117,6 +141,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(1, lowLatencyJourneySynthesis_); } + if (relaxSafetyFilters_ != false) { + output.writeBool(8, relaxSafetyFilters_); + } getUnknownFields().writeTo(output); } @@ -129,6 +156,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, lowLatencyJourneySynthesis_); } + if (relaxSafetyFilters_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, relaxSafetyFilters_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -149,6 +179,7 @@ public boolean equals(final java.lang.Object obj) { if (hasLowLatencyJourneySynthesis()) { if (getLowLatencyJourneySynthesis() != other.getLowLatencyJourneySynthesis()) return false; } + if (getRelaxSafetyFilters() != other.getRelaxSafetyFilters()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -165,6 +196,8 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLowLatencyJourneySynthesis()); } + hash = (37 * hash) + RELAX_SAFETY_FILTERS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRelaxSafetyFilters()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -307,6 +340,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; lowLatencyJourneySynthesis_ = false; + relaxSafetyFilters_ = false; return this; } @@ -348,6 +382,9 @@ private void buildPartial0(com.google.cloud.texttospeech.v1.AdvancedVoiceOptions result.lowLatencyJourneySynthesis_ = lowLatencyJourneySynthesis_; to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.relaxSafetyFilters_ = relaxSafetyFilters_; + } result.bitField0_ |= to_bitField0_; } @@ -400,6 +437,9 @@ public Builder mergeFrom(com.google.cloud.texttospeech.v1.AdvancedVoiceOptions o if (other.hasLowLatencyJourneySynthesis()) { setLowLatencyJourneySynthesis(other.getLowLatencyJourneySynthesis()); } + if (other.getRelaxSafetyFilters() != false) { + setRelaxSafetyFilters(other.getRelaxSafetyFilters()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -432,6 +472,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 8 + case 64: + { + relaxSafetyFilters_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 64 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -527,6 +573,77 @@ public Builder clearLowLatencyJourneySynthesis() { return this; } + private boolean relaxSafetyFilters_; + + /** + * + * + *
+     * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
+     * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
+     * Otherwise, will return result
+     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * 
+ * + * + * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The relaxSafetyFilters. + */ + @java.lang.Override + public boolean getRelaxSafetyFilters() { + return relaxSafetyFilters_; + } + + /** + * + * + *
+     * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
+     * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
+     * Otherwise, will return result
+     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * 
+ * + * + * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The relaxSafetyFilters to set. + * @return This builder for chaining. + */ + public Builder setRelaxSafetyFilters(boolean value) { + + relaxSafetyFilters_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
+     * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
+     * Otherwise, will return result
+     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * 
+ * + * + * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRelaxSafetyFilters() { + bitField0_ = (bitField0_ & ~0x00000002); + relaxSafetyFilters_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AdvancedVoiceOptionsOrBuilder.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AdvancedVoiceOptionsOrBuilder.java index bfaa1acf2ec3..3a90c00f3177 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AdvancedVoiceOptionsOrBuilder.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AdvancedVoiceOptionsOrBuilder.java @@ -51,4 +51,22 @@ public interface AdvancedVoiceOptionsOrBuilder * @return The lowLatencyJourneySynthesis. */ boolean getLowLatencyJourneySynthesis(); + + /** + * + * + *
+   * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
+   * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
+   * Otherwise, will return result
+   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+   * 
+ * + * + * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The relaxSafetyFilters. + */ + boolean getRelaxSafetyFilters(); } diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParams.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParams.java index 8634e9bfc6bb..452a552186a9 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParams.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParams.java @@ -305,7 +305,7 @@ public com.google.protobuf.ByteString getModelBytes() { * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=454 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 * @return The enum numeric value on the wire for reportedUsage. */ @java.lang.Override @@ -326,7 +326,7 @@ public int getReportedUsageValue() { * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=454 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 * @return The reportedUsage. */ @java.lang.Override @@ -845,7 +845,7 @@ public Builder setModelBytes(com.google.protobuf.ByteString value) { * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=454 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 * @return The enum numeric value on the wire for reportedUsage. */ @java.lang.Override @@ -866,7 +866,7 @@ public int getReportedUsageValue() { * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=454 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 * @param value The enum numeric value on the wire for reportedUsage to set. * @return This builder for chaining. */ @@ -890,7 +890,7 @@ public Builder setReportedUsageValue(int value) { * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=454 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 * @return The reportedUsage. */ @java.lang.Override @@ -916,7 +916,7 @@ public com.google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsage getRepor * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=454 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 * @param value The reportedUsage to set. * @return This builder for chaining. */ @@ -944,7 +944,7 @@ public Builder setReportedUsage( * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=454 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParamsOrBuilder.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParamsOrBuilder.java index 4980c7c01964..60c4c033b0c2 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParamsOrBuilder.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParamsOrBuilder.java @@ -66,7 +66,7 @@ public interface CustomVoiceParamsOrBuilder * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=454 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 * @return The enum numeric value on the wire for reportedUsage. */ @java.lang.Deprecated @@ -84,7 +84,7 @@ public interface CustomVoiceParamsOrBuilder * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=454 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 * @return The reportedUsage. */ @java.lang.Deprecated diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechProto.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechProto.java index 67c5c1e3c077..317d98f9b106 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechProto.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechProto.java @@ -139,25 +139,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\002 \001(\t\022B\n" + "\013ssml_gender\030\003" + " \001(\0162-.google.cloud.texttospeech.v1.SsmlVoiceGender\022!\n" - + "\031natural_sample_rate_hertz\030\004 \001(\005\"d\n" + + "\031natural_sample_rate_hertz\030\004 \001(\005\"\212\001\n" + "\024AdvancedVoiceOptions\022*\n" - + "\035low_latency_journey_synthesis\030\001 \001(\010H\000\210\001\001B \n" + + "\035low_latency_journey_synthesis\030\001 \001(\010H\000\210\001\001\022$\n" + + "\024relax_safety_filters\030\010 \001(\010B\006\340A\004\340A\001B \n" + "\036_low_latency_journey_synthesis\"\335\002\n" + "\027SynthesizeSpeechRequest\022@\n" + "\005input\030\001" + " \001(\0132,.google.cloud.texttospeech.v1.SynthesisInputB\003\340A\002\022F\n" - + "\005voice\030\002 \001(\01322." - + "google.cloud.texttospeech.v1.VoiceSelectionParamsB\003\340A\002\022D\n" - + "\014audio_config\030\003 \001(\0132).g" - + "oogle.cloud.texttospeech.v1.AudioConfigB\003\340A\002\022W\n" - + "\026advanced_voice_options\030\010 \001(\01322.g" - + "oogle.cloud.texttospeech.v1.AdvancedVoiceOptionsH\000\210\001\001B\031\n" + + "\005voice\030\002 \001(\01322.g" + + "oogle.cloud.texttospeech.v1.VoiceSelectionParamsB\003\340A\002\022D\n" + + "\014audio_config\030\003 \001(\0132).go" + + "ogle.cloud.texttospeech.v1.AudioConfigB\003\340A\002\022W\n" + + "\026advanced_voice_options\030\010 \001(\01322.go" + + "ogle.cloud.texttospeech.v1.AdvancedVoiceOptionsH\000\210\001\001B\031\n" + "\027_advanced_voice_options\"\242\003\n" + "\031CustomPronunciationParams\022\023\n" + "\006phrase\030\001 \001(\tH\000\210\001\001\022h\n" - + "\021phonetic_encoding\030\002 \001(\0162H" - + ".google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncodingH\001\210\001\001\022\032\n" - + "\r" + + "\021phonetic_encoding\030\002 \001(\0162H." + + "google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncodingH\001\210\001\001\022\032\n\r" + "pronunciation\030\003 \001(\tH\002\210\001\001\"\266\001\n" + "\020PhoneticEncoding\022!\n" + "\035PHONETIC_ENCODING_UNSPECIFIED\020\000\022\031\n" @@ -169,11 +169,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022_phonetic_encodingB\020\n" + "\016_pronunciation\"g\n" + "\024CustomPronunciations\022O\n" - + "\016pronunciations\030\001 \003(\01327.google.c" - + "loud.texttospeech.v1.CustomPronunciationParams\"\220\001\n" + + "\016pronunciations\030\001 \003(\01327.google.cl" + + "oud.texttospeech.v1.CustomPronunciationParams\"\220\001\n" + "\022MultiSpeakerMarkup\022I\n" - + "\005turns\030\001" - + " \003(\01325.google.cloud.texttospeech.v1.MultiSpeakerMarkup.TurnB\003\340A\002\032/\n" + + "\005turns\030\001 " + + "\003(\01325.google.cloud.texttospeech.v1.MultiSpeakerMarkup.TurnB\003\340A\002\032/\n" + "\004Turn\022\024\n" + "\007speaker\030\001 \001(\tB\003\340A\002\022\021\n" + "\004text\030\002 \001(\tB\003\340A\002\"P\n" @@ -190,8 +190,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\024multi_speaker_markup\030\004" + " \001(\01320.google.cloud.texttospeech.v1.MultiSpeakerMarkupH\000\022\023\n" + "\006prompt\030\006 \001(\tH\001\210\001\001\022V\n" - + "\025custom_pronunciations\030\003 \001(\01322" - + ".google.cloud.texttospeech.v1.CustomPronunciationsB\003\340A\001B\016\n" + + "\025custom_pronunciations\030\003 \001(\01322." + + "google.cloud.texttospeech.v1.CustomPronunciationsB\003\340A\001B\016\n" + "\014input_sourceB\t\n" + "\007_prompt\"\216\003\n" + "\024VoiceSelectionParams\022\032\n\r" @@ -199,16 +199,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\002 \001(\t\022B\n" + "\013ssml_gender\030\003" + " \001(\0162-.google.cloud.texttospeech.v1.SsmlVoiceGender\022E\n" - + "\014custom_voice\030\004 \001(\0132" - + "/.google.cloud.texttospeech.v1.CustomVoiceParams\022H\n" - + "\013voice_clone\030\005 \001(\0132..google.c" - + "loud.texttospeech.v1.VoiceCloneParamsB\003\340A\001\022\027\n\n" + + "\014custom_voice\030\004 \001(\0132/" + + ".google.cloud.texttospeech.v1.CustomVoiceParams\022H\n" + + "\013voice_clone\030\005 \001(\0132..google.cl" + + "oud.texttospeech.v1.VoiceCloneParamsB\003\340A\001\022\027\n\n" + "model_name\030\006 \001(\tB\003\340A\001\022^\n" - + "\032multi_speaker_voice_config\030\007 \001(\01325.google.cloud.t" - + "exttospeech.v1.MultiSpeakerVoiceConfigB\003\340A\001\"\361\001\n" + + "\032multi_speaker_voice_config\030\007 \001(\01325.google.cloud.te" + + "xttospeech.v1.MultiSpeakerVoiceConfigB\003\340A\001\"\361\001\n" + "\013AudioConfig\022H\n" - + "\016audio_encoding\030\001 " - + "\001(\0162+.google.cloud.texttospeech.v1.AudioEncodingB\003\340A\002\022\035\n\r" + + "\016audio_encoding\030\001 \001" + + "(\0162+.google.cloud.texttospeech.v1.AudioEncodingB\003\340A\002\022\035\n\r" + "speaking_rate\030\002 \001(\001B\006\340A\004\340A\001\022\025\n" + "\005pitch\030\003 \001(\001B\006\340A\004\340A\001\022\036\n" + "\016volume_gain_db\030\004 \001(\001B\006\340A\004\340A\001\022\036\n" @@ -217,8 +217,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021CustomVoiceParams\0222\n" + "\005model\030\001 \001(\tB#\340A\002\372A\035\n" + "\033automl.googleapis.com/Model\022\\\n" - + "\016reported_usage\030\003 \001(\0162=.google.cloud" - + ".texttospeech.v1.CustomVoiceParams.ReportedUsageB\005\030\001\340A\001\"J\n\r" + + "\016reported_usage\030\003 \001(\0162=.google.cloud." + + "texttospeech.v1.CustomVoiceParams.ReportedUsageB\005\030\001\340A\001\"J\n\r" + "ReportedUsage\022\036\n" + "\032REPORTED_USAGE_UNSPECIFIED\020\000\022\014\n" + "\010REALTIME\020\001\022\013\n" @@ -228,13 +228,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030SynthesizeSpeechResponse\022\025\n\r" + "audio_content\030\001 \001(\014\"\237\001\n" + "\024StreamingAudioConfig\022H\n" - + "\016audio_encoding\030\001 " - + "\001(\0162+.google.cloud.texttospeech.v1.AudioEncodingB\003\340A\002\022\036\n" + + "\016audio_encoding\030\001 \001" + + "(\0162+.google.cloud.texttospeech.v1.AudioEncodingB\003\340A\002\022\036\n" + "\021sample_rate_hertz\030\002 \001(\005B\003\340A\001\022\035\n\r" + "speaking_rate\030\003 \001(\001B\006\340A\004\340A\001\"\224\002\n" + "\031StreamingSynthesizeConfig\022F\n" - + "\005voice\030\001 \001(" - + "\01322.google.cloud.texttospeech.v1.VoiceSelectionParamsB\003\340A\002\022W\n" + + "\005voice\030\001 \001(\013" + + "22.google.cloud.texttospeech.v1.VoiceSelectionParamsB\003\340A\002\022W\n" + "\026streaming_audio_config\030\004" + " \001(\01322.google.cloud.texttospeech.v1.StreamingAudioConfigB\003\340A\001\022V\n" + "\025custom_pronunciations\030\005" @@ -248,10 +248,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014input_sourceB\t\n" + "\007_prompt\"\316\001\n" + "\032StreamingSynthesizeRequest\022S\n" - + "\020streaming_config\030\001" - + " \001(\01327.google.cloud.texttospeech.v1.StreamingSynthesizeConfigH\000\022F\n" - + "\005input\030\002 \001(\01325" - + ".google.cloud.texttospeech.v1.StreamingSynthesisInputH\000B\023\n" + + "\020streaming_config\030\001 " + + "\001(\01327.google.cloud.texttospeech.v1.StreamingSynthesizeConfigH\000\022F\n" + + "\005input\030\002 \001(\01325." + + "google.cloud.texttospeech.v1.StreamingSynthesisInputH\000B\023\n" + "\021streaming_request\"4\n" + "\033StreamingSynthesizeResponse\022\025\n\r" + "audio_content\030\001 \001(\014*W\n" @@ -270,24 +270,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\003PCM\020\007\022\007\n" + "\003M4A\020\0102\307\004\n" + "\014TextToSpeech\022\223\001\n\n" - + "ListVoices\022/.google.cloud.texttosp" - + "eech.v1.ListVoicesRequest\0320.google.cloud.texttospeech.v1.ListVoicesResponse\"\"\332A\r" + + "ListVoices\022/.google.cloud.texttospe" + + "ech.v1.ListVoicesRequest\0320.google.cloud.texttospeech.v1.ListVoicesResponse\"\"\332A\r" + "language_code\202\323\344\223\002\014\022\n" + "/v1/voices\022\274\001\n" - + "\020SynthesizeSpeech\0225.google.cloud.texttospeech" - + ".v1.SynthesizeSpeechRequest\0326.google.cloud.texttospeech.v1.SynthesizeSpeechRespo" - + "nse\"9\332A\030input,voice,audio_config\202\323\344\223\002\030\"\023/v1/text:synthesize:\001*\022\220\001\n" - + "\023StreamingSynthesize\0228.google.cloud.texttospeech.v1.St" - + "reamingSynthesizeRequest\0329.google.cloud.texttospeech.v1.StreamingSynthesizeRespo" - + "nse\"\000(\0010\001\032O\312A\033texttospeech.googleapis.co" - + "m\322A.https://www.googleapis.com/auth/cloud-platformB\274\002\n" - + " com.google.cloud.texttospeech.v1B\021TextToSpeechProtoP\001ZDcloud.goog" - + "le.com/go/texttospeech/apiv1/texttospeec" - + "hpb;texttospeechpb\242\002\004CTTS\252\002\034Google.Cloud" - + ".TextToSpeech.V1\312\002\034Google\\Cloud\\TextToSp" - + "eech\\V1\352\002\037Google::Cloud::TextToSpeech::V1\352AU\n" - + "\033automl.googleapis.com/Model\0226projects/{project}/locations/{location}/model" - + "s/{model}b\006proto3" + + "\020SynthesizeSpeech\0225.google.cloud.texttospeech." + + "v1.SynthesizeSpeechRequest\0326.google.cloud.texttospeech.v1.SynthesizeSpeechRespon" + + "se\"9\332A\030input,voice,audio_config\202\323\344\223\002\030\"\023/v1/text:synthesize:\001*\022\220\001\n" + + "\023StreamingSynthesize\0228.google.cloud.texttospeech.v1.Str" + + "eamingSynthesizeRequest\0329.google.cloud.texttospeech.v1.StreamingSynthesizeRespon" + + "se\"\000(\0010\001\032O\312A\033texttospeech.googleapis.com" + + "\322A.https://www.googleapis.com/auth/cloud-platformB\274\002\n" + + " com.google.cloud.texttospeech.v1B\021TextToSpeechProtoP\001ZDcloud.googl" + + "e.com/go/texttospeech/apiv1/texttospeech" + + "pb;texttospeechpb\242\002\004CTTS\252\002\034Google.Cloud." + + "TextToSpeech.V1\312\002\034Google\\Cloud\\TextToSpe" + + "ech\\V1\352\002\037Google::Cloud::TextToSpeech::V1\352AU\n" + + "\033automl.googleapis.com/Model\0226projects/{project}/locations/{location}/models" + + "/{model}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -328,7 +328,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_descriptor, new java.lang.String[] { - "LowLatencyJourneySynthesis", + "LowLatencyJourneySynthesis", "RelaxSafetyFilters", }); internal_static_google_cloud_texttospeech_v1_SynthesizeSpeechRequest_descriptor = getDescriptor().getMessageTypes().get(4); diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts.proto b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts.proto index fb260b48d3ad..a2715c818999 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts.proto +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts.proto @@ -164,6 +164,15 @@ message AdvancedVoiceOptions { // Only for Journey voices. If false, the synthesis is context aware // and has a higher latency. optional bool low_latency_journey_synthesis = 1; + + // Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only + // supported for accounts linked to Invoiced (Offline) Cloud billing accounts. + // Otherwise, will return result + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + bool relax_safety_filters = 8 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; } // The top-level message sent by the client for the `SynthesizeSpeech` method. diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/AdvancedVoiceOptions.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/AdvancedVoiceOptions.java index 2b34045bf96f..9ac936cf7323 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/AdvancedVoiceOptions.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/AdvancedVoiceOptions.java @@ -100,6 +100,30 @@ public boolean getLowLatencyJourneySynthesis() { return lowLatencyJourneySynthesis_; } + public static final int RELAX_SAFETY_FILTERS_FIELD_NUMBER = 8; + private boolean relaxSafetyFilters_ = false; + + /** + * + * + *
+   * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
+   * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
+   * Otherwise, will return result
+   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+   * 
+ * + * + * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The relaxSafetyFilters. + */ + @java.lang.Override + public boolean getRelaxSafetyFilters() { + return relaxSafetyFilters_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -117,6 +141,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(1, lowLatencyJourneySynthesis_); } + if (relaxSafetyFilters_ != false) { + output.writeBool(8, relaxSafetyFilters_); + } getUnknownFields().writeTo(output); } @@ -129,6 +156,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, lowLatencyJourneySynthesis_); } + if (relaxSafetyFilters_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, relaxSafetyFilters_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -149,6 +179,7 @@ public boolean equals(final java.lang.Object obj) { if (hasLowLatencyJourneySynthesis()) { if (getLowLatencyJourneySynthesis() != other.getLowLatencyJourneySynthesis()) return false; } + if (getRelaxSafetyFilters() != other.getRelaxSafetyFilters()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -165,6 +196,8 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLowLatencyJourneySynthesis()); } + hash = (37 * hash) + RELAX_SAFETY_FILTERS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRelaxSafetyFilters()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -307,6 +340,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; lowLatencyJourneySynthesis_ = false; + relaxSafetyFilters_ = false; return this; } @@ -348,6 +382,9 @@ private void buildPartial0(com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOp result.lowLatencyJourneySynthesis_ = lowLatencyJourneySynthesis_; to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.relaxSafetyFilters_ = relaxSafetyFilters_; + } result.bitField0_ |= to_bitField0_; } @@ -400,6 +437,9 @@ public Builder mergeFrom(com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOpti if (other.hasLowLatencyJourneySynthesis()) { setLowLatencyJourneySynthesis(other.getLowLatencyJourneySynthesis()); } + if (other.getRelaxSafetyFilters() != false) { + setRelaxSafetyFilters(other.getRelaxSafetyFilters()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -432,6 +472,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 8 + case 64: + { + relaxSafetyFilters_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 64 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -527,6 +573,77 @@ public Builder clearLowLatencyJourneySynthesis() { return this; } + private boolean relaxSafetyFilters_; + + /** + * + * + *
+     * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
+     * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
+     * Otherwise, will return result
+     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * 
+ * + * + * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The relaxSafetyFilters. + */ + @java.lang.Override + public boolean getRelaxSafetyFilters() { + return relaxSafetyFilters_; + } + + /** + * + * + *
+     * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
+     * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
+     * Otherwise, will return result
+     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * 
+ * + * + * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The relaxSafetyFilters to set. + * @return This builder for chaining. + */ + public Builder setRelaxSafetyFilters(boolean value) { + + relaxSafetyFilters_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
+     * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
+     * Otherwise, will return result
+     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * 
+ * + * + * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRelaxSafetyFilters() { + bitField0_ = (bitField0_ & ~0x00000002); + relaxSafetyFilters_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/AdvancedVoiceOptionsOrBuilder.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/AdvancedVoiceOptionsOrBuilder.java index e8b6f3b17f5b..44d7f4850d74 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/AdvancedVoiceOptionsOrBuilder.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/AdvancedVoiceOptionsOrBuilder.java @@ -51,4 +51,22 @@ public interface AdvancedVoiceOptionsOrBuilder * @return The lowLatencyJourneySynthesis. */ boolean getLowLatencyJourneySynthesis(); + + /** + * + * + *
+   * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
+   * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
+   * Otherwise, will return result
+   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+   * 
+ * + * + * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The relaxSafetyFilters. + */ + boolean getRelaxSafetyFilters(); } diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/CustomVoiceParams.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/CustomVoiceParams.java index a72d20efa056..1aa2b3063790 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/CustomVoiceParams.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/CustomVoiceParams.java @@ -305,7 +305,7 @@ public com.google.protobuf.ByteString getModelBytes() { * * * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=469 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 * @return The enum numeric value on the wire for reportedUsage. */ @java.lang.Override @@ -326,7 +326,7 @@ public int getReportedUsageValue() { * * * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=469 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 * @return The reportedUsage. */ @java.lang.Override @@ -847,7 +847,7 @@ public Builder setModelBytes(com.google.protobuf.ByteString value) { * * * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=469 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 * @return The enum numeric value on the wire for reportedUsage. */ @java.lang.Override @@ -868,7 +868,7 @@ public int getReportedUsageValue() { * * * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=469 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 * @param value The enum numeric value on the wire for reportedUsage to set. * @return This builder for chaining. */ @@ -892,7 +892,7 @@ public Builder setReportedUsageValue(int value) { * * * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=469 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 * @return The reportedUsage. */ @java.lang.Override @@ -919,7 +919,7 @@ public Builder setReportedUsageValue(int value) { * * * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=469 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 * @param value The reportedUsage to set. * @return This builder for chaining. */ @@ -947,7 +947,7 @@ public Builder setReportedUsage( * * * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=469 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/CustomVoiceParamsOrBuilder.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/CustomVoiceParamsOrBuilder.java index 1f9105316b1b..ccc8c9bdc342 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/CustomVoiceParamsOrBuilder.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/CustomVoiceParamsOrBuilder.java @@ -66,7 +66,7 @@ public interface CustomVoiceParamsOrBuilder * * * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=469 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 * @return The enum numeric value on the wire for reportedUsage. */ @java.lang.Deprecated @@ -84,7 +84,7 @@ public interface CustomVoiceParamsOrBuilder * * * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=469 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 * @return The reportedUsage. */ @java.lang.Deprecated diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechProto.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechProto.java index 0ed6276b1e21..0d187d1ed834 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechProto.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechProto.java @@ -143,30 +143,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\002 \001(\t\022G\n" + "\013ssml_gender\030\003 \001(\0162" + "2.google.cloud.texttospeech.v1beta1.SsmlVoiceGender\022!\n" - + "\031natural_sample_rate_hertz\030\004 \001(\005\"d\n" + + "\031natural_sample_rate_hertz\030\004 \001(\005\"\212\001\n" + "\024AdvancedVoiceOptions\022*\n" - + "\035low_latency_journey_synthesis\030\001 \001(\010H\000\210\001\001B \n" + + "\035low_latency_journey_synthesis\030\001 \001(\010H\000\210\001\001\022$\n" + + "\024relax_safety_filters\030\010 \001(\010B\006\340A\004\340A\001B \n" + "\036_low_latency_journey_synthesis\"\231\004\n" + "\027SynthesizeSpeechRequest\022E\n" - + "\005input\030\001 \001(\01321.google" - + ".cloud.texttospeech.v1beta1.SynthesisInputB\003\340A\002\022K\n" - + "\005voice\030\002 \001(\01327.google.cloud.te" - + "xttospeech.v1beta1.VoiceSelectionParamsB\003\340A\002\022I\n" - + "\014audio_config\030\003 \001(\0132..google.clou" - + "d.texttospeech.v1beta1.AudioConfigB\003\340A\002\022f\n" - + "\024enable_time_pointing\030\004 \003(\0162H.google.c" - + "loud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType\022\\\n" + + "\005input\030\001 \001(\01321.google." + + "cloud.texttospeech.v1beta1.SynthesisInputB\003\340A\002\022K\n" + + "\005voice\030\002 \001(\01327.google.cloud.tex" + + "ttospeech.v1beta1.VoiceSelectionParamsB\003\340A\002\022I\n" + + "\014audio_config\030\003 \001(\0132..google.cloud" + + ".texttospeech.v1beta1.AudioConfigB\003\340A\002\022f\n" + + "\024enable_time_pointing\030\004 \003(\0162H.google.cl" + + "oud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType\022\\\n" + "\026advanced_voice_options\030\010" - + " \001(\01327.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptionsH\000\210\001\001\">\n" - + "\r" + + " \001(\01327.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptionsH\000\210\001\001\">\n\r" + "TimepointType\022\036\n" + "\032TIMEPOINT_TYPE_UNSPECIFIED\020\000\022\r\n" + "\tSSML_MARK\020\001B\031\n" + "\027_advanced_voice_options\"\247\003\n" + "\031CustomPronunciationParams\022\023\n" + "\006phrase\030\001 \001(\tH\000\210\001\001\022m\n" - + "\021phonetic_encoding\030\002 \001(\0162M.google.cloud.texttospeech.v1bet" - + "a1.CustomPronunciationParams.PhoneticEncodingH\001\210\001\001\022\032\n\r" + + "\021phonetic_encoding\030\002 \001(\0162M.google.cloud.texttospeech.v1beta" + + "1.CustomPronunciationParams.PhoneticEncodingH\001\210\001\001\022\032\n\r" + "pronunciation\030\003 \001(\tH\002\210\001\001\"\266\001\n" + "\020PhoneticEncoding\022!\n" + "\035PHONETIC_ENCODING_UNSPECIFIED\020\000\022\031\n" @@ -178,11 +178,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022_phonetic_encodingB\020\n" + "\016_pronunciation\"l\n" + "\024CustomPronunciations\022T\n" - + "\016pronunciations\030\001 \003" - + "(\0132<.google.cloud.texttospeech.v1beta1.CustomPronunciationParams\"\225\001\n" + + "\016pronunciations\030\001 \003(" + + "\0132<.google.cloud.texttospeech.v1beta1.CustomPronunciationParams\"\225\001\n" + "\022MultiSpeakerMarkup\022N\n" - + "\005turns\030\001 \003(\0132:.google.cloud.te" - + "xttospeech.v1beta1.MultiSpeakerMarkup.TurnB\003\340A\002\032/\n" + + "\005turns\030\001 \003(\0132:.google.cloud.tex" + + "ttospeech.v1beta1.MultiSpeakerMarkup.TurnB\003\340A\002\032/\n" + "\004Turn\022\024\n" + "\007speaker\030\001 \001(\tB\003\340A\002\022\021\n" + "\004text\030\002 \001(\tB\003\340A\002\"P\n" @@ -190,17 +190,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "speaker_alias\030\001 \001(\tB\003\340A\002\022\027\n\n" + "speaker_id\030\002 \001(\tB\003\340A\002\"{\n" + "\027MultiSpeakerVoiceConfig\022`\n" - + "\025speaker_voice_configs\030\002 \003(\0132<.g" - + "oogle.cloud.texttospeech.v1beta1.MultispeakerPrebuiltVoiceB\003\340A\002\"\246\002\n" + + "\025speaker_voice_configs\030\002 \003(\0132<.go" + + "ogle.cloud.texttospeech.v1beta1.MultispeakerPrebuiltVoiceB\003\340A\002\"\246\002\n" + "\016SynthesisInput\022\016\n" + "\004text\030\001 \001(\tH\000\022\020\n" + "\006markup\030\005 \001(\tH\000\022\016\n" + "\004ssml\030\002 \001(\tH\000\022U\n" - + "\024multi_speaker_markup\030\004 \001" - + "(\01325.google.cloud.texttospeech.v1beta1.MultiSpeakerMarkupH\000\022\023\n" + + "\024multi_speaker_markup\030\004 \001(" + + "\01325.google.cloud.texttospeech.v1beta1.MultiSpeakerMarkupH\000\022\023\n" + "\006prompt\030\006 \001(\tH\001\210\001\001\022[\n" - + "\025custom_pronunciations\030\003 \001(\01327.google" - + ".cloud.texttospeech.v1beta1.CustomPronunciationsB\003\340A\001B\016\n" + + "\025custom_pronunciations\030\003 \001(\01327.google." + + "cloud.texttospeech.v1beta1.CustomPronunciationsB\003\340A\001B\016\n" + "\014input_sourceB\t\n" + "\007_prompt\"\242\003\n" + "\024VoiceSelectionParams\022\032\n\r" @@ -208,13 +208,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\002 \001(\t\022G\n" + "\013ssml_gender\030\003" + " \001(\01622.google.cloud.texttospeech.v1beta1.SsmlVoiceGender\022J\n" - + "\014custom_voice\030\004 \001" - + "(\01324.google.cloud.texttospeech.v1beta1.CustomVoiceParams\022M\n" - + "\013voice_clone\030\005 \001(\01323." - + "google.cloud.texttospeech.v1beta1.VoiceCloneParamsB\003\340A\001\022\027\n\n" + + "\014custom_voice\030\004 \001(" + + "\01324.google.cloud.texttospeech.v1beta1.CustomVoiceParams\022M\n" + + "\013voice_clone\030\005 \001(\01323.g" + + "oogle.cloud.texttospeech.v1beta1.VoiceCloneParamsB\003\340A\001\022\027\n\n" + "model_name\030\006 \001(\tB\003\340A\001\022c\n" - + "\032multi_speaker_voice_config\030\007 \001(\0132:.g" - + "oogle.cloud.texttospeech.v1beta1.MultiSpeakerVoiceConfigB\003\340A\001\"\366\001\n" + + "\032multi_speaker_voice_config\030\007 \001(\0132:.go" + + "ogle.cloud.texttospeech.v1beta1.MultiSpeakerVoiceConfigB\003\340A\001\"\366\001\n" + "\013AudioConfig\022M\n" + "\016audio_encoding\030\001" + " \001(\01620.google.cloud.texttospeech.v1beta1.AudioEncodingB\003\340A\002\022\035\n\r" @@ -226,8 +226,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021CustomVoiceParams\0222\n" + "\005model\030\001 \001(\tB#\340A\002\372A\035\n" + "\033automl.googleapis.com/Model\022a\n" - + "\016reported_usage\030\003 \001(\0162B.google.cloud.texttospeech.v1b" - + "eta1.CustomVoiceParams.ReportedUsageB\005\030\001\340A\001\"J\n\r" + + "\016reported_usage\030\003 \001(\0162B.google.cloud.texttospeech.v1be" + + "ta1.CustomVoiceParams.ReportedUsageB\005\030\001\340A\001\"J\n\r" + "ReportedUsage\022\036\n" + "\032REPORTED_USAGE_UNSPECIFIED\020\000\022\014\n" + "\010REALTIME\020\001\022\013\n" @@ -237,8 +237,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030SynthesizeSpeechResponse\022\025\n\r" + "audio_content\030\001 \001(\014\022@\n\n" + "timepoints\030\002 \003(\0132,.google.cloud.texttospeech.v1beta1.Timepoint\022D\n" - + "\014audio_config\030\004 \001(\0132..google" - + ".cloud.texttospeech.v1beta1.AudioConfig\"4\n" + + "\014audio_config\030\004 \001(\0132..google." + + "cloud.texttospeech.v1beta1.AudioConfig\"4\n" + "\tTimepoint\022\021\n" + "\tmark_name\030\004 \001(\t\022\024\n" + "\014time_seconds\030\003 \001(\001\"\244\001\n" @@ -248,10 +248,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021sample_rate_hertz\030\002 \001(\005B\003\340A\001\022\035\n\r" + "speaking_rate\030\003 \001(\001B\006\340A\004\340A\001\"\243\002\n" + "\031StreamingSynthesizeConfig\022K\n" - + "\005voice\030\001 \001(\01327.google.cloud" - + ".texttospeech.v1beta1.VoiceSelectionParamsB\003\340A\002\022\\\n" - + "\026streaming_audio_config\030\004 \001(\0132" - + "7.google.cloud.texttospeech.v1beta1.StreamingAudioConfigB\003\340A\001\022[\n" + + "\005voice\030\001 \001(\01327.google.cloud." + + "texttospeech.v1beta1.VoiceSelectionParamsB\003\340A\002\022\\\n" + + "\026streaming_audio_config\030\004 \001(\01327" + + ".google.cloud.texttospeech.v1beta1.StreamingAudioConfigB\003\340A\001\022[\n" + "\025custom_pronunciations\030\005" + " \001(\01327.google.cloud.texttospeech.v1beta1.CustomPronunciationsB\003\340A\001\"\302\001\n" + "\027StreamingSynthesisInput\022\016\n" @@ -286,26 +286,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\003PCM\020\007\022\007\n" + "\003M4A\020\0102\357\004\n" + "\014TextToSpeech\022\242\001\n\n" - + "ListVoices\0224.google.cloud.texttospeech.v1b" - + "eta1.ListVoicesRequest\0325.google.cloud.te" - + "xttospeech.v1beta1.ListVoicesResponse\"\'\332A\r" + + "ListVoices\0224.google.cloud.texttospeech.v1be" + + "ta1.ListVoicesRequest\0325.google.cloud.tex" + + "ttospeech.v1beta1.ListVoicesResponse\"\'\332A\r" + "language_code\202\323\344\223\002\021\022\017/v1beta1/voices\022\313\001\n" - + "\020SynthesizeSpeech\022:.google.cloud.textt" - + "ospeech.v1beta1.SynthesizeSpeechRequest\032;.google.cloud.texttospeech.v1beta1.Synt" - + "hesizeSpeechResponse\">\332A\030input,voice,aud" - + "io_config\202\323\344\223\002\035\"\030/v1beta1/text:synthesize:\001*\022\232\001\n" - + "\023StreamingSynthesize\022=.google.cloud.texttospeech.v1beta1.StreamingSynthe" - + "sizeRequest\032>.google.cloud.texttospeech." - + "v1beta1.StreamingSynthesizeResponse\"\000(\0010" - + "\001\032O\312A\033texttospeech.googleapis.com\322A.http" - + "s://www.googleapis.com/auth/cloud-platformB\325\002\n" - + "%com.google.cloud.texttospeech.v1beta1B\021TextToSpeechProtoP\001ZIcloud.google." - + "com/go/texttospeech/apiv1beta1/texttospe" - + "echpb;texttospeechpb\242\002\004CTTS\252\002!Google.Clo" - + "ud.TextToSpeech.V1Beta1\312\002!Google\\Cloud\\T" - + "extToSpeech\\V1beta1\352\002$Google::Cloud::TextToSpeech::V1beta1\352AU\n" - + "\033automl.googleapis.com/Model\0226projects/{project}/locations" - + "/{location}/models/{model}b\006proto3" + + "\020SynthesizeSpeech\022:.google.cloud.textto" + + "speech.v1beta1.SynthesizeSpeechRequest\032;.google.cloud.texttospeech.v1beta1.Synth" + + "esizeSpeechResponse\">\332A\030input,voice,audi" + + "o_config\202\323\344\223\002\035\"\030/v1beta1/text:synthesize:\001*\022\232\001\n" + + "\023StreamingSynthesize\022=.google.cloud.texttospeech.v1beta1.StreamingSynthes" + + "izeRequest\032>.google.cloud.texttospeech.v" + + "1beta1.StreamingSynthesizeResponse\"\000(\0010\001" + + "\032O\312A\033texttospeech.googleapis.com\322A.https" + + "://www.googleapis.com/auth/cloud-platformB\325\002\n" + + "%com.google.cloud.texttospeech.v1beta1B\021TextToSpeechProtoP\001ZIcloud.google.c" + + "om/go/texttospeech/apiv1beta1/texttospee" + + "chpb;texttospeechpb\242\002\004CTTS\252\002!Google.Clou" + + "d.TextToSpeech.V1Beta1\312\002!Google\\Cloud\\Te" + + "xtToSpeech\\V1beta1\352\002$Google::Cloud::TextToSpeech::V1beta1\352AU\n" + + "\033automl.googleapis.com/Model\0226projects/{project}/locations/" + + "{location}/models/{model}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -346,7 +346,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_descriptor, new java.lang.String[] { - "LowLatencyJourneySynthesis", + "LowLatencyJourneySynthesis", "RelaxSafetyFilters", }); internal_static_google_cloud_texttospeech_v1beta1_SynthesizeSpeechRequest_descriptor = getDescriptor().getMessageTypes().get(4); diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/proto/google/cloud/texttospeech/v1beta1/cloud_tts.proto b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/proto/google/cloud/texttospeech/v1beta1/cloud_tts.proto index 5fac6b22f1f0..066043418712 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/proto/google/cloud/texttospeech/v1beta1/cloud_tts.proto +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/proto/google/cloud/texttospeech/v1beta1/cloud_tts.proto @@ -167,6 +167,15 @@ message AdvancedVoiceOptions { // Only for Journey voices. If false, the synthesis is context aware // and has a higher latency. optional bool low_latency_journey_synthesis = 1; + + // Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only + // supported for accounts linked to Invoiced (Offline) Cloud billing accounts. + // Otherwise, will return result + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + bool relax_safety_filters = 8 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; } // The top-level message sent by the client for the `SynthesizeSpeech` method.