// 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; import us.hebi.quickbuf.RepeatedMessage; import us.hebi.quickbuf.Utf8String; public final class PublicJointDrill { /** * Protobuf type {@code ActivityJointDrill} */ public static final class ActivityJointDrill extends ProtoMessage implements Cloneable { private static final long serialVersionUID = 0L; /** * optional .JointDrillMeta Meta = 1; */ private final JointDrillMeta meta = JointDrillMeta.newInstance(); /** * optional bytes NextPackage = 2047; */ private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); /** * repeated .JointDrillLevel PassedLevels = 2; */ private final RepeatedMessage passedLevels = RepeatedMessage.newEmptyInstance(JointDrillLevel.getFactory()); /** * repeated .ActivityQuest Quests = 3; */ private final RepeatedMessage quests = RepeatedMessage.newEmptyInstance(Public.ActivityQuest.getFactory()); private ActivityJointDrill() { } /** * @return a new empty instance of {@code ActivityJointDrill} */ public static ActivityJointDrill newInstance() { return new ActivityJointDrill(); } /** * optional .JointDrillMeta Meta = 1; * @return whether the meta field is set */ public boolean hasMeta() { return (bitField0_ & 0x00000001) != 0; } /** * optional .JointDrillMeta Meta = 1; * @return this */ public ActivityJointDrill clearMeta() { bitField0_ &= ~0x00000001; meta.clear(); return this; } /** * optional .JointDrillMeta Meta = 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 #getMutableMeta()} if you want to modify it. * * @return internal storage object for reading */ public JointDrillMeta getMeta() { return meta; } /** * optional .JointDrillMeta Meta = 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 JointDrillMeta getMutableMeta() { bitField0_ |= 0x00000001; return meta; } /** * optional .JointDrillMeta Meta = 1; * @param value the meta to set * @return this */ public ActivityJointDrill setMeta(final JointDrillMeta value) { bitField0_ |= 0x00000001; meta.copyFrom(value); return this; } /** * optional bytes NextPackage = 2047; * @return whether the nextPackage field is set */ public boolean hasNextPackage() { return (bitField0_ & 0x00000002) != 0; } /** * optional bytes NextPackage = 2047; * @return this */ public ActivityJointDrill clearNextPackage() { bitField0_ &= ~0x00000002; 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_ |= 0x00000002; return nextPackage; } /** * optional bytes NextPackage = 2047; * @param value the nextPackage to add * @return this */ public ActivityJointDrill addNextPackage(final byte value) { bitField0_ |= 0x00000002; nextPackage.add(value); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to add * @return this */ public ActivityJointDrill addAllNextPackage(final byte... values) { bitField0_ |= 0x00000002; nextPackage.addAll(values); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to set * @return this */ public ActivityJointDrill setNextPackage(final byte... values) { bitField0_ |= 0x00000002; nextPackage.copyFrom(values); return this; } /** * repeated .JointDrillLevel PassedLevels = 2; * @return whether the passedLevels field is set */ public boolean hasPassedLevels() { return (bitField0_ & 0x00000004) != 0; } /** * repeated .JointDrillLevel PassedLevels = 2; * @return this */ public ActivityJointDrill clearPassedLevels() { bitField0_ &= ~0x00000004; passedLevels.clear(); return this; } /** * repeated .JointDrillLevel PassedLevels = 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 #getMutablePassedLevels()} if you want to modify it. * * @return internal storage object for reading */ public RepeatedMessage getPassedLevels() { return passedLevels; } /** * repeated .JointDrillLevel PassedLevels = 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 RepeatedMessage getMutablePassedLevels() { bitField0_ |= 0x00000004; return passedLevels; } /** * repeated .JointDrillLevel PassedLevels = 2; * @param value the passedLevels to add * @return this */ public ActivityJointDrill addPassedLevels(final JointDrillLevel value) { bitField0_ |= 0x00000004; passedLevels.add(value); return this; } /** * repeated .JointDrillLevel PassedLevels = 2; * @param values the passedLevels to add * @return this */ public ActivityJointDrill addAllPassedLevels(final JointDrillLevel... values) { bitField0_ |= 0x00000004; passedLevels.addAll(values); return this; } /** * repeated .ActivityQuest Quests = 3; * @return whether the quests field is set */ public boolean hasQuests() { return (bitField0_ & 0x00000008) != 0; } /** * repeated .ActivityQuest Quests = 3; * @return this */ public ActivityJointDrill clearQuests() { bitField0_ &= ~0x00000008; quests.clear(); return this; } /** * repeated .ActivityQuest Quests = 3; * * 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 #getMutableQuests()} if you want to modify it. * * @return internal storage object for reading */ public RepeatedMessage getQuests() { return quests; } /** * repeated .ActivityQuest Quests = 3; * * 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 RepeatedMessage getMutableQuests() { bitField0_ |= 0x00000008; return quests; } /** * repeated .ActivityQuest Quests = 3; * @param value the quests to add * @return this */ public ActivityJointDrill addQuests(final Public.ActivityQuest value) { bitField0_ |= 0x00000008; quests.add(value); return this; } /** * repeated .ActivityQuest Quests = 3; * @param values the quests to add * @return this */ public ActivityJointDrill addAllQuests(final Public.ActivityQuest... values) { bitField0_ |= 0x00000008; quests.addAll(values); return this; } @Override public ActivityJointDrill copyFrom(final ActivityJointDrill other) { cachedSize = other.cachedSize; if ((bitField0_ | other.bitField0_) != 0) { bitField0_ = other.bitField0_; meta.copyFrom(other.meta); nextPackage.copyFrom(other.nextPackage); passedLevels.copyFrom(other.passedLevels); quests.copyFrom(other.quests); } return this; } @Override public ActivityJointDrill mergeFrom(final ActivityJointDrill other) { if (other.isEmpty()) { return this; } cachedSize = -1; if (other.hasMeta()) { getMutableMeta().mergeFrom(other.meta); } if (other.hasNextPackage()) { getMutableNextPackage().copyFrom(other.nextPackage); } if (other.hasPassedLevels()) { getMutablePassedLevels().addAll(other.passedLevels); } if (other.hasQuests()) { getMutableQuests().addAll(other.quests); } return this; } @Override public ActivityJointDrill clear() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; meta.clear(); nextPackage.clear(); passedLevels.clear(); quests.clear(); return this; } @Override public ActivityJointDrill clearQuick() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; meta.clearQuick(); nextPackage.clear(); passedLevels.clearQuick(); quests.clearQuick(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ActivityJointDrill)) { return false; } ActivityJointDrill other = (ActivityJointDrill) o; return bitField0_ == other.bitField0_ && (!hasMeta() || meta.equals(other.meta)) && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) && (!hasPassedLevels() || passedLevels.equals(other.passedLevels)) && (!hasQuests() || quests.equals(other.quests)); } @Override public void writeTo(final ProtoSink output) throws IOException { if ((bitField0_ & 0x00000001) != 0) { output.writeRawByte((byte) 10); output.writeMessageNoTag(meta); } if ((bitField0_ & 0x00000002) != 0) { output.writeRawLittleEndian16((short) 32762); output.writeBytesNoTag(nextPackage); } if ((bitField0_ & 0x00000004) != 0) { for (int i = 0; i < passedLevels.length(); i++) { output.writeRawByte((byte) 18); output.writeMessageNoTag(passedLevels.get(i)); } } if ((bitField0_ & 0x00000008) != 0) { for (int i = 0; i < quests.length(); i++) { output.writeRawByte((byte) 26); output.writeMessageNoTag(quests.get(i)); } } } @Override protected int computeSerializedSize() { int size = 0; if ((bitField0_ & 0x00000001) != 0) { size += 1 + ProtoSink.computeMessageSizeNoTag(meta); } if ((bitField0_ & 0x00000002) != 0) { size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); } if ((bitField0_ & 0x00000004) != 0) { size += (1 * passedLevels.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(passedLevels); } if ((bitField0_ & 0x00000008) != 0) { size += (1 * quests.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(quests); } return size; } @Override @SuppressWarnings("fallthrough") public ActivityJointDrill mergeFrom(final ProtoSource input) throws IOException { // Enabled Fall-Through Optimization (QuickBuffers) int tag = input.readTag(); while (true) { switch (tag) { case 10: { // meta input.readMessage(meta); bitField0_ |= 0x00000001; tag = input.readTag(); if (tag != 16378) { break; } } case 16378: { // nextPackage input.readBytes(nextPackage); bitField0_ |= 0x00000002; tag = input.readTag(); if (tag != 18) { break; } } case 18: { // passedLevels tag = input.readRepeatedMessage(passedLevels, tag); bitField0_ |= 0x00000004; if (tag != 26) { break; } } case 26: { // quests tag = input.readRepeatedMessage(quests, tag); bitField0_ |= 0x00000008; 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.meta, meta); } if ((bitField0_ & 0x00000002) != 0) { output.writeBytes(FieldNames.nextPackage, nextPackage); } if ((bitField0_ & 0x00000004) != 0) { output.writeRepeatedMessage(FieldNames.passedLevels, passedLevels); } if ((bitField0_ & 0x00000008) != 0) { output.writeRepeatedMessage(FieldNames.quests, quests); } output.endObject(); } @Override public ActivityJointDrill mergeFrom(final JsonSource input) throws IOException { if (!input.beginObject()) { return this; } while (!input.isAtEnd()) { switch (input.readFieldHash()) { case 2394661: { if (input.isAtField(FieldNames.meta)) { if (!input.trySkipNullValue()) { input.readMessage(meta); bitField0_ |= 0x00000001; } } else { input.skipUnknownField(); } break; } case -2082324045: { if (input.isAtField(FieldNames.nextPackage)) { if (!input.trySkipNullValue()) { input.readBytes(nextPackage); bitField0_ |= 0x00000002; } } else { input.skipUnknownField(); } break; } case 1461957151: { if (input.isAtField(FieldNames.passedLevels)) { if (!input.trySkipNullValue()) { input.readRepeatedMessage(passedLevels); bitField0_ |= 0x00000004; } } else { input.skipUnknownField(); } break; } case -1864830991: { if (input.isAtField(FieldNames.quests)) { if (!input.trySkipNullValue()) { input.readRepeatedMessage(quests); bitField0_ |= 0x00000008; } } else { input.skipUnknownField(); } break; } default: { input.skipUnknownField(); break; } } } input.endObject(); return this; } @Override public ActivityJointDrill clone() { return new ActivityJointDrill().copyFrom(this); } @Override public boolean isEmpty() { return ((bitField0_) == 0); } public static ActivityJointDrill parseFrom(final byte[] data) throws InvalidProtocolBufferException { return ProtoMessage.mergeFrom(new ActivityJointDrill(), data).checkInitialized(); } public static ActivityJointDrill parseFrom(final ProtoSource input) throws IOException { return ProtoMessage.mergeFrom(new ActivityJointDrill(), input).checkInitialized(); } public static ActivityJointDrill parseFrom(final JsonSource input) throws IOException { return ProtoMessage.mergeFrom(new ActivityJointDrill(), input).checkInitialized(); } /** * @return factory for creating ActivityJointDrill messages */ public static MessageFactory getFactory() { return ActivityJointDrillFactory.INSTANCE; } private enum ActivityJointDrillFactory implements MessageFactory { INSTANCE; @Override public ActivityJointDrill create() { return ActivityJointDrill.newInstance(); } } /** * Contains name constants used for serializing JSON */ static class FieldNames { static final FieldName meta = FieldName.forField("Meta"); static final FieldName nextPackage = FieldName.forField("NextPackage"); static final FieldName passedLevels = FieldName.forField("PassedLevels"); static final FieldName quests = FieldName.forField("Quests"); } } /** * Protobuf type {@code JointDrillMeta} */ public static final class JointDrillMeta extends ProtoMessage implements Cloneable { private static final long serialVersionUID = 0L; /** * optional int64 StartTime = 3; */ private long startTime; /** * optional uint32 LevelId = 1; */ private int levelId; /** * optional uint32 Floor = 2; */ private int floor; /** * optional uint32 BossHP = 4; */ private int bossHP; /** * optional uint32 BossHPMax = 5; */ private int bossHPMax; /** * optional uint32 TotalScore = 9; */ private int totalScore; /** * optional bool Simulate = 8; */ private boolean simulate; /** * optional bytes Record = 6; */ private final RepeatedByte record = RepeatedByte.newEmptyInstance(); /** * optional bytes NextPackage = 2047; */ private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); /** * repeated .JointDrillTeam Teams = 7; */ private final RepeatedMessage teams = RepeatedMessage.newEmptyInstance(JointDrillTeam.getFactory()); private JointDrillMeta() { } /** * @return a new empty instance of {@code JointDrillMeta} */ public static JointDrillMeta newInstance() { return new JointDrillMeta(); } /** * optional int64 StartTime = 3; * @return whether the startTime field is set */ public boolean hasStartTime() { return (bitField0_ & 0x00000001) != 0; } /** * optional int64 StartTime = 3; * @return this */ public JointDrillMeta clearStartTime() { bitField0_ &= ~0x00000001; startTime = 0L; return this; } /** * optional int64 StartTime = 3; * @return the startTime */ public long getStartTime() { return startTime; } /** * optional int64 StartTime = 3; * @param value the startTime to set * @return this */ public JointDrillMeta setStartTime(final long value) { bitField0_ |= 0x00000001; startTime = value; return this; } /** * optional uint32 LevelId = 1; * @return whether the levelId field is set */ public boolean hasLevelId() { return (bitField0_ & 0x00000002) != 0; } /** * optional uint32 LevelId = 1; * @return this */ public JointDrillMeta clearLevelId() { bitField0_ &= ~0x00000002; levelId = 0; return this; } /** * optional uint32 LevelId = 1; * @return the levelId */ public int getLevelId() { return levelId; } /** * optional uint32 LevelId = 1; * @param value the levelId to set * @return this */ public JointDrillMeta setLevelId(final int value) { bitField0_ |= 0x00000002; levelId = value; return this; } /** * optional uint32 Floor = 2; * @return whether the floor field is set */ public boolean hasFloor() { return (bitField0_ & 0x00000004) != 0; } /** * optional uint32 Floor = 2; * @return this */ public JointDrillMeta clearFloor() { bitField0_ &= ~0x00000004; floor = 0; return this; } /** * optional uint32 Floor = 2; * @return the floor */ public int getFloor() { return floor; } /** * optional uint32 Floor = 2; * @param value the floor to set * @return this */ public JointDrillMeta setFloor(final int value) { bitField0_ |= 0x00000004; floor = value; return this; } /** * optional uint32 BossHP = 4; * @return whether the bossHP field is set */ public boolean hasBossHP() { return (bitField0_ & 0x00000008) != 0; } /** * optional uint32 BossHP = 4; * @return this */ public JointDrillMeta clearBossHP() { bitField0_ &= ~0x00000008; bossHP = 0; return this; } /** * optional uint32 BossHP = 4; * @return the bossHP */ public int getBossHP() { return bossHP; } /** * optional uint32 BossHP = 4; * @param value the bossHP to set * @return this */ public JointDrillMeta setBossHP(final int value) { bitField0_ |= 0x00000008; bossHP = value; return this; } /** * optional uint32 BossHPMax = 5; * @return whether the bossHPMax field is set */ public boolean hasBossHPMax() { return (bitField0_ & 0x00000010) != 0; } /** * optional uint32 BossHPMax = 5; * @return this */ public JointDrillMeta clearBossHPMax() { bitField0_ &= ~0x00000010; bossHPMax = 0; return this; } /** * optional uint32 BossHPMax = 5; * @return the bossHPMax */ public int getBossHPMax() { return bossHPMax; } /** * optional uint32 BossHPMax = 5; * @param value the bossHPMax to set * @return this */ public JointDrillMeta setBossHPMax(final int value) { bitField0_ |= 0x00000010; bossHPMax = value; return this; } /** * optional uint32 TotalScore = 9; * @return whether the totalScore field is set */ public boolean hasTotalScore() { return (bitField0_ & 0x00000020) != 0; } /** * optional uint32 TotalScore = 9; * @return this */ public JointDrillMeta clearTotalScore() { bitField0_ &= ~0x00000020; totalScore = 0; return this; } /** * optional uint32 TotalScore = 9; * @return the totalScore */ public int getTotalScore() { return totalScore; } /** * optional uint32 TotalScore = 9; * @param value the totalScore to set * @return this */ public JointDrillMeta setTotalScore(final int value) { bitField0_ |= 0x00000020; totalScore = value; return this; } /** * optional bool Simulate = 8; * @return whether the simulate field is set */ public boolean hasSimulate() { return (bitField0_ & 0x00000040) != 0; } /** * optional bool Simulate = 8; * @return this */ public JointDrillMeta clearSimulate() { bitField0_ &= ~0x00000040; simulate = false; return this; } /** * optional bool Simulate = 8; * @return the simulate */ public boolean getSimulate() { return simulate; } /** * optional bool Simulate = 8; * @param value the simulate to set * @return this */ public JointDrillMeta setSimulate(final boolean value) { bitField0_ |= 0x00000040; simulate = value; return this; } /** * optional bytes Record = 6; * @return whether the record field is set */ public boolean hasRecord() { return (bitField0_ & 0x00000080) != 0; } /** * optional bytes Record = 6; * @return this */ public JointDrillMeta clearRecord() { bitField0_ &= ~0x00000080; record.clear(); return this; } /** * optional bytes Record = 6; * * 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 #getMutableRecord()} if you want to modify it. * * @return internal storage object for reading */ public RepeatedByte getRecord() { return record; } /** * optional bytes Record = 6; * * 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 getMutableRecord() { bitField0_ |= 0x00000080; return record; } /** * optional bytes Record = 6; * @param value the record to add * @return this */ public JointDrillMeta addRecord(final byte value) { bitField0_ |= 0x00000080; record.add(value); return this; } /** * optional bytes Record = 6; * @param values the record to add * @return this */ public JointDrillMeta addAllRecord(final byte... values) { bitField0_ |= 0x00000080; record.addAll(values); return this; } /** * optional bytes Record = 6; * @param values the record to set * @return this */ public JointDrillMeta setRecord(final byte... values) { bitField0_ |= 0x00000080; record.copyFrom(values); return this; } /** * optional bytes NextPackage = 2047; * @return whether the nextPackage field is set */ public boolean hasNextPackage() { return (bitField0_ & 0x00000100) != 0; } /** * optional bytes NextPackage = 2047; * @return this */ public JointDrillMeta clearNextPackage() { bitField0_ &= ~0x00000100; 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_ |= 0x00000100; return nextPackage; } /** * optional bytes NextPackage = 2047; * @param value the nextPackage to add * @return this */ public JointDrillMeta addNextPackage(final byte value) { bitField0_ |= 0x00000100; nextPackage.add(value); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to add * @return this */ public JointDrillMeta addAllNextPackage(final byte... values) { bitField0_ |= 0x00000100; nextPackage.addAll(values); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to set * @return this */ public JointDrillMeta setNextPackage(final byte... values) { bitField0_ |= 0x00000100; nextPackage.copyFrom(values); return this; } /** * repeated .JointDrillTeam Teams = 7; * @return whether the teams field is set */ public boolean hasTeams() { return (bitField0_ & 0x00000200) != 0; } /** * repeated .JointDrillTeam Teams = 7; * @return this */ public JointDrillMeta clearTeams() { bitField0_ &= ~0x00000200; teams.clear(); return this; } /** * repeated .JointDrillTeam Teams = 7; * * 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 #getMutableTeams()} if you want to modify it. * * @return internal storage object for reading */ public RepeatedMessage getTeams() { return teams; } /** * repeated .JointDrillTeam Teams = 7; * * 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 RepeatedMessage getMutableTeams() { bitField0_ |= 0x00000200; return teams; } /** * repeated .JointDrillTeam Teams = 7; * @param value the teams to add * @return this */ public JointDrillMeta addTeams(final JointDrillTeam value) { bitField0_ |= 0x00000200; teams.add(value); return this; } /** * repeated .JointDrillTeam Teams = 7; * @param values the teams to add * @return this */ public JointDrillMeta addAllTeams(final JointDrillTeam... values) { bitField0_ |= 0x00000200; teams.addAll(values); return this; } @Override public JointDrillMeta copyFrom(final JointDrillMeta other) { cachedSize = other.cachedSize; if ((bitField0_ | other.bitField0_) != 0) { bitField0_ = other.bitField0_; startTime = other.startTime; levelId = other.levelId; floor = other.floor; bossHP = other.bossHP; bossHPMax = other.bossHPMax; totalScore = other.totalScore; simulate = other.simulate; record.copyFrom(other.record); nextPackage.copyFrom(other.nextPackage); teams.copyFrom(other.teams); } return this; } @Override public JointDrillMeta mergeFrom(final JointDrillMeta other) { if (other.isEmpty()) { return this; } cachedSize = -1; if (other.hasStartTime()) { setStartTime(other.startTime); } if (other.hasLevelId()) { setLevelId(other.levelId); } if (other.hasFloor()) { setFloor(other.floor); } if (other.hasBossHP()) { setBossHP(other.bossHP); } if (other.hasBossHPMax()) { setBossHPMax(other.bossHPMax); } if (other.hasTotalScore()) { setTotalScore(other.totalScore); } if (other.hasSimulate()) { setSimulate(other.simulate); } if (other.hasRecord()) { getMutableRecord().copyFrom(other.record); } if (other.hasNextPackage()) { getMutableNextPackage().copyFrom(other.nextPackage); } if (other.hasTeams()) { getMutableTeams().addAll(other.teams); } return this; } @Override public JointDrillMeta clear() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; startTime = 0L; levelId = 0; floor = 0; bossHP = 0; bossHPMax = 0; totalScore = 0; simulate = false; record.clear(); nextPackage.clear(); teams.clear(); return this; } @Override public JointDrillMeta clearQuick() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; record.clear(); nextPackage.clear(); teams.clearQuick(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof JointDrillMeta)) { return false; } JointDrillMeta other = (JointDrillMeta) o; return bitField0_ == other.bitField0_ && (!hasStartTime() || startTime == other.startTime) && (!hasLevelId() || levelId == other.levelId) && (!hasFloor() || floor == other.floor) && (!hasBossHP() || bossHP == other.bossHP) && (!hasBossHPMax() || bossHPMax == other.bossHPMax) && (!hasTotalScore() || totalScore == other.totalScore) && (!hasSimulate() || simulate == other.simulate) && (!hasRecord() || record.equals(other.record)) && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) && (!hasTeams() || teams.equals(other.teams)); } @Override public void writeTo(final ProtoSink output) throws IOException { if ((bitField0_ & 0x00000001) != 0) { output.writeRawByte((byte) 24); output.writeInt64NoTag(startTime); } if ((bitField0_ & 0x00000002) != 0) { output.writeRawByte((byte) 8); output.writeUInt32NoTag(levelId); } if ((bitField0_ & 0x00000004) != 0) { output.writeRawByte((byte) 16); output.writeUInt32NoTag(floor); } if ((bitField0_ & 0x00000008) != 0) { output.writeRawByte((byte) 32); output.writeUInt32NoTag(bossHP); } if ((bitField0_ & 0x00000010) != 0) { output.writeRawByte((byte) 40); output.writeUInt32NoTag(bossHPMax); } if ((bitField0_ & 0x00000020) != 0) { output.writeRawByte((byte) 72); output.writeUInt32NoTag(totalScore); } if ((bitField0_ & 0x00000040) != 0) { output.writeRawByte((byte) 64); output.writeBoolNoTag(simulate); } if ((bitField0_ & 0x00000080) != 0) { output.writeRawByte((byte) 50); output.writeBytesNoTag(record); } if ((bitField0_ & 0x00000100) != 0) { output.writeRawLittleEndian16((short) 32762); output.writeBytesNoTag(nextPackage); } if ((bitField0_ & 0x00000200) != 0) { for (int i = 0; i < teams.length(); i++) { output.writeRawByte((byte) 58); output.writeMessageNoTag(teams.get(i)); } } } @Override protected int computeSerializedSize() { int size = 0; if ((bitField0_ & 0x00000001) != 0) { size += 1 + ProtoSink.computeInt64SizeNoTag(startTime); } if ((bitField0_ & 0x00000002) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId); } if ((bitField0_ & 0x00000004) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(floor); } if ((bitField0_ & 0x00000008) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(bossHP); } if ((bitField0_ & 0x00000010) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(bossHPMax); } if ((bitField0_ & 0x00000020) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(totalScore); } if ((bitField0_ & 0x00000040) != 0) { size += 2; } if ((bitField0_ & 0x00000080) != 0) { size += 1 + ProtoSink.computeBytesSizeNoTag(record); } if ((bitField0_ & 0x00000100) != 0) { size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); } if ((bitField0_ & 0x00000200) != 0) { size += (1 * teams.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(teams); } return size; } @Override @SuppressWarnings("fallthrough") public JointDrillMeta mergeFrom(final ProtoSource input) throws IOException { // Enabled Fall-Through Optimization (QuickBuffers) int tag = input.readTag(); while (true) { switch (tag) { case 24: { // startTime startTime = input.readInt64(); bitField0_ |= 0x00000001; tag = input.readTag(); if (tag != 8) { break; } } case 8: { // levelId levelId = input.readUInt32(); bitField0_ |= 0x00000002; tag = input.readTag(); if (tag != 16) { break; } } case 16: { // floor floor = input.readUInt32(); bitField0_ |= 0x00000004; tag = input.readTag(); if (tag != 32) { break; } } case 32: { // bossHP bossHP = input.readUInt32(); bitField0_ |= 0x00000008; tag = input.readTag(); if (tag != 40) { break; } } case 40: { // bossHPMax bossHPMax = input.readUInt32(); bitField0_ |= 0x00000010; tag = input.readTag(); if (tag != 72) { break; } } case 72: { // totalScore totalScore = input.readUInt32(); bitField0_ |= 0x00000020; tag = input.readTag(); if (tag != 64) { break; } } case 64: { // simulate simulate = input.readBool(); bitField0_ |= 0x00000040; tag = input.readTag(); if (tag != 50) { break; } } case 50: { // record input.readBytes(record); bitField0_ |= 0x00000080; tag = input.readTag(); if (tag != 16378) { break; } } case 16378: { // nextPackage input.readBytes(nextPackage); bitField0_ |= 0x00000100; tag = input.readTag(); if (tag != 58) { break; } } case 58: { // teams tag = input.readRepeatedMessage(teams, tag); bitField0_ |= 0x00000200; 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.writeInt64(FieldNames.startTime, startTime); } if ((bitField0_ & 0x00000002) != 0) { output.writeUInt32(FieldNames.levelId, levelId); } if ((bitField0_ & 0x00000004) != 0) { output.writeUInt32(FieldNames.floor, floor); } if ((bitField0_ & 0x00000008) != 0) { output.writeUInt32(FieldNames.bossHP, bossHP); } if ((bitField0_ & 0x00000010) != 0) { output.writeUInt32(FieldNames.bossHPMax, bossHPMax); } if ((bitField0_ & 0x00000020) != 0) { output.writeUInt32(FieldNames.totalScore, totalScore); } if ((bitField0_ & 0x00000040) != 0) { output.writeBool(FieldNames.simulate, simulate); } if ((bitField0_ & 0x00000080) != 0) { output.writeBytes(FieldNames.record, record); } if ((bitField0_ & 0x00000100) != 0) { output.writeBytes(FieldNames.nextPackage, nextPackage); } if ((bitField0_ & 0x00000200) != 0) { output.writeRepeatedMessage(FieldNames.teams, teams); } output.endObject(); } @Override public JointDrillMeta mergeFrom(final JsonSource input) throws IOException { if (!input.beginObject()) { return this; } while (!input.isAtEnd()) { switch (input.readFieldHash()) { case -125326801: { if (input.isAtField(FieldNames.startTime)) { if (!input.trySkipNullValue()) { startTime = input.readInt64(); bitField0_ |= 0x00000001; } } else { input.skipUnknownField(); } break; } case 1734437791: { if (input.isAtField(FieldNames.levelId)) { if (!input.trySkipNullValue()) { levelId = input.readUInt32(); bitField0_ |= 0x00000002; } } else { input.skipUnknownField(); } break; } case 67974124: { if (input.isAtField(FieldNames.floor)) { if (!input.trySkipNullValue()) { floor = input.readUInt32(); bitField0_ |= 0x00000004; } } else { input.skipUnknownField(); } break; } case 1995573589: { if (input.isAtField(FieldNames.bossHP)) { if (!input.trySkipNullValue()) { bossHP = input.readUInt32(); bitField0_ |= 0x00000008; } } else { input.skipUnknownField(); } break; } case -804444209: { if (input.isAtField(FieldNames.bossHPMax)) { if (!input.trySkipNullValue()) { bossHPMax = input.readUInt32(); bitField0_ |= 0x00000010; } } else { input.skipUnknownField(); } break; } case 1276492238: { if (input.isAtField(FieldNames.totalScore)) { if (!input.trySkipNullValue()) { totalScore = input.readUInt32(); bitField0_ |= 0x00000020; } } else { input.skipUnknownField(); } break; } case 554919492: { if (input.isAtField(FieldNames.simulate)) { if (!input.trySkipNullValue()) { simulate = input.readBool(); bitField0_ |= 0x00000040; } } else { input.skipUnknownField(); } break; } case -1851041679: { if (input.isAtField(FieldNames.record)) { if (!input.trySkipNullValue()) { input.readBytes(record); bitField0_ |= 0x00000080; } } else { input.skipUnknownField(); } break; } case -2082324045: { if (input.isAtField(FieldNames.nextPackage)) { if (!input.trySkipNullValue()) { input.readBytes(nextPackage); bitField0_ |= 0x00000100; } } else { input.skipUnknownField(); } break; } case 80681366: { if (input.isAtField(FieldNames.teams)) { if (!input.trySkipNullValue()) { input.readRepeatedMessage(teams); bitField0_ |= 0x00000200; } } else { input.skipUnknownField(); } break; } default: { input.skipUnknownField(); break; } } } input.endObject(); return this; } @Override public JointDrillMeta clone() { return new JointDrillMeta().copyFrom(this); } @Override public boolean isEmpty() { return ((bitField0_) == 0); } public static JointDrillMeta parseFrom(final byte[] data) throws InvalidProtocolBufferException { return ProtoMessage.mergeFrom(new JointDrillMeta(), data).checkInitialized(); } public static JointDrillMeta parseFrom(final ProtoSource input) throws IOException { return ProtoMessage.mergeFrom(new JointDrillMeta(), input).checkInitialized(); } public static JointDrillMeta parseFrom(final JsonSource input) throws IOException { return ProtoMessage.mergeFrom(new JointDrillMeta(), input).checkInitialized(); } /** * @return factory for creating JointDrillMeta messages */ public static MessageFactory getFactory() { return JointDrillMetaFactory.INSTANCE; } private enum JointDrillMetaFactory implements MessageFactory { INSTANCE; @Override public JointDrillMeta create() { return JointDrillMeta.newInstance(); } } /** * Contains name constants used for serializing JSON */ static class FieldNames { static final FieldName startTime = FieldName.forField("StartTime"); static final FieldName levelId = FieldName.forField("LevelId"); static final FieldName floor = FieldName.forField("Floor"); static final FieldName bossHP = FieldName.forField("BossHP"); static final FieldName bossHPMax = FieldName.forField("BossHPMax"); static final FieldName totalScore = FieldName.forField("TotalScore"); static final FieldName simulate = FieldName.forField("Simulate"); static final FieldName record = FieldName.forField("Record"); static final FieldName nextPackage = FieldName.forField("NextPackage"); static final FieldName teams = FieldName.forField("Teams"); } } /** * Protobuf type {@code JointDrillTeam} */ public static final class JointDrillTeam extends ProtoMessage implements Cloneable { private static final long serialVersionUID = 0L; /** * optional uint64 BuildId = 5; */ private long buildId; /** * optional uint32 BuildScore = 2; */ private int buildScore; /** * optional uint32 Damage = 3; */ private int damage; /** * optional uint32 Time = 4; */ private int time; /** * optional bytes NextPackage = 2047; */ private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); /** * repeated .JointDrillChar Chars = 1; */ private final RepeatedMessage chars = RepeatedMessage.newEmptyInstance(JointDrillChar.getFactory()); private JointDrillTeam() { } /** * @return a new empty instance of {@code JointDrillTeam} */ public static JointDrillTeam newInstance() { return new JointDrillTeam(); } /** * optional uint64 BuildId = 5; * @return whether the buildId field is set */ public boolean hasBuildId() { return (bitField0_ & 0x00000001) != 0; } /** * optional uint64 BuildId = 5; * @return this */ public JointDrillTeam clearBuildId() { bitField0_ &= ~0x00000001; buildId = 0L; return this; } /** * optional uint64 BuildId = 5; * @return the buildId */ public long getBuildId() { return buildId; } /** * optional uint64 BuildId = 5; * @param value the buildId to set * @return this */ public JointDrillTeam setBuildId(final long value) { bitField0_ |= 0x00000001; buildId = value; return this; } /** * optional uint32 BuildScore = 2; * @return whether the buildScore field is set */ public boolean hasBuildScore() { return (bitField0_ & 0x00000002) != 0; } /** * optional uint32 BuildScore = 2; * @return this */ public JointDrillTeam clearBuildScore() { bitField0_ &= ~0x00000002; buildScore = 0; return this; } /** * optional uint32 BuildScore = 2; * @return the buildScore */ public int getBuildScore() { return buildScore; } /** * optional uint32 BuildScore = 2; * @param value the buildScore to set * @return this */ public JointDrillTeam setBuildScore(final int value) { bitField0_ |= 0x00000002; buildScore = value; return this; } /** * optional uint32 Damage = 3; * @return whether the damage field is set */ public boolean hasDamage() { return (bitField0_ & 0x00000004) != 0; } /** * optional uint32 Damage = 3; * @return this */ public JointDrillTeam clearDamage() { bitField0_ &= ~0x00000004; damage = 0; return this; } /** * optional uint32 Damage = 3; * @return the damage */ public int getDamage() { return damage; } /** * optional uint32 Damage = 3; * @param value the damage to set * @return this */ public JointDrillTeam setDamage(final int value) { bitField0_ |= 0x00000004; damage = value; return this; } /** * optional uint32 Time = 4; * @return whether the time field is set */ public boolean hasTime() { return (bitField0_ & 0x00000008) != 0; } /** * optional uint32 Time = 4; * @return this */ public JointDrillTeam clearTime() { bitField0_ &= ~0x00000008; time = 0; return this; } /** * optional uint32 Time = 4; * @return the time */ public int getTime() { return time; } /** * optional uint32 Time = 4; * @param value the time to set * @return this */ public JointDrillTeam setTime(final int value) { bitField0_ |= 0x00000008; time = value; return this; } /** * optional bytes NextPackage = 2047; * @return whether the nextPackage field is set */ public boolean hasNextPackage() { return (bitField0_ & 0x00000010) != 0; } /** * optional bytes NextPackage = 2047; * @return this */ public JointDrillTeam clearNextPackage() { bitField0_ &= ~0x00000010; 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_ |= 0x00000010; return nextPackage; } /** * optional bytes NextPackage = 2047; * @param value the nextPackage to add * @return this */ public JointDrillTeam addNextPackage(final byte value) { bitField0_ |= 0x00000010; nextPackage.add(value); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to add * @return this */ public JointDrillTeam addAllNextPackage(final byte... values) { bitField0_ |= 0x00000010; nextPackage.addAll(values); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to set * @return this */ public JointDrillTeam setNextPackage(final byte... values) { bitField0_ |= 0x00000010; nextPackage.copyFrom(values); return this; } /** * repeated .JointDrillChar Chars = 1; * @return whether the chars field is set */ public boolean hasChars() { return (bitField0_ & 0x00000020) != 0; } /** * repeated .JointDrillChar Chars = 1; * @return this */ public JointDrillTeam clearChars() { bitField0_ &= ~0x00000020; chars.clear(); return this; } /** * repeated .JointDrillChar Chars = 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 #getMutableChars()} if you want to modify it. * * @return internal storage object for reading */ public RepeatedMessage getChars() { return chars; } /** * repeated .JointDrillChar Chars = 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 RepeatedMessage getMutableChars() { bitField0_ |= 0x00000020; return chars; } /** * repeated .JointDrillChar Chars = 1; * @param value the chars to add * @return this */ public JointDrillTeam addChars(final JointDrillChar value) { bitField0_ |= 0x00000020; chars.add(value); return this; } /** * repeated .JointDrillChar Chars = 1; * @param values the chars to add * @return this */ public JointDrillTeam addAllChars(final JointDrillChar... values) { bitField0_ |= 0x00000020; chars.addAll(values); return this; } @Override public JointDrillTeam copyFrom(final JointDrillTeam other) { cachedSize = other.cachedSize; if ((bitField0_ | other.bitField0_) != 0) { bitField0_ = other.bitField0_; buildId = other.buildId; buildScore = other.buildScore; damage = other.damage; time = other.time; nextPackage.copyFrom(other.nextPackage); chars.copyFrom(other.chars); } return this; } @Override public JointDrillTeam mergeFrom(final JointDrillTeam other) { if (other.isEmpty()) { return this; } cachedSize = -1; if (other.hasBuildId()) { setBuildId(other.buildId); } if (other.hasBuildScore()) { setBuildScore(other.buildScore); } if (other.hasDamage()) { setDamage(other.damage); } if (other.hasTime()) { setTime(other.time); } if (other.hasNextPackage()) { getMutableNextPackage().copyFrom(other.nextPackage); } if (other.hasChars()) { getMutableChars().addAll(other.chars); } return this; } @Override public JointDrillTeam clear() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; buildId = 0L; buildScore = 0; damage = 0; time = 0; nextPackage.clear(); chars.clear(); return this; } @Override public JointDrillTeam clearQuick() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; nextPackage.clear(); chars.clearQuick(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof JointDrillTeam)) { return false; } JointDrillTeam other = (JointDrillTeam) o; return bitField0_ == other.bitField0_ && (!hasBuildId() || buildId == other.buildId) && (!hasBuildScore() || buildScore == other.buildScore) && (!hasDamage() || damage == other.damage) && (!hasTime() || time == other.time) && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) && (!hasChars() || chars.equals(other.chars)); } @Override public void writeTo(final ProtoSink output) throws IOException { if ((bitField0_ & 0x00000001) != 0) { output.writeRawByte((byte) 40); output.writeUInt64NoTag(buildId); } if ((bitField0_ & 0x00000002) != 0) { output.writeRawByte((byte) 16); output.writeUInt32NoTag(buildScore); } if ((bitField0_ & 0x00000004) != 0) { output.writeRawByte((byte) 24); output.writeUInt32NoTag(damage); } if ((bitField0_ & 0x00000008) != 0) { output.writeRawByte((byte) 32); output.writeUInt32NoTag(time); } if ((bitField0_ & 0x00000010) != 0) { output.writeRawLittleEndian16((short) 32762); output.writeBytesNoTag(nextPackage); } if ((bitField0_ & 0x00000020) != 0) { for (int i = 0; i < chars.length(); i++) { output.writeRawByte((byte) 10); output.writeMessageNoTag(chars.get(i)); } } } @Override protected int computeSerializedSize() { int size = 0; if ((bitField0_ & 0x00000001) != 0) { size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); } if ((bitField0_ & 0x00000002) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(buildScore); } if ((bitField0_ & 0x00000004) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(damage); } if ((bitField0_ & 0x00000008) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(time); } if ((bitField0_ & 0x00000010) != 0) { size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); } if ((bitField0_ & 0x00000020) != 0) { size += (1 * chars.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(chars); } return size; } @Override @SuppressWarnings("fallthrough") public JointDrillTeam mergeFrom(final ProtoSource input) throws IOException { // Enabled Fall-Through Optimization (QuickBuffers) int tag = input.readTag(); while (true) { switch (tag) { case 40: { // buildId buildId = input.readUInt64(); bitField0_ |= 0x00000001; tag = input.readTag(); if (tag != 16) { break; } } case 16: { // buildScore buildScore = input.readUInt32(); bitField0_ |= 0x00000002; tag = input.readTag(); if (tag != 24) { break; } } case 24: { // damage damage = input.readUInt32(); bitField0_ |= 0x00000004; tag = input.readTag(); if (tag != 32) { break; } } case 32: { // time time = input.readUInt32(); bitField0_ |= 0x00000008; tag = input.readTag(); if (tag != 16378) { break; } } case 16378: { // nextPackage input.readBytes(nextPackage); bitField0_ |= 0x00000010; tag = input.readTag(); if (tag != 10) { break; } } case 10: { // chars tag = input.readRepeatedMessage(chars, tag); bitField0_ |= 0x00000020; 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.writeUInt64(FieldNames.buildId, buildId); } if ((bitField0_ & 0x00000002) != 0) { output.writeUInt32(FieldNames.buildScore, buildScore); } if ((bitField0_ & 0x00000004) != 0) { output.writeUInt32(FieldNames.damage, damage); } if ((bitField0_ & 0x00000008) != 0) { output.writeUInt32(FieldNames.time, time); } if ((bitField0_ & 0x00000010) != 0) { output.writeBytes(FieldNames.nextPackage, nextPackage); } if ((bitField0_ & 0x00000020) != 0) { output.writeRepeatedMessage(FieldNames.chars, chars); } output.endObject(); } @Override public JointDrillTeam mergeFrom(final JsonSource input) throws IOException { if (!input.beginObject()) { return this; } while (!input.isAtEnd()) { switch (input.readFieldHash()) { case 1895597065: { if (input.isAtField(FieldNames.buildId)) { if (!input.trySkipNullValue()) { buildId = input.readUInt64(); bitField0_ |= 0x00000001; } } else { input.skipUnknownField(); } break; } case 1511471332: { if (input.isAtField(FieldNames.buildScore)) { if (!input.trySkipNullValue()) { buildScore = input.readUInt32(); bitField0_ |= 0x00000002; } } else { input.skipUnknownField(); } break; } case 2039707535: { if (input.isAtField(FieldNames.damage)) { if (!input.trySkipNullValue()) { damage = input.readUInt32(); bitField0_ |= 0x00000004; } } else { input.skipUnknownField(); } break; } case 2606829: { if (input.isAtField(FieldNames.time)) { if (!input.trySkipNullValue()) { time = input.readUInt32(); bitField0_ |= 0x00000008; } } else { input.skipUnknownField(); } break; } case -2082324045: { if (input.isAtField(FieldNames.nextPackage)) { if (!input.trySkipNullValue()) { input.readBytes(nextPackage); bitField0_ |= 0x00000010; } } else { input.skipUnknownField(); } break; } case 65071037: { if (input.isAtField(FieldNames.chars)) { if (!input.trySkipNullValue()) { input.readRepeatedMessage(chars); bitField0_ |= 0x00000020; } } else { input.skipUnknownField(); } break; } default: { input.skipUnknownField(); break; } } } input.endObject(); return this; } @Override public JointDrillTeam clone() { return new JointDrillTeam().copyFrom(this); } @Override public boolean isEmpty() { return ((bitField0_) == 0); } public static JointDrillTeam parseFrom(final byte[] data) throws InvalidProtocolBufferException { return ProtoMessage.mergeFrom(new JointDrillTeam(), data).checkInitialized(); } public static JointDrillTeam parseFrom(final ProtoSource input) throws IOException { return ProtoMessage.mergeFrom(new JointDrillTeam(), input).checkInitialized(); } public static JointDrillTeam parseFrom(final JsonSource input) throws IOException { return ProtoMessage.mergeFrom(new JointDrillTeam(), input).checkInitialized(); } /** * @return factory for creating JointDrillTeam messages */ public static MessageFactory getFactory() { return JointDrillTeamFactory.INSTANCE; } private enum JointDrillTeamFactory implements MessageFactory { INSTANCE; @Override public JointDrillTeam create() { return JointDrillTeam.newInstance(); } } /** * Contains name constants used for serializing JSON */ static class FieldNames { static final FieldName buildId = FieldName.forField("BuildId"); static final FieldName buildScore = FieldName.forField("BuildScore"); static final FieldName damage = FieldName.forField("Damage"); static final FieldName time = FieldName.forField("Time"); static final FieldName nextPackage = FieldName.forField("NextPackage"); static final FieldName chars = FieldName.forField("Chars"); } } /** * Protobuf type {@code JointDrillChar} */ public static final class JointDrillChar extends ProtoMessage implements Cloneable { private static final long serialVersionUID = 0L; /** * optional uint32 CharId = 1; */ private int charId; /** * optional uint32 CharLevel = 2; */ private int charLevel; /** * optional bytes NextPackage = 2047; */ private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); private JointDrillChar() { } /** * @return a new empty instance of {@code JointDrillChar} */ public static JointDrillChar newInstance() { return new JointDrillChar(); } /** * 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 JointDrillChar 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 JointDrillChar setCharId(final int value) { bitField0_ |= 0x00000001; charId = value; return this; } /** * optional uint32 CharLevel = 2; * @return whether the charLevel field is set */ public boolean hasCharLevel() { return (bitField0_ & 0x00000002) != 0; } /** * optional uint32 CharLevel = 2; * @return this */ public JointDrillChar clearCharLevel() { bitField0_ &= ~0x00000002; charLevel = 0; return this; } /** * optional uint32 CharLevel = 2; * @return the charLevel */ public int getCharLevel() { return charLevel; } /** * optional uint32 CharLevel = 2; * @param value the charLevel to set * @return this */ public JointDrillChar setCharLevel(final int value) { bitField0_ |= 0x00000002; charLevel = 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 JointDrillChar 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 JointDrillChar addNextPackage(final byte value) { bitField0_ |= 0x00000004; nextPackage.add(value); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to add * @return this */ public JointDrillChar addAllNextPackage(final byte... values) { bitField0_ |= 0x00000004; nextPackage.addAll(values); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to set * @return this */ public JointDrillChar setNextPackage(final byte... values) { bitField0_ |= 0x00000004; nextPackage.copyFrom(values); return this; } @Override public JointDrillChar copyFrom(final JointDrillChar other) { cachedSize = other.cachedSize; if ((bitField0_ | other.bitField0_) != 0) { bitField0_ = other.bitField0_; charId = other.charId; charLevel = other.charLevel; nextPackage.copyFrom(other.nextPackage); } return this; } @Override public JointDrillChar mergeFrom(final JointDrillChar other) { if (other.isEmpty()) { return this; } cachedSize = -1; if (other.hasCharId()) { setCharId(other.charId); } if (other.hasCharLevel()) { setCharLevel(other.charLevel); } if (other.hasNextPackage()) { getMutableNextPackage().copyFrom(other.nextPackage); } return this; } @Override public JointDrillChar clear() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; charId = 0; charLevel = 0; nextPackage.clear(); return this; } @Override public JointDrillChar 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 JointDrillChar)) { return false; } JointDrillChar other = (JointDrillChar) o; return bitField0_ == other.bitField0_ && (!hasCharId() || charId == other.charId) && (!hasCharLevel() || charLevel == other.charLevel) && (!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(charLevel); } 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(charLevel); } if ((bitField0_ & 0x00000004) != 0) { size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); } return size; } @Override @SuppressWarnings("fallthrough") public JointDrillChar 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: { // charLevel charLevel = 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.charLevel, charLevel); } if ((bitField0_ & 0x00000004) != 0) { output.writeBytes(FieldNames.nextPackage, nextPackage); } output.endObject(); } @Override public JointDrillChar 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 -746136146: { if (input.isAtField(FieldNames.charLevel)) { if (!input.trySkipNullValue()) { charLevel = 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 JointDrillChar clone() { return new JointDrillChar().copyFrom(this); } @Override public boolean isEmpty() { return ((bitField0_) == 0); } public static JointDrillChar parseFrom(final byte[] data) throws InvalidProtocolBufferException { return ProtoMessage.mergeFrom(new JointDrillChar(), data).checkInitialized(); } public static JointDrillChar parseFrom(final ProtoSource input) throws IOException { return ProtoMessage.mergeFrom(new JointDrillChar(), input).checkInitialized(); } public static JointDrillChar parseFrom(final JsonSource input) throws IOException { return ProtoMessage.mergeFrom(new JointDrillChar(), input).checkInitialized(); } /** * @return factory for creating JointDrillChar messages */ public static MessageFactory getFactory() { return JointDrillCharFactory.INSTANCE; } private enum JointDrillCharFactory implements MessageFactory { INSTANCE; @Override public JointDrillChar create() { return JointDrillChar.newInstance(); } } /** * Contains name constants used for serializing JSON */ static class FieldNames { static final FieldName charId = FieldName.forField("CharId"); static final FieldName charLevel = FieldName.forField("CharLevel"); static final FieldName nextPackage = FieldName.forField("NextPackage"); } } /** * Protobuf type {@code JointDrillLevel} */ public static final class JointDrillLevel extends ProtoMessage implements Cloneable { private static final long serialVersionUID = 0L; /** * optional uint32 LevelId = 1; */ private int levelId; /** * optional uint32 Score = 2; */ private int score; /** * optional bytes NextPackage = 2047; */ private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); private JointDrillLevel() { } /** * @return a new empty instance of {@code JointDrillLevel} */ public static JointDrillLevel newInstance() { return new JointDrillLevel(); } /** * optional uint32 LevelId = 1; * @return whether the levelId field is set */ public boolean hasLevelId() { return (bitField0_ & 0x00000001) != 0; } /** * optional uint32 LevelId = 1; * @return this */ public JointDrillLevel clearLevelId() { bitField0_ &= ~0x00000001; levelId = 0; return this; } /** * optional uint32 LevelId = 1; * @return the levelId */ public int getLevelId() { return levelId; } /** * optional uint32 LevelId = 1; * @param value the levelId to set * @return this */ public JointDrillLevel setLevelId(final int value) { bitField0_ |= 0x00000001; levelId = value; return this; } /** * optional uint32 Score = 2; * @return whether the score field is set */ public boolean hasScore() { return (bitField0_ & 0x00000002) != 0; } /** * optional uint32 Score = 2; * @return this */ public JointDrillLevel clearScore() { bitField0_ &= ~0x00000002; score = 0; return this; } /** * optional uint32 Score = 2; * @return the score */ public int getScore() { return score; } /** * optional uint32 Score = 2; * @param value the score to set * @return this */ public JointDrillLevel setScore(final int value) { bitField0_ |= 0x00000002; score = 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 JointDrillLevel 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 JointDrillLevel addNextPackage(final byte value) { bitField0_ |= 0x00000004; nextPackage.add(value); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to add * @return this */ public JointDrillLevel addAllNextPackage(final byte... values) { bitField0_ |= 0x00000004; nextPackage.addAll(values); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to set * @return this */ public JointDrillLevel setNextPackage(final byte... values) { bitField0_ |= 0x00000004; nextPackage.copyFrom(values); return this; } @Override public JointDrillLevel copyFrom(final JointDrillLevel other) { cachedSize = other.cachedSize; if ((bitField0_ | other.bitField0_) != 0) { bitField0_ = other.bitField0_; levelId = other.levelId; score = other.score; nextPackage.copyFrom(other.nextPackage); } return this; } @Override public JointDrillLevel mergeFrom(final JointDrillLevel other) { if (other.isEmpty()) { return this; } cachedSize = -1; if (other.hasLevelId()) { setLevelId(other.levelId); } if (other.hasScore()) { setScore(other.score); } if (other.hasNextPackage()) { getMutableNextPackage().copyFrom(other.nextPackage); } return this; } @Override public JointDrillLevel clear() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; levelId = 0; score = 0; nextPackage.clear(); return this; } @Override public JointDrillLevel 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 JointDrillLevel)) { return false; } JointDrillLevel other = (JointDrillLevel) o; return bitField0_ == other.bitField0_ && (!hasLevelId() || levelId == other.levelId) && (!hasScore() || score == other.score) && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); } @Override public void writeTo(final ProtoSink output) throws IOException { if ((bitField0_ & 0x00000001) != 0) { output.writeRawByte((byte) 8); output.writeUInt32NoTag(levelId); } if ((bitField0_ & 0x00000002) != 0) { output.writeRawByte((byte) 16); output.writeUInt32NoTag(score); } 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(levelId); } if ((bitField0_ & 0x00000002) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(score); } if ((bitField0_ & 0x00000004) != 0) { size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); } return size; } @Override @SuppressWarnings("fallthrough") public JointDrillLevel mergeFrom(final ProtoSource input) throws IOException { // Enabled Fall-Through Optimization (QuickBuffers) int tag = input.readTag(); while (true) { switch (tag) { case 8: { // levelId levelId = input.readUInt32(); bitField0_ |= 0x00000001; tag = input.readTag(); if (tag != 16) { break; } } case 16: { // score score = 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.levelId, levelId); } if ((bitField0_ & 0x00000002) != 0) { output.writeUInt32(FieldNames.score, score); } if ((bitField0_ & 0x00000004) != 0) { output.writeBytes(FieldNames.nextPackage, nextPackage); } output.endObject(); } @Override public JointDrillLevel mergeFrom(final JsonSource input) throws IOException { if (!input.beginObject()) { return this; } while (!input.isAtEnd()) { switch (input.readFieldHash()) { case 1734437791: { if (input.isAtField(FieldNames.levelId)) { if (!input.trySkipNullValue()) { levelId = input.readUInt32(); bitField0_ |= 0x00000001; } } else { input.skipUnknownField(); } break; } case 79711858: { if (input.isAtField(FieldNames.score)) { if (!input.trySkipNullValue()) { score = 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 JointDrillLevel clone() { return new JointDrillLevel().copyFrom(this); } @Override public boolean isEmpty() { return ((bitField0_) == 0); } public static JointDrillLevel parseFrom(final byte[] data) throws InvalidProtocolBufferException { return ProtoMessage.mergeFrom(new JointDrillLevel(), data).checkInitialized(); } public static JointDrillLevel parseFrom(final ProtoSource input) throws IOException { return ProtoMessage.mergeFrom(new JointDrillLevel(), input).checkInitialized(); } public static JointDrillLevel parseFrom(final JsonSource input) throws IOException { return ProtoMessage.mergeFrom(new JointDrillLevel(), input).checkInitialized(); } /** * @return factory for creating JointDrillLevel messages */ public static MessageFactory getFactory() { return JointDrillLevelFactory.INSTANCE; } private enum JointDrillLevelFactory implements MessageFactory { INSTANCE; @Override public JointDrillLevel create() { return JointDrillLevel.newInstance(); } } /** * Contains name constants used for serializing JSON */ static class FieldNames { static final FieldName levelId = FieldName.forField("LevelId"); static final FieldName score = FieldName.forField("Score"); static final FieldName nextPackage = FieldName.forField("NextPackage"); } } /** * Protobuf type {@code JointDrillSettle} */ public static final class JointDrillSettle extends ProtoMessage implements Cloneable { private static final long serialVersionUID = 0L; /** * optional uint32 FightScore = 3; */ private int fightScore; /** * optional uint32 HpScore = 4; */ private int hpScore; /** * optional uint32 DifficultyScore = 5; */ private int difficultyScore; /** * optional uint32 Old = 13; */ private int old; /** * optional uint32 New = 14; */ private int new_; /** * optional .ChangeInfo Change = 1; */ private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); /** * optional bytes NextPackage = 2047; */ private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); /** * optional string Token = 15; */ private final Utf8String token = Utf8String.newEmptyInstance(); /** * repeated .ItemTpl Items = 2; */ private final RepeatedMessage items = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); private JointDrillSettle() { } /** * @return a new empty instance of {@code JointDrillSettle} */ public static JointDrillSettle newInstance() { return new JointDrillSettle(); } /** * optional uint32 FightScore = 3; * @return whether the fightScore field is set */ public boolean hasFightScore() { return (bitField0_ & 0x00000001) != 0; } /** * optional uint32 FightScore = 3; * @return this */ public JointDrillSettle clearFightScore() { bitField0_ &= ~0x00000001; fightScore = 0; return this; } /** * optional uint32 FightScore = 3; * @return the fightScore */ public int getFightScore() { return fightScore; } /** * optional uint32 FightScore = 3; * @param value the fightScore to set * @return this */ public JointDrillSettle setFightScore(final int value) { bitField0_ |= 0x00000001; fightScore = value; return this; } /** * optional uint32 HpScore = 4; * @return whether the hpScore field is set */ public boolean hasHpScore() { return (bitField0_ & 0x00000002) != 0; } /** * optional uint32 HpScore = 4; * @return this */ public JointDrillSettle clearHpScore() { bitField0_ &= ~0x00000002; hpScore = 0; return this; } /** * optional uint32 HpScore = 4; * @return the hpScore */ public int getHpScore() { return hpScore; } /** * optional uint32 HpScore = 4; * @param value the hpScore to set * @return this */ public JointDrillSettle setHpScore(final int value) { bitField0_ |= 0x00000002; hpScore = value; return this; } /** * optional uint32 DifficultyScore = 5; * @return whether the difficultyScore field is set */ public boolean hasDifficultyScore() { return (bitField0_ & 0x00000004) != 0; } /** * optional uint32 DifficultyScore = 5; * @return this */ public JointDrillSettle clearDifficultyScore() { bitField0_ &= ~0x00000004; difficultyScore = 0; return this; } /** * optional uint32 DifficultyScore = 5; * @return the difficultyScore */ public int getDifficultyScore() { return difficultyScore; } /** * optional uint32 DifficultyScore = 5; * @param value the difficultyScore to set * @return this */ public JointDrillSettle setDifficultyScore(final int value) { bitField0_ |= 0x00000004; difficultyScore = value; return this; } /** * optional uint32 Old = 13; * @return whether the old field is set */ public boolean hasOld() { return (bitField0_ & 0x00000008) != 0; } /** * optional uint32 Old = 13; * @return this */ public JointDrillSettle clearOld() { bitField0_ &= ~0x00000008; old = 0; return this; } /** * optional uint32 Old = 13; * @return the old */ public int getOld() { return old; } /** * optional uint32 Old = 13; * @param value the old to set * @return this */ public JointDrillSettle setOld(final int value) { bitField0_ |= 0x00000008; old = value; return this; } /** * optional uint32 New = 14; * @return whether the new_ field is set */ public boolean hasNew() { return (bitField0_ & 0x00000010) != 0; } /** * optional uint32 New = 14; * @return this */ public JointDrillSettle clearNew() { bitField0_ &= ~0x00000010; new_ = 0; return this; } /** * optional uint32 New = 14; * @return the new_ */ public int getNew() { return new_; } /** * optional uint32 New = 14; * @param value the new_ to set * @return this */ public JointDrillSettle setNew(final int value) { bitField0_ |= 0x00000010; new_ = value; return this; } /** * optional .ChangeInfo Change = 1; * @return whether the change field is set */ public boolean hasChange() { return (bitField0_ & 0x00000020) != 0; } /** * optional .ChangeInfo Change = 1; * @return this */ public JointDrillSettle clearChange() { bitField0_ &= ~0x00000020; change.clear(); return this; } /** * optional .ChangeInfo Change = 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 #getMutableChange()} if you want to modify it. * * @return internal storage object for reading */ public Public.ChangeInfo getChange() { return change; } /** * optional .ChangeInfo Change = 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 getMutableChange() { bitField0_ |= 0x00000020; return change; } /** * optional .ChangeInfo Change = 1; * @param value the change to set * @return this */ public JointDrillSettle setChange(final Public.ChangeInfo value) { bitField0_ |= 0x00000020; change.copyFrom(value); return this; } /** * optional bytes NextPackage = 2047; * @return whether the nextPackage field is set */ public boolean hasNextPackage() { return (bitField0_ & 0x00000040) != 0; } /** * optional bytes NextPackage = 2047; * @return this */ public JointDrillSettle clearNextPackage() { bitField0_ &= ~0x00000040; 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_ |= 0x00000040; return nextPackage; } /** * optional bytes NextPackage = 2047; * @param value the nextPackage to add * @return this */ public JointDrillSettle addNextPackage(final byte value) { bitField0_ |= 0x00000040; nextPackage.add(value); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to add * @return this */ public JointDrillSettle addAllNextPackage(final byte... values) { bitField0_ |= 0x00000040; nextPackage.addAll(values); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to set * @return this */ public JointDrillSettle setNextPackage(final byte... values) { bitField0_ |= 0x00000040; nextPackage.copyFrom(values); return this; } /** * optional string Token = 15; * @return whether the token field is set */ public boolean hasToken() { return (bitField0_ & 0x00000080) != 0; } /** * optional string Token = 15; * @return this */ public JointDrillSettle clearToken() { bitField0_ &= ~0x00000080; token.clear(); return this; } /** * optional string Token = 15; * @return the token */ public String getToken() { return token.getString(); } /** * optional string Token = 15; * @return internal {@code Utf8String} representation of token for reading */ public Utf8String getTokenBytes() { return this.token; } /** * optional string Token = 15; * @return internal {@code Utf8String} representation of token for modifications */ public Utf8String getMutableTokenBytes() { bitField0_ |= 0x00000080; return this.token; } /** * optional string Token = 15; * @param value the token to set * @return this */ public JointDrillSettle setToken(final CharSequence value) { bitField0_ |= 0x00000080; token.copyFrom(value); return this; } /** * optional string Token = 15; * @param value the token to set * @return this */ public JointDrillSettle setToken(final Utf8String value) { bitField0_ |= 0x00000080; token.copyFrom(value); return this; } /** * repeated .ItemTpl Items = 2; * @return whether the items field is set */ public boolean hasItems() { return (bitField0_ & 0x00000100) != 0; } /** * repeated .ItemTpl Items = 2; * @return this */ public JointDrillSettle clearItems() { bitField0_ &= ~0x00000100; items.clear(); return this; } /** * repeated .ItemTpl Items = 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 #getMutableItems()} if you want to modify it. * * @return internal storage object for reading */ public RepeatedMessage getItems() { return items; } /** * repeated .ItemTpl Items = 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 RepeatedMessage getMutableItems() { bitField0_ |= 0x00000100; return items; } /** * repeated .ItemTpl Items = 2; * @param value the items to add * @return this */ public JointDrillSettle addItems(final Public.ItemTpl value) { bitField0_ |= 0x00000100; items.add(value); return this; } /** * repeated .ItemTpl Items = 2; * @param values the items to add * @return this */ public JointDrillSettle addAllItems(final Public.ItemTpl... values) { bitField0_ |= 0x00000100; items.addAll(values); return this; } @Override public JointDrillSettle copyFrom(final JointDrillSettle other) { cachedSize = other.cachedSize; if ((bitField0_ | other.bitField0_) != 0) { bitField0_ = other.bitField0_; fightScore = other.fightScore; hpScore = other.hpScore; difficultyScore = other.difficultyScore; old = other.old; new_ = other.new_; change.copyFrom(other.change); nextPackage.copyFrom(other.nextPackage); token.copyFrom(other.token); items.copyFrom(other.items); } return this; } @Override public JointDrillSettle mergeFrom(final JointDrillSettle other) { if (other.isEmpty()) { return this; } cachedSize = -1; if (other.hasFightScore()) { setFightScore(other.fightScore); } if (other.hasHpScore()) { setHpScore(other.hpScore); } if (other.hasDifficultyScore()) { setDifficultyScore(other.difficultyScore); } if (other.hasOld()) { setOld(other.old); } if (other.hasNew()) { setNew(other.new_); } if (other.hasChange()) { getMutableChange().mergeFrom(other.change); } if (other.hasNextPackage()) { getMutableNextPackage().copyFrom(other.nextPackage); } if (other.hasToken()) { getMutableTokenBytes().copyFrom(other.token); } if (other.hasItems()) { getMutableItems().addAll(other.items); } return this; } @Override public JointDrillSettle clear() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; fightScore = 0; hpScore = 0; difficultyScore = 0; old = 0; new_ = 0; change.clear(); nextPackage.clear(); token.clear(); items.clear(); return this; } @Override public JointDrillSettle clearQuick() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; change.clearQuick(); nextPackage.clear(); token.clear(); items.clearQuick(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof JointDrillSettle)) { return false; } JointDrillSettle other = (JointDrillSettle) o; return bitField0_ == other.bitField0_ && (!hasFightScore() || fightScore == other.fightScore) && (!hasHpScore() || hpScore == other.hpScore) && (!hasDifficultyScore() || difficultyScore == other.difficultyScore) && (!hasOld() || old == other.old) && (!hasNew() || new_ == other.new_) && (!hasChange() || change.equals(other.change)) && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) && (!hasToken() || token.equals(other.token)) && (!hasItems() || items.equals(other.items)); } @Override public void writeTo(final ProtoSink output) throws IOException { if ((bitField0_ & 0x00000001) != 0) { output.writeRawByte((byte) 24); output.writeUInt32NoTag(fightScore); } if ((bitField0_ & 0x00000002) != 0) { output.writeRawByte((byte) 32); output.writeUInt32NoTag(hpScore); } if ((bitField0_ & 0x00000004) != 0) { output.writeRawByte((byte) 40); output.writeUInt32NoTag(difficultyScore); } if ((bitField0_ & 0x00000008) != 0) { output.writeRawByte((byte) 104); output.writeUInt32NoTag(old); } if ((bitField0_ & 0x00000010) != 0) { output.writeRawByte((byte) 112); output.writeUInt32NoTag(new_); } if ((bitField0_ & 0x00000020) != 0) { output.writeRawByte((byte) 10); output.writeMessageNoTag(change); } if ((bitField0_ & 0x00000040) != 0) { output.writeRawLittleEndian16((short) 32762); output.writeBytesNoTag(nextPackage); } if ((bitField0_ & 0x00000080) != 0) { output.writeRawByte((byte) 122); output.writeStringNoTag(token); } if ((bitField0_ & 0x00000100) != 0) { for (int i = 0; i < items.length(); i++) { output.writeRawByte((byte) 18); output.writeMessageNoTag(items.get(i)); } } } @Override protected int computeSerializedSize() { int size = 0; if ((bitField0_ & 0x00000001) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(fightScore); } if ((bitField0_ & 0x00000002) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(hpScore); } if ((bitField0_ & 0x00000004) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(difficultyScore); } if ((bitField0_ & 0x00000008) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(old); } if ((bitField0_ & 0x00000010) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(new_); } if ((bitField0_ & 0x00000020) != 0) { size += 1 + ProtoSink.computeMessageSizeNoTag(change); } if ((bitField0_ & 0x00000040) != 0) { size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); } if ((bitField0_ & 0x00000080) != 0) { size += 1 + ProtoSink.computeStringSizeNoTag(token); } if ((bitField0_ & 0x00000100) != 0) { size += (1 * items.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(items); } return size; } @Override @SuppressWarnings("fallthrough") public JointDrillSettle mergeFrom(final ProtoSource input) throws IOException { // Enabled Fall-Through Optimization (QuickBuffers) int tag = input.readTag(); while (true) { switch (tag) { case 24: { // fightScore fightScore = input.readUInt32(); bitField0_ |= 0x00000001; tag = input.readTag(); if (tag != 32) { break; } } case 32: { // hpScore hpScore = input.readUInt32(); bitField0_ |= 0x00000002; tag = input.readTag(); if (tag != 40) { break; } } case 40: { // difficultyScore difficultyScore = input.readUInt32(); bitField0_ |= 0x00000004; tag = input.readTag(); if (tag != 104) { break; } } case 104: { // old old = input.readUInt32(); bitField0_ |= 0x00000008; tag = input.readTag(); if (tag != 112) { break; } } case 112: { // new_ new_ = input.readUInt32(); bitField0_ |= 0x00000010; tag = input.readTag(); if (tag != 10) { break; } } case 10: { // change input.readMessage(change); bitField0_ |= 0x00000020; tag = input.readTag(); if (tag != 16378) { break; } } case 16378: { // nextPackage input.readBytes(nextPackage); bitField0_ |= 0x00000040; tag = input.readTag(); if (tag != 122) { break; } } case 122: { // token input.readString(token); bitField0_ |= 0x00000080; tag = input.readTag(); if (tag != 18) { break; } } case 18: { // items tag = input.readRepeatedMessage(items, tag); bitField0_ |= 0x00000100; 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.fightScore, fightScore); } if ((bitField0_ & 0x00000002) != 0) { output.writeUInt32(FieldNames.hpScore, hpScore); } if ((bitField0_ & 0x00000004) != 0) { output.writeUInt32(FieldNames.difficultyScore, difficultyScore); } if ((bitField0_ & 0x00000008) != 0) { output.writeUInt32(FieldNames.old, old); } if ((bitField0_ & 0x00000010) != 0) { output.writeUInt32(FieldNames.new_, new_); } if ((bitField0_ & 0x00000020) != 0) { output.writeMessage(FieldNames.change, change); } if ((bitField0_ & 0x00000040) != 0) { output.writeBytes(FieldNames.nextPackage, nextPackage); } if ((bitField0_ & 0x00000080) != 0) { output.writeString(FieldNames.token, token); } if ((bitField0_ & 0x00000100) != 0) { output.writeRepeatedMessage(FieldNames.items, items); } output.endObject(); } @Override public JointDrillSettle mergeFrom(final JsonSource input) throws IOException { if (!input.beginObject()) { return this; } while (!input.isAtEnd()) { switch (input.readFieldHash()) { case -1342567294: { if (input.isAtField(FieldNames.fightScore)) { if (!input.trySkipNullValue()) { fightScore = input.readUInt32(); bitField0_ |= 0x00000001; } } else { input.skipUnknownField(); } break; } case -1533034934: { if (input.isAtField(FieldNames.hpScore)) { if (!input.trySkipNullValue()) { hpScore = input.readUInt32(); bitField0_ |= 0x00000002; } } else { input.skipUnknownField(); } break; } case -2025608329: { if (input.isAtField(FieldNames.difficultyScore)) { if (!input.trySkipNullValue()) { difficultyScore = input.readUInt32(); bitField0_ |= 0x00000004; } } else { input.skipUnknownField(); } break; } case 79367: { if (input.isAtField(FieldNames.old)) { if (!input.trySkipNullValue()) { old = input.readUInt32(); bitField0_ |= 0x00000008; } } else { input.skipUnknownField(); } break; } case 78208: { if (input.isAtField(FieldNames.new_)) { if (!input.trySkipNullValue()) { new_ = input.readUInt32(); bitField0_ |= 0x00000010; } } else { input.skipUnknownField(); } break; } case 2017198032: { if (input.isAtField(FieldNames.change)) { if (!input.trySkipNullValue()) { input.readMessage(change); bitField0_ |= 0x00000020; } } else { input.skipUnknownField(); } break; } case -2082324045: { if (input.isAtField(FieldNames.nextPackage)) { if (!input.trySkipNullValue()) { input.readBytes(nextPackage); bitField0_ |= 0x00000040; } } else { input.skipUnknownField(); } break; } case 80988633: { if (input.isAtField(FieldNames.token)) { if (!input.trySkipNullValue()) { input.readString(token); bitField0_ |= 0x00000080; } } else { input.skipUnknownField(); } break; } case 70973344: { if (input.isAtField(FieldNames.items)) { if (!input.trySkipNullValue()) { input.readRepeatedMessage(items); bitField0_ |= 0x00000100; } } else { input.skipUnknownField(); } break; } default: { input.skipUnknownField(); break; } } } input.endObject(); return this; } @Override public JointDrillSettle clone() { return new JointDrillSettle().copyFrom(this); } @Override public boolean isEmpty() { return ((bitField0_) == 0); } public static JointDrillSettle parseFrom(final byte[] data) throws InvalidProtocolBufferException { return ProtoMessage.mergeFrom(new JointDrillSettle(), data).checkInitialized(); } public static JointDrillSettle parseFrom(final ProtoSource input) throws IOException { return ProtoMessage.mergeFrom(new JointDrillSettle(), input).checkInitialized(); } public static JointDrillSettle parseFrom(final JsonSource input) throws IOException { return ProtoMessage.mergeFrom(new JointDrillSettle(), input).checkInitialized(); } /** * @return factory for creating JointDrillSettle messages */ public static MessageFactory getFactory() { return JointDrillSettleFactory.INSTANCE; } private enum JointDrillSettleFactory implements MessageFactory { INSTANCE; @Override public JointDrillSettle create() { return JointDrillSettle.newInstance(); } } /** * Contains name constants used for serializing JSON */ static class FieldNames { static final FieldName fightScore = FieldName.forField("FightScore"); static final FieldName hpScore = FieldName.forField("HpScore"); static final FieldName difficultyScore = FieldName.forField("DifficultyScore"); static final FieldName old = FieldName.forField("Old"); static final FieldName new_ = FieldName.forField("New"); static final FieldName change = FieldName.forField("Change"); static final FieldName nextPackage = FieldName.forField("NextPackage"); static final FieldName token = FieldName.forField("Token"); static final FieldName items = FieldName.forField("Items"); } } }