Fix buy goods proto

This commit is contained in:
Melledy
2024-06-19 05:03:20 -07:00
parent 66e50c91dc
commit 0b4f9aee27

View File

@@ -19,22 +19,22 @@ public final class BuyGoodsCsReqOuterClass {
private static final long serialVersionUID = 0L; private static final long serialVersionUID = 0L;
/** /**
* <code>optional uint32 goods_num = 3;</code> * <code>optional uint32 item_id = 3;</code>
*/
private int goodsNum;
/**
* <code>optional uint32 goods_id = 8;</code>
*/
private int goodsId;
/**
* <code>optional uint32 item_id = 9;</code>
*/ */
private int itemId; 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; private int shopId;
@@ -49,99 +49,25 @@ public final class BuyGoodsCsReqOuterClass {
} }
/** /**
* <code>optional uint32 goods_num = 3;</code> * <code>optional uint32 item_id = 3;</code>
* @return whether the goodsNum field is set * @return whether the itemId field is set
*/ */
public boolean hasGoodsNum() { public boolean hasItemId() {
return (bitField0_ & 0x00000001) != 0; return (bitField0_ & 0x00000001) != 0;
} }
/** /**
* <code>optional uint32 goods_num = 3;</code> * <code>optional uint32 item_id = 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>
* @return this * @return this
*/ */
public BuyGoodsCsReq clearItemId() { public BuyGoodsCsReq clearItemId() {
bitField0_ &= ~0x00000004; bitField0_ &= ~0x00000001;
itemId = 0; itemId = 0;
return this; return this;
} }
/** /**
* <code>optional uint32 item_id = 9;</code> * <code>optional uint32 item_id = 3;</code>
* @return the itemId * @return the itemId
*/ */
public int getItemId() { 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 * @param value the itemId to set
* @return this * @return this
*/ */
public BuyGoodsCsReq setItemId(final int value) { public BuyGoodsCsReq setItemId(final int value) {
bitField0_ |= 0x00000004; bitField0_ |= 0x00000001;
itemId = value; itemId = value;
return this; 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 * @return whether the shopId field is set
*/ */
public boolean hasShopId() { 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 * @return this
*/ */
public BuyGoodsCsReq clearShopId() { 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 * @return the shopId
*/ */
public int getShopId() { 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 * @param value the shopId to set
* @return this * @return this
*/ */
@@ -201,9 +201,9 @@ public final class BuyGoodsCsReqOuterClass {
cachedSize = other.cachedSize; cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) { if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_; bitField0_ = other.bitField0_;
itemId = other.itemId;
goodsNum = other.goodsNum; goodsNum = other.goodsNum;
goodsId = other.goodsId; goodsId = other.goodsId;
itemId = other.itemId;
shopId = other.shopId; shopId = other.shopId;
} }
return this; return this;
@@ -215,15 +215,15 @@ public final class BuyGoodsCsReqOuterClass {
return this; return this;
} }
cachedSize = -1; cachedSize = -1;
if (other.hasItemId()) {
setItemId(other.itemId);
}
if (other.hasGoodsNum()) { if (other.hasGoodsNum()) {
setGoodsNum(other.goodsNum); setGoodsNum(other.goodsNum);
} }
if (other.hasGoodsId()) { if (other.hasGoodsId()) {
setGoodsId(other.goodsId); setGoodsId(other.goodsId);
} }
if (other.hasItemId()) {
setItemId(other.itemId);
}
if (other.hasShopId()) { if (other.hasShopId()) {
setShopId(other.shopId); setShopId(other.shopId);
} }
@@ -237,9 +237,9 @@ public final class BuyGoodsCsReqOuterClass {
} }
cachedSize = -1; cachedSize = -1;
bitField0_ = 0; bitField0_ = 0;
itemId = 0;
goodsNum = 0; goodsNum = 0;
goodsId = 0; goodsId = 0;
itemId = 0;
shopId = 0; shopId = 0;
return this; return this;
} }
@@ -264,9 +264,9 @@ public final class BuyGoodsCsReqOuterClass {
} }
BuyGoodsCsReq other = (BuyGoodsCsReq) o; BuyGoodsCsReq other = (BuyGoodsCsReq) o;
return bitField0_ == other.bitField0_ return bitField0_ == other.bitField0_
&& (!hasItemId() || itemId == other.itemId)
&& (!hasGoodsNum() || goodsNum == other.goodsNum) && (!hasGoodsNum() || goodsNum == other.goodsNum)
&& (!hasGoodsId() || goodsId == other.goodsId) && (!hasGoodsId() || goodsId == other.goodsId)
&& (!hasItemId() || itemId == other.itemId)
&& (!hasShopId() || shopId == other.shopId); && (!hasShopId() || shopId == other.shopId);
} }
@@ -274,18 +274,18 @@ public final class BuyGoodsCsReqOuterClass {
public void writeTo(final ProtoSink output) throws IOException { public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) { if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 24); 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); 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) { if ((bitField0_ & 0x00000008) != 0) {
output.writeRawByte((byte) 88); output.writeRawByte((byte) 104);
output.writeUInt32NoTag(shopId); output.writeUInt32NoTag(shopId);
} }
} }
@@ -294,13 +294,13 @@ public final class BuyGoodsCsReqOuterClass {
protected int computeSerializedSize() { protected int computeSerializedSize() {
int size = 0; int size = 0;
if ((bitField0_ & 0x00000001) != 0) { if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(goodsNum); size += 1 + ProtoSink.computeUInt32SizeNoTag(itemId);
} }
if ((bitField0_ & 0x00000002) != 0) { if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(goodsId); size += 1 + ProtoSink.computeUInt32SizeNoTag(goodsNum);
} }
if ((bitField0_ & 0x00000004) != 0) { if ((bitField0_ & 0x00000004) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(itemId); size += 1 + ProtoSink.computeUInt32SizeNoTag(goodsId);
} }
if ((bitField0_ & 0x00000008) != 0) { if ((bitField0_ & 0x00000008) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(shopId); size += 1 + ProtoSink.computeUInt32SizeNoTag(shopId);
@@ -316,33 +316,33 @@ public final class BuyGoodsCsReqOuterClass {
while (true) { while (true) {
switch (tag) { switch (tag) {
case 24: { 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
itemId = input.readUInt32(); itemId = input.readUInt32();
bitField0_ |= 0x00000004; bitField0_ |= 0x00000001;
tag = input.readTag(); tag = input.readTag();
if (tag != 88) { if (tag != 32) {
break; 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
shopId = input.readUInt32(); shopId = input.readUInt32();
bitField0_ |= 0x00000008; bitField0_ |= 0x00000008;
@@ -369,13 +369,13 @@ public final class BuyGoodsCsReqOuterClass {
public void writeTo(final JsonSink output) throws IOException { public void writeTo(final JsonSink output) throws IOException {
output.beginObject(); output.beginObject();
if ((bitField0_ & 0x00000001) != 0) { if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.goodsNum, goodsNum); output.writeUInt32(FieldNames.itemId, itemId);
} }
if ((bitField0_ & 0x00000002) != 0) { if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.goodsId, goodsId); output.writeUInt32(FieldNames.goodsNum, goodsNum);
} }
if ((bitField0_ & 0x00000004) != 0) { if ((bitField0_ & 0x00000004) != 0) {
output.writeUInt32(FieldNames.itemId, itemId); output.writeUInt32(FieldNames.goodsId, goodsId);
} }
if ((bitField0_ & 0x00000008) != 0) { if ((bitField0_ & 0x00000008) != 0) {
output.writeUInt32(FieldNames.shopId, shopId); output.writeUInt32(FieldNames.shopId, shopId);
@@ -390,12 +390,24 @@ public final class BuyGoodsCsReqOuterClass {
} }
while (!input.isAtEnd()) { while (!input.isAtEnd()) {
switch (input.readFieldHash()) { 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 2123191376:
case 1394923293: { case 1394923293: {
if (input.isAtField(FieldNames.goodsNum)) { if (input.isAtField(FieldNames.goodsNum)) {
if (!input.trySkipNullValue()) { if (!input.trySkipNullValue()) {
goodsNum = input.readUInt32(); goodsNum = input.readUInt32();
bitField0_ |= 0x00000001; bitField0_ |= 0x00000002;
} }
} else { } else {
input.skipUnknownField(); input.skipUnknownField();
@@ -407,18 +419,6 @@ public final class BuyGoodsCsReqOuterClass {
if (input.isAtField(FieldNames.goodsId)) { if (input.isAtField(FieldNames.goodsId)) {
if (!input.trySkipNullValue()) { if (!input.trySkipNullValue()) {
goodsId = input.readUInt32(); 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; bitField0_ |= 0x00000004;
} }
} else { } else {
@@ -490,12 +490,12 @@ public final class BuyGoodsCsReqOuterClass {
* Contains name constants used for serializing JSON * Contains name constants used for serializing JSON
*/ */
static class FieldNames { static class FieldNames {
static final FieldName itemId = FieldName.forField("itemId", "item_id");
static final FieldName goodsNum = FieldName.forField("goodsNum", "goods_num"); static final FieldName goodsNum = FieldName.forField("goodsNum", "goods_num");
static final FieldName goodsId = FieldName.forField("goodsId", "goods_id"); 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"); static final FieldName shopId = FieldName.forField("shopId", "shop_id");
} }
} }