grpc.leaderboard._GetRankResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of client-protos-jvm Show documentation
Show all versions of client-protos-jvm Show documentation
Kotlin protobuf protocols for the JVM that define the Momento gRPC wire format
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: leaderboard.proto
package grpc.leaderboard;
/**
* Protobuf type {@code leaderboard._GetRankResponse}
*/
public final class _GetRankResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:leaderboard._GetRankResponse)
_GetRankResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use _GetRankResponse.newBuilder() to construct.
private _GetRankResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private _GetRankResponse() {
elements_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new _GetRankResponse();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.leaderboard.LeaderboardOuterClass.internal_static_leaderboard__GetRankResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.leaderboard.LeaderboardOuterClass.internal_static_leaderboard__GetRankResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.leaderboard._GetRankResponse.class, grpc.leaderboard._GetRankResponse.Builder.class);
}
public static final int ELEMENTS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List elements_;
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
@java.lang.Override
public java.util.List getElementsList() {
return elements_;
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
@java.lang.Override
public java.util.List extends grpc.leaderboard._RankedElementOrBuilder>
getElementsOrBuilderList() {
return elements_;
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
@java.lang.Override
public int getElementsCount() {
return elements_.size();
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
@java.lang.Override
public grpc.leaderboard._RankedElement getElements(int index) {
return elements_.get(index);
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
@java.lang.Override
public grpc.leaderboard._RankedElementOrBuilder getElementsOrBuilder(
int index) {
return elements_.get(index);
}
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 {
for (int i = 0; i < elements_.size(); i++) {
output.writeMessage(1, elements_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < elements_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, elements_.get(i));
}
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._GetRankResponse)) {
return super.equals(obj);
}
grpc.leaderboard._GetRankResponse other = (grpc.leaderboard._GetRankResponse) obj;
if (!getElementsList()
.equals(other.getElementsList())) 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();
if (getElementsCount() > 0) {
hash = (37 * hash) + ELEMENTS_FIELD_NUMBER;
hash = (53 * hash) + getElementsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.leaderboard._GetRankResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.leaderboard._GetRankResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.leaderboard._GetRankResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.leaderboard._GetRankResponse 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._GetRankResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.leaderboard._GetRankResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.leaderboard._GetRankResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.leaderboard._GetRankResponse 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._GetRankResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.leaderboard._GetRankResponse 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._GetRankResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.leaderboard._GetRankResponse 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._GetRankResponse 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;
}
/**
* Protobuf type {@code leaderboard._GetRankResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:leaderboard._GetRankResponse)
grpc.leaderboard._GetRankResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.leaderboard.LeaderboardOuterClass.internal_static_leaderboard__GetRankResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.leaderboard.LeaderboardOuterClass.internal_static_leaderboard__GetRankResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.leaderboard._GetRankResponse.class, grpc.leaderboard._GetRankResponse.Builder.class);
}
// Construct using grpc.leaderboard._GetRankResponse.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (elementsBuilder_ == null) {
elements_ = java.util.Collections.emptyList();
} else {
elements_ = null;
elementsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.leaderboard.LeaderboardOuterClass.internal_static_leaderboard__GetRankResponse_descriptor;
}
@java.lang.Override
public grpc.leaderboard._GetRankResponse getDefaultInstanceForType() {
return grpc.leaderboard._GetRankResponse.getDefaultInstance();
}
@java.lang.Override
public grpc.leaderboard._GetRankResponse build() {
grpc.leaderboard._GetRankResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.leaderboard._GetRankResponse buildPartial() {
grpc.leaderboard._GetRankResponse result = new grpc.leaderboard._GetRankResponse(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(grpc.leaderboard._GetRankResponse result) {
if (elementsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
elements_ = java.util.Collections.unmodifiableList(elements_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.elements_ = elements_;
} else {
result.elements_ = elementsBuilder_.build();
}
}
private void buildPartial0(grpc.leaderboard._GetRankResponse result) {
int from_bitField0_ = bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof grpc.leaderboard._GetRankResponse) {
return mergeFrom((grpc.leaderboard._GetRankResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.leaderboard._GetRankResponse other) {
if (other == grpc.leaderboard._GetRankResponse.getDefaultInstance()) return this;
if (elementsBuilder_ == null) {
if (!other.elements_.isEmpty()) {
if (elements_.isEmpty()) {
elements_ = other.elements_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureElementsIsMutable();
elements_.addAll(other.elements_);
}
onChanged();
}
} else {
if (!other.elements_.isEmpty()) {
if (elementsBuilder_.isEmpty()) {
elementsBuilder_.dispose();
elementsBuilder_ = null;
elements_ = other.elements_;
bitField0_ = (bitField0_ & ~0x00000001);
elementsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getElementsFieldBuilder() : null;
} else {
elementsBuilder_.addAllMessages(other.elements_);
}
}
}
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 10: {
grpc.leaderboard._RankedElement m =
input.readMessage(
grpc.leaderboard._RankedElement.parser(),
extensionRegistry);
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
elements_.add(m);
} else {
elementsBuilder_.addMessage(m);
}
break;
} // case 10
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 java.util.List elements_ =
java.util.Collections.emptyList();
private void ensureElementsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
elements_ = new java.util.ArrayList(elements_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
grpc.leaderboard._RankedElement, grpc.leaderboard._RankedElement.Builder, grpc.leaderboard._RankedElementOrBuilder> elementsBuilder_;
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public java.util.List getElementsList() {
if (elementsBuilder_ == null) {
return java.util.Collections.unmodifiableList(elements_);
} else {
return elementsBuilder_.getMessageList();
}
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public int getElementsCount() {
if (elementsBuilder_ == null) {
return elements_.size();
} else {
return elementsBuilder_.getCount();
}
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public grpc.leaderboard._RankedElement getElements(int index) {
if (elementsBuilder_ == null) {
return elements_.get(index);
} else {
return elementsBuilder_.getMessage(index);
}
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public Builder setElements(
int index, grpc.leaderboard._RankedElement value) {
if (elementsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureElementsIsMutable();
elements_.set(index, value);
onChanged();
} else {
elementsBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public Builder setElements(
int index, grpc.leaderboard._RankedElement.Builder builderForValue) {
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
elements_.set(index, builderForValue.build());
onChanged();
} else {
elementsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public Builder addElements(grpc.leaderboard._RankedElement value) {
if (elementsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureElementsIsMutable();
elements_.add(value);
onChanged();
} else {
elementsBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public Builder addElements(
int index, grpc.leaderboard._RankedElement value) {
if (elementsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureElementsIsMutable();
elements_.add(index, value);
onChanged();
} else {
elementsBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public Builder addElements(
grpc.leaderboard._RankedElement.Builder builderForValue) {
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
elements_.add(builderForValue.build());
onChanged();
} else {
elementsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public Builder addElements(
int index, grpc.leaderboard._RankedElement.Builder builderForValue) {
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
elements_.add(index, builderForValue.build());
onChanged();
} else {
elementsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public Builder addAllElements(
java.lang.Iterable extends grpc.leaderboard._RankedElement> values) {
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, elements_);
onChanged();
} else {
elementsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public Builder clearElements() {
if (elementsBuilder_ == null) {
elements_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
elementsBuilder_.clear();
}
return this;
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public Builder removeElements(int index) {
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
elements_.remove(index);
onChanged();
} else {
elementsBuilder_.remove(index);
}
return this;
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public grpc.leaderboard._RankedElement.Builder getElementsBuilder(
int index) {
return getElementsFieldBuilder().getBuilder(index);
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public grpc.leaderboard._RankedElementOrBuilder getElementsOrBuilder(
int index) {
if (elementsBuilder_ == null) {
return elements_.get(index); } else {
return elementsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public java.util.List extends grpc.leaderboard._RankedElementOrBuilder>
getElementsOrBuilderList() {
if (elementsBuilder_ != null) {
return elementsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(elements_);
}
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public grpc.leaderboard._RankedElement.Builder addElementsBuilder() {
return getElementsFieldBuilder().addBuilder(
grpc.leaderboard._RankedElement.getDefaultInstance());
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public grpc.leaderboard._RankedElement.Builder addElementsBuilder(
int index) {
return getElementsFieldBuilder().addBuilder(
index, grpc.leaderboard._RankedElement.getDefaultInstance());
}
/**
* repeated .leaderboard._RankedElement elements = 1;
*/
public java.util.List
getElementsBuilderList() {
return getElementsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
grpc.leaderboard._RankedElement, grpc.leaderboard._RankedElement.Builder, grpc.leaderboard._RankedElementOrBuilder>
getElementsFieldBuilder() {
if (elementsBuilder_ == null) {
elementsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
grpc.leaderboard._RankedElement, grpc.leaderboard._RankedElement.Builder, grpc.leaderboard._RankedElementOrBuilder>(
elements_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
elements_ = null;
}
return elementsBuilder_;
}
@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._GetRankResponse)
}
// @@protoc_insertion_point(class_scope:leaderboard._GetRankResponse)
private static final grpc.leaderboard._GetRankResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.leaderboard._GetRankResponse();
}
public static grpc.leaderboard._GetRankResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<_GetRankResponse>
PARSER = new com.google.protobuf.AbstractParser<_GetRankResponse>() {
@java.lang.Override
public _GetRankResponse 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<_GetRankResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<_GetRankResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.leaderboard._GetRankResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}