Struct google_api_proto::google::cloud::retail::v2alpha::branch::ProductCountStatistic
source · pub struct ProductCountStatistic {
pub scope: i32,
pub counts: BTreeMap<String, i64>,
}
Expand description
A statistic about the number of products in a branch.
Fields§
§scope: i32
[ProductCountScope] of the [counts].
counts: BTreeMap<String, i64>
The number of products in [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope] broken down into different groups.
The key is a group representing a set of products, and the value is the number of products in that group. Note: keys in this map may change over time.
Possible keys:
-
“primary-in-stock”, products have [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] type and [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK] availability.
-
“primary-out-of-stock”, products have [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] type and [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK] availability.
-
“primary-preorder”, products have [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] type and [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER] availability.
-
“primary-backorder”, products have [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] type and [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER] availability.
-
“variant-in-stock”, products have [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] type and [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK] availability.
-
“variant-out-of-stock”, products have [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] type and [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK] availability.
-
“variant-preorder”, products have [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] type and [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER] availability.
-
“variant-backorder”, products have [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] type and [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER] availability.
-
“price-discounted”, products have [Product.price_info.price] < [Product.price_info.original_price].
Implementations§
source§impl ProductCountStatistic
impl ProductCountStatistic
sourcepub fn scope(&self) -> ProductCountScope
pub fn scope(&self) -> ProductCountScope
Returns the enum value of scope
, or the default if the field is set to an invalid enum value.
sourcepub fn set_scope(&mut self, value: ProductCountScope)
pub fn set_scope(&mut self, value: ProductCountScope)
Sets scope
to the provided enum value.
Trait Implementations§
source§impl Clone for ProductCountStatistic
impl Clone for ProductCountStatistic
source§fn clone(&self) -> ProductCountStatistic
fn clone(&self) -> ProductCountStatistic
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ProductCountStatistic
impl Debug for ProductCountStatistic
source§impl Default for ProductCountStatistic
impl Default for ProductCountStatistic
source§impl Message for ProductCountStatistic
impl Message for ProductCountStatistic
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 ProductCountStatistic
impl PartialEq for ProductCountStatistic
source§fn eq(&self, other: &ProductCountStatistic) -> bool
fn eq(&self, other: &ProductCountStatistic) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ProductCountStatistic
Auto Trait Implementations§
impl Freeze for ProductCountStatistic
impl RefUnwindSafe for ProductCountStatistic
impl Send for ProductCountStatistic
impl Sync for ProductCountStatistic
impl Unpin for ProductCountStatistic
impl UnwindSafe for ProductCountStatistic
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