ESPHome 2025.8.0b1
Loading...
Searching...
No Matches
api_pb2.cpp
Go to the documentation of this file.
1// This file was automatically generated with a tool.
2// See script/api_protobuf/api_protobuf.py
3#include "api_pb2.h"
4#include "esphome/core/log.h"
6#include <cstring>
7
8namespace esphome::api {
9
10bool HelloRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
11 switch (field_id) {
12 case 2:
13 this->api_version_major = value.as_uint32();
14 break;
15 case 3:
16 this->api_version_minor = value.as_uint32();
17 break;
18 default:
19 return false;
20 }
21 return true;
22}
23bool HelloRequest::decode_length(uint32_t field_id, ProtoLengthDelimited value) {
24 switch (field_id) {
25 case 1:
26 this->client_info = value.as_string();
27 break;
28 default:
29 return false;
30 }
31 return true;
32}
34 buffer.encode_uint32(1, this->api_version_major);
35 buffer.encode_uint32(2, this->api_version_minor);
36 buffer.encode_string(3, this->server_info_ref_);
37 buffer.encode_string(4, this->name_ref_);
38}
40 size.add_uint32(1, this->api_version_major);
41 size.add_uint32(1, this->api_version_minor);
42 size.add_length(1, this->server_info_ref_.size());
43 size.add_length(1, this->name_ref_.size());
44}
46 switch (field_id) {
47 case 1:
48 this->password = value.as_string();
49 break;
50 default:
51 return false;
52 }
53 return true;
54}
57#ifdef USE_AREAS
59 buffer.encode_uint32(1, this->area_id);
60 buffer.encode_string(2, this->name_ref_);
61}
63 size.add_uint32(1, this->area_id);
64 size.add_length(1, this->name_ref_.size());
65}
66#endif
67#ifdef USE_DEVICES
69 buffer.encode_uint32(1, this->device_id);
70 buffer.encode_string(2, this->name_ref_);
71 buffer.encode_uint32(3, this->area_id);
72}
74 size.add_uint32(1, this->device_id);
75 size.add_length(1, this->name_ref_.size());
76 size.add_uint32(1, this->area_id);
77}
78#endif
80#ifdef USE_API_PASSWORD
81 buffer.encode_bool(1, this->uses_password);
82#endif
83 buffer.encode_string(2, this->name_ref_);
84 buffer.encode_string(3, this->mac_address_ref_);
85 buffer.encode_string(4, this->esphome_version_ref_);
86 buffer.encode_string(5, this->compilation_time_ref_);
87 buffer.encode_string(6, this->model_ref_);
88#ifdef USE_DEEP_SLEEP
89 buffer.encode_bool(7, this->has_deep_sleep);
90#endif
91#ifdef ESPHOME_PROJECT_NAME
92 buffer.encode_string(8, this->project_name_ref_);
93#endif
94#ifdef ESPHOME_PROJECT_NAME
95 buffer.encode_string(9, this->project_version_ref_);
96#endif
97#ifdef USE_WEBSERVER
98 buffer.encode_uint32(10, this->webserver_port);
99#endif
100#ifdef USE_BLUETOOTH_PROXY
102#endif
103 buffer.encode_string(12, this->manufacturer_ref_);
104 buffer.encode_string(13, this->friendly_name_ref_);
105#ifdef USE_VOICE_ASSISTANT
107#endif
108#ifdef USE_AREAS
109 buffer.encode_string(16, this->suggested_area_ref_);
110#endif
111#ifdef USE_BLUETOOTH_PROXY
113#endif
114#ifdef USE_API_NOISE
115 buffer.encode_bool(19, this->api_encryption_supported);
116#endif
117#ifdef USE_DEVICES
118 for (const auto &it : this->devices) {
119 buffer.encode_message(20, it, true);
120 }
121#endif
122#ifdef USE_AREAS
123 for (const auto &it : this->areas) {
124 buffer.encode_message(21, it, true);
125 }
126#endif
127#ifdef USE_AREAS
128 buffer.encode_message(22, this->area);
129#endif
130}
132#ifdef USE_API_PASSWORD
133 size.add_bool(1, this->uses_password);
134#endif
135 size.add_length(1, this->name_ref_.size());
136 size.add_length(1, this->mac_address_ref_.size());
137 size.add_length(1, this->esphome_version_ref_.size());
138 size.add_length(1, this->compilation_time_ref_.size());
139 size.add_length(1, this->model_ref_.size());
140#ifdef USE_DEEP_SLEEP
141 size.add_bool(1, this->has_deep_sleep);
142#endif
143#ifdef ESPHOME_PROJECT_NAME
144 size.add_length(1, this->project_name_ref_.size());
145#endif
146#ifdef ESPHOME_PROJECT_NAME
147 size.add_length(1, this->project_version_ref_.size());
148#endif
149#ifdef USE_WEBSERVER
150 size.add_uint32(1, this->webserver_port);
151#endif
152#ifdef USE_BLUETOOTH_PROXY
154#endif
155 size.add_length(1, this->manufacturer_ref_.size());
156 size.add_length(1, this->friendly_name_ref_.size());
157#ifdef USE_VOICE_ASSISTANT
159#endif
160#ifdef USE_AREAS
161 size.add_length(2, this->suggested_area_ref_.size());
162#endif
163#ifdef USE_BLUETOOTH_PROXY
165#endif
166#ifdef USE_API_NOISE
167 size.add_bool(2, this->api_encryption_supported);
168#endif
169#ifdef USE_DEVICES
170 for (const auto &it : this->devices) {
171 size.add_message_object_force(2, it);
172 }
173#endif
174#ifdef USE_AREAS
175 for (const auto &it : this->areas) {
176 size.add_message_object_force(2, it);
177 }
178#endif
179#ifdef USE_AREAS
180 size.add_message_object(2, this->area);
181#endif
182}
183#ifdef USE_BINARY_SENSOR
185 buffer.encode_string(1, this->object_id_ref_);
186 buffer.encode_fixed32(2, this->key);
187 buffer.encode_string(3, this->name_ref_);
188 buffer.encode_string(5, this->device_class_ref_);
189 buffer.encode_bool(6, this->is_status_binary_sensor);
190 buffer.encode_bool(7, this->disabled_by_default);
191#ifdef USE_ENTITY_ICON
192 buffer.encode_string(8, this->icon_ref_);
193#endif
194 buffer.encode_uint32(9, static_cast<uint32_t>(this->entity_category));
195#ifdef USE_DEVICES
196 buffer.encode_uint32(10, this->device_id);
197#endif
198}
200 size.add_length(1, this->object_id_ref_.size());
201 size.add_fixed32(1, this->key);
202 size.add_length(1, this->name_ref_.size());
203 size.add_length(1, this->device_class_ref_.size());
204 size.add_bool(1, this->is_status_binary_sensor);
205 size.add_bool(1, this->disabled_by_default);
206#ifdef USE_ENTITY_ICON
207 size.add_length(1, this->icon_ref_.size());
208#endif
209 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
210#ifdef USE_DEVICES
211 size.add_uint32(1, this->device_id);
212#endif
213}
215 buffer.encode_fixed32(1, this->key);
216 buffer.encode_bool(2, this->state);
217 buffer.encode_bool(3, this->missing_state);
218#ifdef USE_DEVICES
219 buffer.encode_uint32(4, this->device_id);
220#endif
221}
223 size.add_fixed32(1, this->key);
224 size.add_bool(1, this->state);
225 size.add_bool(1, this->missing_state);
226#ifdef USE_DEVICES
227 size.add_uint32(1, this->device_id);
228#endif
229}
230#endif
231#ifdef USE_COVER
233 buffer.encode_string(1, this->object_id_ref_);
234 buffer.encode_fixed32(2, this->key);
235 buffer.encode_string(3, this->name_ref_);
236 buffer.encode_bool(5, this->assumed_state);
237 buffer.encode_bool(6, this->supports_position);
238 buffer.encode_bool(7, this->supports_tilt);
239 buffer.encode_string(8, this->device_class_ref_);
240 buffer.encode_bool(9, this->disabled_by_default);
241#ifdef USE_ENTITY_ICON
242 buffer.encode_string(10, this->icon_ref_);
243#endif
244 buffer.encode_uint32(11, static_cast<uint32_t>(this->entity_category));
245 buffer.encode_bool(12, this->supports_stop);
246#ifdef USE_DEVICES
247 buffer.encode_uint32(13, this->device_id);
248#endif
249}
251 size.add_length(1, this->object_id_ref_.size());
252 size.add_fixed32(1, this->key);
253 size.add_length(1, this->name_ref_.size());
254 size.add_bool(1, this->assumed_state);
255 size.add_bool(1, this->supports_position);
256 size.add_bool(1, this->supports_tilt);
257 size.add_length(1, this->device_class_ref_.size());
258 size.add_bool(1, this->disabled_by_default);
259#ifdef USE_ENTITY_ICON
260 size.add_length(1, this->icon_ref_.size());
261#endif
262 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
263 size.add_bool(1, this->supports_stop);
264#ifdef USE_DEVICES
265 size.add_uint32(1, this->device_id);
266#endif
267}
269 buffer.encode_fixed32(1, this->key);
270 buffer.encode_float(3, this->position);
271 buffer.encode_float(4, this->tilt);
272 buffer.encode_uint32(5, static_cast<uint32_t>(this->current_operation));
273#ifdef USE_DEVICES
274 buffer.encode_uint32(6, this->device_id);
275#endif
276}
278 size.add_fixed32(1, this->key);
279 size.add_float(1, this->position);
280 size.add_float(1, this->tilt);
281 size.add_uint32(1, static_cast<uint32_t>(this->current_operation));
282#ifdef USE_DEVICES
283 size.add_uint32(1, this->device_id);
284#endif
285}
286bool CoverCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
287 switch (field_id) {
288 case 4:
289 this->has_position = value.as_bool();
290 break;
291 case 6:
292 this->has_tilt = value.as_bool();
293 break;
294 case 8:
295 this->stop = value.as_bool();
296 break;
297#ifdef USE_DEVICES
298 case 9:
299 this->device_id = value.as_uint32();
300 break;
301#endif
302 default:
303 return false;
304 }
305 return true;
306}
307bool CoverCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
308 switch (field_id) {
309 case 1:
310 this->key = value.as_fixed32();
311 break;
312 case 5:
313 this->position = value.as_float();
314 break;
315 case 7:
316 this->tilt = value.as_float();
317 break;
318 default:
319 return false;
320 }
321 return true;
322}
323#endif
324#ifdef USE_FAN
326 buffer.encode_string(1, this->object_id_ref_);
327 buffer.encode_fixed32(2, this->key);
328 buffer.encode_string(3, this->name_ref_);
329 buffer.encode_bool(5, this->supports_oscillation);
330 buffer.encode_bool(6, this->supports_speed);
331 buffer.encode_bool(7, this->supports_direction);
332 buffer.encode_int32(8, this->supported_speed_count);
333 buffer.encode_bool(9, this->disabled_by_default);
334#ifdef USE_ENTITY_ICON
335 buffer.encode_string(10, this->icon_ref_);
336#endif
337 buffer.encode_uint32(11, static_cast<uint32_t>(this->entity_category));
338 for (const auto &it : *this->supported_preset_modes) {
339 buffer.encode_string(12, it, true);
340 }
341#ifdef USE_DEVICES
342 buffer.encode_uint32(13, this->device_id);
343#endif
344}
346 size.add_length(1, this->object_id_ref_.size());
347 size.add_fixed32(1, this->key);
348 size.add_length(1, this->name_ref_.size());
349 size.add_bool(1, this->supports_oscillation);
350 size.add_bool(1, this->supports_speed);
351 size.add_bool(1, this->supports_direction);
352 size.add_int32(1, this->supported_speed_count);
353 size.add_bool(1, this->disabled_by_default);
354#ifdef USE_ENTITY_ICON
355 size.add_length(1, this->icon_ref_.size());
356#endif
357 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
358 if (!this->supported_preset_modes->empty()) {
359 for (const auto &it : *this->supported_preset_modes) {
360 size.add_length_force(1, it.size());
361 }
362 }
363#ifdef USE_DEVICES
364 size.add_uint32(1, this->device_id);
365#endif
366}
368 buffer.encode_fixed32(1, this->key);
369 buffer.encode_bool(2, this->state);
370 buffer.encode_bool(3, this->oscillating);
371 buffer.encode_uint32(5, static_cast<uint32_t>(this->direction));
372 buffer.encode_int32(6, this->speed_level);
373 buffer.encode_string(7, this->preset_mode_ref_);
374#ifdef USE_DEVICES
375 buffer.encode_uint32(8, this->device_id);
376#endif
377}
379 size.add_fixed32(1, this->key);
380 size.add_bool(1, this->state);
381 size.add_bool(1, this->oscillating);
382 size.add_uint32(1, static_cast<uint32_t>(this->direction));
383 size.add_int32(1, this->speed_level);
384 size.add_length(1, this->preset_mode_ref_.size());
385#ifdef USE_DEVICES
386 size.add_uint32(1, this->device_id);
387#endif
388}
389bool FanCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
390 switch (field_id) {
391 case 2:
392 this->has_state = value.as_bool();
393 break;
394 case 3:
395 this->state = value.as_bool();
396 break;
397 case 6:
398 this->has_oscillating = value.as_bool();
399 break;
400 case 7:
401 this->oscillating = value.as_bool();
402 break;
403 case 8:
404 this->has_direction = value.as_bool();
405 break;
406 case 9:
407 this->direction = static_cast<enums::FanDirection>(value.as_uint32());
408 break;
409 case 10:
410 this->has_speed_level = value.as_bool();
411 break;
412 case 11:
413 this->speed_level = value.as_int32();
414 break;
415 case 12:
416 this->has_preset_mode = value.as_bool();
417 break;
418#ifdef USE_DEVICES
419 case 14:
420 this->device_id = value.as_uint32();
421 break;
422#endif
423 default:
424 return false;
425 }
426 return true;
427}
429 switch (field_id) {
430 case 13:
431 this->preset_mode = value.as_string();
432 break;
433 default:
434 return false;
435 }
436 return true;
437}
438bool FanCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
439 switch (field_id) {
440 case 1:
441 this->key = value.as_fixed32();
442 break;
443 default:
444 return false;
445 }
446 return true;
447}
448#endif
449#ifdef USE_LIGHT
451 buffer.encode_string(1, this->object_id_ref_);
452 buffer.encode_fixed32(2, this->key);
453 buffer.encode_string(3, this->name_ref_);
454 for (const auto &it : *this->supported_color_modes) {
455 buffer.encode_uint32(12, static_cast<uint32_t>(it), true);
456 }
457 buffer.encode_float(9, this->min_mireds);
458 buffer.encode_float(10, this->max_mireds);
459 for (auto &it : this->effects) {
460 buffer.encode_string(11, it, true);
461 }
462 buffer.encode_bool(13, this->disabled_by_default);
463#ifdef USE_ENTITY_ICON
464 buffer.encode_string(14, this->icon_ref_);
465#endif
466 buffer.encode_uint32(15, static_cast<uint32_t>(this->entity_category));
467#ifdef USE_DEVICES
468 buffer.encode_uint32(16, this->device_id);
469#endif
470}
472 size.add_length(1, this->object_id_ref_.size());
473 size.add_fixed32(1, this->key);
474 size.add_length(1, this->name_ref_.size());
475 if (!this->supported_color_modes->empty()) {
476 for (const auto &it : *this->supported_color_modes) {
477 size.add_uint32_force(1, static_cast<uint32_t>(it));
478 }
479 }
480 size.add_float(1, this->min_mireds);
481 size.add_float(1, this->max_mireds);
482 if (!this->effects.empty()) {
483 for (const auto &it : this->effects) {
484 size.add_length_force(1, it.size());
485 }
486 }
487 size.add_bool(1, this->disabled_by_default);
488#ifdef USE_ENTITY_ICON
489 size.add_length(1, this->icon_ref_.size());
490#endif
491 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
492#ifdef USE_DEVICES
493 size.add_uint32(2, this->device_id);
494#endif
495}
497 buffer.encode_fixed32(1, this->key);
498 buffer.encode_bool(2, this->state);
499 buffer.encode_float(3, this->brightness);
500 buffer.encode_uint32(11, static_cast<uint32_t>(this->color_mode));
501 buffer.encode_float(10, this->color_brightness);
502 buffer.encode_float(4, this->red);
503 buffer.encode_float(5, this->green);
504 buffer.encode_float(6, this->blue);
505 buffer.encode_float(7, this->white);
506 buffer.encode_float(8, this->color_temperature);
507 buffer.encode_float(12, this->cold_white);
508 buffer.encode_float(13, this->warm_white);
509 buffer.encode_string(9, this->effect_ref_);
510#ifdef USE_DEVICES
511 buffer.encode_uint32(14, this->device_id);
512#endif
513}
515 size.add_fixed32(1, this->key);
516 size.add_bool(1, this->state);
517 size.add_float(1, this->brightness);
518 size.add_uint32(1, static_cast<uint32_t>(this->color_mode));
519 size.add_float(1, this->color_brightness);
520 size.add_float(1, this->red);
521 size.add_float(1, this->green);
522 size.add_float(1, this->blue);
523 size.add_float(1, this->white);
524 size.add_float(1, this->color_temperature);
525 size.add_float(1, this->cold_white);
526 size.add_float(1, this->warm_white);
527 size.add_length(1, this->effect_ref_.size());
528#ifdef USE_DEVICES
529 size.add_uint32(1, this->device_id);
530#endif
531}
532bool LightCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
533 switch (field_id) {
534 case 2:
535 this->has_state = value.as_bool();
536 break;
537 case 3:
538 this->state = value.as_bool();
539 break;
540 case 4:
541 this->has_brightness = value.as_bool();
542 break;
543 case 22:
544 this->has_color_mode = value.as_bool();
545 break;
546 case 23:
547 this->color_mode = static_cast<enums::ColorMode>(value.as_uint32());
548 break;
549 case 20:
550 this->has_color_brightness = value.as_bool();
551 break;
552 case 6:
553 this->has_rgb = value.as_bool();
554 break;
555 case 10:
556 this->has_white = value.as_bool();
557 break;
558 case 12:
559 this->has_color_temperature = value.as_bool();
560 break;
561 case 24:
562 this->has_cold_white = value.as_bool();
563 break;
564 case 26:
565 this->has_warm_white = value.as_bool();
566 break;
567 case 14:
568 this->has_transition_length = value.as_bool();
569 break;
570 case 15:
571 this->transition_length = value.as_uint32();
572 break;
573 case 16:
574 this->has_flash_length = value.as_bool();
575 break;
576 case 17:
577 this->flash_length = value.as_uint32();
578 break;
579 case 18:
580 this->has_effect = value.as_bool();
581 break;
582#ifdef USE_DEVICES
583 case 28:
584 this->device_id = value.as_uint32();
585 break;
586#endif
587 default:
588 return false;
589 }
590 return true;
591}
593 switch (field_id) {
594 case 19:
595 this->effect = value.as_string();
596 break;
597 default:
598 return false;
599 }
600 return true;
601}
602bool LightCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
603 switch (field_id) {
604 case 1:
605 this->key = value.as_fixed32();
606 break;
607 case 5:
608 this->brightness = value.as_float();
609 break;
610 case 21:
611 this->color_brightness = value.as_float();
612 break;
613 case 7:
614 this->red = value.as_float();
615 break;
616 case 8:
617 this->green = value.as_float();
618 break;
619 case 9:
620 this->blue = value.as_float();
621 break;
622 case 11:
623 this->white = value.as_float();
624 break;
625 case 13:
626 this->color_temperature = value.as_float();
627 break;
628 case 25:
629 this->cold_white = value.as_float();
630 break;
631 case 27:
632 this->warm_white = value.as_float();
633 break;
634 default:
635 return false;
636 }
637 return true;
638}
639#endif
640#ifdef USE_SENSOR
642 buffer.encode_string(1, this->object_id_ref_);
643 buffer.encode_fixed32(2, this->key);
644 buffer.encode_string(3, this->name_ref_);
645#ifdef USE_ENTITY_ICON
646 buffer.encode_string(5, this->icon_ref_);
647#endif
649 buffer.encode_int32(7, this->accuracy_decimals);
650 buffer.encode_bool(8, this->force_update);
651 buffer.encode_string(9, this->device_class_ref_);
652 buffer.encode_uint32(10, static_cast<uint32_t>(this->state_class));
653 buffer.encode_bool(12, this->disabled_by_default);
654 buffer.encode_uint32(13, static_cast<uint32_t>(this->entity_category));
655#ifdef USE_DEVICES
656 buffer.encode_uint32(14, this->device_id);
657#endif
658}
660 size.add_length(1, this->object_id_ref_.size());
661 size.add_fixed32(1, this->key);
662 size.add_length(1, this->name_ref_.size());
663#ifdef USE_ENTITY_ICON
664 size.add_length(1, this->icon_ref_.size());
665#endif
667 size.add_int32(1, this->accuracy_decimals);
668 size.add_bool(1, this->force_update);
669 size.add_length(1, this->device_class_ref_.size());
670 size.add_uint32(1, static_cast<uint32_t>(this->state_class));
671 size.add_bool(1, this->disabled_by_default);
672 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
673#ifdef USE_DEVICES
674 size.add_uint32(1, this->device_id);
675#endif
676}
678 buffer.encode_fixed32(1, this->key);
679 buffer.encode_float(2, this->state);
680 buffer.encode_bool(3, this->missing_state);
681#ifdef USE_DEVICES
682 buffer.encode_uint32(4, this->device_id);
683#endif
684}
686 size.add_fixed32(1, this->key);
687 size.add_float(1, this->state);
688 size.add_bool(1, this->missing_state);
689#ifdef USE_DEVICES
690 size.add_uint32(1, this->device_id);
691#endif
692}
693#endif
694#ifdef USE_SWITCH
696 buffer.encode_string(1, this->object_id_ref_);
697 buffer.encode_fixed32(2, this->key);
698 buffer.encode_string(3, this->name_ref_);
699#ifdef USE_ENTITY_ICON
700 buffer.encode_string(5, this->icon_ref_);
701#endif
702 buffer.encode_bool(6, this->assumed_state);
703 buffer.encode_bool(7, this->disabled_by_default);
704 buffer.encode_uint32(8, static_cast<uint32_t>(this->entity_category));
705 buffer.encode_string(9, this->device_class_ref_);
706#ifdef USE_DEVICES
707 buffer.encode_uint32(10, this->device_id);
708#endif
709}
711 size.add_length(1, this->object_id_ref_.size());
712 size.add_fixed32(1, this->key);
713 size.add_length(1, this->name_ref_.size());
714#ifdef USE_ENTITY_ICON
715 size.add_length(1, this->icon_ref_.size());
716#endif
717 size.add_bool(1, this->assumed_state);
718 size.add_bool(1, this->disabled_by_default);
719 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
720 size.add_length(1, this->device_class_ref_.size());
721#ifdef USE_DEVICES
722 size.add_uint32(1, this->device_id);
723#endif
724}
726 buffer.encode_fixed32(1, this->key);
727 buffer.encode_bool(2, this->state);
728#ifdef USE_DEVICES
729 buffer.encode_uint32(3, this->device_id);
730#endif
731}
733 size.add_fixed32(1, this->key);
734 size.add_bool(1, this->state);
735#ifdef USE_DEVICES
736 size.add_uint32(1, this->device_id);
737#endif
738}
739bool SwitchCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
740 switch (field_id) {
741 case 2:
742 this->state = value.as_bool();
743 break;
744#ifdef USE_DEVICES
745 case 3:
746 this->device_id = value.as_uint32();
747 break;
748#endif
749 default:
750 return false;
751 }
752 return true;
753}
754bool SwitchCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
755 switch (field_id) {
756 case 1:
757 this->key = value.as_fixed32();
758 break;
759 default:
760 return false;
761 }
762 return true;
763}
764#endif
765#ifdef USE_TEXT_SENSOR
767 buffer.encode_string(1, this->object_id_ref_);
768 buffer.encode_fixed32(2, this->key);
769 buffer.encode_string(3, this->name_ref_);
770#ifdef USE_ENTITY_ICON
771 buffer.encode_string(5, this->icon_ref_);
772#endif
773 buffer.encode_bool(6, this->disabled_by_default);
774 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
775 buffer.encode_string(8, this->device_class_ref_);
776#ifdef USE_DEVICES
777 buffer.encode_uint32(9, this->device_id);
778#endif
779}
781 size.add_length(1, this->object_id_ref_.size());
782 size.add_fixed32(1, this->key);
783 size.add_length(1, this->name_ref_.size());
784#ifdef USE_ENTITY_ICON
785 size.add_length(1, this->icon_ref_.size());
786#endif
787 size.add_bool(1, this->disabled_by_default);
788 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
789 size.add_length(1, this->device_class_ref_.size());
790#ifdef USE_DEVICES
791 size.add_uint32(1, this->device_id);
792#endif
793}
795 buffer.encode_fixed32(1, this->key);
796 buffer.encode_string(2, this->state_ref_);
797 buffer.encode_bool(3, this->missing_state);
798#ifdef USE_DEVICES
799 buffer.encode_uint32(4, this->device_id);
800#endif
801}
803 size.add_fixed32(1, this->key);
804 size.add_length(1, this->state_ref_.size());
805 size.add_bool(1, this->missing_state);
806#ifdef USE_DEVICES
807 size.add_uint32(1, this->device_id);
808#endif
809}
810#endif
811bool SubscribeLogsRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
812 switch (field_id) {
813 case 1:
814 this->level = static_cast<enums::LogLevel>(value.as_uint32());
815 break;
816 case 2:
817 this->dump_config = value.as_bool();
818 break;
819 default:
820 return false;
821 }
822 return true;
823}
825 buffer.encode_uint32(1, static_cast<uint32_t>(this->level));
826 buffer.encode_bytes(3, this->message_ptr_, this->message_len_);
827}
829 size.add_uint32(1, static_cast<uint32_t>(this->level));
830 size.add_length(1, this->message_len_);
831}
832#ifdef USE_API_NOISE
834 switch (field_id) {
835 case 1:
836 this->key = value.as_string();
837 break;
838 default:
839 return false;
840 }
841 return true;
842}
845#endif
846#ifdef USE_API_HOMEASSISTANT_SERVICES
848 buffer.encode_string(1, this->key_ref_);
849 buffer.encode_string(2, this->value);
850}
852 size.add_length(1, this->key_ref_.size());
853 size.add_length(1, this->value.size());
854}
856 buffer.encode_string(1, this->service_ref_);
857 for (auto &it : this->data) {
858 buffer.encode_message(2, it, true);
859 }
860 for (auto &it : this->data_template) {
861 buffer.encode_message(3, it, true);
862 }
863 for (auto &it : this->variables) {
864 buffer.encode_message(4, it, true);
865 }
866 buffer.encode_bool(5, this->is_event);
867}
869 size.add_length(1, this->service_ref_.size());
870 size.add_repeated_message(1, this->data);
871 size.add_repeated_message(1, this->data_template);
872 size.add_repeated_message(1, this->variables);
873 size.add_bool(1, this->is_event);
874}
875#endif
876#ifdef USE_API_HOMEASSISTANT_STATES
878 buffer.encode_string(1, this->entity_id_ref_);
879 buffer.encode_string(2, this->attribute_ref_);
880 buffer.encode_bool(3, this->once);
881}
883 size.add_length(1, this->entity_id_ref_.size());
884 size.add_length(1, this->attribute_ref_.size());
885 size.add_bool(1, this->once);
886}
888 switch (field_id) {
889 case 1:
890 this->entity_id = value.as_string();
891 break;
892 case 2:
893 this->state = value.as_string();
894 break;
895 case 3:
896 this->attribute = value.as_string();
897 break;
898 default:
899 return false;
900 }
901 return true;
902}
903#endif
904bool GetTimeResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
905 switch (field_id) {
906 case 1:
907 this->epoch_seconds = value.as_fixed32();
908 break;
909 default:
910 return false;
911 }
912 return true;
913}
916#ifdef USE_API_SERVICES
918 buffer.encode_string(1, this->name_ref_);
919 buffer.encode_uint32(2, static_cast<uint32_t>(this->type));
920}
922 size.add_length(1, this->name_ref_.size());
923 size.add_uint32(1, static_cast<uint32_t>(this->type));
924}
926 buffer.encode_string(1, this->name_ref_);
927 buffer.encode_fixed32(2, this->key);
928 for (auto &it : this->args) {
929 buffer.encode_message(3, it, true);
930 }
931}
933 size.add_length(1, this->name_ref_.size());
934 size.add_fixed32(1, this->key);
935 size.add_repeated_message(1, this->args);
936}
938 switch (field_id) {
939 case 1:
940 this->bool_ = value.as_bool();
941 break;
942 case 2:
943 this->legacy_int = value.as_int32();
944 break;
945 case 5:
946 this->int_ = value.as_sint32();
947 break;
948 case 6:
949 this->bool_array.push_back(value.as_bool());
950 break;
951 case 7:
952 this->int_array.push_back(value.as_sint32());
953 break;
954 default:
955 return false;
956 }
957 return true;
958}
960 switch (field_id) {
961 case 4:
962 this->string_ = value.as_string();
963 break;
964 case 9:
965 this->string_array.push_back(value.as_string());
966 break;
967 default:
968 return false;
969 }
970 return true;
971}
972bool ExecuteServiceArgument::decode_32bit(uint32_t field_id, Proto32Bit value) {
973 switch (field_id) {
974 case 3:
975 this->float_ = value.as_float();
976 break;
977 case 8:
978 this->float_array.push_back(value.as_float());
979 break;
980 default:
981 return false;
982 }
983 return true;
984}
986 switch (field_id) {
987 case 2:
988 this->args.emplace_back();
989 value.decode_to_message(this->args.back());
990 break;
991 default:
992 return false;
993 }
994 return true;
995}
996bool ExecuteServiceRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
997 switch (field_id) {
998 case 1:
999 this->key = value.as_fixed32();
1000 break;
1001 default:
1002 return false;
1003 }
1004 return true;
1005}
1006#endif
1007#ifdef USE_CAMERA
1009 buffer.encode_string(1, this->object_id_ref_);
1010 buffer.encode_fixed32(2, this->key);
1011 buffer.encode_string(3, this->name_ref_);
1012 buffer.encode_bool(5, this->disabled_by_default);
1013#ifdef USE_ENTITY_ICON
1014 buffer.encode_string(6, this->icon_ref_);
1015#endif
1016 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
1017#ifdef USE_DEVICES
1018 buffer.encode_uint32(8, this->device_id);
1019#endif
1020}
1022 size.add_length(1, this->object_id_ref_.size());
1023 size.add_fixed32(1, this->key);
1024 size.add_length(1, this->name_ref_.size());
1025 size.add_bool(1, this->disabled_by_default);
1026#ifdef USE_ENTITY_ICON
1027 size.add_length(1, this->icon_ref_.size());
1028#endif
1029 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
1030#ifdef USE_DEVICES
1031 size.add_uint32(1, this->device_id);
1032#endif
1033}
1035 buffer.encode_fixed32(1, this->key);
1036 buffer.encode_bytes(2, this->data_ptr_, this->data_len_);
1037 buffer.encode_bool(3, this->done);
1038#ifdef USE_DEVICES
1039 buffer.encode_uint32(4, this->device_id);
1040#endif
1041}
1043 size.add_fixed32(1, this->key);
1044 size.add_length(1, this->data_len_);
1045 size.add_bool(1, this->done);
1046#ifdef USE_DEVICES
1047 size.add_uint32(1, this->device_id);
1048#endif
1049}
1050bool CameraImageRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
1051 switch (field_id) {
1052 case 1:
1053 this->single = value.as_bool();
1054 break;
1055 case 2:
1056 this->stream = value.as_bool();
1057 break;
1058 default:
1059 return false;
1060 }
1061 return true;
1062}
1063#endif
1064#ifdef USE_CLIMATE
1066 buffer.encode_string(1, this->object_id_ref_);
1067 buffer.encode_fixed32(2, this->key);
1068 buffer.encode_string(3, this->name_ref_);
1071 for (const auto &it : *this->supported_modes) {
1072 buffer.encode_uint32(7, static_cast<uint32_t>(it), true);
1073 }
1074 buffer.encode_float(8, this->visual_min_temperature);
1075 buffer.encode_float(9, this->visual_max_temperature);
1077 buffer.encode_bool(12, this->supports_action);
1078 for (const auto &it : *this->supported_fan_modes) {
1079 buffer.encode_uint32(13, static_cast<uint32_t>(it), true);
1080 }
1081 for (const auto &it : *this->supported_swing_modes) {
1082 buffer.encode_uint32(14, static_cast<uint32_t>(it), true);
1083 }
1084 for (const auto &it : *this->supported_custom_fan_modes) {
1085 buffer.encode_string(15, it, true);
1086 }
1087 for (const auto &it : *this->supported_presets) {
1088 buffer.encode_uint32(16, static_cast<uint32_t>(it), true);
1089 }
1090 for (const auto &it : *this->supported_custom_presets) {
1091 buffer.encode_string(17, it, true);
1092 }
1093 buffer.encode_bool(18, this->disabled_by_default);
1094#ifdef USE_ENTITY_ICON
1095 buffer.encode_string(19, this->icon_ref_);
1096#endif
1097 buffer.encode_uint32(20, static_cast<uint32_t>(this->entity_category));
1099 buffer.encode_bool(22, this->supports_current_humidity);
1100 buffer.encode_bool(23, this->supports_target_humidity);
1101 buffer.encode_float(24, this->visual_min_humidity);
1102 buffer.encode_float(25, this->visual_max_humidity);
1103#ifdef USE_DEVICES
1104 buffer.encode_uint32(26, this->device_id);
1105#endif
1106}
1108 size.add_length(1, this->object_id_ref_.size());
1109 size.add_fixed32(1, this->key);
1110 size.add_length(1, this->name_ref_.size());
1113 if (!this->supported_modes->empty()) {
1114 for (const auto &it : *this->supported_modes) {
1115 size.add_uint32_force(1, static_cast<uint32_t>(it));
1116 }
1117 }
1118 size.add_float(1, this->visual_min_temperature);
1119 size.add_float(1, this->visual_max_temperature);
1121 size.add_bool(1, this->supports_action);
1122 if (!this->supported_fan_modes->empty()) {
1123 for (const auto &it : *this->supported_fan_modes) {
1124 size.add_uint32_force(1, static_cast<uint32_t>(it));
1125 }
1126 }
1127 if (!this->supported_swing_modes->empty()) {
1128 for (const auto &it : *this->supported_swing_modes) {
1129 size.add_uint32_force(1, static_cast<uint32_t>(it));
1130 }
1131 }
1132 if (!this->supported_custom_fan_modes->empty()) {
1133 for (const auto &it : *this->supported_custom_fan_modes) {
1134 size.add_length_force(1, it.size());
1135 }
1136 }
1137 if (!this->supported_presets->empty()) {
1138 for (const auto &it : *this->supported_presets) {
1139 size.add_uint32_force(2, static_cast<uint32_t>(it));
1140 }
1141 }
1142 if (!this->supported_custom_presets->empty()) {
1143 for (const auto &it : *this->supported_custom_presets) {
1144 size.add_length_force(2, it.size());
1145 }
1146 }
1147 size.add_bool(2, this->disabled_by_default);
1148#ifdef USE_ENTITY_ICON
1149 size.add_length(2, this->icon_ref_.size());
1150#endif
1151 size.add_uint32(2, static_cast<uint32_t>(this->entity_category));
1153 size.add_bool(2, this->supports_current_humidity);
1154 size.add_bool(2, this->supports_target_humidity);
1155 size.add_float(2, this->visual_min_humidity);
1156 size.add_float(2, this->visual_max_humidity);
1157#ifdef USE_DEVICES
1158 size.add_uint32(2, this->device_id);
1159#endif
1160}
1162 buffer.encode_fixed32(1, this->key);
1163 buffer.encode_uint32(2, static_cast<uint32_t>(this->mode));
1164 buffer.encode_float(3, this->current_temperature);
1165 buffer.encode_float(4, this->target_temperature);
1166 buffer.encode_float(5, this->target_temperature_low);
1167 buffer.encode_float(6, this->target_temperature_high);
1168 buffer.encode_uint32(8, static_cast<uint32_t>(this->action));
1169 buffer.encode_uint32(9, static_cast<uint32_t>(this->fan_mode));
1170 buffer.encode_uint32(10, static_cast<uint32_t>(this->swing_mode));
1171 buffer.encode_string(11, this->custom_fan_mode_ref_);
1172 buffer.encode_uint32(12, static_cast<uint32_t>(this->preset));
1173 buffer.encode_string(13, this->custom_preset_ref_);
1174 buffer.encode_float(14, this->current_humidity);
1175 buffer.encode_float(15, this->target_humidity);
1176#ifdef USE_DEVICES
1177 buffer.encode_uint32(16, this->device_id);
1178#endif
1179}
1181 size.add_fixed32(1, this->key);
1182 size.add_uint32(1, static_cast<uint32_t>(this->mode));
1183 size.add_float(1, this->current_temperature);
1184 size.add_float(1, this->target_temperature);
1185 size.add_float(1, this->target_temperature_low);
1186 size.add_float(1, this->target_temperature_high);
1187 size.add_uint32(1, static_cast<uint32_t>(this->action));
1188 size.add_uint32(1, static_cast<uint32_t>(this->fan_mode));
1189 size.add_uint32(1, static_cast<uint32_t>(this->swing_mode));
1190 size.add_length(1, this->custom_fan_mode_ref_.size());
1191 size.add_uint32(1, static_cast<uint32_t>(this->preset));
1192 size.add_length(1, this->custom_preset_ref_.size());
1193 size.add_float(1, this->current_humidity);
1194 size.add_float(1, this->target_humidity);
1195#ifdef USE_DEVICES
1196 size.add_uint32(2, this->device_id);
1197#endif
1198}
1200 switch (field_id) {
1201 case 2:
1202 this->has_mode = value.as_bool();
1203 break;
1204 case 3:
1205 this->mode = static_cast<enums::ClimateMode>(value.as_uint32());
1206 break;
1207 case 4:
1208 this->has_target_temperature = value.as_bool();
1209 break;
1210 case 6:
1211 this->has_target_temperature_low = value.as_bool();
1212 break;
1213 case 8:
1214 this->has_target_temperature_high = value.as_bool();
1215 break;
1216 case 12:
1217 this->has_fan_mode = value.as_bool();
1218 break;
1219 case 13:
1220 this->fan_mode = static_cast<enums::ClimateFanMode>(value.as_uint32());
1221 break;
1222 case 14:
1223 this->has_swing_mode = value.as_bool();
1224 break;
1225 case 15:
1226 this->swing_mode = static_cast<enums::ClimateSwingMode>(value.as_uint32());
1227 break;
1228 case 16:
1229 this->has_custom_fan_mode = value.as_bool();
1230 break;
1231 case 18:
1232 this->has_preset = value.as_bool();
1233 break;
1234 case 19:
1235 this->preset = static_cast<enums::ClimatePreset>(value.as_uint32());
1236 break;
1237 case 20:
1238 this->has_custom_preset = value.as_bool();
1239 break;
1240 case 22:
1241 this->has_target_humidity = value.as_bool();
1242 break;
1243#ifdef USE_DEVICES
1244 case 24:
1245 this->device_id = value.as_uint32();
1246 break;
1247#endif
1248 default:
1249 return false;
1250 }
1251 return true;
1252}
1254 switch (field_id) {
1255 case 17:
1256 this->custom_fan_mode = value.as_string();
1257 break;
1258 case 21:
1259 this->custom_preset = value.as_string();
1260 break;
1261 default:
1262 return false;
1263 }
1264 return true;
1265}
1266bool ClimateCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
1267 switch (field_id) {
1268 case 1:
1269 this->key = value.as_fixed32();
1270 break;
1271 case 5:
1272 this->target_temperature = value.as_float();
1273 break;
1274 case 7:
1275 this->target_temperature_low = value.as_float();
1276 break;
1277 case 9:
1278 this->target_temperature_high = value.as_float();
1279 break;
1280 case 23:
1281 this->target_humidity = value.as_float();
1282 break;
1283 default:
1284 return false;
1285 }
1286 return true;
1287}
1288#endif
1289#ifdef USE_NUMBER
1291 buffer.encode_string(1, this->object_id_ref_);
1292 buffer.encode_fixed32(2, this->key);
1293 buffer.encode_string(3, this->name_ref_);
1294#ifdef USE_ENTITY_ICON
1295 buffer.encode_string(5, this->icon_ref_);
1296#endif
1297 buffer.encode_float(6, this->min_value);
1298 buffer.encode_float(7, this->max_value);
1299 buffer.encode_float(8, this->step);
1300 buffer.encode_bool(9, this->disabled_by_default);
1301 buffer.encode_uint32(10, static_cast<uint32_t>(this->entity_category));
1302 buffer.encode_string(11, this->unit_of_measurement_ref_);
1303 buffer.encode_uint32(12, static_cast<uint32_t>(this->mode));
1304 buffer.encode_string(13, this->device_class_ref_);
1305#ifdef USE_DEVICES
1306 buffer.encode_uint32(14, this->device_id);
1307#endif
1308}
1310 size.add_length(1, this->object_id_ref_.size());
1311 size.add_fixed32(1, this->key);
1312 size.add_length(1, this->name_ref_.size());
1313#ifdef USE_ENTITY_ICON
1314 size.add_length(1, this->icon_ref_.size());
1315#endif
1316 size.add_float(1, this->min_value);
1317 size.add_float(1, this->max_value);
1318 size.add_float(1, this->step);
1319 size.add_bool(1, this->disabled_by_default);
1320 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
1321 size.add_length(1, this->unit_of_measurement_ref_.size());
1322 size.add_uint32(1, static_cast<uint32_t>(this->mode));
1323 size.add_length(1, this->device_class_ref_.size());
1324#ifdef USE_DEVICES
1325 size.add_uint32(1, this->device_id);
1326#endif
1327}
1329 buffer.encode_fixed32(1, this->key);
1330 buffer.encode_float(2, this->state);
1331 buffer.encode_bool(3, this->missing_state);
1332#ifdef USE_DEVICES
1333 buffer.encode_uint32(4, this->device_id);
1334#endif
1335}
1337 size.add_fixed32(1, this->key);
1338 size.add_float(1, this->state);
1339 size.add_bool(1, this->missing_state);
1340#ifdef USE_DEVICES
1341 size.add_uint32(1, this->device_id);
1342#endif
1343}
1344bool NumberCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
1345 switch (field_id) {
1346#ifdef USE_DEVICES
1347 case 3:
1348 this->device_id = value.as_uint32();
1349 break;
1350#endif
1351 default:
1352 return false;
1353 }
1354 return true;
1355}
1356bool NumberCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
1357 switch (field_id) {
1358 case 1:
1359 this->key = value.as_fixed32();
1360 break;
1361 case 2:
1362 this->state = value.as_float();
1363 break;
1364 default:
1365 return false;
1366 }
1367 return true;
1368}
1369#endif
1370#ifdef USE_SELECT
1372 buffer.encode_string(1, this->object_id_ref_);
1373 buffer.encode_fixed32(2, this->key);
1374 buffer.encode_string(3, this->name_ref_);
1375#ifdef USE_ENTITY_ICON
1376 buffer.encode_string(5, this->icon_ref_);
1377#endif
1378 for (const auto &it : *this->options) {
1379 buffer.encode_string(6, it, true);
1380 }
1381 buffer.encode_bool(7, this->disabled_by_default);
1382 buffer.encode_uint32(8, static_cast<uint32_t>(this->entity_category));
1383#ifdef USE_DEVICES
1384 buffer.encode_uint32(9, this->device_id);
1385#endif
1386}
1388 size.add_length(1, this->object_id_ref_.size());
1389 size.add_fixed32(1, this->key);
1390 size.add_length(1, this->name_ref_.size());
1391#ifdef USE_ENTITY_ICON
1392 size.add_length(1, this->icon_ref_.size());
1393#endif
1394 if (!this->options->empty()) {
1395 for (const auto &it : *this->options) {
1396 size.add_length_force(1, it.size());
1397 }
1398 }
1399 size.add_bool(1, this->disabled_by_default);
1400 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
1401#ifdef USE_DEVICES
1402 size.add_uint32(1, this->device_id);
1403#endif
1404}
1406 buffer.encode_fixed32(1, this->key);
1407 buffer.encode_string(2, this->state_ref_);
1408 buffer.encode_bool(3, this->missing_state);
1409#ifdef USE_DEVICES
1410 buffer.encode_uint32(4, this->device_id);
1411#endif
1412}
1414 size.add_fixed32(1, this->key);
1415 size.add_length(1, this->state_ref_.size());
1416 size.add_bool(1, this->missing_state);
1417#ifdef USE_DEVICES
1418 size.add_uint32(1, this->device_id);
1419#endif
1420}
1421bool SelectCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
1422 switch (field_id) {
1423#ifdef USE_DEVICES
1424 case 3:
1425 this->device_id = value.as_uint32();
1426 break;
1427#endif
1428 default:
1429 return false;
1430 }
1431 return true;
1432}
1434 switch (field_id) {
1435 case 2:
1436 this->state = value.as_string();
1437 break;
1438 default:
1439 return false;
1440 }
1441 return true;
1442}
1443bool SelectCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
1444 switch (field_id) {
1445 case 1:
1446 this->key = value.as_fixed32();
1447 break;
1448 default:
1449 return false;
1450 }
1451 return true;
1452}
1453#endif
1454#ifdef USE_SIREN
1456 buffer.encode_string(1, this->object_id_ref_);
1457 buffer.encode_fixed32(2, this->key);
1458 buffer.encode_string(3, this->name_ref_);
1459#ifdef USE_ENTITY_ICON
1460 buffer.encode_string(5, this->icon_ref_);
1461#endif
1462 buffer.encode_bool(6, this->disabled_by_default);
1463 for (auto &it : this->tones) {
1464 buffer.encode_string(7, it, true);
1465 }
1466 buffer.encode_bool(8, this->supports_duration);
1467 buffer.encode_bool(9, this->supports_volume);
1468 buffer.encode_uint32(10, static_cast<uint32_t>(this->entity_category));
1469#ifdef USE_DEVICES
1470 buffer.encode_uint32(11, this->device_id);
1471#endif
1472}
1474 size.add_length(1, this->object_id_ref_.size());
1475 size.add_fixed32(1, this->key);
1476 size.add_length(1, this->name_ref_.size());
1477#ifdef USE_ENTITY_ICON
1478 size.add_length(1, this->icon_ref_.size());
1479#endif
1480 size.add_bool(1, this->disabled_by_default);
1481 if (!this->tones.empty()) {
1482 for (const auto &it : this->tones) {
1483 size.add_length_force(1, it.size());
1484 }
1485 }
1486 size.add_bool(1, this->supports_duration);
1487 size.add_bool(1, this->supports_volume);
1488 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
1489#ifdef USE_DEVICES
1490 size.add_uint32(1, this->device_id);
1491#endif
1492}
1494 buffer.encode_fixed32(1, this->key);
1495 buffer.encode_bool(2, this->state);
1496#ifdef USE_DEVICES
1497 buffer.encode_uint32(3, this->device_id);
1498#endif
1499}
1501 size.add_fixed32(1, this->key);
1502 size.add_bool(1, this->state);
1503#ifdef USE_DEVICES
1504 size.add_uint32(1, this->device_id);
1505#endif
1506}
1507bool SirenCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
1508 switch (field_id) {
1509 case 2:
1510 this->has_state = value.as_bool();
1511 break;
1512 case 3:
1513 this->state = value.as_bool();
1514 break;
1515 case 4:
1516 this->has_tone = value.as_bool();
1517 break;
1518 case 6:
1519 this->has_duration = value.as_bool();
1520 break;
1521 case 7:
1522 this->duration = value.as_uint32();
1523 break;
1524 case 8:
1525 this->has_volume = value.as_bool();
1526 break;
1527#ifdef USE_DEVICES
1528 case 10:
1529 this->device_id = value.as_uint32();
1530 break;
1531#endif
1532 default:
1533 return false;
1534 }
1535 return true;
1536}
1538 switch (field_id) {
1539 case 5:
1540 this->tone = value.as_string();
1541 break;
1542 default:
1543 return false;
1544 }
1545 return true;
1546}
1547bool SirenCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
1548 switch (field_id) {
1549 case 1:
1550 this->key = value.as_fixed32();
1551 break;
1552 case 9:
1553 this->volume = value.as_float();
1554 break;
1555 default:
1556 return false;
1557 }
1558 return true;
1559}
1560#endif
1561#ifdef USE_LOCK
1563 buffer.encode_string(1, this->object_id_ref_);
1564 buffer.encode_fixed32(2, this->key);
1565 buffer.encode_string(3, this->name_ref_);
1566#ifdef USE_ENTITY_ICON
1567 buffer.encode_string(5, this->icon_ref_);
1568#endif
1569 buffer.encode_bool(6, this->disabled_by_default);
1570 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
1571 buffer.encode_bool(8, this->assumed_state);
1572 buffer.encode_bool(9, this->supports_open);
1573 buffer.encode_bool(10, this->requires_code);
1574 buffer.encode_string(11, this->code_format_ref_);
1575#ifdef USE_DEVICES
1576 buffer.encode_uint32(12, this->device_id);
1577#endif
1578}
1580 size.add_length(1, this->object_id_ref_.size());
1581 size.add_fixed32(1, this->key);
1582 size.add_length(1, this->name_ref_.size());
1583#ifdef USE_ENTITY_ICON
1584 size.add_length(1, this->icon_ref_.size());
1585#endif
1586 size.add_bool(1, this->disabled_by_default);
1587 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
1588 size.add_bool(1, this->assumed_state);
1589 size.add_bool(1, this->supports_open);
1590 size.add_bool(1, this->requires_code);
1591 size.add_length(1, this->code_format_ref_.size());
1592#ifdef USE_DEVICES
1593 size.add_uint32(1, this->device_id);
1594#endif
1595}
1597 buffer.encode_fixed32(1, this->key);
1598 buffer.encode_uint32(2, static_cast<uint32_t>(this->state));
1599#ifdef USE_DEVICES
1600 buffer.encode_uint32(3, this->device_id);
1601#endif
1602}
1604 size.add_fixed32(1, this->key);
1605 size.add_uint32(1, static_cast<uint32_t>(this->state));
1606#ifdef USE_DEVICES
1607 size.add_uint32(1, this->device_id);
1608#endif
1609}
1610bool LockCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
1611 switch (field_id) {
1612 case 2:
1613 this->command = static_cast<enums::LockCommand>(value.as_uint32());
1614 break;
1615 case 3:
1616 this->has_code = value.as_bool();
1617 break;
1618#ifdef USE_DEVICES
1619 case 5:
1620 this->device_id = value.as_uint32();
1621 break;
1622#endif
1623 default:
1624 return false;
1625 }
1626 return true;
1627}
1629 switch (field_id) {
1630 case 4:
1631 this->code = value.as_string();
1632 break;
1633 default:
1634 return false;
1635 }
1636 return true;
1637}
1638bool LockCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
1639 switch (field_id) {
1640 case 1:
1641 this->key = value.as_fixed32();
1642 break;
1643 default:
1644 return false;
1645 }
1646 return true;
1647}
1648#endif
1649#ifdef USE_BUTTON
1651 buffer.encode_string(1, this->object_id_ref_);
1652 buffer.encode_fixed32(2, this->key);
1653 buffer.encode_string(3, this->name_ref_);
1654#ifdef USE_ENTITY_ICON
1655 buffer.encode_string(5, this->icon_ref_);
1656#endif
1657 buffer.encode_bool(6, this->disabled_by_default);
1658 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
1659 buffer.encode_string(8, this->device_class_ref_);
1660#ifdef USE_DEVICES
1661 buffer.encode_uint32(9, this->device_id);
1662#endif
1663}
1665 size.add_length(1, this->object_id_ref_.size());
1666 size.add_fixed32(1, this->key);
1667 size.add_length(1, this->name_ref_.size());
1668#ifdef USE_ENTITY_ICON
1669 size.add_length(1, this->icon_ref_.size());
1670#endif
1671 size.add_bool(1, this->disabled_by_default);
1672 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
1673 size.add_length(1, this->device_class_ref_.size());
1674#ifdef USE_DEVICES
1675 size.add_uint32(1, this->device_id);
1676#endif
1677}
1678bool ButtonCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
1679 switch (field_id) {
1680#ifdef USE_DEVICES
1681 case 2:
1682 this->device_id = value.as_uint32();
1683 break;
1684#endif
1685 default:
1686 return false;
1687 }
1688 return true;
1689}
1690bool ButtonCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
1691 switch (field_id) {
1692 case 1:
1693 this->key = value.as_fixed32();
1694 break;
1695 default:
1696 return false;
1697 }
1698 return true;
1699}
1700#endif
1701#ifdef USE_MEDIA_PLAYER
1703 buffer.encode_string(1, this->format_ref_);
1704 buffer.encode_uint32(2, this->sample_rate);
1705 buffer.encode_uint32(3, this->num_channels);
1706 buffer.encode_uint32(4, static_cast<uint32_t>(this->purpose));
1707 buffer.encode_uint32(5, this->sample_bytes);
1708}
1710 size.add_length(1, this->format_ref_.size());
1711 size.add_uint32(1, this->sample_rate);
1712 size.add_uint32(1, this->num_channels);
1713 size.add_uint32(1, static_cast<uint32_t>(this->purpose));
1714 size.add_uint32(1, this->sample_bytes);
1715}
1717 buffer.encode_string(1, this->object_id_ref_);
1718 buffer.encode_fixed32(2, this->key);
1719 buffer.encode_string(3, this->name_ref_);
1720#ifdef USE_ENTITY_ICON
1721 buffer.encode_string(5, this->icon_ref_);
1722#endif
1723 buffer.encode_bool(6, this->disabled_by_default);
1724 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
1725 buffer.encode_bool(8, this->supports_pause);
1726 for (auto &it : this->supported_formats) {
1727 buffer.encode_message(9, it, true);
1728 }
1729#ifdef USE_DEVICES
1730 buffer.encode_uint32(10, this->device_id);
1731#endif
1732 buffer.encode_uint32(11, this->feature_flags);
1733}
1735 size.add_length(1, this->object_id_ref_.size());
1736 size.add_fixed32(1, this->key);
1737 size.add_length(1, this->name_ref_.size());
1738#ifdef USE_ENTITY_ICON
1739 size.add_length(1, this->icon_ref_.size());
1740#endif
1741 size.add_bool(1, this->disabled_by_default);
1742 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
1743 size.add_bool(1, this->supports_pause);
1745#ifdef USE_DEVICES
1746 size.add_uint32(1, this->device_id);
1747#endif
1748 size.add_uint32(1, this->feature_flags);
1749}
1751 buffer.encode_fixed32(1, this->key);
1752 buffer.encode_uint32(2, static_cast<uint32_t>(this->state));
1753 buffer.encode_float(3, this->volume);
1754 buffer.encode_bool(4, this->muted);
1755#ifdef USE_DEVICES
1756 buffer.encode_uint32(5, this->device_id);
1757#endif
1758}
1760 size.add_fixed32(1, this->key);
1761 size.add_uint32(1, static_cast<uint32_t>(this->state));
1762 size.add_float(1, this->volume);
1763 size.add_bool(1, this->muted);
1764#ifdef USE_DEVICES
1765 size.add_uint32(1, this->device_id);
1766#endif
1767}
1769 switch (field_id) {
1770 case 2:
1771 this->has_command = value.as_bool();
1772 break;
1773 case 3:
1774 this->command = static_cast<enums::MediaPlayerCommand>(value.as_uint32());
1775 break;
1776 case 4:
1777 this->has_volume = value.as_bool();
1778 break;
1779 case 6:
1780 this->has_media_url = value.as_bool();
1781 break;
1782 case 8:
1783 this->has_announcement = value.as_bool();
1784 break;
1785 case 9:
1786 this->announcement = value.as_bool();
1787 break;
1788#ifdef USE_DEVICES
1789 case 10:
1790 this->device_id = value.as_uint32();
1791 break;
1792#endif
1793 default:
1794 return false;
1795 }
1796 return true;
1797}
1799 switch (field_id) {
1800 case 7:
1801 this->media_url = value.as_string();
1802 break;
1803 default:
1804 return false;
1805 }
1806 return true;
1807}
1809 switch (field_id) {
1810 case 1:
1811 this->key = value.as_fixed32();
1812 break;
1813 case 5:
1814 this->volume = value.as_float();
1815 break;
1816 default:
1817 return false;
1818 }
1819 return true;
1820}
1821#endif
1822#ifdef USE_BLUETOOTH_PROXY
1824 switch (field_id) {
1825 case 1:
1826 this->flags = value.as_uint32();
1827 break;
1828 default:
1829 return false;
1830 }
1831 return true;
1832}
1834 buffer.encode_uint64(1, this->address);
1835 buffer.encode_sint32(2, this->rssi);
1836 buffer.encode_uint32(3, this->address_type);
1837 buffer.encode_bytes(4, this->data, this->data_len);
1838}
1840 size.add_uint64(1, this->address);
1841 size.add_sint32(1, this->rssi);
1842 size.add_uint32(1, this->address_type);
1843 size.add_length(1, this->data_len);
1844}
1846 for (uint16_t i = 0; i < this->advertisements_len; i++) {
1847 buffer.encode_message(1, this->advertisements[i], true);
1848 }
1849}
1851 for (uint16_t i = 0; i < this->advertisements_len; i++) {
1852 size.add_message_object_force(1, this->advertisements[i]);
1853 }
1854}
1856 switch (field_id) {
1857 case 1:
1858 this->address = value.as_uint64();
1859 break;
1860 case 2:
1861 this->request_type = static_cast<enums::BluetoothDeviceRequestType>(value.as_uint32());
1862 break;
1863 case 3:
1864 this->has_address_type = value.as_bool();
1865 break;
1866 case 4:
1867 this->address_type = value.as_uint32();
1868 break;
1869 default:
1870 return false;
1871 }
1872 return true;
1873}
1875 buffer.encode_uint64(1, this->address);
1876 buffer.encode_bool(2, this->connected);
1877 buffer.encode_uint32(3, this->mtu);
1878 buffer.encode_int32(4, this->error);
1879}
1881 size.add_uint64(1, this->address);
1882 size.add_bool(1, this->connected);
1883 size.add_uint32(1, this->mtu);
1884 size.add_int32(1, this->error);
1885}
1887 switch (field_id) {
1888 case 1:
1889 this->address = value.as_uint64();
1890 break;
1891 default:
1892 return false;
1893 }
1894 return true;
1895}
1897 if (this->uuid[0] != 0 || this->uuid[1] != 0) {
1898 buffer.encode_uint64(1, this->uuid[0], true);
1899 buffer.encode_uint64(1, this->uuid[1], true);
1900 }
1901 buffer.encode_uint32(2, this->handle);
1902 buffer.encode_uint32(3, this->short_uuid);
1903}
1905 if (this->uuid[0] != 0 || this->uuid[1] != 0) {
1906 size.add_uint64_force(1, this->uuid[0]);
1907 size.add_uint64_force(1, this->uuid[1]);
1908 }
1909 size.add_uint32(1, this->handle);
1910 size.add_uint32(1, this->short_uuid);
1911}
1913 if (this->uuid[0] != 0 || this->uuid[1] != 0) {
1914 buffer.encode_uint64(1, this->uuid[0], true);
1915 buffer.encode_uint64(1, this->uuid[1], true);
1916 }
1917 buffer.encode_uint32(2, this->handle);
1918 buffer.encode_uint32(3, this->properties);
1919 for (auto &it : this->descriptors) {
1920 buffer.encode_message(4, it, true);
1921 }
1922 buffer.encode_uint32(5, this->short_uuid);
1923}
1925 if (this->uuid[0] != 0 || this->uuid[1] != 0) {
1926 size.add_uint64_force(1, this->uuid[0]);
1927 size.add_uint64_force(1, this->uuid[1]);
1928 }
1929 size.add_uint32(1, this->handle);
1930 size.add_uint32(1, this->properties);
1931 size.add_repeated_message(1, this->descriptors);
1932 size.add_uint32(1, this->short_uuid);
1933}
1935 if (this->uuid[0] != 0 || this->uuid[1] != 0) {
1936 buffer.encode_uint64(1, this->uuid[0], true);
1937 buffer.encode_uint64(1, this->uuid[1], true);
1938 }
1939 buffer.encode_uint32(2, this->handle);
1940 for (auto &it : this->characteristics) {
1941 buffer.encode_message(3, it, true);
1942 }
1943 buffer.encode_uint32(4, this->short_uuid);
1944}
1946 if (this->uuid[0] != 0 || this->uuid[1] != 0) {
1947 size.add_uint64_force(1, this->uuid[0]);
1948 size.add_uint64_force(1, this->uuid[1]);
1949 }
1950 size.add_uint32(1, this->handle);
1952 size.add_uint32(1, this->short_uuid);
1953}
1955 buffer.encode_uint64(1, this->address);
1956 for (auto &it : this->services) {
1957 buffer.encode_message(2, it, true);
1958 }
1959}
1961 size.add_uint64(1, this->address);
1962 size.add_repeated_message(1, this->services);
1963}
1969 switch (field_id) {
1970 case 1:
1971 this->address = value.as_uint64();
1972 break;
1973 case 2:
1974 this->handle = value.as_uint32();
1975 break;
1976 default:
1977 return false;
1978 }
1979 return true;
1980}
1982 buffer.encode_uint64(1, this->address);
1983 buffer.encode_uint32(2, this->handle);
1984 buffer.encode_bytes(3, this->data_ptr_, this->data_len_);
1985}
1987 size.add_uint64(1, this->address);
1988 size.add_uint32(1, this->handle);
1989 size.add_length(1, this->data_len_);
1990}
1992 switch (field_id) {
1993 case 1:
1994 this->address = value.as_uint64();
1995 break;
1996 case 2:
1997 this->handle = value.as_uint32();
1998 break;
1999 case 3:
2000 this->response = value.as_bool();
2001 break;
2002 default:
2003 return false;
2004 }
2005 return true;
2006}
2008 switch (field_id) {
2009 case 4:
2010 this->data = value.as_string();
2011 break;
2012 default:
2013 return false;
2014 }
2015 return true;
2016}
2018 switch (field_id) {
2019 case 1:
2020 this->address = value.as_uint64();
2021 break;
2022 case 2:
2023 this->handle = value.as_uint32();
2024 break;
2025 default:
2026 return false;
2027 }
2028 return true;
2029}
2031 switch (field_id) {
2032 case 1:
2033 this->address = value.as_uint64();
2034 break;
2035 case 2:
2036 this->handle = value.as_uint32();
2037 break;
2038 default:
2039 return false;
2040 }
2041 return true;
2042}
2044 switch (field_id) {
2045 case 3:
2046 this->data = value.as_string();
2047 break;
2048 default:
2049 return false;
2050 }
2051 return true;
2052}
2054 switch (field_id) {
2055 case 1:
2056 this->address = value.as_uint64();
2057 break;
2058 case 2:
2059 this->handle = value.as_uint32();
2060 break;
2061 case 3:
2062 this->enable = value.as_bool();
2063 break;
2064 default:
2065 return false;
2066 }
2067 return true;
2068}
2070 buffer.encode_uint64(1, this->address);
2071 buffer.encode_uint32(2, this->handle);
2072 buffer.encode_bytes(3, this->data_ptr_, this->data_len_);
2073}
2075 size.add_uint64(1, this->address);
2076 size.add_uint32(1, this->handle);
2077 size.add_length(1, this->data_len_);
2078}
2080 buffer.encode_uint32(1, this->free);
2081 buffer.encode_uint32(2, this->limit);
2082 for (const auto &it : this->allocated) {
2083 if (it != 0) {
2084 buffer.encode_uint64(3, it, true);
2085 }
2086 }
2087}
2089 size.add_uint32(1, this->free);
2090 size.add_uint32(1, this->limit);
2091 for (const auto &it : this->allocated) {
2092 if (it != 0) {
2093 size.add_uint64_force(1, it);
2094 }
2095 }
2096}
2098 buffer.encode_uint64(1, this->address);
2099 buffer.encode_uint32(2, this->handle);
2100 buffer.encode_int32(3, this->error);
2101}
2103 size.add_uint64(1, this->address);
2104 size.add_uint32(1, this->handle);
2105 size.add_int32(1, this->error);
2106}
2108 buffer.encode_uint64(1, this->address);
2109 buffer.encode_uint32(2, this->handle);
2110}
2112 size.add_uint64(1, this->address);
2113 size.add_uint32(1, this->handle);
2114}
2116 buffer.encode_uint64(1, this->address);
2117 buffer.encode_uint32(2, this->handle);
2118}
2120 size.add_uint64(1, this->address);
2121 size.add_uint32(1, this->handle);
2122}
2124 buffer.encode_uint64(1, this->address);
2125 buffer.encode_bool(2, this->paired);
2126 buffer.encode_int32(3, this->error);
2127}
2129 size.add_uint64(1, this->address);
2130 size.add_bool(1, this->paired);
2131 size.add_int32(1, this->error);
2132}
2134 buffer.encode_uint64(1, this->address);
2135 buffer.encode_bool(2, this->success);
2136 buffer.encode_int32(3, this->error);
2137}
2139 size.add_uint64(1, this->address);
2140 size.add_bool(1, this->success);
2141 size.add_int32(1, this->error);
2142}
2144 buffer.encode_uint64(1, this->address);
2145 buffer.encode_bool(2, this->success);
2146 buffer.encode_int32(3, this->error);
2147}
2149 size.add_uint64(1, this->address);
2150 size.add_bool(1, this->success);
2151 size.add_int32(1, this->error);
2152}
2154 buffer.encode_uint32(1, static_cast<uint32_t>(this->state));
2155 buffer.encode_uint32(2, static_cast<uint32_t>(this->mode));
2156}
2158 size.add_uint32(1, static_cast<uint32_t>(this->state));
2159 size.add_uint32(1, static_cast<uint32_t>(this->mode));
2160}
2162 switch (field_id) {
2163 case 1:
2164 this->mode = static_cast<enums::BluetoothScannerMode>(value.as_uint32());
2165 break;
2166 default:
2167 return false;
2168 }
2169 return true;
2170}
2171#endif
2172#ifdef USE_VOICE_ASSISTANT
2174 switch (field_id) {
2175 case 1:
2176 this->subscribe = value.as_bool();
2177 break;
2178 case 2:
2179 this->flags = value.as_uint32();
2180 break;
2181 default:
2182 return false;
2183 }
2184 return true;
2185}
2187 buffer.encode_uint32(1, this->noise_suppression_level);
2188 buffer.encode_uint32(2, this->auto_gain);
2189 buffer.encode_float(3, this->volume_multiplier);
2190}
2192 size.add_uint32(1, this->noise_suppression_level);
2193 size.add_uint32(1, this->auto_gain);
2194 size.add_float(1, this->volume_multiplier);
2195}
2197 buffer.encode_bool(1, this->start);
2198 buffer.encode_string(2, this->conversation_id_ref_);
2199 buffer.encode_uint32(3, this->flags);
2200 buffer.encode_message(4, this->audio_settings);
2201 buffer.encode_string(5, this->wake_word_phrase_ref_);
2202}
2204 size.add_bool(1, this->start);
2205 size.add_length(1, this->conversation_id_ref_.size());
2206 size.add_uint32(1, this->flags);
2207 size.add_message_object(1, this->audio_settings);
2208 size.add_length(1, this->wake_word_phrase_ref_.size());
2209}
2211 switch (field_id) {
2212 case 1:
2213 this->port = value.as_uint32();
2214 break;
2215 case 2:
2216 this->error = value.as_bool();
2217 break;
2218 default:
2219 return false;
2220 }
2221 return true;
2222}
2224 switch (field_id) {
2225 case 1:
2226 this->name = value.as_string();
2227 break;
2228 case 2:
2229 this->value = value.as_string();
2230 break;
2231 default:
2232 return false;
2233 }
2234 return true;
2235}
2237 switch (field_id) {
2238 case 1:
2239 this->event_type = static_cast<enums::VoiceAssistantEvent>(value.as_uint32());
2240 break;
2241 default:
2242 return false;
2243 }
2244 return true;
2245}
2247 switch (field_id) {
2248 case 2:
2249 this->data.emplace_back();
2250 value.decode_to_message(this->data.back());
2251 break;
2252 default:
2253 return false;
2254 }
2255 return true;
2256}
2257bool VoiceAssistantAudio::decode_varint(uint32_t field_id, ProtoVarInt value) {
2258 switch (field_id) {
2259 case 2:
2260 this->end = value.as_bool();
2261 break;
2262 default:
2263 return false;
2264 }
2265 return true;
2266}
2268 switch (field_id) {
2269 case 1:
2270 this->data = value.as_string();
2271 break;
2272 default:
2273 return false;
2274 }
2275 return true;
2276}
2278 buffer.encode_bytes(1, this->data_ptr_, this->data_len_);
2279 buffer.encode_bool(2, this->end);
2280}
2282 size.add_length(1, this->data_len_);
2283 size.add_bool(1, this->end);
2284}
2286 switch (field_id) {
2287 case 1:
2288 this->event_type = static_cast<enums::VoiceAssistantTimerEvent>(value.as_uint32());
2289 break;
2290 case 4:
2291 this->total_seconds = value.as_uint32();
2292 break;
2293 case 5:
2294 this->seconds_left = value.as_uint32();
2295 break;
2296 case 6:
2297 this->is_active = value.as_bool();
2298 break;
2299 default:
2300 return false;
2301 }
2302 return true;
2303}
2305 switch (field_id) {
2306 case 2:
2307 this->timer_id = value.as_string();
2308 break;
2309 case 3:
2310 this->name = value.as_string();
2311 break;
2312 default:
2313 return false;
2314 }
2315 return true;
2316}
2318 switch (field_id) {
2319 case 4:
2320 this->start_conversation = value.as_bool();
2321 break;
2322 default:
2323 return false;
2324 }
2325 return true;
2326}
2328 switch (field_id) {
2329 case 1:
2330 this->media_id = value.as_string();
2331 break;
2332 case 2:
2333 this->text = value.as_string();
2334 break;
2335 case 3:
2336 this->preannounce_media_id = value.as_string();
2337 break;
2338 default:
2339 return false;
2340 }
2341 return true;
2342}
2346 buffer.encode_string(1, this->id_ref_);
2347 buffer.encode_string(2, this->wake_word_ref_);
2348 for (auto &it : this->trained_languages) {
2349 buffer.encode_string(3, it, true);
2350 }
2351}
2353 size.add_length(1, this->id_ref_.size());
2354 size.add_length(1, this->wake_word_ref_.size());
2355 if (!this->trained_languages.empty()) {
2356 for (const auto &it : this->trained_languages) {
2357 size.add_length_force(1, it.size());
2358 }
2359 }
2360}
2362 for (auto &it : this->available_wake_words) {
2363 buffer.encode_message(1, it, true);
2364 }
2365 for (const auto &it : *this->active_wake_words) {
2366 buffer.encode_string(2, it, true);
2367 }
2368 buffer.encode_uint32(3, this->max_active_wake_words);
2369}
2372 if (!this->active_wake_words->empty()) {
2373 for (const auto &it : *this->active_wake_words) {
2374 size.add_length_force(1, it.size());
2375 }
2376 }
2377 size.add_uint32(1, this->max_active_wake_words);
2378}
2380 switch (field_id) {
2381 case 1:
2382 this->active_wake_words.push_back(value.as_string());
2383 break;
2384 default:
2385 return false;
2386 }
2387 return true;
2388}
2389#endif
2390#ifdef USE_ALARM_CONTROL_PANEL
2392 buffer.encode_string(1, this->object_id_ref_);
2393 buffer.encode_fixed32(2, this->key);
2394 buffer.encode_string(3, this->name_ref_);
2395#ifdef USE_ENTITY_ICON
2396 buffer.encode_string(5, this->icon_ref_);
2397#endif
2398 buffer.encode_bool(6, this->disabled_by_default);
2399 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
2400 buffer.encode_uint32(8, this->supported_features);
2401 buffer.encode_bool(9, this->requires_code);
2402 buffer.encode_bool(10, this->requires_code_to_arm);
2403#ifdef USE_DEVICES
2404 buffer.encode_uint32(11, this->device_id);
2405#endif
2406}
2408 size.add_length(1, this->object_id_ref_.size());
2409 size.add_fixed32(1, this->key);
2410 size.add_length(1, this->name_ref_.size());
2411#ifdef USE_ENTITY_ICON
2412 size.add_length(1, this->icon_ref_.size());
2413#endif
2414 size.add_bool(1, this->disabled_by_default);
2415 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
2416 size.add_uint32(1, this->supported_features);
2417 size.add_bool(1, this->requires_code);
2418 size.add_bool(1, this->requires_code_to_arm);
2419#ifdef USE_DEVICES
2420 size.add_uint32(1, this->device_id);
2421#endif
2422}
2424 buffer.encode_fixed32(1, this->key);
2425 buffer.encode_uint32(2, static_cast<uint32_t>(this->state));
2426#ifdef USE_DEVICES
2427 buffer.encode_uint32(3, this->device_id);
2428#endif
2429}
2431 size.add_fixed32(1, this->key);
2432 size.add_uint32(1, static_cast<uint32_t>(this->state));
2433#ifdef USE_DEVICES
2434 size.add_uint32(1, this->device_id);
2435#endif
2436}
2438 switch (field_id) {
2439 case 2:
2440 this->command = static_cast<enums::AlarmControlPanelStateCommand>(value.as_uint32());
2441 break;
2442#ifdef USE_DEVICES
2443 case 4:
2444 this->device_id = value.as_uint32();
2445 break;
2446#endif
2447 default:
2448 return false;
2449 }
2450 return true;
2451}
2453 switch (field_id) {
2454 case 3:
2455 this->code = value.as_string();
2456 break;
2457 default:
2458 return false;
2459 }
2460 return true;
2461}
2463 switch (field_id) {
2464 case 1:
2465 this->key = value.as_fixed32();
2466 break;
2467 default:
2468 return false;
2469 }
2470 return true;
2471}
2472#endif
2473#ifdef USE_TEXT
2475 buffer.encode_string(1, this->object_id_ref_);
2476 buffer.encode_fixed32(2, this->key);
2477 buffer.encode_string(3, this->name_ref_);
2478#ifdef USE_ENTITY_ICON
2479 buffer.encode_string(5, this->icon_ref_);
2480#endif
2481 buffer.encode_bool(6, this->disabled_by_default);
2482 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
2483 buffer.encode_uint32(8, this->min_length);
2484 buffer.encode_uint32(9, this->max_length);
2485 buffer.encode_string(10, this->pattern_ref_);
2486 buffer.encode_uint32(11, static_cast<uint32_t>(this->mode));
2487#ifdef USE_DEVICES
2488 buffer.encode_uint32(12, this->device_id);
2489#endif
2490}
2492 size.add_length(1, this->object_id_ref_.size());
2493 size.add_fixed32(1, this->key);
2494 size.add_length(1, this->name_ref_.size());
2495#ifdef USE_ENTITY_ICON
2496 size.add_length(1, this->icon_ref_.size());
2497#endif
2498 size.add_bool(1, this->disabled_by_default);
2499 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
2500 size.add_uint32(1, this->min_length);
2501 size.add_uint32(1, this->max_length);
2502 size.add_length(1, this->pattern_ref_.size());
2503 size.add_uint32(1, static_cast<uint32_t>(this->mode));
2504#ifdef USE_DEVICES
2505 size.add_uint32(1, this->device_id);
2506#endif
2507}
2509 buffer.encode_fixed32(1, this->key);
2510 buffer.encode_string(2, this->state_ref_);
2511 buffer.encode_bool(3, this->missing_state);
2512#ifdef USE_DEVICES
2513 buffer.encode_uint32(4, this->device_id);
2514#endif
2515}
2517 size.add_fixed32(1, this->key);
2518 size.add_length(1, this->state_ref_.size());
2519 size.add_bool(1, this->missing_state);
2520#ifdef USE_DEVICES
2521 size.add_uint32(1, this->device_id);
2522#endif
2523}
2524bool TextCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
2525 switch (field_id) {
2526#ifdef USE_DEVICES
2527 case 3:
2528 this->device_id = value.as_uint32();
2529 break;
2530#endif
2531 default:
2532 return false;
2533 }
2534 return true;
2535}
2537 switch (field_id) {
2538 case 2:
2539 this->state = value.as_string();
2540 break;
2541 default:
2542 return false;
2543 }
2544 return true;
2545}
2546bool TextCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
2547 switch (field_id) {
2548 case 1:
2549 this->key = value.as_fixed32();
2550 break;
2551 default:
2552 return false;
2553 }
2554 return true;
2555}
2556#endif
2557#ifdef USE_DATETIME_DATE
2559 buffer.encode_string(1, this->object_id_ref_);
2560 buffer.encode_fixed32(2, this->key);
2561 buffer.encode_string(3, this->name_ref_);
2562#ifdef USE_ENTITY_ICON
2563 buffer.encode_string(5, this->icon_ref_);
2564#endif
2565 buffer.encode_bool(6, this->disabled_by_default);
2566 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
2567#ifdef USE_DEVICES
2568 buffer.encode_uint32(8, this->device_id);
2569#endif
2570}
2572 size.add_length(1, this->object_id_ref_.size());
2573 size.add_fixed32(1, this->key);
2574 size.add_length(1, this->name_ref_.size());
2575#ifdef USE_ENTITY_ICON
2576 size.add_length(1, this->icon_ref_.size());
2577#endif
2578 size.add_bool(1, this->disabled_by_default);
2579 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
2580#ifdef USE_DEVICES
2581 size.add_uint32(1, this->device_id);
2582#endif
2583}
2585 buffer.encode_fixed32(1, this->key);
2586 buffer.encode_bool(2, this->missing_state);
2587 buffer.encode_uint32(3, this->year);
2588 buffer.encode_uint32(4, this->month);
2589 buffer.encode_uint32(5, this->day);
2590#ifdef USE_DEVICES
2591 buffer.encode_uint32(6, this->device_id);
2592#endif
2593}
2595 size.add_fixed32(1, this->key);
2596 size.add_bool(1, this->missing_state);
2597 size.add_uint32(1, this->year);
2598 size.add_uint32(1, this->month);
2599 size.add_uint32(1, this->day);
2600#ifdef USE_DEVICES
2601 size.add_uint32(1, this->device_id);
2602#endif
2603}
2604bool DateCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
2605 switch (field_id) {
2606 case 2:
2607 this->year = value.as_uint32();
2608 break;
2609 case 3:
2610 this->month = value.as_uint32();
2611 break;
2612 case 4:
2613 this->day = value.as_uint32();
2614 break;
2615#ifdef USE_DEVICES
2616 case 5:
2617 this->device_id = value.as_uint32();
2618 break;
2619#endif
2620 default:
2621 return false;
2622 }
2623 return true;
2624}
2625bool DateCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
2626 switch (field_id) {
2627 case 1:
2628 this->key = value.as_fixed32();
2629 break;
2630 default:
2631 return false;
2632 }
2633 return true;
2634}
2635#endif
2636#ifdef USE_DATETIME_TIME
2638 buffer.encode_string(1, this->object_id_ref_);
2639 buffer.encode_fixed32(2, this->key);
2640 buffer.encode_string(3, this->name_ref_);
2641#ifdef USE_ENTITY_ICON
2642 buffer.encode_string(5, this->icon_ref_);
2643#endif
2644 buffer.encode_bool(6, this->disabled_by_default);
2645 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
2646#ifdef USE_DEVICES
2647 buffer.encode_uint32(8, this->device_id);
2648#endif
2649}
2651 size.add_length(1, this->object_id_ref_.size());
2652 size.add_fixed32(1, this->key);
2653 size.add_length(1, this->name_ref_.size());
2654#ifdef USE_ENTITY_ICON
2655 size.add_length(1, this->icon_ref_.size());
2656#endif
2657 size.add_bool(1, this->disabled_by_default);
2658 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
2659#ifdef USE_DEVICES
2660 size.add_uint32(1, this->device_id);
2661#endif
2662}
2664 buffer.encode_fixed32(1, this->key);
2665 buffer.encode_bool(2, this->missing_state);
2666 buffer.encode_uint32(3, this->hour);
2667 buffer.encode_uint32(4, this->minute);
2668 buffer.encode_uint32(5, this->second);
2669#ifdef USE_DEVICES
2670 buffer.encode_uint32(6, this->device_id);
2671#endif
2672}
2674 size.add_fixed32(1, this->key);
2675 size.add_bool(1, this->missing_state);
2676 size.add_uint32(1, this->hour);
2677 size.add_uint32(1, this->minute);
2678 size.add_uint32(1, this->second);
2679#ifdef USE_DEVICES
2680 size.add_uint32(1, this->device_id);
2681#endif
2682}
2683bool TimeCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
2684 switch (field_id) {
2685 case 2:
2686 this->hour = value.as_uint32();
2687 break;
2688 case 3:
2689 this->minute = value.as_uint32();
2690 break;
2691 case 4:
2692 this->second = value.as_uint32();
2693 break;
2694#ifdef USE_DEVICES
2695 case 5:
2696 this->device_id = value.as_uint32();
2697 break;
2698#endif
2699 default:
2700 return false;
2701 }
2702 return true;
2703}
2704bool TimeCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
2705 switch (field_id) {
2706 case 1:
2707 this->key = value.as_fixed32();
2708 break;
2709 default:
2710 return false;
2711 }
2712 return true;
2713}
2714#endif
2715#ifdef USE_EVENT
2717 buffer.encode_string(1, this->object_id_ref_);
2718 buffer.encode_fixed32(2, this->key);
2719 buffer.encode_string(3, this->name_ref_);
2720#ifdef USE_ENTITY_ICON
2721 buffer.encode_string(5, this->icon_ref_);
2722#endif
2723 buffer.encode_bool(6, this->disabled_by_default);
2724 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
2725 buffer.encode_string(8, this->device_class_ref_);
2726 for (auto &it : this->event_types) {
2727 buffer.encode_string(9, it, true);
2728 }
2729#ifdef USE_DEVICES
2730 buffer.encode_uint32(10, this->device_id);
2731#endif
2732}
2734 size.add_length(1, this->object_id_ref_.size());
2735 size.add_fixed32(1, this->key);
2736 size.add_length(1, this->name_ref_.size());
2737#ifdef USE_ENTITY_ICON
2738 size.add_length(1, this->icon_ref_.size());
2739#endif
2740 size.add_bool(1, this->disabled_by_default);
2741 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
2742 size.add_length(1, this->device_class_ref_.size());
2743 if (!this->event_types.empty()) {
2744 for (const auto &it : this->event_types) {
2745 size.add_length_force(1, it.size());
2746 }
2747 }
2748#ifdef USE_DEVICES
2749 size.add_uint32(1, this->device_id);
2750#endif
2751}
2753 buffer.encode_fixed32(1, this->key);
2754 buffer.encode_string(2, this->event_type_ref_);
2755#ifdef USE_DEVICES
2756 buffer.encode_uint32(3, this->device_id);
2757#endif
2758}
2760 size.add_fixed32(1, this->key);
2761 size.add_length(1, this->event_type_ref_.size());
2762#ifdef USE_DEVICES
2763 size.add_uint32(1, this->device_id);
2764#endif
2765}
2766#endif
2767#ifdef USE_VALVE
2769 buffer.encode_string(1, this->object_id_ref_);
2770 buffer.encode_fixed32(2, this->key);
2771 buffer.encode_string(3, this->name_ref_);
2772#ifdef USE_ENTITY_ICON
2773 buffer.encode_string(5, this->icon_ref_);
2774#endif
2775 buffer.encode_bool(6, this->disabled_by_default);
2776 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
2777 buffer.encode_string(8, this->device_class_ref_);
2778 buffer.encode_bool(9, this->assumed_state);
2779 buffer.encode_bool(10, this->supports_position);
2780 buffer.encode_bool(11, this->supports_stop);
2781#ifdef USE_DEVICES
2782 buffer.encode_uint32(12, this->device_id);
2783#endif
2784}
2786 size.add_length(1, this->object_id_ref_.size());
2787 size.add_fixed32(1, this->key);
2788 size.add_length(1, this->name_ref_.size());
2789#ifdef USE_ENTITY_ICON
2790 size.add_length(1, this->icon_ref_.size());
2791#endif
2792 size.add_bool(1, this->disabled_by_default);
2793 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
2794 size.add_length(1, this->device_class_ref_.size());
2795 size.add_bool(1, this->assumed_state);
2796 size.add_bool(1, this->supports_position);
2797 size.add_bool(1, this->supports_stop);
2798#ifdef USE_DEVICES
2799 size.add_uint32(1, this->device_id);
2800#endif
2801}
2803 buffer.encode_fixed32(1, this->key);
2804 buffer.encode_float(2, this->position);
2805 buffer.encode_uint32(3, static_cast<uint32_t>(this->current_operation));
2806#ifdef USE_DEVICES
2807 buffer.encode_uint32(4, this->device_id);
2808#endif
2809}
2811 size.add_fixed32(1, this->key);
2812 size.add_float(1, this->position);
2813 size.add_uint32(1, static_cast<uint32_t>(this->current_operation));
2814#ifdef USE_DEVICES
2815 size.add_uint32(1, this->device_id);
2816#endif
2817}
2818bool ValveCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
2819 switch (field_id) {
2820 case 2:
2821 this->has_position = value.as_bool();
2822 break;
2823 case 4:
2824 this->stop = value.as_bool();
2825 break;
2826#ifdef USE_DEVICES
2827 case 5:
2828 this->device_id = value.as_uint32();
2829 break;
2830#endif
2831 default:
2832 return false;
2833 }
2834 return true;
2835}
2836bool ValveCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
2837 switch (field_id) {
2838 case 1:
2839 this->key = value.as_fixed32();
2840 break;
2841 case 3:
2842 this->position = value.as_float();
2843 break;
2844 default:
2845 return false;
2846 }
2847 return true;
2848}
2849#endif
2850#ifdef USE_DATETIME_DATETIME
2852 buffer.encode_string(1, this->object_id_ref_);
2853 buffer.encode_fixed32(2, this->key);
2854 buffer.encode_string(3, this->name_ref_);
2855#ifdef USE_ENTITY_ICON
2856 buffer.encode_string(5, this->icon_ref_);
2857#endif
2858 buffer.encode_bool(6, this->disabled_by_default);
2859 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
2860#ifdef USE_DEVICES
2861 buffer.encode_uint32(8, this->device_id);
2862#endif
2863}
2865 size.add_length(1, this->object_id_ref_.size());
2866 size.add_fixed32(1, this->key);
2867 size.add_length(1, this->name_ref_.size());
2868#ifdef USE_ENTITY_ICON
2869 size.add_length(1, this->icon_ref_.size());
2870#endif
2871 size.add_bool(1, this->disabled_by_default);
2872 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
2873#ifdef USE_DEVICES
2874 size.add_uint32(1, this->device_id);
2875#endif
2876}
2878 buffer.encode_fixed32(1, this->key);
2879 buffer.encode_bool(2, this->missing_state);
2880 buffer.encode_fixed32(3, this->epoch_seconds);
2881#ifdef USE_DEVICES
2882 buffer.encode_uint32(4, this->device_id);
2883#endif
2884}
2886 size.add_fixed32(1, this->key);
2887 size.add_bool(1, this->missing_state);
2888 size.add_fixed32(1, this->epoch_seconds);
2889#ifdef USE_DEVICES
2890 size.add_uint32(1, this->device_id);
2891#endif
2892}
2894 switch (field_id) {
2895#ifdef USE_DEVICES
2896 case 3:
2897 this->device_id = value.as_uint32();
2898 break;
2899#endif
2900 default:
2901 return false;
2902 }
2903 return true;
2904}
2905bool DateTimeCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
2906 switch (field_id) {
2907 case 1:
2908 this->key = value.as_fixed32();
2909 break;
2910 case 2:
2911 this->epoch_seconds = value.as_fixed32();
2912 break;
2913 default:
2914 return false;
2915 }
2916 return true;
2917}
2918#endif
2919#ifdef USE_UPDATE
2921 buffer.encode_string(1, this->object_id_ref_);
2922 buffer.encode_fixed32(2, this->key);
2923 buffer.encode_string(3, this->name_ref_);
2924#ifdef USE_ENTITY_ICON
2925 buffer.encode_string(5, this->icon_ref_);
2926#endif
2927 buffer.encode_bool(6, this->disabled_by_default);
2928 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
2929 buffer.encode_string(8, this->device_class_ref_);
2930#ifdef USE_DEVICES
2931 buffer.encode_uint32(9, this->device_id);
2932#endif
2933}
2935 size.add_length(1, this->object_id_ref_.size());
2936 size.add_fixed32(1, this->key);
2937 size.add_length(1, this->name_ref_.size());
2938#ifdef USE_ENTITY_ICON
2939 size.add_length(1, this->icon_ref_.size());
2940#endif
2941 size.add_bool(1, this->disabled_by_default);
2942 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
2943 size.add_length(1, this->device_class_ref_.size());
2944#ifdef USE_DEVICES
2945 size.add_uint32(1, this->device_id);
2946#endif
2947}
2949 buffer.encode_fixed32(1, this->key);
2950 buffer.encode_bool(2, this->missing_state);
2951 buffer.encode_bool(3, this->in_progress);
2952 buffer.encode_bool(4, this->has_progress);
2953 buffer.encode_float(5, this->progress);
2954 buffer.encode_string(6, this->current_version_ref_);
2955 buffer.encode_string(7, this->latest_version_ref_);
2956 buffer.encode_string(8, this->title_ref_);
2957 buffer.encode_string(9, this->release_summary_ref_);
2958 buffer.encode_string(10, this->release_url_ref_);
2959#ifdef USE_DEVICES
2960 buffer.encode_uint32(11, this->device_id);
2961#endif
2962}
2964 size.add_fixed32(1, this->key);
2965 size.add_bool(1, this->missing_state);
2966 size.add_bool(1, this->in_progress);
2967 size.add_bool(1, this->has_progress);
2968 size.add_float(1, this->progress);
2969 size.add_length(1, this->current_version_ref_.size());
2970 size.add_length(1, this->latest_version_ref_.size());
2971 size.add_length(1, this->title_ref_.size());
2972 size.add_length(1, this->release_summary_ref_.size());
2973 size.add_length(1, this->release_url_ref_.size());
2974#ifdef USE_DEVICES
2975 size.add_uint32(1, this->device_id);
2976#endif
2977}
2978bool UpdateCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
2979 switch (field_id) {
2980 case 2:
2981 this->command = static_cast<enums::UpdateCommand>(value.as_uint32());
2982 break;
2983#ifdef USE_DEVICES
2984 case 3:
2985 this->device_id = value.as_uint32();
2986 break;
2987#endif
2988 default:
2989 return false;
2990 }
2991 return true;
2992}
2993bool UpdateCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
2994 switch (field_id) {
2995 case 1:
2996 this->key = value.as_fixed32();
2997 break;
2998 default:
2999 return false;
3000 }
3001 return true;
3002}
3003#endif
3004
3005} // namespace esphome::api
constexpr size_type size() const
Definition string_ref.h:70
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:2462
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2437
enums::AlarmControlPanelStateCommand command
Definition api_pb2.h:2528
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2452
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2430
enums::AlarmControlPanelState state
Definition api_pb2.h:2512
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2423
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:58
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:62
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:214
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:222
std::array< uint64_t, BLUETOOTH_PROXY_MAX_CONNECTIONS > allocated
Definition api_pb2.h:2086
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2079
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2088
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2148
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2143
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1874
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1880
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2128
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2123
enums::BluetoothDeviceRequestType request_type
Definition api_pb2.h:1813
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1855
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2133
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2138
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1912
std::vector< BluetoothGATTDescriptor > descriptors
Definition api_pb2.h:1875
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1924
std::array< uint64_t, 2 > uuid
Definition api_pb2.h:1872
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1904
std::array< uint64_t, 2 > uuid
Definition api_pb2.h:1859
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1896
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2097
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2102
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1964
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1967
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1886
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1960
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1954
std::vector< BluetoothGATTService > services
Definition api_pb2.h:1907
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2069
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2074
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2053
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2119
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2115
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2017
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1968
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1981
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1986
std::vector< BluetoothGATTCharacteristic > characteristics
Definition api_pb2.h:1889
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1945
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1934
std::array< uint64_t, 2 > uuid
Definition api_pb2.h:1887
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2043
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2030
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2007
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1991
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2111
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2107
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1839
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1833
std::array< BluetoothLERawAdvertisement, BLUETOOTH_PROXY_ADVERTISEMENT_BATCH_SIZE > advertisements
Definition api_pb2.h:1795
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1845
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1850
enums::BluetoothScannerMode mode
Definition api_pb2.h:2238
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2161
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2153
enums::BluetoothScannerMode mode
Definition api_pb2.h:2222
enums::BluetoothScannerState state
Definition api_pb2.h:2221
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2157
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1678
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:1690
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1050
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1042
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1034
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:1266
enums::ClimateSwingMode swing_mode
Definition api_pb2.h:1398
enums::ClimateFanMode fan_mode
Definition api_pb2.h:1396
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1199
enums::ClimatePreset preset
Definition api_pb2.h:1402
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:1253
enums::ClimateFanMode fan_mode
Definition api_pb2.h:1363
enums::ClimateSwingMode swing_mode
Definition api_pb2.h:1364
enums::ClimateAction action
Definition api_pb2.h:1362
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1161
enums::ClimatePreset preset
Definition api_pb2.h:1367
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1180
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:45
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:56
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:55
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:307
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:286
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:268
enums::CoverOperation current_operation
Definition api_pb2.h:669
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:277
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:2625
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2604
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2584
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2594
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:2905
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2893
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2885
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2877
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:73
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:68
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:79
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:131
std::array< AreaInfo, ESPHOME_AREA_COUNT > areas
Definition api_pb2.h:549
std::array< DeviceInfo, ESPHOME_DEVICE_COUNT > devices
Definition api_pb2.h:546
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2759
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2752
std::vector< int32_t > int_array
Definition api_pb2.h:1232
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:959
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:937
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:972
std::vector< std::string > string_array
Definition api_pb2.h:1234
std::vector< float > float_array
Definition api_pb2.h:1233
std::vector< ExecuteServiceArgument > args
Definition api_pb2.h:1252
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:996
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:985
enums::FanDirection direction
Definition api_pb2.h:753
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:389
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:428
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:438
enums::FanDirection direction
Definition api_pb2.h:729
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:367
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:378
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:904
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:914
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:915
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:10
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:23
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:39
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:33
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:887
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:847
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:851
std::vector< HomeassistantServiceMap > data_template
Definition api_pb2.h:1097
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:855
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:868
std::vector< HomeassistantServiceMap > data
Definition api_pb2.h:1096
std::vector< HomeassistantServiceMap > variables
Definition api_pb2.h:1098
enums::EntityCategory entity_category
Definition api_pb2.h:295
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:592
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:602
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:532
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:496
enums::ColorMode color_mode
Definition api_pb2.h:797
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:514
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2407
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2391
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:184
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:199
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1664
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1650
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1021
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1008
const std::set< std::string > * supported_custom_presets
Definition api_pb2.h:1336
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1107
const std::set< climate::ClimateSwingMode > * supported_swing_modes
Definition api_pb2.h:1333
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1065
const std::set< std::string > * supported_custom_fan_modes
Definition api_pb2.h:1334
const std::set< climate::ClimateFanMode > * supported_fan_modes
Definition api_pb2.h:1332
const std::set< climate::ClimatePreset > * supported_presets
Definition api_pb2.h:1335
const std::set< climate::ClimateMode > * supported_modes
Definition api_pb2.h:1327
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:250
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:232
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2558
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2571
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2864
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2851
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2733
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2716
std::vector< std::string > event_types
Definition api_pb2.h:2715
const std::set< std::string > * supported_preset_modes
Definition api_pb2.h:711
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:325
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:345
const std::set< light::ColorMode > * supported_color_modes
Definition api_pb2.h:776
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:471
std::vector< std::string > effects
Definition api_pb2.h:779
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:450
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1562
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1579
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1716
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1734
std::vector< MediaPlayerSupportedFormat > supported_formats
Definition api_pb2.h:1704
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1309
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1290
const std::vector< std::string > * options
Definition api_pb2.h:1483
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1387
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1371
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:641
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:659
enums::SensorStateClass state_class
Definition api_pb2.h:873
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:921
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:917
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:932
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:925
std::vector< ListEntitiesServicesArgument > args
Definition api_pb2.h:1215
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1455
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1473
std::vector< std::string > tones
Definition api_pb2.h:1536
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:695
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:710
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2491
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2474
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:780
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:766
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2637
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2650
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2934
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2920
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2785
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2768
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1610
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:1638
enums::LockCommand command
Definition api_pb2.h:1632
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:1628
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1603
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1596
enums::MediaPlayerCommand command
Definition api_pb2.h:1740
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:1808
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1768
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:1798
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1759
enums::MediaPlayerState state
Definition api_pb2.h:1721
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1750
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1709
enums::MediaPlayerFormatPurpose purpose
Definition api_pb2.h:1686
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1702
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:833
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:843
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:844
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:1356
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1344
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1328
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1336
uint32_t as_fixed32() const
Definition proto.h:204
float as_float() const
Definition proto.h:206
void decode_to_message(ProtoDecodableMessage &msg) const
Decode the length-delimited data into an existing ProtoDecodableMessage instance.
Definition proto.h:786
std::string as_string() const
Definition proto.h:183
void add_message_object(uint32_t field_id_size, const ProtoMessage &message)
Calculates and adds the size of a nested message field to the total message size.
Definition proto.h:711
void add_message_object_force(uint32_t field_id_size, const ProtoMessage &message)
Calculates and adds the size of a nested message field to the total message size (force version)
Definition proto.h:726
void add_float(uint32_t field_id_size, float value)
Calculates and adds the size of a float field to the total message size.
Definition proto.h:556
void add_uint32_force(uint32_t field_id_size, uint32_t value)
Calculates and adds the size of a uint32 field to the total message size (force version)
Definition proto.h:529
void add_sint32(uint32_t field_id_size, int32_t value)
Calculates and adds the size of a sint32 field to the total message size.
Definition proto.h:594
void add_bool(uint32_t field_id_size, bool value)
Calculates and adds the size of a boolean field to the total message size.
Definition proto.h:537
void add_uint32(uint32_t field_id_size, uint32_t value)
Calculates and adds the size of a uint32 field to the total message size.
Definition proto.h:520
void add_repeated_message(uint32_t field_id_size, const std::vector< MessageType > &messages)
Calculates and adds the sizes of all messages in a repeated field to the total message size.
Definition proto.h:746
void add_uint64(uint32_t field_id_size, uint64_t value)
Calculates and adds the size of a uint64 field to the total message size.
Definition proto.h:631
void add_length_force(uint32_t field_id_size, size_t len)
Calculates and adds the size of a length-delimited field (string/bytes) to the total message size (re...
Definition proto.h:661
void add_int32(uint32_t field_id_size, int32_t value)
Common parameters for all add_*_field methods.
Definition proto.h:502
void add_uint64_force(uint32_t field_id_size, uint64_t value)
Calculates and adds the size of a uint64 field to the total message size (force version)
Definition proto.h:640
void add_fixed32(uint32_t field_id_size, uint32_t value)
Calculates and adds the size of a fixed32 field to the total message size.
Definition proto.h:568
void add_length(uint32_t field_id_size, size_t len)
Calculates and adds the size of a length-delimited field (string/bytes) to the total message size.
Definition proto.h:651
Representation of a VarInt - in ProtoBuf should be 64bit but we only use 32bit.
Definition proto.h:66
constexpr uint64_t as_uint64() const
Definition proto.h:109
constexpr int32_t as_int32() const
Definition proto.h:111
constexpr uint32_t as_uint32() const
Definition proto.h:108
constexpr bool as_bool() const
Definition proto.h:110
constexpr int32_t as_sint32() const
Definition proto.h:119
void encode_float(uint32_t field_id, float value, bool force=false)
Definition proto.h:298
void encode_int32(uint32_t field_id, int32_t value, bool force=false)
Definition proto.h:309
void encode_string(uint32_t field_id, const char *string, size_t len, bool force=false)
Definition proto.h:243
void encode_bool(uint32_t field_id, bool value, bool force=false)
Definition proto.h:278
void encode_uint64(uint32_t field_id, uint64_t value, bool force=false)
Definition proto.h:272
void encode_uint32(uint32_t field_id, uint32_t value, bool force=false)
Definition proto.h:266
void encode_sint32(uint32_t field_id, int32_t value, bool force=false)
Definition proto.h:320
void encode_message(uint32_t field_id, const ProtoMessage &value, bool force=false)
Definition proto.h:760
void encode_bytes(uint32_t field_id, const uint8_t *data, size_t len, bool force=false)
Definition proto.h:263
void encode_fixed32(uint32_t field_id, uint32_t value, bool force=false)
Definition proto.h:284
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:1433
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1421
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:1443
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1405
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1413
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:685
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:677
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:1537
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1507
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:1547
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1500
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1493
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1823
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:882
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:877
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:811
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:828
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:824
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2173
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:754
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:739
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:725
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:732
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2536
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:2546
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2524
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:802
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:794
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2516
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2508
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:2704
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2683
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2673
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2663
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:2993
enums::UpdateCommand command
Definition api_pb2.h:2903
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2978
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2963
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2948
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2818
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:2836
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2802
enums::ValveOperation current_operation
Definition api_pb2.h:2771
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2810
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2344
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2343
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2327
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2317
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2277
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2281
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2267
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2257
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2186
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2191
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2370
std::vector< VoiceAssistantWakeWord > available_wake_words
Definition api_pb2.h:2459
const std::vector< std::string > * active_wake_words
Definition api_pb2.h:2460
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2361
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2223
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2246
enums::VoiceAssistantEvent event_type
Definition api_pb2.h:2333
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2236
std::vector< VoiceAssistantEventData > data
Definition api_pb2.h:2334
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2203
VoiceAssistantAudioSettings audio_settings
Definition api_pb2.h:2288
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2196
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2210
std::vector< std::string > active_wake_words
Definition api_pb2.h:2477
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2379
enums::VoiceAssistantTimerEvent event_type
Definition api_pb2.h:2375
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2304
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2285
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2345
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2352
std::vector< std::string > trained_languages
Definition api_pb2.h:2430