public static final class Rating.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Rating.Builder> implements RatingOrBuilder
The rating of a [Product][google.cloud.retail.v2alpha.Product].Protobuf type
google.cloud.retail.v2alpha.Rating| Modifier and Type | Method and Description |
|---|---|
Rating.Builder |
addAllRatingHistogram(Iterable<? extends Integer> values)
List of rating counts per rating value (index = rating - 1).
|
Rating.Builder |
addRatingHistogram(int value)
List of rating counts per rating value (index = rating - 1).
|
Rating.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Rating |
build() |
Rating |
buildPartial() |
Rating.Builder |
clear() |
Rating.Builder |
clearAverageRating()
The average rating of the [Product][google.cloud.retail.v2alpha.Product].
|
Rating.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
Rating.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Rating.Builder |
clearRatingCount()
The total number of ratings.
|
Rating.Builder |
clearRatingHistogram()
List of rating counts per rating value (index = rating - 1).
|
Rating.Builder |
clone() |
float |
getAverageRating()
The average rating of the [Product][google.cloud.retail.v2alpha.Product].
|
Rating |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
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).
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
Rating.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Rating.Builder |
mergeFrom(com.google.protobuf.Message other) |
Rating.Builder |
mergeFrom(Rating other) |
Rating.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Rating.Builder |
setAverageRating(float value)
The average rating of the [Product][google.cloud.retail.v2alpha.Product].
|
Rating.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Rating.Builder |
setRatingCount(int value)
The total number of ratings.
|
Rating.Builder |
setRatingHistogram(int index,
int value)
List of rating counts per rating value (index = rating - 1).
|
Rating.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
Rating.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Rating.Builder>public Rating.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<Rating.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Rating.Builder>public Rating getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Rating build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Rating buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Rating.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<Rating.Builder>public Rating.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<Rating.Builder>public Rating.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<Rating.Builder>public Rating.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Rating.Builder>public Rating.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Rating.Builder>public Rating.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Rating.Builder>public Rating.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Rating.Builder>public Rating.Builder mergeFrom(Rating other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Rating.Builder>public Rating.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Rating.Builder>IOExceptionpublic int getRatingCount()
The total number of ratings. This value is independent of the value of [rating_histogram][google.cloud.retail.v2alpha.Rating.rating_histogram]. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
int32 rating_count = 1;getRatingCount in interface RatingOrBuilderpublic Rating.Builder setRatingCount(int value)
The total number of ratings. This value is independent of the value of [rating_histogram][google.cloud.retail.v2alpha.Rating.rating_histogram]. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
int32 rating_count = 1;value - The ratingCount to set.public Rating.Builder clearRatingCount()
The total number of ratings. This value is independent of the value of [rating_histogram][google.cloud.retail.v2alpha.Rating.rating_histogram]. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
int32 rating_count = 1;public float getAverageRating()
The average rating of the [Product][google.cloud.retail.v2alpha.Product]. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.
float average_rating = 2;getAverageRating in interface RatingOrBuilderpublic Rating.Builder setAverageRating(float value)
The average rating of the [Product][google.cloud.retail.v2alpha.Product]. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.
float average_rating = 2;value - The averageRating to set.public Rating.Builder clearAverageRating()
The average rating of the [Product][google.cloud.retail.v2alpha.Product]. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.
float average_rating = 2;public 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.v2alpha.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.v2alpha.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.v2alpha.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 Rating.Builder setRatingHistogram(int index, int value)
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.v2alpha.Product] got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
repeated int32 rating_histogram = 3;index - The index to set the value at.value - The ratingHistogram to set.public Rating.Builder addRatingHistogram(int value)
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.v2alpha.Product] got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
repeated int32 rating_histogram = 3;value - The ratingHistogram to add.public Rating.Builder addAllRatingHistogram(Iterable<? extends Integer> values)
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.v2alpha.Product] got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
repeated int32 rating_histogram = 3;values - The ratingHistogram to add.public Rating.Builder clearRatingHistogram()
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.v2alpha.Product] got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
repeated int32 rating_histogram = 3;public final Rating.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Rating.Builder>public final Rating.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Rating.Builder>Copyright © 2024 Google LLC. All rights reserved.