proto同步

This commit is contained in:
dong 2023-12-15 15:14:00 +08:00
parent 9ce385fe1e
commit 3d2da77f8a

View File

@ -4892,7 +4892,7 @@ export namespace state {
export class VariationStatus extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
updatedTrain?: TrainState[];
updatedTrain?: TrainMapState[];
removedTrainId?: string[];
updatedSwitch?: SwitchState[];
updatedSection?: SectionState[];
@ -4919,9 +4919,9 @@ export namespace state {
}
}
get updatedTrain() {
return pb_1.Message.getRepeatedWrapperField(this, TrainState, 1) as TrainState[];
return pb_1.Message.getRepeatedWrapperField(this, TrainMapState, 1) as TrainMapState[];
}
set updatedTrain(value: TrainState[]) {
set updatedTrain(value: TrainMapState[]) {
pb_1.Message.setRepeatedWrapperField(this, 1, value);
}
get removedTrainId() {
@ -4949,7 +4949,7 @@ export namespace state {
pb_1.Message.setRepeatedWrapperField(this, 5, value);
}
static fromObject(data: {
updatedTrain?: ReturnType<typeof TrainState.prototype.toObject>[];
updatedTrain?: ReturnType<typeof TrainMapState.prototype.toObject>[];
removedTrainId?: string[];
updatedSwitch?: ReturnType<typeof SwitchState.prototype.toObject>[];
updatedSection?: ReturnType<typeof SectionState.prototype.toObject>[];
@ -4957,7 +4957,7 @@ export namespace state {
}): VariationStatus {
const message = new VariationStatus({});
if (data.updatedTrain != null) {
message.updatedTrain = data.updatedTrain.map(item => TrainState.fromObject(item));
message.updatedTrain = data.updatedTrain.map(item => TrainMapState.fromObject(item));
}
if (data.removedTrainId != null) {
message.removedTrainId = data.removedTrainId;
@ -4975,14 +4975,14 @@ export namespace state {
}
toObject() {
const data: {
updatedTrain?: ReturnType<typeof TrainState.prototype.toObject>[];
updatedTrain?: ReturnType<typeof TrainMapState.prototype.toObject>[];
removedTrainId?: string[];
updatedSwitch?: ReturnType<typeof SwitchState.prototype.toObject>[];
updatedSection?: ReturnType<typeof SectionState.prototype.toObject>[];
updatedReply?: ReturnType<typeof ReplyState.prototype.toObject>[];
} = {};
if (this.updatedTrain != null) {
data.updatedTrain = this.updatedTrain.map((item: TrainState) => item.toObject());
data.updatedTrain = this.updatedTrain.map((item: TrainMapState) => item.toObject());
}
if (this.removedTrainId != null) {
data.removedTrainId = this.removedTrainId;
@ -5003,7 +5003,7 @@ export namespace state {
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.updatedTrain.length)
writer.writeRepeatedMessage(1, this.updatedTrain, (item: TrainState) => item.serialize(writer));
writer.writeRepeatedMessage(1, this.updatedTrain, (item: TrainMapState) => item.serialize(writer));
if (this.removedTrainId.length)
writer.writeRepeatedString(2, this.removedTrainId);
if (this.updatedSwitch.length)
@ -5022,7 +5022,7 @@ export namespace state {
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.updatedTrain, () => pb_1.Message.addToRepeatedWrapperField(message, 1, TrainState.deserialize(reader), TrainState));
reader.readMessage(message.updatedTrain, () => pb_1.Message.addToRepeatedWrapperField(message, 1, TrainMapState.deserialize(reader), TrainMapState));
break;
case 2:
pb_1.Message.addToRepeatedField(message, 2, reader.readString());