// 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 ActivityMiningDig { /** * Protobuf type {@code ActivityMiningDigReq} */ public static final class ActivityMiningDigReq extends ProtoMessage implements Cloneable { private static final long serialVersionUID = 0L; /** * optional uint32 ActivityId = 1; */ private int activityId; /** * optional uint32 GridId = 2; */ private int gridId; /** * optional bytes NextPackage = 2047; */ private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); private ActivityMiningDigReq() { } /** * @return a new empty instance of {@code ActivityMiningDigReq} */ public static ActivityMiningDigReq newInstance() { return new ActivityMiningDigReq(); } /** * optional uint32 ActivityId = 1; * @return whether the activityId field is set */ public boolean hasActivityId() { return (bitField0_ & 0x00000001) != 0; } /** * optional uint32 ActivityId = 1; * @return this */ public ActivityMiningDigReq clearActivityId() { bitField0_ &= ~0x00000001; activityId = 0; return this; } /** * optional uint32 ActivityId = 1; * @return the activityId */ public int getActivityId() { return activityId; } /** * optional uint32 ActivityId = 1; * @param value the activityId to set * @return this */ public ActivityMiningDigReq setActivityId(final int value) { bitField0_ |= 0x00000001; activityId = value; return this; } /** * optional uint32 GridId = 2; * @return whether the gridId field is set */ public boolean hasGridId() { return (bitField0_ & 0x00000002) != 0; } /** * optional uint32 GridId = 2; * @return this */ public ActivityMiningDigReq clearGridId() { bitField0_ &= ~0x00000002; gridId = 0; return this; } /** * optional uint32 GridId = 2; * @return the gridId */ public int getGridId() { return gridId; } /** * optional uint32 GridId = 2; * @param value the gridId to set * @return this */ public ActivityMiningDigReq setGridId(final int value) { bitField0_ |= 0x00000002; gridId = 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 ActivityMiningDigReq 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 ActivityMiningDigReq addNextPackage(final byte value) { bitField0_ |= 0x00000004; nextPackage.add(value); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to add * @return this */ public ActivityMiningDigReq addAllNextPackage(final byte... values) { bitField0_ |= 0x00000004; nextPackage.addAll(values); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to set * @return this */ public ActivityMiningDigReq setNextPackage(final byte... values) { bitField0_ |= 0x00000004; nextPackage.copyFrom(values); return this; } @Override public ActivityMiningDigReq copyFrom(final ActivityMiningDigReq other) { cachedSize = other.cachedSize; if ((bitField0_ | other.bitField0_) != 0) { bitField0_ = other.bitField0_; activityId = other.activityId; gridId = other.gridId; nextPackage.copyFrom(other.nextPackage); } return this; } @Override public ActivityMiningDigReq mergeFrom(final ActivityMiningDigReq other) { if (other.isEmpty()) { return this; } cachedSize = -1; if (other.hasActivityId()) { setActivityId(other.activityId); } if (other.hasGridId()) { setGridId(other.gridId); } if (other.hasNextPackage()) { getMutableNextPackage().copyFrom(other.nextPackage); } return this; } @Override public ActivityMiningDigReq clear() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; activityId = 0; gridId = 0; nextPackage.clear(); return this; } @Override public ActivityMiningDigReq 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 ActivityMiningDigReq)) { return false; } ActivityMiningDigReq other = (ActivityMiningDigReq) o; return bitField0_ == other.bitField0_ && (!hasActivityId() || activityId == other.activityId) && (!hasGridId() || gridId == other.gridId) && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); } @Override public void writeTo(final ProtoSink output) throws IOException { if ((bitField0_ & 0x00000001) != 0) { output.writeRawByte((byte) 8); output.writeUInt32NoTag(activityId); } if ((bitField0_ & 0x00000002) != 0) { output.writeRawByte((byte) 16); output.writeUInt32NoTag(gridId); } 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(activityId); } if ((bitField0_ & 0x00000002) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(gridId); } if ((bitField0_ & 0x00000004) != 0) { size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); } return size; } @Override @SuppressWarnings("fallthrough") public ActivityMiningDigReq mergeFrom(final ProtoSource input) throws IOException { // Enabled Fall-Through Optimization (QuickBuffers) int tag = input.readTag(); while (true) { switch (tag) { case 8: { // activityId activityId = input.readUInt32(); bitField0_ |= 0x00000001; tag = input.readTag(); if (tag != 16) { break; } } case 16: { // gridId gridId = 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.activityId, activityId); } if ((bitField0_ & 0x00000002) != 0) { output.writeUInt32(FieldNames.gridId, gridId); } if ((bitField0_ & 0x00000004) != 0) { output.writeBytes(FieldNames.nextPackage, nextPackage); } output.endObject(); } @Override public ActivityMiningDigReq mergeFrom(final JsonSource input) throws IOException { if (!input.beginObject()) { return this; } while (!input.isAtEnd()) { switch (input.readFieldHash()) { case -252882774: { if (input.isAtField(FieldNames.activityId)) { if (!input.trySkipNullValue()) { activityId = input.readUInt32(); bitField0_ |= 0x00000001; } } else { input.skipUnknownField(); } break; } case 2141177633: { if (input.isAtField(FieldNames.gridId)) { if (!input.trySkipNullValue()) { gridId = 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 ActivityMiningDigReq clone() { return new ActivityMiningDigReq().copyFrom(this); } @Override public boolean isEmpty() { return ((bitField0_) == 0); } public static ActivityMiningDigReq parseFrom(final byte[] data) throws InvalidProtocolBufferException { return ProtoMessage.mergeFrom(new ActivityMiningDigReq(), data).checkInitialized(); } public static ActivityMiningDigReq parseFrom(final ProtoSource input) throws IOException { return ProtoMessage.mergeFrom(new ActivityMiningDigReq(), input).checkInitialized(); } public static ActivityMiningDigReq parseFrom(final JsonSource input) throws IOException { return ProtoMessage.mergeFrom(new ActivityMiningDigReq(), input).checkInitialized(); } /** * @return factory for creating ActivityMiningDigReq messages */ public static MessageFactory getFactory() { return ActivityMiningDigReqFactory.INSTANCE; } private enum ActivityMiningDigReqFactory implements MessageFactory { INSTANCE; @Override public ActivityMiningDigReq create() { return ActivityMiningDigReq.newInstance(); } } /** * Contains name constants used for serializing JSON */ static class FieldNames { static final FieldName activityId = FieldName.forField("ActivityId"); static final FieldName gridId = FieldName.forField("GridId"); static final FieldName nextPackage = FieldName.forField("NextPackage"); } } /** * Protobuf type {@code ActivityMiningDigResp} */ public static final class ActivityMiningDigResp extends ProtoMessage implements Cloneable { private static final long serialVersionUID = 0L; /** * optional .ChangeInfo ChangeInfo = 1; */ private final Public.ChangeInfo changeInfo = Public.ChangeInfo.newInstance(); /** * optional .MiningChangeInfo MiningChangeInfo = 2; */ private final PublicMining.MiningChangeInfo miningChangeInfo = PublicMining.MiningChangeInfo.newInstance(); /** * optional bytes NextPackage = 2047; */ private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); private ActivityMiningDigResp() { } /** * @return a new empty instance of {@code ActivityMiningDigResp} */ public static ActivityMiningDigResp newInstance() { return new ActivityMiningDigResp(); } /** * optional .ChangeInfo ChangeInfo = 1; * @return whether the changeInfo field is set */ public boolean hasChangeInfo() { return (bitField0_ & 0x00000001) != 0; } /** * optional .ChangeInfo ChangeInfo = 1; * @return this */ public ActivityMiningDigResp clearChangeInfo() { bitField0_ &= ~0x00000001; changeInfo.clear(); return this; } /** * optional .ChangeInfo ChangeInfo = 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 #getMutableChangeInfo()} if you want to modify it. * * @return internal storage object for reading */ public Public.ChangeInfo getChangeInfo() { return changeInfo; } /** * optional .ChangeInfo ChangeInfo = 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 Public.ChangeInfo getMutableChangeInfo() { bitField0_ |= 0x00000001; return changeInfo; } /** * optional .ChangeInfo ChangeInfo = 1; * @param value the changeInfo to set * @return this */ public ActivityMiningDigResp setChangeInfo(final Public.ChangeInfo value) { bitField0_ |= 0x00000001; changeInfo.copyFrom(value); return this; } /** * optional .MiningChangeInfo MiningChangeInfo = 2; * @return whether the miningChangeInfo field is set */ public boolean hasMiningChangeInfo() { return (bitField0_ & 0x00000002) != 0; } /** * optional .MiningChangeInfo MiningChangeInfo = 2; * @return this */ public ActivityMiningDigResp clearMiningChangeInfo() { bitField0_ &= ~0x00000002; miningChangeInfo.clear(); return this; } /** * optional .MiningChangeInfo MiningChangeInfo = 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 #getMutableMiningChangeInfo()} if you want to modify it. * * @return internal storage object for reading */ public PublicMining.MiningChangeInfo getMiningChangeInfo() { return miningChangeInfo; } /** * optional .MiningChangeInfo MiningChangeInfo = 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 PublicMining.MiningChangeInfo getMutableMiningChangeInfo() { bitField0_ |= 0x00000002; return miningChangeInfo; } /** * optional .MiningChangeInfo MiningChangeInfo = 2; * @param value the miningChangeInfo to set * @return this */ public ActivityMiningDigResp setMiningChangeInfo(final PublicMining.MiningChangeInfo value) { bitField0_ |= 0x00000002; miningChangeInfo.copyFrom(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 ActivityMiningDigResp 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 ActivityMiningDigResp addNextPackage(final byte value) { bitField0_ |= 0x00000004; nextPackage.add(value); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to add * @return this */ public ActivityMiningDigResp addAllNextPackage(final byte... values) { bitField0_ |= 0x00000004; nextPackage.addAll(values); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to set * @return this */ public ActivityMiningDigResp setNextPackage(final byte... values) { bitField0_ |= 0x00000004; nextPackage.copyFrom(values); return this; } @Override public ActivityMiningDigResp copyFrom(final ActivityMiningDigResp other) { cachedSize = other.cachedSize; if ((bitField0_ | other.bitField0_) != 0) { bitField0_ = other.bitField0_; changeInfo.copyFrom(other.changeInfo); miningChangeInfo.copyFrom(other.miningChangeInfo); nextPackage.copyFrom(other.nextPackage); } return this; } @Override public ActivityMiningDigResp mergeFrom(final ActivityMiningDigResp other) { if (other.isEmpty()) { return this; } cachedSize = -1; if (other.hasChangeInfo()) { getMutableChangeInfo().mergeFrom(other.changeInfo); } if (other.hasMiningChangeInfo()) { getMutableMiningChangeInfo().mergeFrom(other.miningChangeInfo); } if (other.hasNextPackage()) { getMutableNextPackage().copyFrom(other.nextPackage); } return this; } @Override public ActivityMiningDigResp clear() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; changeInfo.clear(); miningChangeInfo.clear(); nextPackage.clear(); return this; } @Override public ActivityMiningDigResp clearQuick() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; changeInfo.clearQuick(); miningChangeInfo.clearQuick(); nextPackage.clear(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ActivityMiningDigResp)) { return false; } ActivityMiningDigResp other = (ActivityMiningDigResp) o; return bitField0_ == other.bitField0_ && (!hasChangeInfo() || changeInfo.equals(other.changeInfo)) && (!hasMiningChangeInfo() || miningChangeInfo.equals(other.miningChangeInfo)) && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); } @Override public void writeTo(final ProtoSink output) throws IOException { if ((bitField0_ & 0x00000001) != 0) { output.writeRawByte((byte) 10); output.writeMessageNoTag(changeInfo); } if ((bitField0_ & 0x00000002) != 0) { output.writeRawByte((byte) 18); output.writeMessageNoTag(miningChangeInfo); } 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(changeInfo); } if ((bitField0_ & 0x00000002) != 0) { size += 1 + ProtoSink.computeMessageSizeNoTag(miningChangeInfo); } if ((bitField0_ & 0x00000004) != 0) { size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); } return size; } @Override @SuppressWarnings("fallthrough") public ActivityMiningDigResp mergeFrom(final ProtoSource input) throws IOException { // Enabled Fall-Through Optimization (QuickBuffers) int tag = input.readTag(); while (true) { switch (tag) { case 10: { // changeInfo input.readMessage(changeInfo); bitField0_ |= 0x00000001; tag = input.readTag(); if (tag != 18) { break; } } case 18: { // miningChangeInfo input.readMessage(miningChangeInfo); 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.changeInfo, changeInfo); } if ((bitField0_ & 0x00000002) != 0) { output.writeMessage(FieldNames.miningChangeInfo, miningChangeInfo); } if ((bitField0_ & 0x00000004) != 0) { output.writeBytes(FieldNames.nextPackage, nextPackage); } output.endObject(); } @Override public ActivityMiningDigResp mergeFrom(final JsonSource input) throws IOException { if (!input.beginObject()) { return this; } while (!input.isAtEnd()) { switch (input.readFieldHash()) { case -138776418: { if (input.isAtField(FieldNames.changeInfo)) { if (!input.trySkipNullValue()) { input.readMessage(changeInfo); bitField0_ |= 0x00000001; } } else { input.skipUnknownField(); } break; } case -1023670002: { if (input.isAtField(FieldNames.miningChangeInfo)) { if (!input.trySkipNullValue()) { input.readMessage(miningChangeInfo); 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 ActivityMiningDigResp clone() { return new ActivityMiningDigResp().copyFrom(this); } @Override public boolean isEmpty() { return ((bitField0_) == 0); } public static ActivityMiningDigResp parseFrom(final byte[] data) throws InvalidProtocolBufferException { return ProtoMessage.mergeFrom(new ActivityMiningDigResp(), data).checkInitialized(); } public static ActivityMiningDigResp parseFrom(final ProtoSource input) throws IOException { return ProtoMessage.mergeFrom(new ActivityMiningDigResp(), input).checkInitialized(); } public static ActivityMiningDigResp parseFrom(final JsonSource input) throws IOException { return ProtoMessage.mergeFrom(new ActivityMiningDigResp(), input).checkInitialized(); } /** * @return factory for creating ActivityMiningDigResp messages */ public static MessageFactory getFactory() { return ActivityMiningDigRespFactory.INSTANCE; } private enum ActivityMiningDigRespFactory implements MessageFactory { INSTANCE; @Override public ActivityMiningDigResp create() { return ActivityMiningDigResp.newInstance(); } } /** * Contains name constants used for serializing JSON */ static class FieldNames { static final FieldName changeInfo = FieldName.forField("ChangeInfo"); static final FieldName miningChangeInfo = FieldName.forField("MiningChangeInfo"); static final FieldName nextPackage = FieldName.forField("NextPackage"); } } }