@hg8496/definitions
Version:
ProtoBuf definitions an JS lib
791 lines (646 loc) • 31 kB
TypeScript
import * as $protobuf from "protobufjs";
/** Namespace janitza. */
export namespace janitza {
/** Namespace device. */
namespace device {
/** Properties of a Device. */
interface IDevice {
/** Device deviceType */
deviceType?: (janitza.device.Device.DeviceType|null);
/** Device serialNumber */
serialNumber?: (string|null);
/** Device deviceName */
deviceName?: (string|null);
/** Device firmwareVersion */
firmwareVersion?: (string|null);
/** Device communication */
communication?: (string|null);
/** Device gridVisID */
gridVisID?: (string|null);
/** Device referenceKey */
referenceKey?: (string|null);
}
/** Represents a Device. */
class Device implements IDevice {
/**
* Constructs a new Device.
* @param [properties] Properties to set
*/
constructor(properties?: janitza.device.IDevice);
/** Device deviceType. */
public deviceType: janitza.device.Device.DeviceType;
/** Device serialNumber. */
public serialNumber: string;
/** Device deviceName. */
public deviceName: string;
/** Device firmwareVersion. */
public firmwareVersion: string;
/** Device communication. */
public communication: string;
/** Device gridVisID. */
public gridVisID: string;
/** Device referenceKey. */
public referenceKey: string;
/**
* Creates a new Device instance using the specified properties.
* @param [properties] Properties to set
* @returns Device instance
*/
public static create(properties?: janitza.device.IDevice): janitza.device.Device;
/**
* Encodes the specified Device message. Does not implicitly {@link janitza.device.Device.verify|verify} messages.
* @param message Device message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: janitza.device.IDevice, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Device message, length delimited. Does not implicitly {@link janitza.device.Device.verify|verify} messages.
* @param message Device message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: janitza.device.IDevice, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Device message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Device
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): janitza.device.Device;
/**
* Decodes a Device message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns Device
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): janitza.device.Device;
/**
* Verifies a Device message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a Device message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Device
*/
public static fromObject(object: { [k: string]: any }): janitza.device.Device;
/**
* Creates a plain object from a Device message. Also converts values to other types if specified.
* @param message Device
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: janitza.device.Device, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Device to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
namespace Device {
/** DeviceType enum. */
enum DeviceType {
Unknown = 0,
UMG507 = 1,
UMG508 = 2,
UMG509 = 3,
UMG510 = 4,
UMG511 = 5,
UMG512 = 6,
UMG604 = 7,
UMG605 = 8,
UMG96S = 9,
UMG96S2 = 10,
UMG96RM = 11,
UMG96RME = 12,
UMG96RMEL = 13,
UMG96PA = 14,
PRODATA = 15,
UMG96PN = 16,
UMG801 = 17,
UMG801_BASE = 18,
UMG801_MG = 19,
UMG801_MG2 = 20,
UMG801_MG3 = 21,
GENERIC = 99,
VIRTUAL = 100,
KPI = 101,
DI = 102
}
}
/** Properties of a Devices. */
interface IDevices {
/** Devices devices */
devices?: (janitza.device.IDevice[]|null);
}
/** Represents a Devices. */
class Devices implements IDevices {
/**
* Constructs a new Devices.
* @param [properties] Properties to set
*/
constructor(properties?: janitza.device.IDevices);
/** Devices devices. */
public devices: janitza.device.IDevice[];
/**
* Creates a new Devices instance using the specified properties.
* @param [properties] Properties to set
* @returns Devices instance
*/
public static create(properties?: janitza.device.IDevices): janitza.device.Devices;
/**
* Encodes the specified Devices message. Does not implicitly {@link janitza.device.Devices.verify|verify} messages.
* @param message Devices message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: janitza.device.IDevices, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Devices message, length delimited. Does not implicitly {@link janitza.device.Devices.verify|verify} messages.
* @param message Devices message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: janitza.device.IDevices, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Devices message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Devices
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): janitza.device.Devices;
/**
* Decodes a Devices message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns Devices
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): janitza.device.Devices;
/**
* Verifies a Devices message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a Devices message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Devices
*/
public static fromObject(object: { [k: string]: any }): janitza.device.Devices;
/**
* Creates a plain object from a Devices message. Also converts values to other types if specified.
* @param message Devices
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: janitza.device.Devices, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Devices to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
}
/** Namespace values. */
namespace values {
/** TimeBase enum. */
enum TimeBase {
Unknown = 0,
Minutes1 = 1,
Minutes5 = 2,
Minutes10 = 3,
Minutes15 = 4,
Minutes30 = 5,
Minutes60 = 6,
Seconds10 = 7
}
/** Line enum. */
enum Line {
Unknown = 0,
L1 = 1,
L2 = 2,
L3 = 3,
N = 4,
SUM13 = 5,
L4 = 6
}
/** EnergyValueType enum. */
enum EnergyValueType {
Unknown = 0,
ActiveEnergyConsumed = 1,
ActiveEnergySupplied = 2,
ActiveEnergy = 3,
ActivePower = 4,
ReactiveEnergy = 5,
ReactivePower = 6,
ApparentPower = 7,
ApparentEnergy = 8,
Water = 9,
Gas = 10,
HeatQuantity = 11,
CompressedAir = 12,
Oil = 13,
KPI_Result = 100,
KPI_A = 101,
KPI_B = 102,
KPI_C = 103,
KPI_D = 104
}
/** Properties of an Input. */
interface IInput {
/** Input line */
line?: (janitza.values.Line|null);
/** Input channel */
channel?: (number|null);
}
/** Represents an Input. */
class Input implements IInput {
/**
* Constructs a new Input.
* @param [properties] Properties to set
*/
constructor(properties?: janitza.values.IInput);
/** Input line. */
public line: janitza.values.Line;
/** Input channel. */
public channel: number;
/** Input input. */
public input?: ("line"|"channel");
/**
* Creates a new Input instance using the specified properties.
* @param [properties] Properties to set
* @returns Input instance
*/
public static create(properties?: janitza.values.IInput): janitza.values.Input;
/**
* Encodes the specified Input message. Does not implicitly {@link janitza.values.Input.verify|verify} messages.
* @param message Input message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: janitza.values.IInput, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Input message, length delimited. Does not implicitly {@link janitza.values.Input.verify|verify} messages.
* @param message Input message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: janitza.values.IInput, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an Input message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Input
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): janitza.values.Input;
/**
* Decodes an Input message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns Input
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): janitza.values.Input;
/**
* Verifies an Input message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates an Input message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Input
*/
public static fromObject(object: { [k: string]: any }): janitza.values.Input;
/**
* Creates a plain object from an Input message. Also converts values to other types if specified.
* @param message Input
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: janitza.values.Input, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Input to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a ValueStream. */
interface IValueStream {
/** ValueStream timebase */
timebase?: (janitza.values.TimeBase|null);
/** ValueStream type */
type?: (janitza.values.EnergyValueType|null);
/** ValueStream input */
input?: (janitza.values.IInput|null);
/** ValueStream values */
values?: (number[]|null);
}
/** Represents a ValueStream. */
class ValueStream implements IValueStream {
/**
* Constructs a new ValueStream.
* @param [properties] Properties to set
*/
constructor(properties?: janitza.values.IValueStream);
/** ValueStream timebase. */
public timebase: janitza.values.TimeBase;
/** ValueStream type. */
public type: janitza.values.EnergyValueType;
/** ValueStream input. */
public input?: (janitza.values.IInput|null);
/** ValueStream values. */
public values: number[];
/**
* Creates a new ValueStream instance using the specified properties.
* @param [properties] Properties to set
* @returns ValueStream instance
*/
public static create(properties?: janitza.values.IValueStream): janitza.values.ValueStream;
/**
* Encodes the specified ValueStream message. Does not implicitly {@link janitza.values.ValueStream.verify|verify} messages.
* @param message ValueStream message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: janitza.values.IValueStream, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified ValueStream message, length delimited. Does not implicitly {@link janitza.values.ValueStream.verify|verify} messages.
* @param message ValueStream message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: janitza.values.IValueStream, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a ValueStream message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns ValueStream
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): janitza.values.ValueStream;
/**
* Decodes a ValueStream message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns ValueStream
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): janitza.values.ValueStream;
/**
* Verifies a ValueStream message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a ValueStream message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ValueStream
*/
public static fromObject(object: { [k: string]: any }): janitza.values.ValueStream;
/**
* Creates a plain object from a ValueStream message. Also converts values to other types if specified.
* @param message ValueStream
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: janitza.values.ValueStream, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this ValueStream to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of an EnergySnapshot. */
interface IEnergySnapshot {
/** EnergySnapshot day */
day?: (string|null);
/** EnergySnapshot timeSlot */
timeSlot?: (number|null);
/** EnergySnapshot timebase */
timebase?: (janitza.values.TimeBase|null);
/** EnergySnapshot input */
input?: (janitza.values.IInput|null);
/** EnergySnapshot activeEnergyConsumed */
activeEnergyConsumed?: (number|null);
/** EnergySnapshot activeEnergySupplied */
activeEnergySupplied?: (number|null);
/** EnergySnapshot activeEnergy */
activeEnergy?: (number|null);
/** EnergySnapshot activePower */
activePower?: (number|null);
/** EnergySnapshot reactiveEnergyConsumed */
reactiveEnergyConsumed?: (number|null);
/** EnergySnapshot reactiveEnergySupplied */
reactiveEnergySupplied?: (number|null);
/** EnergySnapshot reactiveEnergy */
reactiveEnergy?: (number|null);
/** EnergySnapshot reactivePower */
reactivePower?: (number|null);
/** EnergySnapshot apparentPower */
apparentPower?: (number|null);
/** EnergySnapshot apparentEnergyConsumed */
apparentEnergyConsumed?: (number|null);
/** EnergySnapshot apparentEnergySupplied */
apparentEnergySupplied?: (number|null);
/** EnergySnapshot apparentEnergy */
apparentEnergy?: (number|null);
}
/** Represents an EnergySnapshot. */
class EnergySnapshot implements IEnergySnapshot {
/**
* Constructs a new EnergySnapshot.
* @param [properties] Properties to set
*/
constructor(properties?: janitza.values.IEnergySnapshot);
/** EnergySnapshot day. */
public day: string;
/** EnergySnapshot timeSlot. */
public timeSlot: number;
/** EnergySnapshot timebase. */
public timebase: janitza.values.TimeBase;
/** EnergySnapshot input. */
public input?: (janitza.values.IInput|null);
/** EnergySnapshot activeEnergyConsumed. */
public activeEnergyConsumed: number;
/** EnergySnapshot activeEnergySupplied. */
public activeEnergySupplied: number;
/** EnergySnapshot activeEnergy. */
public activeEnergy: number;
/** EnergySnapshot activePower. */
public activePower: number;
/** EnergySnapshot reactiveEnergyConsumed. */
public reactiveEnergyConsumed: number;
/** EnergySnapshot reactiveEnergySupplied. */
public reactiveEnergySupplied: number;
/** EnergySnapshot reactiveEnergy. */
public reactiveEnergy: number;
/** EnergySnapshot reactivePower. */
public reactivePower: number;
/** EnergySnapshot apparentPower. */
public apparentPower: number;
/** EnergySnapshot apparentEnergyConsumed. */
public apparentEnergyConsumed: number;
/** EnergySnapshot apparentEnergySupplied. */
public apparentEnergySupplied: number;
/** EnergySnapshot apparentEnergy. */
public apparentEnergy: number;
/**
* Creates a new EnergySnapshot instance using the specified properties.
* @param [properties] Properties to set
* @returns EnergySnapshot instance
*/
public static create(properties?: janitza.values.IEnergySnapshot): janitza.values.EnergySnapshot;
/**
* Encodes the specified EnergySnapshot message. Does not implicitly {@link janitza.values.EnergySnapshot.verify|verify} messages.
* @param message EnergySnapshot message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: janitza.values.IEnergySnapshot, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified EnergySnapshot message, length delimited. Does not implicitly {@link janitza.values.EnergySnapshot.verify|verify} messages.
* @param message EnergySnapshot message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: janitza.values.IEnergySnapshot, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an EnergySnapshot message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns EnergySnapshot
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): janitza.values.EnergySnapshot;
/**
* Decodes an EnergySnapshot message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns EnergySnapshot
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): janitza.values.EnergySnapshot;
/**
* Verifies an EnergySnapshot message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates an EnergySnapshot message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns EnergySnapshot
*/
public static fromObject(object: { [k: string]: any }): janitza.values.EnergySnapshot;
/**
* Creates a plain object from an EnergySnapshot message. Also converts values to other types if specified.
* @param message EnergySnapshot
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: janitza.values.EnergySnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this EnergySnapshot to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of an EnergyDay. */
interface IEnergyDay {
/** EnergyDay day */
day?: (string|null);
/** EnergyDay values */
values?: (janitza.values.IValueStream[]|null);
}
/** Represents an EnergyDay. */
class EnergyDay implements IEnergyDay {
/**
* Constructs a new EnergyDay.
* @param [properties] Properties to set
*/
constructor(properties?: janitza.values.IEnergyDay);
/** EnergyDay day. */
public day: string;
/** EnergyDay values. */
public values: janitza.values.IValueStream[];
/**
* Creates a new EnergyDay instance using the specified properties.
* @param [properties] Properties to set
* @returns EnergyDay instance
*/
public static create(properties?: janitza.values.IEnergyDay): janitza.values.EnergyDay;
/**
* Encodes the specified EnergyDay message. Does not implicitly {@link janitza.values.EnergyDay.verify|verify} messages.
* @param message EnergyDay message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: janitza.values.IEnergyDay, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified EnergyDay message, length delimited. Does not implicitly {@link janitza.values.EnergyDay.verify|verify} messages.
* @param message EnergyDay message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: janitza.values.IEnergyDay, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an EnergyDay message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns EnergyDay
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): janitza.values.EnergyDay;
/**
* Decodes an EnergyDay message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns EnergyDay
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): janitza.values.EnergyDay;
/**
* Verifies an EnergyDay message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates an EnergyDay message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns EnergyDay
*/
public static fromObject(object: { [k: string]: any }): janitza.values.EnergyDay;
/**
* Creates a plain object from an EnergyDay message. Also converts values to other types if specified.
* @param message EnergyDay
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: janitza.values.EnergyDay, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this EnergyDay to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
}
}