All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.dialogflow.cx.v3beta1.BoostSpec Maven / Gradle / Ivy

There is a newer version: 0.65.0
Show newest version
/*
 * Copyright 2024 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/dialogflow/cx/v3beta1/session.proto

// Protobuf Java Version: 3.25.5
package com.google.cloud.dialogflow.cx.v3beta1;

/**
 *
 *
 * 
 * Boost specification to boost certain documents.
 * A copy of google.cloud.discoveryengine.v1main.BoostSpec, field documentation
 * is available at
 * https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/BoostSpec
 * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BoostSpec} */ public final class BoostSpec extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.BoostSpec) BoostSpecOrBuilder { private static final long serialVersionUID = 0L; // Use BoostSpec.newBuilder() to construct. private BoostSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private BoostSpec() { conditionBoostSpecs_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new BoostSpec(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3beta1.SessionProto .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3beta1.SessionProto .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.class, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder.class); } public interface ConditionBoostSpecOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec) com.google.protobuf.MessageOrBuilder { /** * * *
     * Optional. An expression which specifies a boost condition. The syntax and
     * supported fields are the same as a filter expression.
     * Examples:
     *
     * * To boost documents with document ID "doc_1" or "doc_2", and
     * color
     *   "Red" or "Blue":
     *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
     * 
* * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The condition. */ java.lang.String getCondition(); /** * * *
     * Optional. An expression which specifies a boost condition. The syntax and
     * supported fields are the same as a filter expression.
     * Examples:
     *
     * * To boost documents with document ID "doc_1" or "doc_2", and
     * color
     *   "Red" or "Blue":
     *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
     * 
* * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for condition. */ com.google.protobuf.ByteString getConditionBytes(); /** * * *
     * Optional. Strength of the condition boost, which should be in [-1, 1].
     * Negative boost means demotion. Default is 0.0.
     *
     * Setting to 1.0 gives the document a big promotion. However, it does not
     * necessarily mean that the boosted document will be the top result at
     * all times, nor that other documents will be excluded. Results could
     * still be shown even when none of them matches the condition. And
     * results that are significantly more relevant to the search query can
     * still trump your heavily favored but irrelevant documents.
     *
     * Setting to -1.0 gives the document a big demotion. However, results
     * that are deeply relevant might still be shown. The document will have
     * an upstream battle to get a fairly high ranking, but it is not blocked
     * out completely.
     *
     * Setting to 0.0 means no boost applied. The boosting condition is
     * ignored.
     * 
* * float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The boost. */ float getBoost(); } /** * * *
   * Boost applies to documents which match a condition.
   * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec} */ public static final class ConditionBoostSpec extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec) ConditionBoostSpecOrBuilder { private static final long serialVersionUID = 0L; // Use ConditionBoostSpec.newBuilder() to construct. private ConditionBoostSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ConditionBoostSpec() { condition_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ConditionBoostSpec(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3beta1.SessionProto .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_ConditionBoostSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3beta1.SessionProto .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_ConditionBoostSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.class, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder.class); } public static final int CONDITION_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object condition_ = ""; /** * * *
     * Optional. An expression which specifies a boost condition. The syntax and
     * supported fields are the same as a filter expression.
     * Examples:
     *
     * * To boost documents with document ID "doc_1" or "doc_2", and
     * color
     *   "Red" or "Blue":
     *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
     * 
* * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The condition. */ @java.lang.Override public java.lang.String getCondition() { java.lang.Object ref = condition_; 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(); condition_ = s; return s; } } /** * * *
     * Optional. An expression which specifies a boost condition. The syntax and
     * supported fields are the same as a filter expression.
     * Examples:
     *
     * * To boost documents with document ID "doc_1" or "doc_2", and
     * color
     *   "Red" or "Blue":
     *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
     * 
* * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for condition. */ @java.lang.Override public com.google.protobuf.ByteString getConditionBytes() { java.lang.Object ref = condition_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); condition_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int BOOST_FIELD_NUMBER = 2; private float boost_ = 0F; /** * * *
     * Optional. Strength of the condition boost, which should be in [-1, 1].
     * Negative boost means demotion. Default is 0.0.
     *
     * Setting to 1.0 gives the document a big promotion. However, it does not
     * necessarily mean that the boosted document will be the top result at
     * all times, nor that other documents will be excluded. Results could
     * still be shown even when none of them matches the condition. And
     * results that are significantly more relevant to the search query can
     * still trump your heavily favored but irrelevant documents.
     *
     * Setting to -1.0 gives the document a big demotion. However, results
     * that are deeply relevant might still be shown. The document will have
     * an upstream battle to get a fairly high ranking, but it is not blocked
     * out completely.
     *
     * Setting to 0.0 means no boost applied. The boosting condition is
     * ignored.
     * 
* * float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The boost. */ @java.lang.Override public float getBoost() { return boost_; } 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(condition_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, condition_); } if (java.lang.Float.floatToRawIntBits(boost_) != 0) { output.writeFloat(2, boost_); } 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(condition_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, condition_); } if (java.lang.Float.floatToRawIntBits(boost_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, boost_); } 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.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec)) { return super.equals(obj); } com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec other = (com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec) obj; if (!getCondition().equals(other.getCondition())) return false; if (java.lang.Float.floatToIntBits(getBoost()) != java.lang.Float.floatToIntBits(other.getBoost())) 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) + CONDITION_FIELD_NUMBER; hash = (53 * hash) + getCondition().hashCode(); hash = (37 * hash) + BOOST_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec 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.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec 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.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec 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.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec 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.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec 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.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec 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; } /** * * *
     * Boost applies to documents which match a condition.
     * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec) com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3beta1.SessionProto .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_ConditionBoostSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3beta1.SessionProto .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_ConditionBoostSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.class, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder.class); } // Construct using // com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; condition_ = ""; boost_ = 0F; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.cx.v3beta1.SessionProto .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_ConditionBoostSpec_descriptor; } @java.lang.Override public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec getDefaultInstanceForType() { return com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec .getDefaultInstance(); } @java.lang.Override public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec build() { com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec buildPartial() { com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec result = new com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0( com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.condition_ = condition_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.boost_ = boost_; } } @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.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec) { return mergeFrom( (com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec other) { if (other == com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec .getDefaultInstance()) return this; if (!other.getCondition().isEmpty()) { condition_ = other.condition_; bitField0_ |= 0x00000001; onChanged(); } if (other.getBoost() != 0F) { setBoost(other.getBoost()); } 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: { condition_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 21: { boost_ = input.readFloat(); bitField0_ |= 0x00000002; break; } // case 21 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 condition_ = ""; /** * * *
       * Optional. An expression which specifies a boost condition. The syntax and
       * supported fields are the same as a filter expression.
       * Examples:
       *
       * * To boost documents with document ID "doc_1" or "doc_2", and
       * color
       *   "Red" or "Blue":
       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
       * 
* * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The condition. */ public java.lang.String getCondition() { java.lang.Object ref = condition_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); condition_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * Optional. An expression which specifies a boost condition. The syntax and
       * supported fields are the same as a filter expression.
       * Examples:
       *
       * * To boost documents with document ID "doc_1" or "doc_2", and
       * color
       *   "Red" or "Blue":
       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
       * 
* * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for condition. */ public com.google.protobuf.ByteString getConditionBytes() { java.lang.Object ref = condition_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); condition_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Optional. An expression which specifies a boost condition. The syntax and
       * supported fields are the same as a filter expression.
       * Examples:
       *
       * * To boost documents with document ID "doc_1" or "doc_2", and
       * color
       *   "Red" or "Blue":
       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
       * 
* * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The condition to set. * @return This builder for chaining. */ public Builder setCondition(java.lang.String value) { if (value == null) { throw new NullPointerException(); } condition_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Optional. An expression which specifies a boost condition. The syntax and
       * supported fields are the same as a filter expression.
       * Examples:
       *
       * * To boost documents with document ID "doc_1" or "doc_2", and
       * color
       *   "Red" or "Blue":
       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
       * 
* * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearCondition() { condition_ = getDefaultInstance().getCondition(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
       * Optional. An expression which specifies a boost condition. The syntax and
       * supported fields are the same as a filter expression.
       * Examples:
       *
       * * To boost documents with document ID "doc_1" or "doc_2", and
       * color
       *   "Red" or "Blue":
       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
       * 
* * string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for condition to set. * @return This builder for chaining. */ public Builder setConditionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); condition_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private float boost_; /** * * *
       * Optional. Strength of the condition boost, which should be in [-1, 1].
       * Negative boost means demotion. Default is 0.0.
       *
       * Setting to 1.0 gives the document a big promotion. However, it does not
       * necessarily mean that the boosted document will be the top result at
       * all times, nor that other documents will be excluded. Results could
       * still be shown even when none of them matches the condition. And
       * results that are significantly more relevant to the search query can
       * still trump your heavily favored but irrelevant documents.
       *
       * Setting to -1.0 gives the document a big demotion. However, results
       * that are deeply relevant might still be shown. The document will have
       * an upstream battle to get a fairly high ranking, but it is not blocked
       * out completely.
       *
       * Setting to 0.0 means no boost applied. The boosting condition is
       * ignored.
       * 
* * float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The boost. */ @java.lang.Override public float getBoost() { return boost_; } /** * * *
       * Optional. Strength of the condition boost, which should be in [-1, 1].
       * Negative boost means demotion. Default is 0.0.
       *
       * Setting to 1.0 gives the document a big promotion. However, it does not
       * necessarily mean that the boosted document will be the top result at
       * all times, nor that other documents will be excluded. Results could
       * still be shown even when none of them matches the condition. And
       * results that are significantly more relevant to the search query can
       * still trump your heavily favored but irrelevant documents.
       *
       * Setting to -1.0 gives the document a big demotion. However, results
       * that are deeply relevant might still be shown. The document will have
       * an upstream battle to get a fairly high ranking, but it is not blocked
       * out completely.
       *
       * Setting to 0.0 means no boost applied. The boosting condition is
       * ignored.
       * 
* * float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The boost to set. * @return This builder for chaining. */ public Builder setBoost(float value) { boost_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * Optional. Strength of the condition boost, which should be in [-1, 1].
       * Negative boost means demotion. Default is 0.0.
       *
       * Setting to 1.0 gives the document a big promotion. However, it does not
       * necessarily mean that the boosted document will be the top result at
       * all times, nor that other documents will be excluded. Results could
       * still be shown even when none of them matches the condition. And
       * results that are significantly more relevant to the search query can
       * still trump your heavily favored but irrelevant documents.
       *
       * Setting to -1.0 gives the document a big demotion. However, results
       * that are deeply relevant might still be shown. The document will have
       * an upstream battle to get a fairly high ranking, but it is not blocked
       * out completely.
       *
       * Setting to 0.0 means no boost applied. The boosting condition is
       * ignored.
       * 
* * float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearBoost() { bitField0_ = (bitField0_ & ~0x00000002); boost_ = 0F; 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.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec) } // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec) private static final com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec(); } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ConditionBoostSpec 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.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int CONDITION_BOOST_SPECS_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List conditionBoostSpecs_; /** * * *
   * Optional. Condition boost specifications. If a document matches multiple
   * conditions in the specifictions, boost scores from these specifications are
   * all applied and combined in a non-linear way. Maximum number of
   * specifications is 20.
   * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.List getConditionBoostSpecsList() { return conditionBoostSpecs_; } /** * * *
   * Optional. Condition boost specifications. If a document matches multiple
   * conditions in the specifictions, boost scores from these specifications are
   * all applied and combined in a non-linear way. Maximum number of
   * specifications is 20.
   * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.List< ? extends com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder> getConditionBoostSpecsOrBuilderList() { return conditionBoostSpecs_; } /** * * *
   * Optional. Condition boost specifications. If a document matches multiple
   * conditions in the specifictions, boost scores from these specifications are
   * all applied and combined in a non-linear way. Maximum number of
   * specifications is 20.
   * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public int getConditionBoostSpecsCount() { return conditionBoostSpecs_.size(); } /** * * *
   * Optional. Condition boost specifications. If a document matches multiple
   * conditions in the specifictions, boost scores from these specifications are
   * all applied and combined in a non-linear way. Maximum number of
   * specifications is 20.
   * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec getConditionBoostSpecs( int index) { return conditionBoostSpecs_.get(index); } /** * * *
   * Optional. Condition boost specifications. If a document matches multiple
   * conditions in the specifictions, boost scores from these specifications are
   * all applied and combined in a non-linear way. Maximum number of
   * specifications is 20.
   * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder getConditionBoostSpecsOrBuilder(int index) { return conditionBoostSpecs_.get(index); } 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 { for (int i = 0; i < conditionBoostSpecs_.size(); i++) { output.writeMessage(1, conditionBoostSpecs_.get(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < conditionBoostSpecs_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, conditionBoostSpecs_.get(i)); } 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.dialogflow.cx.v3beta1.BoostSpec)) { return super.equals(obj); } com.google.cloud.dialogflow.cx.v3beta1.BoostSpec other = (com.google.cloud.dialogflow.cx.v3beta1.BoostSpec) obj; if (!getConditionBoostSpecsList().equals(other.getConditionBoostSpecsList())) 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(); if (getConditionBoostSpecsCount() > 0) { hash = (37 * hash) + CONDITION_BOOST_SPECS_FIELD_NUMBER; hash = (53 * hash) + getConditionBoostSpecsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec 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.dialogflow.cx.v3beta1.BoostSpec parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec 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.dialogflow.cx.v3beta1.BoostSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec 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.dialogflow.cx.v3beta1.BoostSpec parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec 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.dialogflow.cx.v3beta1.BoostSpec parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec 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.dialogflow.cx.v3beta1.BoostSpec 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; } /** * * *
   * Boost specification to boost certain documents.
   * A copy of google.cloud.discoveryengine.v1main.BoostSpec, field documentation
   * is available at
   * https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/BoostSpec
   * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BoostSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.BoostSpec) com.google.cloud.dialogflow.cx.v3beta1.BoostSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3beta1.SessionProto .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3beta1.SessionProto .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.class, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder.class); } // Construct using com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (conditionBoostSpecsBuilder_ == null) { conditionBoostSpecs_ = java.util.Collections.emptyList(); } else { conditionBoostSpecs_ = null; conditionBoostSpecsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.cx.v3beta1.SessionProto .internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpec_descriptor; } @java.lang.Override public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec getDefaultInstanceForType() { return com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.getDefaultInstance(); } @java.lang.Override public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec build() { com.google.cloud.dialogflow.cx.v3beta1.BoostSpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec buildPartial() { com.google.cloud.dialogflow.cx.v3beta1.BoostSpec result = new com.google.cloud.dialogflow.cx.v3beta1.BoostSpec(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.cloud.dialogflow.cx.v3beta1.BoostSpec result) { if (conditionBoostSpecsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { conditionBoostSpecs_ = java.util.Collections.unmodifiableList(conditionBoostSpecs_); bitField0_ = (bitField0_ & ~0x00000001); } result.conditionBoostSpecs_ = conditionBoostSpecs_; } else { result.conditionBoostSpecs_ = conditionBoostSpecsBuilder_.build(); } } private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.BoostSpec result) { int from_bitField0_ = bitField0_; } @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.dialogflow.cx.v3beta1.BoostSpec) { return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.BoostSpec) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.BoostSpec other) { if (other == com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.getDefaultInstance()) return this; if (conditionBoostSpecsBuilder_ == null) { if (!other.conditionBoostSpecs_.isEmpty()) { if (conditionBoostSpecs_.isEmpty()) { conditionBoostSpecs_ = other.conditionBoostSpecs_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureConditionBoostSpecsIsMutable(); conditionBoostSpecs_.addAll(other.conditionBoostSpecs_); } onChanged(); } } else { if (!other.conditionBoostSpecs_.isEmpty()) { if (conditionBoostSpecsBuilder_.isEmpty()) { conditionBoostSpecsBuilder_.dispose(); conditionBoostSpecsBuilder_ = null; conditionBoostSpecs_ = other.conditionBoostSpecs_; bitField0_ = (bitField0_ & ~0x00000001); conditionBoostSpecsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getConditionBoostSpecsFieldBuilder() : null; } else { conditionBoostSpecsBuilder_.addAllMessages(other.conditionBoostSpecs_); } } } 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: { com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec m = input.readMessage( com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec .parser(), extensionRegistry); if (conditionBoostSpecsBuilder_ == null) { ensureConditionBoostSpecsIsMutable(); conditionBoostSpecs_.add(m); } else { conditionBoostSpecsBuilder_.addMessage(m); } break; } // case 10 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.util.List conditionBoostSpecs_ = java.util.Collections.emptyList(); private void ensureConditionBoostSpecsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { conditionBoostSpecs_ = new java.util.ArrayList< com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec>( conditionBoostSpecs_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder> conditionBoostSpecsBuilder_; /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getConditionBoostSpecsList() { if (conditionBoostSpecsBuilder_ == null) { return java.util.Collections.unmodifiableList(conditionBoostSpecs_); } else { return conditionBoostSpecsBuilder_.getMessageList(); } } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public int getConditionBoostSpecsCount() { if (conditionBoostSpecsBuilder_ == null) { return conditionBoostSpecs_.size(); } else { return conditionBoostSpecsBuilder_.getCount(); } } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec getConditionBoostSpecs(int index) { if (conditionBoostSpecsBuilder_ == null) { return conditionBoostSpecs_.get(index); } else { return conditionBoostSpecsBuilder_.getMessage(index); } } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setConditionBoostSpecs( int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec value) { if (conditionBoostSpecsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureConditionBoostSpecsIsMutable(); conditionBoostSpecs_.set(index, value); onChanged(); } else { conditionBoostSpecsBuilder_.setMessage(index, value); } return this; } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setConditionBoostSpecs( int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder builderForValue) { if (conditionBoostSpecsBuilder_ == null) { ensureConditionBoostSpecsIsMutable(); conditionBoostSpecs_.set(index, builderForValue.build()); onChanged(); } else { conditionBoostSpecsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addConditionBoostSpecs( com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec value) { if (conditionBoostSpecsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureConditionBoostSpecsIsMutable(); conditionBoostSpecs_.add(value); onChanged(); } else { conditionBoostSpecsBuilder_.addMessage(value); } return this; } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addConditionBoostSpecs( int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec value) { if (conditionBoostSpecsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureConditionBoostSpecsIsMutable(); conditionBoostSpecs_.add(index, value); onChanged(); } else { conditionBoostSpecsBuilder_.addMessage(index, value); } return this; } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addConditionBoostSpecs( com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder builderForValue) { if (conditionBoostSpecsBuilder_ == null) { ensureConditionBoostSpecsIsMutable(); conditionBoostSpecs_.add(builderForValue.build()); onChanged(); } else { conditionBoostSpecsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addConditionBoostSpecs( int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder builderForValue) { if (conditionBoostSpecsBuilder_ == null) { ensureConditionBoostSpecsIsMutable(); conditionBoostSpecs_.add(index, builderForValue.build()); onChanged(); } else { conditionBoostSpecsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addAllConditionBoostSpecs( java.lang.Iterable< ? extends com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec> values) { if (conditionBoostSpecsBuilder_ == null) { ensureConditionBoostSpecsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, conditionBoostSpecs_); onChanged(); } else { conditionBoostSpecsBuilder_.addAllMessages(values); } return this; } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearConditionBoostSpecs() { if (conditionBoostSpecsBuilder_ == null) { conditionBoostSpecs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { conditionBoostSpecsBuilder_.clear(); } return this; } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder removeConditionBoostSpecs(int index) { if (conditionBoostSpecsBuilder_ == null) { ensureConditionBoostSpecsIsMutable(); conditionBoostSpecs_.remove(index); onChanged(); } else { conditionBoostSpecsBuilder_.remove(index); } return this; } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder getConditionBoostSpecsBuilder(int index) { return getConditionBoostSpecsFieldBuilder().getBuilder(index); } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder getConditionBoostSpecsOrBuilder(int index) { if (conditionBoostSpecsBuilder_ == null) { return conditionBoostSpecs_.get(index); } else { return conditionBoostSpecsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List< ? extends com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder> getConditionBoostSpecsOrBuilderList() { if (conditionBoostSpecsBuilder_ != null) { return conditionBoostSpecsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(conditionBoostSpecs_); } } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder addConditionBoostSpecsBuilder() { return getConditionBoostSpecsFieldBuilder() .addBuilder( com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec .getDefaultInstance()); } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder addConditionBoostSpecsBuilder(int index) { return getConditionBoostSpecsFieldBuilder() .addBuilder( index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec .getDefaultInstance()); } /** * * *
     * Optional. Condition boost specifications. If a document matches multiple
     * conditions in the specifictions, boost scores from these specifications are
     * all applied and combined in a non-linear way. Maximum number of
     * specifications is 20.
     * 
* * * repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List< com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder> getConditionBoostSpecsBuilderList() { return getConditionBoostSpecsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder> getConditionBoostSpecsFieldBuilder() { if (conditionBoostSpecsBuilder_ == null) { conditionBoostSpecsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.Builder, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpecOrBuilder>( conditionBoostSpecs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); conditionBoostSpecs_ = null; } return conditionBoostSpecsBuilder_; } @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.dialogflow.cx.v3beta1.BoostSpec) } // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.BoostSpec) private static final com.google.cloud.dialogflow.cx.v3beta1.BoostSpec DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.BoostSpec(); } public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpec getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public BoostSpec 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.dialogflow.cx.v3beta1.BoostSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy