Class CatalogAttribute.FacetConfig (2.50.0)

public static final class CatalogAttribute.FacetConfig extends GeneratedMessageV3 implements CatalogAttribute.FacetConfigOrBuilder

Possible options for the facet that corresponds to the current attribute config.

Protobuf type google.cloud.retail.v2.CatalogAttribute.FacetConfig

Static Fields

FACET_INTERVALS_FIELD_NUMBER

public static final int FACET_INTERVALS_FIELD_NUMBER
Field Value
Type Description
int

IGNORED_FACET_VALUES_FIELD_NUMBER

public static final int IGNORED_FACET_VALUES_FIELD_NUMBER
Field Value
Type Description
int

MERGED_FACET_FIELD_NUMBER

public static final int MERGED_FACET_FIELD_NUMBER
Field Value
Type Description
int

MERGED_FACET_VALUES_FIELD_NUMBER

public static final int MERGED_FACET_VALUES_FIELD_NUMBER
Field Value
Type Description
int

RERANK_CONFIG_FIELD_NUMBER

public static final int RERANK_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CatalogAttribute.FacetConfig getDefaultInstance()
Returns
Type Description
CatalogAttribute.FacetConfig

getDescriptor()

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

newBuilder()

public static CatalogAttribute.FacetConfig.Builder newBuilder()
Returns
Type Description
CatalogAttribute.FacetConfig.Builder

newBuilder(CatalogAttribute.FacetConfig prototype)

public static CatalogAttribute.FacetConfig.Builder newBuilder(CatalogAttribute.FacetConfig prototype)
Parameter
Name Description
prototype CatalogAttribute.FacetConfig
Returns
Type Description
CatalogAttribute.FacetConfig.Builder

parseDelimitedFrom(InputStream input)

public static CatalogAttribute.FacetConfig parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CatalogAttribute.FacetConfig
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CatalogAttribute.FacetConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CatalogAttribute.FacetConfig
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static CatalogAttribute.FacetConfig parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
CatalogAttribute.FacetConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CatalogAttribute.FacetConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CatalogAttribute.FacetConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CatalogAttribute.FacetConfig parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
CatalogAttribute.FacetConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CatalogAttribute.FacetConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CatalogAttribute.FacetConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CatalogAttribute.FacetConfig parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
CatalogAttribute.FacetConfig
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CatalogAttribute.FacetConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CatalogAttribute.FacetConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static CatalogAttribute.FacetConfig parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CatalogAttribute.FacetConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CatalogAttribute.FacetConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CatalogAttribute.FacetConfig
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static CatalogAttribute.FacetConfig parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
CatalogAttribute.FacetConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CatalogAttribute.FacetConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CatalogAttribute.FacetConfig
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<CatalogAttribute.FacetConfig> parser()
Returns
Type Description
Parser<FacetConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public CatalogAttribute.FacetConfig getDefaultInstanceForType()
Returns
Type Description
CatalogAttribute.FacetConfig

getFacetIntervals(int index)

public Interval getFacetIntervals(int index)

If you don't set the facet SearchRequest.FacetSpec.FacetKey.intervals in the request to a numerical attribute, then we use the computed intervals with rounded bounds obtained from all its product numerical attribute values. The computed intervals might not be ideal for some attributes. Therefore, we give you the option to overwrite them with the facet_intervals field. The maximum of facet intervals per CatalogAttribute is 40. Each interval must have a lower bound or an upper bound. If both bounds are provided, then the lower bound must be smaller or equal than the upper bound.

repeated .google.cloud.retail.v2.Interval facet_intervals = 1;

Parameter
Name Description
index int
Returns
Type Description
Interval

getFacetIntervalsCount()

public int getFacetIntervalsCount()

If you don't set the facet SearchRequest.FacetSpec.FacetKey.intervals in the request to a numerical attribute, then we use the computed intervals with rounded bounds obtained from all its product numerical attribute values. The computed intervals might not be ideal for some attributes. Therefore, we give you the option to overwrite them with the facet_intervals field. The maximum of facet intervals per CatalogAttribute is 40. Each interval must have a lower bound or an upper bound. If both bounds are provided, then the lower bound must be smaller or equal than the upper bound.

repeated .google.cloud.retail.v2.Interval facet_intervals = 1;

Returns
Type Description
int

getFacetIntervalsList()

public List<Interval> getFacetIntervalsList()

