pub struct Product {
pub name: String,
pub display_name: String,
pub description: String,
pub product_category: String,
pub product_labels: Vec<KeyValue>,
}
Expand description
A Product contains ReferenceImages.
Fields§
§name: String
The resource name of the product.
Format is:
projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID
.
This field is ignored when creating a product.
display_name: String
The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.
description: String
User-provided metadata to be stored with this product. Must be at most 4096 characters long.
product_category: String
Immutable. The category for the product identified by the reference image. This should be either “homegoods-v2”, “apparel-v2”, or “toys-v2”. The legacy categories “homegoods”, “apparel”, and “toys” are still supported, but these should not be used for new products.
product_labels: Vec<KeyValue>
Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels.
Note that integer values can be provided as strings, e.g. “1199”. Only strings with integer values can match a range-based restriction which is to be supported soon.
Multiple values can be assigned to the same key. One product may have up to 500 product_labels.
Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.
Trait Implementations§
source§impl Message for Product
impl Message for Product
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 Product
impl PartialEq for Product
impl StructuralPartialEq for Product
Auto Trait Implementations§
impl Freeze for Product
impl RefUnwindSafe for Product
impl Send for Product
impl Sync for Product
impl Unpin for Product
impl UnwindSafe for Product
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