All Downloads are FREE. Search and download functionalities are using the official Maven repository.

grpc.leaderboard._Element Maven / Gradle / Ivy

There is a newer version: 0.119.5
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: leaderboard.proto

package grpc.leaderboard;

/**
 * 
 * Leaderboards are made up of many of these.
 * 
* * Protobuf type {@code leaderboard._Element} */ public final class _Element extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:leaderboard._Element) _ElementOrBuilder { private static final long serialVersionUID = 0L; // Use _Element.newBuilder() to construct. private _Element(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private _Element() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new _Element(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return grpc.leaderboard.LeaderboardOuterClass.internal_static_leaderboard__Element_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return grpc.leaderboard.LeaderboardOuterClass.internal_static_leaderboard__Element_fieldAccessorTable .ensureFieldAccessorsInitialized( grpc.leaderboard._Element.class, grpc.leaderboard._Element.Builder.class); } public static final int ID_FIELD_NUMBER = 1; private int id_ = 0; /** *
   * A player identifier, session identifier, browser identifier or whatever other kind of
   * identifier you use for this scoreboard. The full unsigned 64 bit range is allowed here,
   * between 0 and 2^63-1 inclusive.
   * An id can only appear in a leaderboard one time. You can't have 2 scores for 1 player,
   * unless that player has 2 ids!
   * 
* * uint32 id = 1; * @return The id. */ @java.lang.Override public int getId() { return id_; } public static final int SCORE_FIELD_NUMBER = 3; private double score_ = 0D; /** *
   * The value by which this element is sorted within the leaderboard.
   * 
* * double score = 3; * @return The score. */ @java.lang.Override public double getScore() { return score_; } 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 (id_ != 0) { output.writeUInt32(1, id_); } if (java.lang.Double.doubleToRawLongBits(score_) != 0) { output.writeDouble(3, score_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (id_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, id_); } if (java.lang.Double.doubleToRawLongBits(score_) != 0) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(3, score_); } 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._Element)) { return super.equals(obj); } grpc.leaderboard._Element other = (grpc.leaderboard._Element) obj; if (getId() != other.getId()) return false; if (java.lang.Double.doubleToLongBits(getScore()) != java.lang.Double.doubleToLongBits( other.getScore())) 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) + ID_FIELD_NUMBER; hash = (53 * hash) + getId(); hash = (37 * hash) + SCORE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getScore())); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static grpc.leaderboard._Element parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static grpc.leaderboard._Element parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static grpc.leaderboard._Element parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static grpc.leaderboard._Element 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._Element parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static grpc.leaderboard._Element parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static grpc.leaderboard._Element parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static grpc.leaderboard._Element 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._Element parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static grpc.leaderboard._Element 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._Element parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static grpc.leaderboard._Element 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._Element 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; } /** *
   * Leaderboards are made up of many of these.
   * 
* * Protobuf type {@code leaderboard._Element} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:leaderboard._Element) grpc.leaderboard._ElementOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return grpc.leaderboard.LeaderboardOuterClass.internal_static_leaderboard__Element_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return grpc.leaderboard.LeaderboardOuterClass.internal_static_leaderboard__Element_fieldAccessorTable .ensureFieldAccessorsInitialized( grpc.leaderboard._Element.class, grpc.leaderboard._Element.Builder.class); } // Construct using grpc.leaderboard._Element.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; id_ = 0; score_ = 0D; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return grpc.leaderboard.LeaderboardOuterClass.internal_static_leaderboard__Element_descriptor; } @java.lang.Override public grpc.leaderboard._Element getDefaultInstanceForType() { return grpc.leaderboard._Element.getDefaultInstance(); } @java.lang.Override public grpc.leaderboard._Element build() { grpc.leaderboard._Element result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public grpc.leaderboard._Element buildPartial() { grpc.leaderboard._Element result = new grpc.leaderboard._Element(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(grpc.leaderboard._Element result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.id_ = id_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.score_ = score_; } } @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._Element) { return mergeFrom((grpc.leaderboard._Element)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(grpc.leaderboard._Element other) { if (other == grpc.leaderboard._Element.getDefaultInstance()) return this; if (other.getId() != 0) { setId(other.getId()); } if (other.getScore() != 0D) { setScore(other.getScore()); } 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: { id_ = input.readUInt32(); bitField0_ |= 0x00000001; break; } // case 8 case 25: { score_ = input.readDouble(); bitField0_ |= 0x00000002; break; } // case 25 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 id_ ; /** *
     * A player identifier, session identifier, browser identifier or whatever other kind of
     * identifier you use for this scoreboard. The full unsigned 64 bit range is allowed here,
     * between 0 and 2^63-1 inclusive.
     * An id can only appear in a leaderboard one time. You can't have 2 scores for 1 player,
     * unless that player has 2 ids!
     * 
* * uint32 id = 1; * @return The id. */ @java.lang.Override public int getId() { return id_; } /** *
     * A player identifier, session identifier, browser identifier or whatever other kind of
     * identifier you use for this scoreboard. The full unsigned 64 bit range is allowed here,
     * between 0 and 2^63-1 inclusive.
     * An id can only appear in a leaderboard one time. You can't have 2 scores for 1 player,
     * unless that player has 2 ids!
     * 
* * uint32 id = 1; * @param value The id to set. * @return This builder for chaining. */ public Builder setId(int value) { id_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * A player identifier, session identifier, browser identifier or whatever other kind of
     * identifier you use for this scoreboard. The full unsigned 64 bit range is allowed here,
     * between 0 and 2^63-1 inclusive.
     * An id can only appear in a leaderboard one time. You can't have 2 scores for 1 player,
     * unless that player has 2 ids!
     * 
* * uint32 id = 1; * @return This builder for chaining. */ public Builder clearId() { bitField0_ = (bitField0_ & ~0x00000001); id_ = 0; onChanged(); return this; } private double score_ ; /** *
     * The value by which this element is sorted within the leaderboard.
     * 
* * double score = 3; * @return The score. */ @java.lang.Override public double getScore() { return score_; } /** *
     * The value by which this element is sorted within the leaderboard.
     * 
* * double score = 3; * @param value The score to set. * @return This builder for chaining. */ public Builder setScore(double value) { score_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * The value by which this element is sorted within the leaderboard.
     * 
* * double score = 3; * @return This builder for chaining. */ public Builder clearScore() { bitField0_ = (bitField0_ & ~0x00000002); score_ = 0D; 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._Element) } // @@protoc_insertion_point(class_scope:leaderboard._Element) private static final grpc.leaderboard._Element DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new grpc.leaderboard._Element(); } public static grpc.leaderboard._Element getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<_Element> PARSER = new com.google.protobuf.AbstractParser<_Element>() { @java.lang.Override public _Element 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<_Element> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<_Element> getParserForType() { return PARSER; } @java.lang.Override public grpc.leaderboard._Element getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy