// 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; public final class GachaInformation { /** * Protobuf type {@code GachaInfo} */ public static final class GachaInfo extends ProtoMessage implements Cloneable { private static final long serialVersionUID = 0L; /** * optional uint32 Id = 1; */ private int id; /** * optional uint32 DaysCount = 2; */ private int daysCount; /** * optional uint32 AupMissTimes = 3; */ private int aupMissTimes; /** * optional uint32 AMissTimes = 4; */ private int aMissTimes; /** * optional uint32 GachaTotalTimes = 13; */ private int gachaTotalTimes; /** * optional uint32 TotalTimes = 14; */ private int totalTimes; /** * optional uint32 AupGuaranteeTimes = 15; */ private int aupGuaranteeTimes; /** * optional bool ReveFirstTenReward = 11; */ private boolean reveFirstTenReward; /** * optional bool RecvGuaranteeReward = 12; */ private boolean recvGuaranteeReward; /** * optional bytes NextPackage = 2047; */ private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); private GachaInfo() { } /** * @return a new empty instance of {@code GachaInfo} */ public static GachaInfo newInstance() { return new GachaInfo(); } /** * optional uint32 Id = 1; * @return whether the id field is set */ public boolean hasId() { return (bitField0_ & 0x00000001) != 0; } /** * optional uint32 Id = 1; * @return this */ public GachaInfo clearId() { bitField0_ &= ~0x00000001; id = 0; return this; } /** * optional uint32 Id = 1; * @return the id */ public int getId() { return id; } /** * optional uint32 Id = 1; * @param value the id to set * @return this */ public GachaInfo setId(final int value) { bitField0_ |= 0x00000001; id = value; return this; } /** * optional uint32 DaysCount = 2; * @return whether the daysCount field is set */ public boolean hasDaysCount() { return (bitField0_ & 0x00000002) != 0; } /** * optional uint32 DaysCount = 2; * @return this */ public GachaInfo clearDaysCount() { bitField0_ &= ~0x00000002; daysCount = 0; return this; } /** * optional uint32 DaysCount = 2; * @return the daysCount */ public int getDaysCount() { return daysCount; } /** * optional uint32 DaysCount = 2; * @param value the daysCount to set * @return this */ public GachaInfo setDaysCount(final int value) { bitField0_ |= 0x00000002; daysCount = value; return this; } /** * optional uint32 AupMissTimes = 3; * @return whether the aupMissTimes field is set */ public boolean hasAupMissTimes() { return (bitField0_ & 0x00000004) != 0; } /** * optional uint32 AupMissTimes = 3; * @return this */ public GachaInfo clearAupMissTimes() { bitField0_ &= ~0x00000004; aupMissTimes = 0; return this; } /** * optional uint32 AupMissTimes = 3; * @return the aupMissTimes */ public int getAupMissTimes() { return aupMissTimes; } /** * optional uint32 AupMissTimes = 3; * @param value the aupMissTimes to set * @return this */ public GachaInfo setAupMissTimes(final int value) { bitField0_ |= 0x00000004; aupMissTimes = value; return this; } /** * optional uint32 AMissTimes = 4; * @return whether the aMissTimes field is set */ public boolean hasAMissTimes() { return (bitField0_ & 0x00000008) != 0; } /** * optional uint32 AMissTimes = 4; * @return this */ public GachaInfo clearAMissTimes() { bitField0_ &= ~0x00000008; aMissTimes = 0; return this; } /** * optional uint32 AMissTimes = 4; * @return the aMissTimes */ public int getAMissTimes() { return aMissTimes; } /** * optional uint32 AMissTimes = 4; * @param value the aMissTimes to set * @return this */ public GachaInfo setAMissTimes(final int value) { bitField0_ |= 0x00000008; aMissTimes = value; return this; } /** * optional uint32 GachaTotalTimes = 13; * @return whether the gachaTotalTimes field is set */ public boolean hasGachaTotalTimes() { return (bitField0_ & 0x00000010) != 0; } /** * optional uint32 GachaTotalTimes = 13; * @return this */ public GachaInfo clearGachaTotalTimes() { bitField0_ &= ~0x00000010; gachaTotalTimes = 0; return this; } /** * optional uint32 GachaTotalTimes = 13; * @return the gachaTotalTimes */ public int getGachaTotalTimes() { return gachaTotalTimes; } /** * optional uint32 GachaTotalTimes = 13; * @param value the gachaTotalTimes to set * @return this */ public GachaInfo setGachaTotalTimes(final int value) { bitField0_ |= 0x00000010; gachaTotalTimes = value; return this; } /** * optional uint32 TotalTimes = 14; * @return whether the totalTimes field is set */ public boolean hasTotalTimes() { return (bitField0_ & 0x00000020) != 0; } /** * optional uint32 TotalTimes = 14; * @return this */ public GachaInfo clearTotalTimes() { bitField0_ &= ~0x00000020; totalTimes = 0; return this; } /** * optional uint32 TotalTimes = 14; * @return the totalTimes */ public int getTotalTimes() { return totalTimes; } /** * optional uint32 TotalTimes = 14; * @param value the totalTimes to set * @return this */ public GachaInfo setTotalTimes(final int value) { bitField0_ |= 0x00000020; totalTimes = value; return this; } /** * optional uint32 AupGuaranteeTimes = 15; * @return whether the aupGuaranteeTimes field is set */ public boolean hasAupGuaranteeTimes() { return (bitField0_ & 0x00000040) != 0; } /** * optional uint32 AupGuaranteeTimes = 15; * @return this */ public GachaInfo clearAupGuaranteeTimes() { bitField0_ &= ~0x00000040; aupGuaranteeTimes = 0; return this; } /** * optional uint32 AupGuaranteeTimes = 15; * @return the aupGuaranteeTimes */ public int getAupGuaranteeTimes() { return aupGuaranteeTimes; } /** * optional uint32 AupGuaranteeTimes = 15; * @param value the aupGuaranteeTimes to set * @return this */ public GachaInfo setAupGuaranteeTimes(final int value) { bitField0_ |= 0x00000040; aupGuaranteeTimes = value; return this; } /** * optional bool ReveFirstTenReward = 11; * @return whether the reveFirstTenReward field is set */ public boolean hasReveFirstTenReward() { return (bitField0_ & 0x00000080) != 0; } /** * optional bool ReveFirstTenReward = 11; * @return this */ public GachaInfo clearReveFirstTenReward() { bitField0_ &= ~0x00000080; reveFirstTenReward = false; return this; } /** * optional bool ReveFirstTenReward = 11; * @return the reveFirstTenReward */ public boolean getReveFirstTenReward() { return reveFirstTenReward; } /** * optional bool ReveFirstTenReward = 11; * @param value the reveFirstTenReward to set * @return this */ public GachaInfo setReveFirstTenReward(final boolean value) { bitField0_ |= 0x00000080; reveFirstTenReward = value; return this; } /** * optional bool RecvGuaranteeReward = 12; * @return whether the recvGuaranteeReward field is set */ public boolean hasRecvGuaranteeReward() { return (bitField0_ & 0x00000100) != 0; } /** * optional bool RecvGuaranteeReward = 12; * @return this */ public GachaInfo clearRecvGuaranteeReward() { bitField0_ &= ~0x00000100; recvGuaranteeReward = false; return this; } /** * optional bool RecvGuaranteeReward = 12; * @return the recvGuaranteeReward */ public boolean getRecvGuaranteeReward() { return recvGuaranteeReward; } /** * optional bool RecvGuaranteeReward = 12; * @param value the recvGuaranteeReward to set * @return this */ public GachaInfo setRecvGuaranteeReward(final boolean value) { bitField0_ |= 0x00000100; recvGuaranteeReward = value; return this; } /** * optional bytes NextPackage = 2047; * @return whether the nextPackage field is set */ public boolean hasNextPackage() { return (bitField0_ & 0x00000200) != 0; } /** * optional bytes NextPackage = 2047; * @return this */ public GachaInfo clearNextPackage() { bitField0_ &= ~0x00000200; 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_ |= 0x00000200; return nextPackage; } /** * optional bytes NextPackage = 2047; * @param value the nextPackage to add * @return this */ public GachaInfo addNextPackage(final byte value) { bitField0_ |= 0x00000200; nextPackage.add(value); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to add * @return this */ public GachaInfo addAllNextPackage(final byte... values) { bitField0_ |= 0x00000200; nextPackage.addAll(values); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to set * @return this */ public GachaInfo setNextPackage(final byte... values) { bitField0_ |= 0x00000200; nextPackage.copyFrom(values); return this; } @Override public GachaInfo copyFrom(final GachaInfo other) { cachedSize = other.cachedSize; if ((bitField0_ | other.bitField0_) != 0) { bitField0_ = other.bitField0_; id = other.id; daysCount = other.daysCount; aupMissTimes = other.aupMissTimes; aMissTimes = other.aMissTimes; gachaTotalTimes = other.gachaTotalTimes; totalTimes = other.totalTimes; aupGuaranteeTimes = other.aupGuaranteeTimes; reveFirstTenReward = other.reveFirstTenReward; recvGuaranteeReward = other.recvGuaranteeReward; nextPackage.copyFrom(other.nextPackage); } return this; } @Override public GachaInfo mergeFrom(final GachaInfo other) { if (other.isEmpty()) { return this; } cachedSize = -1; if (other.hasId()) { setId(other.id); } if (other.hasDaysCount()) { setDaysCount(other.daysCount); } if (other.hasAupMissTimes()) { setAupMissTimes(other.aupMissTimes); } if (other.hasAMissTimes()) { setAMissTimes(other.aMissTimes); } if (other.hasGachaTotalTimes()) { setGachaTotalTimes(other.gachaTotalTimes); } if (other.hasTotalTimes()) { setTotalTimes(other.totalTimes); } if (other.hasAupGuaranteeTimes()) { setAupGuaranteeTimes(other.aupGuaranteeTimes); } if (other.hasReveFirstTenReward()) { setReveFirstTenReward(other.reveFirstTenReward); } if (other.hasRecvGuaranteeReward()) { setRecvGuaranteeReward(other.recvGuaranteeReward); } if (other.hasNextPackage()) { getMutableNextPackage().copyFrom(other.nextPackage); } return this; } @Override public GachaInfo clear() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; id = 0; daysCount = 0; aupMissTimes = 0; aMissTimes = 0; gachaTotalTimes = 0; totalTimes = 0; aupGuaranteeTimes = 0; reveFirstTenReward = false; recvGuaranteeReward = false; nextPackage.clear(); return this; } @Override public GachaInfo 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 GachaInfo)) { return false; } GachaInfo other = (GachaInfo) o; return bitField0_ == other.bitField0_ && (!hasId() || id == other.id) && (!hasDaysCount() || daysCount == other.daysCount) && (!hasAupMissTimes() || aupMissTimes == other.aupMissTimes) && (!hasAMissTimes() || aMissTimes == other.aMissTimes) && (!hasGachaTotalTimes() || gachaTotalTimes == other.gachaTotalTimes) && (!hasTotalTimes() || totalTimes == other.totalTimes) && (!hasAupGuaranteeTimes() || aupGuaranteeTimes == other.aupGuaranteeTimes) && (!hasReveFirstTenReward() || reveFirstTenReward == other.reveFirstTenReward) && (!hasRecvGuaranteeReward() || recvGuaranteeReward == other.recvGuaranteeReward) && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); } @Override public void writeTo(final ProtoSink output) throws IOException { if ((bitField0_ & 0x00000001) != 0) { output.writeRawByte((byte) 8); output.writeUInt32NoTag(id); } if ((bitField0_ & 0x00000002) != 0) { output.writeRawByte((byte) 16); output.writeUInt32NoTag(daysCount); } if ((bitField0_ & 0x00000004) != 0) { output.writeRawByte((byte) 24); output.writeUInt32NoTag(aupMissTimes); } if ((bitField0_ & 0x00000008) != 0) { output.writeRawByte((byte) 32); output.writeUInt32NoTag(aMissTimes); } if ((bitField0_ & 0x00000010) != 0) { output.writeRawByte((byte) 104); output.writeUInt32NoTag(gachaTotalTimes); } if ((bitField0_ & 0x00000020) != 0) { output.writeRawByte((byte) 112); output.writeUInt32NoTag(totalTimes); } if ((bitField0_ & 0x00000040) != 0) { output.writeRawByte((byte) 120); output.writeUInt32NoTag(aupGuaranteeTimes); } if ((bitField0_ & 0x00000080) != 0) { output.writeRawByte((byte) 88); output.writeBoolNoTag(reveFirstTenReward); } if ((bitField0_ & 0x00000100) != 0) { output.writeRawByte((byte) 96); output.writeBoolNoTag(recvGuaranteeReward); } if ((bitField0_ & 0x00000200) != 0) { output.writeRawLittleEndian16((short) 32762); output.writeBytesNoTag(nextPackage); } } @Override protected int computeSerializedSize() { int size = 0; if ((bitField0_ & 0x00000001) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(id); } if ((bitField0_ & 0x00000002) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(daysCount); } if ((bitField0_ & 0x00000004) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(aupMissTimes); } if ((bitField0_ & 0x00000008) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(aMissTimes); } if ((bitField0_ & 0x00000010) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(gachaTotalTimes); } if ((bitField0_ & 0x00000020) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(totalTimes); } if ((bitField0_ & 0x00000040) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(aupGuaranteeTimes); } if ((bitField0_ & 0x00000080) != 0) { size += 2; } if ((bitField0_ & 0x00000100) != 0) { size += 2; } if ((bitField0_ & 0x00000200) != 0) { size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); } return size; } @Override @SuppressWarnings("fallthrough") public GachaInfo mergeFrom(final ProtoSource input) throws IOException { // Enabled Fall-Through Optimization (QuickBuffers) int tag = input.readTag(); while (true) { switch (tag) { case 8: { // id id = input.readUInt32(); bitField0_ |= 0x00000001; tag = input.readTag(); if (tag != 16) { break; } } case 16: { // daysCount daysCount = input.readUInt32(); bitField0_ |= 0x00000002; tag = input.readTag(); if (tag != 24) { break; } } case 24: { // aupMissTimes aupMissTimes = input.readUInt32(); bitField0_ |= 0x00000004; tag = input.readTag(); if (tag != 32) { break; } } case 32: { // aMissTimes aMissTimes = input.readUInt32(); bitField0_ |= 0x00000008; tag = input.readTag(); if (tag != 104) { break; } } case 104: { // gachaTotalTimes gachaTotalTimes = input.readUInt32(); bitField0_ |= 0x00000010; tag = input.readTag(); if (tag != 112) { break; } } case 112: { // totalTimes totalTimes = input.readUInt32(); bitField0_ |= 0x00000020; tag = input.readTag(); if (tag != 120) { break; } } case 120: { // aupGuaranteeTimes aupGuaranteeTimes = input.readUInt32(); bitField0_ |= 0x00000040; tag = input.readTag(); if (tag != 88) { break; } } case 88: { // reveFirstTenReward reveFirstTenReward = input.readBool(); bitField0_ |= 0x00000080; tag = input.readTag(); if (tag != 96) { break; } } case 96: { // recvGuaranteeReward recvGuaranteeReward = input.readBool(); bitField0_ |= 0x00000100; tag = input.readTag(); if (tag != 16378) { break; } } case 16378: { // nextPackage input.readBytes(nextPackage); bitField0_ |= 0x00000200; 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.id, id); } if ((bitField0_ & 0x00000002) != 0) { output.writeUInt32(FieldNames.daysCount, daysCount); } if ((bitField0_ & 0x00000004) != 0) { output.writeUInt32(FieldNames.aupMissTimes, aupMissTimes); } if ((bitField0_ & 0x00000008) != 0) { output.writeUInt32(FieldNames.aMissTimes, aMissTimes); } if ((bitField0_ & 0x00000010) != 0) { output.writeUInt32(FieldNames.gachaTotalTimes, gachaTotalTimes); } if ((bitField0_ & 0x00000020) != 0) { output.writeUInt32(FieldNames.totalTimes, totalTimes); } if ((bitField0_ & 0x00000040) != 0) { output.writeUInt32(FieldNames.aupGuaranteeTimes, aupGuaranteeTimes); } if ((bitField0_ & 0x00000080) != 0) { output.writeBool(FieldNames.reveFirstTenReward, reveFirstTenReward); } if ((bitField0_ & 0x00000100) != 0) { output.writeBool(FieldNames.recvGuaranteeReward, recvGuaranteeReward); } if ((bitField0_ & 0x00000200) != 0) { output.writeBytes(FieldNames.nextPackage, nextPackage); } output.endObject(); } @Override public GachaInfo mergeFrom(final JsonSource input) throws IOException { if (!input.beginObject()) { return this; } while (!input.isAtEnd()) { switch (input.readFieldHash()) { case 2363: { if (input.isAtField(FieldNames.id)) { if (!input.trySkipNullValue()) { id = input.readUInt32(); bitField0_ |= 0x00000001; } } else { input.skipUnknownField(); } break; } case -2022494504: { if (input.isAtField(FieldNames.daysCount)) { if (!input.trySkipNullValue()) { daysCount = input.readUInt32(); bitField0_ |= 0x00000002; } } else { input.skipUnknownField(); } break; } case -1590821778: { if (input.isAtField(FieldNames.aupMissTimes)) { if (!input.trySkipNullValue()) { aupMissTimes = input.readUInt32(); bitField0_ |= 0x00000004; } } else { input.skipUnknownField(); } break; } case -955152279: { if (input.isAtField(FieldNames.aMissTimes)) { if (!input.trySkipNullValue()) { aMissTimes = input.readUInt32(); bitField0_ |= 0x00000008; } } else { input.skipUnknownField(); } break; } case -1802973852: { if (input.isAtField(FieldNames.gachaTotalTimes)) { if (!input.trySkipNullValue()) { gachaTotalTimes = input.readUInt32(); bitField0_ |= 0x00000010; } } else { input.skipUnknownField(); } break; } case 1277592194: { if (input.isAtField(FieldNames.totalTimes)) { if (!input.trySkipNullValue()) { totalTimes = input.readUInt32(); bitField0_ |= 0x00000020; } } else { input.skipUnknownField(); } break; } case -1466287270: { if (input.isAtField(FieldNames.aupGuaranteeTimes)) { if (!input.trySkipNullValue()) { aupGuaranteeTimes = input.readUInt32(); bitField0_ |= 0x00000040; } } else { input.skipUnknownField(); } break; } case -1124399682: { if (input.isAtField(FieldNames.reveFirstTenReward)) { if (!input.trySkipNullValue()) { reveFirstTenReward = input.readBool(); bitField0_ |= 0x00000080; } } else { input.skipUnknownField(); } break; } case -1985982223: { if (input.isAtField(FieldNames.recvGuaranteeReward)) { if (!input.trySkipNullValue()) { recvGuaranteeReward = input.readBool(); bitField0_ |= 0x00000100; } } else { input.skipUnknownField(); } break; } case -2082324045: { if (input.isAtField(FieldNames.nextPackage)) { if (!input.trySkipNullValue()) { input.readBytes(nextPackage); bitField0_ |= 0x00000200; } } else { input.skipUnknownField(); } break; } default: { input.skipUnknownField(); break; } } } input.endObject(); return this; } @Override public GachaInfo clone() { return new GachaInfo().copyFrom(this); } @Override public boolean isEmpty() { return ((bitField0_) == 0); } public static GachaInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { return ProtoMessage.mergeFrom(new GachaInfo(), data).checkInitialized(); } public static GachaInfo parseFrom(final ProtoSource input) throws IOException { return ProtoMessage.mergeFrom(new GachaInfo(), input).checkInitialized(); } public static GachaInfo parseFrom(final JsonSource input) throws IOException { return ProtoMessage.mergeFrom(new GachaInfo(), input).checkInitialized(); } /** * @return factory for creating GachaInfo messages */ public static MessageFactory getFactory() { return GachaInfoFactory.INSTANCE; } private enum GachaInfoFactory implements MessageFactory { INSTANCE; @Override public GachaInfo create() { return GachaInfo.newInstance(); } } /** * Contains name constants used for serializing JSON */ static class FieldNames { static final FieldName id = FieldName.forField("Id"); static final FieldName daysCount = FieldName.forField("DaysCount"); static final FieldName aupMissTimes = FieldName.forField("AupMissTimes"); static final FieldName aMissTimes = FieldName.forField("AMissTimes"); static final FieldName gachaTotalTimes = FieldName.forField("GachaTotalTimes"); static final FieldName totalTimes = FieldName.forField("TotalTimes"); static final FieldName aupGuaranteeTimes = FieldName.forField("AupGuaranteeTimes"); static final FieldName reveFirstTenReward = FieldName.forField("ReveFirstTenReward"); static final FieldName recvGuaranteeReward = FieldName.forField("RecvGuaranteeReward"); static final FieldName nextPackage = FieldName.forField("NextPackage"); } } /** * Protobuf type {@code GachaInformationResp} */ public static final class GachaInformationResp extends ProtoMessage implements Cloneable { private static final long serialVersionUID = 0L; /** * optional bytes NextPackage = 2047; */ private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); /** * repeated .GachaInfo Information = 1; */ private final RepeatedMessage information = RepeatedMessage.newEmptyInstance(GachaInfo.getFactory()); private GachaInformationResp() { } /** * @return a new empty instance of {@code GachaInformationResp} */ public static GachaInformationResp newInstance() { return new GachaInformationResp(); } /** * optional bytes NextPackage = 2047; * @return whether the nextPackage field is set */ public boolean hasNextPackage() { return (bitField0_ & 0x00000001) != 0; } /** * optional bytes NextPackage = 2047; * @return this */ public GachaInformationResp clearNextPackage() { bitField0_ &= ~0x00000001; 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_ |= 0x00000001; return nextPackage; } /** * optional bytes NextPackage = 2047; * @param value the nextPackage to add * @return this */ public GachaInformationResp addNextPackage(final byte value) { bitField0_ |= 0x00000001; nextPackage.add(value); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to add * @return this */ public GachaInformationResp addAllNextPackage(final byte... values) { bitField0_ |= 0x00000001; nextPackage.addAll(values); return this; } /** * optional bytes NextPackage = 2047; * @param values the nextPackage to set * @return this */ public GachaInformationResp setNextPackage(final byte... values) { bitField0_ |= 0x00000001; nextPackage.copyFrom(values); return this; } /** * repeated .GachaInfo Information = 1; * @return whether the information field is set */ public boolean hasInformation() { return (bitField0_ & 0x00000002) != 0; } /** * repeated .GachaInfo Information = 1; * @return this */ public GachaInformationResp clearInformation() { bitField0_ &= ~0x00000002; information.clear(); return this; } /** * repeated .GachaInfo Information = 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 #getMutableInformation()} if you want to modify it. * * @return internal storage object for reading */ public RepeatedMessage getInformation() { return information; } /** * repeated .GachaInfo Information = 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 getMutableInformation() { bitField0_ |= 0x00000002; return information; } /** * repeated .GachaInfo Information = 1; * @param value the information to add * @return this */ public GachaInformationResp addInformation(final GachaInfo value) { bitField0_ |= 0x00000002; information.add(value); return this; } /** * repeated .GachaInfo Information = 1; * @param values the information to add * @return this */ public GachaInformationResp addAllInformation(final GachaInfo... values) { bitField0_ |= 0x00000002; information.addAll(values); return this; } @Override public GachaInformationResp copyFrom(final GachaInformationResp other) { cachedSize = other.cachedSize; if ((bitField0_ | other.bitField0_) != 0) { bitField0_ = other.bitField0_; nextPackage.copyFrom(other.nextPackage); information.copyFrom(other.information); } return this; } @Override public GachaInformationResp mergeFrom(final GachaInformationResp other) { if (other.isEmpty()) { return this; } cachedSize = -1; if (other.hasNextPackage()) { getMutableNextPackage().copyFrom(other.nextPackage); } if (other.hasInformation()) { getMutableInformation().addAll(other.information); } return this; } @Override public GachaInformationResp clear() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; nextPackage.clear(); information.clear(); return this; } @Override public GachaInformationResp clearQuick() { if (isEmpty()) { return this; } cachedSize = -1; bitField0_ = 0; nextPackage.clear(); information.clearQuick(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof GachaInformationResp)) { return false; } GachaInformationResp other = (GachaInformationResp) o; return bitField0_ == other.bitField0_ && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) && (!hasInformation() || information.equals(other.information)); } @Override public void writeTo(final ProtoSink output) throws IOException { if ((bitField0_ & 0x00000001) != 0) { output.writeRawLittleEndian16((short) 32762); output.writeBytesNoTag(nextPackage); } if ((bitField0_ & 0x00000002) != 0) { for (int i = 0; i < information.length(); i++) { output.writeRawByte((byte) 10); output.writeMessageNoTag(information.get(i)); } } } @Override protected int computeSerializedSize() { int size = 0; if ((bitField0_ & 0x00000001) != 0) { size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); } if ((bitField0_ & 0x00000002) != 0) { size += (1 * information.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(information); } return size; } @Override @SuppressWarnings("fallthrough") public GachaInformationResp mergeFrom(final ProtoSource input) throws IOException { // Enabled Fall-Through Optimization (QuickBuffers) int tag = input.readTag(); while (true) { switch (tag) { case 16378: { // nextPackage input.readBytes(nextPackage); bitField0_ |= 0x00000001; tag = input.readTag(); if (tag != 10) { break; } } case 10: { // information tag = input.readRepeatedMessage(information, tag); bitField0_ |= 0x00000002; 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.writeBytes(FieldNames.nextPackage, nextPackage); } if ((bitField0_ & 0x00000002) != 0) { output.writeRepeatedMessage(FieldNames.information, information); } output.endObject(); } @Override public GachaInformationResp mergeFrom(final JsonSource input) throws IOException { if (!input.beginObject()) { return this; } while (!input.isAtEnd()) { switch (input.readFieldHash()) { case -2082324045: { if (input.isAtField(FieldNames.nextPackage)) { if (!input.trySkipNullValue()) { input.readBytes(nextPackage); bitField0_ |= 0x00000001; } } else { input.skipUnknownField(); } break; } case -658498292: { if (input.isAtField(FieldNames.information)) { if (!input.trySkipNullValue()) { input.readRepeatedMessage(information); bitField0_ |= 0x00000002; } } else { input.skipUnknownField(); } break; } default: { input.skipUnknownField(); break; } } } input.endObject(); return this; } @Override public GachaInformationResp clone() { return new GachaInformationResp().copyFrom(this); } @Override public boolean isEmpty() { return ((bitField0_) == 0); } public static GachaInformationResp parseFrom(final byte[] data) throws InvalidProtocolBufferException { return ProtoMessage.mergeFrom(new GachaInformationResp(), data).checkInitialized(); } public static GachaInformationResp parseFrom(final ProtoSource input) throws IOException { return ProtoMessage.mergeFrom(new GachaInformationResp(), input).checkInitialized(); } public static GachaInformationResp parseFrom(final JsonSource input) throws IOException { return ProtoMessage.mergeFrom(new GachaInformationResp(), input).checkInitialized(); } /** * @return factory for creating GachaInformationResp messages */ public static MessageFactory getFactory() { return GachaInformationRespFactory.INSTANCE; } private enum GachaInformationRespFactory implements MessageFactory { INSTANCE; @Override public GachaInformationResp create() { return GachaInformationResp.newInstance(); } } /** * Contains name constants used for serializing JSON */ static class FieldNames { static final FieldName nextPackage = FieldName.forField("NextPackage"); static final FieldName information = FieldName.forField("Information"); } } }