public final class Rating extends com.google.protobuf.GeneratedMessageV3 implements RatingOrBuilder
The rating of a [Product][google.cloud.retail.v2.Product].Protobuf type
google.cloud.retail.v2.Rating| Modifier and Type | Class and Description |
|---|---|
static class |
Rating.Builder
The rating of a [Product][google.cloud.retail.v2.Product].
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
AVERAGE_RATING_FIELD_NUMBER |
static int |
RATING_COUNT_FIELD_NUMBER |
static int |
RATING_HISTOGRAM_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
float |
getAverageRating()
The average rating of the [Product][google.cloud.retail.v2.Product].
|
static Rating |
getDefaultInstance() |
Rating |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Parser<Rating> |
getParserForType() |
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).
|
int |
getSerializedSize() |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Rating.Builder |
newBuilder() |
static Rating.Builder |
newBuilder(Rating prototype) |
Rating.Builder |
newBuilderForType() |
protected Rating.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static Rating |
parseDelimitedFrom(InputStream input) |
static Rating |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Rating |
parseFrom(byte[] data) |
static Rating |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Rating |
parseFrom(ByteBuffer data) |
static Rating |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Rating |
parseFrom(com.google.protobuf.ByteString data) |
static Rating |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Rating |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Rating |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Rating |
parseFrom(InputStream input) |
static Rating |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Rating> |
parser() |
Rating.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int RATING_COUNT_FIELD_NUMBER
public static final int AVERAGE_RATING_FIELD_NUMBER
public static final int RATING_HISTOGRAM_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public int 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;getRatingCount in interface RatingOrBuilderpublic 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;getAverageRating in interface RatingOrBuilderpublic 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;getRatingHistogramList in interface RatingOrBuilderpublic 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;getRatingHistogramCount in interface RatingOrBuilderpublic 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;getRatingHistogram in interface RatingOrBuilderindex - The index of the element to return.public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Rating parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Rating parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Rating parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Rating parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Rating parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Rating parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Rating parseFrom(InputStream input) throws IOException
IOExceptionpublic static Rating parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Rating parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Rating parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Rating parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Rating parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Rating.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Rating.Builder newBuilder()
public static Rating.Builder newBuilder(Rating prototype)
public Rating.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Rating.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Rating getDefaultInstance()
public static com.google.protobuf.Parser<Rating> parser()
public com.google.protobuf.Parser<Rating> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Rating getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024 Google LLC. All rights reserved.