If you don't set the facet SearchRequest.FacetSpec.FacetKey.intervals in the request to a numerical attribute, then we use the computed intervals with rounded bounds obtained from all its product numerical attribute values. The computed intervals might not be ideal for some attributes. Therefore, we give you the option to overwrite them with the facet_intervals field. The maximum of facet intervals per CatalogAttribute is 40. Each interval must have a lower bound or an upper bound. If both bounds are provided, then the lower bound must be smaller or equal than the upper bound.

repeated .google.cloud.retail.v2.Interval facet_intervals = 1;

Returns
Type Description
List<Interval>

getFacetIntervalsOrBuilder(int index)

public IntervalOrBuilder getFacetIntervalsOrBuilder(int index)

If you don't set the facet SearchRequest.FacetSpec.FacetKey.intervals in the request to a numerical attribute, then we use the computed intervals with rounded bounds obtained from all its product numerical attribute values. The computed intervals might not be ideal for some attributes. Therefore, we give you the option to overwrite them with the facet_intervals field. The maximum of facet intervals per CatalogAttribute is 40. Each interval must have a lower bound or an upper bound. If both bounds are provided, then the lower bound must be smaller or equal than the upper bound.

repeated .google.cloud.retail.v2.Interval facet_intervals = 1;

Parameter
Name Description
index int
Returns
Type Description
IntervalOrBuilder

getFacetIntervalsOrBuilderList()

public List<? extends IntervalOrBuilder> getFacetIntervalsOrBuilderList()

If you don't set the facet SearchRequest.FacetSpec.FacetKey.intervals in the request to a numerical attribute, then we use the computed intervals with rounded bounds obtained from all its product numerical attribute values. The computed intervals might not be ideal for some attributes. Therefore, we give you the option to overwrite them with the facet_intervals field. The maximum of facet intervals per CatalogAttribute is 40. Each interval must have a lower bound or an upper bound. If both bounds are provided, then the lower bound must be smaller or equal than the upper bound.

repeated .google.cloud.retail.v2.Interval facet_intervals = 1;

Returns
Type Description
List<? extends com.google.cloud.retail.v2.IntervalOrBuilder>

getIgnoredFacetValues(int index)

public CatalogAttribute.FacetConfig.IgnoredFacetValues getIgnoredFacetValues(int index)

Each instance represents a list of attribute values to ignore as facet values for a specific time range. The maximum number of instances per CatalogAttribute is 25.

repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2;

Parameter
Name Description
index int
Returns
Type Description
CatalogAttribute.FacetConfig.IgnoredFacetValues

getIgnoredFacetValuesCount()

public int getIgnoredFacetValuesCount()

Each instance represents a list of attribute values to ignore as facet values for a specific time range. The maximum number of instances per CatalogAttribute is 25.

repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2;

Returns
Type Description
int

getIgnoredFacetValuesList()

public List<CatalogAttribute.FacetConfig.IgnoredFacetValues> getIgnoredFacetValuesList()

Each instance represents a list of attribute values to ignore as facet values for a specific time range. The maximum number of instances per CatalogAttribute is 25.

repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2;

Returns
Type Description
List<IgnoredFacetValues>

getIgnoredFacetValuesOrBuilder(int index)

public CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder getIgnoredFacetValuesOrBuilder(int index)

Each instance represents a list of attribute values to ignore as facet values for a specific time range. The maximum number of instances per CatalogAttribute is 25.

repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2;

Parameter
Name Description
index int
Returns
Type Description
CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder

getIgnoredFacetValuesOrBuilderList()

public List<? extends CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder> getIgnoredFacetValuesOrBuilderList()

Each instance represents a list of attribute values to ignore as facet values for a specific time range. The maximum number of instances per CatalogAttribute is 25.

repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2;

Returns
Type Description
List<? extends com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder>

getMergedFacet()

public CatalogAttribute.FacetConfig.MergedFacet getMergedFacet()

Use this field only if you want to merge a facet key into another facet key.

.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4;

Returns
Type Description
CatalogAttribute.FacetConfig.MergedFacet

The mergedFacet.

getMergedFacetOrBuilder()

public CatalogAttribute.FacetConfig.MergedFacetOrBuilder getMergedFacetOrBuilder()

Use this field only if you want to merge a facet key into another facet key.

.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4;

Returns
Type Description
CatalogAttribute.FacetConfig.MergedFacetOrBuilder

getMergedFacetValues(int index)

public CatalogAttribute.FacetConfig.MergedFacetValue getMergedFacetValues(int index)

