Commit e6d01903 authored by chechunchi's avatar chechunchi

sync neos-protobuf

parent 7e7a8e82
neos-protobuf @ e34d37c5
Subproject commit cb96e3b24aa5a33e0cc87239434cf3c745cb59b8 Subproject commit e34d37c57a4bbbefcd18c790856f19bf947955e7
...@@ -7066,6 +7066,7 @@ export namespace ygopro { ...@@ -7066,6 +7066,7 @@ export namespace ygopro {
data?: data?:
| any[] | any[]
| { | {
flag?: number;
code?: number; code?: number;
location?: CardLocation; location?: CardLocation;
effect_description?: number; effect_description?: number;
...@@ -7082,6 +7083,9 @@ export namespace ygopro { ...@@ -7082,6 +7083,9 @@ export namespace ygopro {
this.#one_of_decls this.#one_of_decls
); );
if (!Array.isArray(data) && typeof data == "object") { if (!Array.isArray(data) && typeof data == "object") {
if ("flag" in data && data.flag != undefined) {
this.flag = data.flag;
}
if ("code" in data && data.code != undefined) { if ("code" in data && data.code != undefined) {
this.code = data.code; this.code = data.code;
} }
...@@ -7099,44 +7103,54 @@ export namespace ygopro { ...@@ -7099,44 +7103,54 @@ export namespace ygopro {
} }
} }
} }
get code() { get flag() {
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
} }
set code(value: number) { set flag(value: number) {
pb_1.Message.setField(this, 1, value); pb_1.Message.setField(this, 1, value);
} }
get code() {
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
}
set code(value: number) {
pb_1.Message.setField(this, 2, value);
}
get location() { get location() {
return pb_1.Message.getWrapperField( return pb_1.Message.getWrapperField(
this, this,
CardLocation, CardLocation,
2 3
) as CardLocation; ) as CardLocation;
} }
set location(value: CardLocation) { set location(value: CardLocation) {
pb_1.Message.setWrapperField(this, 2, value); pb_1.Message.setWrapperField(this, 3, value);
} }
get has_location() { get has_location() {
return pb_1.Message.getField(this, 2) != null; return pb_1.Message.getField(this, 3) != null;
} }
get effect_description() { get effect_description() {
return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; return pb_1.Message.getFieldWithDefault(this, 4, 0) as number;
} }
set effect_description(value: number) { set effect_description(value: number) {
pb_1.Message.setField(this, 3, value); pb_1.Message.setField(this, 4, value);
} }
get response() { get response() {
return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; return pb_1.Message.getFieldWithDefault(this, 5, 0) as number;
} }
set response(value: number) { set response(value: number) {
pb_1.Message.setField(this, 4, value); pb_1.Message.setField(this, 5, value);
} }
static fromObject(data: { static fromObject(data: {
flag?: number;
code?: number; code?: number;
location?: ReturnType<typeof CardLocation.prototype.toObject>; location?: ReturnType<typeof CardLocation.prototype.toObject>;
effect_description?: number; effect_description?: number;
response?: number; response?: number;
}): Chain { }): Chain {
const message = new Chain({}); const message = new Chain({});
if (data.flag != null) {
message.flag = data.flag;
}
if (data.code != null) { if (data.code != null) {
message.code = data.code; message.code = data.code;
} }
...@@ -7153,11 +7167,15 @@ export namespace ygopro { ...@@ -7153,11 +7167,15 @@ export namespace ygopro {
} }
toObject() { toObject() {
const data: { const data: {
flag?: number;
code?: number; code?: number;
location?: ReturnType<typeof CardLocation.prototype.toObject>; location?: ReturnType<typeof CardLocation.prototype.toObject>;
effect_description?: number; effect_description?: number;
response?: number; response?: number;
} = {}; } = {};
if (this.flag != null) {
data.flag = this.flag;
}
if (this.code != null) { if (this.code != null) {
data.code = this.code; data.code = this.code;
} }
...@@ -7176,14 +7194,15 @@ export namespace ygopro { ...@@ -7176,14 +7194,15 @@ export namespace ygopro {
serialize(w: pb_1.BinaryWriter): void; serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void { serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter(); const writer = w || new pb_1.BinaryWriter();
if (this.code != 0) writer.writeInt32(1, this.code); if (this.flag != 0) writer.writeInt32(1, this.flag);
if (this.code != 0) writer.writeInt32(2, this.code);
if (this.has_location) if (this.has_location)
writer.writeMessage(2, this.location, () => writer.writeMessage(3, this.location, () =>
this.location.serialize(writer) this.location.serialize(writer)
); );
if (this.effect_description != 0) if (this.effect_description != 0)
writer.writeInt32(3, this.effect_description); writer.writeInt32(4, this.effect_description);
if (this.response != 0) writer.writeInt32(4, this.response); if (this.response != 0) writer.writeInt32(5, this.response);
if (!w) return writer.getResultBuffer(); if (!w) return writer.getResultBuffer();
} }
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Chain { static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Chain {
...@@ -7196,18 +7215,21 @@ export namespace ygopro { ...@@ -7196,18 +7215,21 @@ export namespace ygopro {
if (reader.isEndGroup()) break; if (reader.isEndGroup()) break;
switch (reader.getFieldNumber()) { switch (reader.getFieldNumber()) {
case 1: case 1:
message.code = reader.readInt32(); message.flag = reader.readInt32();
break; break;
case 2: case 2:
message.code = reader.readInt32();
break;
case 3:
reader.readMessage( reader.readMessage(
message.location, message.location,
() => (message.location = CardLocation.deserialize(reader)) () => (message.location = CardLocation.deserialize(reader))
); );
break; break;
case 3: case 4:
message.effect_description = reader.readInt32(); message.effect_description = reader.readInt32();
break; break;
case 4: case 5:
message.response = reader.readInt32(); message.response = reader.readInt32();
break; break;
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment