proto同步
This commit is contained in:
parent
439bc47285
commit
096a2828e7
@ -1 +1 @@
|
|||||||
Subproject commit f89fd688cc80c8eb0eeec2c5f608c2319cfdea0b
|
Subproject commit d4a3340f7cee52ce5dc0c5ad4cdbe9cbe5a1d414
|
@ -9,6 +9,7 @@ export namespace iscsGraphicData {
|
|||||||
#one_of_decls: number[][] = [];
|
#one_of_decls: number[][] = [];
|
||||||
constructor(data?: any[] | {
|
constructor(data?: any[] | {
|
||||||
canvas?: Canvas;
|
canvas?: Canvas;
|
||||||
|
UniqueIdPrefix?: UniqueIdOfStationLayout;
|
||||||
}) {
|
}) {
|
||||||
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);
|
||||||
@ -16,6 +17,9 @@ export namespace iscsGraphicData {
|
|||||||
if ("canvas" in data && data.canvas != undefined) {
|
if ("canvas" in data && data.canvas != undefined) {
|
||||||
this.canvas = data.canvas;
|
this.canvas = data.canvas;
|
||||||
}
|
}
|
||||||
|
if ("UniqueIdPrefix" in data && data.UniqueIdPrefix != undefined) {
|
||||||
|
this.UniqueIdPrefix = data.UniqueIdPrefix;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get canvas() {
|
get canvas() {
|
||||||
@ -27,22 +31,39 @@ export namespace iscsGraphicData {
|
|||||||
get has_canvas() {
|
get has_canvas() {
|
||||||
return pb_1.Message.getField(this, 1) != null;
|
return pb_1.Message.getField(this, 1) != null;
|
||||||
}
|
}
|
||||||
|
get UniqueIdPrefix() {
|
||||||
|
return pb_1.Message.getWrapperField(this, UniqueIdOfStationLayout, 2) as UniqueIdOfStationLayout;
|
||||||
|
}
|
||||||
|
set UniqueIdPrefix(value: UniqueIdOfStationLayout) {
|
||||||
|
pb_1.Message.setWrapperField(this, 2, value);
|
||||||
|
}
|
||||||
|
get has_UniqueIdPrefix() {
|
||||||
|
return pb_1.Message.getField(this, 2) != null;
|
||||||
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
canvas?: ReturnType<typeof Canvas.prototype.toObject>;
|
canvas?: ReturnType<typeof Canvas.prototype.toObject>;
|
||||||
|
UniqueIdPrefix?: ReturnType<typeof UniqueIdOfStationLayout.prototype.toObject>;
|
||||||
}): IscsGraphicStorage {
|
}): IscsGraphicStorage {
|
||||||
const message = new IscsGraphicStorage({});
|
const message = new IscsGraphicStorage({});
|
||||||
if (data.canvas != null) {
|
if (data.canvas != null) {
|
||||||
message.canvas = Canvas.fromObject(data.canvas);
|
message.canvas = Canvas.fromObject(data.canvas);
|
||||||
}
|
}
|
||||||
|
if (data.UniqueIdPrefix != null) {
|
||||||
|
message.UniqueIdPrefix = UniqueIdOfStationLayout.fromObject(data.UniqueIdPrefix);
|
||||||
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
toObject() {
|
toObject() {
|
||||||
const data: {
|
const data: {
|
||||||
canvas?: ReturnType<typeof Canvas.prototype.toObject>;
|
canvas?: ReturnType<typeof Canvas.prototype.toObject>;
|
||||||
|
UniqueIdPrefix?: ReturnType<typeof UniqueIdOfStationLayout.prototype.toObject>;
|
||||||
} = {};
|
} = {};
|
||||||
if (this.canvas != null) {
|
if (this.canvas != null) {
|
||||||
data.canvas = this.canvas.toObject();
|
data.canvas = this.canvas.toObject();
|
||||||
}
|
}
|
||||||
|
if (this.UniqueIdPrefix != null) {
|
||||||
|
data.UniqueIdPrefix = this.UniqueIdPrefix.toObject();
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
serialize(): Uint8Array;
|
serialize(): Uint8Array;
|
||||||
@ -51,6 +72,8 @@ export namespace iscsGraphicData {
|
|||||||
const writer = w || new pb_1.BinaryWriter();
|
const writer = w || new pb_1.BinaryWriter();
|
||||||
if (this.has_canvas)
|
if (this.has_canvas)
|
||||||
writer.writeMessage(1, this.canvas, () => this.canvas.serialize(writer));
|
writer.writeMessage(1, this.canvas, () => this.canvas.serialize(writer));
|
||||||
|
if (this.has_UniqueIdPrefix)
|
||||||
|
writer.writeMessage(2, this.UniqueIdPrefix, () => this.UniqueIdPrefix.serialize(writer));
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -63,6 +86,9 @@ export namespace iscsGraphicData {
|
|||||||
case 1:
|
case 1:
|
||||||
reader.readMessage(message.canvas, () => message.canvas = Canvas.deserialize(reader));
|
reader.readMessage(message.canvas, () => message.canvas = Canvas.deserialize(reader));
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
reader.readMessage(message.UniqueIdPrefix, () => message.UniqueIdPrefix = UniqueIdOfStationLayout.deserialize(reader));
|
||||||
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -820,4 +846,117 @@ export namespace iscsGraphicData {
|
|||||||
return CommonInfo.deserialize(bytes);
|
return CommonInfo.deserialize(bytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
export class UniqueIdOfStationLayout extends pb_1.Message {
|
||||||
|
#one_of_decls: number[][] = [];
|
||||||
|
constructor(data?: any[] | {
|
||||||
|
city?: string;
|
||||||
|
lineId?: string;
|
||||||
|
mainCoordinateSystem?: string;
|
||||||
|
}) {
|
||||||
|
super();
|
||||||
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||||
|
if (!Array.isArray(data) && typeof data == "object") {
|
||||||
|
if ("city" in data && data.city != undefined) {
|
||||||
|
this.city = data.city;
|
||||||
|
}
|
||||||
|
if ("lineId" in data && data.lineId != undefined) {
|
||||||
|
this.lineId = data.lineId;
|
||||||
|
}
|
||||||
|
if ("mainCoordinateSystem" in data && data.mainCoordinateSystem != undefined) {
|
||||||
|
this.mainCoordinateSystem = data.mainCoordinateSystem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
get city() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
||||||
|
}
|
||||||
|
set city(value: string) {
|
||||||
|
pb_1.Message.setField(this, 1, value);
|
||||||
|
}
|
||||||
|
get lineId() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
||||||
|
}
|
||||||
|
set lineId(value: string) {
|
||||||
|
pb_1.Message.setField(this, 2, value);
|
||||||
|
}
|
||||||
|
get mainCoordinateSystem() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
|
||||||
|
}
|
||||||
|
set mainCoordinateSystem(value: string) {
|
||||||
|
pb_1.Message.setField(this, 3, value);
|
||||||
|
}
|
||||||
|
static fromObject(data: {
|
||||||
|
city?: string;
|
||||||
|
lineId?: string;
|
||||||
|
mainCoordinateSystem?: string;
|
||||||
|
}): UniqueIdOfStationLayout {
|
||||||
|
const message = new UniqueIdOfStationLayout({});
|
||||||
|
if (data.city != null) {
|
||||||
|
message.city = data.city;
|
||||||
|
}
|
||||||
|
if (data.lineId != null) {
|
||||||
|
message.lineId = data.lineId;
|
||||||
|
}
|
||||||
|
if (data.mainCoordinateSystem != null) {
|
||||||
|
message.mainCoordinateSystem = data.mainCoordinateSystem;
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
toObject() {
|
||||||
|
const data: {
|
||||||
|
city?: string;
|
||||||
|
lineId?: string;
|
||||||
|
mainCoordinateSystem?: string;
|
||||||
|
} = {};
|
||||||
|
if (this.city != null) {
|
||||||
|
data.city = this.city;
|
||||||
|
}
|
||||||
|
if (this.lineId != null) {
|
||||||
|
data.lineId = this.lineId;
|
||||||
|
}
|
||||||
|
if (this.mainCoordinateSystem != null) {
|
||||||
|
data.mainCoordinateSystem = this.mainCoordinateSystem;
|
||||||
|
}
|
||||||
|
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 (this.city.length)
|
||||||
|
writer.writeString(1, this.city);
|
||||||
|
if (this.lineId.length)
|
||||||
|
writer.writeString(2, this.lineId);
|
||||||
|
if (this.mainCoordinateSystem.length)
|
||||||
|
writer.writeString(3, this.mainCoordinateSystem);
|
||||||
|
if (!w)
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
}
|
||||||
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UniqueIdOfStationLayout {
|
||||||
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UniqueIdOfStationLayout();
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup())
|
||||||
|
break;
|
||||||
|
switch (reader.getFieldNumber()) {
|
||||||
|
case 1:
|
||||||
|
message.city = reader.readString();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
message.lineId = reader.readString();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
message.mainCoordinateSystem = reader.readString();
|
||||||
|
break;
|
||||||
|
default: reader.skipField();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
serializeBinary(): Uint8Array {
|
||||||
|
return this.serialize();
|
||||||
|
}
|
||||||
|
static deserializeBinary(bytes: Uint8Array): UniqueIdOfStationLayout {
|
||||||
|
return UniqueIdOfStationLayout.deserialize(bytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user