Struct google_api_proto::google::cloud::retail::v2beta::CatalogAttribute
source · pub struct CatalogAttribute {
pub key: String,
pub in_use: bool,
pub type: i32,
pub indexable_option: i32,
pub dynamic_facetable_option: i32,
pub searchable_option: i32,
pub recommendations_filtering_option: i32,
pub exact_searchable_option: i32,
pub retrievable_option: i32,
pub facet_config: Option<FacetConfig>,
}
Expand description
Catalog level attribute config for an attribute. For example, if customers want to enable/disable facet for a specific attribute.
Fields§
§key: String
Required. Attribute name.
For example: color
, brands
, attributes.custom_attribute
, such as
attributes.xyz
.
To be indexable, the attribute name can contain only alpha-numeric
characters and underscores. For example, an attribute named
attributes.abc_xyz
can be indexed, but an attribute named
attributes.abc-xyz
cannot be indexed.
If the attribute key starts with attributes.
, then the attribute is a
custom attribute. Attributes such as brands
, patterns
, and title
are
built-in and called system attributes.
in_use: bool
Output only. Indicates whether this attribute has been used by any
products. True
if at least one
[Product][google.cloud.retail.v2beta.Product] is using this attribute in
[Product.attributes][google.cloud.retail.v2beta.Product.attributes].
Otherwise, this field is False
.
[CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] can be
pre-loaded by using
[CatalogService.AddCatalogAttribute][google.cloud.retail.v2beta.CatalogService.AddCatalogAttribute],
[CatalogService.ImportCatalogAttributes][], or
[CatalogService.UpdateAttributesConfig][google.cloud.retail.v2beta.CatalogService.UpdateAttributesConfig]
APIs. This field is False
for pre-loaded
[CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s.
Only pre-loaded [catalog attributes][google.cloud.retail.v2beta.CatalogAttribute] that are neither in use by products nor predefined can be deleted. [Catalog attributes][google.cloud.retail.v2beta.CatalogAttribute] that are either in use by products or are predefined attributes cannot be deleted; however, their configuration properties will reset to default values upon removal request.
After catalog changes, it takes about 10 minutes for this field to update.
type: i32
Output only. The type of this attribute. This is derived from the attribute in [Product.attributes][google.cloud.retail.v2beta.Product.attributes].
indexable_option: i32
When [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values are indexed so that it can be filtered, faceted, or boosted in [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
Must be specified when [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.
dynamic_facetable_option: i32
If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if [CatalogAttribute.indexable_option][google.cloud.retail.v2beta.CatalogAttribute.indexable_option] is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned.
Must be specified, otherwise throws INVALID_FORMAT error.
searchable_option: i32
When [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
If SEARCHABLE_ENABLED but attribute type is numerical, attribute values will not be searchable by text queries in [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as there are no text values associated to numerical attributes.
Must be specified, when [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.
recommendations_filtering_option: i32
When [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED, attribute values are filterable for recommendations. This option works for categorical features only, does not work for numerical features, inventory filtering.
exact_searchable_option: i32
If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. This property only applies to textual custom attributes and requires indexable set to enabled to enable exact-searchable. If unset, the server behavior defaults to [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED].
retrievable_option: i32
If RETRIEVABLE_ENABLED, attribute values are retrievable in the search results. If unset, the server behavior defaults to [RETRIEVABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED].
facet_config: Option<FacetConfig>
Contains facet options.
Implementations§
source§impl CatalogAttribute
impl CatalogAttribute
sourcepub fn indexable_option(&self) -> IndexableOption
pub fn indexable_option(&self) -> IndexableOption
Returns the enum value of indexable_option
, or the default if the field is set to an invalid enum value.
sourcepub fn set_indexable_option(&mut self, value: IndexableOption)
pub fn set_indexable_option(&mut self, value: IndexableOption)
Sets indexable_option
to the provided enum value.
sourcepub fn dynamic_facetable_option(&self) -> DynamicFacetableOption
pub fn dynamic_facetable_option(&self) -> DynamicFacetableOption
Returns the enum value of dynamic_facetable_option
, or the default if the field is set to an invalid enum value.
sourcepub fn set_dynamic_facetable_option(&mut self, value: DynamicFacetableOption)
pub fn set_dynamic_facetable_option(&mut self, value: DynamicFacetableOption)
Sets dynamic_facetable_option
to the provided enum value.
sourcepub fn searchable_option(&self) -> SearchableOption
pub fn searchable_option(&self) -> SearchableOption
Returns the enum value of searchable_option
, or the default if the field is set to an invalid enum value.
sourcepub fn set_searchable_option(&mut self, value: SearchableOption)
pub fn set_searchable_option(&mut self, value: SearchableOption)
Sets searchable_option
to the provided enum value.
sourcepub fn recommendations_filtering_option(&self) -> RecommendationsFilteringOption
pub fn recommendations_filtering_option(&self) -> RecommendationsFilteringOption
Returns the enum value of recommendations_filtering_option
, or the default if the field is set to an invalid enum value.
sourcepub fn set_recommendations_filtering_option(
&mut self,
value: RecommendationsFilteringOption,
)
pub fn set_recommendations_filtering_option( &mut self, value: RecommendationsFilteringOption, )
Sets recommendations_filtering_option
to the provided enum value.
sourcepub fn type(&self) -> AttributeType
pub fn type(&self) -> AttributeType
Returns the enum value of type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_type(&mut self, value: AttributeType)
pub fn set_type(&mut self, value: AttributeType)
Sets type
to the provided enum value.
sourcepub fn exact_searchable_option(&self) -> ExactSearchableOption
pub fn exact_searchable_option(&self) -> ExactSearchableOption
Returns the enum value of exact_searchable_option
, or the default if the field is set to an invalid enum value.
sourcepub fn set_exact_searchable_option(&mut self, value: ExactSearchableOption)
pub fn set_exact_searchable_option(&mut self, value: ExactSearchableOption)
Sets exact_searchable_option
to the provided enum value.
sourcepub fn retrievable_option(&self) -> RetrievableOption
pub fn retrievable_option(&self) -> RetrievableOption
Returns the enum value of retrievable_option
, or the default if the field is set to an invalid enum value.
sourcepub fn set_retrievable_option(&mut self, value: RetrievableOption)
pub fn set_retrievable_option(&mut self, value: RetrievableOption)
Sets retrievable_option
to the provided enum value.
Trait Implementations§
source§impl Clone for CatalogAttribute
impl Clone for CatalogAttribute
source§fn clone(&self) -> CatalogAttribute
fn clone(&self) -> CatalogAttribute
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CatalogAttribute
impl Debug for CatalogAttribute
source§impl Default for CatalogAttribute
impl Default for CatalogAttribute
source§impl Message for CatalogAttribute
impl Message for CatalogAttribute
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for CatalogAttribute
impl PartialEq for CatalogAttribute
source§fn eq(&self, other: &CatalogAttribute) -> bool
fn eq(&self, other: &CatalogAttribute) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CatalogAttribute
Auto Trait Implementations§
impl Freeze for CatalogAttribute
impl RefUnwindSafe for CatalogAttribute
impl Send for CatalogAttribute
impl Sync for CatalogAttribute
impl Unpin for CatalogAttribute
impl UnwindSafe for CatalogAttribute
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request