mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-12 13:24:36 +01:00
Fix buy goods proto
This commit is contained in:
@@ -19,22 +19,22 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_num = 3;</code>
|
||||
*/
|
||||
private int goodsNum;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_id = 8;</code>
|
||||
*/
|
||||
private int goodsId;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 item_id = 9;</code>
|
||||
* <code>optional uint32 item_id = 3;</code>
|
||||
*/
|
||||
private int itemId;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 shop_id = 11;</code>
|
||||
* <code>optional uint32 goods_num = 4;</code>
|
||||
*/
|
||||
private int goodsNum;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_id = 6;</code>
|
||||
*/
|
||||
private int goodsId;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 shop_id = 13;</code>
|
||||
*/
|
||||
private int shopId;
|
||||
|
||||
@@ -49,99 +49,25 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_num = 3;</code>
|
||||
* @return whether the goodsNum field is set
|
||||
* <code>optional uint32 item_id = 3;</code>
|
||||
* @return whether the itemId field is set
|
||||
*/
|
||||
public boolean hasGoodsNum() {
|
||||
public boolean hasItemId() {
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_num = 3;</code>
|
||||
* @return this
|
||||
*/
|
||||
public BuyGoodsCsReq clearGoodsNum() {
|
||||
bitField0_ &= ~0x00000001;
|
||||
goodsNum = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_num = 3;</code>
|
||||
* @return the goodsNum
|
||||
*/
|
||||
public int getGoodsNum() {
|
||||
return goodsNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_num = 3;</code>
|
||||
* @param value the goodsNum to set
|
||||
* @return this
|
||||
*/
|
||||
public BuyGoodsCsReq setGoodsNum(final int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
goodsNum = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_id = 8;</code>
|
||||
* @return whether the goodsId field is set
|
||||
*/
|
||||
public boolean hasGoodsId() {
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_id = 8;</code>
|
||||
* @return this
|
||||
*/
|
||||
public BuyGoodsCsReq clearGoodsId() {
|
||||
bitField0_ &= ~0x00000002;
|
||||
goodsId = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_id = 8;</code>
|
||||
* @return the goodsId
|
||||
*/
|
||||
public int getGoodsId() {
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_id = 8;</code>
|
||||
* @param value the goodsId to set
|
||||
* @return this
|
||||
*/
|
||||
public BuyGoodsCsReq setGoodsId(final int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
goodsId = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 item_id = 9;</code>
|
||||
* @return whether the itemId field is set
|
||||
*/
|
||||
public boolean hasItemId() {
|
||||
return (bitField0_ & 0x00000004) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 item_id = 9;</code>
|
||||
* <code>optional uint32 item_id = 3;</code>
|
||||
* @return this
|
||||
*/
|
||||
public BuyGoodsCsReq clearItemId() {
|
||||
bitField0_ &= ~0x00000004;
|
||||
bitField0_ &= ~0x00000001;
|
||||
itemId = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 item_id = 9;</code>
|
||||
* <code>optional uint32 item_id = 3;</code>
|
||||
* @return the itemId
|
||||
*/
|
||||
public int getItemId() {
|
||||
@@ -149,18 +75,92 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 item_id = 9;</code>
|
||||
* <code>optional uint32 item_id = 3;</code>
|
||||
* @param value the itemId to set
|
||||
* @return this
|
||||
*/
|
||||
public BuyGoodsCsReq setItemId(final int value) {
|
||||
bitField0_ |= 0x00000004;
|
||||
bitField0_ |= 0x00000001;
|
||||
itemId = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 shop_id = 11;</code>
|
||||
* <code>optional uint32 goods_num = 4;</code>
|
||||
* @return whether the goodsNum field is set
|
||||
*/
|
||||
public boolean hasGoodsNum() {
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_num = 4;</code>
|
||||
* @return this
|
||||
*/
|
||||
public BuyGoodsCsReq clearGoodsNum() {
|
||||
bitField0_ &= ~0x00000002;
|
||||
goodsNum = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_num = 4;</code>
|
||||
* @return the goodsNum
|
||||
*/
|
||||
public int getGoodsNum() {
|
||||
return goodsNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_num = 4;</code>
|
||||
* @param value the goodsNum to set
|
||||
* @return this
|
||||
*/
|
||||
public BuyGoodsCsReq setGoodsNum(final int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
goodsNum = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_id = 6;</code>
|
||||
* @return whether the goodsId field is set
|
||||
*/
|
||||
public boolean hasGoodsId() {
|
||||
return (bitField0_ & 0x00000004) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_id = 6;</code>
|
||||
* @return this
|
||||
*/
|
||||
public BuyGoodsCsReq clearGoodsId() {
|
||||
bitField0_ &= ~0x00000004;
|
||||
goodsId = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_id = 6;</code>
|
||||
* @return the goodsId
|
||||
*/
|
||||
public int getGoodsId() {
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 goods_id = 6;</code>
|
||||
* @param value the goodsId to set
|
||||
* @return this
|
||||
*/
|
||||
public BuyGoodsCsReq setGoodsId(final int value) {
|
||||
bitField0_ |= 0x00000004;
|
||||
goodsId = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 shop_id = 13;</code>
|
||||
* @return whether the shopId field is set
|
||||
*/
|
||||
public boolean hasShopId() {
|
||||
@@ -168,7 +168,7 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 shop_id = 11;</code>
|
||||
* <code>optional uint32 shop_id = 13;</code>
|
||||
* @return this
|
||||
*/
|
||||
public BuyGoodsCsReq clearShopId() {
|
||||
@@ -178,7 +178,7 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 shop_id = 11;</code>
|
||||
* <code>optional uint32 shop_id = 13;</code>
|
||||
* @return the shopId
|
||||
*/
|
||||
public int getShopId() {
|
||||
@@ -186,7 +186,7 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 shop_id = 11;</code>
|
||||
* <code>optional uint32 shop_id = 13;</code>
|
||||
* @param value the shopId to set
|
||||
* @return this
|
||||
*/
|
||||
@@ -201,9 +201,9 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
itemId = other.itemId;
|
||||
goodsNum = other.goodsNum;
|
||||
goodsId = other.goodsId;
|
||||
itemId = other.itemId;
|
||||
shopId = other.shopId;
|
||||
}
|
||||
return this;
|
||||
@@ -215,15 +215,15 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasItemId()) {
|
||||
setItemId(other.itemId);
|
||||
}
|
||||
if (other.hasGoodsNum()) {
|
||||
setGoodsNum(other.goodsNum);
|
||||
}
|
||||
if (other.hasGoodsId()) {
|
||||
setGoodsId(other.goodsId);
|
||||
}
|
||||
if (other.hasItemId()) {
|
||||
setItemId(other.itemId);
|
||||
}
|
||||
if (other.hasShopId()) {
|
||||
setShopId(other.shopId);
|
||||
}
|
||||
@@ -237,9 +237,9 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
itemId = 0;
|
||||
goodsNum = 0;
|
||||
goodsId = 0;
|
||||
itemId = 0;
|
||||
shopId = 0;
|
||||
return this;
|
||||
}
|
||||
@@ -264,9 +264,9 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
}
|
||||
BuyGoodsCsReq other = (BuyGoodsCsReq) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasItemId() || itemId == other.itemId)
|
||||
&& (!hasGoodsNum() || goodsNum == other.goodsNum)
|
||||
&& (!hasGoodsId() || goodsId == other.goodsId)
|
||||
&& (!hasItemId() || itemId == other.itemId)
|
||||
&& (!hasShopId() || shopId == other.shopId);
|
||||
}
|
||||
|
||||
@@ -274,18 +274,18 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeRawByte((byte) 24);
|
||||
output.writeUInt32NoTag(goodsNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeRawByte((byte) 64);
|
||||
output.writeUInt32NoTag(goodsId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeRawByte((byte) 72);
|
||||
output.writeUInt32NoTag(itemId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeRawByte((byte) 32);
|
||||
output.writeUInt32NoTag(goodsNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeRawByte((byte) 48);
|
||||
output.writeUInt32NoTag(goodsId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000008) != 0) {
|
||||
output.writeRawByte((byte) 88);
|
||||
output.writeRawByte((byte) 104);
|
||||
output.writeUInt32NoTag(shopId);
|
||||
}
|
||||
}
|
||||
@@ -294,13 +294,13 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(goodsNum);
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(itemId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(goodsId);
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(goodsNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(itemId);
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(goodsId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000008) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(shopId);
|
||||
@@ -316,33 +316,33 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
case 24: {
|
||||
// goodsNum
|
||||
goodsNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
tag = input.readTag();
|
||||
if (tag != 64) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 64: {
|
||||
// goodsId
|
||||
goodsId = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
tag = input.readTag();
|
||||
if (tag != 72) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 72: {
|
||||
// itemId
|
||||
itemId = input.readUInt32();
|
||||
bitField0_ |= 0x00000004;
|
||||
bitField0_ |= 0x00000001;
|
||||
tag = input.readTag();
|
||||
if (tag != 88) {
|
||||
if (tag != 32) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 88: {
|
||||
case 32: {
|
||||
// goodsNum
|
||||
goodsNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
tag = input.readTag();
|
||||
if (tag != 48) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 48: {
|
||||
// goodsId
|
||||
goodsId = input.readUInt32();
|
||||
bitField0_ |= 0x00000004;
|
||||
tag = input.readTag();
|
||||
if (tag != 104) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 104: {
|
||||
// shopId
|
||||
shopId = input.readUInt32();
|
||||
bitField0_ |= 0x00000008;
|
||||
@@ -369,13 +369,13 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
public void writeTo(final JsonSink output) throws IOException {
|
||||
output.beginObject();
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeUInt32(FieldNames.goodsNum, goodsNum);
|
||||
output.writeUInt32(FieldNames.itemId, itemId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeUInt32(FieldNames.goodsId, goodsId);
|
||||
output.writeUInt32(FieldNames.goodsNum, goodsNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeUInt32(FieldNames.itemId, itemId);
|
||||
output.writeUInt32(FieldNames.goodsId, goodsId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000008) != 0) {
|
||||
output.writeUInt32(FieldNames.shopId, shopId);
|
||||
@@ -390,12 +390,24 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
}
|
||||
while (!input.isAtEnd()) {
|
||||
switch (input.readFieldHash()) {
|
||||
case -1178662002:
|
||||
case 2116204999: {
|
||||
if (input.isAtField(FieldNames.itemId)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
itemId = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2123191376:
|
||||
case 1394923293: {
|
||||
if (input.isAtField(FieldNames.goodsNum)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
goodsNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
@@ -407,18 +419,6 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
if (input.isAtField(FieldNames.goodsId)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
goodsId = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case -1178662002:
|
||||
case 2116204999: {
|
||||
if (input.isAtField(FieldNames.itemId)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
itemId = input.readUInt32();
|
||||
bitField0_ |= 0x00000004;
|
||||
}
|
||||
} else {
|
||||
@@ -490,12 +490,12 @@ public final class BuyGoodsCsReqOuterClass {
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName itemId = FieldName.forField("itemId", "item_id");
|
||||
|
||||
static final FieldName goodsNum = FieldName.forField("goodsNum", "goods_num");
|
||||
|
||||
static final FieldName goodsId = FieldName.forField("goodsId", "goods_id");
|
||||
|
||||
static final FieldName itemId = FieldName.forField("itemId", "item_id");
|
||||
|
||||
static final FieldName shopId = FieldName.forField("shopId", "shop_id");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user