Struct google_api_proto::google::cloud::retail::v2beta::CustomAttribute
source · pub struct CustomAttribute {
pub text: Vec<String>,
pub numbers: Vec<f64>,
pub searchable: Option<bool>,
pub indexable: Option<bool>,
}
Expand description
A custom attribute that is not explicitly modeled in [Product][google.cloud.retail.v2beta.Product].
Fields§
§text: Vec<String>
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.v2beta.CustomAttribute.text] or [numbers][google.cloud.retail.v2beta.CustomAttribute.numbers] should be set. Otherwise, an INVALID_ARGUMENT error is returned.
numbers: Vec<f64>
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.v2beta.CustomAttribute.text] or [numbers][google.cloud.retail.v2beta.CustomAttribute.numbers] should be set. Otherwise, an INVALID_ARGUMENT error is returned.
searchable: Option<bool>
This field is normally ignored unless [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] of the [Catalog][google.cloud.retail.v2beta.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.v2beta.SearchService.Search].
This field is ignored in a [UserEvent][google.cloud.retail.v2beta.UserEvent].
Only set if type [text][google.cloud.retail.v2beta.CustomAttribute.text] is set. Otherwise, a INVALID_ARGUMENT error is returned.
indexable: Option<bool>
This field is normally ignored unless [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] of the [Catalog][google.cloud.retail.v2beta.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.v2beta.SearchService.Search].
This field is ignored in a [UserEvent][google.cloud.retail.v2beta.UserEvent].
See [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter], [SearchRequest.facet_specs][google.cloud.retail.v2beta.SearchRequest.facet_specs] and [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] for more details.
Implementations§
Trait Implementations§
source§impl Clone for CustomAttribute
impl Clone for CustomAttribute
source§fn clone(&self) -> CustomAttribute
fn clone(&self) -> CustomAttribute
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CustomAttribute
impl Debug for CustomAttribute
source§impl Default for CustomAttribute
impl Default for CustomAttribute
source§impl Message for CustomAttribute
impl Message for CustomAttribute
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 CustomAttribute
impl PartialEq for CustomAttribute
source§fn eq(&self, other: &CustomAttribute) -> bool
fn eq(&self, other: &CustomAttribute) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CustomAttribute
Auto Trait Implementations§
impl Freeze for CustomAttribute
impl RefUnwindSafe for CustomAttribute
impl Send for CustomAttribute
impl Sync for CustomAttribute
impl Unpin for CustomAttribute
impl UnwindSafe for CustomAttribute
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