grpc.leaderboard._RankRange Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of client-protos Show documentation
Show all versions of client-protos Show documentation
Java protobuf protocols that define the Momento gRPC wire format
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: leaderboard.proto
package grpc.leaderboard;
/**
*
* Query APIs using RankRange expect a limit of 8192 elements. Requesting a range wider than
* that is expected to return an error.
*
* RankRange models half-open ranges: 0..4 refers to elements 0, 1, 2 and 3.
*
* Example permissible ranges:
* * 0..8192
* * 1..8193
* * 123..8315
* * 0..1
* * 1..4
* * 13..17
*
* Example error ranges:
* * 0..0
* * 4..3
* * 0..8193
*
*
* Protobuf type {@code leaderboard._RankRange}
*/
public final class _RankRange extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:leaderboard._RankRange)
_RankRangeOrBuilder {
private static final long serialVersionUID = 0L;
// Use _RankRange.newBuilder() to construct.
private _RankRange(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private _RankRange() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new _RankRange();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.leaderboard.LeaderboardOuterClass.internal_static_leaderboard__RankRange_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.leaderboard.LeaderboardOuterClass.internal_static_leaderboard__RankRange_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.leaderboard._RankRange.class, grpc.leaderboard._RankRange.Builder.class);
}
public static final int START_INCLUSIVE_FIELD_NUMBER = 1;
private int startInclusive_ = 0;
/**
* uint32 start_inclusive = 1;
* @return The startInclusive.
*/
@java.lang.Override
public int getStartInclusive() {
return startInclusive_;
}
public static final int END_EXCLUSIVE_FIELD_NUMBER = 2;
private int endExclusive_ = 0;
/**
* uint32 end_exclusive = 2;
* @return The endExclusive.
*/
@java.lang.Override
public int getEndExclusive() {
return endExclusive_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (startInclusive_ != 0) {
output.writeUInt32(1, startInclusive_);
}
if (endExclusive_ != 0) {
output.writeUInt32(2, endExclusive_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (startInclusive_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(1, startInclusive_);
}
if (endExclusive_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, endExclusive_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof grpc.leaderboard._RankRange)) {
return super.equals(obj);
}
grpc.leaderboard._RankRange other = (grpc.leaderboard._RankRange) obj;
if (getStartInclusive()
!= other.getStartInclusive()) return false;
if (getEndExclusive()
!= other.getEndExclusive()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + START_INCLUSIVE_FIELD_NUMBER;
hash = (53 * hash) + getStartInclusive();
hash = (37 * hash) + END_EXCLUSIVE_FIELD_NUMBER;
hash = (53 * hash) + getEndExclusive();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.leaderboard._RankRange parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.leaderboard._RankRange parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.leaderboard._RankRange parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.leaderboard._RankRange parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.leaderboard._RankRange parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.leaderboard._RankRange parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.leaderboard._RankRange parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.leaderboard._RankRange parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.leaderboard._RankRange parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.leaderboard._RankRange parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.leaderboard._RankRange parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.leaderboard._RankRange parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(grpc.leaderboard._RankRange prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Query APIs using RankRange expect a limit of 8192 elements. Requesting a range wider than
* that is expected to return an error.
*
* RankRange models half-open ranges: 0..4 refers to elements 0, 1, 2 and 3.
*
* Example permissible ranges:
* * 0..8192
* * 1..8193
* * 123..8315
* * 0..1
* * 1..4
* * 13..17
*
* Example error ranges:
* * 0..0
* * 4..3
* * 0..8193
*
*
* Protobuf type {@code leaderboard._RankRange}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:leaderboard._RankRange)
grpc.leaderboard._RankRangeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.leaderboard.LeaderboardOuterClass.internal_static_leaderboard__RankRange_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.leaderboard.LeaderboardOuterClass.internal_static_leaderboard__RankRange_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.leaderboard._RankRange.class, grpc.leaderboard._RankRange.Builder.class);
}
// Construct using grpc.leaderboard._RankRange.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
startInclusive_ = 0;
endExclusive_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.leaderboard.LeaderboardOuterClass.internal_static_leaderboard__RankRange_descriptor;
}
@java.lang.Override
public grpc.leaderboard._RankRange getDefaultInstanceForType() {
return grpc.leaderboard._RankRange.getDefaultInstance();
}
@java.lang.Override
public grpc.leaderboard._RankRange build() {
grpc.leaderboard._RankRange result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.leaderboard._RankRange buildPartial() {
grpc.leaderboard._RankRange result = new grpc.leaderboard._RankRange(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(grpc.leaderboard._RankRange result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.startInclusive_ = startInclusive_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.endExclusive_ = endExclusive_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof grpc.leaderboard._RankRange) {
return mergeFrom((grpc.leaderboard._RankRange)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.leaderboard._RankRange other) {
if (other == grpc.leaderboard._RankRange.getDefaultInstance()) return this;
if (other.getStartInclusive() != 0) {
setStartInclusive(other.getStartInclusive());
}
if (other.getEndExclusive() != 0) {
setEndExclusive(other.getEndExclusive());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
startInclusive_ = input.readUInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16: {
endExclusive_ = input.readUInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int startInclusive_ ;
/**
* uint32 start_inclusive = 1;
* @return The startInclusive.
*/
@java.lang.Override
public int getStartInclusive() {
return startInclusive_;
}
/**
* uint32 start_inclusive = 1;
* @param value The startInclusive to set.
* @return This builder for chaining.
*/
public Builder setStartInclusive(int value) {
startInclusive_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* uint32 start_inclusive = 1;
* @return This builder for chaining.
*/
public Builder clearStartInclusive() {
bitField0_ = (bitField0_ & ~0x00000001);
startInclusive_ = 0;
onChanged();
return this;
}
private int endExclusive_ ;
/**
* uint32 end_exclusive = 2;
* @return The endExclusive.
*/
@java.lang.Override
public int getEndExclusive() {
return endExclusive_;
}
/**
* uint32 end_exclusive = 2;
* @param value The endExclusive to set.
* @return This builder for chaining.
*/
public Builder setEndExclusive(int value) {
endExclusive_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* uint32 end_exclusive = 2;
* @return This builder for chaining.
*/
public Builder clearEndExclusive() {
bitField0_ = (bitField0_ & ~0x00000002);
endExclusive_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:leaderboard._RankRange)
}
// @@protoc_insertion_point(class_scope:leaderboard._RankRange)
private static final grpc.leaderboard._RankRange DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.leaderboard._RankRange();
}
public static grpc.leaderboard._RankRange getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<_RankRange>
PARSER = new com.google.protobuf.AbstractParser<_RankRange>() {
@java.lang.Override
public _RankRange parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<_RankRange> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<_RankRange> getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.leaderboard._RankRange getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}