public sealed class CustomAttribute : IMessage<CustomAttribute>, IEquatable<CustomAttribute>, IDeepCloneable<CustomAttribute>, IBufferMessage, IMessage
A custom attribute that is not explicitly modeled in [Product][google.cloud.retail.v2.Product].
Implements
IMessage<CustomAttribute>, IEquatable<CustomAttribute>, IDeepCloneable<CustomAttribute>, IBufferMessage, IMessageNamespace
Google.Cloud.Retail.V2Assembly
Google.Cloud.Retail.V2.dll
Constructors
CustomAttribute()
public CustomAttribute()
CustomAttribute(CustomAttribute)
public CustomAttribute(CustomAttribute other)
Parameter | |
---|---|
Name | Description |
other | CustomAttribute |
Properties
HasIndexable
[Obsolete]
public bool HasIndexable { get; }
Gets whether the "indexable" field is set
Property Value | |
---|---|
Type | Description |
Boolean |
HasSearchable
[Obsolete]
public bool HasSearchable { get; }
Gets whether the "searchable" field is set
Property Value | |
---|---|
Type | Description |
Boolean |
Indexable
[Obsolete]
public bool Indexable { get; set; }
This field is normally ignored unless [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] of the [Catalog][google.cloud.retail.v2.Catalog] is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see Configuration modes. If true, custom attribute values are indexed, so that they can be filtered, faceted or boosted in [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
This field is ignored in a [UserEvent][google.cloud.retail.v2.UserEvent].
See [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter], [SearchRequest.facet_specs][google.cloud.retail.v2.SearchRequest.facet_specs] and [SearchRequest.boost_spec][google.cloud.retail.v2.SearchRequest.boost_spec] for more details.
Property Value | |
---|---|
Type | Description |
Boolean |
Numbers
public RepeatedField<double> Numbers { get; }
The numerical values of this custom attribute. For example, [2.3, 15.4]
when the key is "lengths_cm".
Exactly one of [text][google.cloud.retail.v2.CustomAttribute.text] or [numbers][google.cloud.retail.v2.CustomAttribute.numbers] should be set. Otherwise, an INVALID_ARGUMENT error is returned.
Property Value | |
---|---|
Type | Description |
RepeatedField<Double> |
Searchable
[Obsolete]
public bool Searchable { get; set; }
This field is normally ignored unless [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] of the [Catalog][google.cloud.retail.v2.Catalog] is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see Configuration modes. If true, custom attribute values are searchable by text queries in [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
This field is ignored in a [UserEvent][google.cloud.retail.v2.UserEvent].
Only set if type [text][google.cloud.retail.v2.CustomAttribute.text] is set. Otherwise, a INVALID_ARGUMENT error is returned.
Property Value | |
---|---|
Type | Description |
Boolean |
Text
public RepeatedField<string> Text { get; }
The textual values of this custom attribute. For example, ["yellow",
"green"]
when the key is "color".
Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned.
Exactly one of [text][google.cloud.retail.v2.CustomAttribute.text] or [numbers][google.cloud.retail.v2.CustomAttribute.numbers] should be set. Otherwise, an INVALID_ARGUMENT error is returned.
Property Value | |
---|---|
Type | Description |
RepeatedField<String> |