Struct google_api_proto::google::cloud::retail::v2alpha::branch::QualityMetric
source · pub struct QualityMetric {
pub requirement_key: String,
pub qualified_product_count: i32,
pub unqualified_product_count: i32,
pub suggested_quality_percent_threshold: f64,
pub unqualified_sample_products: Vec<Product>,
}
Expand description
Metric measured on a group of [Product][google.cloud.retail.v2alpha.Product]s against a certain quality requirement. Contains the number of products that pass the check and the number of products that don’t.
Fields§
§requirement_key: String
The key that represents a quality requirement rule.
Supported keys:
-
“has-valid-uri”: product has a valid and accessible [uri][google.cloud.retail.v2alpha.Product.uri].
-
“available-expire-time-conformance”: [Product.available_time][google.cloud.retail.v2alpha.Product.available_time] is early than “now”, and [Product.expire_time][google.cloud.retail.v2alpha.Product.expire_time] is greater than “now”.
-
“has-searchable-attributes”: product has at least one [attribute][google.cloud.retail.v2alpha.Product.attributes] set to searchable.
-
“has-description”: product has non-empty [description][google.cloud.retail.v2alpha.Product.description].
-
“has-at-least-bigram-title”: Product [title][google.cloud.retail.v2alpha.Product.title] has at least two words. A comprehensive title helps to improve search quality.
-
“variant-has-image”: the [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has at least one [image][google.cloud.retail.v2alpha.Product.images]. You may ignore this metric if all your products are at [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
-
“variant-has-price-info”: the [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has [price_info][google.cloud.retail.v2alpha.Product.price_info] set. You may ignore this metric if all your products are at [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
-
“has-publish-time”: product has non-empty [publish_time][google.cloud.retail.v2alpha.Product.publish_time].
qualified_product_count: i32
Number of products passing the quality requirement check. We only check searchable products.
unqualified_product_count: i32
Number of products failing the quality requirement check. We only check searchable products.
suggested_quality_percent_threshold: f64
Value from 0 to 100 representing the suggested percentage of products that meet the quality requirements to get good search and recommendation performance. 100 * (qualified_product_count) / (qualified_product_count + unqualified_product_count) should be greater or equal to this suggestion.
unqualified_sample_products: Vec<Product>
A list of a maximum of 100 sample products that do not qualify for this requirement.
This field is only populated in the response to [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch] API, and is always empty for [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
Only the following fields are set in the [Product][google.cloud.retail.v2alpha.Product].
- [Product.name][google.cloud.retail.v2alpha.Product.name]
- [Product.id][google.cloud.retail.v2alpha.Product.id]
- [Product.title][google.cloud.retail.v2alpha.Product.title]
Trait Implementations§
source§impl Clone for QualityMetric
impl Clone for QualityMetric
source§fn clone(&self) -> QualityMetric
fn clone(&self) -> QualityMetric
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for QualityMetric
impl Debug for QualityMetric
source§impl Default for QualityMetric
impl Default for QualityMetric
source§impl Message for QualityMetric
impl Message for QualityMetric
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 QualityMetric
impl PartialEq for QualityMetric
source§fn eq(&self, other: &QualityMetric) -> bool
fn eq(&self, other: &QualityMetric) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for QualityMetric
Auto Trait Implementations§
impl Freeze for QualityMetric
impl RefUnwindSafe for QualityMetric
impl Send for QualityMetric
impl Sync for QualityMetric
impl Unpin for QualityMetric
impl UnwindSafe for QualityMetric
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