@m1kad0/hannah-proto 4.8.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -12
- package/dist/compat_interceptor.js +1 -1
- package/dist/compat_versions.js +89 -89
- package/dist/descriptor.binpb +0 -0
- package/dist/index.d.ts +1 -22
- package/dist/index.js +2 -23
- package/dist/{activity_log.d.ts → v2/activity_log.d.ts} +1 -1
- package/dist/{activity_log.js → v2/activity_log.js} +2 -2
- package/dist/{agent.d.ts → v2/agent.d.ts} +61 -86
- package/dist/{agent.js → v2/agent.js} +224 -426
- package/dist/{automation.d.ts → v2/automation.d.ts} +1 -1
- package/dist/{automation.js → v2/automation.js} +2 -2
- package/dist/{car_state.d.ts → v2/car_state.d.ts} +1 -1
- package/dist/{car_state.js → v2/car_state.js} +2 -2
- package/dist/{channel.d.ts → v2/channel.d.ts} +1 -1
- package/dist/{channel.js → v2/channel.js} +2 -2
- package/dist/{control.d.ts → v2/control.d.ts} +1 -1
- package/dist/{control.js → v2/control.js} +2 -2
- package/dist/v2/device_control_menu.d.ts +69 -0
- package/dist/v2/device_control_menu.js +339 -0
- package/dist/v2/device_model.d.ts +240 -0
- package/dist/v2/device_model.js +777 -0
- package/dist/{event_stream.d.ts → v2/event_stream.d.ts} +1 -1
- package/dist/{event_stream.js → v2/event_stream.js} +2 -2
- package/dist/{hannah.d.ts → v2/hannah.d.ts} +86 -86
- package/dist/{hannah.js → v2/hannah.js} +88 -88
- package/dist/v2/index.d.ts +23 -0
- package/dist/v2/index.js +59 -0
- package/dist/{infrastructure.d.ts → v2/infrastructure.d.ts} +1 -1
- package/dist/{infrastructure.js → v2/infrastructure.js} +2 -2
- package/dist/{logging.d.ts → v2/logging.d.ts} +4 -4
- package/dist/{logging.js → v2/logging.js} +6 -6
- package/dist/{messages.d.ts → v2/messages.d.ts} +1 -1
- package/dist/{messages.js → v2/messages.js} +2 -2
- package/dist/{satellite.d.ts → v2/satellite.d.ts} +1 -1
- package/dist/{satellite.js → v2/satellite.js} +2 -2
- package/dist/{satellite_provisioning.d.ts → v2/satellite_provisioning.d.ts} +1 -1
- package/dist/{satellite_provisioning.js → v2/satellite_provisioning.js} +2 -2
- package/dist/{satellite_proxy.d.ts → v2/satellite_proxy.d.ts} +1 -1
- package/dist/{satellite_proxy.js → v2/satellite_proxy.js} +2 -2
- package/dist/{shared.d.ts → v2/shared.d.ts} +1 -28
- package/dist/v2/shared.js +113 -0
- package/dist/{speaker_enrollment.d.ts → v2/speaker_enrollment.d.ts} +1 -1
- package/dist/{speaker_enrollment.js → v2/speaker_enrollment.js} +2 -2
- package/dist/{timer_admin.d.ts → v2/timer_admin.d.ts} +1 -1
- package/dist/{timer_admin.js → v2/timer_admin.js} +2 -2
- package/dist/{timer_service.d.ts → v2/timer_service.d.ts} +1 -1
- package/dist/{timer_service.js → v2/timer_service.js} +2 -2
- package/dist/{user_registry.d.ts → v2/user_registry.d.ts} +1 -1
- package/dist/{user_registry.js → v2/user_registry.js} +2 -2
- package/dist/{wakeword_capture.d.ts → v2/wakeword_capture.d.ts} +1 -1
- package/dist/{wakeword_capture.js → v2/wakeword_capture.js} +2 -2
- package/dist/{weather.d.ts → v2/weather.d.ts} +1 -1
- package/dist/{weather.js → v2/weather.js} +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/device_control_menu.d.ts +0 -88
- package/dist/device_control_menu.js +0 -629
- package/dist/shared.js +0 -249
|
@@ -0,0 +1,777 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.12.1
|
|
5
|
+
// protoc unknown
|
|
6
|
+
// source: hannah/v2/device_model.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.SetSlot = exports.DeviceAvailability = exports.SlotUpdate = exports.TypedDeviceSnapshot = exports.TypedDevice = exports.Slot = exports.SlotValue = exports.SlotKind = exports.DeviceSubtype = exports.DeviceClass = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
exports.protobufPackage = "hannah.v2";
|
|
12
|
+
/**
|
|
13
|
+
* What kind of device this is. A class exists per family of verbs, not per feature:
|
|
14
|
+
* a measuring socket is a SOCKET with a filled POWER slot, not a class of its own.
|
|
15
|
+
*/
|
|
16
|
+
var DeviceClass;
|
|
17
|
+
(function (DeviceClass) {
|
|
18
|
+
DeviceClass[DeviceClass["DEVICE_CLASS_UNSPECIFIED"] = 0] = "DEVICE_CLASS_UNSPECIFIED";
|
|
19
|
+
/** DEVICE_CLASS_LIGHT - Switchable light. Slots: ON (required), BRIGHTNESS, COLOR, COLOR_TEMPERATURE. */
|
|
20
|
+
DeviceClass[DeviceClass["DEVICE_CLASS_LIGHT"] = 1] = "DEVICE_CLASS_LIGHT";
|
|
21
|
+
/** DEVICE_CLASS_SOCKET - Socket/plug. Slots: ON (required), POWER, ENERGY, VOLTAGE, CURRENT. */
|
|
22
|
+
DeviceClass[DeviceClass["DEVICE_CLASS_SOCKET"] = 2] = "DEVICE_CLASS_SOCKET";
|
|
23
|
+
/**
|
|
24
|
+
* DEVICE_CLASS_GENERIC_BINARY_SWITCH - Any other switchable boolean that fits no other class (scene-like switches,
|
|
25
|
+
* flags, vendor specific switches). Slots: ON (required).
|
|
26
|
+
*/
|
|
27
|
+
DeviceClass[DeviceClass["DEVICE_CLASS_GENERIC_BINARY_SWITCH"] = 3] = "DEVICE_CLASS_GENERIC_BINARY_SWITCH";
|
|
28
|
+
/**
|
|
29
|
+
* DEVICE_CLASS_THERMOSTAT - Radiator or room thermostat. Slots: TARGET_TEMPERATURE (required), TEMPERATURE,
|
|
30
|
+
* HUMIDITY, VALVE. Comfort/eco setpoints and similar are not slots. Units with an
|
|
31
|
+
* operating mode and a fan are DEVICE_CLASS_CLIMATE.
|
|
32
|
+
*/
|
|
33
|
+
DeviceClass[DeviceClass["DEVICE_CLASS_THERMOSTAT"] = 4] = "DEVICE_CLASS_THERMOSTAT";
|
|
34
|
+
/** DEVICE_CLASS_COVER - Blind, shutter, awning. Slots: POSITION (required), TILT, STOP. */
|
|
35
|
+
DeviceClass[DeviceClass["DEVICE_CLASS_COVER"] = 5] = "DEVICE_CLASS_COVER";
|
|
36
|
+
/**
|
|
37
|
+
* DEVICE_CLASS_SENSOR - Read-only measurements. At least one measurement slot: TEMPERATURE, HUMIDITY,
|
|
38
|
+
* ILLUMINANCE, PRESSURE, CO2, IAQ, VOC, POWER, ENERGY, MOTION.
|
|
39
|
+
*/
|
|
40
|
+
DeviceClass[DeviceClass["DEVICE_CLASS_SENSOR"] = 6] = "DEVICE_CLASS_SENSOR";
|
|
41
|
+
/** DEVICE_CLASS_CONTACT - Door or window contact. Slots: OPEN (required, read-only). */
|
|
42
|
+
DeviceClass[DeviceClass["DEVICE_CLASS_CONTACT"] = 7] = "DEVICE_CLASS_CONTACT";
|
|
43
|
+
/**
|
|
44
|
+
* DEVICE_CLASS_GENERIC - Fallback for anything that matches no class: a list of typed values
|
|
45
|
+
* (GENERIC_NUMBER / GENERIC_BOOL / GENERIC_TEXT), each with label and unit.
|
|
46
|
+
*/
|
|
47
|
+
DeviceClass[DeviceClass["DEVICE_CLASS_GENERIC"] = 8] = "DEVICE_CLASS_GENERIC";
|
|
48
|
+
/**
|
|
49
|
+
* DEVICE_CLASS_CLIMATE - Air conditioner / room climate unit with operating mode and fan. Slots: ON (required),
|
|
50
|
+
* MODE, TARGET_TEMPERATURE, TEMPERATURE, HUMIDITY, FAN_SPEED. A radiator thermostat
|
|
51
|
+
* without mode and fan is a THERMOSTAT, not a CLIMATE.
|
|
52
|
+
*/
|
|
53
|
+
DeviceClass[DeviceClass["DEVICE_CLASS_CLIMATE"] = 9] = "DEVICE_CLASS_CLIMATE";
|
|
54
|
+
DeviceClass[DeviceClass["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
55
|
+
})(DeviceClass || (exports.DeviceClass = DeviceClass = {}));
|
|
56
|
+
/**
|
|
57
|
+
* A finer kind within a device class, for the cases where the class alone does not say
|
|
58
|
+
* what a user means ("the windows" versus "the doors"). Optional: the adapter sets it
|
|
59
|
+
* where it knows (function, role, type detector), otherwise UNSPECIFIED.
|
|
60
|
+
*/
|
|
61
|
+
var DeviceSubtype;
|
|
62
|
+
(function (DeviceSubtype) {
|
|
63
|
+
/** DEVICE_SUBTYPE_UNSPECIFIED - No statement. Hannah Core may fall back to the device name. */
|
|
64
|
+
DeviceSubtype[DeviceSubtype["DEVICE_SUBTYPE_UNSPECIFIED"] = 0] = "DEVICE_SUBTYPE_UNSPECIFIED";
|
|
65
|
+
/** DEVICE_SUBTYPE_WINDOW - DEVICE_CLASS_CONTACT: window contact. */
|
|
66
|
+
DeviceSubtype[DeviceSubtype["DEVICE_SUBTYPE_WINDOW"] = 1] = "DEVICE_SUBTYPE_WINDOW";
|
|
67
|
+
/** DEVICE_SUBTYPE_DOOR - DEVICE_CLASS_CONTACT: door contact. */
|
|
68
|
+
DeviceSubtype[DeviceSubtype["DEVICE_SUBTYPE_DOOR"] = 2] = "DEVICE_SUBTYPE_DOOR";
|
|
69
|
+
DeviceSubtype[DeviceSubtype["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
70
|
+
})(DeviceSubtype || (exports.DeviceSubtype = DeviceSubtype = {}));
|
|
71
|
+
/**
|
|
72
|
+
* What a slot means, and therefore which scale and unit its value has. The adapter
|
|
73
|
+
* normalizes every value to exactly this scale; Core relies on it.
|
|
74
|
+
*/
|
|
75
|
+
var SlotKind;
|
|
76
|
+
(function (SlotKind) {
|
|
77
|
+
SlotKind[SlotKind["SLOT_KIND_UNSPECIFIED"] = 0] = "SLOT_KIND_UNSPECIFIED";
|
|
78
|
+
/** SLOT_KIND_ON - --- switching and light --- */
|
|
79
|
+
SlotKind[SlotKind["SLOT_KIND_ON"] = 1] = "SLOT_KIND_ON";
|
|
80
|
+
/** SLOT_KIND_BRIGHTNESS - number, 0-100 (%) */
|
|
81
|
+
SlotKind[SlotKind["SLOT_KIND_BRIGHTNESS"] = 2] = "SLOT_KIND_BRIGHTNESS";
|
|
82
|
+
/** SLOT_KIND_COLOR - rgb, 0xRRGGBB */
|
|
83
|
+
SlotKind[SlotKind["SLOT_KIND_COLOR"] = 3] = "SLOT_KIND_COLOR";
|
|
84
|
+
/** SLOT_KIND_COLOR_TEMPERATURE - number, Kelvin (e.g. 2700 warm white, 6500 cold white) */
|
|
85
|
+
SlotKind[SlotKind["SLOT_KIND_COLOR_TEMPERATURE"] = 4] = "SLOT_KIND_COLOR_TEMPERATURE";
|
|
86
|
+
/** SLOT_KIND_POWER - --- electricity --- */
|
|
87
|
+
SlotKind[SlotKind["SLOT_KIND_POWER"] = 10] = "SLOT_KIND_POWER";
|
|
88
|
+
/** SLOT_KIND_ENERGY - number, kWh (cumulative) */
|
|
89
|
+
SlotKind[SlotKind["SLOT_KIND_ENERGY"] = 11] = "SLOT_KIND_ENERGY";
|
|
90
|
+
/** SLOT_KIND_VOLTAGE - number, V */
|
|
91
|
+
SlotKind[SlotKind["SLOT_KIND_VOLTAGE"] = 12] = "SLOT_KIND_VOLTAGE";
|
|
92
|
+
/** SLOT_KIND_CURRENT - number, A */
|
|
93
|
+
SlotKind[SlotKind["SLOT_KIND_CURRENT"] = 13] = "SLOT_KIND_CURRENT";
|
|
94
|
+
/** SLOT_KIND_TARGET_TEMPERATURE - --- climate --- */
|
|
95
|
+
SlotKind[SlotKind["SLOT_KIND_TARGET_TEMPERATURE"] = 20] = "SLOT_KIND_TARGET_TEMPERATURE";
|
|
96
|
+
/** SLOT_KIND_TEMPERATURE - number, °C, measured value */
|
|
97
|
+
SlotKind[SlotKind["SLOT_KIND_TEMPERATURE"] = 21] = "SLOT_KIND_TEMPERATURE";
|
|
98
|
+
/** SLOT_KIND_HUMIDITY - number, 0-100 (% relative) */
|
|
99
|
+
SlotKind[SlotKind["SLOT_KIND_HUMIDITY"] = 22] = "SLOT_KIND_HUMIDITY";
|
|
100
|
+
/** SLOT_KIND_VALVE - number, 0-100 (% open) */
|
|
101
|
+
SlotKind[SlotKind["SLOT_KIND_VALVE"] = 23] = "SLOT_KIND_VALVE";
|
|
102
|
+
/**
|
|
103
|
+
* SLOT_KIND_MODE - Operating mode of a CLIMATE device, text, one of: "cool", "heat", "dry", "fan_only",
|
|
104
|
+
* "auto". The adapter normalizes the device's own values to this vocabulary. The modes the
|
|
105
|
+
* device really supports are listed in Slot.options.
|
|
106
|
+
*/
|
|
107
|
+
SlotKind[SlotKind["SLOT_KIND_MODE"] = 24] = "SLOT_KIND_MODE";
|
|
108
|
+
/**
|
|
109
|
+
* SLOT_KIND_FAN_SPEED - Fan level of a CLIMATE device, text, one of: "low", "medium", "high", "auto". Supported
|
|
110
|
+
* levels are listed in Slot.options.
|
|
111
|
+
*/
|
|
112
|
+
SlotKind[SlotKind["SLOT_KIND_FAN_SPEED"] = 25] = "SLOT_KIND_FAN_SPEED";
|
|
113
|
+
/** SLOT_KIND_POSITION - --- cover --- */
|
|
114
|
+
SlotKind[SlotKind["SLOT_KIND_POSITION"] = 30] = "SLOT_KIND_POSITION";
|
|
115
|
+
/** SLOT_KIND_TILT - number, 0-100 (%) */
|
|
116
|
+
SlotKind[SlotKind["SLOT_KIND_TILT"] = 31] = "SLOT_KIND_TILT";
|
|
117
|
+
/** SLOT_KIND_STOP - boolean trigger: true = stop movement, not a state */
|
|
118
|
+
SlotKind[SlotKind["SLOT_KIND_STOP"] = 32] = "SLOT_KIND_STOP";
|
|
119
|
+
/** SLOT_KIND_OPEN - --- binary sensors --- */
|
|
120
|
+
SlotKind[SlotKind["SLOT_KIND_OPEN"] = 40] = "SLOT_KIND_OPEN";
|
|
121
|
+
/** SLOT_KIND_MOTION - boolean: true = motion/presence detected */
|
|
122
|
+
SlotKind[SlotKind["SLOT_KIND_MOTION"] = 41] = "SLOT_KIND_MOTION";
|
|
123
|
+
/** SLOT_KIND_ILLUMINANCE - --- further measurements --- */
|
|
124
|
+
SlotKind[SlotKind["SLOT_KIND_ILLUMINANCE"] = 50] = "SLOT_KIND_ILLUMINANCE";
|
|
125
|
+
/** SLOT_KIND_PRESSURE - number, hPa */
|
|
126
|
+
SlotKind[SlotKind["SLOT_KIND_PRESSURE"] = 51] = "SLOT_KIND_PRESSURE";
|
|
127
|
+
/** SLOT_KIND_CO2 - number, ppm */
|
|
128
|
+
SlotKind[SlotKind["SLOT_KIND_CO2"] = 52] = "SLOT_KIND_CO2";
|
|
129
|
+
/** SLOT_KIND_IAQ - number, index 0-500 */
|
|
130
|
+
SlotKind[SlotKind["SLOT_KIND_IAQ"] = 53] = "SLOT_KIND_IAQ";
|
|
131
|
+
/** SLOT_KIND_VOC - number, ppm */
|
|
132
|
+
SlotKind[SlotKind["SLOT_KIND_VOC"] = 54] = "SLOT_KIND_VOC";
|
|
133
|
+
/** SLOT_KIND_GENERIC_NUMBER - --- generic values (DEVICE_CLASS_GENERIC), described by label and unit --- */
|
|
134
|
+
SlotKind[SlotKind["SLOT_KIND_GENERIC_NUMBER"] = 90] = "SLOT_KIND_GENERIC_NUMBER";
|
|
135
|
+
SlotKind[SlotKind["SLOT_KIND_GENERIC_BOOL"] = 91] = "SLOT_KIND_GENERIC_BOOL";
|
|
136
|
+
SlotKind[SlotKind["SLOT_KIND_GENERIC_TEXT"] = 92] = "SLOT_KIND_GENERIC_TEXT";
|
|
137
|
+
SlotKind[SlotKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
138
|
+
})(SlotKind || (exports.SlotKind = SlotKind = {}));
|
|
139
|
+
function createBaseSlotValue() {
|
|
140
|
+
return { boolean: undefined, number: undefined, text: undefined, rgb: undefined };
|
|
141
|
+
}
|
|
142
|
+
exports.SlotValue = {
|
|
143
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
144
|
+
if (message.boolean !== undefined) {
|
|
145
|
+
writer.uint32(8).bool(message.boolean);
|
|
146
|
+
}
|
|
147
|
+
if (message.number !== undefined) {
|
|
148
|
+
writer.uint32(17).double(message.number);
|
|
149
|
+
}
|
|
150
|
+
if (message.text !== undefined) {
|
|
151
|
+
writer.uint32(26).string(message.text);
|
|
152
|
+
}
|
|
153
|
+
if (message.rgb !== undefined) {
|
|
154
|
+
writer.uint32(32).uint32(message.rgb);
|
|
155
|
+
}
|
|
156
|
+
return writer;
|
|
157
|
+
},
|
|
158
|
+
decode(input, length) {
|
|
159
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
160
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
161
|
+
if (previousRecursionDepth >= 100) {
|
|
162
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
163
|
+
}
|
|
164
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
165
|
+
try {
|
|
166
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
167
|
+
const message = createBaseSlotValue();
|
|
168
|
+
while (reader.pos < end) {
|
|
169
|
+
const tag = reader.uint32();
|
|
170
|
+
switch (tag >>> 3) {
|
|
171
|
+
case 1: {
|
|
172
|
+
if (tag !== 8) {
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
message.boolean = reader.bool();
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
case 2: {
|
|
179
|
+
if (tag !== 17) {
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
message.number = reader.double();
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
case 3: {
|
|
186
|
+
if (tag !== 26) {
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
message.text = reader.string();
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
case 4: {
|
|
193
|
+
if (tag !== 32) {
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
message.rgb = reader.uint32();
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
reader.skip(tag & 7);
|
|
204
|
+
}
|
|
205
|
+
return message;
|
|
206
|
+
}
|
|
207
|
+
finally {
|
|
208
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
create(base) {
|
|
212
|
+
return exports.SlotValue.fromPartial(base ?? {});
|
|
213
|
+
},
|
|
214
|
+
fromPartial(object) {
|
|
215
|
+
const message = createBaseSlotValue();
|
|
216
|
+
message.boolean = object.boolean ?? undefined;
|
|
217
|
+
message.number = object.number ?? undefined;
|
|
218
|
+
message.text = object.text ?? undefined;
|
|
219
|
+
message.rgb = object.rgb ?? undefined;
|
|
220
|
+
return message;
|
|
221
|
+
},
|
|
222
|
+
};
|
|
223
|
+
function createBaseSlot() {
|
|
224
|
+
return {
|
|
225
|
+
slotId: "",
|
|
226
|
+
kind: 0,
|
|
227
|
+
value: undefined,
|
|
228
|
+
writable: false,
|
|
229
|
+
unit: "",
|
|
230
|
+
label: "",
|
|
231
|
+
requiredTrustLevel: undefined,
|
|
232
|
+
options: [],
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
exports.Slot = {
|
|
236
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
237
|
+
if (message.slotId !== "") {
|
|
238
|
+
writer.uint32(10).string(message.slotId);
|
|
239
|
+
}
|
|
240
|
+
if (message.kind !== 0) {
|
|
241
|
+
writer.uint32(16).int32(message.kind);
|
|
242
|
+
}
|
|
243
|
+
if (message.value !== undefined) {
|
|
244
|
+
exports.SlotValue.encode(message.value, writer.uint32(26).fork()).join();
|
|
245
|
+
}
|
|
246
|
+
if (message.writable !== false) {
|
|
247
|
+
writer.uint32(32).bool(message.writable);
|
|
248
|
+
}
|
|
249
|
+
if (message.unit !== "") {
|
|
250
|
+
writer.uint32(42).string(message.unit);
|
|
251
|
+
}
|
|
252
|
+
if (message.label !== "") {
|
|
253
|
+
writer.uint32(50).string(message.label);
|
|
254
|
+
}
|
|
255
|
+
if (message.requiredTrustLevel !== undefined) {
|
|
256
|
+
writer.uint32(56).int32(message.requiredTrustLevel);
|
|
257
|
+
}
|
|
258
|
+
for (const v of message.options) {
|
|
259
|
+
writer.uint32(66).string(v);
|
|
260
|
+
}
|
|
261
|
+
return writer;
|
|
262
|
+
},
|
|
263
|
+
decode(input, length) {
|
|
264
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
265
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
266
|
+
if (previousRecursionDepth >= 100) {
|
|
267
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
268
|
+
}
|
|
269
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
270
|
+
try {
|
|
271
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
272
|
+
const message = createBaseSlot();
|
|
273
|
+
while (reader.pos < end) {
|
|
274
|
+
const tag = reader.uint32();
|
|
275
|
+
switch (tag >>> 3) {
|
|
276
|
+
case 1: {
|
|
277
|
+
if (tag !== 10) {
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
280
|
+
message.slotId = reader.string();
|
|
281
|
+
continue;
|
|
282
|
+
}
|
|
283
|
+
case 2: {
|
|
284
|
+
if (tag !== 16) {
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
message.kind = reader.int32();
|
|
288
|
+
continue;
|
|
289
|
+
}
|
|
290
|
+
case 3: {
|
|
291
|
+
if (tag !== 26) {
|
|
292
|
+
break;
|
|
293
|
+
}
|
|
294
|
+
message.value = exports.SlotValue.decode(reader, reader.uint32());
|
|
295
|
+
continue;
|
|
296
|
+
}
|
|
297
|
+
case 4: {
|
|
298
|
+
if (tag !== 32) {
|
|
299
|
+
break;
|
|
300
|
+
}
|
|
301
|
+
message.writable = reader.bool();
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
304
|
+
case 5: {
|
|
305
|
+
if (tag !== 42) {
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
message.unit = reader.string();
|
|
309
|
+
continue;
|
|
310
|
+
}
|
|
311
|
+
case 6: {
|
|
312
|
+
if (tag !== 50) {
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
315
|
+
message.label = reader.string();
|
|
316
|
+
continue;
|
|
317
|
+
}
|
|
318
|
+
case 7: {
|
|
319
|
+
if (tag !== 56) {
|
|
320
|
+
break;
|
|
321
|
+
}
|
|
322
|
+
message.requiredTrustLevel = reader.int32();
|
|
323
|
+
continue;
|
|
324
|
+
}
|
|
325
|
+
case 8: {
|
|
326
|
+
if (tag !== 66) {
|
|
327
|
+
break;
|
|
328
|
+
}
|
|
329
|
+
message.options.push(reader.string());
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
reader.skip(tag & 7);
|
|
337
|
+
}
|
|
338
|
+
return message;
|
|
339
|
+
}
|
|
340
|
+
finally {
|
|
341
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
create(base) {
|
|
345
|
+
return exports.Slot.fromPartial(base ?? {});
|
|
346
|
+
},
|
|
347
|
+
fromPartial(object) {
|
|
348
|
+
const message = createBaseSlot();
|
|
349
|
+
message.slotId = object.slotId ?? "";
|
|
350
|
+
message.kind = object.kind ?? 0;
|
|
351
|
+
message.value = (object.value !== undefined && object.value !== null)
|
|
352
|
+
? exports.SlotValue.fromPartial(object.value)
|
|
353
|
+
: undefined;
|
|
354
|
+
message.writable = object.writable ?? false;
|
|
355
|
+
message.unit = object.unit ?? "";
|
|
356
|
+
message.label = object.label ?? "";
|
|
357
|
+
message.requiredTrustLevel = object.requiredTrustLevel ?? undefined;
|
|
358
|
+
message.options = object.options?.map((e) => e) || [];
|
|
359
|
+
return message;
|
|
360
|
+
},
|
|
361
|
+
};
|
|
362
|
+
function createBaseTypedDevice() {
|
|
363
|
+
return { deviceId: "", name: "", room: "", floor: "", deviceClass: 0, slots: [], available: false, subtype: 0 };
|
|
364
|
+
}
|
|
365
|
+
exports.TypedDevice = {
|
|
366
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
367
|
+
if (message.deviceId !== "") {
|
|
368
|
+
writer.uint32(10).string(message.deviceId);
|
|
369
|
+
}
|
|
370
|
+
if (message.name !== "") {
|
|
371
|
+
writer.uint32(18).string(message.name);
|
|
372
|
+
}
|
|
373
|
+
if (message.room !== "") {
|
|
374
|
+
writer.uint32(26).string(message.room);
|
|
375
|
+
}
|
|
376
|
+
if (message.floor !== "") {
|
|
377
|
+
writer.uint32(34).string(message.floor);
|
|
378
|
+
}
|
|
379
|
+
if (message.deviceClass !== 0) {
|
|
380
|
+
writer.uint32(40).int32(message.deviceClass);
|
|
381
|
+
}
|
|
382
|
+
for (const v of message.slots) {
|
|
383
|
+
exports.Slot.encode(v, writer.uint32(50).fork()).join();
|
|
384
|
+
}
|
|
385
|
+
if (message.available !== false) {
|
|
386
|
+
writer.uint32(56).bool(message.available);
|
|
387
|
+
}
|
|
388
|
+
if (message.subtype !== 0) {
|
|
389
|
+
writer.uint32(64).int32(message.subtype);
|
|
390
|
+
}
|
|
391
|
+
return writer;
|
|
392
|
+
},
|
|
393
|
+
decode(input, length) {
|
|
394
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
395
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
396
|
+
if (previousRecursionDepth >= 100) {
|
|
397
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
398
|
+
}
|
|
399
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
400
|
+
try {
|
|
401
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
402
|
+
const message = createBaseTypedDevice();
|
|
403
|
+
while (reader.pos < end) {
|
|
404
|
+
const tag = reader.uint32();
|
|
405
|
+
switch (tag >>> 3) {
|
|
406
|
+
case 1: {
|
|
407
|
+
if (tag !== 10) {
|
|
408
|
+
break;
|
|
409
|
+
}
|
|
410
|
+
message.deviceId = reader.string();
|
|
411
|
+
continue;
|
|
412
|
+
}
|
|
413
|
+
case 2: {
|
|
414
|
+
if (tag !== 18) {
|
|
415
|
+
break;
|
|
416
|
+
}
|
|
417
|
+
message.name = reader.string();
|
|
418
|
+
continue;
|
|
419
|
+
}
|
|
420
|
+
case 3: {
|
|
421
|
+
if (tag !== 26) {
|
|
422
|
+
break;
|
|
423
|
+
}
|
|
424
|
+
message.room = reader.string();
|
|
425
|
+
continue;
|
|
426
|
+
}
|
|
427
|
+
case 4: {
|
|
428
|
+
if (tag !== 34) {
|
|
429
|
+
break;
|
|
430
|
+
}
|
|
431
|
+
message.floor = reader.string();
|
|
432
|
+
continue;
|
|
433
|
+
}
|
|
434
|
+
case 5: {
|
|
435
|
+
if (tag !== 40) {
|
|
436
|
+
break;
|
|
437
|
+
}
|
|
438
|
+
message.deviceClass = reader.int32();
|
|
439
|
+
continue;
|
|
440
|
+
}
|
|
441
|
+
case 6: {
|
|
442
|
+
if (tag !== 50) {
|
|
443
|
+
break;
|
|
444
|
+
}
|
|
445
|
+
message.slots.push(exports.Slot.decode(reader, reader.uint32()));
|
|
446
|
+
continue;
|
|
447
|
+
}
|
|
448
|
+
case 7: {
|
|
449
|
+
if (tag !== 56) {
|
|
450
|
+
break;
|
|
451
|
+
}
|
|
452
|
+
message.available = reader.bool();
|
|
453
|
+
continue;
|
|
454
|
+
}
|
|
455
|
+
case 8: {
|
|
456
|
+
if (tag !== 64) {
|
|
457
|
+
break;
|
|
458
|
+
}
|
|
459
|
+
message.subtype = reader.int32();
|
|
460
|
+
continue;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
464
|
+
break;
|
|
465
|
+
}
|
|
466
|
+
reader.skip(tag & 7);
|
|
467
|
+
}
|
|
468
|
+
return message;
|
|
469
|
+
}
|
|
470
|
+
finally {
|
|
471
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
create(base) {
|
|
475
|
+
return exports.TypedDevice.fromPartial(base ?? {});
|
|
476
|
+
},
|
|
477
|
+
fromPartial(object) {
|
|
478
|
+
const message = createBaseTypedDevice();
|
|
479
|
+
message.deviceId = object.deviceId ?? "";
|
|
480
|
+
message.name = object.name ?? "";
|
|
481
|
+
message.room = object.room ?? "";
|
|
482
|
+
message.floor = object.floor ?? "";
|
|
483
|
+
message.deviceClass = object.deviceClass ?? 0;
|
|
484
|
+
message.slots = object.slots?.map((e) => exports.Slot.fromPartial(e)) || [];
|
|
485
|
+
message.available = object.available ?? false;
|
|
486
|
+
message.subtype = object.subtype ?? 0;
|
|
487
|
+
return message;
|
|
488
|
+
},
|
|
489
|
+
};
|
|
490
|
+
function createBaseTypedDeviceSnapshot() {
|
|
491
|
+
return { devices: [] };
|
|
492
|
+
}
|
|
493
|
+
exports.TypedDeviceSnapshot = {
|
|
494
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
495
|
+
for (const v of message.devices) {
|
|
496
|
+
exports.TypedDevice.encode(v, writer.uint32(10).fork()).join();
|
|
497
|
+
}
|
|
498
|
+
return writer;
|
|
499
|
+
},
|
|
500
|
+
decode(input, length) {
|
|
501
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
502
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
503
|
+
if (previousRecursionDepth >= 100) {
|
|
504
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
505
|
+
}
|
|
506
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
507
|
+
try {
|
|
508
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
509
|
+
const message = createBaseTypedDeviceSnapshot();
|
|
510
|
+
while (reader.pos < end) {
|
|
511
|
+
const tag = reader.uint32();
|
|
512
|
+
switch (tag >>> 3) {
|
|
513
|
+
case 1: {
|
|
514
|
+
if (tag !== 10) {
|
|
515
|
+
break;
|
|
516
|
+
}
|
|
517
|
+
message.devices.push(exports.TypedDevice.decode(reader, reader.uint32()));
|
|
518
|
+
continue;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
522
|
+
break;
|
|
523
|
+
}
|
|
524
|
+
reader.skip(tag & 7);
|
|
525
|
+
}
|
|
526
|
+
return message;
|
|
527
|
+
}
|
|
528
|
+
finally {
|
|
529
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
create(base) {
|
|
533
|
+
return exports.TypedDeviceSnapshot.fromPartial(base ?? {});
|
|
534
|
+
},
|
|
535
|
+
fromPartial(object) {
|
|
536
|
+
const message = createBaseTypedDeviceSnapshot();
|
|
537
|
+
message.devices = object.devices?.map((e) => exports.TypedDevice.fromPartial(e)) || [];
|
|
538
|
+
return message;
|
|
539
|
+
},
|
|
540
|
+
};
|
|
541
|
+
function createBaseSlotUpdate() {
|
|
542
|
+
return { deviceId: "", slotId: "", value: undefined, ack: false, ts: 0n };
|
|
543
|
+
}
|
|
544
|
+
exports.SlotUpdate = {
|
|
545
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
546
|
+
if (message.deviceId !== "") {
|
|
547
|
+
writer.uint32(10).string(message.deviceId);
|
|
548
|
+
}
|
|
549
|
+
if (message.slotId !== "") {
|
|
550
|
+
writer.uint32(18).string(message.slotId);
|
|
551
|
+
}
|
|
552
|
+
if (message.value !== undefined) {
|
|
553
|
+
exports.SlotValue.encode(message.value, writer.uint32(26).fork()).join();
|
|
554
|
+
}
|
|
555
|
+
if (message.ack !== false) {
|
|
556
|
+
writer.uint32(32).bool(message.ack);
|
|
557
|
+
}
|
|
558
|
+
if (message.ts !== 0n) {
|
|
559
|
+
if (BigInt.asIntN(64, message.ts) !== message.ts) {
|
|
560
|
+
throw new globalThis.Error("value provided for field message.ts of type int64 too large");
|
|
561
|
+
}
|
|
562
|
+
writer.uint32(40).int64(message.ts);
|
|
563
|
+
}
|
|
564
|
+
return writer;
|
|
565
|
+
},
|
|
566
|
+
decode(input, length) {
|
|
567
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
568
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
569
|
+
if (previousRecursionDepth >= 100) {
|
|
570
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
571
|
+
}
|
|
572
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
573
|
+
try {
|
|
574
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
575
|
+
const message = createBaseSlotUpdate();
|
|
576
|
+
while (reader.pos < end) {
|
|
577
|
+
const tag = reader.uint32();
|
|
578
|
+
switch (tag >>> 3) {
|
|
579
|
+
case 1: {
|
|
580
|
+
if (tag !== 10) {
|
|
581
|
+
break;
|
|
582
|
+
}
|
|
583
|
+
message.deviceId = reader.string();
|
|
584
|
+
continue;
|
|
585
|
+
}
|
|
586
|
+
case 2: {
|
|
587
|
+
if (tag !== 18) {
|
|
588
|
+
break;
|
|
589
|
+
}
|
|
590
|
+
message.slotId = reader.string();
|
|
591
|
+
continue;
|
|
592
|
+
}
|
|
593
|
+
case 3: {
|
|
594
|
+
if (tag !== 26) {
|
|
595
|
+
break;
|
|
596
|
+
}
|
|
597
|
+
message.value = exports.SlotValue.decode(reader, reader.uint32());
|
|
598
|
+
continue;
|
|
599
|
+
}
|
|
600
|
+
case 4: {
|
|
601
|
+
if (tag !== 32) {
|
|
602
|
+
break;
|
|
603
|
+
}
|
|
604
|
+
message.ack = reader.bool();
|
|
605
|
+
continue;
|
|
606
|
+
}
|
|
607
|
+
case 5: {
|
|
608
|
+
if (tag !== 40) {
|
|
609
|
+
break;
|
|
610
|
+
}
|
|
611
|
+
message.ts = reader.int64();
|
|
612
|
+
continue;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
616
|
+
break;
|
|
617
|
+
}
|
|
618
|
+
reader.skip(tag & 7);
|
|
619
|
+
}
|
|
620
|
+
return message;
|
|
621
|
+
}
|
|
622
|
+
finally {
|
|
623
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
624
|
+
}
|
|
625
|
+
},
|
|
626
|
+
create(base) {
|
|
627
|
+
return exports.SlotUpdate.fromPartial(base ?? {});
|
|
628
|
+
},
|
|
629
|
+
fromPartial(object) {
|
|
630
|
+
const message = createBaseSlotUpdate();
|
|
631
|
+
message.deviceId = object.deviceId ?? "";
|
|
632
|
+
message.slotId = object.slotId ?? "";
|
|
633
|
+
message.value = (object.value !== undefined && object.value !== null)
|
|
634
|
+
? exports.SlotValue.fromPartial(object.value)
|
|
635
|
+
: undefined;
|
|
636
|
+
message.ack = object.ack ?? false;
|
|
637
|
+
message.ts = (object.ts !== undefined && object.ts !== null) ? BigInt(object.ts) : 0n;
|
|
638
|
+
return message;
|
|
639
|
+
},
|
|
640
|
+
};
|
|
641
|
+
function createBaseDeviceAvailability() {
|
|
642
|
+
return { deviceId: "", available: false };
|
|
643
|
+
}
|
|
644
|
+
exports.DeviceAvailability = {
|
|
645
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
646
|
+
if (message.deviceId !== "") {
|
|
647
|
+
writer.uint32(10).string(message.deviceId);
|
|
648
|
+
}
|
|
649
|
+
if (message.available !== false) {
|
|
650
|
+
writer.uint32(16).bool(message.available);
|
|
651
|
+
}
|
|
652
|
+
return writer;
|
|
653
|
+
},
|
|
654
|
+
decode(input, length) {
|
|
655
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
656
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
657
|
+
if (previousRecursionDepth >= 100) {
|
|
658
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
659
|
+
}
|
|
660
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
661
|
+
try {
|
|
662
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
663
|
+
const message = createBaseDeviceAvailability();
|
|
664
|
+
while (reader.pos < end) {
|
|
665
|
+
const tag = reader.uint32();
|
|
666
|
+
switch (tag >>> 3) {
|
|
667
|
+
case 1: {
|
|
668
|
+
if (tag !== 10) {
|
|
669
|
+
break;
|
|
670
|
+
}
|
|
671
|
+
message.deviceId = reader.string();
|
|
672
|
+
continue;
|
|
673
|
+
}
|
|
674
|
+
case 2: {
|
|
675
|
+
if (tag !== 16) {
|
|
676
|
+
break;
|
|
677
|
+
}
|
|
678
|
+
message.available = reader.bool();
|
|
679
|
+
continue;
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
683
|
+
break;
|
|
684
|
+
}
|
|
685
|
+
reader.skip(tag & 7);
|
|
686
|
+
}
|
|
687
|
+
return message;
|
|
688
|
+
}
|
|
689
|
+
finally {
|
|
690
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
691
|
+
}
|
|
692
|
+
},
|
|
693
|
+
create(base) {
|
|
694
|
+
return exports.DeviceAvailability.fromPartial(base ?? {});
|
|
695
|
+
},
|
|
696
|
+
fromPartial(object) {
|
|
697
|
+
const message = createBaseDeviceAvailability();
|
|
698
|
+
message.deviceId = object.deviceId ?? "";
|
|
699
|
+
message.available = object.available ?? false;
|
|
700
|
+
return message;
|
|
701
|
+
},
|
|
702
|
+
};
|
|
703
|
+
function createBaseSetSlot() {
|
|
704
|
+
return { deviceId: "", slotId: "", value: undefined };
|
|
705
|
+
}
|
|
706
|
+
exports.SetSlot = {
|
|
707
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
708
|
+
if (message.deviceId !== "") {
|
|
709
|
+
writer.uint32(10).string(message.deviceId);
|
|
710
|
+
}
|
|
711
|
+
if (message.slotId !== "") {
|
|
712
|
+
writer.uint32(18).string(message.slotId);
|
|
713
|
+
}
|
|
714
|
+
if (message.value !== undefined) {
|
|
715
|
+
exports.SlotValue.encode(message.value, writer.uint32(26).fork()).join();
|
|
716
|
+
}
|
|
717
|
+
return writer;
|
|
718
|
+
},
|
|
719
|
+
decode(input, length) {
|
|
720
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
721
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
722
|
+
if (previousRecursionDepth >= 100) {
|
|
723
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
724
|
+
}
|
|
725
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
726
|
+
try {
|
|
727
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
728
|
+
const message = createBaseSetSlot();
|
|
729
|
+
while (reader.pos < end) {
|
|
730
|
+
const tag = reader.uint32();
|
|
731
|
+
switch (tag >>> 3) {
|
|
732
|
+
case 1: {
|
|
733
|
+
if (tag !== 10) {
|
|
734
|
+
break;
|
|
735
|
+
}
|
|
736
|
+
message.deviceId = reader.string();
|
|
737
|
+
continue;
|
|
738
|
+
}
|
|
739
|
+
case 2: {
|
|
740
|
+
if (tag !== 18) {
|
|
741
|
+
break;
|
|
742
|
+
}
|
|
743
|
+
message.slotId = reader.string();
|
|
744
|
+
continue;
|
|
745
|
+
}
|
|
746
|
+
case 3: {
|
|
747
|
+
if (tag !== 26) {
|
|
748
|
+
break;
|
|
749
|
+
}
|
|
750
|
+
message.value = exports.SlotValue.decode(reader, reader.uint32());
|
|
751
|
+
continue;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
755
|
+
break;
|
|
756
|
+
}
|
|
757
|
+
reader.skip(tag & 7);
|
|
758
|
+
}
|
|
759
|
+
return message;
|
|
760
|
+
}
|
|
761
|
+
finally {
|
|
762
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
create(base) {
|
|
766
|
+
return exports.SetSlot.fromPartial(base ?? {});
|
|
767
|
+
},
|
|
768
|
+
fromPartial(object) {
|
|
769
|
+
const message = createBaseSetSlot();
|
|
770
|
+
message.deviceId = object.deviceId ?? "";
|
|
771
|
+
message.slotId = object.slotId ?? "";
|
|
772
|
+
message.value = (object.value !== undefined && object.value !== null)
|
|
773
|
+
? exports.SlotValue.fromPartial(object.value)
|
|
774
|
+
: undefined;
|
|
775
|
+
return message;
|
|
776
|
+
},
|
|
777
|
+
};
|