proto同步
This commit is contained in:
parent
05faded0a3
commit
f6a28fad10
@ -1 +1 @@
|
||||
Subproject commit 62dc244c9214c0f8095a54cd6e745cc1105b0c3c
|
||||
Subproject commit 2b9a6287fb04b6cd7a8c6018f2c12b7d87dfad28
|
@ -6,7 +6,7 @@
|
||||
import * as dependency_1 from "./iscs_graphic_data";
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export namespace FireAlarmGraphicData {
|
||||
export class CCTVGraphicStorage extends pb_1.Message {
|
||||
export class FireAlarmGraphicStorage extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
canvas?: dependency_1.iscsGraphicData.Canvas;
|
||||
@ -52,8 +52,8 @@ export namespace FireAlarmGraphicData {
|
||||
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>[];
|
||||
}): CCTVGraphicStorage {
|
||||
const message = new CCTVGraphicStorage({});
|
||||
}): FireAlarmGraphicStorage {
|
||||
const message = new FireAlarmGraphicStorage({});
|
||||
if (data.canvas != null) {
|
||||
message.canvas = dependency_1.iscsGraphicData.Canvas.fromObject(data.canvas);
|
||||
}
|
||||
@ -95,8 +95,8 @@ export namespace FireAlarmGraphicData {
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CCTVGraphicStorage {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CCTVGraphicStorage();
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FireAlarmGraphicStorage {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FireAlarmGraphicStorage();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
@ -118,131 +118,8 @@ export namespace FireAlarmGraphicData {
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): CCTVGraphicStorage {
|
||||
return CCTVGraphicStorage.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class CCTVButton extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
common?: dependency_1.iscsGraphicData.CommonInfo;
|
||||
code?: string;
|
||||
buttonType?: CCTVButton.ButtonType;
|
||||
}) {
|
||||
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;
|
||||
}
|
||||
if ("buttonType" in data && data.buttonType != undefined) {
|
||||
this.buttonType = data.buttonType;
|
||||
}
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
get buttonType() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 3, CCTVButton.ButtonType.rect) as CCTVButton.ButtonType;
|
||||
}
|
||||
set buttonType(value: CCTVButton.ButtonType) {
|
||||
pb_1.Message.setField(this, 3, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof dependency_1.iscsGraphicData.CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
buttonType?: CCTVButton.ButtonType;
|
||||
}): CCTVButton {
|
||||
const message = new CCTVButton({});
|
||||
if (data.common != null) {
|
||||
message.common = dependency_1.iscsGraphicData.CommonInfo.fromObject(data.common);
|
||||
}
|
||||
if (data.code != null) {
|
||||
message.code = data.code;
|
||||
}
|
||||
if (data.buttonType != null) {
|
||||
message.buttonType = data.buttonType;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
common?: ReturnType<typeof dependency_1.iscsGraphicData.CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
buttonType?: CCTVButton.ButtonType;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
}
|
||||
if (this.code != null) {
|
||||
data.code = this.code;
|
||||
}
|
||||
if (this.buttonType != null) {
|
||||
data.buttonType = this.buttonType;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.has_common)
|
||||
writer.writeMessage(1, this.common, () => this.common.serialize(writer));
|
||||
if (this.code.length)
|
||||
writer.writeString(2, this.code);
|
||||
if (this.buttonType != CCTVButton.ButtonType.rect)
|
||||
writer.writeEnum(3, this.buttonType);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CCTVButton {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CCTVButton();
|
||||
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;
|
||||
case 3:
|
||||
message.buttonType = reader.readEnum();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): CCTVButton {
|
||||
return CCTVButton.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export namespace CCTVButton {
|
||||
export enum ButtonType {
|
||||
rect = 0,
|
||||
monitor = 1,
|
||||
semicircle = 2
|
||||
static deserializeBinary(bytes: Uint8Array): FireAlarmGraphicStorage {
|
||||
return FireAlarmGraphicStorage.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user