Class SearchRequest.BoostSpec (2.38.0)

public static final class SearchRequest.BoostSpec extends GeneratedMessageV3 implements SearchRequest.BoostSpecOrBuilder

Boost specification to boost certain items.

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

Static Fields

CONDITION_BOOST_SPECS_FIELD_NUMBER

public static final int CONDITION_BOOST_SPECS_FIELD_NUMBER
Field Value
TypeDescription
int

SKIP_BOOST_SPEC_VALIDATION_FIELD_NUMBER

public static final int SKIP_BOOST_SPEC_VALIDATION_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static SearchRequest.BoostSpec getDefaultInstance()
Returns
TypeDescription
SearchRequest.BoostSpec

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static SearchRequest.BoostSpec.Builder newBuilder()
Returns
TypeDescription
SearchRequest.BoostSpec.Builder

newBuilder(SearchRequest.BoostSpec prototype)

public static SearchRequest.BoostSpec.Builder newBuilder(SearchRequest.BoostSpec prototype)
Parameter
NameDescription
prototypeSearchRequest.BoostSpec
Returns
TypeDescription
SearchRequest.BoostSpec.Builder

parseDelimitedFrom(InputStream input)

public static SearchRequest.BoostSpec parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
SearchRequest.BoostSpec
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SearchRequest.BoostSpec parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SearchRequest.BoostSpec
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static SearchRequest.BoostSpec parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
SearchRequest.BoostSpec
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static SearchRequest.BoostSpec parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SearchRequest.BoostSpec
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static SearchRequest.BoostSpec parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
SearchRequest.BoostSpec
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static SearchRequest.BoostSpec parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SearchRequest.BoostSpec
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static SearchRequest.BoostSpec parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
SearchRequest.BoostSpec
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static SearchRequest.BoostSpec parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SearchRequest.BoostSpec
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static SearchRequest.BoostSpec parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
SearchRequest.BoostSpec
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SearchRequest.BoostSpec parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SearchRequest.BoostSpec
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static SearchRequest.BoostSpec parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
SearchRequest.BoostSpec
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static SearchRequest.BoostSpec parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SearchRequest.BoostSpec
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<SearchRequest.BoostSpec> parser()
Returns
TypeDescription
Parser<BoostSpec>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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
NameDescription
indexint
Returns
TypeDescription
SearchRequest.BoostSpec.ConditionBoostSpec

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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpecOrBuilder>

getDefaultInstanceForType()

public SearchRequest.BoostSpec getDefaultInstanceForType()
Returns
TypeDescription
SearchRequest.BoostSpec

getParserForType()

public Parser<SearchRequest.BoostSpec> getParserForType()
Returns
TypeDescription
Parser<BoostSpec>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
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
TypeDescription
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
TypeDescription
boolean

Whether the skipBoostSpecValidation field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public SearchRequest.BoostSpec.Builder newBuilderForType()
Returns
TypeDescription
SearchRequest.BoostSpec.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected SearchRequest.BoostSpec.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
SearchRequest.BoostSpec.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public SearchRequest.BoostSpec.Builder toBuilder()
Returns
TypeDescription
SearchRequest.BoostSpec.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException