diff --git a/src/protos/basic_signal_data.ts b/src/protos/basic_signal_data.ts new file mode 100644 index 0000000..21f52b2 --- /dev/null +++ b/src/protos/basic_signal_data.ts @@ -0,0 +1,1170 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 4.22.0 + * source: basic_signal_data.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace basic_signal_data { + export class Storage extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + canvas?: Canvas; + stations?: Station[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("canvas" in data && data.canvas != undefined) { + this.canvas = data.canvas; + } + if ("stations" in data && data.stations != undefined) { + this.stations = data.stations; + } + } + } + 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 stations() { + return pb_1.Message.getRepeatedWrapperField(this, Station, 2) as Station[]; + } + set stations(value: Station[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + canvas?: ReturnType; + stations?: ReturnType[]; + }): Storage { + const message = new Storage({}); + if (data.canvas != null) { + message.canvas = Canvas.fromObject(data.canvas); + } + if (data.stations != null) { + message.stations = data.stations.map(item => Station.fromObject(item)); + } + return message; + } + toObject() { + const data: { + canvas?: ReturnType; + stations?: ReturnType[]; + } = {}; + if (this.canvas != null) { + data.canvas = this.canvas.toObject(); + } + if (this.stations != null) { + data.stations = this.stations.map((item: Station) => 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.stations.length) + writer.writeRepeatedMessage(2, this.stations, (item: Station) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Storage { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Storage(); + 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.stations, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Station.deserialize(reader), Station)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Storage { + return Storage.deserialize(bytes); + } + } + 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; + } + 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; + } + } + } + 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(); + } + } + 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[] | { + 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; + } + if ("lineColor" in data && data.lineColor != undefined) { + this.lineColor = data.lineColor; + } + if ("space" in data && data.space != undefined) { + this.space = data.space; + } + } + } + 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(); + } + } + 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[] | { + 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; + } + if ("y" in data && data.y != undefined) { + this.y = data.y; + } + } + } + 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(); + } + } + 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[] | { + 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; + } + 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; + } + } + } + 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(); + } + } + 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[] | { + 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; + } + if ("transform" in data && data.transform != undefined) { + this.transform = data.transform; + } + } + } + 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(); + } + } + 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[] | { + id?: number; + graphicType?: string; + transform?: Transform; + childrenTransform?: ChildTransform[]; + }) { + 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 ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("graphicType" in data && data.graphicType != undefined) { + this.graphicType = data.graphicType; + } + if ("transform" in data && data.transform != undefined) { + this.transform = data.transform; + } + if ("childrenTransform" in data && data.childrenTransform != undefined) { + this.childrenTransform = data.childrenTransform; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 1, value); + } + 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 childrenTransform() { + return pb_1.Message.getRepeatedWrapperField(this, ChildTransform, 4) as ChildTransform[]; + } + set childrenTransform(value: ChildTransform[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + id?: number; + graphicType?: string; + transform?: ReturnType; + childrenTransform?: ReturnType[]; + }): CommonInfo { + const message = new CommonInfo({}); + if (data.id != null) { + message.id = data.id; + } + if (data.graphicType != null) { + message.graphicType = data.graphicType; + } + if (data.transform != null) { + message.transform = Transform.fromObject(data.transform); + } + if (data.childrenTransform != null) { + message.childrenTransform = data.childrenTransform.map(item => ChildTransform.fromObject(item)); + } + return message; + } + toObject() { + const data: { + id?: number; + graphicType?: string; + transform?: ReturnType; + childrenTransform?: ReturnType[]; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.graphicType != null) { + data.graphicType = this.graphicType; + } + if (this.transform != null) { + data.transform = this.transform.toObject(); + } + if (this.childrenTransform != null) { + data.childrenTransform = this.childrenTransform.map((item: ChildTransform) => 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.id != 0) + writer.writeUint32(1, this.id); + if (this.graphicType.length) + writer.writeString(2, this.graphicType); + if (this.has_transform) + writer.writeMessage(3, this.transform, () => this.transform.serialize(writer)); + if (this.childrenTransform.length) + writer.writeRepeatedMessage(4, this.childrenTransform, (item: ChildTransform) => item.serialize(writer)); + 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 1: + message.id = reader.readUint32(); + break; + case 2: + message.graphicType = reader.readString(); + break; + case 3: + reader.readMessage(message.transform, () => message.transform = Transform.deserialize(reader)); + break; + case 4: + reader.readMessage(message.childrenTransform, () => pb_1.Message.addToRepeatedWrapperField(message, 4, ChildTransform.deserialize(reader), ChildTransform)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CommonInfo { + return CommonInfo.deserialize(bytes); + } + } + export class KilometerMark extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + coordinate?: string; + value?: 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 ("coordinate" in data && data.coordinate != undefined) { + this.coordinate = data.coordinate; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + } + } + get coordinate() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set coordinate(value: string) { + pb_1.Message.setField(this, 1, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set value(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + coordinate?: string; + value?: number; + }): KilometerMark { + const message = new KilometerMark({}); + if (data.coordinate != null) { + message.coordinate = data.coordinate; + } + if (data.value != null) { + message.value = data.value; + } + return message; + } + toObject() { + const data: { + coordinate?: string; + value?: number; + } = {}; + if (this.coordinate != null) { + data.coordinate = this.coordinate; + } + if (this.value != null) { + data.value = this.value; + } + 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.coordinate.length) + writer.writeString(1, this.coordinate); + if (this.value != 0) + writer.writeInt64(2, this.value); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): KilometerMark { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new KilometerMark(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.coordinate = reader.readString(); + break; + case 2: + message.value = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): KilometerMark { + return KilometerMark.deserialize(bytes); + } + } + export class Station extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + common?: CommonInfo; + name?: string; + zhanName?: string; + namePinyin?: string; + km?: KilometerMark; + concentration?: boolean; + depots?: boolean; + manageStationIds?: number[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [13], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("common" in data && data.common != undefined) { + this.common = data.common; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("zhanName" in data && data.zhanName != undefined) { + this.zhanName = data.zhanName; + } + if ("namePinyin" in data && data.namePinyin != undefined) { + this.namePinyin = data.namePinyin; + } + if ("km" in data && data.km != undefined) { + this.km = data.km; + } + if ("concentration" in data && data.concentration != undefined) { + this.concentration = data.concentration; + } + if ("depots" in data && data.depots != undefined) { + this.depots = data.depots; + } + if ("manageStationIds" in data && data.manageStationIds != undefined) { + this.manageStationIds = data.manageStationIds; + } + } + } + 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 name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get zhanName() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set zhanName(value: string) { + pb_1.Message.setField(this, 3, value); + } + get namePinyin() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set namePinyin(value: string) { + pb_1.Message.setField(this, 4, value); + } + get km() { + return pb_1.Message.getWrapperField(this, KilometerMark, 6) as KilometerMark; + } + set km(value: KilometerMark) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_km() { + return pb_1.Message.getField(this, 6) != null; + } + get concentration() { + return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean; + } + set concentration(value: boolean) { + pb_1.Message.setField(this, 10, value); + } + get depots() { + return pb_1.Message.getFieldWithDefault(this, 11, false) as boolean; + } + set depots(value: boolean) { + pb_1.Message.setField(this, 11, value); + } + get manageStationIds() { + return pb_1.Message.getFieldWithDefault(this, 13, []) as number[]; + } + set manageStationIds(value: number[]) { + pb_1.Message.setField(this, 13, value); + } + static fromObject(data: { + common?: ReturnType; + name?: string; + zhanName?: string; + namePinyin?: string; + km?: ReturnType; + concentration?: boolean; + depots?: boolean; + manageStationIds?: number[]; + }): Station { + const message = new Station({}); + if (data.common != null) { + message.common = CommonInfo.fromObject(data.common); + } + if (data.name != null) { + message.name = data.name; + } + if (data.zhanName != null) { + message.zhanName = data.zhanName; + } + if (data.namePinyin != null) { + message.namePinyin = data.namePinyin; + } + if (data.km != null) { + message.km = KilometerMark.fromObject(data.km); + } + if (data.concentration != null) { + message.concentration = data.concentration; + } + if (data.depots != null) { + message.depots = data.depots; + } + if (data.manageStationIds != null) { + message.manageStationIds = data.manageStationIds; + } + return message; + } + toObject() { + const data: { + common?: ReturnType; + name?: string; + zhanName?: string; + namePinyin?: string; + km?: ReturnType; + concentration?: boolean; + depots?: boolean; + manageStationIds?: number[]; + } = {}; + if (this.common != null) { + data.common = this.common.toObject(); + } + if (this.name != null) { + data.name = this.name; + } + if (this.zhanName != null) { + data.zhanName = this.zhanName; + } + if (this.namePinyin != null) { + data.namePinyin = this.namePinyin; + } + if (this.km != null) { + data.km = this.km.toObject(); + } + if (this.concentration != null) { + data.concentration = this.concentration; + } + if (this.depots != null) { + data.depots = this.depots; + } + if (this.manageStationIds != null) { + data.manageStationIds = this.manageStationIds; + } + 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.name.length) + writer.writeString(2, this.name); + if (this.zhanName.length) + writer.writeString(3, this.zhanName); + if (this.namePinyin.length) + writer.writeString(4, this.namePinyin); + if (this.has_km) + writer.writeMessage(6, this.km, () => this.km.serialize(writer)); + if (this.concentration != false) + writer.writeBool(10, this.concentration); + if (this.depots != false) + writer.writeBool(11, this.depots); + if (this.manageStationIds.length) + writer.writePackedUint32(13, this.manageStationIds); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Station { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Station(); + 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.name = reader.readString(); + break; + case 3: + message.zhanName = reader.readString(); + break; + case 4: + message.namePinyin = reader.readString(); + break; + case 6: + reader.readMessage(message.km, () => message.km = KilometerMark.deserialize(reader)); + break; + case 10: + message.concentration = reader.readBool(); + break; + case 11: + message.depots = reader.readBool(); + break; + case 13: + message.manageStationIds = reader.readPackedUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Station { + return Station.deserialize(bytes); + } + } +} diff --git a/tsconfig.json b/tsconfig.json index 23ef349..74a75fa 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,5 +5,12 @@ "strict": false }, "include": ["src/**/*"], - "exclude": ["/graphic-pixi/*/**.ts"] + "exclude": [ + "./dist", + "./.quasar", + "./node_modules", + "./src-capacitor", + "./src-cordova", + "./quasar.config.*.temporary.compiled*" + ] }