fromProto static method
Implementation
static PresetsMessage fromProto(presets_pb.Message proto) {
return switch (proto.whichMessage()) {
presets_pb.Message_Message.initialise => PresetsMessage.initialise(),
presets_pb.Message_Message.notify => PresetsMessage.notify(
proto.notify.preset.id,
PresetDataProtoEx.fromProto(proto.notify.preset.preset),
),
presets_pb.Message_Message.create_3 => PresetsMessage.create(
PresetDataProtoEx.fromProto(proto.create_3.preset),
),
presets_pb.Message_Message.update => PresetsMessage.update(
proto.update.preset.id,
PresetDataProtoEx.fromProto(proto.update.preset.preset),
),
presets_pb.Message_Message.remove =>
PresetsMessage.delete(proto.remove.id),
presets_pb.Message_Message.notSet => throw ProtoException(),
};
}