Each instance replaces a list of facet values by a merged facet value. If a facet value is not in any list, then it will stay the same. To avoid conflicts, only paths of length 1 are accepted. In other words, if "dark_blue" merged into "BLUE", then the latter can't merge into "blues" because this would create a path of length 2. The maximum number of instances of MergedFacetValue per CatalogAttribute is 100. This feature is available only for textual custom attributes.

repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3;

Parameter
Name Description
index int
Returns
Type Description
CatalogAttribute.FacetConfig.MergedFacetValue

getMergedFacetValuesCount()

public int getMergedFacetValuesCount()

Each instance replaces a list of facet values by a merged facet value. If a facet value is not in any list, then it will stay the same. To avoid conflicts, only paths of length 1 are accepted. In other words, if "dark_blue" merged into "BLUE", then the latter can't merge into "blues" because this would create a path of length 2. The maximum number of instances of MergedFacetValue per CatalogAttribute is 100. This feature is available only for textual custom attributes.

repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3;

Returns
Type Description
int

getMergedFacetValuesList()

public List<CatalogAttribute.FacetConfig.MergedFacetValue> getMergedFacetValuesList()

Each instance replaces a list of facet values by a merged facet value. If a facet value is not in any list, then it will stay the same. To avoid conflicts, only paths of length 1 are accepted. In other words, if "dark_blue" merged into "BLUE", then the latter can't merge into "blues" because this would create a path of length 2. The maximum number of instances of MergedFacetValue per CatalogAttribute is 100. This feature is available only for textual custom attributes.

repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3;

Returns
Type Description
List<MergedFacetValue>

getMergedFacetValuesOrBuilder(int index)

public CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder getMergedFacetValuesOrBuilder(int index)

Each instance replaces a list of facet values by a merged facet value. If a facet value is not in any list, then it will stay the same. To avoid conflicts, only paths of length 1 are accepted. In other words, if "dark_blue" merged into "BLUE", then the latter can't merge into "blues" because this would create a path of length 2. The maximum number of instances of MergedFacetValue per CatalogAttribute is 100. This feature is available only for textual custom attributes.

repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3;

Parameter
Name Description
index int
Returns
Type Description
CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder

getMergedFacetValuesOrBuilderList()

public List<? extends CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder> getMergedFacetValuesOrBuilderList()

Each instance replaces a list of facet values by a merged facet value. If a facet value is not in any list, then it will stay the same. To avoid conflicts, only paths of length 1 are accepted. In other words, if "dark_blue" merged into "BLUE", then the latter can't merge into "blues" because this would create a path of length 2. The maximum number of instances of MergedFacetValue per CatalogAttribute is 100. This feature is available only for textual custom attributes.

repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3;

Returns
Type Description
List<? extends com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder>

getParserForType()

public Parser<CatalogAttribute.FacetConfig> getParserForType()
Returns
Type Description
Parser<FacetConfig>
Overrides

getRerankConfig()

public CatalogAttribute.FacetConfig.RerankConfig getRerankConfig()

Set this field only if you want to rerank based on facet values engaged by the user for the current key. This option is only possible for custom facetable textual keys.

.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5;

Returns
Type Description
CatalogAttribute.FacetConfig.RerankConfig

The rerankConfig.

getRerankConfigOrBuilder()

public CatalogAttribute.FacetConfig.RerankConfigOrBuilder getRerankConfigOrBuilder()

Set this field only if you want to rerank based on facet values engaged by the user for the current key. This option is only possible for custom facetable textual keys.

.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5;

Returns
Type Description
CatalogAttribute.FacetConfig.RerankConfigOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasMergedFacet()

public boolean hasMergedFacet()

Use this field only if you want to merge a facet key into another facet key.

.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4;

Returns
Type Description
boolean

Whether the mergedFacet field is set.

hasRerankConfig()

public boolean hasRerankConfig()

Set this field only if you want to rerank based on facet values engaged by the user for the current key. This option is only possible for custom facetable textual keys.

.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5;

Returns
Type Description
boolean

Whether the rerankConfig field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public CatalogAttribute.FacetConfig.Builder newBuilderForType()
Returns
Type Description
CatalogAttribute.FacetConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CatalogAttribute.FacetConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
CatalogAttribute.FacetConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public CatalogAttribute.FacetConfig.Builder toBuilder()
Returns
Type Description
CatalogAttribute.FacetConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException