Commit 97f83d70 authored by Chunchi Che's avatar Chunchi Che

update neos-protobuf

parent e716ebd0
Subproject commit a54ddaec084aaf70a779f5a876d2e8554905625c Subproject commit 1ca09b1d90b55e2c155f83781c8b2a5d2ee30a04
...@@ -6,19 +6,27 @@ ...@@ -6,19 +6,27 @@
import * as pb_1 from "google-protobuf"; import * as pb_1 from "google-protobuf";
export namespace ygopro { export namespace ygopro {
export class YgoCtosMsg extends pb_1.Message { export class YgoCtosMsg extends pb_1.Message {
#one_of_decls: number[][] = [[1, 2, 3]]; #one_of_decls: number[][] = [[1, 2, 3, 4]];
constructor(data?: any[] | ({} & (({ constructor(data?: any[] | ({} & (({
ctos_player_info?: CtosPlayerInfo; ctos_player_info?: CtosPlayerInfo;
ctos_join_game?: never; ctos_join_game?: never;
ctos_update_deck?: never; ctos_update_deck?: never;
ctos_hs_ready?: never;
} | { } | {
ctos_player_info?: never; ctos_player_info?: never;
ctos_join_game?: CtosJoinGame; ctos_join_game?: CtosJoinGame;
ctos_update_deck?: never; ctos_update_deck?: never;
ctos_hs_ready?: never;
} | { } | {
ctos_player_info?: never; ctos_player_info?: never;
ctos_join_game?: never; ctos_join_game?: never;
ctos_update_deck?: CtosUpdateDeck; ctos_update_deck?: CtosUpdateDeck;
ctos_hs_ready?: never;
} | {
ctos_player_info?: never;
ctos_join_game?: never;
ctos_update_deck?: never;
ctos_hs_ready?: CtosHsReady;
})))) { })))) {
super(); super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
...@@ -32,6 +40,9 @@ export namespace ygopro { ...@@ -32,6 +40,9 @@ export namespace ygopro {
if ("ctos_update_deck" in data && data.ctos_update_deck != undefined) { if ("ctos_update_deck" in data && data.ctos_update_deck != undefined) {
this.ctos_update_deck = data.ctos_update_deck; this.ctos_update_deck = data.ctos_update_deck;
} }
if ("ctos_hs_ready" in data && data.ctos_hs_ready != undefined) {
this.ctos_hs_ready = data.ctos_hs_ready;
}
} }
} }
get ctos_player_info() { get ctos_player_info() {
...@@ -61,21 +72,32 @@ export namespace ygopro { ...@@ -61,21 +72,32 @@ export namespace ygopro {
get has_ctos_update_deck() { get has_ctos_update_deck() {
return pb_1.Message.getField(this, 3) != null; return pb_1.Message.getField(this, 3) != null;
} }
get ctos_hs_ready() {
return pb_1.Message.getWrapperField(this, CtosHsReady, 4) as CtosHsReady;
}
set ctos_hs_ready(value: CtosHsReady) {
pb_1.Message.setOneofWrapperField(this, 4, this.#one_of_decls[0], value);
}
get has_ctos_hs_ready() {
return pb_1.Message.getField(this, 4) != null;
}
get msg() { get msg() {
const cases: { const cases: {
[index: number]: "none" | "ctos_player_info" | "ctos_join_game" | "ctos_update_deck"; [index: number]: "none" | "ctos_player_info" | "ctos_join_game" | "ctos_update_deck" | "ctos_hs_ready";
} = { } = {
0: "none", 0: "none",
1: "ctos_player_info", 1: "ctos_player_info",
2: "ctos_join_game", 2: "ctos_join_game",
3: "ctos_update_deck" 3: "ctos_update_deck",
4: "ctos_hs_ready"
}; };
return cases[pb_1.Message.computeOneofCase(this, [1, 2, 3])]; return cases[pb_1.Message.computeOneofCase(this, [1, 2, 3, 4])];
} }
static fromObject(data: { static fromObject(data: {
ctos_player_info?: ReturnType<typeof CtosPlayerInfo.prototype.toObject>; ctos_player_info?: ReturnType<typeof CtosPlayerInfo.prototype.toObject>;
ctos_join_game?: ReturnType<typeof CtosJoinGame.prototype.toObject>; ctos_join_game?: ReturnType<typeof CtosJoinGame.prototype.toObject>;
ctos_update_deck?: ReturnType<typeof CtosUpdateDeck.prototype.toObject>; ctos_update_deck?: ReturnType<typeof CtosUpdateDeck.prototype.toObject>;
ctos_hs_ready?: ReturnType<typeof CtosHsReady.prototype.toObject>;
}): YgoCtosMsg { }): YgoCtosMsg {
const message = new YgoCtosMsg({}); const message = new YgoCtosMsg({});
if (data.ctos_player_info != null) { if (data.ctos_player_info != null) {
...@@ -87,6 +109,9 @@ export namespace ygopro { ...@@ -87,6 +109,9 @@ export namespace ygopro {
if (data.ctos_update_deck != null) { if (data.ctos_update_deck != null) {
message.ctos_update_deck = CtosUpdateDeck.fromObject(data.ctos_update_deck); message.ctos_update_deck = CtosUpdateDeck.fromObject(data.ctos_update_deck);
} }
if (data.ctos_hs_ready != null) {
message.ctos_hs_ready = CtosHsReady.fromObject(data.ctos_hs_ready);
}
return message; return message;
} }
toObject() { toObject() {
...@@ -94,6 +119,7 @@ export namespace ygopro { ...@@ -94,6 +119,7 @@ export namespace ygopro {
ctos_player_info?: ReturnType<typeof CtosPlayerInfo.prototype.toObject>; ctos_player_info?: ReturnType<typeof CtosPlayerInfo.prototype.toObject>;
ctos_join_game?: ReturnType<typeof CtosJoinGame.prototype.toObject>; ctos_join_game?: ReturnType<typeof CtosJoinGame.prototype.toObject>;
ctos_update_deck?: ReturnType<typeof CtosUpdateDeck.prototype.toObject>; ctos_update_deck?: ReturnType<typeof CtosUpdateDeck.prototype.toObject>;
ctos_hs_ready?: ReturnType<typeof CtosHsReady.prototype.toObject>;
} = {}; } = {};
if (this.ctos_player_info != null) { if (this.ctos_player_info != null) {
data.ctos_player_info = this.ctos_player_info.toObject(); data.ctos_player_info = this.ctos_player_info.toObject();
...@@ -104,6 +130,9 @@ export namespace ygopro { ...@@ -104,6 +130,9 @@ export namespace ygopro {
if (this.ctos_update_deck != null) { if (this.ctos_update_deck != null) {
data.ctos_update_deck = this.ctos_update_deck.toObject(); data.ctos_update_deck = this.ctos_update_deck.toObject();
} }
if (this.ctos_hs_ready != null) {
data.ctos_hs_ready = this.ctos_hs_ready.toObject();
}
return data; return data;
} }
serialize(): Uint8Array; serialize(): Uint8Array;
...@@ -116,6 +145,8 @@ export namespace ygopro { ...@@ -116,6 +145,8 @@ export namespace ygopro {
writer.writeMessage(2, this.ctos_join_game, () => this.ctos_join_game.serialize(writer)); writer.writeMessage(2, this.ctos_join_game, () => this.ctos_join_game.serialize(writer));
if (this.has_ctos_update_deck) if (this.has_ctos_update_deck)
writer.writeMessage(3, this.ctos_update_deck, () => this.ctos_update_deck.serialize(writer)); writer.writeMessage(3, this.ctos_update_deck, () => this.ctos_update_deck.serialize(writer));
if (this.has_ctos_hs_ready)
writer.writeMessage(4, this.ctos_hs_ready, () => this.ctos_hs_ready.serialize(writer));
if (!w) if (!w)
return writer.getResultBuffer(); return writer.getResultBuffer();
} }
...@@ -134,6 +165,9 @@ export namespace ygopro { ...@@ -134,6 +165,9 @@ export namespace ygopro {
case 3: case 3:
reader.readMessage(message.ctos_update_deck, () => message.ctos_update_deck = CtosUpdateDeck.deserialize(reader)); reader.readMessage(message.ctos_update_deck, () => message.ctos_update_deck = CtosUpdateDeck.deserialize(reader));
break; break;
case 4:
reader.readMessage(message.ctos_hs_ready, () => message.ctos_hs_ready = CtosHsReady.deserialize(reader));
break;
default: reader.skipField(); default: reader.skipField();
} }
} }
...@@ -614,6 +648,46 @@ export namespace ygopro { ...@@ -614,6 +648,46 @@ export namespace ygopro {
return CtosUpdateDeck.deserialize(bytes); return CtosUpdateDeck.deserialize(bytes);
} }
} }
export class CtosHsReady extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") { }
}
static fromObject(data: {}): CtosHsReady {
const message = new CtosHsReady({});
return message;
}
toObject() {
const data: {} = {};
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CtosHsReady {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CtosHsReady();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): CtosHsReady {
return CtosHsReady.deserialize(bytes);
}
}
export class StocJoinGame extends pb_1.Message { export class StocJoinGame extends pb_1.Message {
#one_of_decls: number[][] = []; #one_of_decls: number[][] = [];
constructor(data?: any[] | { constructor(data?: any[] | {
......
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