ESPHome 2025.9.3
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
905 switch (field_id) {
906 case 2:
907 this->timezone = value.as_string();
908 break;
909 default:
910 return false;
911 }
912 return true;
913}
914bool GetTimeResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
915 switch (field_id) {
916 case 1:
917 this->epoch_seconds = value.as_fixed32();
918 break;
919 default:
920 return false;
921 }
922 return true;
923}
924#ifdef USE_API_SERVICES
926 buffer.encode_string(1, this->name_ref_);
927 buffer.encode_uint32(2, static_cast<uint32_t>(this->type));
928}
930 size.add_length(1, this->name_ref_.size());
931 size.add_uint32(1, static_cast<uint32_t>(this->type));
932}
934 buffer.encode_string(1, this->name_ref_);
935 buffer.encode_fixed32(2, this->key);
936 for (auto &it : this->args) {
937 buffer.encode_message(3, it, true);
938 }
939}
941 size.add_length(1, this->name_ref_.size());
942 size.add_fixed32(1, this->key);
943 size.add_repeated_message(1, this->args);
944}
946 switch (field_id) {
947 case 1:
948 this->bool_ = value.as_bool();
949 break;
950 case 2:
951 this->legacy_int = value.as_int32();
952 break;
953 case 5:
954 this->int_ = value.as_sint32();
955 break;
956 case 6:
957 this->bool_array.push_back(value.as_bool());
958 break;
959 case 7:
960 this->int_array.push_back(value.as_sint32());
961 break;
962 default:
963 return false;
964 }
965 return true;
966}
968 switch (field_id) {
969 case 4:
970 this->string_ = value.as_string();
971 break;
972 case 9:
973 this->string_array.push_back(value.as_string());
974 break;
975 default:
976 return false;
977 }
978 return true;
979}
980bool ExecuteServiceArgument::decode_32bit(uint32_t field_id, Proto32Bit value) {
981 switch (field_id) {
982 case 3:
983 this->float_ = value.as_float();
984 break;
985 case 8:
986 this->float_array.push_back(value.as_float());
987 break;
988 default:
989 return false;
990 }
991 return true;
992}
994 switch (field_id) {
995 case 2:
996 this->args.emplace_back();
997 value.decode_to_message(this->args.back());
998 break;
999 default:
1000 return false;
1001 }
1002 return true;
1003}
1004bool ExecuteServiceRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
1005 switch (field_id) {
1006 case 1:
1007 this->key = value.as_fixed32();
1008 break;
1009 default:
1010 return false;
1011 }
1012 return true;
1013}
1014#endif
1015#ifdef USE_CAMERA
1017 buffer.encode_string(1, this->object_id_ref_);
1018 buffer.encode_fixed32(2, this->key);
1019 buffer.encode_string(3, this->name_ref_);
1020 buffer.encode_bool(5, this->disabled_by_default);
1021#ifdef USE_ENTITY_ICON
1022 buffer.encode_string(6, this->icon_ref_);
1023#endif
1024 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
1025#ifdef USE_DEVICES
1026 buffer.encode_uint32(8, this->device_id);
1027#endif
1028}
1030 size.add_length(1, this->object_id_ref_.size());
1031 size.add_fixed32(1, this->key);
1032 size.add_length(1, this->name_ref_.size());
1033 size.add_bool(1, this->disabled_by_default);
1034#ifdef USE_ENTITY_ICON
1035 size.add_length(1, this->icon_ref_.size());
1036#endif
1037 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
1038#ifdef USE_DEVICES
1039 size.add_uint32(1, this->device_id);
1040#endif
1041}
1043 buffer.encode_fixed32(1, this->key);
1044 buffer.encode_bytes(2, this->data_ptr_, this->data_len_);
1045 buffer.encode_bool(3, this->done);
1046#ifdef USE_DEVICES
1047 buffer.encode_uint32(4, this->device_id);
1048#endif
1049}
1051 size.add_fixed32(1, this->key);
1052 size.add_length(1, this->data_len_);
1053 size.add_bool(1, this->done);
1054#ifdef USE_DEVICES
1055 size.add_uint32(1, this->device_id);
1056#endif
1057}
1058bool CameraImageRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
1059 switch (field_id) {
1060 case 1:
1061 this->single = value.as_bool();
1062 break;
1063 case 2:
1064 this->stream = value.as_bool();
1065 break;
1066 default:
1067 return false;
1068 }
1069 return true;
1070}
1071#endif
1072#ifdef USE_CLIMATE
1074 buffer.encode_string(1, this->object_id_ref_);
1075 buffer.encode_fixed32(2, this->key);
1076 buffer.encode_string(3, this->name_ref_);
1079 for (const auto &it : *this->supported_modes) {
1080 buffer.encode_uint32(7, static_cast<uint32_t>(it), true);
1081 }
1082 buffer.encode_float(8, this->visual_min_temperature);
1083 buffer.encode_float(9, this->visual_max_temperature);
1085 buffer.encode_bool(12, this->supports_action);
1086 for (const auto &it : *this->supported_fan_modes) {
1087 buffer.encode_uint32(13, static_cast<uint32_t>(it), true);
1088 }
1089 for (const auto &it : *this->supported_swing_modes) {
1090 buffer.encode_uint32(14, static_cast<uint32_t>(it), true);
1091 }
1092 for (const auto &it : *this->supported_custom_fan_modes) {
1093 buffer.encode_string(15, it, true);
1094 }
1095 for (const auto &it : *this->supported_presets) {
1096 buffer.encode_uint32(16, static_cast<uint32_t>(it), true);
1097 }
1098 for (const auto &it : *this->supported_custom_presets) {
1099 buffer.encode_string(17, it, true);
1100 }
1101 buffer.encode_bool(18, this->disabled_by_default);
1102#ifdef USE_ENTITY_ICON
1103 buffer.encode_string(19, this->icon_ref_);
1104#endif
1105 buffer.encode_uint32(20, static_cast<uint32_t>(this->entity_category));
1107 buffer.encode_bool(22, this->supports_current_humidity);
1108 buffer.encode_bool(23, this->supports_target_humidity);
1109 buffer.encode_float(24, this->visual_min_humidity);
1110 buffer.encode_float(25, this->visual_max_humidity);
1111#ifdef USE_DEVICES
1112 buffer.encode_uint32(26, this->device_id);
1113#endif
1114}
1116 size.add_length(1, this->object_id_ref_.size());
1117 size.add_fixed32(1, this->key);
1118 size.add_length(1, this->name_ref_.size());
1121 if (!this->supported_modes->empty()) {
1122 for (const auto &it : *this->supported_modes) {
1123 size.add_uint32_force(1, static_cast<uint32_t>(it));
1124 }
1125 }
1126 size.add_float(1, this->visual_min_temperature);
1127 size.add_float(1, this->visual_max_temperature);
1129 size.add_bool(1, this->supports_action);
1130 if (!this->supported_fan_modes->empty()) {
1131 for (const auto &it : *this->supported_fan_modes) {
1132 size.add_uint32_force(1, static_cast<uint32_t>(it));
1133 }
1134 }
1135 if (!this->supported_swing_modes->empty()) {
1136 for (const auto &it : *this->supported_swing_modes) {
1137 size.add_uint32_force(1, static_cast<uint32_t>(it));
1138 }
1139 }
1140 if (!this->supported_custom_fan_modes->empty()) {
1141 for (const auto &it : *this->supported_custom_fan_modes) {
1142 size.add_length_force(1, it.size());
1143 }
1144 }
1145 if (!this->supported_presets->empty()) {
1146 for (const auto &it : *this->supported_presets) {
1147 size.add_uint32_force(2, static_cast<uint32_t>(it));
1148 }
1149 }
1150 if (!this->supported_custom_presets->empty()) {
1151 for (const auto &it : *this->supported_custom_presets) {
1152 size.add_length_force(2, it.size());
1153 }
1154 }
1155 size.add_bool(2, this->disabled_by_default);
1156#ifdef USE_ENTITY_ICON
1157 size.add_length(2, this->icon_ref_.size());
1158#endif
1159 size.add_uint32(2, static_cast<uint32_t>(this->entity_category));
1161 size.add_bool(2, this->supports_current_humidity);
1162 size.add_bool(2, this->supports_target_humidity);
1163 size.add_float(2, this->visual_min_humidity);
1164 size.add_float(2, this->visual_max_humidity);
1165#ifdef USE_DEVICES
1166 size.add_uint32(2, this->device_id);
1167#endif
1168}
1170 buffer.encode_fixed32(1, this->key);
1171 buffer.encode_uint32(2, static_cast<uint32_t>(this->mode));
1172 buffer.encode_float(3, this->current_temperature);
1173 buffer.encode_float(4, this->target_temperature);
1174 buffer.encode_float(5, this->target_temperature_low);
1175 buffer.encode_float(6, this->target_temperature_high);
1176 buffer.encode_uint32(8, static_cast<uint32_t>(this->action));
1177 buffer.encode_uint32(9, static_cast<uint32_t>(this->fan_mode));
1178 buffer.encode_uint32(10, static_cast<uint32_t>(this->swing_mode));
1179 buffer.encode_string(11, this->custom_fan_mode_ref_);
1180 buffer.encode_uint32(12, static_cast<uint32_t>(this->preset));
1181 buffer.encode_string(13, this->custom_preset_ref_);
1182 buffer.encode_float(14, this->current_humidity);
1183 buffer.encode_float(15, this->target_humidity);
1184#ifdef USE_DEVICES
1185 buffer.encode_uint32(16, this->device_id);
1186#endif
1187}
1189 size.add_fixed32(1, this->key);
1190 size.add_uint32(1, static_cast<uint32_t>(this->mode));
1191 size.add_float(1, this->current_temperature);
1192 size.add_float(1, this->target_temperature);
1193 size.add_float(1, this->target_temperature_low);
1194 size.add_float(1, this->target_temperature_high);
1195 size.add_uint32(1, static_cast<uint32_t>(this->action));
1196 size.add_uint32(1, static_cast<uint32_t>(this->fan_mode));
1197 size.add_uint32(1, static_cast<uint32_t>(this->swing_mode));
1198 size.add_length(1, this->custom_fan_mode_ref_.size());
1199 size.add_uint32(1, static_cast<uint32_t>(this->preset));
1200 size.add_length(1, this->custom_preset_ref_.size());
1201 size.add_float(1, this->current_humidity);
1202 size.add_float(1, this->target_humidity);
1203#ifdef USE_DEVICES
1204 size.add_uint32(2, this->device_id);
1205#endif
1206}
1208 switch (field_id) {
1209 case 2:
1210 this->has_mode = value.as_bool();
1211 break;
1212 case 3:
1213 this->mode = static_cast<enums::ClimateMode>(value.as_uint32());
1214 break;
1215 case 4:
1216 this->has_target_temperature = value.as_bool();
1217 break;
1218 case 6:
1219 this->has_target_temperature_low = value.as_bool();
1220 break;
1221 case 8:
1222 this->has_target_temperature_high = value.as_bool();
1223 break;
1224 case 12:
1225 this->has_fan_mode = value.as_bool();
1226 break;
1227 case 13:
1228 this->fan_mode = static_cast<enums::ClimateFanMode>(value.as_uint32());
1229 break;
1230 case 14:
1231 this->has_swing_mode = value.as_bool();
1232 break;
1233 case 15:
1234 this->swing_mode = static_cast<enums::ClimateSwingMode>(value.as_uint32());
1235 break;
1236 case 16:
1237 this->has_custom_fan_mode = value.as_bool();
1238 break;
1239 case 18:
1240 this->has_preset = value.as_bool();
1241 break;
1242 case 19:
1243 this->preset = static_cast<enums::ClimatePreset>(value.as_uint32());
1244 break;
1245 case 20:
1246 this->has_custom_preset = value.as_bool();
1247 break;
1248 case 22:
1249 this->has_target_humidity = value.as_bool();
1250 break;
1251#ifdef USE_DEVICES
1252 case 24:
1253 this->device_id = value.as_uint32();
1254 break;
1255#endif
1256 default:
1257 return false;
1258 }
1259 return true;
1260}
1262 switch (field_id) {
1263 case 17:
1264 this->custom_fan_mode = value.as_string();
1265 break;
1266 case 21:
1267 this->custom_preset = value.as_string();
1268 break;
1269 default:
1270 return false;
1271 }
1272 return true;
1273}
1274bool ClimateCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
1275 switch (field_id) {
1276 case 1:
1277 this->key = value.as_fixed32();
1278 break;
1279 case 5:
1280 this->target_temperature = value.as_float();
1281 break;
1282 case 7:
1283 this->target_temperature_low = value.as_float();
1284 break;
1285 case 9:
1286 this->target_temperature_high = value.as_float();
1287 break;
1288 case 23:
1289 this->target_humidity = value.as_float();
1290 break;
1291 default:
1292 return false;
1293 }
1294 return true;
1295}
1296#endif
1297#ifdef USE_NUMBER
1299 buffer.encode_string(1, this->object_id_ref_);
1300 buffer.encode_fixed32(2, this->key);
1301 buffer.encode_string(3, this->name_ref_);
1302#ifdef USE_ENTITY_ICON
1303 buffer.encode_string(5, this->icon_ref_);
1304#endif
1305 buffer.encode_float(6, this->min_value);
1306 buffer.encode_float(7, this->max_value);
1307 buffer.encode_float(8, this->step);
1308 buffer.encode_bool(9, this->disabled_by_default);
1309 buffer.encode_uint32(10, static_cast<uint32_t>(this->entity_category));
1310 buffer.encode_string(11, this->unit_of_measurement_ref_);
1311 buffer.encode_uint32(12, static_cast<uint32_t>(this->mode));
1312 buffer.encode_string(13, this->device_class_ref_);
1313#ifdef USE_DEVICES
1314 buffer.encode_uint32(14, this->device_id);
1315#endif
1316}
1318 size.add_length(1, this->object_id_ref_.size());
1319 size.add_fixed32(1, this->key);
1320 size.add_length(1, this->name_ref_.size());
1321#ifdef USE_ENTITY_ICON
1322 size.add_length(1, this->icon_ref_.size());
1323#endif
1324 size.add_float(1, this->min_value);
1325 size.add_float(1, this->max_value);
1326 size.add_float(1, this->step);
1327 size.add_bool(1, this->disabled_by_default);
1328 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
1329 size.add_length(1, this->unit_of_measurement_ref_.size());
1330 size.add_uint32(1, static_cast<uint32_t>(this->mode));
1331 size.add_length(1, this->device_class_ref_.size());
1332#ifdef USE_DEVICES
1333 size.add_uint32(1, this->device_id);
1334#endif
1335}
1337 buffer.encode_fixed32(1, this->key);
1338 buffer.encode_float(2, this->state);
1339 buffer.encode_bool(3, this->missing_state);
1340#ifdef USE_DEVICES
1341 buffer.encode_uint32(4, this->device_id);
1342#endif
1343}
1345 size.add_fixed32(1, this->key);
1346 size.add_float(1, this->state);
1347 size.add_bool(1, this->missing_state);
1348#ifdef USE_DEVICES
1349 size.add_uint32(1, this->device_id);
1350#endif
1351}
1352bool NumberCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
1353 switch (field_id) {
1354#ifdef USE_DEVICES
1355 case 3:
1356 this->device_id = value.as_uint32();
1357 break;
1358#endif
1359 default:
1360 return false;
1361 }
1362 return true;
1363}
1364bool NumberCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
1365 switch (field_id) {
1366 case 1:
1367 this->key = value.as_fixed32();
1368 break;
1369 case 2:
1370 this->state = value.as_float();
1371 break;
1372 default:
1373 return false;
1374 }
1375 return true;
1376}
1377#endif
1378#ifdef USE_SELECT
1380 buffer.encode_string(1, this->object_id_ref_);
1381 buffer.encode_fixed32(2, this->key);
1382 buffer.encode_string(3, this->name_ref_);
1383#ifdef USE_ENTITY_ICON
1384 buffer.encode_string(5, this->icon_ref_);
1385#endif
1386 for (const auto &it : *this->options) {
1387 buffer.encode_string(6, it, true);
1388 }
1389 buffer.encode_bool(7, this->disabled_by_default);
1390 buffer.encode_uint32(8, static_cast<uint32_t>(this->entity_category));
1391#ifdef USE_DEVICES
1392 buffer.encode_uint32(9, this->device_id);
1393#endif
1394}
1396 size.add_length(1, this->object_id_ref_.size());
1397 size.add_fixed32(1, this->key);
1398 size.add_length(1, this->name_ref_.size());
1399#ifdef USE_ENTITY_ICON
1400 size.add_length(1, this->icon_ref_.size());
1401#endif
1402 if (!this->options->empty()) {
1403 for (const auto &it : *this->options) {
1404 size.add_length_force(1, it.size());
1405 }
1406 }
1407 size.add_bool(1, this->disabled_by_default);
1408 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
1409#ifdef USE_DEVICES
1410 size.add_uint32(1, this->device_id);
1411#endif
1412}
1414 buffer.encode_fixed32(1, this->key);
1415 buffer.encode_string(2, this->state_ref_);
1416 buffer.encode_bool(3, this->missing_state);
1417#ifdef USE_DEVICES
1418 buffer.encode_uint32(4, this->device_id);
1419#endif
1420}
1422 size.add_fixed32(1, this->key);
1423 size.add_length(1, this->state_ref_.size());
1424 size.add_bool(1, this->missing_state);
1425#ifdef USE_DEVICES
1426 size.add_uint32(1, this->device_id);
1427#endif
1428}
1429bool SelectCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
1430 switch (field_id) {
1431#ifdef USE_DEVICES
1432 case 3:
1433 this->device_id = value.as_uint32();
1434 break;
1435#endif
1436 default:
1437 return false;
1438 }
1439 return true;
1440}
1442 switch (field_id) {
1443 case 2:
1444 this->state = value.as_string();
1445 break;
1446 default:
1447 return false;
1448 }
1449 return true;
1450}
1451bool SelectCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
1452 switch (field_id) {
1453 case 1:
1454 this->key = value.as_fixed32();
1455 break;
1456 default:
1457 return false;
1458 }
1459 return true;
1460}
1461#endif
1462#ifdef USE_SIREN
1464 buffer.encode_string(1, this->object_id_ref_);
1465 buffer.encode_fixed32(2, this->key);
1466 buffer.encode_string(3, this->name_ref_);
1467#ifdef USE_ENTITY_ICON
1468 buffer.encode_string(5, this->icon_ref_);
1469#endif
1470 buffer.encode_bool(6, this->disabled_by_default);
1471 for (auto &it : this->tones) {
1472 buffer.encode_string(7, it, true);
1473 }
1474 buffer.encode_bool(8, this->supports_duration);
1475 buffer.encode_bool(9, this->supports_volume);
1476 buffer.encode_uint32(10, static_cast<uint32_t>(this->entity_category));
1477#ifdef USE_DEVICES
1478 buffer.encode_uint32(11, this->device_id);
1479#endif
1480}
1482 size.add_length(1, this->object_id_ref_.size());
1483 size.add_fixed32(1, this->key);
1484 size.add_length(1, this->name_ref_.size());
1485#ifdef USE_ENTITY_ICON
1486 size.add_length(1, this->icon_ref_.size());
1487#endif
1488 size.add_bool(1, this->disabled_by_default);
1489 if (!this->tones.empty()) {
1490 for (const auto &it : this->tones) {
1491 size.add_length_force(1, it.size());
1492 }
1493 }
1494 size.add_bool(1, this->supports_duration);
1495 size.add_bool(1, this->supports_volume);
1496 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
1497#ifdef USE_DEVICES
1498 size.add_uint32(1, this->device_id);
1499#endif
1500}
1502 buffer.encode_fixed32(1, this->key);
1503 buffer.encode_bool(2, this->state);
1504#ifdef USE_DEVICES
1505 buffer.encode_uint32(3, this->device_id);
1506#endif
1507}
1509 size.add_fixed32(1, this->key);
1510 size.add_bool(1, this->state);
1511#ifdef USE_DEVICES
1512 size.add_uint32(1, this->device_id);
1513#endif
1514}
1515bool SirenCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
1516 switch (field_id) {
1517 case 2:
1518 this->has_state = value.as_bool();
1519 break;
1520 case 3:
1521 this->state = value.as_bool();
1522 break;
1523 case 4:
1524 this->has_tone = value.as_bool();
1525 break;
1526 case 6:
1527 this->has_duration = value.as_bool();
1528 break;
1529 case 7:
1530 this->duration = value.as_uint32();
1531 break;
1532 case 8:
1533 this->has_volume = value.as_bool();
1534 break;
1535#ifdef USE_DEVICES
1536 case 10:
1537 this->device_id = value.as_uint32();
1538 break;
1539#endif
1540 default:
1541 return false;
1542 }
1543 return true;
1544}
1546 switch (field_id) {
1547 case 5:
1548 this->tone = value.as_string();
1549 break;
1550 default:
1551 return false;
1552 }
1553 return true;
1554}
1555bool SirenCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
1556 switch (field_id) {
1557 case 1:
1558 this->key = value.as_fixed32();
1559 break;
1560 case 9:
1561 this->volume = value.as_float();
1562 break;
1563 default:
1564 return false;
1565 }
1566 return true;
1567}
1568#endif
1569#ifdef USE_LOCK
1571 buffer.encode_string(1, this->object_id_ref_);
1572 buffer.encode_fixed32(2, this->key);
1573 buffer.encode_string(3, this->name_ref_);
1574#ifdef USE_ENTITY_ICON
1575 buffer.encode_string(5, this->icon_ref_);
1576#endif
1577 buffer.encode_bool(6, this->disabled_by_default);
1578 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
1579 buffer.encode_bool(8, this->assumed_state);
1580 buffer.encode_bool(9, this->supports_open);
1581 buffer.encode_bool(10, this->requires_code);
1582 buffer.encode_string(11, this->code_format_ref_);
1583#ifdef USE_DEVICES
1584 buffer.encode_uint32(12, this->device_id);
1585#endif
1586}
1588 size.add_length(1, this->object_id_ref_.size());
1589 size.add_fixed32(1, this->key);
1590 size.add_length(1, this->name_ref_.size());
1591#ifdef USE_ENTITY_ICON
1592 size.add_length(1, this->icon_ref_.size());
1593#endif
1594 size.add_bool(1, this->disabled_by_default);
1595 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
1596 size.add_bool(1, this->assumed_state);
1597 size.add_bool(1, this->supports_open);
1598 size.add_bool(1, this->requires_code);
1599 size.add_length(1, this->code_format_ref_.size());
1600#ifdef USE_DEVICES
1601 size.add_uint32(1, this->device_id);
1602#endif
1603}
1605 buffer.encode_fixed32(1, this->key);
1606 buffer.encode_uint32(2, static_cast<uint32_t>(this->state));
1607#ifdef USE_DEVICES
1608 buffer.encode_uint32(3, this->device_id);
1609#endif
1610}
1612 size.add_fixed32(1, this->key);
1613 size.add_uint32(1, static_cast<uint32_t>(this->state));
1614#ifdef USE_DEVICES
1615 size.add_uint32(1, this->device_id);
1616#endif
1617}
1618bool LockCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
1619 switch (field_id) {
1620 case 2:
1621 this->command = static_cast<enums::LockCommand>(value.as_uint32());
1622 break;
1623 case 3:
1624 this->has_code = value.as_bool();
1625 break;
1626#ifdef USE_DEVICES
1627 case 5:
1628 this->device_id = value.as_uint32();
1629 break;
1630#endif
1631 default:
1632 return false;
1633 }
1634 return true;
1635}
1637 switch (field_id) {
1638 case 4:
1639 this->code = value.as_string();
1640 break;
1641 default:
1642 return false;
1643 }
1644 return true;
1645}
1646bool LockCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
1647 switch (field_id) {
1648 case 1:
1649 this->key = value.as_fixed32();
1650 break;
1651 default:
1652 return false;
1653 }
1654 return true;
1655}
1656#endif
1657#ifdef USE_BUTTON
1659 buffer.encode_string(1, this->object_id_ref_);
1660 buffer.encode_fixed32(2, this->key);
1661 buffer.encode_string(3, this->name_ref_);
1662#ifdef USE_ENTITY_ICON
1663 buffer.encode_string(5, this->icon_ref_);
1664#endif
1665 buffer.encode_bool(6, this->disabled_by_default);
1666 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
1667 buffer.encode_string(8, this->device_class_ref_);
1668#ifdef USE_DEVICES
1669 buffer.encode_uint32(9, this->device_id);
1670#endif
1671}
1673 size.add_length(1, this->object_id_ref_.size());
1674 size.add_fixed32(1, this->key);
1675 size.add_length(1, this->name_ref_.size());
1676#ifdef USE_ENTITY_ICON
1677 size.add_length(1, this->icon_ref_.size());
1678#endif
1679 size.add_bool(1, this->disabled_by_default);
1680 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
1681 size.add_length(1, this->device_class_ref_.size());
1682#ifdef USE_DEVICES
1683 size.add_uint32(1, this->device_id);
1684#endif
1685}
1686bool ButtonCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
1687 switch (field_id) {
1688#ifdef USE_DEVICES
1689 case 2:
1690 this->device_id = value.as_uint32();
1691 break;
1692#endif
1693 default:
1694 return false;
1695 }
1696 return true;
1697}
1698bool ButtonCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
1699 switch (field_id) {
1700 case 1:
1701 this->key = value.as_fixed32();
1702 break;
1703 default:
1704 return false;
1705 }
1706 return true;
1707}
1708#endif
1709#ifdef USE_MEDIA_PLAYER
1711 buffer.encode_string(1, this->format_ref_);
1712 buffer.encode_uint32(2, this->sample_rate);
1713 buffer.encode_uint32(3, this->num_channels);
1714 buffer.encode_uint32(4, static_cast<uint32_t>(this->purpose));
1715 buffer.encode_uint32(5, this->sample_bytes);
1716}
1718 size.add_length(1, this->format_ref_.size());
1719 size.add_uint32(1, this->sample_rate);
1720 size.add_uint32(1, this->num_channels);
1721 size.add_uint32(1, static_cast<uint32_t>(this->purpose));
1722 size.add_uint32(1, this->sample_bytes);
1723}
1725 buffer.encode_string(1, this->object_id_ref_);
1726 buffer.encode_fixed32(2, this->key);
1727 buffer.encode_string(3, this->name_ref_);
1728#ifdef USE_ENTITY_ICON
1729 buffer.encode_string(5, this->icon_ref_);
1730#endif
1731 buffer.encode_bool(6, this->disabled_by_default);
1732 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
1733 buffer.encode_bool(8, this->supports_pause);
1734 for (auto &it : this->supported_formats) {
1735 buffer.encode_message(9, it, true);
1736 }
1737#ifdef USE_DEVICES
1738 buffer.encode_uint32(10, this->device_id);
1739#endif
1740 buffer.encode_uint32(11, this->feature_flags);
1741}
1743 size.add_length(1, this->object_id_ref_.size());
1744 size.add_fixed32(1, this->key);
1745 size.add_length(1, this->name_ref_.size());
1746#ifdef USE_ENTITY_ICON
1747 size.add_length(1, this->icon_ref_.size());
1748#endif
1749 size.add_bool(1, this->disabled_by_default);
1750 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
1751 size.add_bool(1, this->supports_pause);
1753#ifdef USE_DEVICES
1754 size.add_uint32(1, this->device_id);
1755#endif
1756 size.add_uint32(1, this->feature_flags);
1757}
1759 buffer.encode_fixed32(1, this->key);
1760 buffer.encode_uint32(2, static_cast<uint32_t>(this->state));
1761 buffer.encode_float(3, this->volume);
1762 buffer.encode_bool(4, this->muted);
1763#ifdef USE_DEVICES
1764 buffer.encode_uint32(5, this->device_id);
1765#endif
1766}
1768 size.add_fixed32(1, this->key);
1769 size.add_uint32(1, static_cast<uint32_t>(this->state));
1770 size.add_float(1, this->volume);
1771 size.add_bool(1, this->muted);
1772#ifdef USE_DEVICES
1773 size.add_uint32(1, this->device_id);
1774#endif
1775}
1777 switch (field_id) {
1778 case 2:
1779 this->has_command = value.as_bool();
1780 break;
1781 case 3:
1782 this->command = static_cast<enums::MediaPlayerCommand>(value.as_uint32());
1783 break;
1784 case 4:
1785 this->has_volume = value.as_bool();
1786 break;
1787 case 6:
1788 this->has_media_url = value.as_bool();
1789 break;
1790 case 8:
1791 this->has_announcement = value.as_bool();
1792 break;
1793 case 9:
1794 this->announcement = value.as_bool();
1795 break;
1796#ifdef USE_DEVICES
1797 case 10:
1798 this->device_id = value.as_uint32();
1799 break;
1800#endif
1801 default:
1802 return false;
1803 }
1804 return true;
1805}
1807 switch (field_id) {
1808 case 7:
1809 this->media_url = value.as_string();
1810 break;
1811 default:
1812 return false;
1813 }
1814 return true;
1815}
1817 switch (field_id) {
1818 case 1:
1819 this->key = value.as_fixed32();
1820 break;
1821 case 5:
1822 this->volume = value.as_float();
1823 break;
1824 default:
1825 return false;
1826 }
1827 return true;
1828}
1829#endif
1830#ifdef USE_BLUETOOTH_PROXY
1832 switch (field_id) {
1833 case 1:
1834 this->flags = value.as_uint32();
1835 break;
1836 default:
1837 return false;
1838 }
1839 return true;
1840}
1842 buffer.encode_uint64(1, this->address);
1843 buffer.encode_sint32(2, this->rssi);
1844 buffer.encode_uint32(3, this->address_type);
1845 buffer.encode_bytes(4, this->data, this->data_len);
1846}
1848 size.add_uint64(1, this->address);
1849 size.add_sint32(1, this->rssi);
1850 size.add_uint32(1, this->address_type);
1851 size.add_length(1, this->data_len);
1852}
1854 for (uint16_t i = 0; i < this->advertisements_len; i++) {
1855 buffer.encode_message(1, this->advertisements[i], true);
1856 }
1857}
1859 for (uint16_t i = 0; i < this->advertisements_len; i++) {
1860 size.add_message_object_force(1, this->advertisements[i]);
1861 }
1862}
1864 switch (field_id) {
1865 case 1:
1866 this->address = value.as_uint64();
1867 break;
1868 case 2:
1869 this->request_type = static_cast<enums::BluetoothDeviceRequestType>(value.as_uint32());
1870 break;
1871 case 3:
1872 this->has_address_type = value.as_bool();
1873 break;
1874 case 4:
1875 this->address_type = value.as_uint32();
1876 break;
1877 default:
1878 return false;
1879 }
1880 return true;
1881}
1883 buffer.encode_uint64(1, this->address);
1884 buffer.encode_bool(2, this->connected);
1885 buffer.encode_uint32(3, this->mtu);
1886 buffer.encode_int32(4, this->error);
1887}
1889 size.add_uint64(1, this->address);
1890 size.add_bool(1, this->connected);
1891 size.add_uint32(1, this->mtu);
1892 size.add_int32(1, this->error);
1893}
1895 switch (field_id) {
1896 case 1:
1897 this->address = value.as_uint64();
1898 break;
1899 default:
1900 return false;
1901 }
1902 return true;
1903}
1905 if (this->uuid[0] != 0 || this->uuid[1] != 0) {
1906 buffer.encode_uint64(1, this->uuid[0], true);
1907 buffer.encode_uint64(1, this->uuid[1], true);
1908 }
1909 buffer.encode_uint32(2, this->handle);
1910 buffer.encode_uint32(3, this->short_uuid);
1911}
1913 if (this->uuid[0] != 0 || this->uuid[1] != 0) {
1914 size.add_uint64_force(1, this->uuid[0]);
1915 size.add_uint64_force(1, this->uuid[1]);
1916 }
1917 size.add_uint32(1, this->handle);
1918 size.add_uint32(1, this->short_uuid);
1919}
1921 if (this->uuid[0] != 0 || this->uuid[1] != 0) {
1922 buffer.encode_uint64(1, this->uuid[0], true);
1923 buffer.encode_uint64(1, this->uuid[1], true);
1924 }
1925 buffer.encode_uint32(2, this->handle);
1926 buffer.encode_uint32(3, this->properties);
1927 for (auto &it : this->descriptors) {
1928 buffer.encode_message(4, it, true);
1929 }
1930 buffer.encode_uint32(5, this->short_uuid);
1931}
1933 if (this->uuid[0] != 0 || this->uuid[1] != 0) {
1934 size.add_uint64_force(1, this->uuid[0]);
1935 size.add_uint64_force(1, this->uuid[1]);
1936 }
1937 size.add_uint32(1, this->handle);
1938 size.add_uint32(1, this->properties);
1939 size.add_repeated_message(1, this->descriptors);
1940 size.add_uint32(1, this->short_uuid);
1941}
1943 if (this->uuid[0] != 0 || this->uuid[1] != 0) {
1944 buffer.encode_uint64(1, this->uuid[0], true);
1945 buffer.encode_uint64(1, this->uuid[1], true);
1946 }
1947 buffer.encode_uint32(2, this->handle);
1948 for (auto &it : this->characteristics) {
1949 buffer.encode_message(3, it, true);
1950 }
1951 buffer.encode_uint32(4, this->short_uuid);
1952}
1954 if (this->uuid[0] != 0 || this->uuid[1] != 0) {
1955 size.add_uint64_force(1, this->uuid[0]);
1956 size.add_uint64_force(1, this->uuid[1]);
1957 }
1958 size.add_uint32(1, this->handle);
1960 size.add_uint32(1, this->short_uuid);
1961}
1963 buffer.encode_uint64(1, this->address);
1964 for (auto &it : this->services) {
1965 buffer.encode_message(2, it, true);
1966 }
1967}
1969 size.add_uint64(1, this->address);
1970 size.add_repeated_message(1, this->services);
1971}
1977 switch (field_id) {
1978 case 1:
1979 this->address = value.as_uint64();
1980 break;
1981 case 2:
1982 this->handle = value.as_uint32();
1983 break;
1984 default:
1985 return false;
1986 }
1987 return true;
1988}
1990 buffer.encode_uint64(1, this->address);
1991 buffer.encode_uint32(2, this->handle);
1992 buffer.encode_bytes(3, this->data_ptr_, this->data_len_);
1993}
1995 size.add_uint64(1, this->address);
1996 size.add_uint32(1, this->handle);
1997 size.add_length(1, this->data_len_);
1998}
2000 switch (field_id) {
2001 case 1:
2002 this->address = value.as_uint64();
2003 break;
2004 case 2:
2005 this->handle = value.as_uint32();
2006 break;
2007 case 3:
2008 this->response = value.as_bool();
2009 break;
2010 default:
2011 return false;
2012 }
2013 return true;
2014}
2016 switch (field_id) {
2017 case 4:
2018 this->data = value.as_string();
2019 break;
2020 default:
2021 return false;
2022 }
2023 return true;
2024}
2026 switch (field_id) {
2027 case 1:
2028 this->address = value.as_uint64();
2029 break;
2030 case 2:
2031 this->handle = value.as_uint32();
2032 break;
2033 default:
2034 return false;
2035 }
2036 return true;
2037}
2039 switch (field_id) {
2040 case 1:
2041 this->address = value.as_uint64();
2042 break;
2043 case 2:
2044 this->handle = value.as_uint32();
2045 break;
2046 default:
2047 return false;
2048 }
2049 return true;
2050}
2052 switch (field_id) {
2053 case 3:
2054 this->data = value.as_string();
2055 break;
2056 default:
2057 return false;
2058 }
2059 return true;
2060}
2062 switch (field_id) {
2063 case 1:
2064 this->address = value.as_uint64();
2065 break;
2066 case 2:
2067 this->handle = value.as_uint32();
2068 break;
2069 case 3:
2070 this->enable = value.as_bool();
2071 break;
2072 default:
2073 return false;
2074 }
2075 return true;
2076}
2078 buffer.encode_uint64(1, this->address);
2079 buffer.encode_uint32(2, this->handle);
2080 buffer.encode_bytes(3, this->data_ptr_, this->data_len_);
2081}
2083 size.add_uint64(1, this->address);
2084 size.add_uint32(1, this->handle);
2085 size.add_length(1, this->data_len_);
2086}
2088 buffer.encode_uint32(1, this->free);
2089 buffer.encode_uint32(2, this->limit);
2090 for (const auto &it : this->allocated) {
2091 if (it != 0) {
2092 buffer.encode_uint64(3, it, true);
2093 }
2094 }
2095}
2097 size.add_uint32(1, this->free);
2098 size.add_uint32(1, this->limit);
2099 for (const auto &it : this->allocated) {
2100 if (it != 0) {
2101 size.add_uint64_force(1, it);
2102 }
2103 }
2104}
2106 buffer.encode_uint64(1, this->address);
2107 buffer.encode_uint32(2, this->handle);
2108 buffer.encode_int32(3, this->error);
2109}
2111 size.add_uint64(1, this->address);
2112 size.add_uint32(1, this->handle);
2113 size.add_int32(1, this->error);
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_uint32(2, this->handle);
2126}
2128 size.add_uint64(1, this->address);
2129 size.add_uint32(1, this->handle);
2130}
2132 buffer.encode_uint64(1, this->address);
2133 buffer.encode_bool(2, this->paired);
2134 buffer.encode_int32(3, this->error);
2135}
2137 size.add_uint64(1, this->address);
2138 size.add_bool(1, this->paired);
2139 size.add_int32(1, this->error);
2140}
2142 buffer.encode_uint64(1, this->address);
2143 buffer.encode_bool(2, this->success);
2144 buffer.encode_int32(3, this->error);
2145}
2147 size.add_uint64(1, this->address);
2148 size.add_bool(1, this->success);
2149 size.add_int32(1, this->error);
2150}
2152 buffer.encode_uint64(1, this->address);
2153 buffer.encode_bool(2, this->success);
2154 buffer.encode_int32(3, this->error);
2155}
2157 size.add_uint64(1, this->address);
2158 size.add_bool(1, this->success);
2159 size.add_int32(1, this->error);
2160}
2162 buffer.encode_uint32(1, static_cast<uint32_t>(this->state));
2163 buffer.encode_uint32(2, static_cast<uint32_t>(this->mode));
2164 buffer.encode_uint32(3, static_cast<uint32_t>(this->configured_mode));
2165}
2167 size.add_uint32(1, static_cast<uint32_t>(this->state));
2168 size.add_uint32(1, static_cast<uint32_t>(this->mode));
2169 size.add_uint32(1, static_cast<uint32_t>(this->configured_mode));
2170}
2172 switch (field_id) {
2173 case 1:
2174 this->mode = static_cast<enums::BluetoothScannerMode>(value.as_uint32());
2175 break;
2176 default:
2177 return false;
2178 }
2179 return true;
2180}
2181#endif
2182#ifdef USE_VOICE_ASSISTANT
2184 switch (field_id) {
2185 case 1:
2186 this->subscribe = value.as_bool();
2187 break;
2188 case 2:
2189 this->flags = value.as_uint32();
2190 break;
2191 default:
2192 return false;
2193 }
2194 return true;
2195}
2197 buffer.encode_uint32(1, this->noise_suppression_level);
2198 buffer.encode_uint32(2, this->auto_gain);
2199 buffer.encode_float(3, this->volume_multiplier);
2200}
2202 size.add_uint32(1, this->noise_suppression_level);
2203 size.add_uint32(1, this->auto_gain);
2204 size.add_float(1, this->volume_multiplier);
2205}
2207 buffer.encode_bool(1, this->start);
2208 buffer.encode_string(2, this->conversation_id_ref_);
2209 buffer.encode_uint32(3, this->flags);
2210 buffer.encode_message(4, this->audio_settings);
2211 buffer.encode_string(5, this->wake_word_phrase_ref_);
2212}
2214 size.add_bool(1, this->start);
2215 size.add_length(1, this->conversation_id_ref_.size());
2216 size.add_uint32(1, this->flags);
2217 size.add_message_object(1, this->audio_settings);
2218 size.add_length(1, this->wake_word_phrase_ref_.size());
2219}
2221 switch (field_id) {
2222 case 1:
2223 this->port = value.as_uint32();
2224 break;
2225 case 2:
2226 this->error = value.as_bool();
2227 break;
2228 default:
2229 return false;
2230 }
2231 return true;
2232}
2234 switch (field_id) {
2235 case 1:
2236 this->name = value.as_string();
2237 break;
2238 case 2:
2239 this->value = value.as_string();
2240 break;
2241 default:
2242 return false;
2243 }
2244 return true;
2245}
2247 switch (field_id) {
2248 case 1:
2249 this->event_type = static_cast<enums::VoiceAssistantEvent>(value.as_uint32());
2250 break;
2251 default:
2252 return false;
2253 }
2254 return true;
2255}
2257 switch (field_id) {
2258 case 2:
2259 this->data.emplace_back();
2260 value.decode_to_message(this->data.back());
2261 break;
2262 default:
2263 return false;
2264 }
2265 return true;
2266}
2267bool VoiceAssistantAudio::decode_varint(uint32_t field_id, ProtoVarInt value) {
2268 switch (field_id) {
2269 case 2:
2270 this->end = value.as_bool();
2271 break;
2272 default:
2273 return false;
2274 }
2275 return true;
2276}
2278 switch (field_id) {
2279 case 1:
2280 this->data = value.as_string();
2281 break;
2282 default:
2283 return false;
2284 }
2285 return true;
2286}
2288 buffer.encode_bytes(1, this->data_ptr_, this->data_len_);
2289 buffer.encode_bool(2, this->end);
2290}
2292 size.add_length(1, this->data_len_);
2293 size.add_bool(1, this->end);
2294}
2296 switch (field_id) {
2297 case 1:
2298 this->event_type = static_cast<enums::VoiceAssistantTimerEvent>(value.as_uint32());
2299 break;
2300 case 4:
2301 this->total_seconds = value.as_uint32();
2302 break;
2303 case 5:
2304 this->seconds_left = value.as_uint32();
2305 break;
2306 case 6:
2307 this->is_active = value.as_bool();
2308 break;
2309 default:
2310 return false;
2311 }
2312 return true;
2313}
2315 switch (field_id) {
2316 case 2:
2317 this->timer_id = value.as_string();
2318 break;
2319 case 3:
2320 this->name = value.as_string();
2321 break;
2322 default:
2323 return false;
2324 }
2325 return true;
2326}
2328 switch (field_id) {
2329 case 4:
2330 this->start_conversation = value.as_bool();
2331 break;
2332 default:
2333 return false;
2334 }
2335 return true;
2336}
2338 switch (field_id) {
2339 case 1:
2340 this->media_id = value.as_string();
2341 break;
2342 case 2:
2343 this->text = value.as_string();
2344 break;
2345 case 3:
2346 this->preannounce_media_id = value.as_string();
2347 break;
2348 default:
2349 return false;
2350 }
2351 return true;
2352}
2356 buffer.encode_string(1, this->id_ref_);
2357 buffer.encode_string(2, this->wake_word_ref_);
2358 for (auto &it : this->trained_languages) {
2359 buffer.encode_string(3, it, true);
2360 }
2361}
2363 size.add_length(1, this->id_ref_.size());
2364 size.add_length(1, this->wake_word_ref_.size());
2365 if (!this->trained_languages.empty()) {
2366 for (const auto &it : this->trained_languages) {
2367 size.add_length_force(1, it.size());
2368 }
2369 }
2370}
2372 for (auto &it : this->available_wake_words) {
2373 buffer.encode_message(1, it, true);
2374 }
2375 for (const auto &it : *this->active_wake_words) {
2376 buffer.encode_string(2, it, true);
2377 }
2378 buffer.encode_uint32(3, this->max_active_wake_words);
2379}
2382 if (!this->active_wake_words->empty()) {
2383 for (const auto &it : *this->active_wake_words) {
2384 size.add_length_force(1, it.size());
2385 }
2386 }
2387 size.add_uint32(1, this->max_active_wake_words);
2388}
2390 switch (field_id) {
2391 case 1:
2392 this->active_wake_words.push_back(value.as_string());
2393 break;
2394 default:
2395 return false;
2396 }
2397 return true;
2398}
2399#endif
2400#ifdef USE_ALARM_CONTROL_PANEL
2402 buffer.encode_string(1, this->object_id_ref_);
2403 buffer.encode_fixed32(2, this->key);
2404 buffer.encode_string(3, this->name_ref_);
2405#ifdef USE_ENTITY_ICON
2406 buffer.encode_string(5, this->icon_ref_);
2407#endif
2408 buffer.encode_bool(6, this->disabled_by_default);
2409 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
2410 buffer.encode_uint32(8, this->supported_features);
2411 buffer.encode_bool(9, this->requires_code);
2412 buffer.encode_bool(10, this->requires_code_to_arm);
2413#ifdef USE_DEVICES
2414 buffer.encode_uint32(11, this->device_id);
2415#endif
2416}
2418 size.add_length(1, this->object_id_ref_.size());
2419 size.add_fixed32(1, this->key);
2420 size.add_length(1, this->name_ref_.size());
2421#ifdef USE_ENTITY_ICON
2422 size.add_length(1, this->icon_ref_.size());
2423#endif
2424 size.add_bool(1, this->disabled_by_default);
2425 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
2426 size.add_uint32(1, this->supported_features);
2427 size.add_bool(1, this->requires_code);
2428 size.add_bool(1, this->requires_code_to_arm);
2429#ifdef USE_DEVICES
2430 size.add_uint32(1, this->device_id);
2431#endif
2432}
2434 buffer.encode_fixed32(1, this->key);
2435 buffer.encode_uint32(2, static_cast<uint32_t>(this->state));
2436#ifdef USE_DEVICES
2437 buffer.encode_uint32(3, this->device_id);
2438#endif
2439}
2441 size.add_fixed32(1, this->key);
2442 size.add_uint32(1, static_cast<uint32_t>(this->state));
2443#ifdef USE_DEVICES
2444 size.add_uint32(1, this->device_id);
2445#endif
2446}
2448 switch (field_id) {
2449 case 2:
2450 this->command = static_cast<enums::AlarmControlPanelStateCommand>(value.as_uint32());
2451 break;
2452#ifdef USE_DEVICES
2453 case 4:
2454 this->device_id = value.as_uint32();
2455 break;
2456#endif
2457 default:
2458 return false;
2459 }
2460 return true;
2461}
2463 switch (field_id) {
2464 case 3:
2465 this->code = value.as_string();
2466 break;
2467 default:
2468 return false;
2469 }
2470 return true;
2471}
2473 switch (field_id) {
2474 case 1:
2475 this->key = value.as_fixed32();
2476 break;
2477 default:
2478 return false;
2479 }
2480 return true;
2481}
2482#endif
2483#ifdef USE_TEXT
2485 buffer.encode_string(1, this->object_id_ref_);
2486 buffer.encode_fixed32(2, this->key);
2487 buffer.encode_string(3, this->name_ref_);
2488#ifdef USE_ENTITY_ICON
2489 buffer.encode_string(5, this->icon_ref_);
2490#endif
2491 buffer.encode_bool(6, this->disabled_by_default);
2492 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
2493 buffer.encode_uint32(8, this->min_length);
2494 buffer.encode_uint32(9, this->max_length);
2495 buffer.encode_string(10, this->pattern_ref_);
2496 buffer.encode_uint32(11, static_cast<uint32_t>(this->mode));
2497#ifdef USE_DEVICES
2498 buffer.encode_uint32(12, this->device_id);
2499#endif
2500}
2502 size.add_length(1, this->object_id_ref_.size());
2503 size.add_fixed32(1, this->key);
2504 size.add_length(1, this->name_ref_.size());
2505#ifdef USE_ENTITY_ICON
2506 size.add_length(1, this->icon_ref_.size());
2507#endif
2508 size.add_bool(1, this->disabled_by_default);
2509 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
2510 size.add_uint32(1, this->min_length);
2511 size.add_uint32(1, this->max_length);
2512 size.add_length(1, this->pattern_ref_.size());
2513 size.add_uint32(1, static_cast<uint32_t>(this->mode));
2514#ifdef USE_DEVICES
2515 size.add_uint32(1, this->device_id);
2516#endif
2517}
2519 buffer.encode_fixed32(1, this->key);
2520 buffer.encode_string(2, this->state_ref_);
2521 buffer.encode_bool(3, this->missing_state);
2522#ifdef USE_DEVICES
2523 buffer.encode_uint32(4, this->device_id);
2524#endif
2525}
2527 size.add_fixed32(1, this->key);
2528 size.add_length(1, this->state_ref_.size());
2529 size.add_bool(1, this->missing_state);
2530#ifdef USE_DEVICES
2531 size.add_uint32(1, this->device_id);
2532#endif
2533}
2534bool TextCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
2535 switch (field_id) {
2536#ifdef USE_DEVICES
2537 case 3:
2538 this->device_id = value.as_uint32();
2539 break;
2540#endif
2541 default:
2542 return false;
2543 }
2544 return true;
2545}
2547 switch (field_id) {
2548 case 2:
2549 this->state = value.as_string();
2550 break;
2551 default:
2552 return false;
2553 }
2554 return true;
2555}
2556bool TextCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
2557 switch (field_id) {
2558 case 1:
2559 this->key = value.as_fixed32();
2560 break;
2561 default:
2562 return false;
2563 }
2564 return true;
2565}
2566#endif
2567#ifdef USE_DATETIME_DATE
2569 buffer.encode_string(1, this->object_id_ref_);
2570 buffer.encode_fixed32(2, this->key);
2571 buffer.encode_string(3, this->name_ref_);
2572#ifdef USE_ENTITY_ICON
2573 buffer.encode_string(5, this->icon_ref_);
2574#endif
2575 buffer.encode_bool(6, this->disabled_by_default);
2576 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
2577#ifdef USE_DEVICES
2578 buffer.encode_uint32(8, this->device_id);
2579#endif
2580}
2582 size.add_length(1, this->object_id_ref_.size());
2583 size.add_fixed32(1, this->key);
2584 size.add_length(1, this->name_ref_.size());
2585#ifdef USE_ENTITY_ICON
2586 size.add_length(1, this->icon_ref_.size());
2587#endif
2588 size.add_bool(1, this->disabled_by_default);
2589 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
2590#ifdef USE_DEVICES
2591 size.add_uint32(1, this->device_id);
2592#endif
2593}
2595 buffer.encode_fixed32(1, this->key);
2596 buffer.encode_bool(2, this->missing_state);
2597 buffer.encode_uint32(3, this->year);
2598 buffer.encode_uint32(4, this->month);
2599 buffer.encode_uint32(5, this->day);
2600#ifdef USE_DEVICES
2601 buffer.encode_uint32(6, this->device_id);
2602#endif
2603}
2605 size.add_fixed32(1, this->key);
2606 size.add_bool(1, this->missing_state);
2607 size.add_uint32(1, this->year);
2608 size.add_uint32(1, this->month);
2609 size.add_uint32(1, this->day);
2610#ifdef USE_DEVICES
2611 size.add_uint32(1, this->device_id);
2612#endif
2613}
2614bool DateCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
2615 switch (field_id) {
2616 case 2:
2617 this->year = value.as_uint32();
2618 break;
2619 case 3:
2620 this->month = value.as_uint32();
2621 break;
2622 case 4:
2623 this->day = value.as_uint32();
2624 break;
2625#ifdef USE_DEVICES
2626 case 5:
2627 this->device_id = value.as_uint32();
2628 break;
2629#endif
2630 default:
2631 return false;
2632 }
2633 return true;
2634}
2635bool DateCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
2636 switch (field_id) {
2637 case 1:
2638 this->key = value.as_fixed32();
2639 break;
2640 default:
2641 return false;
2642 }
2643 return true;
2644}
2645#endif
2646#ifdef USE_DATETIME_TIME
2648 buffer.encode_string(1, this->object_id_ref_);
2649 buffer.encode_fixed32(2, this->key);
2650 buffer.encode_string(3, this->name_ref_);
2651#ifdef USE_ENTITY_ICON
2652 buffer.encode_string(5, this->icon_ref_);
2653#endif
2654 buffer.encode_bool(6, this->disabled_by_default);
2655 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
2656#ifdef USE_DEVICES
2657 buffer.encode_uint32(8, this->device_id);
2658#endif
2659}
2661 size.add_length(1, this->object_id_ref_.size());
2662 size.add_fixed32(1, this->key);
2663 size.add_length(1, this->name_ref_.size());
2664#ifdef USE_ENTITY_ICON
2665 size.add_length(1, this->icon_ref_.size());
2666#endif
2667 size.add_bool(1, this->disabled_by_default);
2668 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
2669#ifdef USE_DEVICES
2670 size.add_uint32(1, this->device_id);
2671#endif
2672}
2674 buffer.encode_fixed32(1, this->key);
2675 buffer.encode_bool(2, this->missing_state);
2676 buffer.encode_uint32(3, this->hour);
2677 buffer.encode_uint32(4, this->minute);
2678 buffer.encode_uint32(5, this->second);
2679#ifdef USE_DEVICES
2680 buffer.encode_uint32(6, this->device_id);
2681#endif
2682}
2684 size.add_fixed32(1, this->key);
2685 size.add_bool(1, this->missing_state);
2686 size.add_uint32(1, this->hour);
2687 size.add_uint32(1, this->minute);
2688 size.add_uint32(1, this->second);
2689#ifdef USE_DEVICES
2690 size.add_uint32(1, this->device_id);
2691#endif
2692}
2693bool TimeCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
2694 switch (field_id) {
2695 case 2:
2696 this->hour = value.as_uint32();
2697 break;
2698 case 3:
2699 this->minute = value.as_uint32();
2700 break;
2701 case 4:
2702 this->second = value.as_uint32();
2703 break;
2704#ifdef USE_DEVICES
2705 case 5:
2706 this->device_id = value.as_uint32();
2707 break;
2708#endif
2709 default:
2710 return false;
2711 }
2712 return true;
2713}
2714bool TimeCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
2715 switch (field_id) {
2716 case 1:
2717 this->key = value.as_fixed32();
2718 break;
2719 default:
2720 return false;
2721 }
2722 return true;
2723}
2724#endif
2725#ifdef USE_EVENT
2727 buffer.encode_string(1, this->object_id_ref_);
2728 buffer.encode_fixed32(2, this->key);
2729 buffer.encode_string(3, this->name_ref_);
2730#ifdef USE_ENTITY_ICON
2731 buffer.encode_string(5, this->icon_ref_);
2732#endif
2733 buffer.encode_bool(6, this->disabled_by_default);
2734 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
2735 buffer.encode_string(8, this->device_class_ref_);
2736 for (auto &it : this->event_types) {
2737 buffer.encode_string(9, it, true);
2738 }
2739#ifdef USE_DEVICES
2740 buffer.encode_uint32(10, this->device_id);
2741#endif
2742}
2744 size.add_length(1, this->object_id_ref_.size());
2745 size.add_fixed32(1, this->key);
2746 size.add_length(1, this->name_ref_.size());
2747#ifdef USE_ENTITY_ICON
2748 size.add_length(1, this->icon_ref_.size());
2749#endif
2750 size.add_bool(1, this->disabled_by_default);
2751 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
2752 size.add_length(1, this->device_class_ref_.size());
2753 if (!this->event_types.empty()) {
2754 for (const auto &it : this->event_types) {
2755 size.add_length_force(1, it.size());
2756 }
2757 }
2758#ifdef USE_DEVICES
2759 size.add_uint32(1, this->device_id);
2760#endif
2761}
2763 buffer.encode_fixed32(1, this->key);
2764 buffer.encode_string(2, this->event_type_ref_);
2765#ifdef USE_DEVICES
2766 buffer.encode_uint32(3, this->device_id);
2767#endif
2768}
2770 size.add_fixed32(1, this->key);
2771 size.add_length(1, this->event_type_ref_.size());
2772#ifdef USE_DEVICES
2773 size.add_uint32(1, this->device_id);
2774#endif
2775}
2776#endif
2777#ifdef USE_VALVE
2779 buffer.encode_string(1, this->object_id_ref_);
2780 buffer.encode_fixed32(2, this->key);
2781 buffer.encode_string(3, this->name_ref_);
2782#ifdef USE_ENTITY_ICON
2783 buffer.encode_string(5, this->icon_ref_);
2784#endif
2785 buffer.encode_bool(6, this->disabled_by_default);
2786 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
2787 buffer.encode_string(8, this->device_class_ref_);
2788 buffer.encode_bool(9, this->assumed_state);
2789 buffer.encode_bool(10, this->supports_position);
2790 buffer.encode_bool(11, this->supports_stop);
2791#ifdef USE_DEVICES
2792 buffer.encode_uint32(12, this->device_id);
2793#endif
2794}
2796 size.add_length(1, this->object_id_ref_.size());
2797 size.add_fixed32(1, this->key);
2798 size.add_length(1, this->name_ref_.size());
2799#ifdef USE_ENTITY_ICON
2800 size.add_length(1, this->icon_ref_.size());
2801#endif
2802 size.add_bool(1, this->disabled_by_default);
2803 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
2804 size.add_length(1, this->device_class_ref_.size());
2805 size.add_bool(1, this->assumed_state);
2806 size.add_bool(1, this->supports_position);
2807 size.add_bool(1, this->supports_stop);
2808#ifdef USE_DEVICES
2809 size.add_uint32(1, this->device_id);
2810#endif
2811}
2813 buffer.encode_fixed32(1, this->key);
2814 buffer.encode_float(2, this->position);
2815 buffer.encode_uint32(3, static_cast<uint32_t>(this->current_operation));
2816#ifdef USE_DEVICES
2817 buffer.encode_uint32(4, this->device_id);
2818#endif
2819}
2821 size.add_fixed32(1, this->key);
2822 size.add_float(1, this->position);
2823 size.add_uint32(1, static_cast<uint32_t>(this->current_operation));
2824#ifdef USE_DEVICES
2825 size.add_uint32(1, this->device_id);
2826#endif
2827}
2828bool ValveCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
2829 switch (field_id) {
2830 case 2:
2831 this->has_position = value.as_bool();
2832 break;
2833 case 4:
2834 this->stop = value.as_bool();
2835 break;
2836#ifdef USE_DEVICES
2837 case 5:
2838 this->device_id = value.as_uint32();
2839 break;
2840#endif
2841 default:
2842 return false;
2843 }
2844 return true;
2845}
2846bool ValveCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
2847 switch (field_id) {
2848 case 1:
2849 this->key = value.as_fixed32();
2850 break;
2851 case 3:
2852 this->position = value.as_float();
2853 break;
2854 default:
2855 return false;
2856 }
2857 return true;
2858}
2859#endif
2860#ifdef USE_DATETIME_DATETIME
2862 buffer.encode_string(1, this->object_id_ref_);
2863 buffer.encode_fixed32(2, this->key);
2864 buffer.encode_string(3, this->name_ref_);
2865#ifdef USE_ENTITY_ICON
2866 buffer.encode_string(5, this->icon_ref_);
2867#endif
2868 buffer.encode_bool(6, this->disabled_by_default);
2869 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
2870#ifdef USE_DEVICES
2871 buffer.encode_uint32(8, this->device_id);
2872#endif
2873}
2875 size.add_length(1, this->object_id_ref_.size());
2876 size.add_fixed32(1, this->key);
2877 size.add_length(1, this->name_ref_.size());
2878#ifdef USE_ENTITY_ICON
2879 size.add_length(1, this->icon_ref_.size());
2880#endif
2881 size.add_bool(1, this->disabled_by_default);
2882 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
2883#ifdef USE_DEVICES
2884 size.add_uint32(1, this->device_id);
2885#endif
2886}
2888 buffer.encode_fixed32(1, this->key);
2889 buffer.encode_bool(2, this->missing_state);
2890 buffer.encode_fixed32(3, this->epoch_seconds);
2891#ifdef USE_DEVICES
2892 buffer.encode_uint32(4, this->device_id);
2893#endif
2894}
2896 size.add_fixed32(1, this->key);
2897 size.add_bool(1, this->missing_state);
2898 size.add_fixed32(1, this->epoch_seconds);
2899#ifdef USE_DEVICES
2900 size.add_uint32(1, this->device_id);
2901#endif
2902}
2904 switch (field_id) {
2905#ifdef USE_DEVICES
2906 case 3:
2907 this->device_id = value.as_uint32();
2908 break;
2909#endif
2910 default:
2911 return false;
2912 }
2913 return true;
2914}
2915bool DateTimeCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
2916 switch (field_id) {
2917 case 1:
2918 this->key = value.as_fixed32();
2919 break;
2920 case 2:
2921 this->epoch_seconds = value.as_fixed32();
2922 break;
2923 default:
2924 return false;
2925 }
2926 return true;
2927}
2928#endif
2929#ifdef USE_UPDATE
2931 buffer.encode_string(1, this->object_id_ref_);
2932 buffer.encode_fixed32(2, this->key);
2933 buffer.encode_string(3, this->name_ref_);
2934#ifdef USE_ENTITY_ICON
2935 buffer.encode_string(5, this->icon_ref_);
2936#endif
2937 buffer.encode_bool(6, this->disabled_by_default);
2938 buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
2939 buffer.encode_string(8, this->device_class_ref_);
2940#ifdef USE_DEVICES
2941 buffer.encode_uint32(9, this->device_id);
2942#endif
2943}
2945 size.add_length(1, this->object_id_ref_.size());
2946 size.add_fixed32(1, this->key);
2947 size.add_length(1, this->name_ref_.size());
2948#ifdef USE_ENTITY_ICON
2949 size.add_length(1, this->icon_ref_.size());
2950#endif
2951 size.add_bool(1, this->disabled_by_default);
2952 size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
2953 size.add_length(1, this->device_class_ref_.size());
2954#ifdef USE_DEVICES
2955 size.add_uint32(1, this->device_id);
2956#endif
2957}
2959 buffer.encode_fixed32(1, this->key);
2960 buffer.encode_bool(2, this->missing_state);
2961 buffer.encode_bool(3, this->in_progress);
2962 buffer.encode_bool(4, this->has_progress);
2963 buffer.encode_float(5, this->progress);
2964 buffer.encode_string(6, this->current_version_ref_);
2965 buffer.encode_string(7, this->latest_version_ref_);
2966 buffer.encode_string(8, this->title_ref_);
2967 buffer.encode_string(9, this->release_summary_ref_);
2968 buffer.encode_string(10, this->release_url_ref_);
2969#ifdef USE_DEVICES
2970 buffer.encode_uint32(11, this->device_id);
2971#endif
2972}
2974 size.add_fixed32(1, this->key);
2975 size.add_bool(1, this->missing_state);
2976 size.add_bool(1, this->in_progress);
2977 size.add_bool(1, this->has_progress);
2978 size.add_float(1, this->progress);
2979 size.add_length(1, this->current_version_ref_.size());
2980 size.add_length(1, this->latest_version_ref_.size());
2981 size.add_length(1, this->title_ref_.size());
2982 size.add_length(1, this->release_summary_ref_.size());
2983 size.add_length(1, this->release_url_ref_.size());
2984#ifdef USE_DEVICES
2985 size.add_uint32(1, this->device_id);
2986#endif
2987}
2988bool UpdateCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
2989 switch (field_id) {
2990 case 2:
2991 this->command = static_cast<enums::UpdateCommand>(value.as_uint32());
2992 break;
2993#ifdef USE_DEVICES
2994 case 3:
2995 this->device_id = value.as_uint32();
2996 break;
2997#endif
2998 default:
2999 return false;
3000 }
3001 return true;
3002}
3003bool UpdateCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
3004 switch (field_id) {
3005 case 1:
3006 this->key = value.as_fixed32();
3007 break;
3008 default:
3009 return false;
3010 }
3011 return true;
3012}
3013#endif
3014
3015} // 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:2472
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2447
enums::AlarmControlPanelStateCommand command
Definition api_pb2.h:2529
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2462
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2440
enums::AlarmControlPanelState state
Definition api_pb2.h:2513
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2433
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:2087
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2096
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2156
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2151
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1882
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1888
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2136
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2131
enums::BluetoothDeviceRequestType request_type
Definition api_pb2.h:1813
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1863
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2141
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2146
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1920
std::vector< BluetoothGATTDescriptor > descriptors
Definition api_pb2.h:1875
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1932
std::array< uint64_t, 2 > uuid
Definition api_pb2.h:1872
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1912
std::array< uint64_t, 2 > uuid
Definition api_pb2.h:1859
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1904
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2105
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2110
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1972
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1975
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1894
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1968
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1962
std::vector< BluetoothGATTService > services
Definition api_pb2.h:1907
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2077
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2082
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2061
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2127
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2123
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2025
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1976
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1989
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1994
std::vector< BluetoothGATTCharacteristic > characteristics
Definition api_pb2.h:1889
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1953
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1942
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:2051
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2038
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2015
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1999
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2119
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2115
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1847
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1841
std::array< BluetoothLERawAdvertisement, BLUETOOTH_PROXY_ADVERTISEMENT_BATCH_SIZE > advertisements
Definition api_pb2.h:1795
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1853
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1858
enums::BluetoothScannerMode mode
Definition api_pb2.h:2239
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2171
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2161
enums::BluetoothScannerMode mode
Definition api_pb2.h:2222
enums::BluetoothScannerState state
Definition api_pb2.h:2221
enums::BluetoothScannerMode configured_mode
Definition api_pb2.h:2223
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2166
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1686
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:1698
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1058
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1050
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1042
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:1274
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:1207
enums::ClimatePreset preset
Definition api_pb2.h:1402
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:1261
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:1169
enums::ClimatePreset preset
Definition api_pb2.h:1367
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1188
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:2635
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2614
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2594
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2604
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:2915
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2903
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2895
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2887
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:2769
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2762
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:967
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:945
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:980
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:1004
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:993
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:914
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:904
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:2417
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2401
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:1672
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1658
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1029
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1016
const std::set< std::string > * supported_custom_presets
Definition api_pb2.h:1336
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1115
const std::set< climate::ClimateSwingMode > * supported_swing_modes
Definition api_pb2.h:1333
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1073
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:2568
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2581
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2874
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2861
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2743
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2726
std::vector< std::string > event_types
Definition api_pb2.h:2716
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:1570
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1587
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1724
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1742
std::vector< MediaPlayerSupportedFormat > supported_formats
Definition api_pb2.h:1704
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1317
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1298
const std::vector< std::string > * options
Definition api_pb2.h:1483
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1395
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1379
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:929
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:925
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:940
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:933
std::vector< ListEntitiesServicesArgument > args
Definition api_pb2.h:1215
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1463
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1481
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:2501
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2484
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:2647
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2660
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2944
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2930
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2795
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2778
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1618
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:1646
enums::LockCommand command
Definition api_pb2.h:1632
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:1636
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1611
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1604
enums::MediaPlayerCommand command
Definition api_pb2.h:1740
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:1816
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1776
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:1806
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1767
enums::MediaPlayerState state
Definition api_pb2.h:1721
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1758
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1717
enums::MediaPlayerFormatPurpose purpose
Definition api_pb2.h:1686
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1710
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:1364
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1352
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1336
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1344
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:1441
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1429
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:1451
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1413
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1421
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:1545
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1515
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:1555
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:1508
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:1501
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:1831
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:2183
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:2546
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:2556
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2534
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:2526
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2518
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:2714
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2693
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2683
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2673
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:3003
enums::UpdateCommand command
Definition api_pb2.h:2904
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2988
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2973
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2958
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2828
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition api_pb2.cpp:2846
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2812
enums::ValveOperation current_operation
Definition api_pb2.h:2772
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2820
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2354
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2353
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2337
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2327
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2287
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2291
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2277
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2267
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2196
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2201
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2380
std::vector< VoiceAssistantWakeWord > available_wake_words
Definition api_pb2.h:2460
const std::vector< std::string > * active_wake_words
Definition api_pb2.h:2461
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2371
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2233
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2256
enums::VoiceAssistantEvent event_type
Definition api_pb2.h:2334
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2246
std::vector< VoiceAssistantEventData > data
Definition api_pb2.h:2335
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2213
VoiceAssistantAudioSettings audio_settings
Definition api_pb2.h:2289
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2206
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2220
std::vector< std::string > active_wake_words
Definition api_pb2.h:2478
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2389
enums::VoiceAssistantTimerEvent event_type
Definition api_pb2.h:2376
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition api_pb2.cpp:2314
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition api_pb2.cpp:2295
void encode(ProtoWriteBuffer buffer) const override
Definition api_pb2.cpp:2355
void calculate_size(ProtoSize &size) const override
Definition api_pb2.cpp:2362
std::vector< std::string > trained_languages
Definition api_pb2.h:2431