Class SearchRequest.BoostSpec.Builder (2.57.0)

public static final class SearchRequest.BoostSpec.Builder extends GeneratedMessageV3.Builder<SearchRequest.BoostSpec.Builder> implements SearchRequest.BoostSpecOrBuilder

Boost specification to boost certain items.

Protobuf type google.cloud.retail.v2.SearchRequest.BoostSpec

Static Methods

getDescriptor()

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

Methods

addAllConditionBoostSpecs(Iterable<? extends SearchRequest.BoostSpec.ConditionBoostSpec> values)

public SearchRequest.BoostSpec.Builder addAllConditionBoostSpecs(Iterable<? extends SearchRequest.BoostSpec.ConditionBoostSpec> values)

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec>
Returns
Type Description
SearchRequest.BoostSpec.Builder

addConditionBoostSpecs(SearchRequest.BoostSpec.ConditionBoostSpec value)

public SearchRequest.BoostSpec.Builder addConditionBoostSpecs(SearchRequest.BoostSpec.ConditionBoostSpec value)

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Parameter
Name Description
value SearchRequest.BoostSpec.ConditionBoostSpec
Returns
Type Description
SearchRequest.BoostSpec.Builder

addConditionBoostSpecs(SearchRequest.BoostSpec.ConditionBoostSpec.Builder builderForValue)

public SearchRequest.BoostSpec.Builder addConditionBoostSpecs(SearchRequest.BoostSpec.ConditionBoostSpec.Builder builderForValue)

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Parameter
Name Description
builderForValue SearchRequest.BoostSpec.ConditionBoostSpec.Builder
Returns
Type Description
SearchRequest.BoostSpec.Builder

addConditionBoostSpecs(int index, SearchRequest.BoostSpec.ConditionBoostSpec value)

public SearchRequest.BoostSpec.Builder addConditionBoostSpecs(int index, SearchRequest.BoostSpec.ConditionBoostSpec value)

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Parameters
Name Description
index int
value SearchRequest.BoostSpec.ConditionBoostSpec
Returns
Type Description
SearchRequest.BoostSpec.Builder

addConditionBoostSpecs(int index, SearchRequest.BoostSpec.ConditionBoostSpec.Builder builderForValue)

public SearchRequest.BoostSpec.Builder addConditionBoostSpecs(int index, SearchRequest.BoostSpec.ConditionBoostSpec.Builder builderForValue)

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Parameters
Name Description
index int
builderForValue SearchRequest.BoostSpec.ConditionBoostSpec.Builder
Returns
Type Description
SearchRequest.BoostSpec.Builder

addConditionBoostSpecsBuilder()

public SearchRequest.BoostSpec.ConditionBoostSpec.Builder addConditionBoostSpecsBuilder()

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Returns
Type Description
SearchRequest.BoostSpec.ConditionBoostSpec.Builder

addConditionBoostSpecsBuilder(int index)

public SearchRequest.BoostSpec.ConditionBoostSpec.Builder addConditionBoostSpecsBuilder(int index)

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Parameter
Name Description
index int
Returns
Type Description
SearchRequest.BoostSpec.ConditionBoostSpec.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SearchRequest.BoostSpec build()
Returns
Type Description
SearchRequest.BoostSpec

buildPartial()

public SearchRequest.BoostSpec buildPartial()
Returns
Type Description
SearchRequest.BoostSpec

clear()

public SearchRequest.BoostSpec.Builder clear()
Returns
Type Description
SearchRequest.BoostSpec.Builder
Overrides

clearConditionBoostSpecs()

public SearchRequest.BoostSpec.Builder clearConditionBoostSpecs()

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Returns
Type Description
SearchRequest.BoostSpec.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSkipBoostSpecValidation()

public SearchRequest.BoostSpec.Builder clearSkipBoostSpecValidation()

Whether to skip boostspec validation. If this field is set to true, invalid BoostSpec.condition_boost_specs will be ignored and valid BoostSpec.condition_boost_specs will still be applied.

optional bool skip_boost_spec_validation = 2;

Returns
Type Description
SearchRequest.BoostSpec.Builder

This builder for chaining.

clone()

public SearchRequest.BoostSpec.Builder clone()
Returns
Type Description
SearchRequest.BoostSpec.Builder
Overrides

getConditionBoostSpecs(int index)

public SearchRequest.BoostSpec.ConditionBoostSpec getConditionBoostSpecs(int index)

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Parameter
Name Description
index int
Returns
Type Description
SearchRequest.BoostSpec.ConditionBoostSpec

getConditionBoostSpecsBuilder(int index)

public SearchRequest.BoostSpec.ConditionBoostSpec.Builder getConditionBoostSpecsBuilder(int index)

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Parameter
Name Description
index int
Returns
Type Description
SearchRequest.BoostSpec.ConditionBoostSpec.Builder

getConditionBoostSpecsBuilderList()

public List<SearchRequest.BoostSpec.ConditionBoostSpec.Builder> getConditionBoostSpecsBuilderList()

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Returns
Type Description
List<Builder>

getConditionBoostSpecsCount()

public int getConditionBoostSpecsCount()

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Returns
Type Description
int

getConditionBoostSpecsList()

public List<SearchRequest.BoostSpec.ConditionBoostSpec> getConditionBoostSpecsList()

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Returns
Type Description
List<ConditionBoostSpec>

getConditionBoostSpecsOrBuilder(int index)

public SearchRequest.BoostSpec.ConditionBoostSpecOrBuilder getConditionBoostSpecsOrBuilder(int index)

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Parameter
Name Description
index int
Returns
Type Description
SearchRequest.BoostSpec.ConditionBoostSpecOrBuilder

getConditionBoostSpecsOrBuilderList()

public List<? extends SearchRequest.BoostSpec.ConditionBoostSpecOrBuilder> getConditionBoostSpecsOrBuilderList()

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Returns
Type Description
List<? extends com.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpecOrBuilder>

getDefaultInstanceForType()

public SearchRequest.BoostSpec getDefaultInstanceForType()
Returns
Type Description
SearchRequest.BoostSpec

getDescriptorForType()

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

getSkipBoostSpecValidation()

public boolean getSkipBoostSpecValidation()

Whether to skip boostspec validation. If this field is set to true, invalid BoostSpec.condition_boost_specs will be ignored and valid BoostSpec.condition_boost_specs will still be applied.

optional bool skip_boost_spec_validation = 2;

Returns
Type Description
boolean

The skipBoostSpecValidation.

hasSkipBoostSpecValidation()

public boolean hasSkipBoostSpecValidation()

Whether to skip boostspec validation. If this field is set to true, invalid BoostSpec.condition_boost_specs will be ignored and valid BoostSpec.condition_boost_specs will still be applied.

optional bool skip_boost_spec_validation = 2;

Returns
Type Description
boolean

Whether the skipBoostSpecValidation field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SearchRequest.BoostSpec other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeConditionBoostSpecs(int index)

public SearchRequest.BoostSpec.Builder removeConditionBoostSpecs(int index)

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Parameter
Name Description
index int
Returns
Type Description
SearchRequest.BoostSpec.Builder

setConditionBoostSpecs(int index, SearchRequest.BoostSpec.ConditionBoostSpec value)

public SearchRequest.BoostSpec.Builder setConditionBoostSpecs(int index, SearchRequest.BoostSpec.ConditionBoostSpec value)

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Parameters
Name Description
index int
value SearchRequest.BoostSpec.ConditionBoostSpec
Returns
Type Description
SearchRequest.BoostSpec.Builder

setConditionBoostSpecs(int index, SearchRequest.BoostSpec.ConditionBoostSpec.Builder builderForValue)

public SearchRequest.BoostSpec.Builder setConditionBoostSpecs(int index, SearchRequest.BoostSpec.ConditionBoostSpec.Builder builderForValue)

Condition boost specifications. If a product 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.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

Parameters
Name Description
index int
builderForValue SearchRequest.BoostSpec.ConditionBoostSpec.Builder
Returns
Type Description
SearchRequest.BoostSpec.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setSkipBoostSpecValidation(boolean value)

public SearchRequest.BoostSpec.Builder setSkipBoostSpecValidation(boolean value)

Whether to skip boostspec validation. If this field is set to true, invalid BoostSpec.condition_boost_specs will be ignored and valid BoostSpec.condition_boost_specs will still be applied.

optional bool skip_boost_spec_validation = 2;

Parameter
Name Description
value boolean

The skipBoostSpecValidation to set.

Returns
Type Description
SearchRequest.BoostSpec.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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