public interface RatingOrBuilder
extends com.google.protobuf.MessageOrBuilder
| Modifier and Type | Method and Description |
|---|---|
float |
getAverageRating()
The average rating of the [Product][google.cloud.retail.v2.Product].
|
int |
getRatingCount()
The total number of ratings.
|
int |
getRatingHistogram(int index)
List of rating counts per rating value (index = rating - 1).
|
int |
getRatingHistogramCount()
List of rating counts per rating value (index = rating - 1).
|
List<Integer> |
getRatingHistogramList()
List of rating counts per rating value (index = rating - 1).
|
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofint getRatingCount()
The total number of ratings. This value is independent of the value of [rating_histogram][google.cloud.retail.v2.Rating.rating_histogram]. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
int32 rating_count = 1;float getAverageRating()
The average rating of the [Product][google.cloud.retail.v2.Product]. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.
float average_rating = 2;List<Integer> getRatingHistogramList()
List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the [Product][google.cloud.retail.v2.Product] got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
repeated int32 rating_histogram = 3;int getRatingHistogramCount()
List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the [Product][google.cloud.retail.v2.Product] got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
repeated int32 rating_histogram = 3;int getRatingHistogram(int index)
List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the [Product][google.cloud.retail.v2.Product] got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
repeated int32 rating_histogram = 3;index - The index of the element to return.Copyright © 2023 Google LLC. All rights reserved.