Skip to content

Commit

Permalink
fix GetFarmStageGachaInfo proto
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiro420 committed Feb 6, 2024
1 parent 70a420a commit b6fe9f2
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ public static final class FarmStageGachaInfo extends ProtoMessage<FarmStageGacha
private static final long serialVersionUID = 0L;

/**
* <code>optional int64 end_time = 4;</code>
* <code>optional int64 begin_time = 13;</code>
*/
private long endTime;
private long beginTime;

/**
* <code>optional int64 begin_time = 5;</code>
* <code>optional int64 end_time = 14;</code>
*/
private long beginTime;
private long endTime;

/**
* <code>optional uint32 gacha_id = 3;</code>
* <code>optional uint32 gacha_id = 12;</code>
*/
private int gachaId;

Expand All @@ -44,89 +44,89 @@ public static FarmStageGachaInfo newInstance() {
}

/**
* <code>optional int64 end_time = 4;</code>
* @return whether the endTime field is set
* <code>optional int64 begin_time = 13;</code>
* @return whether the beginTime field is set
*/
public boolean hasEndTime() {
public boolean hasBeginTime() {
return (bitField0_ & 0x00000001) != 0;
}

/**
* <code>optional int64 end_time = 4;</code>
* <code>optional int64 begin_time = 13;</code>
* @return this
*/
public FarmStageGachaInfo clearEndTime() {
public FarmStageGachaInfo clearBeginTime() {
bitField0_ &= ~0x00000001;
endTime = 0L;
beginTime = 0L;
return this;
}

/**
* <code>optional int64 end_time = 4;</code>
* @return the endTime
* <code>optional int64 begin_time = 13;</code>
* @return the beginTime
*/
public long getEndTime() {
return endTime;
public long getBeginTime() {
return beginTime;
}

/**
* <code>optional int64 end_time = 4;</code>
* @param value the endTime to set
* <code>optional int64 begin_time = 13;</code>
* @param value the beginTime to set
* @return this
*/
public FarmStageGachaInfo setEndTime(final long value) {
public FarmStageGachaInfo setBeginTime(final long value) {
bitField0_ |= 0x00000001;
endTime = value;
beginTime = value;
return this;
}

/**
* <code>optional int64 begin_time = 5;</code>
* @return whether the beginTime field is set
* <code>optional int64 end_time = 14;</code>
* @return whether the endTime field is set
*/
public boolean hasBeginTime() {
public boolean hasEndTime() {
return (bitField0_ & 0x00000002) != 0;
}

/**
* <code>optional int64 begin_time = 5;</code>
* <code>optional int64 end_time = 14;</code>
* @return this
*/
public FarmStageGachaInfo clearBeginTime() {
public FarmStageGachaInfo clearEndTime() {
bitField0_ &= ~0x00000002;
beginTime = 0L;
endTime = 0L;
return this;
}

/**
* <code>optional int64 begin_time = 5;</code>
* @return the beginTime
* <code>optional int64 end_time = 14;</code>
* @return the endTime
*/
public long getBeginTime() {
return beginTime;
public long getEndTime() {
return endTime;
}

/**
* <code>optional int64 begin_time = 5;</code>
* @param value the beginTime to set
* <code>optional int64 end_time = 14;</code>
* @param value the endTime to set
* @return this
*/
public FarmStageGachaInfo setBeginTime(final long value) {
public FarmStageGachaInfo setEndTime(final long value) {
bitField0_ |= 0x00000002;
beginTime = value;
endTime = value;
return this;
}

/**
* <code>optional uint32 gacha_id = 3;</code>
* <code>optional uint32 gacha_id = 12;</code>
* @return whether the gachaId field is set
*/
public boolean hasGachaId() {
return (bitField0_ & 0x00000004) != 0;
}

/**
* <code>optional uint32 gacha_id = 3;</code>
* <code>optional uint32 gacha_id = 12;</code>
* @return this
*/
public FarmStageGachaInfo clearGachaId() {
Expand All @@ -136,15 +136,15 @@ public FarmStageGachaInfo clearGachaId() {
}

/**
* <code>optional uint32 gacha_id = 3;</code>
* <code>optional uint32 gacha_id = 12;</code>
* @return the gachaId
*/
public int getGachaId() {
return gachaId;
}

/**
* <code>optional uint32 gacha_id = 3;</code>
* <code>optional uint32 gacha_id = 12;</code>
* @param value the gachaId to set
* @return this
*/
Expand All @@ -159,8 +159,8 @@ public FarmStageGachaInfo copyFrom(final FarmStageGachaInfo other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
endTime = other.endTime;
beginTime = other.beginTime;
endTime = other.endTime;
gachaId = other.gachaId;
}
return this;
Expand All @@ -172,12 +172,12 @@ public FarmStageGachaInfo mergeFrom(final FarmStageGachaInfo other) {
return this;
}
cachedSize = -1;
if (other.hasEndTime()) {
setEndTime(other.endTime);
}
if (other.hasBeginTime()) {
setBeginTime(other.beginTime);
}
if (other.hasEndTime()) {
setEndTime(other.endTime);
}
if (other.hasGachaId()) {
setGachaId(other.gachaId);
}
Expand All @@ -191,8 +191,8 @@ public FarmStageGachaInfo clear() {
}
cachedSize = -1;
bitField0_ = 0;
endTime = 0L;
beginTime = 0L;
endTime = 0L;
gachaId = 0;
return this;
}
Expand All @@ -217,23 +217,23 @@ public boolean equals(Object o) {
}
FarmStageGachaInfo other = (FarmStageGachaInfo) o;
return bitField0_ == other.bitField0_
&& (!hasEndTime() || endTime == other.endTime)
&& (!hasBeginTime() || beginTime == other.beginTime)
&& (!hasEndTime() || endTime == other.endTime)
&& (!hasGachaId() || gachaId == other.gachaId);
}

@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 32);
output.writeInt64NoTag(endTime);
output.writeRawByte((byte) 104);
output.writeInt64NoTag(beginTime);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 40);
output.writeInt64NoTag(beginTime);
output.writeRawByte((byte) 112);
output.writeInt64NoTag(endTime);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 24);
output.writeRawByte((byte) 96);
output.writeUInt32NoTag(gachaId);
}
}
Expand All @@ -242,10 +242,10 @@ public void writeTo(final ProtoSink output) throws IOException {
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeInt64SizeNoTag(endTime);
size += 1 + ProtoSink.computeInt64SizeNoTag(beginTime);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeInt64SizeNoTag(beginTime);
size += 1 + ProtoSink.computeInt64SizeNoTag(endTime);
}
if ((bitField0_ & 0x00000004) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(gachaId);
Expand All @@ -260,25 +260,25 @@ public FarmStageGachaInfo mergeFrom(final ProtoSource input) throws IOException
int tag = input.readTag();
while (true) {
switch (tag) {
case 32: {
// endTime
endTime = input.readInt64();
case 104: {
// beginTime
beginTime = input.readInt64();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 40) {
if (tag != 112) {
break;
}
}
case 40: {
// beginTime
beginTime = input.readInt64();
case 112: {
// endTime
endTime = input.readInt64();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 24) {
if (tag != 96) {
break;
}
}
case 24: {
case 96: {
// gachaId
gachaId = input.readUInt32();
bitField0_ |= 0x00000004;
Expand All @@ -305,10 +305,10 @@ public FarmStageGachaInfo mergeFrom(final ProtoSource input) throws IOException
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeInt64(FieldNames.endTime, endTime);
output.writeInt64(FieldNames.beginTime, beginTime);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeInt64(FieldNames.beginTime, beginTime);
output.writeInt64(FieldNames.endTime, endTime);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeUInt32(FieldNames.gachaId, gachaId);
Expand All @@ -323,23 +323,23 @@ public FarmStageGachaInfo mergeFrom(final JsonSource input) throws IOException {
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case -1607243192:
case 1725551537: {
if (input.isAtField(FieldNames.endTime)) {
case -1072839914:
case 1112183971: {
if (input.isAtField(FieldNames.beginTime)) {
if (!input.trySkipNullValue()) {
endTime = input.readInt64();
beginTime = input.readInt64();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case -1072839914:
case 1112183971: {
if (input.isAtField(FieldNames.beginTime)) {
case -1607243192:
case 1725551537: {
if (input.isAtField(FieldNames.endTime)) {
if (!input.trySkipNullValue()) {
beginTime = input.readInt64();
endTime = input.readInt64();
bitField0_ |= 0x00000002;
}
} else {
Expand Down Expand Up @@ -412,10 +412,10 @@ public FarmStageGachaInfo create() {
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName endTime = FieldName.forField("endTime", "end_time");

static final FieldName beginTime = FieldName.forField("beginTime", "begin_time");

static final FieldName endTime = FieldName.forField("endTime", "end_time");

static final FieldName gachaId = FieldName.forField("gachaId", "gacha_id");
}
}
Expand Down
Loading

0 comments on commit b6fe9f2

Please sign in to comment.