diff --git a/rtss-proto-msg b/rtss-proto-msg index 5cb82e7..d5735a5 160000 --- a/rtss-proto-msg +++ b/rtss-proto-msg @@ -1 +1 @@ -Subproject commit 5cb82e750f4f4e6d9523ab9a8a24a4148d12950a +Subproject commit d5735a58f40f7e013e4a4789e47b46e6f3f99adc diff --git a/src/protos/basic_signal_data.ts b/src/protos/basic_signal_data.ts index 21f52b2..112e2db 100644 --- a/src/protos/basic_signal_data.ts +++ b/src/protos/basic_signal_data.ts @@ -1,6 +1,6 @@ /** * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.22.0 + * compiler version: 5.27.4 * source: basic_signal_data.proto * git: https://github.com/thesayyn/protoc-gen-ts */ import * as pb_1 from "google-protobuf"; diff --git a/src/protos/iscs_graphic_data.ts b/src/protos/iscs_graphic_data.ts index cd6045a..49436ec 100644 --- a/src/protos/iscs_graphic_data.ts +++ b/src/protos/iscs_graphic_data.ts @@ -3,1534 +3,1099 @@ * compiler version: 5.27.4 * source: iscs_graphic_data.proto * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as pb_1 from 'google-protobuf'; +import * as pb_1 from "google-protobuf"; export namespace iscsGraphicData { - export class IscsGraphicStorage extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor( - data?: - | any[] - | { + export class IscsGraphicStorage extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { canvas?: Canvas; UniqueIdPrefix?: UniqueIdOfStationLayout; arrows?: Arrow[]; - iscsTexts?: IscsText[]; - } - ) { - super(); - pb_1.Message.initialize( - this, - Array.isArray(data) ? data : [], - 0, - -1, - [3, 4], - this.#one_of_decls - ); - if (!Array.isArray(data) && typeof data == 'object') { - if ('canvas' in data && data.canvas != undefined) { - this.canvas = data.canvas; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("canvas" in data && data.canvas != undefined) { + this.canvas = data.canvas; + } + if ("UniqueIdPrefix" in data && data.UniqueIdPrefix != undefined) { + this.UniqueIdPrefix = data.UniqueIdPrefix; + } + if ("arrows" in data && data.arrows != undefined) { + this.arrows = data.arrows; + } + } } - if ('UniqueIdPrefix' in data && data.UniqueIdPrefix != undefined) { - this.UniqueIdPrefix = data.UniqueIdPrefix; + get canvas() { + return pb_1.Message.getWrapperField(this, Canvas, 1) as Canvas; } - if ('arrows' in data && data.arrows != undefined) { - this.arrows = data.arrows; + set canvas(value: Canvas) { + pb_1.Message.setWrapperField(this, 1, value); } - if ('iscsTexts' in data && data.iscsTexts != undefined) { - this.iscsTexts = data.iscsTexts; + get has_canvas() { + return pb_1.Message.getField(this, 1) != null; } - } - } - get canvas() { - return pb_1.Message.getWrapperField(this, Canvas, 1) as Canvas; - } - set canvas(value: Canvas) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_canvas() { - 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; - } - get arrows() { - return pb_1.Message.getRepeatedWrapperField(this, Arrow, 3) as Arrow[]; - } - set arrows(value: Arrow[]) { - pb_1.Message.setRepeatedWrapperField(this, 3, value); - } - get iscsTexts() { - return pb_1.Message.getRepeatedWrapperField( - this, - IscsText, - 4 - ) as IscsText[]; - } - set iscsTexts(value: IscsText[]) { - pb_1.Message.setRepeatedWrapperField(this, 4, value); - } - static fromObject(data: { - canvas?: ReturnType; - UniqueIdPrefix?: ReturnType< - typeof UniqueIdOfStationLayout.prototype.toObject - >; - arrows?: ReturnType[]; - iscsTexts?: ReturnType[]; - }): IscsGraphicStorage { - const message = new IscsGraphicStorage({}); - if (data.canvas != null) { - message.canvas = Canvas.fromObject(data.canvas); - } - if (data.UniqueIdPrefix != null) { - message.UniqueIdPrefix = UniqueIdOfStationLayout.fromObject( - data.UniqueIdPrefix - ); - } - if (data.arrows != null) { - message.arrows = data.arrows.map((item) => Arrow.fromObject(item)); - } - if (data.iscsTexts != null) { - message.iscsTexts = data.iscsTexts.map((item) => - IscsText.fromObject(item) - ); - } - return message; - } - toObject() { - const data: { - canvas?: ReturnType; - UniqueIdPrefix?: ReturnType< - typeof UniqueIdOfStationLayout.prototype.toObject - >; - arrows?: ReturnType[]; - iscsTexts?: ReturnType[]; - } = {}; - if (this.canvas != null) { - data.canvas = this.canvas.toObject(); - } - if (this.UniqueIdPrefix != null) { - data.UniqueIdPrefix = this.UniqueIdPrefix.toObject(); - } - if (this.arrows != null) { - data.arrows = this.arrows.map((item: Arrow) => item.toObject()); - } - if (this.iscsTexts != null) { - data.iscsTexts = this.iscsTexts.map((item: IscsText) => - item.toObject() - ); - } - 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.has_canvas) - writer.writeMessage(1, this.canvas, () => - this.canvas.serialize(writer) - ); - if (this.has_UniqueIdPrefix) - writer.writeMessage(2, this.UniqueIdPrefix, () => - this.UniqueIdPrefix.serialize(writer) - ); - if (this.arrows.length) - writer.writeRepeatedMessage(3, this.arrows, (item: Arrow) => - item.serialize(writer) - ); - if (this.iscsTexts.length) - writer.writeRepeatedMessage(4, this.iscsTexts, (item: IscsText) => - item.serialize(writer) - ); - if (!w) return writer.getResultBuffer(); - } - static deserialize( - bytes: Uint8Array | pb_1.BinaryReader - ): IscsGraphicStorage { - const reader = - bytes instanceof pb_1.BinaryReader - ? bytes - : new pb_1.BinaryReader(bytes), - message = new IscsGraphicStorage(); - while (reader.nextField()) { - if (reader.isEndGroup()) break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage( - message.canvas, - () => (message.canvas = Canvas.deserialize(reader)) - ); - break; - case 2: - reader.readMessage( - message.UniqueIdPrefix, - () => - (message.UniqueIdPrefix = - UniqueIdOfStationLayout.deserialize(reader)) - ); - break; - case 3: - reader.readMessage(message.arrows, () => - pb_1.Message.addToRepeatedWrapperField( - message, - 3, - Arrow.deserialize(reader), - Arrow - ) - ); - break; - case 4: - reader.readMessage(message.iscsTexts, () => - pb_1.Message.addToRepeatedWrapperField( - message, - 4, - IscsText.deserialize(reader), - IscsText - ) - ); - break; - default: - reader.skipField(); + 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; + } + get arrows() { + return pb_1.Message.getRepeatedWrapperField(this, Arrow, 3) as Arrow[]; + } + set arrows(value: Arrow[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + canvas?: ReturnType; + UniqueIdPrefix?: ReturnType; + arrows?: ReturnType[]; + }): IscsGraphicStorage { + const message = new IscsGraphicStorage({}); + if (data.canvas != null) { + message.canvas = Canvas.fromObject(data.canvas); + } + if (data.UniqueIdPrefix != null) { + message.UniqueIdPrefix = UniqueIdOfStationLayout.fromObject(data.UniqueIdPrefix); + } + if (data.arrows != null) { + message.arrows = data.arrows.map(item => Arrow.fromObject(item)); + } + return message; + } + toObject() { + const data: { + canvas?: ReturnType; + UniqueIdPrefix?: ReturnType; + arrows?: ReturnType[]; + } = {}; + if (this.canvas != null) { + data.canvas = this.canvas.toObject(); + } + if (this.UniqueIdPrefix != null) { + data.UniqueIdPrefix = this.UniqueIdPrefix.toObject(); + } + if (this.arrows != null) { + data.arrows = this.arrows.map((item: Arrow) => item.toObject()); + } + 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.has_canvas) + writer.writeMessage(1, this.canvas, () => this.canvas.serialize(writer)); + if (this.has_UniqueIdPrefix) + writer.writeMessage(2, this.UniqueIdPrefix, () => this.UniqueIdPrefix.serialize(writer)); + if (this.arrows.length) + writer.writeRepeatedMessage(3, this.arrows, (item: Arrow) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IscsGraphicStorage { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IscsGraphicStorage(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.canvas, () => message.canvas = Canvas.deserialize(reader)); + break; + case 2: + reader.readMessage(message.UniqueIdPrefix, () => message.UniqueIdPrefix = UniqueIdOfStationLayout.deserialize(reader)); + break; + case 3: + reader.readMessage(message.arrows, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Arrow.deserialize(reader), Arrow)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): IscsGraphicStorage { + return IscsGraphicStorage.deserialize(bytes); } - } - return message; } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): IscsGraphicStorage { - return IscsGraphicStorage.deserialize(bytes); - } - } - export class Canvas extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor( - data?: - | any[] - | { + export class Canvas extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { width?: number; height?: number; backgroundColor?: string; viewportTransform?: Transform; gridBackground?: Grid; - } - ) { - super(); - pb_1.Message.initialize( - this, - Array.isArray(data) ? data : [], - 0, - -1, - [], - this.#one_of_decls - ); - if (!Array.isArray(data) && typeof data == 'object') { - if ('width' in data && data.width != undefined) { - this.width = data.width; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("width" in data && data.width != undefined) { + this.width = data.width; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("backgroundColor" in data && data.backgroundColor != undefined) { + this.backgroundColor = data.backgroundColor; + } + if ("viewportTransform" in data && data.viewportTransform != undefined) { + this.viewportTransform = data.viewportTransform; + } + if ("gridBackground" in data && data.gridBackground != undefined) { + this.gridBackground = data.gridBackground; + } + } } - if ('height' in data && data.height != undefined) { - this.height = data.height; + get width() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; } - if ('backgroundColor' in data && data.backgroundColor != undefined) { - this.backgroundColor = data.backgroundColor; + set width(value: number) { + pb_1.Message.setField(this, 1, value); } - if ( - 'viewportTransform' in data && - data.viewportTransform != undefined - ) { - this.viewportTransform = data.viewportTransform; + get height() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; } - if ('gridBackground' in data && data.gridBackground != undefined) { - this.gridBackground = data.gridBackground; + set height(value: number) { + pb_1.Message.setField(this, 2, value); } - } - } - get width() { - return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; - } - set width(value: number) { - pb_1.Message.setField(this, 1, value); - } - get height() { - return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; - } - set height(value: number) { - pb_1.Message.setField(this, 2, value); - } - get backgroundColor() { - return pb_1.Message.getFieldWithDefault(this, 3, '') as string; - } - set backgroundColor(value: string) { - pb_1.Message.setField(this, 3, value); - } - get viewportTransform() { - return pb_1.Message.getWrapperField(this, Transform, 4) as Transform; - } - set viewportTransform(value: Transform) { - pb_1.Message.setWrapperField(this, 4, value); - } - get has_viewportTransform() { - return pb_1.Message.getField(this, 4) != null; - } - get gridBackground() { - return pb_1.Message.getWrapperField(this, Grid, 5) as Grid; - } - set gridBackground(value: Grid) { - pb_1.Message.setWrapperField(this, 5, value); - } - get has_gridBackground() { - return pb_1.Message.getField(this, 5) != null; - } - static fromObject(data: { - width?: number; - height?: number; - backgroundColor?: string; - viewportTransform?: ReturnType; - gridBackground?: ReturnType; - }): Canvas { - const message = new Canvas({}); - if (data.width != null) { - message.width = data.width; - } - if (data.height != null) { - message.height = data.height; - } - if (data.backgroundColor != null) { - message.backgroundColor = data.backgroundColor; - } - if (data.viewportTransform != null) { - message.viewportTransform = Transform.fromObject( - data.viewportTransform - ); - } - if (data.gridBackground != null) { - message.gridBackground = Grid.fromObject(data.gridBackground); - } - return message; - } - toObject() { - const data: { - width?: number; - height?: number; - backgroundColor?: string; - viewportTransform?: ReturnType; - gridBackground?: ReturnType; - } = {}; - if (this.width != null) { - data.width = this.width; - } - if (this.height != null) { - data.height = this.height; - } - if (this.backgroundColor != null) { - data.backgroundColor = this.backgroundColor; - } - if (this.viewportTransform != null) { - data.viewportTransform = this.viewportTransform.toObject(); - } - if (this.gridBackground != null) { - data.gridBackground = this.gridBackground.toObject(); - } - 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.width != 0) writer.writeInt32(1, this.width); - if (this.height != 0) writer.writeInt32(2, this.height); - if (this.backgroundColor.length) - writer.writeString(3, this.backgroundColor); - if (this.has_viewportTransform) - writer.writeMessage(4, this.viewportTransform, () => - this.viewportTransform.serialize(writer) - ); - if (this.has_gridBackground) - writer.writeMessage(5, this.gridBackground, () => - this.gridBackground.serialize(writer) - ); - if (!w) return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Canvas { - const reader = - bytes instanceof pb_1.BinaryReader - ? bytes - : new pb_1.BinaryReader(bytes), - message = new Canvas(); - while (reader.nextField()) { - if (reader.isEndGroup()) break; - switch (reader.getFieldNumber()) { - case 1: - message.width = reader.readInt32(); - break; - case 2: - message.height = reader.readInt32(); - break; - case 3: - message.backgroundColor = reader.readString(); - break; - case 4: - reader.readMessage( - message.viewportTransform, - () => (message.viewportTransform = Transform.deserialize(reader)) - ); - break; - case 5: - reader.readMessage( - message.gridBackground, - () => (message.gridBackground = Grid.deserialize(reader)) - ); - break; - default: - reader.skipField(); + get backgroundColor() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set backgroundColor(value: string) { + pb_1.Message.setField(this, 3, value); + } + get viewportTransform() { + return pb_1.Message.getWrapperField(this, Transform, 4) as Transform; + } + set viewportTransform(value: Transform) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_viewportTransform() { + return pb_1.Message.getField(this, 4) != null; + } + get gridBackground() { + return pb_1.Message.getWrapperField(this, Grid, 5) as Grid; + } + set gridBackground(value: Grid) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_gridBackground() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + width?: number; + height?: number; + backgroundColor?: string; + viewportTransform?: ReturnType; + gridBackground?: ReturnType; + }): Canvas { + const message = new Canvas({}); + if (data.width != null) { + message.width = data.width; + } + if (data.height != null) { + message.height = data.height; + } + if (data.backgroundColor != null) { + message.backgroundColor = data.backgroundColor; + } + if (data.viewportTransform != null) { + message.viewportTransform = Transform.fromObject(data.viewportTransform); + } + if (data.gridBackground != null) { + message.gridBackground = Grid.fromObject(data.gridBackground); + } + return message; + } + toObject() { + const data: { + width?: number; + height?: number; + backgroundColor?: string; + viewportTransform?: ReturnType; + gridBackground?: ReturnType; + } = {}; + if (this.width != null) { + data.width = this.width; + } + if (this.height != null) { + data.height = this.height; + } + if (this.backgroundColor != null) { + data.backgroundColor = this.backgroundColor; + } + if (this.viewportTransform != null) { + data.viewportTransform = this.viewportTransform.toObject(); + } + if (this.gridBackground != null) { + data.gridBackground = this.gridBackground.toObject(); + } + 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.width != 0) + writer.writeInt32(1, this.width); + if (this.height != 0) + writer.writeInt32(2, this.height); + if (this.backgroundColor.length) + writer.writeString(3, this.backgroundColor); + if (this.has_viewportTransform) + writer.writeMessage(4, this.viewportTransform, () => this.viewportTransform.serialize(writer)); + if (this.has_gridBackground) + writer.writeMessage(5, this.gridBackground, () => this.gridBackground.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Canvas { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Canvas(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.width = reader.readInt32(); + break; + case 2: + message.height = reader.readInt32(); + break; + case 3: + message.backgroundColor = reader.readString(); + break; + case 4: + reader.readMessage(message.viewportTransform, () => message.viewportTransform = Transform.deserialize(reader)); + break; + case 5: + reader.readMessage(message.gridBackground, () => message.gridBackground = Grid.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Canvas { + return Canvas.deserialize(bytes); } - } - return message; } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Canvas { - return Canvas.deserialize(bytes); - } - } - export class Grid extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor( - data?: - | any[] - | { + export class Grid extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { hasGrid?: boolean; lineColor?: string; space?: number; - } - ) { - super(); - pb_1.Message.initialize( - this, - Array.isArray(data) ? data : [], - 0, - -1, - [], - this.#one_of_decls - ); - if (!Array.isArray(data) && typeof data == 'object') { - if ('hasGrid' in data && data.hasGrid != undefined) { - this.hasGrid = data.hasGrid; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("hasGrid" in data && data.hasGrid != undefined) { + this.hasGrid = data.hasGrid; + } + if ("lineColor" in data && data.lineColor != undefined) { + this.lineColor = data.lineColor; + } + if ("space" in data && data.space != undefined) { + this.space = data.space; + } + } } - if ('lineColor' in data && data.lineColor != undefined) { - this.lineColor = data.lineColor; + get hasGrid() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; } - if ('space' in data && data.space != undefined) { - this.space = data.space; + set hasGrid(value: boolean) { + pb_1.Message.setField(this, 1, value); } - } - } - get hasGrid() { - return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; - } - set hasGrid(value: boolean) { - pb_1.Message.setField(this, 1, value); - } - get lineColor() { - return pb_1.Message.getFieldWithDefault(this, 2, '') as string; - } - set lineColor(value: string) { - pb_1.Message.setField(this, 2, value); - } - get space() { - return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; - } - set space(value: number) { - pb_1.Message.setField(this, 3, value); - } - static fromObject(data: { - hasGrid?: boolean; - lineColor?: string; - space?: number; - }): Grid { - const message = new Grid({}); - if (data.hasGrid != null) { - message.hasGrid = data.hasGrid; - } - if (data.lineColor != null) { - message.lineColor = data.lineColor; - } - if (data.space != null) { - message.space = data.space; - } - return message; - } - toObject() { - const data: { - hasGrid?: boolean; - lineColor?: string; - space?: number; - } = {}; - if (this.hasGrid != null) { - data.hasGrid = this.hasGrid; - } - if (this.lineColor != null) { - data.lineColor = this.lineColor; - } - if (this.space != null) { - data.space = this.space; - } - 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.hasGrid != false) writer.writeBool(1, this.hasGrid); - if (this.lineColor.length) writer.writeString(2, this.lineColor); - if (this.space != 0) writer.writeInt32(3, this.space); - if (!w) return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Grid { - const reader = - bytes instanceof pb_1.BinaryReader - ? bytes - : new pb_1.BinaryReader(bytes), - message = new Grid(); - while (reader.nextField()) { - if (reader.isEndGroup()) break; - switch (reader.getFieldNumber()) { - case 1: - message.hasGrid = reader.readBool(); - break; - case 2: - message.lineColor = reader.readString(); - break; - case 3: - message.space = reader.readInt32(); - break; - default: - reader.skipField(); + get lineColor() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set lineColor(value: string) { + pb_1.Message.setField(this, 2, value); + } + get space() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set space(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + hasGrid?: boolean; + lineColor?: string; + space?: number; + }): Grid { + const message = new Grid({}); + if (data.hasGrid != null) { + message.hasGrid = data.hasGrid; + } + if (data.lineColor != null) { + message.lineColor = data.lineColor; + } + if (data.space != null) { + message.space = data.space; + } + return message; + } + toObject() { + const data: { + hasGrid?: boolean; + lineColor?: string; + space?: number; + } = {}; + if (this.hasGrid != null) { + data.hasGrid = this.hasGrid; + } + if (this.lineColor != null) { + data.lineColor = this.lineColor; + } + if (this.space != null) { + data.space = this.space; + } + 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.hasGrid != false) + writer.writeBool(1, this.hasGrid); + if (this.lineColor.length) + writer.writeString(2, this.lineColor); + if (this.space != 0) + writer.writeInt32(3, this.space); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Grid { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Grid(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.hasGrid = reader.readBool(); + break; + case 2: + message.lineColor = reader.readString(); + break; + case 3: + message.space = reader.readInt32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Grid { + return Grid.deserialize(bytes); } - } - return message; } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Grid { - return Grid.deserialize(bytes); - } - } - export class Point extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor( - data?: - | any[] - | { + export class Point extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { x?: number; y?: number; - } - ) { - super(); - pb_1.Message.initialize( - this, - Array.isArray(data) ? data : [], - 0, - -1, - [], - this.#one_of_decls - ); - if (!Array.isArray(data) && typeof data == 'object') { - if ('x' in data && data.x != undefined) { - this.x = data.x; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("x" in data && data.x != undefined) { + this.x = data.x; + } + if ("y" in data && data.y != undefined) { + this.y = data.y; + } + } } - if ('y' in data && data.y != undefined) { - this.y = data.y; + get x() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; } - } - } - get x() { - return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; - } - set x(value: number) { - pb_1.Message.setField(this, 1, value); - } - get y() { - return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; - } - set y(value: number) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { x?: number; y?: number }): Point { - const message = new Point({}); - if (data.x != null) { - message.x = data.x; - } - if (data.y != null) { - message.y = data.y; - } - return message; - } - toObject() { - const data: { - x?: number; - y?: number; - } = {}; - if (this.x != null) { - data.x = this.x; - } - if (this.y != null) { - data.y = this.y; - } - 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.x != 0) writer.writeFloat(1, this.x); - if (this.y != 0) writer.writeFloat(2, this.y); - if (!w) return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Point { - const reader = - bytes instanceof pb_1.BinaryReader - ? bytes - : new pb_1.BinaryReader(bytes), - message = new Point(); - while (reader.nextField()) { - if (reader.isEndGroup()) break; - switch (reader.getFieldNumber()) { - case 1: - message.x = reader.readFloat(); - break; - case 2: - message.y = reader.readFloat(); - break; - default: - reader.skipField(); + set x(value: number) { + pb_1.Message.setField(this, 1, value); + } + get y() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set y(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + x?: number; + y?: number; + }): Point { + const message = new Point({}); + if (data.x != null) { + message.x = data.x; + } + if (data.y != null) { + message.y = data.y; + } + return message; + } + toObject() { + const data: { + x?: number; + y?: number; + } = {}; + if (this.x != null) { + data.x = this.x; + } + if (this.y != null) { + data.y = this.y; + } + 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.x != 0) + writer.writeFloat(1, this.x); + if (this.y != 0) + writer.writeFloat(2, this.y); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Point { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Point(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.x = reader.readFloat(); + break; + case 2: + message.y = reader.readFloat(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Point { + return Point.deserialize(bytes); } - } - return message; } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Point { - return Point.deserialize(bytes); - } - } - export class Transform extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor( - data?: - | any[] - | { + export class Transform extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { position?: Point; scale?: Point; rotation?: number; skew?: Point; - } - ) { - super(); - pb_1.Message.initialize( - this, - Array.isArray(data) ? data : [], - 0, - -1, - [], - this.#one_of_decls - ); - if (!Array.isArray(data) && typeof data == 'object') { - if ('position' in data && data.position != undefined) { - this.position = data.position; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("position" in data && data.position != undefined) { + this.position = data.position; + } + if ("scale" in data && data.scale != undefined) { + this.scale = data.scale; + } + if ("rotation" in data && data.rotation != undefined) { + this.rotation = data.rotation; + } + if ("skew" in data && data.skew != undefined) { + this.skew = data.skew; + } + } } - if ('scale' in data && data.scale != undefined) { - this.scale = data.scale; + get position() { + return pb_1.Message.getWrapperField(this, Point, 1) as Point; } - if ('rotation' in data && data.rotation != undefined) { - this.rotation = data.rotation; + set position(value: Point) { + pb_1.Message.setWrapperField(this, 1, value); } - if ('skew' in data && data.skew != undefined) { - this.skew = data.skew; + get has_position() { + return pb_1.Message.getField(this, 1) != null; } - } - } - get position() { - return pb_1.Message.getWrapperField(this, Point, 1) as Point; - } - set position(value: Point) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_position() { - return pb_1.Message.getField(this, 1) != null; - } - get scale() { - return pb_1.Message.getWrapperField(this, Point, 2) as Point; - } - set scale(value: Point) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_scale() { - return pb_1.Message.getField(this, 2) != null; - } - get rotation() { - return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; - } - set rotation(value: number) { - pb_1.Message.setField(this, 3, value); - } - get skew() { - return pb_1.Message.getWrapperField(this, Point, 4) as Point; - } - set skew(value: Point) { - pb_1.Message.setWrapperField(this, 4, value); - } - get has_skew() { - return pb_1.Message.getField(this, 4) != null; - } - static fromObject(data: { - position?: ReturnType; - scale?: ReturnType; - rotation?: number; - skew?: ReturnType; - }): Transform { - const message = new Transform({}); - if (data.position != null) { - message.position = Point.fromObject(data.position); - } - if (data.scale != null) { - message.scale = Point.fromObject(data.scale); - } - if (data.rotation != null) { - message.rotation = data.rotation; - } - if (data.skew != null) { - message.skew = Point.fromObject(data.skew); - } - return message; - } - toObject() { - const data: { - position?: ReturnType; - scale?: ReturnType; - rotation?: number; - skew?: ReturnType; - } = {}; - if (this.position != null) { - data.position = this.position.toObject(); - } - if (this.scale != null) { - data.scale = this.scale.toObject(); - } - if (this.rotation != null) { - data.rotation = this.rotation; - } - if (this.skew != null) { - data.skew = this.skew.toObject(); - } - 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.has_position) - writer.writeMessage(1, this.position, () => - this.position.serialize(writer) - ); - if (this.has_scale) - writer.writeMessage(2, this.scale, () => this.scale.serialize(writer)); - if (this.rotation != 0) writer.writeFloat(3, this.rotation); - if (this.has_skew) - writer.writeMessage(4, this.skew, () => this.skew.serialize(writer)); - if (!w) return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Transform { - const reader = - bytes instanceof pb_1.BinaryReader - ? bytes - : new pb_1.BinaryReader(bytes), - message = new Transform(); - while (reader.nextField()) { - if (reader.isEndGroup()) break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage( - message.position, - () => (message.position = Point.deserialize(reader)) - ); - break; - case 2: - reader.readMessage( - message.scale, - () => (message.scale = Point.deserialize(reader)) - ); - break; - case 3: - message.rotation = reader.readFloat(); - break; - case 4: - reader.readMessage( - message.skew, - () => (message.skew = Point.deserialize(reader)) - ); - break; - default: - reader.skipField(); + get scale() { + return pb_1.Message.getWrapperField(this, Point, 2) as Point; + } + set scale(value: Point) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_scale() { + return pb_1.Message.getField(this, 2) != null; + } + get rotation() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set rotation(value: number) { + pb_1.Message.setField(this, 3, value); + } + get skew() { + return pb_1.Message.getWrapperField(this, Point, 4) as Point; + } + set skew(value: Point) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_skew() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + position?: ReturnType; + scale?: ReturnType; + rotation?: number; + skew?: ReturnType; + }): Transform { + const message = new Transform({}); + if (data.position != null) { + message.position = Point.fromObject(data.position); + } + if (data.scale != null) { + message.scale = Point.fromObject(data.scale); + } + if (data.rotation != null) { + message.rotation = data.rotation; + } + if (data.skew != null) { + message.skew = Point.fromObject(data.skew); + } + return message; + } + toObject() { + const data: { + position?: ReturnType; + scale?: ReturnType; + rotation?: number; + skew?: ReturnType; + } = {}; + if (this.position != null) { + data.position = this.position.toObject(); + } + if (this.scale != null) { + data.scale = this.scale.toObject(); + } + if (this.rotation != null) { + data.rotation = this.rotation; + } + if (this.skew != null) { + data.skew = this.skew.toObject(); + } + 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.has_position) + writer.writeMessage(1, this.position, () => this.position.serialize(writer)); + if (this.has_scale) + writer.writeMessage(2, this.scale, () => this.scale.serialize(writer)); + if (this.rotation != 0) + writer.writeFloat(3, this.rotation); + if (this.has_skew) + writer.writeMessage(4, this.skew, () => this.skew.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Transform { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Transform(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.position, () => message.position = Point.deserialize(reader)); + break; + case 2: + reader.readMessage(message.scale, () => message.scale = Point.deserialize(reader)); + break; + case 3: + message.rotation = reader.readFloat(); + break; + case 4: + reader.readMessage(message.skew, () => message.skew = Point.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Transform { + return Transform.deserialize(bytes); } - } - return message; } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Transform { - return Transform.deserialize(bytes); - } - } - export class ChildTransform extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor( - data?: - | any[] - | { + export class ChildTransform extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { name?: string; transform?: Transform; - } - ) { - super(); - pb_1.Message.initialize( - this, - Array.isArray(data) ? data : [], - 0, - -1, - [], - this.#one_of_decls - ); - if (!Array.isArray(data) && typeof data == 'object') { - if ('name' in data && data.name != undefined) { - this.name = data.name; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("transform" in data && data.transform != undefined) { + this.transform = data.transform; + } + } } - if ('transform' in data && data.transform != undefined) { - this.transform = data.transform; + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; } - } - } - get name() { - return pb_1.Message.getFieldWithDefault(this, 1, '') as string; - } - set name(value: string) { - pb_1.Message.setField(this, 1, value); - } - get transform() { - return pb_1.Message.getWrapperField(this, Transform, 2) as Transform; - } - set transform(value: Transform) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_transform() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - name?: string; - transform?: ReturnType; - }): ChildTransform { - const message = new ChildTransform({}); - if (data.name != null) { - message.name = data.name; - } - if (data.transform != null) { - message.transform = Transform.fromObject(data.transform); - } - return message; - } - toObject() { - const data: { - name?: string; - transform?: ReturnType; - } = {}; - if (this.name != null) { - data.name = this.name; - } - if (this.transform != null) { - data.transform = this.transform.toObject(); - } - 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.name.length) writer.writeString(1, this.name); - if (this.has_transform) - writer.writeMessage(2, this.transform, () => - this.transform.serialize(writer) - ); - if (!w) return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ChildTransform { - const reader = - bytes instanceof pb_1.BinaryReader - ? bytes - : new pb_1.BinaryReader(bytes), - message = new ChildTransform(); - while (reader.nextField()) { - if (reader.isEndGroup()) break; - switch (reader.getFieldNumber()) { - case 1: - message.name = reader.readString(); - break; - case 2: - reader.readMessage( - message.transform, - () => (message.transform = Transform.deserialize(reader)) - ); - break; - default: - reader.skipField(); + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get transform() { + return pb_1.Message.getWrapperField(this, Transform, 2) as Transform; + } + set transform(value: Transform) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_transform() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + name?: string; + transform?: ReturnType; + }): ChildTransform { + const message = new ChildTransform({}); + if (data.name != null) { + message.name = data.name; + } + if (data.transform != null) { + message.transform = Transform.fromObject(data.transform); + } + return message; + } + toObject() { + const data: { + name?: string; + transform?: ReturnType; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.transform != null) { + data.transform = this.transform.toObject(); + } + 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.name.length) + writer.writeString(1, this.name); + if (this.has_transform) + writer.writeMessage(2, this.transform, () => this.transform.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ChildTransform { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ChildTransform(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + reader.readMessage(message.transform, () => message.transform = Transform.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ChildTransform { + return ChildTransform.deserialize(bytes); } - } - return message; } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): ChildTransform { - return ChildTransform.deserialize(bytes); - } - } - export class CommonInfo extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor( - data?: - | any[] - | { + export class CommonInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { graphicType?: string; transform?: Transform; childTransforms?: ChildTransform[]; id?: number; - } - ) { - super(); - pb_1.Message.initialize( - this, - Array.isArray(data) ? data : [], - 0, - -1, - [4], - this.#one_of_decls - ); - if (!Array.isArray(data) && typeof data == 'object') { - if ('graphicType' in data && data.graphicType != undefined) { - this.graphicType = data.graphicType; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("graphicType" in data && data.graphicType != undefined) { + this.graphicType = data.graphicType; + } + if ("transform" in data && data.transform != undefined) { + this.transform = data.transform; + } + if ("childTransforms" in data && data.childTransforms != undefined) { + this.childTransforms = data.childTransforms; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + } } - if ('transform' in data && data.transform != undefined) { - this.transform = data.transform; + get graphicType() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; } - if ('childTransforms' in data && data.childTransforms != undefined) { - this.childTransforms = data.childTransforms; + set graphicType(value: string) { + pb_1.Message.setField(this, 2, value); } - if ('id' in data && data.id != undefined) { - this.id = data.id; + get transform() { + return pb_1.Message.getWrapperField(this, Transform, 3) as Transform; } - } - } - get graphicType() { - return pb_1.Message.getFieldWithDefault(this, 2, '') as string; - } - set graphicType(value: string) { - pb_1.Message.setField(this, 2, value); - } - get transform() { - return pb_1.Message.getWrapperField(this, Transform, 3) as Transform; - } - set transform(value: Transform) { - pb_1.Message.setWrapperField(this, 3, value); - } - get has_transform() { - return pb_1.Message.getField(this, 3) != null; - } - get childTransforms() { - return pb_1.Message.getRepeatedWrapperField( - this, - ChildTransform, - 4 - ) as ChildTransform[]; - } - set childTransforms(value: ChildTransform[]) { - pb_1.Message.setRepeatedWrapperField(this, 4, value); - } - get id() { - return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; - } - set id(value: number) { - pb_1.Message.setField(this, 5, value); - } - static fromObject(data: { - graphicType?: string; - transform?: ReturnType; - childTransforms?: ReturnType[]; - id?: number; - }): CommonInfo { - const message = new CommonInfo({}); - if (data.graphicType != null) { - message.graphicType = data.graphicType; - } - if (data.transform != null) { - message.transform = Transform.fromObject(data.transform); - } - if (data.childTransforms != null) { - message.childTransforms = data.childTransforms.map((item) => - ChildTransform.fromObject(item) - ); - } - if (data.id != null) { - message.id = data.id; - } - return message; - } - toObject() { - const data: { - graphicType?: string; - transform?: ReturnType; - childTransforms?: ReturnType< - typeof ChildTransform.prototype.toObject - >[]; - id?: number; - } = {}; - if (this.graphicType != null) { - data.graphicType = this.graphicType; - } - if (this.transform != null) { - data.transform = this.transform.toObject(); - } - if (this.childTransforms != null) { - data.childTransforms = this.childTransforms.map( - (item: ChildTransform) => item.toObject() - ); - } - if (this.id != null) { - data.id = this.id; - } - 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.graphicType.length) writer.writeString(2, this.graphicType); - if (this.has_transform) - writer.writeMessage(3, this.transform, () => - this.transform.serialize(writer) - ); - if (this.childTransforms.length) - writer.writeRepeatedMessage( - 4, - this.childTransforms, - (item: ChildTransform) => item.serialize(writer) - ); - if (this.id != 0) writer.writeUint32(5, this.id); - if (!w) return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CommonInfo { - const reader = - bytes instanceof pb_1.BinaryReader - ? bytes - : new pb_1.BinaryReader(bytes), - message = new CommonInfo(); - while (reader.nextField()) { - if (reader.isEndGroup()) break; - switch (reader.getFieldNumber()) { - case 2: - message.graphicType = reader.readString(); - break; - case 3: - reader.readMessage( - message.transform, - () => (message.transform = Transform.deserialize(reader)) - ); - break; - case 4: - reader.readMessage(message.childTransforms, () => - pb_1.Message.addToRepeatedWrapperField( - message, - 4, - ChildTransform.deserialize(reader), - ChildTransform - ) - ); - break; - case 5: - message.id = reader.readUint32(); - break; - default: - reader.skipField(); + set transform(value: Transform) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_transform() { + return pb_1.Message.getField(this, 3) != null; + } + get childTransforms() { + return pb_1.Message.getRepeatedWrapperField(this, ChildTransform, 4) as ChildTransform[]; + } + set childTransforms(value: ChildTransform[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + graphicType?: string; + transform?: ReturnType; + childTransforms?: ReturnType[]; + id?: number; + }): CommonInfo { + const message = new CommonInfo({}); + if (data.graphicType != null) { + message.graphicType = data.graphicType; + } + if (data.transform != null) { + message.transform = Transform.fromObject(data.transform); + } + if (data.childTransforms != null) { + message.childTransforms = data.childTransforms.map(item => ChildTransform.fromObject(item)); + } + if (data.id != null) { + message.id = data.id; + } + return message; + } + toObject() { + const data: { + graphicType?: string; + transform?: ReturnType; + childTransforms?: ReturnType[]; + id?: number; + } = {}; + if (this.graphicType != null) { + data.graphicType = this.graphicType; + } + if (this.transform != null) { + data.transform = this.transform.toObject(); + } + if (this.childTransforms != null) { + data.childTransforms = this.childTransforms.map((item: ChildTransform) => item.toObject()); + } + if (this.id != null) { + data.id = this.id; + } + 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.graphicType.length) + writer.writeString(2, this.graphicType); + if (this.has_transform) + writer.writeMessage(3, this.transform, () => this.transform.serialize(writer)); + if (this.childTransforms.length) + writer.writeRepeatedMessage(4, this.childTransforms, (item: ChildTransform) => item.serialize(writer)); + if (this.id != 0) + writer.writeUint32(5, this.id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CommonInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CommonInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.graphicType = reader.readString(); + break; + case 3: + reader.readMessage(message.transform, () => message.transform = Transform.deserialize(reader)); + break; + case 4: + reader.readMessage(message.childTransforms, () => pb_1.Message.addToRepeatedWrapperField(message, 4, ChildTransform.deserialize(reader), ChildTransform)); + break; + case 5: + message.id = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CommonInfo { + return CommonInfo.deserialize(bytes); } - } - return message; } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): CommonInfo { - return CommonInfo.deserialize(bytes); - } - } - export class UniqueIdOfStationLayout extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor( - data?: - | any[] - | { + 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; + }) { + 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; + } + } } - if ('lineId' in data && data.lineId != undefined) { - this.lineId = data.lineId; + get city() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; } - if ( - 'mainCoordinateSystem' in data && - data.mainCoordinateSystem != undefined - ) { - this.mainCoordinateSystem = data.mainCoordinateSystem; + set city(value: string) { + pb_1.Message.setField(this, 1, value); } - } - } - 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(); + 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); } - } - return message; } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): UniqueIdOfStationLayout { - return UniqueIdOfStationLayout.deserialize(bytes); - } - } - export class Arrow extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor( - data?: - | any[] - | { + export class Arrow extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { common?: CommonInfo; code?: string; points?: Point[]; - } - ) { - super(); - pb_1.Message.initialize( - this, - Array.isArray(data) ? data : [], - 0, - -1, - [3], - this.#one_of_decls - ); - if (!Array.isArray(data) && typeof data == 'object') { - if ('common' in data && data.common != undefined) { - this.common = data.common; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("common" in data && data.common != undefined) { + this.common = data.common; + } + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("points" in data && data.points != undefined) { + this.points = data.points; + } + } } - if ('code' in data && data.code != undefined) { - this.code = data.code; + get common() { + return pb_1.Message.getWrapperField(this, CommonInfo, 1) as CommonInfo; } - if ('points' in data && data.points != undefined) { - this.points = data.points; + set common(value: CommonInfo) { + pb_1.Message.setWrapperField(this, 1, value); } - } - } - get common() { - return pb_1.Message.getWrapperField(this, CommonInfo, 1) as CommonInfo; - } - set common(value: CommonInfo) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_common() { - return pb_1.Message.getField(this, 1) != null; - } - get code() { - return pb_1.Message.getFieldWithDefault(this, 2, '') as string; - } - set code(value: string) { - pb_1.Message.setField(this, 2, value); - } - get points() { - return pb_1.Message.getRepeatedWrapperField(this, Point, 3) as Point[]; - } - set points(value: Point[]) { - pb_1.Message.setRepeatedWrapperField(this, 3, value); - } - static fromObject(data: { - common?: ReturnType; - code?: string; - points?: ReturnType[]; - }): Arrow { - const message = new Arrow({}); - if (data.common != null) { - message.common = CommonInfo.fromObject(data.common); - } - if (data.code != null) { - message.code = data.code; - } - if (data.points != null) { - message.points = data.points.map((item) => Point.fromObject(item)); - } - return message; - } - toObject() { - const data: { - common?: ReturnType; - code?: string; - points?: ReturnType[]; - } = {}; - if (this.common != null) { - data.common = this.common.toObject(); - } - if (this.code != null) { - data.code = this.code; - } - if (this.points != null) { - data.points = this.points.map((item: Point) => item.toObject()); - } - 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.has_common) - writer.writeMessage(1, this.common, () => - this.common.serialize(writer) - ); - if (this.code.length) writer.writeString(2, this.code); - if (this.points.length) - writer.writeRepeatedMessage(3, this.points, (item: Point) => - item.serialize(writer) - ); - if (!w) return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Arrow { - const reader = - bytes instanceof pb_1.BinaryReader - ? bytes - : new pb_1.BinaryReader(bytes), - message = new Arrow(); - while (reader.nextField()) { - if (reader.isEndGroup()) break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage( - message.common, - () => (message.common = CommonInfo.deserialize(reader)) - ); - break; - case 2: - message.code = reader.readString(); - break; - case 3: - reader.readMessage(message.points, () => - pb_1.Message.addToRepeatedWrapperField( - message, - 3, - Point.deserialize(reader), - Point - ) - ); - break; - default: - reader.skipField(); + get has_common() { + return pb_1.Message.getField(this, 1) != null; } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Arrow { - return Arrow.deserialize(bytes); - } - } - export class IscsText extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor( - data?: - | any[] - | { - common?: CommonInfo; + get code() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set code(value: string) { + pb_1.Message.setField(this, 2, value); + } + get points() { + return pb_1.Message.getRepeatedWrapperField(this, Point, 3) as Point[]; + } + set points(value: Point[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + common?: ReturnType; code?: string; - content?: string; - color?: string; - fontSize?: number; - } - ) { - super(); - pb_1.Message.initialize( - this, - Array.isArray(data) ? data : [], - 0, - -1, - [], - this.#one_of_decls - ); - if (!Array.isArray(data) && typeof data == 'object') { - if ('common' in data && data.common != undefined) { - this.common = data.common; + points?: ReturnType[]; + }): Arrow { + const message = new Arrow({}); + if (data.common != null) { + message.common = CommonInfo.fromObject(data.common); + } + if (data.code != null) { + message.code = data.code; + } + if (data.points != null) { + message.points = data.points.map(item => Point.fromObject(item)); + } + return message; } - if ('code' in data && data.code != undefined) { - this.code = data.code; + toObject() { + const data: { + common?: ReturnType; + code?: string; + points?: ReturnType[]; + } = {}; + if (this.common != null) { + data.common = this.common.toObject(); + } + if (this.code != null) { + data.code = this.code; + } + if (this.points != null) { + data.points = this.points.map((item: Point) => item.toObject()); + } + return data; } - if ('content' in data && data.content != undefined) { - this.content = data.content; + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_common) + writer.writeMessage(1, this.common, () => this.common.serialize(writer)); + if (this.code.length) + writer.writeString(2, this.code); + if (this.points.length) + writer.writeRepeatedMessage(3, this.points, (item: Point) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); } - if ('color' in data && data.color != undefined) { - this.color = data.color; + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Arrow { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Arrow(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.common, () => message.common = CommonInfo.deserialize(reader)); + break; + case 2: + message.code = reader.readString(); + break; + case 3: + reader.readMessage(message.points, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Point.deserialize(reader), Point)); + break; + default: reader.skipField(); + } + } + return message; } - if ('fontSize' in data && data.fontSize != undefined) { - this.fontSize = data.fontSize; + serializeBinary(): Uint8Array { + return this.serialize(); } - } - } - get common() { - return pb_1.Message.getWrapperField(this, CommonInfo, 1) as CommonInfo; - } - set common(value: CommonInfo) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_common() { - return pb_1.Message.getField(this, 1) != null; - } - get code() { - return pb_1.Message.getFieldWithDefault(this, 2, '') as string; - } - set code(value: string) { - pb_1.Message.setField(this, 2, value); - } - get content() { - return pb_1.Message.getFieldWithDefault(this, 3, '') as string; - } - set content(value: string) { - pb_1.Message.setField(this, 3, value); - } - get color() { - return pb_1.Message.getFieldWithDefault(this, 4, '') as string; - } - set color(value: string) { - pb_1.Message.setField(this, 4, value); - } - get fontSize() { - return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; - } - set fontSize(value: number) { - pb_1.Message.setField(this, 5, value); - } - static fromObject(data: { - common?: ReturnType; - code?: string; - content?: string; - color?: string; - fontSize?: number; - }): IscsText { - const message = new IscsText({}); - if (data.common != null) { - message.common = CommonInfo.fromObject(data.common); - } - if (data.code != null) { - message.code = data.code; - } - if (data.content != null) { - message.content = data.content; - } - if (data.color != null) { - message.color = data.color; - } - if (data.fontSize != null) { - message.fontSize = data.fontSize; - } - return message; - } - toObject() { - const data: { - common?: ReturnType; - code?: string; - content?: string; - color?: string; - fontSize?: number; - } = {}; - if (this.common != null) { - data.common = this.common.toObject(); - } - if (this.code != null) { - data.code = this.code; - } - if (this.content != null) { - data.content = this.content; - } - if (this.color != null) { - data.color = this.color; - } - if (this.fontSize != null) { - data.fontSize = this.fontSize; - } - 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.has_common) - writer.writeMessage(1, this.common, () => - this.common.serialize(writer) - ); - if (this.code.length) writer.writeString(2, this.code); - if (this.content.length) writer.writeString(3, this.content); - if (this.color.length) writer.writeString(4, this.color); - if (this.fontSize != 0) writer.writeInt32(5, this.fontSize); - if (!w) return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IscsText { - const reader = - bytes instanceof pb_1.BinaryReader - ? bytes - : new pb_1.BinaryReader(bytes), - message = new IscsText(); - while (reader.nextField()) { - if (reader.isEndGroup()) break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage( - message.common, - () => (message.common = CommonInfo.deserialize(reader)) - ); - break; - case 2: - message.code = reader.readString(); - break; - case 3: - message.content = reader.readString(); - break; - case 4: - message.color = reader.readString(); - break; - case 5: - message.fontSize = reader.readInt32(); - break; - default: - reader.skipField(); + static deserializeBinary(bytes: Uint8Array): Arrow { + return Arrow.deserialize(bytes); } - } - return message; } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): IscsText { - return IscsText.deserialize(bytes); - } - } }