proto同步数据
This commit is contained in:
parent
211d2fb3f3
commit
3fb5bd2df5
|
@ -1 +1 @@
|
|||
Subproject commit 2b9a6287fb04b6cd7a8c6018f2c12b7d87dfad28
|
||||
Subproject commit 4029b6c96f132115bba08c87bfd3470f3e2d872b
|
|
@ -0,0 +1,765 @@
|
|||
/**
|
||||
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
||||
* compiler version: 5.27.4
|
||||
* source: common.proto
|
||||
* git: https://github.com/thesayyn/protoc-gen-ts */
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export namespace common {
|
||||
export enum DataType {
|
||||
DataType_Unknown = 0,
|
||||
DataType_Em = 1,
|
||||
DataType_Ibp = 2,
|
||||
DataType_Psl = 3,
|
||||
DataType_Iscs = 4
|
||||
}
|
||||
export enum FeatureType {
|
||||
FeatureType_Unknown = 0,
|
||||
FeatureType_Simulation = 1,
|
||||
FeatureType_RunPlan = 2
|
||||
}
|
||||
export class Canvas extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
width?: number;
|
||||
height?: number;
|
||||
background_color?: string;
|
||||
viewport_transform?: Transform;
|
||||
grid_background?: 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 ("background_color" in data && data.background_color != undefined) {
|
||||
this.background_color = data.background_color;
|
||||
}
|
||||
if ("viewport_transform" in data && data.viewport_transform != undefined) {
|
||||
this.viewport_transform = data.viewport_transform;
|
||||
}
|
||||
if ("grid_background" in data && data.grid_background != undefined) {
|
||||
this.grid_background = data.grid_background;
|
||||
}
|
||||
}
|
||||
}
|
||||
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 background_color() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
|
||||
}
|
||||
set background_color(value: string) {
|
||||
pb_1.Message.setField(this, 3, value);
|
||||
}
|
||||
get viewport_transform() {
|
||||
return pb_1.Message.getWrapperField(this, Transform, 4) as Transform;
|
||||
}
|
||||
set viewport_transform(value: Transform) {
|
||||
pb_1.Message.setWrapperField(this, 4, value);
|
||||
}
|
||||
get has_viewport_transform() {
|
||||
return pb_1.Message.getField(this, 4) != null;
|
||||
}
|
||||
get grid_background() {
|
||||
return pb_1.Message.getWrapperField(this, Grid, 5) as Grid;
|
||||
}
|
||||
set grid_background(value: Grid) {
|
||||
pb_1.Message.setWrapperField(this, 5, value);
|
||||
}
|
||||
get has_grid_background() {
|
||||
return pb_1.Message.getField(this, 5) != null;
|
||||
}
|
||||
static fromObject(data: {
|
||||
width?: number;
|
||||
height?: number;
|
||||
background_color?: string;
|
||||
viewport_transform?: ReturnType<typeof Transform.prototype.toObject>;
|
||||
grid_background?: ReturnType<typeof Grid.prototype.toObject>;
|
||||
}): Canvas {
|
||||
const message = new Canvas({});
|
||||
if (data.width != null) {
|
||||
message.width = data.width;
|
||||
}
|
||||
if (data.height != null) {
|
||||
message.height = data.height;
|
||||
}
|
||||
if (data.background_color != null) {
|
||||
message.background_color = data.background_color;
|
||||
}
|
||||
if (data.viewport_transform != null) {
|
||||
message.viewport_transform = Transform.fromObject(data.viewport_transform);
|
||||
}
|
||||
if (data.grid_background != null) {
|
||||
message.grid_background = Grid.fromObject(data.grid_background);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
width?: number;
|
||||
height?: number;
|
||||
background_color?: string;
|
||||
viewport_transform?: ReturnType<typeof Transform.prototype.toObject>;
|
||||
grid_background?: ReturnType<typeof Grid.prototype.toObject>;
|
||||
} = {};
|
||||
if (this.width != null) {
|
||||
data.width = this.width;
|
||||
}
|
||||
if (this.height != null) {
|
||||
data.height = this.height;
|
||||
}
|
||||
if (this.background_color != null) {
|
||||
data.background_color = this.background_color;
|
||||
}
|
||||
if (this.viewport_transform != null) {
|
||||
data.viewport_transform = this.viewport_transform.toObject();
|
||||
}
|
||||
if (this.grid_background != null) {
|
||||
data.grid_background = this.grid_background.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.background_color.length)
|
||||
writer.writeString(3, this.background_color);
|
||||
if (this.has_viewport_transform)
|
||||
writer.writeMessage(4, this.viewport_transform, () => this.viewport_transform.serialize(writer));
|
||||
if (this.has_grid_background)
|
||||
writer.writeMessage(5, this.grid_background, () => this.grid_background.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.background_color = reader.readString();
|
||||
break;
|
||||
case 4:
|
||||
reader.readMessage(message.viewport_transform, () => message.viewport_transform = Transform.deserialize(reader));
|
||||
break;
|
||||
case 5:
|
||||
reader.readMessage(message.grid_background, () => message.grid_background = 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[] | {
|
||||
has_grid?: boolean;
|
||||
line_color?: 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 ("has_grid" in data && data.has_grid != undefined) {
|
||||
this.has_grid = data.has_grid;
|
||||
}
|
||||
if ("line_color" in data && data.line_color != undefined) {
|
||||
this.line_color = data.line_color;
|
||||
}
|
||||
if ("space" in data && data.space != undefined) {
|
||||
this.space = data.space;
|
||||
}
|
||||
}
|
||||
}
|
||||
get has_grid() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean;
|
||||
}
|
||||
set has_grid(value: boolean) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get line_color() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
||||
}
|
||||
set line_color(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: {
|
||||
has_grid?: boolean;
|
||||
line_color?: string;
|
||||
space?: number;
|
||||
}): Grid {
|
||||
const message = new Grid({});
|
||||
if (data.has_grid != null) {
|
||||
message.has_grid = data.has_grid;
|
||||
}
|
||||
if (data.line_color != null) {
|
||||
message.line_color = data.line_color;
|
||||
}
|
||||
if (data.space != null) {
|
||||
message.space = data.space;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
has_grid?: boolean;
|
||||
line_color?: string;
|
||||
space?: number;
|
||||
} = {};
|
||||
if (this.has_grid != null) {
|
||||
data.has_grid = this.has_grid;
|
||||
}
|
||||
if (this.line_color != null) {
|
||||
data.line_color = this.line_color;
|
||||
}
|
||||
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.has_grid != false)
|
||||
writer.writeBool(1, this.has_grid);
|
||||
if (this.line_color.length)
|
||||
writer.writeString(2, this.line_color);
|
||||
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.has_grid = reader.readBool();
|
||||
break;
|
||||
case 2:
|
||||
message.line_color = 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<typeof Point.prototype.toObject>;
|
||||
scale?: ReturnType<typeof Point.prototype.toObject>;
|
||||
rotation?: number;
|
||||
skew?: ReturnType<typeof Point.prototype.toObject>;
|
||||
}): 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<typeof Point.prototype.toObject>;
|
||||
scale?: ReturnType<typeof Point.prototype.toObject>;
|
||||
rotation?: number;
|
||||
skew?: ReturnType<typeof Point.prototype.toObject>;
|
||||
} = {};
|
||||
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<typeof Transform.prototype.toObject>;
|
||||
}): 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<typeof Transform.prototype.toObject>;
|
||||
} = {};
|
||||
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;
|
||||
graphic_type?: string;
|
||||
transform?: Transform;
|
||||
children_transform?: 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 ("graphic_type" in data && data.graphic_type != undefined) {
|
||||
this.graphic_type = data.graphic_type;
|
||||
}
|
||||
if ("transform" in data && data.transform != undefined) {
|
||||
this.transform = data.transform;
|
||||
}
|
||||
if ("children_transform" in data && data.children_transform != undefined) {
|
||||
this.children_transform = data.children_transform;
|
||||
}
|
||||
}
|
||||
}
|
||||
get id() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
|
||||
}
|
||||
set id(value: number) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get graphic_type() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
||||
}
|
||||
set graphic_type(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 children_transform() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, ChildTransform, 4) as ChildTransform[];
|
||||
}
|
||||
set children_transform(value: ChildTransform[]) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 4, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
id?: number;
|
||||
graphic_type?: string;
|
||||
transform?: ReturnType<typeof Transform.prototype.toObject>;
|
||||
children_transform?: ReturnType<typeof ChildTransform.prototype.toObject>[];
|
||||
}): CommonInfo {
|
||||
const message = new CommonInfo({});
|
||||
if (data.id != null) {
|
||||
message.id = data.id;
|
||||
}
|
||||
if (data.graphic_type != null) {
|
||||
message.graphic_type = data.graphic_type;
|
||||
}
|
||||
if (data.transform != null) {
|
||||
message.transform = Transform.fromObject(data.transform);
|
||||
}
|
||||
if (data.children_transform != null) {
|
||||
message.children_transform = data.children_transform.map(item => ChildTransform.fromObject(item));
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
id?: number;
|
||||
graphic_type?: string;
|
||||
transform?: ReturnType<typeof Transform.prototype.toObject>;
|
||||
children_transform?: ReturnType<typeof ChildTransform.prototype.toObject>[];
|
||||
} = {};
|
||||
if (this.id != null) {
|
||||
data.id = this.id;
|
||||
}
|
||||
if (this.graphic_type != null) {
|
||||
data.graphic_type = this.graphic_type;
|
||||
}
|
||||
if (this.transform != null) {
|
||||
data.transform = this.transform.toObject();
|
||||
}
|
||||
if (this.children_transform != null) {
|
||||
data.children_transform = this.children_transform.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.graphic_type.length)
|
||||
writer.writeString(2, this.graphic_type);
|
||||
if (this.has_transform)
|
||||
writer.writeMessage(3, this.transform, () => this.transform.serialize(writer));
|
||||
if (this.children_transform.length)
|
||||
writer.writeRepeatedMessage(4, this.children_transform, (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.graphic_type = reader.readString();
|
||||
break;
|
||||
case 3:
|
||||
reader.readMessage(message.transform, () => message.transform = Transform.deserialize(reader));
|
||||
break;
|
||||
case 4:
|
||||
reader.readMessage(message.children_transform, () => 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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,426 @@
|
|||
/**
|
||||
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
||||
* compiler version: 5.27.4
|
||||
* source: em_data.proto
|
||||
* git: https://github.com/thesayyn/protoc-gen-ts */
|
||||
import * as dependency_1 from "./common";
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export namespace em_data {
|
||||
export class Em extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
canvas?: dependency_1.common.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, dependency_1.common.Canvas, 1) as dependency_1.common.Canvas;
|
||||
}
|
||||
set canvas(value: dependency_1.common.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<typeof dependency_1.common.Canvas.prototype.toObject>;
|
||||
stations?: ReturnType<typeof Station.prototype.toObject>[];
|
||||
}): Em {
|
||||
const message = new Em({});
|
||||
if (data.canvas != null) {
|
||||
message.canvas = dependency_1.common.Canvas.fromObject(data.canvas);
|
||||
}
|
||||
if (data.stations != null) {
|
||||
message.stations = data.stations.map(item => Station.fromObject(item));
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
canvas?: ReturnType<typeof dependency_1.common.Canvas.prototype.toObject>;
|
||||
stations?: ReturnType<typeof Station.prototype.toObject>[];
|
||||
} = {};
|
||||
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): Em {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Em();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.canvas, () => message.canvas = dependency_1.common.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): Em {
|
||||
return Em.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?: dependency_1.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, dependency_1.common.CommonInfo, 1) as dependency_1.common.CommonInfo;
|
||||
}
|
||||
set common(value: dependency_1.common.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<typeof dependency_1.common.CommonInfo.prototype.toObject>;
|
||||
name?: string;
|
||||
zhanName?: string;
|
||||
namePinyin?: string;
|
||||
km?: ReturnType<typeof KilometerMark.prototype.toObject>;
|
||||
concentration?: boolean;
|
||||
depots?: boolean;
|
||||
manageStationIds?: number[];
|
||||
}): Station {
|
||||
const message = new Station({});
|
||||
if (data.common != null) {
|
||||
message.common = dependency_1.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<typeof dependency_1.common.CommonInfo.prototype.toObject>;
|
||||
name?: string;
|
||||
zhanName?: string;
|
||||
namePinyin?: string;
|
||||
km?: ReturnType<typeof KilometerMark.prototype.toObject>;
|
||||
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 = dependency_1.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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,682 @@
|
|||
/**
|
||||
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
||||
* compiler version: 5.27.4
|
||||
* source: fas_graphic_data.proto
|
||||
* git: https://github.com/thesayyn/protoc-gen-ts */
|
||||
import * as dependency_1 from "./iscs_graphic_data";
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export namespace FASGraphicData {
|
||||
export class FASGraphicStorage extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
canvas?: dependency_1.iscsGraphicData.Canvas;
|
||||
arrows?: dependency_1.iscsGraphicData.Arrow[];
|
||||
iscsTexts?: dependency_1.iscsGraphicData.IscsText[];
|
||||
rects?: dependency_1.iscsGraphicData.Rect[];
|
||||
manualAlarmButtons?: ManualAlarmButton[];
|
||||
hydrantAlarmButtons?: HydrantAlarmButton[];
|
||||
gasExtinguishings?: GasExtinguishing[];
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4, 5, 6, 7], this.#one_of_decls);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("canvas" in data && data.canvas != undefined) {
|
||||
this.canvas = data.canvas;
|
||||
}
|
||||
if ("arrows" in data && data.arrows != undefined) {
|
||||
this.arrows = data.arrows;
|
||||
}
|
||||
if ("iscsTexts" in data && data.iscsTexts != undefined) {
|
||||
this.iscsTexts = data.iscsTexts;
|
||||
}
|
||||
if ("rects" in data && data.rects != undefined) {
|
||||
this.rects = data.rects;
|
||||
}
|
||||
if ("manualAlarmButtons" in data && data.manualAlarmButtons != undefined) {
|
||||
this.manualAlarmButtons = data.manualAlarmButtons;
|
||||
}
|
||||
if ("hydrantAlarmButtons" in data && data.hydrantAlarmButtons != undefined) {
|
||||
this.hydrantAlarmButtons = data.hydrantAlarmButtons;
|
||||
}
|
||||
if ("gasExtinguishings" in data && data.gasExtinguishings != undefined) {
|
||||
this.gasExtinguishings = data.gasExtinguishings;
|
||||
}
|
||||
}
|
||||
}
|
||||
get canvas() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_1.iscsGraphicData.Canvas, 1) as dependency_1.iscsGraphicData.Canvas;
|
||||
}
|
||||
set canvas(value: dependency_1.iscsGraphicData.Canvas) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
get has_canvas() {
|
||||
return pb_1.Message.getField(this, 1) != null;
|
||||
}
|
||||
get arrows() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, dependency_1.iscsGraphicData.Arrow, 2) as dependency_1.iscsGraphicData.Arrow[];
|
||||
}
|
||||
set arrows(value: dependency_1.iscsGraphicData.Arrow[]) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 2, value);
|
||||
}
|
||||
get iscsTexts() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, dependency_1.iscsGraphicData.IscsText, 3) as dependency_1.iscsGraphicData.IscsText[];
|
||||
}
|
||||
set iscsTexts(value: dependency_1.iscsGraphicData.IscsText[]) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 3, value);
|
||||
}
|
||||
get rects() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, dependency_1.iscsGraphicData.Rect, 4) as dependency_1.iscsGraphicData.Rect[];
|
||||
}
|
||||
set rects(value: dependency_1.iscsGraphicData.Rect[]) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 4, value);
|
||||
}
|
||||
get manualAlarmButtons() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, ManualAlarmButton, 5) as ManualAlarmButton[];
|
||||
}
|
||||
set manualAlarmButtons(value: ManualAlarmButton[]) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 5, value);
|
||||
}
|
||||
get hydrantAlarmButtons() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, HydrantAlarmButton, 6) as HydrantAlarmButton[];
|
||||
}
|
||||
set hydrantAlarmButtons(value: HydrantAlarmButton[]) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 6, value);
|
||||
}
|
||||
get gasExtinguishings() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, GasExtinguishing, 7) as GasExtinguishing[];
|
||||
}
|
||||
set gasExtinguishings(value: GasExtinguishing[]) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 7, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
canvas?: ReturnType<typeof dependency_1.iscsGraphicData.Canvas.prototype.toObject>;
|
||||
arrows?: ReturnType<typeof dependency_1.iscsGraphicData.Arrow.prototype.toObject>[];
|
||||
iscsTexts?: ReturnType<typeof dependency_1.iscsGraphicData.IscsText.prototype.toObject>[];
|
||||
rects?: ReturnType<typeof dependency_1.iscsGraphicData.Rect.prototype.toObject>[];
|
||||
manualAlarmButtons?: ReturnType<typeof ManualAlarmButton.prototype.toObject>[];
|
||||
hydrantAlarmButtons?: ReturnType<typeof HydrantAlarmButton.prototype.toObject>[];
|
||||
gasExtinguishings?: ReturnType<typeof GasExtinguishing.prototype.toObject>[];
|
||||
}): FASGraphicStorage {
|
||||
const message = new FASGraphicStorage({});
|
||||
if (data.canvas != null) {
|
||||
message.canvas = dependency_1.iscsGraphicData.Canvas.fromObject(data.canvas);
|
||||
}
|
||||
if (data.arrows != null) {
|
||||
message.arrows = data.arrows.map(item => dependency_1.iscsGraphicData.Arrow.fromObject(item));
|
||||
}
|
||||
if (data.iscsTexts != null) {
|
||||
message.iscsTexts = data.iscsTexts.map(item => dependency_1.iscsGraphicData.IscsText.fromObject(item));
|
||||
}
|
||||
if (data.rects != null) {
|
||||
message.rects = data.rects.map(item => dependency_1.iscsGraphicData.Rect.fromObject(item));
|
||||
}
|
||||
if (data.manualAlarmButtons != null) {
|
||||
message.manualAlarmButtons = data.manualAlarmButtons.map(item => ManualAlarmButton.fromObject(item));
|
||||
}
|
||||
if (data.hydrantAlarmButtons != null) {
|
||||
message.hydrantAlarmButtons = data.hydrantAlarmButtons.map(item => HydrantAlarmButton.fromObject(item));
|
||||
}
|
||||
if (data.gasExtinguishings != null) {
|
||||
message.gasExtinguishings = data.gasExtinguishings.map(item => GasExtinguishing.fromObject(item));
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
canvas?: ReturnType<typeof dependency_1.iscsGraphicData.Canvas.prototype.toObject>;
|
||||
arrows?: ReturnType<typeof dependency_1.iscsGraphicData.Arrow.prototype.toObject>[];
|
||||
iscsTexts?: ReturnType<typeof dependency_1.iscsGraphicData.IscsText.prototype.toObject>[];
|
||||
rects?: ReturnType<typeof dependency_1.iscsGraphicData.Rect.prototype.toObject>[];
|
||||
manualAlarmButtons?: ReturnType<typeof ManualAlarmButton.prototype.toObject>[];
|
||||
hydrantAlarmButtons?: ReturnType<typeof HydrantAlarmButton.prototype.toObject>[];
|
||||
gasExtinguishings?: ReturnType<typeof GasExtinguishing.prototype.toObject>[];
|
||||
} = {};
|
||||
if (this.canvas != null) {
|
||||
data.canvas = this.canvas.toObject();
|
||||
}
|
||||
if (this.arrows != null) {
|
||||
data.arrows = this.arrows.map((item: dependency_1.iscsGraphicData.Arrow) => item.toObject());
|
||||
}
|
||||
if (this.iscsTexts != null) {
|
||||
data.iscsTexts = this.iscsTexts.map((item: dependency_1.iscsGraphicData.IscsText) => item.toObject());
|
||||
}
|
||||
if (this.rects != null) {
|
||||
data.rects = this.rects.map((item: dependency_1.iscsGraphicData.Rect) => item.toObject());
|
||||
}
|
||||
if (this.manualAlarmButtons != null) {
|
||||
data.manualAlarmButtons = this.manualAlarmButtons.map((item: ManualAlarmButton) => item.toObject());
|
||||
}
|
||||
if (this.hydrantAlarmButtons != null) {
|
||||
data.hydrantAlarmButtons = this.hydrantAlarmButtons.map((item: HydrantAlarmButton) => item.toObject());
|
||||
}
|
||||
if (this.gasExtinguishings != null) {
|
||||
data.gasExtinguishings = this.gasExtinguishings.map((item: GasExtinguishing) => 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.arrows.length)
|
||||
writer.writeRepeatedMessage(2, this.arrows, (item: dependency_1.iscsGraphicData.Arrow) => item.serialize(writer));
|
||||
if (this.iscsTexts.length)
|
||||
writer.writeRepeatedMessage(3, this.iscsTexts, (item: dependency_1.iscsGraphicData.IscsText) => item.serialize(writer));
|
||||
if (this.rects.length)
|
||||
writer.writeRepeatedMessage(4, this.rects, (item: dependency_1.iscsGraphicData.Rect) => item.serialize(writer));
|
||||
if (this.manualAlarmButtons.length)
|
||||
writer.writeRepeatedMessage(5, this.manualAlarmButtons, (item: ManualAlarmButton) => item.serialize(writer));
|
||||
if (this.hydrantAlarmButtons.length)
|
||||
writer.writeRepeatedMessage(6, this.hydrantAlarmButtons, (item: HydrantAlarmButton) => item.serialize(writer));
|
||||
if (this.gasExtinguishings.length)
|
||||
writer.writeRepeatedMessage(7, this.gasExtinguishings, (item: GasExtinguishing) => item.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FASGraphicStorage {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FASGraphicStorage();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.canvas, () => message.canvas = dependency_1.iscsGraphicData.Canvas.deserialize(reader));
|
||||
break;
|
||||
case 2:
|
||||
reader.readMessage(message.arrows, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_1.iscsGraphicData.Arrow.deserialize(reader), dependency_1.iscsGraphicData.Arrow));
|
||||
break;
|
||||
case 3:
|
||||
reader.readMessage(message.iscsTexts, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_1.iscsGraphicData.IscsText.deserialize(reader), dependency_1.iscsGraphicData.IscsText));
|
||||
break;
|
||||
case 4:
|
||||
reader.readMessage(message.rects, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_1.iscsGraphicData.Rect.deserialize(reader), dependency_1.iscsGraphicData.Rect));
|
||||
break;
|
||||
case 5:
|
||||
reader.readMessage(message.manualAlarmButtons, () => pb_1.Message.addToRepeatedWrapperField(message, 5, ManualAlarmButton.deserialize(reader), ManualAlarmButton));
|
||||
break;
|
||||
case 6:
|
||||
reader.readMessage(message.hydrantAlarmButtons, () => pb_1.Message.addToRepeatedWrapperField(message, 6, HydrantAlarmButton.deserialize(reader), HydrantAlarmButton));
|
||||
break;
|
||||
case 7:
|
||||
reader.readMessage(message.gasExtinguishings, () => pb_1.Message.addToRepeatedWrapperField(message, 7, GasExtinguishing.deserialize(reader), GasExtinguishing));
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): FASGraphicStorage {
|
||||
return FASGraphicStorage.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class ManualAlarmButton extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
common?: dependency_1.iscsGraphicData.CommonInfo;
|
||||
code?: 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 ("common" in data && data.common != undefined) {
|
||||
this.common = data.common;
|
||||
}
|
||||
if ("code" in data && data.code != undefined) {
|
||||
this.code = data.code;
|
||||
}
|
||||
}
|
||||
}
|
||||
get common() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_1.iscsGraphicData.CommonInfo, 1) as dependency_1.iscsGraphicData.CommonInfo;
|
||||
}
|
||||
set common(value: dependency_1.iscsGraphicData.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);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof dependency_1.iscsGraphicData.CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
}): ManualAlarmButton {
|
||||
const message = new ManualAlarmButton({});
|
||||
if (data.common != null) {
|
||||
message.common = dependency_1.iscsGraphicData.CommonInfo.fromObject(data.common);
|
||||
}
|
||||
if (data.code != null) {
|
||||
message.code = data.code;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
common?: ReturnType<typeof dependency_1.iscsGraphicData.CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
}
|
||||
if (this.code != null) {
|
||||
data.code = this.code;
|
||||
}
|
||||
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 (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ManualAlarmButton {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ManualAlarmButton();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.common, () => message.common = dependency_1.iscsGraphicData.CommonInfo.deserialize(reader));
|
||||
break;
|
||||
case 2:
|
||||
message.code = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): ManualAlarmButton {
|
||||
return ManualAlarmButton.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class HydrantAlarmButton extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
common?: dependency_1.iscsGraphicData.CommonInfo;
|
||||
code?: 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 ("common" in data && data.common != undefined) {
|
||||
this.common = data.common;
|
||||
}
|
||||
if ("code" in data && data.code != undefined) {
|
||||
this.code = data.code;
|
||||
}
|
||||
}
|
||||
}
|
||||
get common() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_1.iscsGraphicData.CommonInfo, 1) as dependency_1.iscsGraphicData.CommonInfo;
|
||||
}
|
||||
set common(value: dependency_1.iscsGraphicData.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);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof dependency_1.iscsGraphicData.CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
}): HydrantAlarmButton {
|
||||
const message = new HydrantAlarmButton({});
|
||||
if (data.common != null) {
|
||||
message.common = dependency_1.iscsGraphicData.CommonInfo.fromObject(data.common);
|
||||
}
|
||||
if (data.code != null) {
|
||||
message.code = data.code;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
common?: ReturnType<typeof dependency_1.iscsGraphicData.CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
}
|
||||
if (this.code != null) {
|
||||
data.code = this.code;
|
||||
}
|
||||
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 (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): HydrantAlarmButton {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new HydrantAlarmButton();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.common, () => message.common = dependency_1.iscsGraphicData.CommonInfo.deserialize(reader));
|
||||
break;
|
||||
case 2:
|
||||
message.code = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): HydrantAlarmButton {
|
||||
return HydrantAlarmButton.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class GasExtinguishing extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
common?: dependency_1.iscsGraphicData.CommonInfo;
|
||||
code?: 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 ("common" in data && data.common != undefined) {
|
||||
this.common = data.common;
|
||||
}
|
||||
if ("code" in data && data.code != undefined) {
|
||||
this.code = data.code;
|
||||
}
|
||||
}
|
||||
}
|
||||
get common() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_1.iscsGraphicData.CommonInfo, 1) as dependency_1.iscsGraphicData.CommonInfo;
|
||||
}
|
||||
set common(value: dependency_1.iscsGraphicData.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);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof dependency_1.iscsGraphicData.CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
}): GasExtinguishing {
|
||||
const message = new GasExtinguishing({});
|
||||
if (data.common != null) {
|
||||
message.common = dependency_1.iscsGraphicData.CommonInfo.fromObject(data.common);
|
||||
}
|
||||
if (data.code != null) {
|
||||
message.code = data.code;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
common?: ReturnType<typeof dependency_1.iscsGraphicData.CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
}
|
||||
if (this.code != null) {
|
||||
data.code = this.code;
|
||||
}
|
||||
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 (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GasExtinguishing {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GasExtinguishing();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.common, () => message.common = dependency_1.iscsGraphicData.CommonInfo.deserialize(reader));
|
||||
break;
|
||||
case 2:
|
||||
message.code = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): GasExtinguishing {
|
||||
return GasExtinguishing.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class SmokeDetector extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
common?: dependency_1.iscsGraphicData.CommonInfo;
|
||||
code?: 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 ("common" in data && data.common != undefined) {
|
||||
this.common = data.common;
|
||||
}
|
||||
if ("code" in data && data.code != undefined) {
|
||||
this.code = data.code;
|
||||
}
|
||||
}
|
||||
}
|
||||
get common() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_1.iscsGraphicData.CommonInfo, 1) as dependency_1.iscsGraphicData.CommonInfo;
|
||||
}
|
||||
set common(value: dependency_1.iscsGraphicData.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);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof dependency_1.iscsGraphicData.CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
}): SmokeDetector {
|
||||
const message = new SmokeDetector({});
|
||||
if (data.common != null) {
|
||||
message.common = dependency_1.iscsGraphicData.CommonInfo.fromObject(data.common);
|
||||
}
|
||||
if (data.code != null) {
|
||||
message.code = data.code;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
common?: ReturnType<typeof dependency_1.iscsGraphicData.CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
}
|
||||
if (this.code != null) {
|
||||
data.code = this.code;
|
||||
}
|
||||
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 (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SmokeDetector {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SmokeDetector();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.common, () => message.common = dependency_1.iscsGraphicData.CommonInfo.deserialize(reader));
|
||||
break;
|
||||
case 2:
|
||||
message.code = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): SmokeDetector {
|
||||
return SmokeDetector.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class TemperatureDetector extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
common?: dependency_1.iscsGraphicData.CommonInfo;
|
||||
code?: 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 ("common" in data && data.common != undefined) {
|
||||
this.common = data.common;
|
||||
}
|
||||
if ("code" in data && data.code != undefined) {
|
||||
this.code = data.code;
|
||||
}
|
||||
}
|
||||
}
|
||||
get common() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_1.iscsGraphicData.CommonInfo, 1) as dependency_1.iscsGraphicData.CommonInfo;
|
||||
}
|
||||
set common(value: dependency_1.iscsGraphicData.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);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof dependency_1.iscsGraphicData.CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
}): TemperatureDetector {
|
||||
const message = new TemperatureDetector({});
|
||||
if (data.common != null) {
|
||||
message.common = dependency_1.iscsGraphicData.CommonInfo.fromObject(data.common);
|
||||
}
|
||||
if (data.code != null) {
|
||||
message.code = data.code;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
common?: ReturnType<typeof dependency_1.iscsGraphicData.CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
}
|
||||
if (this.code != null) {
|
||||
data.code = this.code;
|
||||
}
|
||||
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 (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TemperatureDetector {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TemperatureDetector();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.common, () => message.common = dependency_1.iscsGraphicData.CommonInfo.deserialize(reader));
|
||||
break;
|
||||
case 2:
|
||||
message.code = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): TemperatureDetector {
|
||||
return TemperatureDetector.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue