// Code generated by protocol buffer compiler. Do not edit! package emu.nebula.proto; import java.io.IOException; import us.hebi.quickbuf.FieldName; import us.hebi.quickbuf.InvalidProtocolBufferException; import us.hebi.quickbuf.JsonSink; import us.hebi.quickbuf.JsonSource; import us.hebi.quickbuf.MessageFactory; import us.hebi.quickbuf.ProtoMessage; import us.hebi.quickbuf.ProtoSink; import us.hebi.quickbuf.ProtoSource; import us.hebi.quickbuf.RepeatedByte; public final class CharAdvanceRewardReceive { /** * Protobuf type {@code CharAdvanceRewardReceiveReq} */ public static final class CharAdvanceRewardReceiveReq extends ProtoMessage implements Cloneable { private static final long serialVersionUID = 0L; /** * optional uint32 CharId = 1; */ private int charId; /** * optional uint32 Advance = 2; */ private int advance; /** * optional bytes NextPackage = 2047; */ private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); private CharAdvanceRewardReceiveReq() { } /** * @return a new empty instance of {@code CharAdvanceRewardReceiveReq} */ public static CharAdvanceRewardReceiveReq newInstance() { return new CharAdvanceRewardReceiveReq(); } /** * optional uint32 CharId = 1; * @return whether the charId field is set */ public boolean hasCharId() { return (bitField0_ & 0x00000001) != 0; } /** * optional uint32 CharId = 1; * @return this */ public CharAdvanceRewardReceiveReq clearCharId() { bitField0_ &= ~0x00000001; charId = 0; return this; } /** * optional uint32 CharId = 1; * @return the charId */ public int getCharId() { return charId; } /** * optional uint32 CharId = 1; * @param value the charId to set * @return this */ public CharAdvanceRewardReceiveReq setCharId(final int value) { bitField0_ |= 0x00000001; charId = value; return this; } /** * optional uint32 Advance = 2; * @return whether the advance field is set */ public boolean hasAdvance() { return (bitField0_ & 0x00000002) != 0; } /** * optional uint32 Advance = 2; * @return this */ public CharAdvanceRewardReceiveReq clearAdvance() { bitField0_ &= ~0x00000002; advance = 0; return this; } /** * optional uint32 Advance = 2; * @return the advance */ public int getAdvance() { return advance; } /** * optional uint32 Advance = 2; * @param value the advance to set * @return this */ public CharAdvanceRewardReceiveReq setAdvance(final int value) { bitField0_ |= 0x00000002; advance = value; return this; } /** * optional bytes NextPackage = 2047; * @return whether the nextPackage field is set */ public boolean hasNextPackage() { return (bitField0_ & 0x00000004) != 0; } /** * optional bytes NextPackage = 2047; * @return this */ public CharAdvanceRewardReceiveReq clearNextPackage() { bitField0_ &= ~0x00000004; nextPackage.clear(); return this; } /** * optional bytes NextPackage = 2047; * * This method returns the internal storage object without modifying any has state. * The returned object should not be modified and be treated as read-only. * * Use {@link #getMutableNextPackage()} if you want to modify it. * * @return internal storage object for reading */ public RepeatedByte getNextPackage() { return nextPackage; } /** * optional bytes NextPackage = 2047; * * This method returns the internal storage object and sets the corresponding * has state. The returned object will become part of this message and its * contents may be modified as long as the has state is not cleared. * * @return internal storage object for modifications */ public RepeatedByte getMutableNextPackage() { bitField0_ |= 0x00000004; return nextPackage; } /** * optional bytes NextPackage = 2047; * @param value the nextPackage to add * @return this */ public CharAdvanceRewardReceiveReq addNextPackage(final byte value) { bitField0_ |= 0x00000004; nextPackage.add(value); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to add * @return this */ public CharAdvanceRewardReceiveReq addAllNextPackage(final byte... values) { bitField0_ |= 0x00000004; nextPackage.addAll(values); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to set * @return this */ public CharAdvanceRewardReceiveReq setNextPackage(final byte... values) { bitField0_ |= 0x00000004; nextPackage.copyFrom(values); return this; } @Override public CharAdvanceRewardReceiveReq copyFrom(final CharAdvanceRewardReceiveReq other) { cachedSize = other.cachedSize; if ((bitField0_ | other.bitField0_) != 0) { bitField0_ = other.bitField0_; charId = other.charId; advance = other.advance; nextPackage.copyFrom(other.nextPackage); } return this; } @Override public CharAdvanceRewardReceiveReq mergeFrom(final CharAdvanceRewardReceiveReq other) { if (other.isEmpty()) { return this; } cachedSize = -1; if (other.hasCharId()) { setCharId(other.charId); } if (other.hasAdvance()) { setAdvance(other.advance); } if (other.hasNextPackage()) { getMutableNextPackage().copyFrom(other.nextPackage); } return this; } @Override public CharAdvanceRewardReceiveReq clear() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; charId = 0; advance = 0; nextPackage.clear(); return this; } @Override public CharAdvanceRewardReceiveReq clearQuick() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; nextPackage.clear(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof CharAdvanceRewardReceiveReq)) { return false; } CharAdvanceRewardReceiveReq other = (CharAdvanceRewardReceiveReq) o; return bitField0_ == other.bitField0_ && (!hasCharId() || charId == other.charId) && (!hasAdvance() || advance == other.advance) && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); } @Override public void writeTo(final ProtoSink output) throws IOException { if ((bitField0_ & 0x00000001) != 0) { output.writeRawByte((byte) 8); output.writeUInt32NoTag(charId); } if ((bitField0_ & 0x00000002) != 0) { output.writeRawByte((byte) 16); output.writeUInt32NoTag(advance); } if ((bitField0_ & 0x00000004) != 0) { output.writeRawLittleEndian16((short) 32762); output.writeBytesNoTag(nextPackage); } } @Override protected int computeSerializedSize() { int size = 0; if ((bitField0_ & 0x00000001) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); } if ((bitField0_ & 0x00000002) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(advance); } if ((bitField0_ & 0x00000004) != 0) { size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); } return size; } @Override @SuppressWarnings("fallthrough") public CharAdvanceRewardReceiveReq mergeFrom(final ProtoSource input) throws IOException { // Enabled Fall-Through Optimization (QuickBuffers) int tag = input.readTag(); while (true) { switch (tag) { case 8: { // charId charId = input.readUInt32(); bitField0_ |= 0x00000001; tag = input.readTag(); if (tag != 16) { break; } } case 16: { // advance advance = input.readUInt32(); bitField0_ |= 0x00000002; tag = input.readTag(); if (tag != 16378) { break; } } case 16378: { // nextPackage input.readBytes(nextPackage); bitField0_ |= 0x00000004; tag = input.readTag(); if (tag != 0) { break; } } case 0: { return this; } default: { if (!input.skipField(tag)) { return this; } tag = input.readTag(); break; } } } } @Override public void writeTo(final JsonSink output) throws IOException { output.beginObject(); if ((bitField0_ & 0x00000001) != 0) { output.writeUInt32(FieldNames.charId, charId); } if ((bitField0_ & 0x00000002) != 0) { output.writeUInt32(FieldNames.advance, advance); } if ((bitField0_ & 0x00000004) != 0) { output.writeBytes(FieldNames.nextPackage, nextPackage); } output.endObject(); } @Override public CharAdvanceRewardReceiveReq mergeFrom(final JsonSource input) throws IOException { if (!input.beginObject()) { return this; } while (!input.isAtEnd()) { switch (input.readFieldHash()) { case 2017200945: { if (input.isAtField(FieldNames.charId)) { if (!input.trySkipNullValue()) { charId = input.readUInt32(); bitField0_ |= 0x00000001; } } else { input.skipUnknownField(); } break; } case 533086306: { if (input.isAtField(FieldNames.advance)) { if (!input.trySkipNullValue()) { advance = input.readUInt32(); bitField0_ |= 0x00000002; } } else { input.skipUnknownField(); } break; } case -2082324045: { if (input.isAtField(FieldNames.nextPackage)) { if (!input.trySkipNullValue()) { input.readBytes(nextPackage); bitField0_ |= 0x00000004; } } else { input.skipUnknownField(); } break; } default: { input.skipUnknownField(); break; } } } input.endObject(); return this; } @Override public CharAdvanceRewardReceiveReq clone() { return new CharAdvanceRewardReceiveReq().copyFrom(this); } @Override public boolean isEmpty() { return ((bitField0_) == 0); } public static CharAdvanceRewardReceiveReq parseFrom(final byte[] data) throws InvalidProtocolBufferException { return ProtoMessage.mergeFrom(new CharAdvanceRewardReceiveReq(), data).checkInitialized(); } public static CharAdvanceRewardReceiveReq parseFrom(final ProtoSource input) throws IOException { return ProtoMessage.mergeFrom(new CharAdvanceRewardReceiveReq(), input).checkInitialized(); } public static CharAdvanceRewardReceiveReq parseFrom(final JsonSource input) throws IOException { return ProtoMessage.mergeFrom(new CharAdvanceRewardReceiveReq(), input).checkInitialized(); } /** * @return factory for creating CharAdvanceRewardReceiveReq messages */ public static MessageFactory getFactory() { return CharAdvanceRewardReceiveReqFactory.INSTANCE; } private enum CharAdvanceRewardReceiveReqFactory implements MessageFactory { INSTANCE; @Override public CharAdvanceRewardReceiveReq create() { return CharAdvanceRewardReceiveReq.newInstance(); } } /** * Contains name constants used for serializing JSON */ static class FieldNames { static final FieldName charId = FieldName.forField("CharId"); static final FieldName advance = FieldName.forField("Advance"); static final FieldName nextPackage = FieldName.forField("NextPackage"); } } /** * Protobuf type {@code CharAdvanceRewardReceiveResp} */ public static final class CharAdvanceRewardReceiveResp extends ProtoMessage implements Cloneable { private static final long serialVersionUID = 0L; /** * optional .ChangeInfo Change = 2; */ private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); /** * optional bytes Flag = 1; */ private final RepeatedByte flag = RepeatedByte.newEmptyInstance(); /** * optional bytes NextPackage = 2047; */ private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); private CharAdvanceRewardReceiveResp() { } /** * @return a new empty instance of {@code CharAdvanceRewardReceiveResp} */ public static CharAdvanceRewardReceiveResp newInstance() { return new CharAdvanceRewardReceiveResp(); } /** * optional .ChangeInfo Change = 2; * @return whether the change field is set */ public boolean hasChange() { return (bitField0_ & 0x00000001) != 0; } /** * optional .ChangeInfo Change = 2; * @return this */ public CharAdvanceRewardReceiveResp clearChange() { bitField0_ &= ~0x00000001; change.clear(); return this; } /** * optional .ChangeInfo Change = 2; * * This method returns the internal storage object without modifying any has state. * The returned object should not be modified and be treated as read-only. * * Use {@link #getMutableChange()} if you want to modify it. * * @return internal storage object for reading */ public Public.ChangeInfo getChange() { return change; } /** * optional .ChangeInfo Change = 2; * * This method returns the internal storage object and sets the corresponding * has state. The returned object will become part of this message and its * contents may be modified as long as the has state is not cleared. * * @return internal storage object for modifications */ public Public.ChangeInfo getMutableChange() { bitField0_ |= 0x00000001; return change; } /** * optional .ChangeInfo Change = 2; * @param value the change to set * @return this */ public CharAdvanceRewardReceiveResp setChange(final Public.ChangeInfo value) { bitField0_ |= 0x00000001; change.copyFrom(value); return this; } /** * optional bytes Flag = 1; * @return whether the flag field is set */ public boolean hasFlag() { return (bitField0_ & 0x00000002) != 0; } /** * optional bytes Flag = 1; * @return this */ public CharAdvanceRewardReceiveResp clearFlag() { bitField0_ &= ~0x00000002; flag.clear(); return this; } /** * optional bytes Flag = 1; * * This method returns the internal storage object without modifying any has state. * The returned object should not be modified and be treated as read-only. * * Use {@link #getMutableFlag()} if you want to modify it. * * @return internal storage object for reading */ public RepeatedByte getFlag() { return flag; } /** * optional bytes Flag = 1; * * This method returns the internal storage object and sets the corresponding * has state. The returned object will become part of this message and its * contents may be modified as long as the has state is not cleared. * * @return internal storage object for modifications */ public RepeatedByte getMutableFlag() { bitField0_ |= 0x00000002; return flag; } /** * optional bytes Flag = 1; * @param value the flag to add * @return this */ public CharAdvanceRewardReceiveResp addFlag(final byte value) { bitField0_ |= 0x00000002; flag.add(value); return this; } /** * optional bytes Flag = 1; * @param values the flag to add * @return this */ public CharAdvanceRewardReceiveResp addAllFlag(final byte... values) { bitField0_ |= 0x00000002; flag.addAll(values); return this; } /** * optional bytes Flag = 1; * @param values the flag to set * @return this */ public CharAdvanceRewardReceiveResp setFlag(final byte... values) { bitField0_ |= 0x00000002; flag.copyFrom(values); return this; } /** * optional bytes NextPackage = 2047; * @return whether the nextPackage field is set */ public boolean hasNextPackage() { return (bitField0_ & 0x00000004) != 0; } /** * optional bytes NextPackage = 2047; * @return this */ public CharAdvanceRewardReceiveResp clearNextPackage() { bitField0_ &= ~0x00000004; nextPackage.clear(); return this; } /** * optional bytes NextPackage = 2047; * * This method returns the internal storage object without modifying any has state. * The returned object should not be modified and be treated as read-only. * * Use {@link #getMutableNextPackage()} if you want to modify it. * * @return internal storage object for reading */ public RepeatedByte getNextPackage() { return nextPackage; } /** * optional bytes NextPackage = 2047; * * This method returns the internal storage object and sets the corresponding * has state. The returned object will become part of this message and its * contents may be modified as long as the has state is not cleared. * * @return internal storage object for modifications */ public RepeatedByte getMutableNextPackage() { bitField0_ |= 0x00000004; return nextPackage; } /** * optional bytes NextPackage = 2047; * @param value the nextPackage to add * @return this */ public CharAdvanceRewardReceiveResp addNextPackage(final byte value) { bitField0_ |= 0x00000004; nextPackage.add(value); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to add * @return this */ public CharAdvanceRewardReceiveResp addAllNextPackage(final byte... values) { bitField0_ |= 0x00000004; nextPackage.addAll(values); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to set * @return this */ public CharAdvanceRewardReceiveResp setNextPackage(final byte... values) { bitField0_ |= 0x00000004; nextPackage.copyFrom(values); return this; } @Override public CharAdvanceRewardReceiveResp copyFrom(final CharAdvanceRewardReceiveResp other) { cachedSize = other.cachedSize; if ((bitField0_ | other.bitField0_) != 0) { bitField0_ = other.bitField0_; change.copyFrom(other.change); flag.copyFrom(other.flag); nextPackage.copyFrom(other.nextPackage); } return this; } @Override public CharAdvanceRewardReceiveResp mergeFrom(final CharAdvanceRewardReceiveResp other) { if (other.isEmpty()) { return this; } cachedSize = -1; if (other.hasChange()) { getMutableChange().mergeFrom(other.change); } if (other.hasFlag()) { getMutableFlag().copyFrom(other.flag); } if (other.hasNextPackage()) { getMutableNextPackage().copyFrom(other.nextPackage); } return this; } @Override public CharAdvanceRewardReceiveResp clear() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; change.clear(); flag.clear(); nextPackage.clear(); return this; } @Override public CharAdvanceRewardReceiveResp clearQuick() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; change.clearQuick(); flag.clear(); nextPackage.clear(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof CharAdvanceRewardReceiveResp)) { return false; } CharAdvanceRewardReceiveResp other = (CharAdvanceRewardReceiveResp) o; return bitField0_ == other.bitField0_ && (!hasChange() || change.equals(other.change)) && (!hasFlag() || flag.equals(other.flag)) && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); } @Override public void writeTo(final ProtoSink output) throws IOException { if ((bitField0_ & 0x00000001) != 0) { output.writeRawByte((byte) 18); output.writeMessageNoTag(change); } if ((bitField0_ & 0x00000002) != 0) { output.writeRawByte((byte) 10); output.writeBytesNoTag(flag); } if ((bitField0_ & 0x00000004) != 0) { output.writeRawLittleEndian16((short) 32762); output.writeBytesNoTag(nextPackage); } } @Override protected int computeSerializedSize() { int size = 0; if ((bitField0_ & 0x00000001) != 0) { size += 1 + ProtoSink.computeMessageSizeNoTag(change); } if ((bitField0_ & 0x00000002) != 0) { size += 1 + ProtoSink.computeBytesSizeNoTag(flag); } if ((bitField0_ & 0x00000004) != 0) { size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); } return size; } @Override @SuppressWarnings("fallthrough") public CharAdvanceRewardReceiveResp mergeFrom(final ProtoSource input) throws IOException { // Enabled Fall-Through Optimization (QuickBuffers) int tag = input.readTag(); while (true) { switch (tag) { case 18: { // change input.readMessage(change); bitField0_ |= 0x00000001; tag = input.readTag(); if (tag != 10) { break; } } case 10: { // flag input.readBytes(flag); bitField0_ |= 0x00000002; tag = input.readTag(); if (tag != 16378) { break; } } case 16378: { // nextPackage input.readBytes(nextPackage); bitField0_ |= 0x00000004; tag = input.readTag(); if (tag != 0) { break; } } case 0: { return this; } default: { if (!input.skipField(tag)) { return this; } tag = input.readTag(); break; } } } } @Override public void writeTo(final JsonSink output) throws IOException { output.beginObject(); if ((bitField0_ & 0x00000001) != 0) { output.writeMessage(FieldNames.change, change); } if ((bitField0_ & 0x00000002) != 0) { output.writeBytes(FieldNames.flag, flag); } if ((bitField0_ & 0x00000004) != 0) { output.writeBytes(FieldNames.nextPackage, nextPackage); } output.endObject(); } @Override public CharAdvanceRewardReceiveResp mergeFrom(final JsonSource input) throws IOException { if (!input.beginObject()) { return this; } while (!input.isAtEnd()) { switch (input.readFieldHash()) { case 2017198032: { if (input.isAtField(FieldNames.change)) { if (!input.trySkipNullValue()) { input.readMessage(change); bitField0_ |= 0x00000001; } } else { input.skipUnknownField(); } break; } case 2192268: { if (input.isAtField(FieldNames.flag)) { if (!input.trySkipNullValue()) { input.readBytes(flag); bitField0_ |= 0x00000002; } } else { input.skipUnknownField(); } break; } case -2082324045: { if (input.isAtField(FieldNames.nextPackage)) { if (!input.trySkipNullValue()) { input.readBytes(nextPackage); bitField0_ |= 0x00000004; } } else { input.skipUnknownField(); } break; } default: { input.skipUnknownField(); break; } } } input.endObject(); return this; } @Override public CharAdvanceRewardReceiveResp clone() { return new CharAdvanceRewardReceiveResp().copyFrom(this); } @Override public boolean isEmpty() { return ((bitField0_) == 0); } public static CharAdvanceRewardReceiveResp parseFrom(final byte[] data) throws InvalidProtocolBufferException { return ProtoMessage.mergeFrom(new CharAdvanceRewardReceiveResp(), data).checkInitialized(); } public static CharAdvanceRewardReceiveResp parseFrom(final ProtoSource input) throws IOException { return ProtoMessage.mergeFrom(new CharAdvanceRewardReceiveResp(), input).checkInitialized(); } public static CharAdvanceRewardReceiveResp parseFrom(final JsonSource input) throws IOException { return ProtoMessage.mergeFrom(new CharAdvanceRewardReceiveResp(), input).checkInitialized(); } /** * @return factory for creating CharAdvanceRewardReceiveResp messages */ public static MessageFactory getFactory() { return CharAdvanceRewardReceiveRespFactory.INSTANCE; } private enum CharAdvanceRewardReceiveRespFactory implements MessageFactory { INSTANCE; @Override public CharAdvanceRewardReceiveResp create() { return CharAdvanceRewardReceiveResp.newInstance(); } } /** * Contains name constants used for serializing JSON */ static class FieldNames { static final FieldName change = FieldName.forField("Change"); static final FieldName flag = FieldName.forField("Flag"); static final FieldName nextPackage = FieldName.forField("NextPackage"); } } }