Class AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder (0.50.0)

public static final class AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder extends GeneratedMessageV3.Builder<AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder> implements AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpecOrBuilder

Boost applies to suggestions which match a condition.

Protobuf type google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec

Inheritance

Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder
Overrides

build()

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec build()
Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec

buildPartial()

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec buildPartial()
Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec

clear()

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder clear()
Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder
Overrides

clearBoost()

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder clearBoost()

Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0.

Setting to 1.0 gives the suggestions a big promotion. However, it does not necessarily mean that the top result will be a boosted suggestion.

Setting to -1.0 gives the suggestions a big demotion. However, other suggestions that are relevant might still be shown.

Setting to 0.0 means no boost applied. The boosting condition is ignored.

float boost = 2;

Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder

This builder for chaining.

clearCondition()

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder clearCondition()

An expression which specifies a boost condition. The syntax is the same as filter expression syntax. Currently, the only supported condition is a list of BCP-47 lang codes.

Example:

  • To boost suggestions in languages en or fr: (lang_code: ANY("en", "fr"))

string condition = 1;

Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder
Overrides

clone()

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder clone()
Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder
Overrides

getBoost()

public float getBoost()

Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0.

Setting to 1.0 gives the suggestions a big promotion. However, it does not necessarily mean that the top result will be a boosted suggestion.

Setting to -1.0 gives the suggestions a big demotion. However, other suggestions that are relevant might still be shown.

Setting to 0.0 means no boost applied. The boosting condition is ignored.

float boost = 2;

Returns
Type Description
float

The boost.

getCondition()

public String getCondition()

An expression which specifies a boost condition. The syntax is the same as filter expression syntax. Currently, the only supported condition is a list of BCP-47 lang codes.

Example:

  • To boost suggestions in languages en or fr: (lang_code: ANY("en", "fr"))

string condition = 1;

Returns
Type Description
String

The condition.

getConditionBytes()

public ByteString getConditionBytes()

An expression which specifies a boost condition. The syntax is the same as filter expression syntax. Currently, the only supported condition is a list of BCP-47 lang codes.

Example:

  • To boost suggestions in languages en or fr: (lang_code: ANY("en", "fr"))

string condition = 1;

Returns
Type Description
ByteString

The bytes for condition.

getDefaultInstanceForType()

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec getDefaultInstanceForType()
Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec other)

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder mergeFrom(AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec other)
Parameter
Name Description
other AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec
Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder
Overrides

setBoost(float value)

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder setBoost(float value)

Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0.

Setting to 1.0 gives the suggestions a big promotion. However, it does not necessarily mean that the top result will be a boosted suggestion.

Setting to -1.0 gives the suggestions a big demotion. However, other suggestions that are relevant might still be shown.

Setting to 0.0 means no boost applied. The boosting condition is ignored.

float boost = 2;

Parameter
Name Description
value float

The boost to set.

Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder

This builder for chaining.

setCondition(String value)

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder setCondition(String value)

An expression which specifies a boost condition. The syntax is the same as filter expression syntax. Currently, the only supported condition is a list of BCP-47 lang codes.

Example:

  • To boost suggestions in languages en or fr: (lang_code: ANY("en", "fr"))

string condition = 1;

Parameter
Name Description
value String

The condition to set.

Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder

This builder for chaining.

setConditionBytes(ByteString value)

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder setConditionBytes(ByteString value)

An expression which specifies a boost condition. The syntax is the same as filter expression syntax. Currently, the only supported condition is a list of BCP-47 lang codes.

Example:

  • To boost suggestions in languages en or fr: (lang_code: ANY("en", "fr"))

string condition = 1;

Parameter
Name Description
value ByteString

The bytes for condition to set.

Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec.Builder
Overrides