ESPHome  2024.11.1
api_pb2.cpp
Go to the documentation of this file.
1 // This file was automatically generated with a tool.
2 // See scripts/api_protobuf/api_protobuf.py
3 #include "api_pb2.h"
4 #include "esphome/core/log.h"
5 
6 #include <cinttypes>
7 
8 namespace esphome {
9 namespace api {
10 
11 #ifdef HAS_PROTO_MESSAGE_DUMP
12 template<> const char *proto_enum_to_string<enums::EntityCategory>(enums::EntityCategory value) {
13  switch (value) {
15  return "ENTITY_CATEGORY_NONE";
17  return "ENTITY_CATEGORY_CONFIG";
19  return "ENTITY_CATEGORY_DIAGNOSTIC";
20  default:
21  return "UNKNOWN";
22  }
23 }
24 #endif
25 #ifdef HAS_PROTO_MESSAGE_DUMP
26 template<> const char *proto_enum_to_string<enums::LegacyCoverState>(enums::LegacyCoverState value) {
27  switch (value) {
29  return "LEGACY_COVER_STATE_OPEN";
31  return "LEGACY_COVER_STATE_CLOSED";
32  default:
33  return "UNKNOWN";
34  }
35 }
36 #endif
37 #ifdef HAS_PROTO_MESSAGE_DUMP
38 template<> const char *proto_enum_to_string<enums::CoverOperation>(enums::CoverOperation value) {
39  switch (value) {
41  return "COVER_OPERATION_IDLE";
43  return "COVER_OPERATION_IS_OPENING";
45  return "COVER_OPERATION_IS_CLOSING";
46  default:
47  return "UNKNOWN";
48  }
49 }
50 #endif
51 #ifdef HAS_PROTO_MESSAGE_DUMP
52 template<> const char *proto_enum_to_string<enums::LegacyCoverCommand>(enums::LegacyCoverCommand value) {
53  switch (value) {
55  return "LEGACY_COVER_COMMAND_OPEN";
57  return "LEGACY_COVER_COMMAND_CLOSE";
59  return "LEGACY_COVER_COMMAND_STOP";
60  default:
61  return "UNKNOWN";
62  }
63 }
64 #endif
65 #ifdef HAS_PROTO_MESSAGE_DUMP
66 template<> const char *proto_enum_to_string<enums::FanSpeed>(enums::FanSpeed value) {
67  switch (value) {
69  return "FAN_SPEED_LOW";
71  return "FAN_SPEED_MEDIUM";
73  return "FAN_SPEED_HIGH";
74  default:
75  return "UNKNOWN";
76  }
77 }
78 #endif
79 #ifdef HAS_PROTO_MESSAGE_DUMP
80 template<> const char *proto_enum_to_string<enums::FanDirection>(enums::FanDirection value) {
81  switch (value) {
83  return "FAN_DIRECTION_FORWARD";
85  return "FAN_DIRECTION_REVERSE";
86  default:
87  return "UNKNOWN";
88  }
89 }
90 #endif
91 #ifdef HAS_PROTO_MESSAGE_DUMP
92 template<> const char *proto_enum_to_string<enums::ColorMode>(enums::ColorMode value) {
93  switch (value) {
95  return "COLOR_MODE_UNKNOWN";
97  return "COLOR_MODE_ON_OFF";
99  return "COLOR_MODE_BRIGHTNESS";
101  return "COLOR_MODE_WHITE";
103  return "COLOR_MODE_COLOR_TEMPERATURE";
105  return "COLOR_MODE_COLD_WARM_WHITE";
107  return "COLOR_MODE_RGB";
109  return "COLOR_MODE_RGB_WHITE";
111  return "COLOR_MODE_RGB_COLOR_TEMPERATURE";
113  return "COLOR_MODE_RGB_COLD_WARM_WHITE";
114  default:
115  return "UNKNOWN";
116  }
117 }
118 #endif
119 #ifdef HAS_PROTO_MESSAGE_DUMP
120 template<> const char *proto_enum_to_string<enums::SensorStateClass>(enums::SensorStateClass value) {
121  switch (value) {
123  return "STATE_CLASS_NONE";
125  return "STATE_CLASS_MEASUREMENT";
127  return "STATE_CLASS_TOTAL_INCREASING";
129  return "STATE_CLASS_TOTAL";
130  default:
131  return "UNKNOWN";
132  }
133 }
134 #endif
135 #ifdef HAS_PROTO_MESSAGE_DUMP
136 template<> const char *proto_enum_to_string<enums::SensorLastResetType>(enums::SensorLastResetType value) {
137  switch (value) {
139  return "LAST_RESET_NONE";
141  return "LAST_RESET_NEVER";
143  return "LAST_RESET_AUTO";
144  default:
145  return "UNKNOWN";
146  }
147 }
148 #endif
149 #ifdef HAS_PROTO_MESSAGE_DUMP
150 template<> const char *proto_enum_to_string<enums::LogLevel>(enums::LogLevel value) {
151  switch (value) {
153  return "LOG_LEVEL_NONE";
155  return "LOG_LEVEL_ERROR";
157  return "LOG_LEVEL_WARN";
159  return "LOG_LEVEL_INFO";
161  return "LOG_LEVEL_CONFIG";
163  return "LOG_LEVEL_DEBUG";
165  return "LOG_LEVEL_VERBOSE";
167  return "LOG_LEVEL_VERY_VERBOSE";
168  default:
169  return "UNKNOWN";
170  }
171 }
172 #endif
173 #ifdef HAS_PROTO_MESSAGE_DUMP
174 template<> const char *proto_enum_to_string<enums::ServiceArgType>(enums::ServiceArgType value) {
175  switch (value) {
177  return "SERVICE_ARG_TYPE_BOOL";
179  return "SERVICE_ARG_TYPE_INT";
181  return "SERVICE_ARG_TYPE_FLOAT";
183  return "SERVICE_ARG_TYPE_STRING";
185  return "SERVICE_ARG_TYPE_BOOL_ARRAY";
187  return "SERVICE_ARG_TYPE_INT_ARRAY";
189  return "SERVICE_ARG_TYPE_FLOAT_ARRAY";
191  return "SERVICE_ARG_TYPE_STRING_ARRAY";
192  default:
193  return "UNKNOWN";
194  }
195 }
196 #endif
197 #ifdef HAS_PROTO_MESSAGE_DUMP
198 template<> const char *proto_enum_to_string<enums::ClimateMode>(enums::ClimateMode value) {
199  switch (value) {
201  return "CLIMATE_MODE_OFF";
203  return "CLIMATE_MODE_HEAT_COOL";
205  return "CLIMATE_MODE_COOL";
207  return "CLIMATE_MODE_HEAT";
209  return "CLIMATE_MODE_FAN_ONLY";
211  return "CLIMATE_MODE_DRY";
213  return "CLIMATE_MODE_AUTO";
214  default:
215  return "UNKNOWN";
216  }
217 }
218 #endif
219 #ifdef HAS_PROTO_MESSAGE_DUMP
220 template<> const char *proto_enum_to_string<enums::ClimateFanMode>(enums::ClimateFanMode value) {
221  switch (value) {
223  return "CLIMATE_FAN_ON";
225  return "CLIMATE_FAN_OFF";
227  return "CLIMATE_FAN_AUTO";
229  return "CLIMATE_FAN_LOW";
231  return "CLIMATE_FAN_MEDIUM";
233  return "CLIMATE_FAN_HIGH";
235  return "CLIMATE_FAN_MIDDLE";
237  return "CLIMATE_FAN_FOCUS";
239  return "CLIMATE_FAN_DIFFUSE";
241  return "CLIMATE_FAN_QUIET";
242  default:
243  return "UNKNOWN";
244  }
245 }
246 #endif
247 #ifdef HAS_PROTO_MESSAGE_DUMP
248 template<> const char *proto_enum_to_string<enums::ClimateSwingMode>(enums::ClimateSwingMode value) {
249  switch (value) {
251  return "CLIMATE_SWING_OFF";
253  return "CLIMATE_SWING_BOTH";
255  return "CLIMATE_SWING_VERTICAL";
257  return "CLIMATE_SWING_HORIZONTAL";
258  default:
259  return "UNKNOWN";
260  }
261 }
262 #endif
263 #ifdef HAS_PROTO_MESSAGE_DUMP
264 template<> const char *proto_enum_to_string<enums::ClimateAction>(enums::ClimateAction value) {
265  switch (value) {
267  return "CLIMATE_ACTION_OFF";
269  return "CLIMATE_ACTION_COOLING";
271  return "CLIMATE_ACTION_HEATING";
273  return "CLIMATE_ACTION_IDLE";
275  return "CLIMATE_ACTION_DRYING";
277  return "CLIMATE_ACTION_FAN";
278  default:
279  return "UNKNOWN";
280  }
281 }
282 #endif
283 #ifdef HAS_PROTO_MESSAGE_DUMP
284 template<> const char *proto_enum_to_string<enums::ClimatePreset>(enums::ClimatePreset value) {
285  switch (value) {
287  return "CLIMATE_PRESET_NONE";
289  return "CLIMATE_PRESET_HOME";
291  return "CLIMATE_PRESET_AWAY";
293  return "CLIMATE_PRESET_BOOST";
295  return "CLIMATE_PRESET_COMFORT";
297  return "CLIMATE_PRESET_ECO";
299  return "CLIMATE_PRESET_SLEEP";
301  return "CLIMATE_PRESET_ACTIVITY";
302  default:
303  return "UNKNOWN";
304  }
305 }
306 #endif
307 #ifdef HAS_PROTO_MESSAGE_DUMP
308 template<> const char *proto_enum_to_string<enums::NumberMode>(enums::NumberMode value) {
309  switch (value) {
311  return "NUMBER_MODE_AUTO";
313  return "NUMBER_MODE_BOX";
315  return "NUMBER_MODE_SLIDER";
316  default:
317  return "UNKNOWN";
318  }
319 }
320 #endif
321 #ifdef HAS_PROTO_MESSAGE_DUMP
322 template<> const char *proto_enum_to_string<enums::LockState>(enums::LockState value) {
323  switch (value) {
325  return "LOCK_STATE_NONE";
327  return "LOCK_STATE_LOCKED";
329  return "LOCK_STATE_UNLOCKED";
331  return "LOCK_STATE_JAMMED";
333  return "LOCK_STATE_LOCKING";
335  return "LOCK_STATE_UNLOCKING";
336  default:
337  return "UNKNOWN";
338  }
339 }
340 #endif
341 #ifdef HAS_PROTO_MESSAGE_DUMP
342 template<> const char *proto_enum_to_string<enums::LockCommand>(enums::LockCommand value) {
343  switch (value) {
344  case enums::LOCK_UNLOCK:
345  return "LOCK_UNLOCK";
346  case enums::LOCK_LOCK:
347  return "LOCK_LOCK";
348  case enums::LOCK_OPEN:
349  return "LOCK_OPEN";
350  default:
351  return "UNKNOWN";
352  }
353 }
354 #endif
355 #ifdef HAS_PROTO_MESSAGE_DUMP
356 template<> const char *proto_enum_to_string<enums::MediaPlayerState>(enums::MediaPlayerState value) {
357  switch (value) {
359  return "MEDIA_PLAYER_STATE_NONE";
361  return "MEDIA_PLAYER_STATE_IDLE";
363  return "MEDIA_PLAYER_STATE_PLAYING";
365  return "MEDIA_PLAYER_STATE_PAUSED";
366  default:
367  return "UNKNOWN";
368  }
369 }
370 #endif
371 #ifdef HAS_PROTO_MESSAGE_DUMP
372 template<> const char *proto_enum_to_string<enums::MediaPlayerCommand>(enums::MediaPlayerCommand value) {
373  switch (value) {
375  return "MEDIA_PLAYER_COMMAND_PLAY";
377  return "MEDIA_PLAYER_COMMAND_PAUSE";
379  return "MEDIA_PLAYER_COMMAND_STOP";
381  return "MEDIA_PLAYER_COMMAND_MUTE";
383  return "MEDIA_PLAYER_COMMAND_UNMUTE";
384  default:
385  return "UNKNOWN";
386  }
387 }
388 #endif
389 #ifdef HAS_PROTO_MESSAGE_DUMP
390 template<> const char *proto_enum_to_string<enums::MediaPlayerFormatPurpose>(enums::MediaPlayerFormatPurpose value) {
391  switch (value) {
393  return "MEDIA_PLAYER_FORMAT_PURPOSE_DEFAULT";
395  return "MEDIA_PLAYER_FORMAT_PURPOSE_ANNOUNCEMENT";
396  default:
397  return "UNKNOWN";
398  }
399 }
400 #endif
401 #ifdef HAS_PROTO_MESSAGE_DUMP
402 template<>
403 const char *proto_enum_to_string<enums::BluetoothDeviceRequestType>(enums::BluetoothDeviceRequestType value) {
404  switch (value) {
406  return "BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT";
408  return "BLUETOOTH_DEVICE_REQUEST_TYPE_DISCONNECT";
410  return "BLUETOOTH_DEVICE_REQUEST_TYPE_PAIR";
412  return "BLUETOOTH_DEVICE_REQUEST_TYPE_UNPAIR";
414  return "BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT_V3_WITH_CACHE";
416  return "BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT_V3_WITHOUT_CACHE";
418  return "BLUETOOTH_DEVICE_REQUEST_TYPE_CLEAR_CACHE";
419  default:
420  return "UNKNOWN";
421  }
422 }
423 #endif
424 #ifdef HAS_PROTO_MESSAGE_DUMP
425 template<>
426 const char *proto_enum_to_string<enums::VoiceAssistantSubscribeFlag>(enums::VoiceAssistantSubscribeFlag value) {
427  switch (value) {
429  return "VOICE_ASSISTANT_SUBSCRIBE_NONE";
431  return "VOICE_ASSISTANT_SUBSCRIBE_API_AUDIO";
432  default:
433  return "UNKNOWN";
434  }
435 }
436 #endif
437 #ifdef HAS_PROTO_MESSAGE_DUMP
438 template<> const char *proto_enum_to_string<enums::VoiceAssistantRequestFlag>(enums::VoiceAssistantRequestFlag value) {
439  switch (value) {
441  return "VOICE_ASSISTANT_REQUEST_NONE";
443  return "VOICE_ASSISTANT_REQUEST_USE_VAD";
445  return "VOICE_ASSISTANT_REQUEST_USE_WAKE_WORD";
446  default:
447  return "UNKNOWN";
448  }
449 }
450 #endif
451 #ifdef HAS_PROTO_MESSAGE_DUMP
452 template<> const char *proto_enum_to_string<enums::VoiceAssistantEvent>(enums::VoiceAssistantEvent value) {
453  switch (value) {
455  return "VOICE_ASSISTANT_ERROR";
457  return "VOICE_ASSISTANT_RUN_START";
459  return "VOICE_ASSISTANT_RUN_END";
461  return "VOICE_ASSISTANT_STT_START";
463  return "VOICE_ASSISTANT_STT_END";
465  return "VOICE_ASSISTANT_INTENT_START";
467  return "VOICE_ASSISTANT_INTENT_END";
469  return "VOICE_ASSISTANT_TTS_START";
471  return "VOICE_ASSISTANT_TTS_END";
473  return "VOICE_ASSISTANT_WAKE_WORD_START";
475  return "VOICE_ASSISTANT_WAKE_WORD_END";
477  return "VOICE_ASSISTANT_STT_VAD_START";
479  return "VOICE_ASSISTANT_STT_VAD_END";
481  return "VOICE_ASSISTANT_TTS_STREAM_START";
483  return "VOICE_ASSISTANT_TTS_STREAM_END";
484  default:
485  return "UNKNOWN";
486  }
487 }
488 #endif
489 #ifdef HAS_PROTO_MESSAGE_DUMP
490 template<> const char *proto_enum_to_string<enums::VoiceAssistantTimerEvent>(enums::VoiceAssistantTimerEvent value) {
491  switch (value) {
493  return "VOICE_ASSISTANT_TIMER_STARTED";
495  return "VOICE_ASSISTANT_TIMER_UPDATED";
497  return "VOICE_ASSISTANT_TIMER_CANCELLED";
499  return "VOICE_ASSISTANT_TIMER_FINISHED";
500  default:
501  return "UNKNOWN";
502  }
503 }
504 #endif
505 #ifdef HAS_PROTO_MESSAGE_DUMP
506 template<> const char *proto_enum_to_string<enums::AlarmControlPanelState>(enums::AlarmControlPanelState value) {
507  switch (value) {
509  return "ALARM_STATE_DISARMED";
511  return "ALARM_STATE_ARMED_HOME";
513  return "ALARM_STATE_ARMED_AWAY";
515  return "ALARM_STATE_ARMED_NIGHT";
517  return "ALARM_STATE_ARMED_VACATION";
519  return "ALARM_STATE_ARMED_CUSTOM_BYPASS";
521  return "ALARM_STATE_PENDING";
523  return "ALARM_STATE_ARMING";
525  return "ALARM_STATE_DISARMING";
527  return "ALARM_STATE_TRIGGERED";
528  default:
529  return "UNKNOWN";
530  }
531 }
532 #endif
533 #ifdef HAS_PROTO_MESSAGE_DUMP
534 template<>
535 const char *proto_enum_to_string<enums::AlarmControlPanelStateCommand>(enums::AlarmControlPanelStateCommand value) {
536  switch (value) {
538  return "ALARM_CONTROL_PANEL_DISARM";
540  return "ALARM_CONTROL_PANEL_ARM_AWAY";
542  return "ALARM_CONTROL_PANEL_ARM_HOME";
544  return "ALARM_CONTROL_PANEL_ARM_NIGHT";
546  return "ALARM_CONTROL_PANEL_ARM_VACATION";
548  return "ALARM_CONTROL_PANEL_ARM_CUSTOM_BYPASS";
550  return "ALARM_CONTROL_PANEL_TRIGGER";
551  default:
552  return "UNKNOWN";
553  }
554 }
555 #endif
556 #ifdef HAS_PROTO_MESSAGE_DUMP
557 template<> const char *proto_enum_to_string<enums::TextMode>(enums::TextMode value) {
558  switch (value) {
560  return "TEXT_MODE_TEXT";
562  return "TEXT_MODE_PASSWORD";
563  default:
564  return "UNKNOWN";
565  }
566 }
567 #endif
568 #ifdef HAS_PROTO_MESSAGE_DUMP
569 template<> const char *proto_enum_to_string<enums::ValveOperation>(enums::ValveOperation value) {
570  switch (value) {
572  return "VALVE_OPERATION_IDLE";
574  return "VALVE_OPERATION_IS_OPENING";
576  return "VALVE_OPERATION_IS_CLOSING";
577  default:
578  return "UNKNOWN";
579  }
580 }
581 #endif
582 #ifdef HAS_PROTO_MESSAGE_DUMP
583 template<> const char *proto_enum_to_string<enums::UpdateCommand>(enums::UpdateCommand value) {
584  switch (value) {
586  return "UPDATE_COMMAND_NONE";
588  return "UPDATE_COMMAND_UPDATE";
590  return "UPDATE_COMMAND_CHECK";
591  default:
592  return "UNKNOWN";
593  }
594 }
595 #endif
596 bool HelloRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
597  switch (field_id) {
598  case 2: {
599  this->api_version_major = value.as_uint32();
600  return true;
601  }
602  case 3: {
603  this->api_version_minor = value.as_uint32();
604  return true;
605  }
606  default:
607  return false;
608  }
609 }
610 bool HelloRequest::decode_length(uint32_t field_id, ProtoLengthDelimited value) {
611  switch (field_id) {
612  case 1: {
613  this->client_info = value.as_string();
614  return true;
615  }
616  default:
617  return false;
618  }
619 }
621  buffer.encode_string(1, this->client_info);
622  buffer.encode_uint32(2, this->api_version_major);
623  buffer.encode_uint32(3, this->api_version_minor);
624 }
625 #ifdef HAS_PROTO_MESSAGE_DUMP
626 void HelloRequest::dump_to(std::string &out) const {
627  __attribute__((unused)) char buffer[64];
628  out.append("HelloRequest {\n");
629  out.append(" client_info: ");
630  out.append("'").append(this->client_info).append("'");
631  out.append("\n");
632 
633  out.append(" api_version_major: ");
634  sprintf(buffer, "%" PRIu32, this->api_version_major);
635  out.append(buffer);
636  out.append("\n");
637 
638  out.append(" api_version_minor: ");
639  sprintf(buffer, "%" PRIu32, this->api_version_minor);
640  out.append(buffer);
641  out.append("\n");
642  out.append("}");
643 }
644 #endif
645 bool HelloResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
646  switch (field_id) {
647  case 1: {
648  this->api_version_major = value.as_uint32();
649  return true;
650  }
651  case 2: {
652  this->api_version_minor = value.as_uint32();
653  return true;
654  }
655  default:
656  return false;
657  }
658 }
659 bool HelloResponse::decode_length(uint32_t field_id, ProtoLengthDelimited value) {
660  switch (field_id) {
661  case 3: {
662  this->server_info = value.as_string();
663  return true;
664  }
665  case 4: {
666  this->name = value.as_string();
667  return true;
668  }
669  default:
670  return false;
671  }
672 }
674  buffer.encode_uint32(1, this->api_version_major);
675  buffer.encode_uint32(2, this->api_version_minor);
676  buffer.encode_string(3, this->server_info);
677  buffer.encode_string(4, this->name);
678 }
679 #ifdef HAS_PROTO_MESSAGE_DUMP
680 void HelloResponse::dump_to(std::string &out) const {
681  __attribute__((unused)) char buffer[64];
682  out.append("HelloResponse {\n");
683  out.append(" api_version_major: ");
684  sprintf(buffer, "%" PRIu32, this->api_version_major);
685  out.append(buffer);
686  out.append("\n");
687 
688  out.append(" api_version_minor: ");
689  sprintf(buffer, "%" PRIu32, this->api_version_minor);
690  out.append(buffer);
691  out.append("\n");
692 
693  out.append(" server_info: ");
694  out.append("'").append(this->server_info).append("'");
695  out.append("\n");
696 
697  out.append(" name: ");
698  out.append("'").append(this->name).append("'");
699  out.append("\n");
700  out.append("}");
701 }
702 #endif
703 bool ConnectRequest::decode_length(uint32_t field_id, ProtoLengthDelimited value) {
704  switch (field_id) {
705  case 1: {
706  this->password = value.as_string();
707  return true;
708  }
709  default:
710  return false;
711  }
712 }
713 void ConnectRequest::encode(ProtoWriteBuffer buffer) const { buffer.encode_string(1, this->password); }
714 #ifdef HAS_PROTO_MESSAGE_DUMP
715 void ConnectRequest::dump_to(std::string &out) const {
716  __attribute__((unused)) char buffer[64];
717  out.append("ConnectRequest {\n");
718  out.append(" password: ");
719  out.append("'").append(this->password).append("'");
720  out.append("\n");
721  out.append("}");
722 }
723 #endif
724 bool ConnectResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
725  switch (field_id) {
726  case 1: {
727  this->invalid_password = value.as_bool();
728  return true;
729  }
730  default:
731  return false;
732  }
733 }
734 void ConnectResponse::encode(ProtoWriteBuffer buffer) const { buffer.encode_bool(1, this->invalid_password); }
735 #ifdef HAS_PROTO_MESSAGE_DUMP
736 void ConnectResponse::dump_to(std::string &out) const {
737  __attribute__((unused)) char buffer[64];
738  out.append("ConnectResponse {\n");
739  out.append(" invalid_password: ");
740  out.append(YESNO(this->invalid_password));
741  out.append("\n");
742  out.append("}");
743 }
744 #endif
746 #ifdef HAS_PROTO_MESSAGE_DUMP
747 void DisconnectRequest::dump_to(std::string &out) const { out.append("DisconnectRequest {}"); }
748 #endif
750 #ifdef HAS_PROTO_MESSAGE_DUMP
751 void DisconnectResponse::dump_to(std::string &out) const { out.append("DisconnectResponse {}"); }
752 #endif
754 #ifdef HAS_PROTO_MESSAGE_DUMP
755 void PingRequest::dump_to(std::string &out) const { out.append("PingRequest {}"); }
756 #endif
758 #ifdef HAS_PROTO_MESSAGE_DUMP
759 void PingResponse::dump_to(std::string &out) const { out.append("PingResponse {}"); }
760 #endif
762 #ifdef HAS_PROTO_MESSAGE_DUMP
763 void DeviceInfoRequest::dump_to(std::string &out) const { out.append("DeviceInfoRequest {}"); }
764 #endif
765 bool DeviceInfoResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
766  switch (field_id) {
767  case 1: {
768  this->uses_password = value.as_bool();
769  return true;
770  }
771  case 7: {
772  this->has_deep_sleep = value.as_bool();
773  return true;
774  }
775  case 10: {
776  this->webserver_port = value.as_uint32();
777  return true;
778  }
779  case 11: {
780  this->legacy_bluetooth_proxy_version = value.as_uint32();
781  return true;
782  }
783  case 15: {
784  this->bluetooth_proxy_feature_flags = value.as_uint32();
785  return true;
786  }
787  case 14: {
788  this->legacy_voice_assistant_version = value.as_uint32();
789  return true;
790  }
791  case 17: {
792  this->voice_assistant_feature_flags = value.as_uint32();
793  return true;
794  }
795  default:
796  return false;
797  }
798 }
800  switch (field_id) {
801  case 2: {
802  this->name = value.as_string();
803  return true;
804  }
805  case 3: {
806  this->mac_address = value.as_string();
807  return true;
808  }
809  case 4: {
810  this->esphome_version = value.as_string();
811  return true;
812  }
813  case 5: {
814  this->compilation_time = value.as_string();
815  return true;
816  }
817  case 6: {
818  this->model = value.as_string();
819  return true;
820  }
821  case 8: {
822  this->project_name = value.as_string();
823  return true;
824  }
825  case 9: {
826  this->project_version = value.as_string();
827  return true;
828  }
829  case 12: {
830  this->manufacturer = value.as_string();
831  return true;
832  }
833  case 13: {
834  this->friendly_name = value.as_string();
835  return true;
836  }
837  case 16: {
838  this->suggested_area = value.as_string();
839  return true;
840  }
841  default:
842  return false;
843  }
844 }
846  buffer.encode_bool(1, this->uses_password);
847  buffer.encode_string(2, this->name);
848  buffer.encode_string(3, this->mac_address);
849  buffer.encode_string(4, this->esphome_version);
850  buffer.encode_string(5, this->compilation_time);
851  buffer.encode_string(6, this->model);
852  buffer.encode_bool(7, this->has_deep_sleep);
853  buffer.encode_string(8, this->project_name);
854  buffer.encode_string(9, this->project_version);
855  buffer.encode_uint32(10, this->webserver_port);
856  buffer.encode_uint32(11, this->legacy_bluetooth_proxy_version);
857  buffer.encode_uint32(15, this->bluetooth_proxy_feature_flags);
858  buffer.encode_string(12, this->manufacturer);
859  buffer.encode_string(13, this->friendly_name);
860  buffer.encode_uint32(14, this->legacy_voice_assistant_version);
861  buffer.encode_uint32(17, this->voice_assistant_feature_flags);
862  buffer.encode_string(16, this->suggested_area);
863 }
864 #ifdef HAS_PROTO_MESSAGE_DUMP
865 void DeviceInfoResponse::dump_to(std::string &out) const {
866  __attribute__((unused)) char buffer[64];
867  out.append("DeviceInfoResponse {\n");
868  out.append(" uses_password: ");
869  out.append(YESNO(this->uses_password));
870  out.append("\n");
871 
872  out.append(" name: ");
873  out.append("'").append(this->name).append("'");
874  out.append("\n");
875 
876  out.append(" mac_address: ");
877  out.append("'").append(this->mac_address).append("'");
878  out.append("\n");
879 
880  out.append(" esphome_version: ");
881  out.append("'").append(this->esphome_version).append("'");
882  out.append("\n");
883 
884  out.append(" compilation_time: ");
885  out.append("'").append(this->compilation_time).append("'");
886  out.append("\n");
887 
888  out.append(" model: ");
889  out.append("'").append(this->model).append("'");
890  out.append("\n");
891 
892  out.append(" has_deep_sleep: ");
893  out.append(YESNO(this->has_deep_sleep));
894  out.append("\n");
895 
896  out.append(" project_name: ");
897  out.append("'").append(this->project_name).append("'");
898  out.append("\n");
899 
900  out.append(" project_version: ");
901  out.append("'").append(this->project_version).append("'");
902  out.append("\n");
903 
904  out.append(" webserver_port: ");
905  sprintf(buffer, "%" PRIu32, this->webserver_port);
906  out.append(buffer);
907  out.append("\n");
908 
909  out.append(" legacy_bluetooth_proxy_version: ");
910  sprintf(buffer, "%" PRIu32, this->legacy_bluetooth_proxy_version);
911  out.append(buffer);
912  out.append("\n");
913 
914  out.append(" bluetooth_proxy_feature_flags: ");
915  sprintf(buffer, "%" PRIu32, this->bluetooth_proxy_feature_flags);
916  out.append(buffer);
917  out.append("\n");
918 
919  out.append(" manufacturer: ");
920  out.append("'").append(this->manufacturer).append("'");
921  out.append("\n");
922 
923  out.append(" friendly_name: ");
924  out.append("'").append(this->friendly_name).append("'");
925  out.append("\n");
926 
927  out.append(" legacy_voice_assistant_version: ");
928  sprintf(buffer, "%" PRIu32, this->legacy_voice_assistant_version);
929  out.append(buffer);
930  out.append("\n");
931 
932  out.append(" voice_assistant_feature_flags: ");
933  sprintf(buffer, "%" PRIu32, this->voice_assistant_feature_flags);
934  out.append(buffer);
935  out.append("\n");
936 
937  out.append(" suggested_area: ");
938  out.append("'").append(this->suggested_area).append("'");
939  out.append("\n");
940  out.append("}");
941 }
942 #endif
944 #ifdef HAS_PROTO_MESSAGE_DUMP
945 void ListEntitiesRequest::dump_to(std::string &out) const { out.append("ListEntitiesRequest {}"); }
946 #endif
948 #ifdef HAS_PROTO_MESSAGE_DUMP
949 void ListEntitiesDoneResponse::dump_to(std::string &out) const { out.append("ListEntitiesDoneResponse {}"); }
950 #endif
952 #ifdef HAS_PROTO_MESSAGE_DUMP
953 void SubscribeStatesRequest::dump_to(std::string &out) const { out.append("SubscribeStatesRequest {}"); }
954 #endif
956  switch (field_id) {
957  case 6: {
958  this->is_status_binary_sensor = value.as_bool();
959  return true;
960  }
961  case 7: {
962  this->disabled_by_default = value.as_bool();
963  return true;
964  }
965  case 9: {
966  this->entity_category = value.as_enum<enums::EntityCategory>();
967  return true;
968  }
969  default:
970  return false;
971  }
972 }
974  switch (field_id) {
975  case 1: {
976  this->object_id = value.as_string();
977  return true;
978  }
979  case 3: {
980  this->name = value.as_string();
981  return true;
982  }
983  case 4: {
984  this->unique_id = value.as_string();
985  return true;
986  }
987  case 5: {
988  this->device_class = value.as_string();
989  return true;
990  }
991  case 8: {
992  this->icon = value.as_string();
993  return true;
994  }
995  default:
996  return false;
997  }
998 }
1000  switch (field_id) {
1001  case 2: {
1002  this->key = value.as_fixed32();
1003  return true;
1004  }
1005  default:
1006  return false;
1007  }
1008 }
1010  buffer.encode_string(1, this->object_id);
1011  buffer.encode_fixed32(2, this->key);
1012  buffer.encode_string(3, this->name);
1013  buffer.encode_string(4, this->unique_id);
1014  buffer.encode_string(5, this->device_class);
1015  buffer.encode_bool(6, this->is_status_binary_sensor);
1016  buffer.encode_bool(7, this->disabled_by_default);
1017  buffer.encode_string(8, this->icon);
1018  buffer.encode_enum<enums::EntityCategory>(9, this->entity_category);
1019 }
1020 #ifdef HAS_PROTO_MESSAGE_DUMP
1021 void ListEntitiesBinarySensorResponse::dump_to(std::string &out) const {
1022  __attribute__((unused)) char buffer[64];
1023  out.append("ListEntitiesBinarySensorResponse {\n");
1024  out.append(" object_id: ");
1025  out.append("'").append(this->object_id).append("'");
1026  out.append("\n");
1027 
1028  out.append(" key: ");
1029  sprintf(buffer, "%" PRIu32, this->key);
1030  out.append(buffer);
1031  out.append("\n");
1032 
1033  out.append(" name: ");
1034  out.append("'").append(this->name).append("'");
1035  out.append("\n");
1036 
1037  out.append(" unique_id: ");
1038  out.append("'").append(this->unique_id).append("'");
1039  out.append("\n");
1040 
1041  out.append(" device_class: ");
1042  out.append("'").append(this->device_class).append("'");
1043  out.append("\n");
1044 
1045  out.append(" is_status_binary_sensor: ");
1046  out.append(YESNO(this->is_status_binary_sensor));
1047  out.append("\n");
1048 
1049  out.append(" disabled_by_default: ");
1050  out.append(YESNO(this->disabled_by_default));
1051  out.append("\n");
1052 
1053  out.append(" icon: ");
1054  out.append("'").append(this->icon).append("'");
1055  out.append("\n");
1056 
1057  out.append(" entity_category: ");
1058  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
1059  out.append("\n");
1060  out.append("}");
1061 }
1062 #endif
1064  switch (field_id) {
1065  case 2: {
1066  this->state = value.as_bool();
1067  return true;
1068  }
1069  case 3: {
1070  this->missing_state = value.as_bool();
1071  return true;
1072  }
1073  default:
1074  return false;
1075  }
1076 }
1077 bool BinarySensorStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
1078  switch (field_id) {
1079  case 1: {
1080  this->key = value.as_fixed32();
1081  return true;
1082  }
1083  default:
1084  return false;
1085  }
1086 }
1088  buffer.encode_fixed32(1, this->key);
1089  buffer.encode_bool(2, this->state);
1090  buffer.encode_bool(3, this->missing_state);
1091 }
1092 #ifdef HAS_PROTO_MESSAGE_DUMP
1093 void BinarySensorStateResponse::dump_to(std::string &out) const {
1094  __attribute__((unused)) char buffer[64];
1095  out.append("BinarySensorStateResponse {\n");
1096  out.append(" key: ");
1097  sprintf(buffer, "%" PRIu32, this->key);
1098  out.append(buffer);
1099  out.append("\n");
1100 
1101  out.append(" state: ");
1102  out.append(YESNO(this->state));
1103  out.append("\n");
1104 
1105  out.append(" missing_state: ");
1106  out.append(YESNO(this->missing_state));
1107  out.append("\n");
1108  out.append("}");
1109 }
1110 #endif
1112  switch (field_id) {
1113  case 5: {
1114  this->assumed_state = value.as_bool();
1115  return true;
1116  }
1117  case 6: {
1118  this->supports_position = value.as_bool();
1119  return true;
1120  }
1121  case 7: {
1122  this->supports_tilt = value.as_bool();
1123  return true;
1124  }
1125  case 9: {
1126  this->disabled_by_default = value.as_bool();
1127  return true;
1128  }
1129  case 11: {
1130  this->entity_category = value.as_enum<enums::EntityCategory>();
1131  return true;
1132  }
1133  case 12: {
1134  this->supports_stop = value.as_bool();
1135  return true;
1136  }
1137  default:
1138  return false;
1139  }
1140 }
1142  switch (field_id) {
1143  case 1: {
1144  this->object_id = value.as_string();
1145  return true;
1146  }
1147  case 3: {
1148  this->name = value.as_string();
1149  return true;
1150  }
1151  case 4: {
1152  this->unique_id = value.as_string();
1153  return true;
1154  }
1155  case 8: {
1156  this->device_class = value.as_string();
1157  return true;
1158  }
1159  case 10: {
1160  this->icon = value.as_string();
1161  return true;
1162  }
1163  default:
1164  return false;
1165  }
1166 }
1167 bool ListEntitiesCoverResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
1168  switch (field_id) {
1169  case 2: {
1170  this->key = value.as_fixed32();
1171  return true;
1172  }
1173  default:
1174  return false;
1175  }
1176 }
1178  buffer.encode_string(1, this->object_id);
1179  buffer.encode_fixed32(2, this->key);
1180  buffer.encode_string(3, this->name);
1181  buffer.encode_string(4, this->unique_id);
1182  buffer.encode_bool(5, this->assumed_state);
1183  buffer.encode_bool(6, this->supports_position);
1184  buffer.encode_bool(7, this->supports_tilt);
1185  buffer.encode_string(8, this->device_class);
1186  buffer.encode_bool(9, this->disabled_by_default);
1187  buffer.encode_string(10, this->icon);
1188  buffer.encode_enum<enums::EntityCategory>(11, this->entity_category);
1189  buffer.encode_bool(12, this->supports_stop);
1190 }
1191 #ifdef HAS_PROTO_MESSAGE_DUMP
1192 void ListEntitiesCoverResponse::dump_to(std::string &out) const {
1193  __attribute__((unused)) char buffer[64];
1194  out.append("ListEntitiesCoverResponse {\n");
1195  out.append(" object_id: ");
1196  out.append("'").append(this->object_id).append("'");
1197  out.append("\n");
1198 
1199  out.append(" key: ");
1200  sprintf(buffer, "%" PRIu32, this->key);
1201  out.append(buffer);
1202  out.append("\n");
1203 
1204  out.append(" name: ");
1205  out.append("'").append(this->name).append("'");
1206  out.append("\n");
1207 
1208  out.append(" unique_id: ");
1209  out.append("'").append(this->unique_id).append("'");
1210  out.append("\n");
1211 
1212  out.append(" assumed_state: ");
1213  out.append(YESNO(this->assumed_state));
1214  out.append("\n");
1215 
1216  out.append(" supports_position: ");
1217  out.append(YESNO(this->supports_position));
1218  out.append("\n");
1219 
1220  out.append(" supports_tilt: ");
1221  out.append(YESNO(this->supports_tilt));
1222  out.append("\n");
1223 
1224  out.append(" device_class: ");
1225  out.append("'").append(this->device_class).append("'");
1226  out.append("\n");
1227 
1228  out.append(" disabled_by_default: ");
1229  out.append(YESNO(this->disabled_by_default));
1230  out.append("\n");
1231 
1232  out.append(" icon: ");
1233  out.append("'").append(this->icon).append("'");
1234  out.append("\n");
1235 
1236  out.append(" entity_category: ");
1237  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
1238  out.append("\n");
1239 
1240  out.append(" supports_stop: ");
1241  out.append(YESNO(this->supports_stop));
1242  out.append("\n");
1243  out.append("}");
1244 }
1245 #endif
1246 bool CoverStateResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
1247  switch (field_id) {
1248  case 2: {
1249  this->legacy_state = value.as_enum<enums::LegacyCoverState>();
1250  return true;
1251  }
1252  case 5: {
1253  this->current_operation = value.as_enum<enums::CoverOperation>();
1254  return true;
1255  }
1256  default:
1257  return false;
1258  }
1259 }
1260 bool CoverStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
1261  switch (field_id) {
1262  case 1: {
1263  this->key = value.as_fixed32();
1264  return true;
1265  }
1266  case 3: {
1267  this->position = value.as_float();
1268  return true;
1269  }
1270  case 4: {
1271  this->tilt = value.as_float();
1272  return true;
1273  }
1274  default:
1275  return false;
1276  }
1277 }
1279  buffer.encode_fixed32(1, this->key);
1280  buffer.encode_enum<enums::LegacyCoverState>(2, this->legacy_state);
1281  buffer.encode_float(3, this->position);
1282  buffer.encode_float(4, this->tilt);
1283  buffer.encode_enum<enums::CoverOperation>(5, this->current_operation);
1284 }
1285 #ifdef HAS_PROTO_MESSAGE_DUMP
1286 void CoverStateResponse::dump_to(std::string &out) const {
1287  __attribute__((unused)) char buffer[64];
1288  out.append("CoverStateResponse {\n");
1289  out.append(" key: ");
1290  sprintf(buffer, "%" PRIu32, this->key);
1291  out.append(buffer);
1292  out.append("\n");
1293 
1294  out.append(" legacy_state: ");
1295  out.append(proto_enum_to_string<enums::LegacyCoverState>(this->legacy_state));
1296  out.append("\n");
1297 
1298  out.append(" position: ");
1299  sprintf(buffer, "%g", this->position);
1300  out.append(buffer);
1301  out.append("\n");
1302 
1303  out.append(" tilt: ");
1304  sprintf(buffer, "%g", this->tilt);
1305  out.append(buffer);
1306  out.append("\n");
1307 
1308  out.append(" current_operation: ");
1309  out.append(proto_enum_to_string<enums::CoverOperation>(this->current_operation));
1310  out.append("\n");
1311  out.append("}");
1312 }
1313 #endif
1314 bool CoverCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
1315  switch (field_id) {
1316  case 2: {
1317  this->has_legacy_command = value.as_bool();
1318  return true;
1319  }
1320  case 3: {
1321  this->legacy_command = value.as_enum<enums::LegacyCoverCommand>();
1322  return true;
1323  }
1324  case 4: {
1325  this->has_position = value.as_bool();
1326  return true;
1327  }
1328  case 6: {
1329  this->has_tilt = value.as_bool();
1330  return true;
1331  }
1332  case 8: {
1333  this->stop = value.as_bool();
1334  return true;
1335  }
1336  default:
1337  return false;
1338  }
1339 }
1340 bool CoverCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
1341  switch (field_id) {
1342  case 1: {
1343  this->key = value.as_fixed32();
1344  return true;
1345  }
1346  case 5: {
1347  this->position = value.as_float();
1348  return true;
1349  }
1350  case 7: {
1351  this->tilt = value.as_float();
1352  return true;
1353  }
1354  default:
1355  return false;
1356  }
1357 }
1359  buffer.encode_fixed32(1, this->key);
1360  buffer.encode_bool(2, this->has_legacy_command);
1361  buffer.encode_enum<enums::LegacyCoverCommand>(3, this->legacy_command);
1362  buffer.encode_bool(4, this->has_position);
1363  buffer.encode_float(5, this->position);
1364  buffer.encode_bool(6, this->has_tilt);
1365  buffer.encode_float(7, this->tilt);
1366  buffer.encode_bool(8, this->stop);
1367 }
1368 #ifdef HAS_PROTO_MESSAGE_DUMP
1369 void CoverCommandRequest::dump_to(std::string &out) const {
1370  __attribute__((unused)) char buffer[64];
1371  out.append("CoverCommandRequest {\n");
1372  out.append(" key: ");
1373  sprintf(buffer, "%" PRIu32, this->key);
1374  out.append(buffer);
1375  out.append("\n");
1376 
1377  out.append(" has_legacy_command: ");
1378  out.append(YESNO(this->has_legacy_command));
1379  out.append("\n");
1380 
1381  out.append(" legacy_command: ");
1382  out.append(proto_enum_to_string<enums::LegacyCoverCommand>(this->legacy_command));
1383  out.append("\n");
1384 
1385  out.append(" has_position: ");
1386  out.append(YESNO(this->has_position));
1387  out.append("\n");
1388 
1389  out.append(" position: ");
1390  sprintf(buffer, "%g", this->position);
1391  out.append(buffer);
1392  out.append("\n");
1393 
1394  out.append(" has_tilt: ");
1395  out.append(YESNO(this->has_tilt));
1396  out.append("\n");
1397 
1398  out.append(" tilt: ");
1399  sprintf(buffer, "%g", this->tilt);
1400  out.append(buffer);
1401  out.append("\n");
1402 
1403  out.append(" stop: ");
1404  out.append(YESNO(this->stop));
1405  out.append("\n");
1406  out.append("}");
1407 }
1408 #endif
1409 bool ListEntitiesFanResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
1410  switch (field_id) {
1411  case 5: {
1412  this->supports_oscillation = value.as_bool();
1413  return true;
1414  }
1415  case 6: {
1416  this->supports_speed = value.as_bool();
1417  return true;
1418  }
1419  case 7: {
1420  this->supports_direction = value.as_bool();
1421  return true;
1422  }
1423  case 8: {
1424  this->supported_speed_count = value.as_int32();
1425  return true;
1426  }
1427  case 9: {
1428  this->disabled_by_default = value.as_bool();
1429  return true;
1430  }
1431  case 11: {
1432  this->entity_category = value.as_enum<enums::EntityCategory>();
1433  return true;
1434  }
1435  default:
1436  return false;
1437  }
1438 }
1440  switch (field_id) {
1441  case 1: {
1442  this->object_id = value.as_string();
1443  return true;
1444  }
1445  case 3: {
1446  this->name = value.as_string();
1447  return true;
1448  }
1449  case 4: {
1450  this->unique_id = value.as_string();
1451  return true;
1452  }
1453  case 10: {
1454  this->icon = value.as_string();
1455  return true;
1456  }
1457  case 12: {
1458  this->supported_preset_modes.push_back(value.as_string());
1459  return true;
1460  }
1461  default:
1462  return false;
1463  }
1464 }
1465 bool ListEntitiesFanResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
1466  switch (field_id) {
1467  case 2: {
1468  this->key = value.as_fixed32();
1469  return true;
1470  }
1471  default:
1472  return false;
1473  }
1474 }
1476  buffer.encode_string(1, this->object_id);
1477  buffer.encode_fixed32(2, this->key);
1478  buffer.encode_string(3, this->name);
1479  buffer.encode_string(4, this->unique_id);
1480  buffer.encode_bool(5, this->supports_oscillation);
1481  buffer.encode_bool(6, this->supports_speed);
1482  buffer.encode_bool(7, this->supports_direction);
1483  buffer.encode_int32(8, this->supported_speed_count);
1484  buffer.encode_bool(9, this->disabled_by_default);
1485  buffer.encode_string(10, this->icon);
1486  buffer.encode_enum<enums::EntityCategory>(11, this->entity_category);
1487  for (auto &it : this->supported_preset_modes) {
1488  buffer.encode_string(12, it, true);
1489  }
1490 }
1491 #ifdef HAS_PROTO_MESSAGE_DUMP
1492 void ListEntitiesFanResponse::dump_to(std::string &out) const {
1493  __attribute__((unused)) char buffer[64];
1494  out.append("ListEntitiesFanResponse {\n");
1495  out.append(" object_id: ");
1496  out.append("'").append(this->object_id).append("'");
1497  out.append("\n");
1498 
1499  out.append(" key: ");
1500  sprintf(buffer, "%" PRIu32, this->key);
1501  out.append(buffer);
1502  out.append("\n");
1503 
1504  out.append(" name: ");
1505  out.append("'").append(this->name).append("'");
1506  out.append("\n");
1507 
1508  out.append(" unique_id: ");
1509  out.append("'").append(this->unique_id).append("'");
1510  out.append("\n");
1511 
1512  out.append(" supports_oscillation: ");
1513  out.append(YESNO(this->supports_oscillation));
1514  out.append("\n");
1515 
1516  out.append(" supports_speed: ");
1517  out.append(YESNO(this->supports_speed));
1518  out.append("\n");
1519 
1520  out.append(" supports_direction: ");
1521  out.append(YESNO(this->supports_direction));
1522  out.append("\n");
1523 
1524  out.append(" supported_speed_count: ");
1525  sprintf(buffer, "%" PRId32, this->supported_speed_count);
1526  out.append(buffer);
1527  out.append("\n");
1528 
1529  out.append(" disabled_by_default: ");
1530  out.append(YESNO(this->disabled_by_default));
1531  out.append("\n");
1532 
1533  out.append(" icon: ");
1534  out.append("'").append(this->icon).append("'");
1535  out.append("\n");
1536 
1537  out.append(" entity_category: ");
1538  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
1539  out.append("\n");
1540 
1541  for (const auto &it : this->supported_preset_modes) {
1542  out.append(" supported_preset_modes: ");
1543  out.append("'").append(it).append("'");
1544  out.append("\n");
1545  }
1546  out.append("}");
1547 }
1548 #endif
1549 bool FanStateResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
1550  switch (field_id) {
1551  case 2: {
1552  this->state = value.as_bool();
1553  return true;
1554  }
1555  case 3: {
1556  this->oscillating = value.as_bool();
1557  return true;
1558  }
1559  case 4: {
1560  this->speed = value.as_enum<enums::FanSpeed>();
1561  return true;
1562  }
1563  case 5: {
1564  this->direction = value.as_enum<enums::FanDirection>();
1565  return true;
1566  }
1567  case 6: {
1568  this->speed_level = value.as_int32();
1569  return true;
1570  }
1571  default:
1572  return false;
1573  }
1574 }
1576  switch (field_id) {
1577  case 7: {
1578  this->preset_mode = value.as_string();
1579  return true;
1580  }
1581  default:
1582  return false;
1583  }
1584 }
1585 bool FanStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
1586  switch (field_id) {
1587  case 1: {
1588  this->key = value.as_fixed32();
1589  return true;
1590  }
1591  default:
1592  return false;
1593  }
1594 }
1596  buffer.encode_fixed32(1, this->key);
1597  buffer.encode_bool(2, this->state);
1598  buffer.encode_bool(3, this->oscillating);
1599  buffer.encode_enum<enums::FanSpeed>(4, this->speed);
1600  buffer.encode_enum<enums::FanDirection>(5, this->direction);
1601  buffer.encode_int32(6, this->speed_level);
1602  buffer.encode_string(7, this->preset_mode);
1603 }
1604 #ifdef HAS_PROTO_MESSAGE_DUMP
1605 void FanStateResponse::dump_to(std::string &out) const {
1606  __attribute__((unused)) char buffer[64];
1607  out.append("FanStateResponse {\n");
1608  out.append(" key: ");
1609  sprintf(buffer, "%" PRIu32, this->key);
1610  out.append(buffer);
1611  out.append("\n");
1612 
1613  out.append(" state: ");
1614  out.append(YESNO(this->state));
1615  out.append("\n");
1616 
1617  out.append(" oscillating: ");
1618  out.append(YESNO(this->oscillating));
1619  out.append("\n");
1620 
1621  out.append(" speed: ");
1622  out.append(proto_enum_to_string<enums::FanSpeed>(this->speed));
1623  out.append("\n");
1624 
1625  out.append(" direction: ");
1626  out.append(proto_enum_to_string<enums::FanDirection>(this->direction));
1627  out.append("\n");
1628 
1629  out.append(" speed_level: ");
1630  sprintf(buffer, "%" PRId32, this->speed_level);
1631  out.append(buffer);
1632  out.append("\n");
1633 
1634  out.append(" preset_mode: ");
1635  out.append("'").append(this->preset_mode).append("'");
1636  out.append("\n");
1637  out.append("}");
1638 }
1639 #endif
1640 bool FanCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
1641  switch (field_id) {
1642  case 2: {
1643  this->has_state = value.as_bool();
1644  return true;
1645  }
1646  case 3: {
1647  this->state = value.as_bool();
1648  return true;
1649  }
1650  case 4: {
1651  this->has_speed = value.as_bool();
1652  return true;
1653  }
1654  case 5: {
1655  this->speed = value.as_enum<enums::FanSpeed>();
1656  return true;
1657  }
1658  case 6: {
1659  this->has_oscillating = value.as_bool();
1660  return true;
1661  }
1662  case 7: {
1663  this->oscillating = value.as_bool();
1664  return true;
1665  }
1666  case 8: {
1667  this->has_direction = value.as_bool();
1668  return true;
1669  }
1670  case 9: {
1671  this->direction = value.as_enum<enums::FanDirection>();
1672  return true;
1673  }
1674  case 10: {
1675  this->has_speed_level = value.as_bool();
1676  return true;
1677  }
1678  case 11: {
1679  this->speed_level = value.as_int32();
1680  return true;
1681  }
1682  case 12: {
1683  this->has_preset_mode = value.as_bool();
1684  return true;
1685  }
1686  default:
1687  return false;
1688  }
1689 }
1691  switch (field_id) {
1692  case 13: {
1693  this->preset_mode = value.as_string();
1694  return true;
1695  }
1696  default:
1697  return false;
1698  }
1699 }
1700 bool FanCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
1701  switch (field_id) {
1702  case 1: {
1703  this->key = value.as_fixed32();
1704  return true;
1705  }
1706  default:
1707  return false;
1708  }
1709 }
1711  buffer.encode_fixed32(1, this->key);
1712  buffer.encode_bool(2, this->has_state);
1713  buffer.encode_bool(3, this->state);
1714  buffer.encode_bool(4, this->has_speed);
1715  buffer.encode_enum<enums::FanSpeed>(5, this->speed);
1716  buffer.encode_bool(6, this->has_oscillating);
1717  buffer.encode_bool(7, this->oscillating);
1718  buffer.encode_bool(8, this->has_direction);
1719  buffer.encode_enum<enums::FanDirection>(9, this->direction);
1720  buffer.encode_bool(10, this->has_speed_level);
1721  buffer.encode_int32(11, this->speed_level);
1722  buffer.encode_bool(12, this->has_preset_mode);
1723  buffer.encode_string(13, this->preset_mode);
1724 }
1725 #ifdef HAS_PROTO_MESSAGE_DUMP
1726 void FanCommandRequest::dump_to(std::string &out) const {
1727  __attribute__((unused)) char buffer[64];
1728  out.append("FanCommandRequest {\n");
1729  out.append(" key: ");
1730  sprintf(buffer, "%" PRIu32, this->key);
1731  out.append(buffer);
1732  out.append("\n");
1733 
1734  out.append(" has_state: ");
1735  out.append(YESNO(this->has_state));
1736  out.append("\n");
1737 
1738  out.append(" state: ");
1739  out.append(YESNO(this->state));
1740  out.append("\n");
1741 
1742  out.append(" has_speed: ");
1743  out.append(YESNO(this->has_speed));
1744  out.append("\n");
1745 
1746  out.append(" speed: ");
1747  out.append(proto_enum_to_string<enums::FanSpeed>(this->speed));
1748  out.append("\n");
1749 
1750  out.append(" has_oscillating: ");
1751  out.append(YESNO(this->has_oscillating));
1752  out.append("\n");
1753 
1754  out.append(" oscillating: ");
1755  out.append(YESNO(this->oscillating));
1756  out.append("\n");
1757 
1758  out.append(" has_direction: ");
1759  out.append(YESNO(this->has_direction));
1760  out.append("\n");
1761 
1762  out.append(" direction: ");
1763  out.append(proto_enum_to_string<enums::FanDirection>(this->direction));
1764  out.append("\n");
1765 
1766  out.append(" has_speed_level: ");
1767  out.append(YESNO(this->has_speed_level));
1768  out.append("\n");
1769 
1770  out.append(" speed_level: ");
1771  sprintf(buffer, "%" PRId32, this->speed_level);
1772  out.append(buffer);
1773  out.append("\n");
1774 
1775  out.append(" has_preset_mode: ");
1776  out.append(YESNO(this->has_preset_mode));
1777  out.append("\n");
1778 
1779  out.append(" preset_mode: ");
1780  out.append("'").append(this->preset_mode).append("'");
1781  out.append("\n");
1782  out.append("}");
1783 }
1784 #endif
1786  switch (field_id) {
1787  case 12: {
1788  this->supported_color_modes.push_back(value.as_enum<enums::ColorMode>());
1789  return true;
1790  }
1791  case 5: {
1792  this->legacy_supports_brightness = value.as_bool();
1793  return true;
1794  }
1795  case 6: {
1796  this->legacy_supports_rgb = value.as_bool();
1797  return true;
1798  }
1799  case 7: {
1800  this->legacy_supports_white_value = value.as_bool();
1801  return true;
1802  }
1803  case 8: {
1804  this->legacy_supports_color_temperature = value.as_bool();
1805  return true;
1806  }
1807  case 13: {
1808  this->disabled_by_default = value.as_bool();
1809  return true;
1810  }
1811  case 15: {
1812  this->entity_category = value.as_enum<enums::EntityCategory>();
1813  return true;
1814  }
1815  default:
1816  return false;
1817  }
1818 }
1820  switch (field_id) {
1821  case 1: {
1822  this->object_id = value.as_string();
1823  return true;
1824  }
1825  case 3: {
1826  this->name = value.as_string();
1827  return true;
1828  }
1829  case 4: {
1830  this->unique_id = value.as_string();
1831  return true;
1832  }
1833  case 11: {
1834  this->effects.push_back(value.as_string());
1835  return true;
1836  }
1837  case 14: {
1838  this->icon = value.as_string();
1839  return true;
1840  }
1841  default:
1842  return false;
1843  }
1844 }
1845 bool ListEntitiesLightResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
1846  switch (field_id) {
1847  case 2: {
1848  this->key = value.as_fixed32();
1849  return true;
1850  }
1851  case 9: {
1852  this->min_mireds = value.as_float();
1853  return true;
1854  }
1855  case 10: {
1856  this->max_mireds = value.as_float();
1857  return true;
1858  }
1859  default:
1860  return false;
1861  }
1862 }
1864  buffer.encode_string(1, this->object_id);
1865  buffer.encode_fixed32(2, this->key);
1866  buffer.encode_string(3, this->name);
1867  buffer.encode_string(4, this->unique_id);
1868  for (auto &it : this->supported_color_modes) {
1869  buffer.encode_enum<enums::ColorMode>(12, it, true);
1870  }
1871  buffer.encode_bool(5, this->legacy_supports_brightness);
1872  buffer.encode_bool(6, this->legacy_supports_rgb);
1873  buffer.encode_bool(7, this->legacy_supports_white_value);
1874  buffer.encode_bool(8, this->legacy_supports_color_temperature);
1875  buffer.encode_float(9, this->min_mireds);
1876  buffer.encode_float(10, this->max_mireds);
1877  for (auto &it : this->effects) {
1878  buffer.encode_string(11, it, true);
1879  }
1880  buffer.encode_bool(13, this->disabled_by_default);
1881  buffer.encode_string(14, this->icon);
1882  buffer.encode_enum<enums::EntityCategory>(15, this->entity_category);
1883 }
1884 #ifdef HAS_PROTO_MESSAGE_DUMP
1885 void ListEntitiesLightResponse::dump_to(std::string &out) const {
1886  __attribute__((unused)) char buffer[64];
1887  out.append("ListEntitiesLightResponse {\n");
1888  out.append(" object_id: ");
1889  out.append("'").append(this->object_id).append("'");
1890  out.append("\n");
1891 
1892  out.append(" key: ");
1893  sprintf(buffer, "%" PRIu32, this->key);
1894  out.append(buffer);
1895  out.append("\n");
1896 
1897  out.append(" name: ");
1898  out.append("'").append(this->name).append("'");
1899  out.append("\n");
1900 
1901  out.append(" unique_id: ");
1902  out.append("'").append(this->unique_id).append("'");
1903  out.append("\n");
1904 
1905  for (const auto &it : this->supported_color_modes) {
1906  out.append(" supported_color_modes: ");
1907  out.append(proto_enum_to_string<enums::ColorMode>(it));
1908  out.append("\n");
1909  }
1910 
1911  out.append(" legacy_supports_brightness: ");
1912  out.append(YESNO(this->legacy_supports_brightness));
1913  out.append("\n");
1914 
1915  out.append(" legacy_supports_rgb: ");
1916  out.append(YESNO(this->legacy_supports_rgb));
1917  out.append("\n");
1918 
1919  out.append(" legacy_supports_white_value: ");
1920  out.append(YESNO(this->legacy_supports_white_value));
1921  out.append("\n");
1922 
1923  out.append(" legacy_supports_color_temperature: ");
1924  out.append(YESNO(this->legacy_supports_color_temperature));
1925  out.append("\n");
1926 
1927  out.append(" min_mireds: ");
1928  sprintf(buffer, "%g", this->min_mireds);
1929  out.append(buffer);
1930  out.append("\n");
1931 
1932  out.append(" max_mireds: ");
1933  sprintf(buffer, "%g", this->max_mireds);
1934  out.append(buffer);
1935  out.append("\n");
1936 
1937  for (const auto &it : this->effects) {
1938  out.append(" effects: ");
1939  out.append("'").append(it).append("'");
1940  out.append("\n");
1941  }
1942 
1943  out.append(" disabled_by_default: ");
1944  out.append(YESNO(this->disabled_by_default));
1945  out.append("\n");
1946 
1947  out.append(" icon: ");
1948  out.append("'").append(this->icon).append("'");
1949  out.append("\n");
1950 
1951  out.append(" entity_category: ");
1952  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
1953  out.append("\n");
1954  out.append("}");
1955 }
1956 #endif
1957 bool LightStateResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
1958  switch (field_id) {
1959  case 2: {
1960  this->state = value.as_bool();
1961  return true;
1962  }
1963  case 11: {
1964  this->color_mode = value.as_enum<enums::ColorMode>();
1965  return true;
1966  }
1967  default:
1968  return false;
1969  }
1970 }
1972  switch (field_id) {
1973  case 9: {
1974  this->effect = value.as_string();
1975  return true;
1976  }
1977  default:
1978  return false;
1979  }
1980 }
1981 bool LightStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
1982  switch (field_id) {
1983  case 1: {
1984  this->key = value.as_fixed32();
1985  return true;
1986  }
1987  case 3: {
1988  this->brightness = value.as_float();
1989  return true;
1990  }
1991  case 10: {
1992  this->color_brightness = value.as_float();
1993  return true;
1994  }
1995  case 4: {
1996  this->red = value.as_float();
1997  return true;
1998  }
1999  case 5: {
2000  this->green = value.as_float();
2001  return true;
2002  }
2003  case 6: {
2004  this->blue = value.as_float();
2005  return true;
2006  }
2007  case 7: {
2008  this->white = value.as_float();
2009  return true;
2010  }
2011  case 8: {
2012  this->color_temperature = value.as_float();
2013  return true;
2014  }
2015  case 12: {
2016  this->cold_white = value.as_float();
2017  return true;
2018  }
2019  case 13: {
2020  this->warm_white = value.as_float();
2021  return true;
2022  }
2023  default:
2024  return false;
2025  }
2026 }
2028  buffer.encode_fixed32(1, this->key);
2029  buffer.encode_bool(2, this->state);
2030  buffer.encode_float(3, this->brightness);
2031  buffer.encode_enum<enums::ColorMode>(11, this->color_mode);
2032  buffer.encode_float(10, this->color_brightness);
2033  buffer.encode_float(4, this->red);
2034  buffer.encode_float(5, this->green);
2035  buffer.encode_float(6, this->blue);
2036  buffer.encode_float(7, this->white);
2037  buffer.encode_float(8, this->color_temperature);
2038  buffer.encode_float(12, this->cold_white);
2039  buffer.encode_float(13, this->warm_white);
2040  buffer.encode_string(9, this->effect);
2041 }
2042 #ifdef HAS_PROTO_MESSAGE_DUMP
2043 void LightStateResponse::dump_to(std::string &out) const {
2044  __attribute__((unused)) char buffer[64];
2045  out.append("LightStateResponse {\n");
2046  out.append(" key: ");
2047  sprintf(buffer, "%" PRIu32, this->key);
2048  out.append(buffer);
2049  out.append("\n");
2050 
2051  out.append(" state: ");
2052  out.append(YESNO(this->state));
2053  out.append("\n");
2054 
2055  out.append(" brightness: ");
2056  sprintf(buffer, "%g", this->brightness);
2057  out.append(buffer);
2058  out.append("\n");
2059 
2060  out.append(" color_mode: ");
2061  out.append(proto_enum_to_string<enums::ColorMode>(this->color_mode));
2062  out.append("\n");
2063 
2064  out.append(" color_brightness: ");
2065  sprintf(buffer, "%g", this->color_brightness);
2066  out.append(buffer);
2067  out.append("\n");
2068 
2069  out.append(" red: ");
2070  sprintf(buffer, "%g", this->red);
2071  out.append(buffer);
2072  out.append("\n");
2073 
2074  out.append(" green: ");
2075  sprintf(buffer, "%g", this->green);
2076  out.append(buffer);
2077  out.append("\n");
2078 
2079  out.append(" blue: ");
2080  sprintf(buffer, "%g", this->blue);
2081  out.append(buffer);
2082  out.append("\n");
2083 
2084  out.append(" white: ");
2085  sprintf(buffer, "%g", this->white);
2086  out.append(buffer);
2087  out.append("\n");
2088 
2089  out.append(" color_temperature: ");
2090  sprintf(buffer, "%g", this->color_temperature);
2091  out.append(buffer);
2092  out.append("\n");
2093 
2094  out.append(" cold_white: ");
2095  sprintf(buffer, "%g", this->cold_white);
2096  out.append(buffer);
2097  out.append("\n");
2098 
2099  out.append(" warm_white: ");
2100  sprintf(buffer, "%g", this->warm_white);
2101  out.append(buffer);
2102  out.append("\n");
2103 
2104  out.append(" effect: ");
2105  out.append("'").append(this->effect).append("'");
2106  out.append("\n");
2107  out.append("}");
2108 }
2109 #endif
2110 bool LightCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
2111  switch (field_id) {
2112  case 2: {
2113  this->has_state = value.as_bool();
2114  return true;
2115  }
2116  case 3: {
2117  this->state = value.as_bool();
2118  return true;
2119  }
2120  case 4: {
2121  this->has_brightness = value.as_bool();
2122  return true;
2123  }
2124  case 22: {
2125  this->has_color_mode = value.as_bool();
2126  return true;
2127  }
2128  case 23: {
2129  this->color_mode = value.as_enum<enums::ColorMode>();
2130  return true;
2131  }
2132  case 20: {
2133  this->has_color_brightness = value.as_bool();
2134  return true;
2135  }
2136  case 6: {
2137  this->has_rgb = value.as_bool();
2138  return true;
2139  }
2140  case 10: {
2141  this->has_white = value.as_bool();
2142  return true;
2143  }
2144  case 12: {
2145  this->has_color_temperature = value.as_bool();
2146  return true;
2147  }
2148  case 24: {
2149  this->has_cold_white = value.as_bool();
2150  return true;
2151  }
2152  case 26: {
2153  this->has_warm_white = value.as_bool();
2154  return true;
2155  }
2156  case 14: {
2157  this->has_transition_length = value.as_bool();
2158  return true;
2159  }
2160  case 15: {
2161  this->transition_length = value.as_uint32();
2162  return true;
2163  }
2164  case 16: {
2165  this->has_flash_length = value.as_bool();
2166  return true;
2167  }
2168  case 17: {
2169  this->flash_length = value.as_uint32();
2170  return true;
2171  }
2172  case 18: {
2173  this->has_effect = value.as_bool();
2174  return true;
2175  }
2176  default:
2177  return false;
2178  }
2179 }
2181  switch (field_id) {
2182  case 19: {
2183  this->effect = value.as_string();
2184  return true;
2185  }
2186  default:
2187  return false;
2188  }
2189 }
2190 bool LightCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
2191  switch (field_id) {
2192  case 1: {
2193  this->key = value.as_fixed32();
2194  return true;
2195  }
2196  case 5: {
2197  this->brightness = value.as_float();
2198  return true;
2199  }
2200  case 21: {
2201  this->color_brightness = value.as_float();
2202  return true;
2203  }
2204  case 7: {
2205  this->red = value.as_float();
2206  return true;
2207  }
2208  case 8: {
2209  this->green = value.as_float();
2210  return true;
2211  }
2212  case 9: {
2213  this->blue = value.as_float();
2214  return true;
2215  }
2216  case 11: {
2217  this->white = value.as_float();
2218  return true;
2219  }
2220  case 13: {
2221  this->color_temperature = value.as_float();
2222  return true;
2223  }
2224  case 25: {
2225  this->cold_white = value.as_float();
2226  return true;
2227  }
2228  case 27: {
2229  this->warm_white = value.as_float();
2230  return true;
2231  }
2232  default:
2233  return false;
2234  }
2235 }
2237  buffer.encode_fixed32(1, this->key);
2238  buffer.encode_bool(2, this->has_state);
2239  buffer.encode_bool(3, this->state);
2240  buffer.encode_bool(4, this->has_brightness);
2241  buffer.encode_float(5, this->brightness);
2242  buffer.encode_bool(22, this->has_color_mode);
2243  buffer.encode_enum<enums::ColorMode>(23, this->color_mode);
2244  buffer.encode_bool(20, this->has_color_brightness);
2245  buffer.encode_float(21, this->color_brightness);
2246  buffer.encode_bool(6, this->has_rgb);
2247  buffer.encode_float(7, this->red);
2248  buffer.encode_float(8, this->green);
2249  buffer.encode_float(9, this->blue);
2250  buffer.encode_bool(10, this->has_white);
2251  buffer.encode_float(11, this->white);
2252  buffer.encode_bool(12, this->has_color_temperature);
2253  buffer.encode_float(13, this->color_temperature);
2254  buffer.encode_bool(24, this->has_cold_white);
2255  buffer.encode_float(25, this->cold_white);
2256  buffer.encode_bool(26, this->has_warm_white);
2257  buffer.encode_float(27, this->warm_white);
2258  buffer.encode_bool(14, this->has_transition_length);
2259  buffer.encode_uint32(15, this->transition_length);
2260  buffer.encode_bool(16, this->has_flash_length);
2261  buffer.encode_uint32(17, this->flash_length);
2262  buffer.encode_bool(18, this->has_effect);
2263  buffer.encode_string(19, this->effect);
2264 }
2265 #ifdef HAS_PROTO_MESSAGE_DUMP
2266 void LightCommandRequest::dump_to(std::string &out) const {
2267  __attribute__((unused)) char buffer[64];
2268  out.append("LightCommandRequest {\n");
2269  out.append(" key: ");
2270  sprintf(buffer, "%" PRIu32, this->key);
2271  out.append(buffer);
2272  out.append("\n");
2273 
2274  out.append(" has_state: ");
2275  out.append(YESNO(this->has_state));
2276  out.append("\n");
2277 
2278  out.append(" state: ");
2279  out.append(YESNO(this->state));
2280  out.append("\n");
2281 
2282  out.append(" has_brightness: ");
2283  out.append(YESNO(this->has_brightness));
2284  out.append("\n");
2285 
2286  out.append(" brightness: ");
2287  sprintf(buffer, "%g", this->brightness);
2288  out.append(buffer);
2289  out.append("\n");
2290 
2291  out.append(" has_color_mode: ");
2292  out.append(YESNO(this->has_color_mode));
2293  out.append("\n");
2294 
2295  out.append(" color_mode: ");
2296  out.append(proto_enum_to_string<enums::ColorMode>(this->color_mode));
2297  out.append("\n");
2298 
2299  out.append(" has_color_brightness: ");
2300  out.append(YESNO(this->has_color_brightness));
2301  out.append("\n");
2302 
2303  out.append(" color_brightness: ");
2304  sprintf(buffer, "%g", this->color_brightness);
2305  out.append(buffer);
2306  out.append("\n");
2307 
2308  out.append(" has_rgb: ");
2309  out.append(YESNO(this->has_rgb));
2310  out.append("\n");
2311 
2312  out.append(" red: ");
2313  sprintf(buffer, "%g", this->red);
2314  out.append(buffer);
2315  out.append("\n");
2316 
2317  out.append(" green: ");
2318  sprintf(buffer, "%g", this->green);
2319  out.append(buffer);
2320  out.append("\n");
2321 
2322  out.append(" blue: ");
2323  sprintf(buffer, "%g", this->blue);
2324  out.append(buffer);
2325  out.append("\n");
2326 
2327  out.append(" has_white: ");
2328  out.append(YESNO(this->has_white));
2329  out.append("\n");
2330 
2331  out.append(" white: ");
2332  sprintf(buffer, "%g", this->white);
2333  out.append(buffer);
2334  out.append("\n");
2335 
2336  out.append(" has_color_temperature: ");
2337  out.append(YESNO(this->has_color_temperature));
2338  out.append("\n");
2339 
2340  out.append(" color_temperature: ");
2341  sprintf(buffer, "%g", this->color_temperature);
2342  out.append(buffer);
2343  out.append("\n");
2344 
2345  out.append(" has_cold_white: ");
2346  out.append(YESNO(this->has_cold_white));
2347  out.append("\n");
2348 
2349  out.append(" cold_white: ");
2350  sprintf(buffer, "%g", this->cold_white);
2351  out.append(buffer);
2352  out.append("\n");
2353 
2354  out.append(" has_warm_white: ");
2355  out.append(YESNO(this->has_warm_white));
2356  out.append("\n");
2357 
2358  out.append(" warm_white: ");
2359  sprintf(buffer, "%g", this->warm_white);
2360  out.append(buffer);
2361  out.append("\n");
2362 
2363  out.append(" has_transition_length: ");
2364  out.append(YESNO(this->has_transition_length));
2365  out.append("\n");
2366 
2367  out.append(" transition_length: ");
2368  sprintf(buffer, "%" PRIu32, this->transition_length);
2369  out.append(buffer);
2370  out.append("\n");
2371 
2372  out.append(" has_flash_length: ");
2373  out.append(YESNO(this->has_flash_length));
2374  out.append("\n");
2375 
2376  out.append(" flash_length: ");
2377  sprintf(buffer, "%" PRIu32, this->flash_length);
2378  out.append(buffer);
2379  out.append("\n");
2380 
2381  out.append(" has_effect: ");
2382  out.append(YESNO(this->has_effect));
2383  out.append("\n");
2384 
2385  out.append(" effect: ");
2386  out.append("'").append(this->effect).append("'");
2387  out.append("\n");
2388  out.append("}");
2389 }
2390 #endif
2392  switch (field_id) {
2393  case 7: {
2394  this->accuracy_decimals = value.as_int32();
2395  return true;
2396  }
2397  case 8: {
2398  this->force_update = value.as_bool();
2399  return true;
2400  }
2401  case 10: {
2402  this->state_class = value.as_enum<enums::SensorStateClass>();
2403  return true;
2404  }
2405  case 11: {
2406  this->legacy_last_reset_type = value.as_enum<enums::SensorLastResetType>();
2407  return true;
2408  }
2409  case 12: {
2410  this->disabled_by_default = value.as_bool();
2411  return true;
2412  }
2413  case 13: {
2414  this->entity_category = value.as_enum<enums::EntityCategory>();
2415  return true;
2416  }
2417  default:
2418  return false;
2419  }
2420 }
2422  switch (field_id) {
2423  case 1: {
2424  this->object_id = value.as_string();
2425  return true;
2426  }
2427  case 3: {
2428  this->name = value.as_string();
2429  return true;
2430  }
2431  case 4: {
2432  this->unique_id = value.as_string();
2433  return true;
2434  }
2435  case 5: {
2436  this->icon = value.as_string();
2437  return true;
2438  }
2439  case 6: {
2440  this->unit_of_measurement = value.as_string();
2441  return true;
2442  }
2443  case 9: {
2444  this->device_class = value.as_string();
2445  return true;
2446  }
2447  default:
2448  return false;
2449  }
2450 }
2452  switch (field_id) {
2453  case 2: {
2454  this->key = value.as_fixed32();
2455  return true;
2456  }
2457  default:
2458  return false;
2459  }
2460 }
2462  buffer.encode_string(1, this->object_id);
2463  buffer.encode_fixed32(2, this->key);
2464  buffer.encode_string(3, this->name);
2465  buffer.encode_string(4, this->unique_id);
2466  buffer.encode_string(5, this->icon);
2467  buffer.encode_string(6, this->unit_of_measurement);
2468  buffer.encode_int32(7, this->accuracy_decimals);
2469  buffer.encode_bool(8, this->force_update);
2470  buffer.encode_string(9, this->device_class);
2471  buffer.encode_enum<enums::SensorStateClass>(10, this->state_class);
2472  buffer.encode_enum<enums::SensorLastResetType>(11, this->legacy_last_reset_type);
2473  buffer.encode_bool(12, this->disabled_by_default);
2474  buffer.encode_enum<enums::EntityCategory>(13, this->entity_category);
2475 }
2476 #ifdef HAS_PROTO_MESSAGE_DUMP
2477 void ListEntitiesSensorResponse::dump_to(std::string &out) const {
2478  __attribute__((unused)) char buffer[64];
2479  out.append("ListEntitiesSensorResponse {\n");
2480  out.append(" object_id: ");
2481  out.append("'").append(this->object_id).append("'");
2482  out.append("\n");
2483 
2484  out.append(" key: ");
2485  sprintf(buffer, "%" PRIu32, this->key);
2486  out.append(buffer);
2487  out.append("\n");
2488 
2489  out.append(" name: ");
2490  out.append("'").append(this->name).append("'");
2491  out.append("\n");
2492 
2493  out.append(" unique_id: ");
2494  out.append("'").append(this->unique_id).append("'");
2495  out.append("\n");
2496 
2497  out.append(" icon: ");
2498  out.append("'").append(this->icon).append("'");
2499  out.append("\n");
2500 
2501  out.append(" unit_of_measurement: ");
2502  out.append("'").append(this->unit_of_measurement).append("'");
2503  out.append("\n");
2504 
2505  out.append(" accuracy_decimals: ");
2506  sprintf(buffer, "%" PRId32, this->accuracy_decimals);
2507  out.append(buffer);
2508  out.append("\n");
2509 
2510  out.append(" force_update: ");
2511  out.append(YESNO(this->force_update));
2512  out.append("\n");
2513 
2514  out.append(" device_class: ");
2515  out.append("'").append(this->device_class).append("'");
2516  out.append("\n");
2517 
2518  out.append(" state_class: ");
2519  out.append(proto_enum_to_string<enums::SensorStateClass>(this->state_class));
2520  out.append("\n");
2521 
2522  out.append(" legacy_last_reset_type: ");
2523  out.append(proto_enum_to_string<enums::SensorLastResetType>(this->legacy_last_reset_type));
2524  out.append("\n");
2525 
2526  out.append(" disabled_by_default: ");
2527  out.append(YESNO(this->disabled_by_default));
2528  out.append("\n");
2529 
2530  out.append(" entity_category: ");
2531  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
2532  out.append("\n");
2533  out.append("}");
2534 }
2535 #endif
2536 bool SensorStateResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
2537  switch (field_id) {
2538  case 3: {
2539  this->missing_state = value.as_bool();
2540  return true;
2541  }
2542  default:
2543  return false;
2544  }
2545 }
2546 bool SensorStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
2547  switch (field_id) {
2548  case 1: {
2549  this->key = value.as_fixed32();
2550  return true;
2551  }
2552  case 2: {
2553  this->state = value.as_float();
2554  return true;
2555  }
2556  default:
2557  return false;
2558  }
2559 }
2561  buffer.encode_fixed32(1, this->key);
2562  buffer.encode_float(2, this->state);
2563  buffer.encode_bool(3, this->missing_state);
2564 }
2565 #ifdef HAS_PROTO_MESSAGE_DUMP
2566 void SensorStateResponse::dump_to(std::string &out) const {
2567  __attribute__((unused)) char buffer[64];
2568  out.append("SensorStateResponse {\n");
2569  out.append(" key: ");
2570  sprintf(buffer, "%" PRIu32, this->key);
2571  out.append(buffer);
2572  out.append("\n");
2573 
2574  out.append(" state: ");
2575  sprintf(buffer, "%g", this->state);
2576  out.append(buffer);
2577  out.append("\n");
2578 
2579  out.append(" missing_state: ");
2580  out.append(YESNO(this->missing_state));
2581  out.append("\n");
2582  out.append("}");
2583 }
2584 #endif
2586  switch (field_id) {
2587  case 6: {
2588  this->assumed_state = value.as_bool();
2589  return true;
2590  }
2591  case 7: {
2592  this->disabled_by_default = value.as_bool();
2593  return true;
2594  }
2595  case 8: {
2596  this->entity_category = value.as_enum<enums::EntityCategory>();
2597  return true;
2598  }
2599  default:
2600  return false;
2601  }
2602 }
2604  switch (field_id) {
2605  case 1: {
2606  this->object_id = value.as_string();
2607  return true;
2608  }
2609  case 3: {
2610  this->name = value.as_string();
2611  return true;
2612  }
2613  case 4: {
2614  this->unique_id = value.as_string();
2615  return true;
2616  }
2617  case 5: {
2618  this->icon = value.as_string();
2619  return true;
2620  }
2621  case 9: {
2622  this->device_class = value.as_string();
2623  return true;
2624  }
2625  default:
2626  return false;
2627  }
2628 }
2630  switch (field_id) {
2631  case 2: {
2632  this->key = value.as_fixed32();
2633  return true;
2634  }
2635  default:
2636  return false;
2637  }
2638 }
2640  buffer.encode_string(1, this->object_id);
2641  buffer.encode_fixed32(2, this->key);
2642  buffer.encode_string(3, this->name);
2643  buffer.encode_string(4, this->unique_id);
2644  buffer.encode_string(5, this->icon);
2645  buffer.encode_bool(6, this->assumed_state);
2646  buffer.encode_bool(7, this->disabled_by_default);
2647  buffer.encode_enum<enums::EntityCategory>(8, this->entity_category);
2648  buffer.encode_string(9, this->device_class);
2649 }
2650 #ifdef HAS_PROTO_MESSAGE_DUMP
2651 void ListEntitiesSwitchResponse::dump_to(std::string &out) const {
2652  __attribute__((unused)) char buffer[64];
2653  out.append("ListEntitiesSwitchResponse {\n");
2654  out.append(" object_id: ");
2655  out.append("'").append(this->object_id).append("'");
2656  out.append("\n");
2657 
2658  out.append(" key: ");
2659  sprintf(buffer, "%" PRIu32, this->key);
2660  out.append(buffer);
2661  out.append("\n");
2662 
2663  out.append(" name: ");
2664  out.append("'").append(this->name).append("'");
2665  out.append("\n");
2666 
2667  out.append(" unique_id: ");
2668  out.append("'").append(this->unique_id).append("'");
2669  out.append("\n");
2670 
2671  out.append(" icon: ");
2672  out.append("'").append(this->icon).append("'");
2673  out.append("\n");
2674 
2675  out.append(" assumed_state: ");
2676  out.append(YESNO(this->assumed_state));
2677  out.append("\n");
2678 
2679  out.append(" disabled_by_default: ");
2680  out.append(YESNO(this->disabled_by_default));
2681  out.append("\n");
2682 
2683  out.append(" entity_category: ");
2684  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
2685  out.append("\n");
2686 
2687  out.append(" device_class: ");
2688  out.append("'").append(this->device_class).append("'");
2689  out.append("\n");
2690  out.append("}");
2691 }
2692 #endif
2693 bool SwitchStateResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
2694  switch (field_id) {
2695  case 2: {
2696  this->state = value.as_bool();
2697  return true;
2698  }
2699  default:
2700  return false;
2701  }
2702 }
2703 bool SwitchStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
2704  switch (field_id) {
2705  case 1: {
2706  this->key = value.as_fixed32();
2707  return true;
2708  }
2709  default:
2710  return false;
2711  }
2712 }
2714  buffer.encode_fixed32(1, this->key);
2715  buffer.encode_bool(2, this->state);
2716 }
2717 #ifdef HAS_PROTO_MESSAGE_DUMP
2718 void SwitchStateResponse::dump_to(std::string &out) const {
2719  __attribute__((unused)) char buffer[64];
2720  out.append("SwitchStateResponse {\n");
2721  out.append(" key: ");
2722  sprintf(buffer, "%" PRIu32, this->key);
2723  out.append(buffer);
2724  out.append("\n");
2725 
2726  out.append(" state: ");
2727  out.append(YESNO(this->state));
2728  out.append("\n");
2729  out.append("}");
2730 }
2731 #endif
2732 bool SwitchCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
2733  switch (field_id) {
2734  case 2: {
2735  this->state = value.as_bool();
2736  return true;
2737  }
2738  default:
2739  return false;
2740  }
2741 }
2742 bool SwitchCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
2743  switch (field_id) {
2744  case 1: {
2745  this->key = value.as_fixed32();
2746  return true;
2747  }
2748  default:
2749  return false;
2750  }
2751 }
2753  buffer.encode_fixed32(1, this->key);
2754  buffer.encode_bool(2, this->state);
2755 }
2756 #ifdef HAS_PROTO_MESSAGE_DUMP
2757 void SwitchCommandRequest::dump_to(std::string &out) const {
2758  __attribute__((unused)) char buffer[64];
2759  out.append("SwitchCommandRequest {\n");
2760  out.append(" key: ");
2761  sprintf(buffer, "%" PRIu32, this->key);
2762  out.append(buffer);
2763  out.append("\n");
2764 
2765  out.append(" state: ");
2766  out.append(YESNO(this->state));
2767  out.append("\n");
2768  out.append("}");
2769 }
2770 #endif
2772  switch (field_id) {
2773  case 6: {
2774  this->disabled_by_default = value.as_bool();
2775  return true;
2776  }
2777  case 7: {
2778  this->entity_category = value.as_enum<enums::EntityCategory>();
2779  return true;
2780  }
2781  default:
2782  return false;
2783  }
2784 }
2786  switch (field_id) {
2787  case 1: {
2788  this->object_id = value.as_string();
2789  return true;
2790  }
2791  case 3: {
2792  this->name = value.as_string();
2793  return true;
2794  }
2795  case 4: {
2796  this->unique_id = value.as_string();
2797  return true;
2798  }
2799  case 5: {
2800  this->icon = value.as_string();
2801  return true;
2802  }
2803  case 8: {
2804  this->device_class = value.as_string();
2805  return true;
2806  }
2807  default:
2808  return false;
2809  }
2810 }
2812  switch (field_id) {
2813  case 2: {
2814  this->key = value.as_fixed32();
2815  return true;
2816  }
2817  default:
2818  return false;
2819  }
2820 }
2822  buffer.encode_string(1, this->object_id);
2823  buffer.encode_fixed32(2, this->key);
2824  buffer.encode_string(3, this->name);
2825  buffer.encode_string(4, this->unique_id);
2826  buffer.encode_string(5, this->icon);
2827  buffer.encode_bool(6, this->disabled_by_default);
2828  buffer.encode_enum<enums::EntityCategory>(7, this->entity_category);
2829  buffer.encode_string(8, this->device_class);
2830 }
2831 #ifdef HAS_PROTO_MESSAGE_DUMP
2832 void ListEntitiesTextSensorResponse::dump_to(std::string &out) const {
2833  __attribute__((unused)) char buffer[64];
2834  out.append("ListEntitiesTextSensorResponse {\n");
2835  out.append(" object_id: ");
2836  out.append("'").append(this->object_id).append("'");
2837  out.append("\n");
2838 
2839  out.append(" key: ");
2840  sprintf(buffer, "%" PRIu32, this->key);
2841  out.append(buffer);
2842  out.append("\n");
2843 
2844  out.append(" name: ");
2845  out.append("'").append(this->name).append("'");
2846  out.append("\n");
2847 
2848  out.append(" unique_id: ");
2849  out.append("'").append(this->unique_id).append("'");
2850  out.append("\n");
2851 
2852  out.append(" icon: ");
2853  out.append("'").append(this->icon).append("'");
2854  out.append("\n");
2855 
2856  out.append(" disabled_by_default: ");
2857  out.append(YESNO(this->disabled_by_default));
2858  out.append("\n");
2859 
2860  out.append(" entity_category: ");
2861  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
2862  out.append("\n");
2863 
2864  out.append(" device_class: ");
2865  out.append("'").append(this->device_class).append("'");
2866  out.append("\n");
2867  out.append("}");
2868 }
2869 #endif
2870 bool TextSensorStateResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
2871  switch (field_id) {
2872  case 3: {
2873  this->missing_state = value.as_bool();
2874  return true;
2875  }
2876  default:
2877  return false;
2878  }
2879 }
2881  switch (field_id) {
2882  case 2: {
2883  this->state = value.as_string();
2884  return true;
2885  }
2886  default:
2887  return false;
2888  }
2889 }
2890 bool TextSensorStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
2891  switch (field_id) {
2892  case 1: {
2893  this->key = value.as_fixed32();
2894  return true;
2895  }
2896  default:
2897  return false;
2898  }
2899 }
2901  buffer.encode_fixed32(1, this->key);
2902  buffer.encode_string(2, this->state);
2903  buffer.encode_bool(3, this->missing_state);
2904 }
2905 #ifdef HAS_PROTO_MESSAGE_DUMP
2906 void TextSensorStateResponse::dump_to(std::string &out) const {
2907  __attribute__((unused)) char buffer[64];
2908  out.append("TextSensorStateResponse {\n");
2909  out.append(" key: ");
2910  sprintf(buffer, "%" PRIu32, this->key);
2911  out.append(buffer);
2912  out.append("\n");
2913 
2914  out.append(" state: ");
2915  out.append("'").append(this->state).append("'");
2916  out.append("\n");
2917 
2918  out.append(" missing_state: ");
2919  out.append(YESNO(this->missing_state));
2920  out.append("\n");
2921  out.append("}");
2922 }
2923 #endif
2924 bool SubscribeLogsRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
2925  switch (field_id) {
2926  case 1: {
2927  this->level = value.as_enum<enums::LogLevel>();
2928  return true;
2929  }
2930  case 2: {
2931  this->dump_config = value.as_bool();
2932  return true;
2933  }
2934  default:
2935  return false;
2936  }
2937 }
2939  buffer.encode_enum<enums::LogLevel>(1, this->level);
2940  buffer.encode_bool(2, this->dump_config);
2941 }
2942 #ifdef HAS_PROTO_MESSAGE_DUMP
2943 void SubscribeLogsRequest::dump_to(std::string &out) const {
2944  __attribute__((unused)) char buffer[64];
2945  out.append("SubscribeLogsRequest {\n");
2946  out.append(" level: ");
2947  out.append(proto_enum_to_string<enums::LogLevel>(this->level));
2948  out.append("\n");
2949 
2950  out.append(" dump_config: ");
2951  out.append(YESNO(this->dump_config));
2952  out.append("\n");
2953  out.append("}");
2954 }
2955 #endif
2956 bool SubscribeLogsResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
2957  switch (field_id) {
2958  case 1: {
2959  this->level = value.as_enum<enums::LogLevel>();
2960  return true;
2961  }
2962  case 4: {
2963  this->send_failed = value.as_bool();
2964  return true;
2965  }
2966  default:
2967  return false;
2968  }
2969 }
2971  switch (field_id) {
2972  case 3: {
2973  this->message = value.as_string();
2974  return true;
2975  }
2976  default:
2977  return false;
2978  }
2979 }
2981  buffer.encode_enum<enums::LogLevel>(1, this->level);
2982  buffer.encode_string(3, this->message);
2983  buffer.encode_bool(4, this->send_failed);
2984 }
2985 #ifdef HAS_PROTO_MESSAGE_DUMP
2986 void SubscribeLogsResponse::dump_to(std::string &out) const {
2987  __attribute__((unused)) char buffer[64];
2988  out.append("SubscribeLogsResponse {\n");
2989  out.append(" level: ");
2990  out.append(proto_enum_to_string<enums::LogLevel>(this->level));
2991  out.append("\n");
2992 
2993  out.append(" message: ");
2994  out.append("'").append(this->message).append("'");
2995  out.append("\n");
2996 
2997  out.append(" send_failed: ");
2998  out.append(YESNO(this->send_failed));
2999  out.append("\n");
3000  out.append("}");
3001 }
3002 #endif
3004 #ifdef HAS_PROTO_MESSAGE_DUMP
3006  out.append("SubscribeHomeassistantServicesRequest {}");
3007 }
3008 #endif
3010  switch (field_id) {
3011  case 1: {
3012  this->key = value.as_string();
3013  return true;
3014  }
3015  case 2: {
3016  this->value = value.as_string();
3017  return true;
3018  }
3019  default:
3020  return false;
3021  }
3022 }
3024  buffer.encode_string(1, this->key);
3025  buffer.encode_string(2, this->value);
3026 }
3027 #ifdef HAS_PROTO_MESSAGE_DUMP
3028 void HomeassistantServiceMap::dump_to(std::string &out) const {
3029  __attribute__((unused)) char buffer[64];
3030  out.append("HomeassistantServiceMap {\n");
3031  out.append(" key: ");
3032  out.append("'").append(this->key).append("'");
3033  out.append("\n");
3034 
3035  out.append(" value: ");
3036  out.append("'").append(this->value).append("'");
3037  out.append("\n");
3038  out.append("}");
3039 }
3040 #endif
3042  switch (field_id) {
3043  case 5: {
3044  this->is_event = value.as_bool();
3045  return true;
3046  }
3047  default:
3048  return false;
3049  }
3050 }
3052  switch (field_id) {
3053  case 1: {
3054  this->service = value.as_string();
3055  return true;
3056  }
3057  case 2: {
3058  this->data.push_back(value.as_message<HomeassistantServiceMap>());
3059  return true;
3060  }
3061  case 3: {
3062  this->data_template.push_back(value.as_message<HomeassistantServiceMap>());
3063  return true;
3064  }
3065  case 4: {
3066  this->variables.push_back(value.as_message<HomeassistantServiceMap>());
3067  return true;
3068  }
3069  default:
3070  return false;
3071  }
3072 }
3074  buffer.encode_string(1, this->service);
3075  for (auto &it : this->data) {
3076  buffer.encode_message<HomeassistantServiceMap>(2, it, true);
3077  }
3078  for (auto &it : this->data_template) {
3079  buffer.encode_message<HomeassistantServiceMap>(3, it, true);
3080  }
3081  for (auto &it : this->variables) {
3082  buffer.encode_message<HomeassistantServiceMap>(4, it, true);
3083  }
3084  buffer.encode_bool(5, this->is_event);
3085 }
3086 #ifdef HAS_PROTO_MESSAGE_DUMP
3087 void HomeassistantServiceResponse::dump_to(std::string &out) const {
3088  __attribute__((unused)) char buffer[64];
3089  out.append("HomeassistantServiceResponse {\n");
3090  out.append(" service: ");
3091  out.append("'").append(this->service).append("'");
3092  out.append("\n");
3093 
3094  for (const auto &it : this->data) {
3095  out.append(" data: ");
3096  it.dump_to(out);
3097  out.append("\n");
3098  }
3099 
3100  for (const auto &it : this->data_template) {
3101  out.append(" data_template: ");
3102  it.dump_to(out);
3103  out.append("\n");
3104  }
3105 
3106  for (const auto &it : this->variables) {
3107  out.append(" variables: ");
3108  it.dump_to(out);
3109  out.append("\n");
3110  }
3111 
3112  out.append(" is_event: ");
3113  out.append(YESNO(this->is_event));
3114  out.append("\n");
3115  out.append("}");
3116 }
3117 #endif
3119 #ifdef HAS_PROTO_MESSAGE_DUMP
3120 void SubscribeHomeAssistantStatesRequest::dump_to(std::string &out) const {
3121  out.append("SubscribeHomeAssistantStatesRequest {}");
3122 }
3123 #endif
3125  switch (field_id) {
3126  case 3: {
3127  this->once = value.as_bool();
3128  return true;
3129  }
3130  default:
3131  return false;
3132  }
3133 }
3135  switch (field_id) {
3136  case 1: {
3137  this->entity_id = value.as_string();
3138  return true;
3139  }
3140  case 2: {
3141  this->attribute = value.as_string();
3142  return true;
3143  }
3144  default:
3145  return false;
3146  }
3147 }
3149  buffer.encode_string(1, this->entity_id);
3150  buffer.encode_string(2, this->attribute);
3151  buffer.encode_bool(3, this->once);
3152 }
3153 #ifdef HAS_PROTO_MESSAGE_DUMP
3154 void SubscribeHomeAssistantStateResponse::dump_to(std::string &out) const {
3155  __attribute__((unused)) char buffer[64];
3156  out.append("SubscribeHomeAssistantStateResponse {\n");
3157  out.append(" entity_id: ");
3158  out.append("'").append(this->entity_id).append("'");
3159  out.append("\n");
3160 
3161  out.append(" attribute: ");
3162  out.append("'").append(this->attribute).append("'");
3163  out.append("\n");
3164 
3165  out.append(" once: ");
3166  out.append(YESNO(this->once));
3167  out.append("\n");
3168  out.append("}");
3169 }
3170 #endif
3172  switch (field_id) {
3173  case 1: {
3174  this->entity_id = value.as_string();
3175  return true;
3176  }
3177  case 2: {
3178  this->state = value.as_string();
3179  return true;
3180  }
3181  case 3: {
3182  this->attribute = value.as_string();
3183  return true;
3184  }
3185  default:
3186  return false;
3187  }
3188 }
3190  buffer.encode_string(1, this->entity_id);
3191  buffer.encode_string(2, this->state);
3192  buffer.encode_string(3, this->attribute);
3193 }
3194 #ifdef HAS_PROTO_MESSAGE_DUMP
3195 void HomeAssistantStateResponse::dump_to(std::string &out) const {
3196  __attribute__((unused)) char buffer[64];
3197  out.append("HomeAssistantStateResponse {\n");
3198  out.append(" entity_id: ");
3199  out.append("'").append(this->entity_id).append("'");
3200  out.append("\n");
3201 
3202  out.append(" state: ");
3203  out.append("'").append(this->state).append("'");
3204  out.append("\n");
3205 
3206  out.append(" attribute: ");
3207  out.append("'").append(this->attribute).append("'");
3208  out.append("\n");
3209  out.append("}");
3210 }
3211 #endif
3213 #ifdef HAS_PROTO_MESSAGE_DUMP
3214 void GetTimeRequest::dump_to(std::string &out) const { out.append("GetTimeRequest {}"); }
3215 #endif
3216 bool GetTimeResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
3217  switch (field_id) {
3218  case 1: {
3219  this->epoch_seconds = value.as_fixed32();
3220  return true;
3221  }
3222  default:
3223  return false;
3224  }
3225 }
3226 void GetTimeResponse::encode(ProtoWriteBuffer buffer) const { buffer.encode_fixed32(1, this->epoch_seconds); }
3227 #ifdef HAS_PROTO_MESSAGE_DUMP
3228 void GetTimeResponse::dump_to(std::string &out) const {
3229  __attribute__((unused)) char buffer[64];
3230  out.append("GetTimeResponse {\n");
3231  out.append(" epoch_seconds: ");
3232  sprintf(buffer, "%" PRIu32, this->epoch_seconds);
3233  out.append(buffer);
3234  out.append("\n");
3235  out.append("}");
3236 }
3237 #endif
3239  switch (field_id) {
3240  case 2: {
3241  this->type = value.as_enum<enums::ServiceArgType>();
3242  return true;
3243  }
3244  default:
3245  return false;
3246  }
3247 }
3249  switch (field_id) {
3250  case 1: {
3251  this->name = value.as_string();
3252  return true;
3253  }
3254  default:
3255  return false;
3256  }
3257 }
3259  buffer.encode_string(1, this->name);
3260  buffer.encode_enum<enums::ServiceArgType>(2, this->type);
3261 }
3262 #ifdef HAS_PROTO_MESSAGE_DUMP
3263 void ListEntitiesServicesArgument::dump_to(std::string &out) const {
3264  __attribute__((unused)) char buffer[64];
3265  out.append("ListEntitiesServicesArgument {\n");
3266  out.append(" name: ");
3267  out.append("'").append(this->name).append("'");
3268  out.append("\n");
3269 
3270  out.append(" type: ");
3271  out.append(proto_enum_to_string<enums::ServiceArgType>(this->type));
3272  out.append("\n");
3273  out.append("}");
3274 }
3275 #endif
3277  switch (field_id) {
3278  case 1: {
3279  this->name = value.as_string();
3280  return true;
3281  }
3282  case 3: {
3283  this->args.push_back(value.as_message<ListEntitiesServicesArgument>());
3284  return true;
3285  }
3286  default:
3287  return false;
3288  }
3289 }
3291  switch (field_id) {
3292  case 2: {
3293  this->key = value.as_fixed32();
3294  return true;
3295  }
3296  default:
3297  return false;
3298  }
3299 }
3301  buffer.encode_string(1, this->name);
3302  buffer.encode_fixed32(2, this->key);
3303  for (auto &it : this->args) {
3304  buffer.encode_message<ListEntitiesServicesArgument>(3, it, true);
3305  }
3306 }
3307 #ifdef HAS_PROTO_MESSAGE_DUMP
3308 void ListEntitiesServicesResponse::dump_to(std::string &out) const {
3309  __attribute__((unused)) char buffer[64];
3310  out.append("ListEntitiesServicesResponse {\n");
3311  out.append(" name: ");
3312  out.append("'").append(this->name).append("'");
3313  out.append("\n");
3314 
3315  out.append(" key: ");
3316  sprintf(buffer, "%" PRIu32, this->key);
3317  out.append(buffer);
3318  out.append("\n");
3319 
3320  for (const auto &it : this->args) {
3321  out.append(" args: ");
3322  it.dump_to(out);
3323  out.append("\n");
3324  }
3325  out.append("}");
3326 }
3327 #endif
3328 bool ExecuteServiceArgument::decode_varint(uint32_t field_id, ProtoVarInt value) {
3329  switch (field_id) {
3330  case 1: {
3331  this->bool_ = value.as_bool();
3332  return true;
3333  }
3334  case 2: {
3335  this->legacy_int = value.as_int32();
3336  return true;
3337  }
3338  case 5: {
3339  this->int_ = value.as_sint32();
3340  return true;
3341  }
3342  case 6: {
3343  this->bool_array.push_back(value.as_bool());
3344  return true;
3345  }
3346  case 7: {
3347  this->int_array.push_back(value.as_sint32());
3348  return true;
3349  }
3350  default:
3351  return false;
3352  }
3353 }
3355  switch (field_id) {
3356  case 4: {
3357  this->string_ = value.as_string();
3358  return true;
3359  }
3360  case 9: {
3361  this->string_array.push_back(value.as_string());
3362  return true;
3363  }
3364  default:
3365  return false;
3366  }
3367 }
3368 bool ExecuteServiceArgument::decode_32bit(uint32_t field_id, Proto32Bit value) {
3369  switch (field_id) {
3370  case 3: {
3371  this->float_ = value.as_float();
3372  return true;
3373  }
3374  case 8: {
3375  this->float_array.push_back(value.as_float());
3376  return true;
3377  }
3378  default:
3379  return false;
3380  }
3381 }
3383  buffer.encode_bool(1, this->bool_);
3384  buffer.encode_int32(2, this->legacy_int);
3385  buffer.encode_float(3, this->float_);
3386  buffer.encode_string(4, this->string_);
3387  buffer.encode_sint32(5, this->int_);
3388  for (auto it : this->bool_array) {
3389  buffer.encode_bool(6, it, true);
3390  }
3391  for (auto &it : this->int_array) {
3392  buffer.encode_sint32(7, it, true);
3393  }
3394  for (auto &it : this->float_array) {
3395  buffer.encode_float(8, it, true);
3396  }
3397  for (auto &it : this->string_array) {
3398  buffer.encode_string(9, it, true);
3399  }
3400 }
3401 #ifdef HAS_PROTO_MESSAGE_DUMP
3402 void ExecuteServiceArgument::dump_to(std::string &out) const {
3403  __attribute__((unused)) char buffer[64];
3404  out.append("ExecuteServiceArgument {\n");
3405  out.append(" bool_: ");
3406  out.append(YESNO(this->bool_));
3407  out.append("\n");
3408 
3409  out.append(" legacy_int: ");
3410  sprintf(buffer, "%" PRId32, this->legacy_int);
3411  out.append(buffer);
3412  out.append("\n");
3413 
3414  out.append(" float_: ");
3415  sprintf(buffer, "%g", this->float_);
3416  out.append(buffer);
3417  out.append("\n");
3418 
3419  out.append(" string_: ");
3420  out.append("'").append(this->string_).append("'");
3421  out.append("\n");
3422 
3423  out.append(" int_: ");
3424  sprintf(buffer, "%" PRId32, this->int_);
3425  out.append(buffer);
3426  out.append("\n");
3427 
3428  for (const auto it : this->bool_array) {
3429  out.append(" bool_array: ");
3430  out.append(YESNO(it));
3431  out.append("\n");
3432  }
3433 
3434  for (const auto &it : this->int_array) {
3435  out.append(" int_array: ");
3436  sprintf(buffer, "%" PRId32, it);
3437  out.append(buffer);
3438  out.append("\n");
3439  }
3440 
3441  for (const auto &it : this->float_array) {
3442  out.append(" float_array: ");
3443  sprintf(buffer, "%g", it);
3444  out.append(buffer);
3445  out.append("\n");
3446  }
3447 
3448  for (const auto &it : this->string_array) {
3449  out.append(" string_array: ");
3450  out.append("'").append(it).append("'");
3451  out.append("\n");
3452  }
3453  out.append("}");
3454 }
3455 #endif
3457  switch (field_id) {
3458  case 2: {
3459  this->args.push_back(value.as_message<ExecuteServiceArgument>());
3460  return true;
3461  }
3462  default:
3463  return false;
3464  }
3465 }
3466 bool ExecuteServiceRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
3467  switch (field_id) {
3468  case 1: {
3469  this->key = value.as_fixed32();
3470  return true;
3471  }
3472  default:
3473  return false;
3474  }
3475 }
3477  buffer.encode_fixed32(1, this->key);
3478  for (auto &it : this->args) {
3479  buffer.encode_message<ExecuteServiceArgument>(2, it, true);
3480  }
3481 }
3482 #ifdef HAS_PROTO_MESSAGE_DUMP
3483 void ExecuteServiceRequest::dump_to(std::string &out) const {
3484  __attribute__((unused)) char buffer[64];
3485  out.append("ExecuteServiceRequest {\n");
3486  out.append(" key: ");
3487  sprintf(buffer, "%" PRIu32, this->key);
3488  out.append(buffer);
3489  out.append("\n");
3490 
3491  for (const auto &it : this->args) {
3492  out.append(" args: ");
3493  it.dump_to(out);
3494  out.append("\n");
3495  }
3496  out.append("}");
3497 }
3498 #endif
3500  switch (field_id) {
3501  case 5: {
3502  this->disabled_by_default = value.as_bool();
3503  return true;
3504  }
3505  case 7: {
3506  this->entity_category = value.as_enum<enums::EntityCategory>();
3507  return true;
3508  }
3509  default:
3510  return false;
3511  }
3512 }
3514  switch (field_id) {
3515  case 1: {
3516  this->object_id = value.as_string();
3517  return true;
3518  }
3519  case 3: {
3520  this->name = value.as_string();
3521  return true;
3522  }
3523  case 4: {
3524  this->unique_id = value.as_string();
3525  return true;
3526  }
3527  case 6: {
3528  this->icon = value.as_string();
3529  return true;
3530  }
3531  default:
3532  return false;
3533  }
3534 }
3536  switch (field_id) {
3537  case 2: {
3538  this->key = value.as_fixed32();
3539  return true;
3540  }
3541  default:
3542  return false;
3543  }
3544 }
3546  buffer.encode_string(1, this->object_id);
3547  buffer.encode_fixed32(2, this->key);
3548  buffer.encode_string(3, this->name);
3549  buffer.encode_string(4, this->unique_id);
3550  buffer.encode_bool(5, this->disabled_by_default);
3551  buffer.encode_string(6, this->icon);
3552  buffer.encode_enum<enums::EntityCategory>(7, this->entity_category);
3553 }
3554 #ifdef HAS_PROTO_MESSAGE_DUMP
3555 void ListEntitiesCameraResponse::dump_to(std::string &out) const {
3556  __attribute__((unused)) char buffer[64];
3557  out.append("ListEntitiesCameraResponse {\n");
3558  out.append(" object_id: ");
3559  out.append("'").append(this->object_id).append("'");
3560  out.append("\n");
3561 
3562  out.append(" key: ");
3563  sprintf(buffer, "%" PRIu32, this->key);
3564  out.append(buffer);
3565  out.append("\n");
3566 
3567  out.append(" name: ");
3568  out.append("'").append(this->name).append("'");
3569  out.append("\n");
3570 
3571  out.append(" unique_id: ");
3572  out.append("'").append(this->unique_id).append("'");
3573  out.append("\n");
3574 
3575  out.append(" disabled_by_default: ");
3576  out.append(YESNO(this->disabled_by_default));
3577  out.append("\n");
3578 
3579  out.append(" icon: ");
3580  out.append("'").append(this->icon).append("'");
3581  out.append("\n");
3582 
3583  out.append(" entity_category: ");
3584  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
3585  out.append("\n");
3586  out.append("}");
3587 }
3588 #endif
3589 bool CameraImageResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
3590  switch (field_id) {
3591  case 3: {
3592  this->done = value.as_bool();
3593  return true;
3594  }
3595  default:
3596  return false;
3597  }
3598 }
3600  switch (field_id) {
3601  case 2: {
3602  this->data = value.as_string();
3603  return true;
3604  }
3605  default:
3606  return false;
3607  }
3608 }
3609 bool CameraImageResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
3610  switch (field_id) {
3611  case 1: {
3612  this->key = value.as_fixed32();
3613  return true;
3614  }
3615  default:
3616  return false;
3617  }
3618 }
3620  buffer.encode_fixed32(1, this->key);
3621  buffer.encode_string(2, this->data);
3622  buffer.encode_bool(3, this->done);
3623 }
3624 #ifdef HAS_PROTO_MESSAGE_DUMP
3625 void CameraImageResponse::dump_to(std::string &out) const {
3626  __attribute__((unused)) char buffer[64];
3627  out.append("CameraImageResponse {\n");
3628  out.append(" key: ");
3629  sprintf(buffer, "%" PRIu32, this->key);
3630  out.append(buffer);
3631  out.append("\n");
3632 
3633  out.append(" data: ");
3634  out.append("'").append(this->data).append("'");
3635  out.append("\n");
3636 
3637  out.append(" done: ");
3638  out.append(YESNO(this->done));
3639  out.append("\n");
3640  out.append("}");
3641 }
3642 #endif
3643 bool CameraImageRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
3644  switch (field_id) {
3645  case 1: {
3646  this->single = value.as_bool();
3647  return true;
3648  }
3649  case 2: {
3650  this->stream = value.as_bool();
3651  return true;
3652  }
3653  default:
3654  return false;
3655  }
3656 }
3658  buffer.encode_bool(1, this->single);
3659  buffer.encode_bool(2, this->stream);
3660 }
3661 #ifdef HAS_PROTO_MESSAGE_DUMP
3662 void CameraImageRequest::dump_to(std::string &out) const {
3663  __attribute__((unused)) char buffer[64];
3664  out.append("CameraImageRequest {\n");
3665  out.append(" single: ");
3666  out.append(YESNO(this->single));
3667  out.append("\n");
3668 
3669  out.append(" stream: ");
3670  out.append(YESNO(this->stream));
3671  out.append("\n");
3672  out.append("}");
3673 }
3674 #endif
3676  switch (field_id) {
3677  case 5: {
3678  this->supports_current_temperature = value.as_bool();
3679  return true;
3680  }
3681  case 6: {
3682  this->supports_two_point_target_temperature = value.as_bool();
3683  return true;
3684  }
3685  case 7: {
3686  this->supported_modes.push_back(value.as_enum<enums::ClimateMode>());
3687  return true;
3688  }
3689  case 11: {
3690  this->legacy_supports_away = value.as_bool();
3691  return true;
3692  }
3693  case 12: {
3694  this->supports_action = value.as_bool();
3695  return true;
3696  }
3697  case 13: {
3698  this->supported_fan_modes.push_back(value.as_enum<enums::ClimateFanMode>());
3699  return true;
3700  }
3701  case 14: {
3702  this->supported_swing_modes.push_back(value.as_enum<enums::ClimateSwingMode>());
3703  return true;
3704  }
3705  case 16: {
3706  this->supported_presets.push_back(value.as_enum<enums::ClimatePreset>());
3707  return true;
3708  }
3709  case 18: {
3710  this->disabled_by_default = value.as_bool();
3711  return true;
3712  }
3713  case 20: {
3714  this->entity_category = value.as_enum<enums::EntityCategory>();
3715  return true;
3716  }
3717  case 22: {
3718  this->supports_current_humidity = value.as_bool();
3719  return true;
3720  }
3721  case 23: {
3722  this->supports_target_humidity = value.as_bool();
3723  return true;
3724  }
3725  default:
3726  return false;
3727  }
3728 }
3730  switch (field_id) {
3731  case 1: {
3732  this->object_id = value.as_string();
3733  return true;
3734  }
3735  case 3: {
3736  this->name = value.as_string();
3737  return true;
3738  }
3739  case 4: {
3740  this->unique_id = value.as_string();
3741  return true;
3742  }
3743  case 15: {
3744  this->supported_custom_fan_modes.push_back(value.as_string());
3745  return true;
3746  }
3747  case 17: {
3748  this->supported_custom_presets.push_back(value.as_string());
3749  return true;
3750  }
3751  case 19: {
3752  this->icon = value.as_string();
3753  return true;
3754  }
3755  default:
3756  return false;
3757  }
3758 }
3760  switch (field_id) {
3761  case 2: {
3762  this->key = value.as_fixed32();
3763  return true;
3764  }
3765  case 8: {
3766  this->visual_min_temperature = value.as_float();
3767  return true;
3768  }
3769  case 9: {
3770  this->visual_max_temperature = value.as_float();
3771  return true;
3772  }
3773  case 10: {
3774  this->visual_target_temperature_step = value.as_float();
3775  return true;
3776  }
3777  case 21: {
3778  this->visual_current_temperature_step = value.as_float();
3779  return true;
3780  }
3781  case 24: {
3782  this->visual_min_humidity = value.as_float();
3783  return true;
3784  }
3785  case 25: {
3786  this->visual_max_humidity = value.as_float();
3787  return true;
3788  }
3789  default:
3790  return false;
3791  }
3792 }
3794  buffer.encode_string(1, this->object_id);
3795  buffer.encode_fixed32(2, this->key);
3796  buffer.encode_string(3, this->name);
3797  buffer.encode_string(4, this->unique_id);
3798  buffer.encode_bool(5, this->supports_current_temperature);
3799  buffer.encode_bool(6, this->supports_two_point_target_temperature);
3800  for (auto &it : this->supported_modes) {
3801  buffer.encode_enum<enums::ClimateMode>(7, it, true);
3802  }
3803  buffer.encode_float(8, this->visual_min_temperature);
3804  buffer.encode_float(9, this->visual_max_temperature);
3805  buffer.encode_float(10, this->visual_target_temperature_step);
3806  buffer.encode_bool(11, this->legacy_supports_away);
3807  buffer.encode_bool(12, this->supports_action);
3808  for (auto &it : this->supported_fan_modes) {
3809  buffer.encode_enum<enums::ClimateFanMode>(13, it, true);
3810  }
3811  for (auto &it : this->supported_swing_modes) {
3812  buffer.encode_enum<enums::ClimateSwingMode>(14, it, true);
3813  }
3814  for (auto &it : this->supported_custom_fan_modes) {
3815  buffer.encode_string(15, it, true);
3816  }
3817  for (auto &it : this->supported_presets) {
3818  buffer.encode_enum<enums::ClimatePreset>(16, it, true);
3819  }
3820  for (auto &it : this->supported_custom_presets) {
3821  buffer.encode_string(17, it, true);
3822  }
3823  buffer.encode_bool(18, this->disabled_by_default);
3824  buffer.encode_string(19, this->icon);
3825  buffer.encode_enum<enums::EntityCategory>(20, this->entity_category);
3826  buffer.encode_float(21, this->visual_current_temperature_step);
3827  buffer.encode_bool(22, this->supports_current_humidity);
3828  buffer.encode_bool(23, this->supports_target_humidity);
3829  buffer.encode_float(24, this->visual_min_humidity);
3830  buffer.encode_float(25, this->visual_max_humidity);
3831 }
3832 #ifdef HAS_PROTO_MESSAGE_DUMP
3833 void ListEntitiesClimateResponse::dump_to(std::string &out) const {
3834  __attribute__((unused)) char buffer[64];
3835  out.append("ListEntitiesClimateResponse {\n");
3836  out.append(" object_id: ");
3837  out.append("'").append(this->object_id).append("'");
3838  out.append("\n");
3839 
3840  out.append(" key: ");
3841  sprintf(buffer, "%" PRIu32, this->key);
3842  out.append(buffer);
3843  out.append("\n");
3844 
3845  out.append(" name: ");
3846  out.append("'").append(this->name).append("'");
3847  out.append("\n");
3848 
3849  out.append(" unique_id: ");
3850  out.append("'").append(this->unique_id).append("'");
3851  out.append("\n");
3852 
3853  out.append(" supports_current_temperature: ");
3854  out.append(YESNO(this->supports_current_temperature));
3855  out.append("\n");
3856 
3857  out.append(" supports_two_point_target_temperature: ");
3858  out.append(YESNO(this->supports_two_point_target_temperature));
3859  out.append("\n");
3860 
3861  for (const auto &it : this->supported_modes) {
3862  out.append(" supported_modes: ");
3863  out.append(proto_enum_to_string<enums::ClimateMode>(it));
3864  out.append("\n");
3865  }
3866 
3867  out.append(" visual_min_temperature: ");
3868  sprintf(buffer, "%g", this->visual_min_temperature);
3869  out.append(buffer);
3870  out.append("\n");
3871 
3872  out.append(" visual_max_temperature: ");
3873  sprintf(buffer, "%g", this->visual_max_temperature);
3874  out.append(buffer);
3875  out.append("\n");
3876 
3877  out.append(" visual_target_temperature_step: ");
3878  sprintf(buffer, "%g", this->visual_target_temperature_step);
3879  out.append(buffer);
3880  out.append("\n");
3881 
3882  out.append(" legacy_supports_away: ");
3883  out.append(YESNO(this->legacy_supports_away));
3884  out.append("\n");
3885 
3886  out.append(" supports_action: ");
3887  out.append(YESNO(this->supports_action));
3888  out.append("\n");
3889 
3890  for (const auto &it : this->supported_fan_modes) {
3891  out.append(" supported_fan_modes: ");
3892  out.append(proto_enum_to_string<enums::ClimateFanMode>(it));
3893  out.append("\n");
3894  }
3895 
3896  for (const auto &it : this->supported_swing_modes) {
3897  out.append(" supported_swing_modes: ");
3898  out.append(proto_enum_to_string<enums::ClimateSwingMode>(it));
3899  out.append("\n");
3900  }
3901 
3902  for (const auto &it : this->supported_custom_fan_modes) {
3903  out.append(" supported_custom_fan_modes: ");
3904  out.append("'").append(it).append("'");
3905  out.append("\n");
3906  }
3907 
3908  for (const auto &it : this->supported_presets) {
3909  out.append(" supported_presets: ");
3910  out.append(proto_enum_to_string<enums::ClimatePreset>(it));
3911  out.append("\n");
3912  }
3913 
3914  for (const auto &it : this->supported_custom_presets) {
3915  out.append(" supported_custom_presets: ");
3916  out.append("'").append(it).append("'");
3917  out.append("\n");
3918  }
3919 
3920  out.append(" disabled_by_default: ");
3921  out.append(YESNO(this->disabled_by_default));
3922  out.append("\n");
3923 
3924  out.append(" icon: ");
3925  out.append("'").append(this->icon).append("'");
3926  out.append("\n");
3927 
3928  out.append(" entity_category: ");
3929  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
3930  out.append("\n");
3931 
3932  out.append(" visual_current_temperature_step: ");
3933  sprintf(buffer, "%g", this->visual_current_temperature_step);
3934  out.append(buffer);
3935  out.append("\n");
3936 
3937  out.append(" supports_current_humidity: ");
3938  out.append(YESNO(this->supports_current_humidity));
3939  out.append("\n");
3940 
3941  out.append(" supports_target_humidity: ");
3942  out.append(YESNO(this->supports_target_humidity));
3943  out.append("\n");
3944 
3945  out.append(" visual_min_humidity: ");
3946  sprintf(buffer, "%g", this->visual_min_humidity);
3947  out.append(buffer);
3948  out.append("\n");
3949 
3950  out.append(" visual_max_humidity: ");
3951  sprintf(buffer, "%g", this->visual_max_humidity);
3952  out.append(buffer);
3953  out.append("\n");
3954  out.append("}");
3955 }
3956 #endif
3957 bool ClimateStateResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
3958  switch (field_id) {
3959  case 2: {
3960  this->mode = value.as_enum<enums::ClimateMode>();
3961  return true;
3962  }
3963  case 7: {
3964  this->unused_legacy_away = value.as_bool();
3965  return true;
3966  }
3967  case 8: {
3968  this->action = value.as_enum<enums::ClimateAction>();
3969  return true;
3970  }
3971  case 9: {
3972  this->fan_mode = value.as_enum<enums::ClimateFanMode>();
3973  return true;
3974  }
3975  case 10: {
3976  this->swing_mode = value.as_enum<enums::ClimateSwingMode>();
3977  return true;
3978  }
3979  case 12: {
3980  this->preset = value.as_enum<enums::ClimatePreset>();
3981  return true;
3982  }
3983  default:
3984  return false;
3985  }
3986 }
3988  switch (field_id) {
3989  case 11: {
3990  this->custom_fan_mode = value.as_string();
3991  return true;
3992  }
3993  case 13: {
3994  this->custom_preset = value.as_string();
3995  return true;
3996  }
3997  default:
3998  return false;
3999  }
4000 }
4001 bool ClimateStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
4002  switch (field_id) {
4003  case 1: {
4004  this->key = value.as_fixed32();
4005  return true;
4006  }
4007  case 3: {
4008  this->current_temperature = value.as_float();
4009  return true;
4010  }
4011  case 4: {
4012  this->target_temperature = value.as_float();
4013  return true;
4014  }
4015  case 5: {
4016  this->target_temperature_low = value.as_float();
4017  return true;
4018  }
4019  case 6: {
4020  this->target_temperature_high = value.as_float();
4021  return true;
4022  }
4023  case 14: {
4024  this->current_humidity = value.as_float();
4025  return true;
4026  }
4027  case 15: {
4028  this->target_humidity = value.as_float();
4029  return true;
4030  }
4031  default:
4032  return false;
4033  }
4034 }
4036  buffer.encode_fixed32(1, this->key);
4037  buffer.encode_enum<enums::ClimateMode>(2, this->mode);
4038  buffer.encode_float(3, this->current_temperature);
4039  buffer.encode_float(4, this->target_temperature);
4040  buffer.encode_float(5, this->target_temperature_low);
4041  buffer.encode_float(6, this->target_temperature_high);
4042  buffer.encode_bool(7, this->unused_legacy_away);
4043  buffer.encode_enum<enums::ClimateAction>(8, this->action);
4044  buffer.encode_enum<enums::ClimateFanMode>(9, this->fan_mode);
4045  buffer.encode_enum<enums::ClimateSwingMode>(10, this->swing_mode);
4046  buffer.encode_string(11, this->custom_fan_mode);
4047  buffer.encode_enum<enums::ClimatePreset>(12, this->preset);
4048  buffer.encode_string(13, this->custom_preset);
4049  buffer.encode_float(14, this->current_humidity);
4050  buffer.encode_float(15, this->target_humidity);
4051 }
4052 #ifdef HAS_PROTO_MESSAGE_DUMP
4053 void ClimateStateResponse::dump_to(std::string &out) const {
4054  __attribute__((unused)) char buffer[64];
4055  out.append("ClimateStateResponse {\n");
4056  out.append(" key: ");
4057  sprintf(buffer, "%" PRIu32, this->key);
4058  out.append(buffer);
4059  out.append("\n");
4060 
4061  out.append(" mode: ");
4062  out.append(proto_enum_to_string<enums::ClimateMode>(this->mode));
4063  out.append("\n");
4064 
4065  out.append(" current_temperature: ");
4066  sprintf(buffer, "%g", this->current_temperature);
4067  out.append(buffer);
4068  out.append("\n");
4069 
4070  out.append(" target_temperature: ");
4071  sprintf(buffer, "%g", this->target_temperature);
4072  out.append(buffer);
4073  out.append("\n");
4074 
4075  out.append(" target_temperature_low: ");
4076  sprintf(buffer, "%g", this->target_temperature_low);
4077  out.append(buffer);
4078  out.append("\n");
4079 
4080  out.append(" target_temperature_high: ");
4081  sprintf(buffer, "%g", this->target_temperature_high);
4082  out.append(buffer);
4083  out.append("\n");
4084 
4085  out.append(" unused_legacy_away: ");
4086  out.append(YESNO(this->unused_legacy_away));
4087  out.append("\n");
4088 
4089  out.append(" action: ");
4090  out.append(proto_enum_to_string<enums::ClimateAction>(this->action));
4091  out.append("\n");
4092 
4093  out.append(" fan_mode: ");
4094  out.append(proto_enum_to_string<enums::ClimateFanMode>(this->fan_mode));
4095  out.append("\n");
4096 
4097  out.append(" swing_mode: ");
4098  out.append(proto_enum_to_string<enums::ClimateSwingMode>(this->swing_mode));
4099  out.append("\n");
4100 
4101  out.append(" custom_fan_mode: ");
4102  out.append("'").append(this->custom_fan_mode).append("'");
4103  out.append("\n");
4104 
4105  out.append(" preset: ");
4106  out.append(proto_enum_to_string<enums::ClimatePreset>(this->preset));
4107  out.append("\n");
4108 
4109  out.append(" custom_preset: ");
4110  out.append("'").append(this->custom_preset).append("'");
4111  out.append("\n");
4112 
4113  out.append(" current_humidity: ");
4114  sprintf(buffer, "%g", this->current_humidity);
4115  out.append(buffer);
4116  out.append("\n");
4117 
4118  out.append(" target_humidity: ");
4119  sprintf(buffer, "%g", this->target_humidity);
4120  out.append(buffer);
4121  out.append("\n");
4122  out.append("}");
4123 }
4124 #endif
4125 bool ClimateCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
4126  switch (field_id) {
4127  case 2: {
4128  this->has_mode = value.as_bool();
4129  return true;
4130  }
4131  case 3: {
4132  this->mode = value.as_enum<enums::ClimateMode>();
4133  return true;
4134  }
4135  case 4: {
4136  this->has_target_temperature = value.as_bool();
4137  return true;
4138  }
4139  case 6: {
4140  this->has_target_temperature_low = value.as_bool();
4141  return true;
4142  }
4143  case 8: {
4144  this->has_target_temperature_high = value.as_bool();
4145  return true;
4146  }
4147  case 10: {
4148  this->unused_has_legacy_away = value.as_bool();
4149  return true;
4150  }
4151  case 11: {
4152  this->unused_legacy_away = value.as_bool();
4153  return true;
4154  }
4155  case 12: {
4156  this->has_fan_mode = value.as_bool();
4157  return true;
4158  }
4159  case 13: {
4160  this->fan_mode = value.as_enum<enums::ClimateFanMode>();
4161  return true;
4162  }
4163  case 14: {
4164  this->has_swing_mode = value.as_bool();
4165  return true;
4166  }
4167  case 15: {
4168  this->swing_mode = value.as_enum<enums::ClimateSwingMode>();
4169  return true;
4170  }
4171  case 16: {
4172  this->has_custom_fan_mode = value.as_bool();
4173  return true;
4174  }
4175  case 18: {
4176  this->has_preset = value.as_bool();
4177  return true;
4178  }
4179  case 19: {
4180  this->preset = value.as_enum<enums::ClimatePreset>();
4181  return true;
4182  }
4183  case 20: {
4184  this->has_custom_preset = value.as_bool();
4185  return true;
4186  }
4187  case 22: {
4188  this->has_target_humidity = value.as_bool();
4189  return true;
4190  }
4191  default:
4192  return false;
4193  }
4194 }
4196  switch (field_id) {
4197  case 17: {
4198  this->custom_fan_mode = value.as_string();
4199  return true;
4200  }
4201  case 21: {
4202  this->custom_preset = value.as_string();
4203  return true;
4204  }
4205  default:
4206  return false;
4207  }
4208 }
4209 bool ClimateCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
4210  switch (field_id) {
4211  case 1: {
4212  this->key = value.as_fixed32();
4213  return true;
4214  }
4215  case 5: {
4216  this->target_temperature = value.as_float();
4217  return true;
4218  }
4219  case 7: {
4220  this->target_temperature_low = value.as_float();
4221  return true;
4222  }
4223  case 9: {
4224  this->target_temperature_high = value.as_float();
4225  return true;
4226  }
4227  case 23: {
4228  this->target_humidity = value.as_float();
4229  return true;
4230  }
4231  default:
4232  return false;
4233  }
4234 }
4236  buffer.encode_fixed32(1, this->key);
4237  buffer.encode_bool(2, this->has_mode);
4238  buffer.encode_enum<enums::ClimateMode>(3, this->mode);
4239  buffer.encode_bool(4, this->has_target_temperature);
4240  buffer.encode_float(5, this->target_temperature);
4241  buffer.encode_bool(6, this->has_target_temperature_low);
4242  buffer.encode_float(7, this->target_temperature_low);
4243  buffer.encode_bool(8, this->has_target_temperature_high);
4244  buffer.encode_float(9, this->target_temperature_high);
4245  buffer.encode_bool(10, this->unused_has_legacy_away);
4246  buffer.encode_bool(11, this->unused_legacy_away);
4247  buffer.encode_bool(12, this->has_fan_mode);
4248  buffer.encode_enum<enums::ClimateFanMode>(13, this->fan_mode);
4249  buffer.encode_bool(14, this->has_swing_mode);
4250  buffer.encode_enum<enums::ClimateSwingMode>(15, this->swing_mode);
4251  buffer.encode_bool(16, this->has_custom_fan_mode);
4252  buffer.encode_string(17, this->custom_fan_mode);
4253  buffer.encode_bool(18, this->has_preset);
4254  buffer.encode_enum<enums::ClimatePreset>(19, this->preset);
4255  buffer.encode_bool(20, this->has_custom_preset);
4256  buffer.encode_string(21, this->custom_preset);
4257  buffer.encode_bool(22, this->has_target_humidity);
4258  buffer.encode_float(23, this->target_humidity);
4259 }
4260 #ifdef HAS_PROTO_MESSAGE_DUMP
4261 void ClimateCommandRequest::dump_to(std::string &out) const {
4262  __attribute__((unused)) char buffer[64];
4263  out.append("ClimateCommandRequest {\n");
4264  out.append(" key: ");
4265  sprintf(buffer, "%" PRIu32, this->key);
4266  out.append(buffer);
4267  out.append("\n");
4268 
4269  out.append(" has_mode: ");
4270  out.append(YESNO(this->has_mode));
4271  out.append("\n");
4272 
4273  out.append(" mode: ");
4274  out.append(proto_enum_to_string<enums::ClimateMode>(this->mode));
4275  out.append("\n");
4276 
4277  out.append(" has_target_temperature: ");
4278  out.append(YESNO(this->has_target_temperature));
4279  out.append("\n");
4280 
4281  out.append(" target_temperature: ");
4282  sprintf(buffer, "%g", this->target_temperature);
4283  out.append(buffer);
4284  out.append("\n");
4285 
4286  out.append(" has_target_temperature_low: ");
4287  out.append(YESNO(this->has_target_temperature_low));
4288  out.append("\n");
4289 
4290  out.append(" target_temperature_low: ");
4291  sprintf(buffer, "%g", this->target_temperature_low);
4292  out.append(buffer);
4293  out.append("\n");
4294 
4295  out.append(" has_target_temperature_high: ");
4296  out.append(YESNO(this->has_target_temperature_high));
4297  out.append("\n");
4298 
4299  out.append(" target_temperature_high: ");
4300  sprintf(buffer, "%g", this->target_temperature_high);
4301  out.append(buffer);
4302  out.append("\n");
4303 
4304  out.append(" unused_has_legacy_away: ");
4305  out.append(YESNO(this->unused_has_legacy_away));
4306  out.append("\n");
4307 
4308  out.append(" unused_legacy_away: ");
4309  out.append(YESNO(this->unused_legacy_away));
4310  out.append("\n");
4311 
4312  out.append(" has_fan_mode: ");
4313  out.append(YESNO(this->has_fan_mode));
4314  out.append("\n");
4315 
4316  out.append(" fan_mode: ");
4317  out.append(proto_enum_to_string<enums::ClimateFanMode>(this->fan_mode));
4318  out.append("\n");
4319 
4320  out.append(" has_swing_mode: ");
4321  out.append(YESNO(this->has_swing_mode));
4322  out.append("\n");
4323 
4324  out.append(" swing_mode: ");
4325  out.append(proto_enum_to_string<enums::ClimateSwingMode>(this->swing_mode));
4326  out.append("\n");
4327 
4328  out.append(" has_custom_fan_mode: ");
4329  out.append(YESNO(this->has_custom_fan_mode));
4330  out.append("\n");
4331 
4332  out.append(" custom_fan_mode: ");
4333  out.append("'").append(this->custom_fan_mode).append("'");
4334  out.append("\n");
4335 
4336  out.append(" has_preset: ");
4337  out.append(YESNO(this->has_preset));
4338  out.append("\n");
4339 
4340  out.append(" preset: ");
4341  out.append(proto_enum_to_string<enums::ClimatePreset>(this->preset));
4342  out.append("\n");
4343 
4344  out.append(" has_custom_preset: ");
4345  out.append(YESNO(this->has_custom_preset));
4346  out.append("\n");
4347 
4348  out.append(" custom_preset: ");
4349  out.append("'").append(this->custom_preset).append("'");
4350  out.append("\n");
4351 
4352  out.append(" has_target_humidity: ");
4353  out.append(YESNO(this->has_target_humidity));
4354  out.append("\n");
4355 
4356  out.append(" target_humidity: ");
4357  sprintf(buffer, "%g", this->target_humidity);
4358  out.append(buffer);
4359  out.append("\n");
4360  out.append("}");
4361 }
4362 #endif
4364  switch (field_id) {
4365  case 9: {
4366  this->disabled_by_default = value.as_bool();
4367  return true;
4368  }
4369  case 10: {
4370  this->entity_category = value.as_enum<enums::EntityCategory>();
4371  return true;
4372  }
4373  case 12: {
4374  this->mode = value.as_enum<enums::NumberMode>();
4375  return true;
4376  }
4377  default:
4378  return false;
4379  }
4380 }
4382  switch (field_id) {
4383  case 1: {
4384  this->object_id = value.as_string();
4385  return true;
4386  }
4387  case 3: {
4388  this->name = value.as_string();
4389  return true;
4390  }
4391  case 4: {
4392  this->unique_id = value.as_string();
4393  return true;
4394  }
4395  case 5: {
4396  this->icon = value.as_string();
4397  return true;
4398  }
4399  case 11: {
4400  this->unit_of_measurement = value.as_string();
4401  return true;
4402  }
4403  case 13: {
4404  this->device_class = value.as_string();
4405  return true;
4406  }
4407  default:
4408  return false;
4409  }
4410 }
4412  switch (field_id) {
4413  case 2: {
4414  this->key = value.as_fixed32();
4415  return true;
4416  }
4417  case 6: {
4418  this->min_value = value.as_float();
4419  return true;
4420  }
4421  case 7: {
4422  this->max_value = value.as_float();
4423  return true;
4424  }
4425  case 8: {
4426  this->step = value.as_float();
4427  return true;
4428  }
4429  default:
4430  return false;
4431  }
4432 }
4434  buffer.encode_string(1, this->object_id);
4435  buffer.encode_fixed32(2, this->key);
4436  buffer.encode_string(3, this->name);
4437  buffer.encode_string(4, this->unique_id);
4438  buffer.encode_string(5, this->icon);
4439  buffer.encode_float(6, this->min_value);
4440  buffer.encode_float(7, this->max_value);
4441  buffer.encode_float(8, this->step);
4442  buffer.encode_bool(9, this->disabled_by_default);
4443  buffer.encode_enum<enums::EntityCategory>(10, this->entity_category);
4444  buffer.encode_string(11, this->unit_of_measurement);
4445  buffer.encode_enum<enums::NumberMode>(12, this->mode);
4446  buffer.encode_string(13, this->device_class);
4447 }
4448 #ifdef HAS_PROTO_MESSAGE_DUMP
4449 void ListEntitiesNumberResponse::dump_to(std::string &out) const {
4450  __attribute__((unused)) char buffer[64];
4451  out.append("ListEntitiesNumberResponse {\n");
4452  out.append(" object_id: ");
4453  out.append("'").append(this->object_id).append("'");
4454  out.append("\n");
4455 
4456  out.append(" key: ");
4457  sprintf(buffer, "%" PRIu32, this->key);
4458  out.append(buffer);
4459  out.append("\n");
4460 
4461  out.append(" name: ");
4462  out.append("'").append(this->name).append("'");
4463  out.append("\n");
4464 
4465  out.append(" unique_id: ");
4466  out.append("'").append(this->unique_id).append("'");
4467  out.append("\n");
4468 
4469  out.append(" icon: ");
4470  out.append("'").append(this->icon).append("'");
4471  out.append("\n");
4472 
4473  out.append(" min_value: ");
4474  sprintf(buffer, "%g", this->min_value);
4475  out.append(buffer);
4476  out.append("\n");
4477 
4478  out.append(" max_value: ");
4479  sprintf(buffer, "%g", this->max_value);
4480  out.append(buffer);
4481  out.append("\n");
4482 
4483  out.append(" step: ");
4484  sprintf(buffer, "%g", this->step);
4485  out.append(buffer);
4486  out.append("\n");
4487 
4488  out.append(" disabled_by_default: ");
4489  out.append(YESNO(this->disabled_by_default));
4490  out.append("\n");
4491 
4492  out.append(" entity_category: ");
4493  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
4494  out.append("\n");
4495 
4496  out.append(" unit_of_measurement: ");
4497  out.append("'").append(this->unit_of_measurement).append("'");
4498  out.append("\n");
4499 
4500  out.append(" mode: ");
4501  out.append(proto_enum_to_string<enums::NumberMode>(this->mode));
4502  out.append("\n");
4503 
4504  out.append(" device_class: ");
4505  out.append("'").append(this->device_class).append("'");
4506  out.append("\n");
4507  out.append("}");
4508 }
4509 #endif
4510 bool NumberStateResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
4511  switch (field_id) {
4512  case 3: {
4513  this->missing_state = value.as_bool();
4514  return true;
4515  }
4516  default:
4517  return false;
4518  }
4519 }
4520 bool NumberStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
4521  switch (field_id) {
4522  case 1: {
4523  this->key = value.as_fixed32();
4524  return true;
4525  }
4526  case 2: {
4527  this->state = value.as_float();
4528  return true;
4529  }
4530  default:
4531  return false;
4532  }
4533 }
4535  buffer.encode_fixed32(1, this->key);
4536  buffer.encode_float(2, this->state);
4537  buffer.encode_bool(3, this->missing_state);
4538 }
4539 #ifdef HAS_PROTO_MESSAGE_DUMP
4540 void NumberStateResponse::dump_to(std::string &out) const {
4541  __attribute__((unused)) char buffer[64];
4542  out.append("NumberStateResponse {\n");
4543  out.append(" key: ");
4544  sprintf(buffer, "%" PRIu32, this->key);
4545  out.append(buffer);
4546  out.append("\n");
4547 
4548  out.append(" state: ");
4549  sprintf(buffer, "%g", this->state);
4550  out.append(buffer);
4551  out.append("\n");
4552 
4553  out.append(" missing_state: ");
4554  out.append(YESNO(this->missing_state));
4555  out.append("\n");
4556  out.append("}");
4557 }
4558 #endif
4559 bool NumberCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
4560  switch (field_id) {
4561  case 1: {
4562  this->key = value.as_fixed32();
4563  return true;
4564  }
4565  case 2: {
4566  this->state = value.as_float();
4567  return true;
4568  }
4569  default:
4570  return false;
4571  }
4572 }
4574  buffer.encode_fixed32(1, this->key);
4575  buffer.encode_float(2, this->state);
4576 }
4577 #ifdef HAS_PROTO_MESSAGE_DUMP
4578 void NumberCommandRequest::dump_to(std::string &out) const {
4579  __attribute__((unused)) char buffer[64];
4580  out.append("NumberCommandRequest {\n");
4581  out.append(" key: ");
4582  sprintf(buffer, "%" PRIu32, this->key);
4583  out.append(buffer);
4584  out.append("\n");
4585 
4586  out.append(" state: ");
4587  sprintf(buffer, "%g", this->state);
4588  out.append(buffer);
4589  out.append("\n");
4590  out.append("}");
4591 }
4592 #endif
4594  switch (field_id) {
4595  case 7: {
4596  this->disabled_by_default = value.as_bool();
4597  return true;
4598  }
4599  case 8: {
4600  this->entity_category = value.as_enum<enums::EntityCategory>();
4601  return true;
4602  }
4603  default:
4604  return false;
4605  }
4606 }
4608  switch (field_id) {
4609  case 1: {
4610  this->object_id = value.as_string();
4611  return true;
4612  }
4613  case 3: {
4614  this->name = value.as_string();
4615  return true;
4616  }
4617  case 4: {
4618  this->unique_id = value.as_string();
4619  return true;
4620  }
4621  case 5: {
4622  this->icon = value.as_string();
4623  return true;
4624  }
4625  case 6: {
4626  this->options.push_back(value.as_string());
4627  return true;
4628  }
4629  default:
4630  return false;
4631  }
4632 }
4634  switch (field_id) {
4635  case 2: {
4636  this->key = value.as_fixed32();
4637  return true;
4638  }
4639  default:
4640  return false;
4641  }
4642 }
4644  buffer.encode_string(1, this->object_id);
4645  buffer.encode_fixed32(2, this->key);
4646  buffer.encode_string(3, this->name);
4647  buffer.encode_string(4, this->unique_id);
4648  buffer.encode_string(5, this->icon);
4649  for (auto &it : this->options) {
4650  buffer.encode_string(6, it, true);
4651  }
4652  buffer.encode_bool(7, this->disabled_by_default);
4653  buffer.encode_enum<enums::EntityCategory>(8, this->entity_category);
4654 }
4655 #ifdef HAS_PROTO_MESSAGE_DUMP
4656 void ListEntitiesSelectResponse::dump_to(std::string &out) const {
4657  __attribute__((unused)) char buffer[64];
4658  out.append("ListEntitiesSelectResponse {\n");
4659  out.append(" object_id: ");
4660  out.append("'").append(this->object_id).append("'");
4661  out.append("\n");
4662 
4663  out.append(" key: ");
4664  sprintf(buffer, "%" PRIu32, this->key);
4665  out.append(buffer);
4666  out.append("\n");
4667 
4668  out.append(" name: ");
4669  out.append("'").append(this->name).append("'");
4670  out.append("\n");
4671 
4672  out.append(" unique_id: ");
4673  out.append("'").append(this->unique_id).append("'");
4674  out.append("\n");
4675 
4676  out.append(" icon: ");
4677  out.append("'").append(this->icon).append("'");
4678  out.append("\n");
4679 
4680  for (const auto &it : this->options) {
4681  out.append(" options: ");
4682  out.append("'").append(it).append("'");
4683  out.append("\n");
4684  }
4685 
4686  out.append(" disabled_by_default: ");
4687  out.append(YESNO(this->disabled_by_default));
4688  out.append("\n");
4689 
4690  out.append(" entity_category: ");
4691  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
4692  out.append("\n");
4693  out.append("}");
4694 }
4695 #endif
4696 bool SelectStateResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
4697  switch (field_id) {
4698  case 3: {
4699  this->missing_state = value.as_bool();
4700  return true;
4701  }
4702  default:
4703  return false;
4704  }
4705 }
4707  switch (field_id) {
4708  case 2: {
4709  this->state = value.as_string();
4710  return true;
4711  }
4712  default:
4713  return false;
4714  }
4715 }
4716 bool SelectStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
4717  switch (field_id) {
4718  case 1: {
4719  this->key = value.as_fixed32();
4720  return true;
4721  }
4722  default:
4723  return false;
4724  }
4725 }
4727  buffer.encode_fixed32(1, this->key);
4728  buffer.encode_string(2, this->state);
4729  buffer.encode_bool(3, this->missing_state);
4730 }
4731 #ifdef HAS_PROTO_MESSAGE_DUMP
4732 void SelectStateResponse::dump_to(std::string &out) const {
4733  __attribute__((unused)) char buffer[64];
4734  out.append("SelectStateResponse {\n");
4735  out.append(" key: ");
4736  sprintf(buffer, "%" PRIu32, this->key);
4737  out.append(buffer);
4738  out.append("\n");
4739 
4740  out.append(" state: ");
4741  out.append("'").append(this->state).append("'");
4742  out.append("\n");
4743 
4744  out.append(" missing_state: ");
4745  out.append(YESNO(this->missing_state));
4746  out.append("\n");
4747  out.append("}");
4748 }
4749 #endif
4751  switch (field_id) {
4752  case 2: {
4753  this->state = value.as_string();
4754  return true;
4755  }
4756  default:
4757  return false;
4758  }
4759 }
4760 bool SelectCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
4761  switch (field_id) {
4762  case 1: {
4763  this->key = value.as_fixed32();
4764  return true;
4765  }
4766  default:
4767  return false;
4768  }
4769 }
4771  buffer.encode_fixed32(1, this->key);
4772  buffer.encode_string(2, this->state);
4773 }
4774 #ifdef HAS_PROTO_MESSAGE_DUMP
4775 void SelectCommandRequest::dump_to(std::string &out) const {
4776  __attribute__((unused)) char buffer[64];
4777  out.append("SelectCommandRequest {\n");
4778  out.append(" key: ");
4779  sprintf(buffer, "%" PRIu32, this->key);
4780  out.append(buffer);
4781  out.append("\n");
4782 
4783  out.append(" state: ");
4784  out.append("'").append(this->state).append("'");
4785  out.append("\n");
4786  out.append("}");
4787 }
4788 #endif
4790  switch (field_id) {
4791  case 6: {
4792  this->disabled_by_default = value.as_bool();
4793  return true;
4794  }
4795  case 7: {
4796  this->entity_category = value.as_enum<enums::EntityCategory>();
4797  return true;
4798  }
4799  case 8: {
4800  this->assumed_state = value.as_bool();
4801  return true;
4802  }
4803  case 9: {
4804  this->supports_open = value.as_bool();
4805  return true;
4806  }
4807  case 10: {
4808  this->requires_code = value.as_bool();
4809  return true;
4810  }
4811  default:
4812  return false;
4813  }
4814 }
4816  switch (field_id) {
4817  case 1: {
4818  this->object_id = value.as_string();
4819  return true;
4820  }
4821  case 3: {
4822  this->name = value.as_string();
4823  return true;
4824  }
4825  case 4: {
4826  this->unique_id = value.as_string();
4827  return true;
4828  }
4829  case 5: {
4830  this->icon = value.as_string();
4831  return true;
4832  }
4833  case 11: {
4834  this->code_format = value.as_string();
4835  return true;
4836  }
4837  default:
4838  return false;
4839  }
4840 }
4841 bool ListEntitiesLockResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
4842  switch (field_id) {
4843  case 2: {
4844  this->key = value.as_fixed32();
4845  return true;
4846  }
4847  default:
4848  return false;
4849  }
4850 }
4852  buffer.encode_string(1, this->object_id);
4853  buffer.encode_fixed32(2, this->key);
4854  buffer.encode_string(3, this->name);
4855  buffer.encode_string(4, this->unique_id);
4856  buffer.encode_string(5, this->icon);
4857  buffer.encode_bool(6, this->disabled_by_default);
4858  buffer.encode_enum<enums::EntityCategory>(7, this->entity_category);
4859  buffer.encode_bool(8, this->assumed_state);
4860  buffer.encode_bool(9, this->supports_open);
4861  buffer.encode_bool(10, this->requires_code);
4862  buffer.encode_string(11, this->code_format);
4863 }
4864 #ifdef HAS_PROTO_MESSAGE_DUMP
4865 void ListEntitiesLockResponse::dump_to(std::string &out) const {
4866  __attribute__((unused)) char buffer[64];
4867  out.append("ListEntitiesLockResponse {\n");
4868  out.append(" object_id: ");
4869  out.append("'").append(this->object_id).append("'");
4870  out.append("\n");
4871 
4872  out.append(" key: ");
4873  sprintf(buffer, "%" PRIu32, this->key);
4874  out.append(buffer);
4875  out.append("\n");
4876 
4877  out.append(" name: ");
4878  out.append("'").append(this->name).append("'");
4879  out.append("\n");
4880 
4881  out.append(" unique_id: ");
4882  out.append("'").append(this->unique_id).append("'");
4883  out.append("\n");
4884 
4885  out.append(" icon: ");
4886  out.append("'").append(this->icon).append("'");
4887  out.append("\n");
4888 
4889  out.append(" disabled_by_default: ");
4890  out.append(YESNO(this->disabled_by_default));
4891  out.append("\n");
4892 
4893  out.append(" entity_category: ");
4894  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
4895  out.append("\n");
4896 
4897  out.append(" assumed_state: ");
4898  out.append(YESNO(this->assumed_state));
4899  out.append("\n");
4900 
4901  out.append(" supports_open: ");
4902  out.append(YESNO(this->supports_open));
4903  out.append("\n");
4904 
4905  out.append(" requires_code: ");
4906  out.append(YESNO(this->requires_code));
4907  out.append("\n");
4908 
4909  out.append(" code_format: ");
4910  out.append("'").append(this->code_format).append("'");
4911  out.append("\n");
4912  out.append("}");
4913 }
4914 #endif
4915 bool LockStateResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
4916  switch (field_id) {
4917  case 2: {
4918  this->state = value.as_enum<enums::LockState>();
4919  return true;
4920  }
4921  default:
4922  return false;
4923  }
4924 }
4925 bool LockStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
4926  switch (field_id) {
4927  case 1: {
4928  this->key = value.as_fixed32();
4929  return true;
4930  }
4931  default:
4932  return false;
4933  }
4934 }
4936  buffer.encode_fixed32(1, this->key);
4937  buffer.encode_enum<enums::LockState>(2, this->state);
4938 }
4939 #ifdef HAS_PROTO_MESSAGE_DUMP
4940 void LockStateResponse::dump_to(std::string &out) const {
4941  __attribute__((unused)) char buffer[64];
4942  out.append("LockStateResponse {\n");
4943  out.append(" key: ");
4944  sprintf(buffer, "%" PRIu32, this->key);
4945  out.append(buffer);
4946  out.append("\n");
4947 
4948  out.append(" state: ");
4949  out.append(proto_enum_to_string<enums::LockState>(this->state));
4950  out.append("\n");
4951  out.append("}");
4952 }
4953 #endif
4954 bool LockCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
4955  switch (field_id) {
4956  case 2: {
4957  this->command = value.as_enum<enums::LockCommand>();
4958  return true;
4959  }
4960  case 3: {
4961  this->has_code = value.as_bool();
4962  return true;
4963  }
4964  default:
4965  return false;
4966  }
4967 }
4969  switch (field_id) {
4970  case 4: {
4971  this->code = value.as_string();
4972  return true;
4973  }
4974  default:
4975  return false;
4976  }
4977 }
4978 bool LockCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
4979  switch (field_id) {
4980  case 1: {
4981  this->key = value.as_fixed32();
4982  return true;
4983  }
4984  default:
4985  return false;
4986  }
4987 }
4989  buffer.encode_fixed32(1, this->key);
4990  buffer.encode_enum<enums::LockCommand>(2, this->command);
4991  buffer.encode_bool(3, this->has_code);
4992  buffer.encode_string(4, this->code);
4993 }
4994 #ifdef HAS_PROTO_MESSAGE_DUMP
4995 void LockCommandRequest::dump_to(std::string &out) const {
4996  __attribute__((unused)) char buffer[64];
4997  out.append("LockCommandRequest {\n");
4998  out.append(" key: ");
4999  sprintf(buffer, "%" PRIu32, this->key);
5000  out.append(buffer);
5001  out.append("\n");
5002 
5003  out.append(" command: ");
5004  out.append(proto_enum_to_string<enums::LockCommand>(this->command));
5005  out.append("\n");
5006 
5007  out.append(" has_code: ");
5008  out.append(YESNO(this->has_code));
5009  out.append("\n");
5010 
5011  out.append(" code: ");
5012  out.append("'").append(this->code).append("'");
5013  out.append("\n");
5014  out.append("}");
5015 }
5016 #endif
5018  switch (field_id) {
5019  case 6: {
5020  this->disabled_by_default = value.as_bool();
5021  return true;
5022  }
5023  case 7: {
5024  this->entity_category = value.as_enum<enums::EntityCategory>();
5025  return true;
5026  }
5027  default:
5028  return false;
5029  }
5030 }
5032  switch (field_id) {
5033  case 1: {
5034  this->object_id = value.as_string();
5035  return true;
5036  }
5037  case 3: {
5038  this->name = value.as_string();
5039  return true;
5040  }
5041  case 4: {
5042  this->unique_id = value.as_string();
5043  return true;
5044  }
5045  case 5: {
5046  this->icon = value.as_string();
5047  return true;
5048  }
5049  case 8: {
5050  this->device_class = value.as_string();
5051  return true;
5052  }
5053  default:
5054  return false;
5055  }
5056 }
5058  switch (field_id) {
5059  case 2: {
5060  this->key = value.as_fixed32();
5061  return true;
5062  }
5063  default:
5064  return false;
5065  }
5066 }
5068  buffer.encode_string(1, this->object_id);
5069  buffer.encode_fixed32(2, this->key);
5070  buffer.encode_string(3, this->name);
5071  buffer.encode_string(4, this->unique_id);
5072  buffer.encode_string(5, this->icon);
5073  buffer.encode_bool(6, this->disabled_by_default);
5074  buffer.encode_enum<enums::EntityCategory>(7, this->entity_category);
5075  buffer.encode_string(8, this->device_class);
5076 }
5077 #ifdef HAS_PROTO_MESSAGE_DUMP
5078 void ListEntitiesButtonResponse::dump_to(std::string &out) const {
5079  __attribute__((unused)) char buffer[64];
5080  out.append("ListEntitiesButtonResponse {\n");
5081  out.append(" object_id: ");
5082  out.append("'").append(this->object_id).append("'");
5083  out.append("\n");
5084 
5085  out.append(" key: ");
5086  sprintf(buffer, "%" PRIu32, this->key);
5087  out.append(buffer);
5088  out.append("\n");
5089 
5090  out.append(" name: ");
5091  out.append("'").append(this->name).append("'");
5092  out.append("\n");
5093 
5094  out.append(" unique_id: ");
5095  out.append("'").append(this->unique_id).append("'");
5096  out.append("\n");
5097 
5098  out.append(" icon: ");
5099  out.append("'").append(this->icon).append("'");
5100  out.append("\n");
5101 
5102  out.append(" disabled_by_default: ");
5103  out.append(YESNO(this->disabled_by_default));
5104  out.append("\n");
5105 
5106  out.append(" entity_category: ");
5107  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
5108  out.append("\n");
5109 
5110  out.append(" device_class: ");
5111  out.append("'").append(this->device_class).append("'");
5112  out.append("\n");
5113  out.append("}");
5114 }
5115 #endif
5116 bool ButtonCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
5117  switch (field_id) {
5118  case 1: {
5119  this->key = value.as_fixed32();
5120  return true;
5121  }
5122  default:
5123  return false;
5124  }
5125 }
5126 void ButtonCommandRequest::encode(ProtoWriteBuffer buffer) const { buffer.encode_fixed32(1, this->key); }
5127 #ifdef HAS_PROTO_MESSAGE_DUMP
5128 void ButtonCommandRequest::dump_to(std::string &out) const {
5129  __attribute__((unused)) char buffer[64];
5130  out.append("ButtonCommandRequest {\n");
5131  out.append(" key: ");
5132  sprintf(buffer, "%" PRIu32, this->key);
5133  out.append(buffer);
5134  out.append("\n");
5135  out.append("}");
5136 }
5137 #endif
5139  switch (field_id) {
5140  case 2: {
5141  this->sample_rate = value.as_uint32();
5142  return true;
5143  }
5144  case 3: {
5145  this->num_channels = value.as_uint32();
5146  return true;
5147  }
5148  case 4: {
5149  this->purpose = value.as_enum<enums::MediaPlayerFormatPurpose>();
5150  return true;
5151  }
5152  case 5: {
5153  this->sample_bytes = value.as_uint32();
5154  return true;
5155  }
5156  default:
5157  return false;
5158  }
5159 }
5161  switch (field_id) {
5162  case 1: {
5163  this->format = value.as_string();
5164  return true;
5165  }
5166  default:
5167  return false;
5168  }
5169 }
5171  buffer.encode_string(1, this->format);
5172  buffer.encode_uint32(2, this->sample_rate);
5173  buffer.encode_uint32(3, this->num_channels);
5174  buffer.encode_enum<enums::MediaPlayerFormatPurpose>(4, this->purpose);
5175  buffer.encode_uint32(5, this->sample_bytes);
5176 }
5177 #ifdef HAS_PROTO_MESSAGE_DUMP
5178 void MediaPlayerSupportedFormat::dump_to(std::string &out) const {
5179  __attribute__((unused)) char buffer[64];
5180  out.append("MediaPlayerSupportedFormat {\n");
5181  out.append(" format: ");
5182  out.append("'").append(this->format).append("'");
5183  out.append("\n");
5184 
5185  out.append(" sample_rate: ");
5186  sprintf(buffer, "%" PRIu32, this->sample_rate);
5187  out.append(buffer);
5188  out.append("\n");
5189 
5190  out.append(" num_channels: ");
5191  sprintf(buffer, "%" PRIu32, this->num_channels);
5192  out.append(buffer);
5193  out.append("\n");
5194 
5195  out.append(" purpose: ");
5196  out.append(proto_enum_to_string<enums::MediaPlayerFormatPurpose>(this->purpose));
5197  out.append("\n");
5198 
5199  out.append(" sample_bytes: ");
5200  sprintf(buffer, "%" PRIu32, this->sample_bytes);
5201  out.append(buffer);
5202  out.append("\n");
5203  out.append("}");
5204 }
5205 #endif
5207  switch (field_id) {
5208  case 6: {
5209  this->disabled_by_default = value.as_bool();
5210  return true;
5211  }
5212  case 7: {
5213  this->entity_category = value.as_enum<enums::EntityCategory>();
5214  return true;
5215  }
5216  case 8: {
5217  this->supports_pause = value.as_bool();
5218  return true;
5219  }
5220  default:
5221  return false;
5222  }
5223 }
5225  switch (field_id) {
5226  case 1: {
5227  this->object_id = value.as_string();
5228  return true;
5229  }
5230  case 3: {
5231  this->name = value.as_string();
5232  return true;
5233  }
5234  case 4: {
5235  this->unique_id = value.as_string();
5236  return true;
5237  }
5238  case 5: {
5239  this->icon = value.as_string();
5240  return true;
5241  }
5242  case 9: {
5243  this->supported_formats.push_back(value.as_message<MediaPlayerSupportedFormat>());
5244  return true;
5245  }
5246  default:
5247  return false;
5248  }
5249 }
5251  switch (field_id) {
5252  case 2: {
5253  this->key = value.as_fixed32();
5254  return true;
5255  }
5256  default:
5257  return false;
5258  }
5259 }
5261  buffer.encode_string(1, this->object_id);
5262  buffer.encode_fixed32(2, this->key);
5263  buffer.encode_string(3, this->name);
5264  buffer.encode_string(4, this->unique_id);
5265  buffer.encode_string(5, this->icon);
5266  buffer.encode_bool(6, this->disabled_by_default);
5267  buffer.encode_enum<enums::EntityCategory>(7, this->entity_category);
5268  buffer.encode_bool(8, this->supports_pause);
5269  for (auto &it : this->supported_formats) {
5270  buffer.encode_message<MediaPlayerSupportedFormat>(9, it, true);
5271  }
5272 }
5273 #ifdef HAS_PROTO_MESSAGE_DUMP
5274 void ListEntitiesMediaPlayerResponse::dump_to(std::string &out) const {
5275  __attribute__((unused)) char buffer[64];
5276  out.append("ListEntitiesMediaPlayerResponse {\n");
5277  out.append(" object_id: ");
5278  out.append("'").append(this->object_id).append("'");
5279  out.append("\n");
5280 
5281  out.append(" key: ");
5282  sprintf(buffer, "%" PRIu32, this->key);
5283  out.append(buffer);
5284  out.append("\n");
5285 
5286  out.append(" name: ");
5287  out.append("'").append(this->name).append("'");
5288  out.append("\n");
5289 
5290  out.append(" unique_id: ");
5291  out.append("'").append(this->unique_id).append("'");
5292  out.append("\n");
5293 
5294  out.append(" icon: ");
5295  out.append("'").append(this->icon).append("'");
5296  out.append("\n");
5297 
5298  out.append(" disabled_by_default: ");
5299  out.append(YESNO(this->disabled_by_default));
5300  out.append("\n");
5301 
5302  out.append(" entity_category: ");
5303  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
5304  out.append("\n");
5305 
5306  out.append(" supports_pause: ");
5307  out.append(YESNO(this->supports_pause));
5308  out.append("\n");
5309 
5310  for (const auto &it : this->supported_formats) {
5311  out.append(" supported_formats: ");
5312  it.dump_to(out);
5313  out.append("\n");
5314  }
5315  out.append("}");
5316 }
5317 #endif
5319  switch (field_id) {
5320  case 2: {
5321  this->state = value.as_enum<enums::MediaPlayerState>();
5322  return true;
5323  }
5324  case 4: {
5325  this->muted = value.as_bool();
5326  return true;
5327  }
5328  default:
5329  return false;
5330  }
5331 }
5332 bool MediaPlayerStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
5333  switch (field_id) {
5334  case 1: {
5335  this->key = value.as_fixed32();
5336  return true;
5337  }
5338  case 3: {
5339  this->volume = value.as_float();
5340  return true;
5341  }
5342  default:
5343  return false;
5344  }
5345 }
5347  buffer.encode_fixed32(1, this->key);
5348  buffer.encode_enum<enums::MediaPlayerState>(2, this->state);
5349  buffer.encode_float(3, this->volume);
5350  buffer.encode_bool(4, this->muted);
5351 }
5352 #ifdef HAS_PROTO_MESSAGE_DUMP
5353 void MediaPlayerStateResponse::dump_to(std::string &out) const {
5354  __attribute__((unused)) char buffer[64];
5355  out.append("MediaPlayerStateResponse {\n");
5356  out.append(" key: ");
5357  sprintf(buffer, "%" PRIu32, this->key);
5358  out.append(buffer);
5359  out.append("\n");
5360 
5361  out.append(" state: ");
5362  out.append(proto_enum_to_string<enums::MediaPlayerState>(this->state));
5363  out.append("\n");
5364 
5365  out.append(" volume: ");
5366  sprintf(buffer, "%g", this->volume);
5367  out.append(buffer);
5368  out.append("\n");
5369 
5370  out.append(" muted: ");
5371  out.append(YESNO(this->muted));
5372  out.append("\n");
5373  out.append("}");
5374 }
5375 #endif
5377  switch (field_id) {
5378  case 2: {
5379  this->has_command = value.as_bool();
5380  return true;
5381  }
5382  case 3: {
5383  this->command = value.as_enum<enums::MediaPlayerCommand>();
5384  return true;
5385  }
5386  case 4: {
5387  this->has_volume = value.as_bool();
5388  return true;
5389  }
5390  case 6: {
5391  this->has_media_url = value.as_bool();
5392  return true;
5393  }
5394  case 8: {
5395  this->has_announcement = value.as_bool();
5396  return true;
5397  }
5398  case 9: {
5399  this->announcement = value.as_bool();
5400  return true;
5401  }
5402  default:
5403  return false;
5404  }
5405 }
5407  switch (field_id) {
5408  case 7: {
5409  this->media_url = value.as_string();
5410  return true;
5411  }
5412  default:
5413  return false;
5414  }
5415 }
5416 bool MediaPlayerCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
5417  switch (field_id) {
5418  case 1: {
5419  this->key = value.as_fixed32();
5420  return true;
5421  }
5422  case 5: {
5423  this->volume = value.as_float();
5424  return true;
5425  }
5426  default:
5427  return false;
5428  }
5429 }
5431  buffer.encode_fixed32(1, this->key);
5432  buffer.encode_bool(2, this->has_command);
5433  buffer.encode_enum<enums::MediaPlayerCommand>(3, this->command);
5434  buffer.encode_bool(4, this->has_volume);
5435  buffer.encode_float(5, this->volume);
5436  buffer.encode_bool(6, this->has_media_url);
5437  buffer.encode_string(7, this->media_url);
5438  buffer.encode_bool(8, this->has_announcement);
5439  buffer.encode_bool(9, this->announcement);
5440 }
5441 #ifdef HAS_PROTO_MESSAGE_DUMP
5442 void MediaPlayerCommandRequest::dump_to(std::string &out) const {
5443  __attribute__((unused)) char buffer[64];
5444  out.append("MediaPlayerCommandRequest {\n");
5445  out.append(" key: ");
5446  sprintf(buffer, "%" PRIu32, this->key);
5447  out.append(buffer);
5448  out.append("\n");
5449 
5450  out.append(" has_command: ");
5451  out.append(YESNO(this->has_command));
5452  out.append("\n");
5453 
5454  out.append(" command: ");
5455  out.append(proto_enum_to_string<enums::MediaPlayerCommand>(this->command));
5456  out.append("\n");
5457 
5458  out.append(" has_volume: ");
5459  out.append(YESNO(this->has_volume));
5460  out.append("\n");
5461 
5462  out.append(" volume: ");
5463  sprintf(buffer, "%g", this->volume);
5464  out.append(buffer);
5465  out.append("\n");
5466 
5467  out.append(" has_media_url: ");
5468  out.append(YESNO(this->has_media_url));
5469  out.append("\n");
5470 
5471  out.append(" media_url: ");
5472  out.append("'").append(this->media_url).append("'");
5473  out.append("\n");
5474 
5475  out.append(" has_announcement: ");
5476  out.append(YESNO(this->has_announcement));
5477  out.append("\n");
5478 
5479  out.append(" announcement: ");
5480  out.append(YESNO(this->announcement));
5481  out.append("\n");
5482  out.append("}");
5483 }
5484 #endif
5486  switch (field_id) {
5487  case 1: {
5488  this->flags = value.as_uint32();
5489  return true;
5490  }
5491  default:
5492  return false;
5493  }
5494 }
5496  buffer.encode_uint32(1, this->flags);
5497 }
5498 #ifdef HAS_PROTO_MESSAGE_DUMP
5500  __attribute__((unused)) char buffer[64];
5501  out.append("SubscribeBluetoothLEAdvertisementsRequest {\n");
5502  out.append(" flags: ");
5503  sprintf(buffer, "%" PRIu32, this->flags);
5504  out.append(buffer);
5505  out.append("\n");
5506  out.append("}");
5507 }
5508 #endif
5509 bool BluetoothServiceData::decode_varint(uint32_t field_id, ProtoVarInt value) {
5510  switch (field_id) {
5511  case 2: {
5512  this->legacy_data.push_back(value.as_uint32());
5513  return true;
5514  }
5515  default:
5516  return false;
5517  }
5518 }
5520  switch (field_id) {
5521  case 1: {
5522  this->uuid = value.as_string();
5523  return true;
5524  }
5525  case 3: {
5526  this->data = value.as_string();
5527  return true;
5528  }
5529  default:
5530  return false;
5531  }
5532 }
5534  buffer.encode_string(1, this->uuid);
5535  for (auto &it : this->legacy_data) {
5536  buffer.encode_uint32(2, it, true);
5537  }
5538  buffer.encode_string(3, this->data);
5539 }
5540 #ifdef HAS_PROTO_MESSAGE_DUMP
5541 void BluetoothServiceData::dump_to(std::string &out) const {
5542  __attribute__((unused)) char buffer[64];
5543  out.append("BluetoothServiceData {\n");
5544  out.append(" uuid: ");
5545  out.append("'").append(this->uuid).append("'");
5546  out.append("\n");
5547 
5548  for (const auto &it : this->legacy_data) {
5549  out.append(" legacy_data: ");
5550  sprintf(buffer, "%" PRIu32, it);
5551  out.append(buffer);
5552  out.append("\n");
5553  }
5554 
5555  out.append(" data: ");
5556  out.append("'").append(this->data).append("'");
5557  out.append("\n");
5558  out.append("}");
5559 }
5560 #endif
5562  switch (field_id) {
5563  case 1: {
5564  this->address = value.as_uint64();
5565  return true;
5566  }
5567  case 3: {
5568  this->rssi = value.as_sint32();
5569  return true;
5570  }
5571  case 7: {
5572  this->address_type = value.as_uint32();
5573  return true;
5574  }
5575  default:
5576  return false;
5577  }
5578 }
5580  switch (field_id) {
5581  case 2: {
5582  this->name = value.as_string();
5583  return true;
5584  }
5585  case 4: {
5586  this->service_uuids.push_back(value.as_string());
5587  return true;
5588  }
5589  case 5: {
5590  this->service_data.push_back(value.as_message<BluetoothServiceData>());
5591  return true;
5592  }
5593  case 6: {
5594  this->manufacturer_data.push_back(value.as_message<BluetoothServiceData>());
5595  return true;
5596  }
5597  default:
5598  return false;
5599  }
5600 }
5602  buffer.encode_uint64(1, this->address);
5603  buffer.encode_string(2, this->name);
5604  buffer.encode_sint32(3, this->rssi);
5605  for (auto &it : this->service_uuids) {
5606  buffer.encode_string(4, it, true);
5607  }
5608  for (auto &it : this->service_data) {
5609  buffer.encode_message<BluetoothServiceData>(5, it, true);
5610  }
5611  for (auto &it : this->manufacturer_data) {
5612  buffer.encode_message<BluetoothServiceData>(6, it, true);
5613  }
5614  buffer.encode_uint32(7, this->address_type);
5615 }
5616 #ifdef HAS_PROTO_MESSAGE_DUMP
5617 void BluetoothLEAdvertisementResponse::dump_to(std::string &out) const {
5618  __attribute__((unused)) char buffer[64];
5619  out.append("BluetoothLEAdvertisementResponse {\n");
5620  out.append(" address: ");
5621  sprintf(buffer, "%llu", this->address);
5622  out.append(buffer);
5623  out.append("\n");
5624 
5625  out.append(" name: ");
5626  out.append("'").append(this->name).append("'");
5627  out.append("\n");
5628 
5629  out.append(" rssi: ");
5630  sprintf(buffer, "%" PRId32, this->rssi);
5631  out.append(buffer);
5632  out.append("\n");
5633 
5634  for (const auto &it : this->service_uuids) {
5635  out.append(" service_uuids: ");
5636  out.append("'").append(it).append("'");
5637  out.append("\n");
5638  }
5639 
5640  for (const auto &it : this->service_data) {
5641  out.append(" service_data: ");
5642  it.dump_to(out);
5643  out.append("\n");
5644  }
5645 
5646  for (const auto &it : this->manufacturer_data) {
5647  out.append(" manufacturer_data: ");
5648  it.dump_to(out);
5649  out.append("\n");
5650  }
5651 
5652  out.append(" address_type: ");
5653  sprintf(buffer, "%" PRIu32, this->address_type);
5654  out.append(buffer);
5655  out.append("\n");
5656  out.append("}");
5657 }
5658 #endif
5660  switch (field_id) {
5661  case 1: {
5662  this->address = value.as_uint64();
5663  return true;
5664  }
5665  case 2: {
5666  this->rssi = value.as_sint32();
5667  return true;
5668  }
5669  case 3: {
5670  this->address_type = value.as_uint32();
5671  return true;
5672  }
5673  default:
5674  return false;
5675  }
5676 }
5678  switch (field_id) {
5679  case 4: {
5680  this->data = value.as_string();
5681  return true;
5682  }
5683  default:
5684  return false;
5685  }
5686 }
5688  buffer.encode_uint64(1, this->address);
5689  buffer.encode_sint32(2, this->rssi);
5690  buffer.encode_uint32(3, this->address_type);
5691  buffer.encode_string(4, this->data);
5692 }
5693 #ifdef HAS_PROTO_MESSAGE_DUMP
5694 void BluetoothLERawAdvertisement::dump_to(std::string &out) const {
5695  __attribute__((unused)) char buffer[64];
5696  out.append("BluetoothLERawAdvertisement {\n");
5697  out.append(" address: ");
5698  sprintf(buffer, "%llu", this->address);
5699  out.append(buffer);
5700  out.append("\n");
5701 
5702  out.append(" rssi: ");
5703  sprintf(buffer, "%" PRId32, this->rssi);
5704  out.append(buffer);
5705  out.append("\n");
5706 
5707  out.append(" address_type: ");
5708  sprintf(buffer, "%" PRIu32, this->address_type);
5709  out.append(buffer);
5710  out.append("\n");
5711 
5712  out.append(" data: ");
5713  out.append("'").append(this->data).append("'");
5714  out.append("\n");
5715  out.append("}");
5716 }
5717 #endif
5719  switch (field_id) {
5720  case 1: {
5721  this->advertisements.push_back(value.as_message<BluetoothLERawAdvertisement>());
5722  return true;
5723  }
5724  default:
5725  return false;
5726  }
5727 }
5729  for (auto &it : this->advertisements) {
5730  buffer.encode_message<BluetoothLERawAdvertisement>(1, it, true);
5731  }
5732 }
5733 #ifdef HAS_PROTO_MESSAGE_DUMP
5735  __attribute__((unused)) char buffer[64];
5736  out.append("BluetoothLERawAdvertisementsResponse {\n");
5737  for (const auto &it : this->advertisements) {
5738  out.append(" advertisements: ");
5739  it.dump_to(out);
5740  out.append("\n");
5741  }
5742  out.append("}");
5743 }
5744 #endif
5745 bool BluetoothDeviceRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
5746  switch (field_id) {
5747  case 1: {
5748  this->address = value.as_uint64();
5749  return true;
5750  }
5751  case 2: {
5752  this->request_type = value.as_enum<enums::BluetoothDeviceRequestType>();
5753  return true;
5754  }
5755  case 3: {
5756  this->has_address_type = value.as_bool();
5757  return true;
5758  }
5759  case 4: {
5760  this->address_type = value.as_uint32();
5761  return true;
5762  }
5763  default:
5764  return false;
5765  }
5766 }
5768  buffer.encode_uint64(1, this->address);
5769  buffer.encode_enum<enums::BluetoothDeviceRequestType>(2, this->request_type);
5770  buffer.encode_bool(3, this->has_address_type);
5771  buffer.encode_uint32(4, this->address_type);
5772 }
5773 #ifdef HAS_PROTO_MESSAGE_DUMP
5774 void BluetoothDeviceRequest::dump_to(std::string &out) const {
5775  __attribute__((unused)) char buffer[64];
5776  out.append("BluetoothDeviceRequest {\n");
5777  out.append(" address: ");
5778  sprintf(buffer, "%llu", this->address);
5779  out.append(buffer);
5780  out.append("\n");
5781 
5782  out.append(" request_type: ");
5783  out.append(proto_enum_to_string<enums::BluetoothDeviceRequestType>(this->request_type));
5784  out.append("\n");
5785 
5786  out.append(" has_address_type: ");
5787  out.append(YESNO(this->has_address_type));
5788  out.append("\n");
5789 
5790  out.append(" address_type: ");
5791  sprintf(buffer, "%" PRIu32, this->address_type);
5792  out.append(buffer);
5793  out.append("\n");
5794  out.append("}");
5795 }
5796 #endif
5798  switch (field_id) {
5799  case 1: {
5800  this->address = value.as_uint64();
5801  return true;
5802  }
5803  case 2: {
5804  this->connected = value.as_bool();
5805  return true;
5806  }
5807  case 3: {
5808  this->mtu = value.as_uint32();
5809  return true;
5810  }
5811  case 4: {
5812  this->error = value.as_int32();
5813  return true;
5814  }
5815  default:
5816  return false;
5817  }
5818 }
5820  buffer.encode_uint64(1, this->address);
5821  buffer.encode_bool(2, this->connected);
5822  buffer.encode_uint32(3, this->mtu);
5823  buffer.encode_int32(4, this->error);
5824 }
5825 #ifdef HAS_PROTO_MESSAGE_DUMP
5826 void BluetoothDeviceConnectionResponse::dump_to(std::string &out) const {
5827  __attribute__((unused)) char buffer[64];
5828  out.append("BluetoothDeviceConnectionResponse {\n");
5829  out.append(" address: ");
5830  sprintf(buffer, "%llu", this->address);
5831  out.append(buffer);
5832  out.append("\n");
5833 
5834  out.append(" connected: ");
5835  out.append(YESNO(this->connected));
5836  out.append("\n");
5837 
5838  out.append(" mtu: ");
5839  sprintf(buffer, "%" PRIu32, this->mtu);
5840  out.append(buffer);
5841  out.append("\n");
5842 
5843  out.append(" error: ");
5844  sprintf(buffer, "%" PRId32, this->error);
5845  out.append(buffer);
5846  out.append("\n");
5847  out.append("}");
5848 }
5849 #endif
5851  switch (field_id) {
5852  case 1: {
5853  this->address = value.as_uint64();
5854  return true;
5855  }
5856  default:
5857  return false;
5858  }
5859 }
5861 #ifdef HAS_PROTO_MESSAGE_DUMP
5862 void BluetoothGATTGetServicesRequest::dump_to(std::string &out) const {
5863  __attribute__((unused)) char buffer[64];
5864  out.append("BluetoothGATTGetServicesRequest {\n");
5865  out.append(" address: ");
5866  sprintf(buffer, "%llu", this->address);
5867  out.append(buffer);
5868  out.append("\n");
5869  out.append("}");
5870 }
5871 #endif
5872 bool BluetoothGATTDescriptor::decode_varint(uint32_t field_id, ProtoVarInt value) {
5873  switch (field_id) {
5874  case 1: {
5875  this->uuid.push_back(value.as_uint64());
5876  return true;
5877  }
5878  case 2: {
5879  this->handle = value.as_uint32();
5880  return true;
5881  }
5882  default:
5883  return false;
5884  }
5885 }
5887  for (auto &it : this->uuid) {
5888  buffer.encode_uint64(1, it, true);
5889  }
5890  buffer.encode_uint32(2, this->handle);
5891 }
5892 #ifdef HAS_PROTO_MESSAGE_DUMP
5893 void BluetoothGATTDescriptor::dump_to(std::string &out) const {
5894  __attribute__((unused)) char buffer[64];
5895  out.append("BluetoothGATTDescriptor {\n");
5896  for (const auto &it : this->uuid) {
5897  out.append(" uuid: ");
5898  sprintf(buffer, "%llu", it);
5899  out.append(buffer);
5900  out.append("\n");
5901  }
5902 
5903  out.append(" handle: ");
5904  sprintf(buffer, "%" PRIu32, this->handle);
5905  out.append(buffer);
5906  out.append("\n");
5907  out.append("}");
5908 }
5909 #endif
5911  switch (field_id) {
5912  case 1: {
5913  this->uuid.push_back(value.as_uint64());
5914  return true;
5915  }
5916  case 2: {
5917  this->handle = value.as_uint32();
5918  return true;
5919  }
5920  case 3: {
5921  this->properties = value.as_uint32();
5922  return true;
5923  }
5924  default:
5925  return false;
5926  }
5927 }
5929  switch (field_id) {
5930  case 4: {
5931  this->descriptors.push_back(value.as_message<BluetoothGATTDescriptor>());
5932  return true;
5933  }
5934  default:
5935  return false;
5936  }
5937 }
5939  for (auto &it : this->uuid) {
5940  buffer.encode_uint64(1, it, true);
5941  }
5942  buffer.encode_uint32(2, this->handle);
5943  buffer.encode_uint32(3, this->properties);
5944  for (auto &it : this->descriptors) {
5945  buffer.encode_message<BluetoothGATTDescriptor>(4, it, true);
5946  }
5947 }
5948 #ifdef HAS_PROTO_MESSAGE_DUMP
5949 void BluetoothGATTCharacteristic::dump_to(std::string &out) const {
5950  __attribute__((unused)) char buffer[64];
5951  out.append("BluetoothGATTCharacteristic {\n");
5952  for (const auto &it : this->uuid) {
5953  out.append(" uuid: ");
5954  sprintf(buffer, "%llu", it);
5955  out.append(buffer);
5956  out.append("\n");
5957  }
5958 
5959  out.append(" handle: ");
5960  sprintf(buffer, "%" PRIu32, this->handle);
5961  out.append(buffer);
5962  out.append("\n");
5963 
5964  out.append(" properties: ");
5965  sprintf(buffer, "%" PRIu32, this->properties);
5966  out.append(buffer);
5967  out.append("\n");
5968 
5969  for (const auto &it : this->descriptors) {
5970  out.append(" descriptors: ");
5971  it.dump_to(out);
5972  out.append("\n");
5973  }
5974  out.append("}");
5975 }
5976 #endif
5977 bool BluetoothGATTService::decode_varint(uint32_t field_id, ProtoVarInt value) {
5978  switch (field_id) {
5979  case 1: {
5980  this->uuid.push_back(value.as_uint64());
5981  return true;
5982  }
5983  case 2: {
5984  this->handle = value.as_uint32();
5985  return true;
5986  }
5987  default:
5988  return false;
5989  }
5990 }
5992  switch (field_id) {
5993  case 3: {
5994  this->characteristics.push_back(value.as_message<BluetoothGATTCharacteristic>());
5995  return true;
5996  }
5997  default:
5998  return false;
5999  }
6000 }
6002  for (auto &it : this->uuid) {
6003  buffer.encode_uint64(1, it, true);
6004  }
6005  buffer.encode_uint32(2, this->handle);
6006  for (auto &it : this->characteristics) {
6007  buffer.encode_message<BluetoothGATTCharacteristic>(3, it, true);
6008  }
6009 }
6010 #ifdef HAS_PROTO_MESSAGE_DUMP
6011 void BluetoothGATTService::dump_to(std::string &out) const {
6012  __attribute__((unused)) char buffer[64];
6013  out.append("BluetoothGATTService {\n");
6014  for (const auto &it : this->uuid) {
6015  out.append(" uuid: ");
6016  sprintf(buffer, "%llu", it);
6017  out.append(buffer);
6018  out.append("\n");
6019  }
6020 
6021  out.append(" handle: ");
6022  sprintf(buffer, "%" PRIu32, this->handle);
6023  out.append(buffer);
6024  out.append("\n");
6025 
6026  for (const auto &it : this->characteristics) {
6027  out.append(" characteristics: ");
6028  it.dump_to(out);
6029  out.append("\n");
6030  }
6031  out.append("}");
6032 }
6033 #endif
6035  switch (field_id) {
6036  case 1: {
6037  this->address = value.as_uint64();
6038  return true;
6039  }
6040  default:
6041  return false;
6042  }
6043 }
6045  switch (field_id) {
6046  case 2: {
6047  this->services.push_back(value.as_message<BluetoothGATTService>());
6048  return true;
6049  }
6050  default:
6051  return false;
6052  }
6053 }
6055  buffer.encode_uint64(1, this->address);
6056  for (auto &it : this->services) {
6057  buffer.encode_message<BluetoothGATTService>(2, it, true);
6058  }
6059 }
6060 #ifdef HAS_PROTO_MESSAGE_DUMP
6061 void BluetoothGATTGetServicesResponse::dump_to(std::string &out) const {
6062  __attribute__((unused)) char buffer[64];
6063  out.append("BluetoothGATTGetServicesResponse {\n");
6064  out.append(" address: ");
6065  sprintf(buffer, "%llu", this->address);
6066  out.append(buffer);
6067  out.append("\n");
6068 
6069  for (const auto &it : this->services) {
6070  out.append(" services: ");
6071  it.dump_to(out);
6072  out.append("\n");
6073  }
6074  out.append("}");
6075 }
6076 #endif
6078  switch (field_id) {
6079  case 1: {
6080  this->address = value.as_uint64();
6081  return true;
6082  }
6083  default:
6084  return false;
6085  }
6086 }
6088  buffer.encode_uint64(1, this->address);
6089 }
6090 #ifdef HAS_PROTO_MESSAGE_DUMP
6092  __attribute__((unused)) char buffer[64];
6093  out.append("BluetoothGATTGetServicesDoneResponse {\n");
6094  out.append(" address: ");
6095  sprintf(buffer, "%llu", this->address);
6096  out.append(buffer);
6097  out.append("\n");
6098  out.append("}");
6099 }
6100 #endif
6102  switch (field_id) {
6103  case 1: {
6104  this->address = value.as_uint64();
6105  return true;
6106  }
6107  case 2: {
6108  this->handle = value.as_uint32();
6109  return true;
6110  }
6111  default:
6112  return false;
6113  }
6114 }
6116  buffer.encode_uint64(1, this->address);
6117  buffer.encode_uint32(2, this->handle);
6118 }
6119 #ifdef HAS_PROTO_MESSAGE_DUMP
6120 void BluetoothGATTReadRequest::dump_to(std::string &out) const {
6121  __attribute__((unused)) char buffer[64];
6122  out.append("BluetoothGATTReadRequest {\n");
6123  out.append(" address: ");
6124  sprintf(buffer, "%llu", this->address);
6125  out.append(buffer);
6126  out.append("\n");
6127 
6128  out.append(" handle: ");
6129  sprintf(buffer, "%" PRIu32, this->handle);
6130  out.append(buffer);
6131  out.append("\n");
6132  out.append("}");
6133 }
6134 #endif
6136  switch (field_id) {
6137  case 1: {
6138  this->address = value.as_uint64();
6139  return true;
6140  }
6141  case 2: {
6142  this->handle = value.as_uint32();
6143  return true;
6144  }
6145  default:
6146  return false;
6147  }
6148 }
6150  switch (field_id) {
6151  case 3: {
6152  this->data = value.as_string();
6153  return true;
6154  }
6155  default:
6156  return false;
6157  }
6158 }
6160  buffer.encode_uint64(1, this->address);
6161  buffer.encode_uint32(2, this->handle);
6162  buffer.encode_string(3, this->data);
6163 }
6164 #ifdef HAS_PROTO_MESSAGE_DUMP
6165 void BluetoothGATTReadResponse::dump_to(std::string &out) const {
6166  __attribute__((unused)) char buffer[64];
6167  out.append("BluetoothGATTReadResponse {\n");
6168  out.append(" address: ");
6169  sprintf(buffer, "%llu", this->address);
6170  out.append(buffer);
6171  out.append("\n");
6172 
6173  out.append(" handle: ");
6174  sprintf(buffer, "%" PRIu32, this->handle);
6175  out.append(buffer);
6176  out.append("\n");
6177 
6178  out.append(" data: ");
6179  out.append("'").append(this->data).append("'");
6180  out.append("\n");
6181  out.append("}");
6182 }
6183 #endif
6185  switch (field_id) {
6186  case 1: {
6187  this->address = value.as_uint64();
6188  return true;
6189  }
6190  case 2: {
6191  this->handle = value.as_uint32();
6192  return true;
6193  }
6194  case 3: {
6195  this->response = value.as_bool();
6196  return true;
6197  }
6198  default:
6199  return false;
6200  }
6201 }
6203  switch (field_id) {
6204  case 4: {
6205  this->data = value.as_string();
6206  return true;
6207  }
6208  default:
6209  return false;
6210  }
6211 }
6213  buffer.encode_uint64(1, this->address);
6214  buffer.encode_uint32(2, this->handle);
6215  buffer.encode_bool(3, this->response);
6216  buffer.encode_string(4, this->data);
6217 }
6218 #ifdef HAS_PROTO_MESSAGE_DUMP
6219 void BluetoothGATTWriteRequest::dump_to(std::string &out) const {
6220  __attribute__((unused)) char buffer[64];
6221  out.append("BluetoothGATTWriteRequest {\n");
6222  out.append(" address: ");
6223  sprintf(buffer, "%llu", this->address);
6224  out.append(buffer);
6225  out.append("\n");
6226 
6227  out.append(" handle: ");
6228  sprintf(buffer, "%" PRIu32, this->handle);
6229  out.append(buffer);
6230  out.append("\n");
6231 
6232  out.append(" response: ");
6233  out.append(YESNO(this->response));
6234  out.append("\n");
6235 
6236  out.append(" data: ");
6237  out.append("'").append(this->data).append("'");
6238  out.append("\n");
6239  out.append("}");
6240 }
6241 #endif
6243  switch (field_id) {
6244  case 1: {
6245  this->address = value.as_uint64();
6246  return true;
6247  }
6248  case 2: {
6249  this->handle = value.as_uint32();
6250  return true;
6251  }
6252  default:
6253  return false;
6254  }
6255 }
6257  buffer.encode_uint64(1, this->address);
6258  buffer.encode_uint32(2, this->handle);
6259 }
6260 #ifdef HAS_PROTO_MESSAGE_DUMP
6261 void BluetoothGATTReadDescriptorRequest::dump_to(std::string &out) const {
6262  __attribute__((unused)) char buffer[64];
6263  out.append("BluetoothGATTReadDescriptorRequest {\n");
6264  out.append(" address: ");
6265  sprintf(buffer, "%llu", this->address);
6266  out.append(buffer);
6267  out.append("\n");
6268 
6269  out.append(" handle: ");
6270  sprintf(buffer, "%" PRIu32, this->handle);
6271  out.append(buffer);
6272  out.append("\n");
6273  out.append("}");
6274 }
6275 #endif
6277  switch (field_id) {
6278  case 1: {
6279  this->address = value.as_uint64();
6280  return true;
6281  }
6282  case 2: {
6283  this->handle = value.as_uint32();
6284  return true;
6285  }
6286  default:
6287  return false;
6288  }
6289 }
6291  switch (field_id) {
6292  case 3: {
6293  this->data = value.as_string();
6294  return true;
6295  }
6296  default:
6297  return false;
6298  }
6299 }
6301  buffer.encode_uint64(1, this->address);
6302  buffer.encode_uint32(2, this->handle);
6303  buffer.encode_string(3, this->data);
6304 }
6305 #ifdef HAS_PROTO_MESSAGE_DUMP
6306 void BluetoothGATTWriteDescriptorRequest::dump_to(std::string &out) const {
6307  __attribute__((unused)) char buffer[64];
6308  out.append("BluetoothGATTWriteDescriptorRequest {\n");
6309  out.append(" address: ");
6310  sprintf(buffer, "%llu", this->address);
6311  out.append(buffer);
6312  out.append("\n");
6313 
6314  out.append(" handle: ");
6315  sprintf(buffer, "%" PRIu32, this->handle);
6316  out.append(buffer);
6317  out.append("\n");
6318 
6319  out.append(" data: ");
6320  out.append("'").append(this->data).append("'");
6321  out.append("\n");
6322  out.append("}");
6323 }
6324 #endif
6326  switch (field_id) {
6327  case 1: {
6328  this->address = value.as_uint64();
6329  return true;
6330  }
6331  case 2: {
6332  this->handle = value.as_uint32();
6333  return true;
6334  }
6335  case 3: {
6336  this->enable = value.as_bool();
6337  return true;
6338  }
6339  default:
6340  return false;
6341  }
6342 }
6344  buffer.encode_uint64(1, this->address);
6345  buffer.encode_uint32(2, this->handle);
6346  buffer.encode_bool(3, this->enable);
6347 }
6348 #ifdef HAS_PROTO_MESSAGE_DUMP
6349 void BluetoothGATTNotifyRequest::dump_to(std::string &out) const {
6350  __attribute__((unused)) char buffer[64];
6351  out.append("BluetoothGATTNotifyRequest {\n");
6352  out.append(" address: ");
6353  sprintf(buffer, "%llu", this->address);
6354  out.append(buffer);
6355  out.append("\n");
6356 
6357  out.append(" handle: ");
6358  sprintf(buffer, "%" PRIu32, this->handle);
6359  out.append(buffer);
6360  out.append("\n");
6361 
6362  out.append(" enable: ");
6363  out.append(YESNO(this->enable));
6364  out.append("\n");
6365  out.append("}");
6366 }
6367 #endif
6369  switch (field_id) {
6370  case 1: {
6371  this->address = value.as_uint64();
6372  return true;
6373  }
6374  case 2: {
6375  this->handle = value.as_uint32();
6376  return true;
6377  }
6378  default:
6379  return false;
6380  }
6381 }
6383  switch (field_id) {
6384  case 3: {
6385  this->data = value.as_string();
6386  return true;
6387  }
6388  default:
6389  return false;
6390  }
6391 }
6393  buffer.encode_uint64(1, this->address);
6394  buffer.encode_uint32(2, this->handle);
6395  buffer.encode_string(3, this->data);
6396 }
6397 #ifdef HAS_PROTO_MESSAGE_DUMP
6398 void BluetoothGATTNotifyDataResponse::dump_to(std::string &out) const {
6399  __attribute__((unused)) char buffer[64];
6400  out.append("BluetoothGATTNotifyDataResponse {\n");
6401  out.append(" address: ");
6402  sprintf(buffer, "%llu", this->address);
6403  out.append(buffer);
6404  out.append("\n");
6405 
6406  out.append(" handle: ");
6407  sprintf(buffer, "%" PRIu32, this->handle);
6408  out.append(buffer);
6409  out.append("\n");
6410 
6411  out.append(" data: ");
6412  out.append("'").append(this->data).append("'");
6413  out.append("\n");
6414  out.append("}");
6415 }
6416 #endif
6418 #ifdef HAS_PROTO_MESSAGE_DUMP
6420  out.append("SubscribeBluetoothConnectionsFreeRequest {}");
6421 }
6422 #endif
6424  switch (field_id) {
6425  case 1: {
6426  this->free = value.as_uint32();
6427  return true;
6428  }
6429  case 2: {
6430  this->limit = value.as_uint32();
6431  return true;
6432  }
6433  default:
6434  return false;
6435  }
6436 }
6438  buffer.encode_uint32(1, this->free);
6439  buffer.encode_uint32(2, this->limit);
6440 }
6441 #ifdef HAS_PROTO_MESSAGE_DUMP
6442 void BluetoothConnectionsFreeResponse::dump_to(std::string &out) const {
6443  __attribute__((unused)) char buffer[64];
6444  out.append("BluetoothConnectionsFreeResponse {\n");
6445  out.append(" free: ");
6446  sprintf(buffer, "%" PRIu32, this->free);
6447  out.append(buffer);
6448  out.append("\n");
6449 
6450  out.append(" limit: ");
6451  sprintf(buffer, "%" PRIu32, this->limit);
6452  out.append(buffer);
6453  out.append("\n");
6454  out.append("}");
6455 }
6456 #endif
6458  switch (field_id) {
6459  case 1: {
6460  this->address = value.as_uint64();
6461  return true;
6462  }
6463  case 2: {
6464  this->handle = value.as_uint32();
6465  return true;
6466  }
6467  case 3: {
6468  this->error = value.as_int32();
6469  return true;
6470  }
6471  default:
6472  return false;
6473  }
6474 }
6476  buffer.encode_uint64(1, this->address);
6477  buffer.encode_uint32(2, this->handle);
6478  buffer.encode_int32(3, this->error);
6479 }
6480 #ifdef HAS_PROTO_MESSAGE_DUMP
6481 void BluetoothGATTErrorResponse::dump_to(std::string &out) const {
6482  __attribute__((unused)) char buffer[64];
6483  out.append("BluetoothGATTErrorResponse {\n");
6484  out.append(" address: ");
6485  sprintf(buffer, "%llu", this->address);
6486  out.append(buffer);
6487  out.append("\n");
6488 
6489  out.append(" handle: ");
6490  sprintf(buffer, "%" PRIu32, this->handle);
6491  out.append(buffer);
6492  out.append("\n");
6493 
6494  out.append(" error: ");
6495  sprintf(buffer, "%" PRId32, this->error);
6496  out.append(buffer);
6497  out.append("\n");
6498  out.append("}");
6499 }
6500 #endif
6502  switch (field_id) {
6503  case 1: {
6504  this->address = value.as_uint64();
6505  return true;
6506  }
6507  case 2: {
6508  this->handle = value.as_uint32();
6509  return true;
6510  }
6511  default:
6512  return false;
6513  }
6514 }
6516  buffer.encode_uint64(1, this->address);
6517  buffer.encode_uint32(2, this->handle);
6518 }
6519 #ifdef HAS_PROTO_MESSAGE_DUMP
6520 void BluetoothGATTWriteResponse::dump_to(std::string &out) const {
6521  __attribute__((unused)) char buffer[64];
6522  out.append("BluetoothGATTWriteResponse {\n");
6523  out.append(" address: ");
6524  sprintf(buffer, "%llu", this->address);
6525  out.append(buffer);
6526  out.append("\n");
6527 
6528  out.append(" handle: ");
6529  sprintf(buffer, "%" PRIu32, this->handle);
6530  out.append(buffer);
6531  out.append("\n");
6532  out.append("}");
6533 }
6534 #endif
6536  switch (field_id) {
6537  case 1: {
6538  this->address = value.as_uint64();
6539  return true;
6540  }
6541  case 2: {
6542  this->handle = value.as_uint32();
6543  return true;
6544  }
6545  default:
6546  return false;
6547  }
6548 }
6550  buffer.encode_uint64(1, this->address);
6551  buffer.encode_uint32(2, this->handle);
6552 }
6553 #ifdef HAS_PROTO_MESSAGE_DUMP
6554 void BluetoothGATTNotifyResponse::dump_to(std::string &out) const {
6555  __attribute__((unused)) char buffer[64];
6556  out.append("BluetoothGATTNotifyResponse {\n");
6557  out.append(" address: ");
6558  sprintf(buffer, "%llu", this->address);
6559  out.append(buffer);
6560  out.append("\n");
6561 
6562  out.append(" handle: ");
6563  sprintf(buffer, "%" PRIu32, this->handle);
6564  out.append(buffer);
6565  out.append("\n");
6566  out.append("}");
6567 }
6568 #endif
6570  switch (field_id) {
6571  case 1: {
6572  this->address = value.as_uint64();
6573  return true;
6574  }
6575  case 2: {
6576  this->paired = value.as_bool();
6577  return true;
6578  }
6579  case 3: {
6580  this->error = value.as_int32();
6581  return true;
6582  }
6583  default:
6584  return false;
6585  }
6586 }
6588  buffer.encode_uint64(1, this->address);
6589  buffer.encode_bool(2, this->paired);
6590  buffer.encode_int32(3, this->error);
6591 }
6592 #ifdef HAS_PROTO_MESSAGE_DUMP
6593 void BluetoothDevicePairingResponse::dump_to(std::string &out) const {
6594  __attribute__((unused)) char buffer[64];
6595  out.append("BluetoothDevicePairingResponse {\n");
6596  out.append(" address: ");
6597  sprintf(buffer, "%llu", this->address);
6598  out.append(buffer);
6599  out.append("\n");
6600 
6601  out.append(" paired: ");
6602  out.append(YESNO(this->paired));
6603  out.append("\n");
6604 
6605  out.append(" error: ");
6606  sprintf(buffer, "%" PRId32, this->error);
6607  out.append(buffer);
6608  out.append("\n");
6609  out.append("}");
6610 }
6611 #endif
6613  switch (field_id) {
6614  case 1: {
6615  this->address = value.as_uint64();
6616  return true;
6617  }
6618  case 2: {
6619  this->success = value.as_bool();
6620  return true;
6621  }
6622  case 3: {
6623  this->error = value.as_int32();
6624  return true;
6625  }
6626  default:
6627  return false;
6628  }
6629 }
6631  buffer.encode_uint64(1, this->address);
6632  buffer.encode_bool(2, this->success);
6633  buffer.encode_int32(3, this->error);
6634 }
6635 #ifdef HAS_PROTO_MESSAGE_DUMP
6636 void BluetoothDeviceUnpairingResponse::dump_to(std::string &out) const {
6637  __attribute__((unused)) char buffer[64];
6638  out.append("BluetoothDeviceUnpairingResponse {\n");
6639  out.append(" address: ");
6640  sprintf(buffer, "%llu", this->address);
6641  out.append(buffer);
6642  out.append("\n");
6643 
6644  out.append(" success: ");
6645  out.append(YESNO(this->success));
6646  out.append("\n");
6647 
6648  out.append(" error: ");
6649  sprintf(buffer, "%" PRId32, this->error);
6650  out.append(buffer);
6651  out.append("\n");
6652  out.append("}");
6653 }
6654 #endif
6656 #ifdef HAS_PROTO_MESSAGE_DUMP
6658  out.append("UnsubscribeBluetoothLEAdvertisementsRequest {}");
6659 }
6660 #endif
6662  switch (field_id) {
6663  case 1: {
6664  this->address = value.as_uint64();
6665  return true;
6666  }
6667  case 2: {
6668  this->success = value.as_bool();
6669  return true;
6670  }
6671  case 3: {
6672  this->error = value.as_int32();
6673  return true;
6674  }
6675  default:
6676  return false;
6677  }
6678 }
6680  buffer.encode_uint64(1, this->address);
6681  buffer.encode_bool(2, this->success);
6682  buffer.encode_int32(3, this->error);
6683 }
6684 #ifdef HAS_PROTO_MESSAGE_DUMP
6685 void BluetoothDeviceClearCacheResponse::dump_to(std::string &out) const {
6686  __attribute__((unused)) char buffer[64];
6687  out.append("BluetoothDeviceClearCacheResponse {\n");
6688  out.append(" address: ");
6689  sprintf(buffer, "%llu", this->address);
6690  out.append(buffer);
6691  out.append("\n");
6692 
6693  out.append(" success: ");
6694  out.append(YESNO(this->success));
6695  out.append("\n");
6696 
6697  out.append(" error: ");
6698  sprintf(buffer, "%" PRId32, this->error);
6699  out.append(buffer);
6700  out.append("\n");
6701  out.append("}");
6702 }
6703 #endif
6705  switch (field_id) {
6706  case 1: {
6707  this->subscribe = value.as_bool();
6708  return true;
6709  }
6710  case 2: {
6711  this->flags = value.as_uint32();
6712  return true;
6713  }
6714  default:
6715  return false;
6716  }
6717 }
6719  buffer.encode_bool(1, this->subscribe);
6720  buffer.encode_uint32(2, this->flags);
6721 }
6722 #ifdef HAS_PROTO_MESSAGE_DUMP
6723 void SubscribeVoiceAssistantRequest::dump_to(std::string &out) const {
6724  __attribute__((unused)) char buffer[64];
6725  out.append("SubscribeVoiceAssistantRequest {\n");
6726  out.append(" subscribe: ");
6727  out.append(YESNO(this->subscribe));
6728  out.append("\n");
6729 
6730  out.append(" flags: ");
6731  sprintf(buffer, "%" PRIu32, this->flags);
6732  out.append(buffer);
6733  out.append("\n");
6734  out.append("}");
6735 }
6736 #endif
6738  switch (field_id) {
6739  case 1: {
6740  this->noise_suppression_level = value.as_uint32();
6741  return true;
6742  }
6743  case 2: {
6744  this->auto_gain = value.as_uint32();
6745  return true;
6746  }
6747  default:
6748  return false;
6749  }
6750 }
6752  switch (field_id) {
6753  case 3: {
6754  this->volume_multiplier = value.as_float();
6755  return true;
6756  }
6757  default:
6758  return false;
6759  }
6760 }
6762  buffer.encode_uint32(1, this->noise_suppression_level);
6763  buffer.encode_uint32(2, this->auto_gain);
6764  buffer.encode_float(3, this->volume_multiplier);
6765 }
6766 #ifdef HAS_PROTO_MESSAGE_DUMP
6767 void VoiceAssistantAudioSettings::dump_to(std::string &out) const {
6768  __attribute__((unused)) char buffer[64];
6769  out.append("VoiceAssistantAudioSettings {\n");
6770  out.append(" noise_suppression_level: ");
6771  sprintf(buffer, "%" PRIu32, this->noise_suppression_level);
6772  out.append(buffer);
6773  out.append("\n");
6774 
6775  out.append(" auto_gain: ");
6776  sprintf(buffer, "%" PRIu32, this->auto_gain);
6777  out.append(buffer);
6778  out.append("\n");
6779 
6780  out.append(" volume_multiplier: ");
6781  sprintf(buffer, "%g", this->volume_multiplier);
6782  out.append(buffer);
6783  out.append("\n");
6784  out.append("}");
6785 }
6786 #endif
6787 bool VoiceAssistantRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
6788  switch (field_id) {
6789  case 1: {
6790  this->start = value.as_bool();
6791  return true;
6792  }
6793  case 3: {
6794  this->flags = value.as_uint32();
6795  return true;
6796  }
6797  default:
6798  return false;
6799  }
6800 }
6802  switch (field_id) {
6803  case 2: {
6804  this->conversation_id = value.as_string();
6805  return true;
6806  }
6807  case 4: {
6808  this->audio_settings = value.as_message<VoiceAssistantAudioSettings>();
6809  return true;
6810  }
6811  case 5: {
6812  this->wake_word_phrase = value.as_string();
6813  return true;
6814  }
6815  default:
6816  return false;
6817  }
6818 }
6820  buffer.encode_bool(1, this->start);
6821  buffer.encode_string(2, this->conversation_id);
6822  buffer.encode_uint32(3, this->flags);
6823  buffer.encode_message<VoiceAssistantAudioSettings>(4, this->audio_settings);
6824  buffer.encode_string(5, this->wake_word_phrase);
6825 }
6826 #ifdef HAS_PROTO_MESSAGE_DUMP
6827 void VoiceAssistantRequest::dump_to(std::string &out) const {
6828  __attribute__((unused)) char buffer[64];
6829  out.append("VoiceAssistantRequest {\n");
6830  out.append(" start: ");
6831  out.append(YESNO(this->start));
6832  out.append("\n");
6833 
6834  out.append(" conversation_id: ");
6835  out.append("'").append(this->conversation_id).append("'");
6836  out.append("\n");
6837 
6838  out.append(" flags: ");
6839  sprintf(buffer, "%" PRIu32, this->flags);
6840  out.append(buffer);
6841  out.append("\n");
6842 
6843  out.append(" audio_settings: ");
6844  this->audio_settings.dump_to(out);
6845  out.append("\n");
6846 
6847  out.append(" wake_word_phrase: ");
6848  out.append("'").append(this->wake_word_phrase).append("'");
6849  out.append("\n");
6850  out.append("}");
6851 }
6852 #endif
6853 bool VoiceAssistantResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
6854  switch (field_id) {
6855  case 1: {
6856  this->port = value.as_uint32();
6857  return true;
6858  }
6859  case 2: {
6860  this->error = value.as_bool();
6861  return true;
6862  }
6863  default:
6864  return false;
6865  }
6866 }
6868  buffer.encode_uint32(1, this->port);
6869  buffer.encode_bool(2, this->error);
6870 }
6871 #ifdef HAS_PROTO_MESSAGE_DUMP
6872 void VoiceAssistantResponse::dump_to(std::string &out) const {
6873  __attribute__((unused)) char buffer[64];
6874  out.append("VoiceAssistantResponse {\n");
6875  out.append(" port: ");
6876  sprintf(buffer, "%" PRIu32, this->port);
6877  out.append(buffer);
6878  out.append("\n");
6879 
6880  out.append(" error: ");
6881  out.append(YESNO(this->error));
6882  out.append("\n");
6883  out.append("}");
6884 }
6885 #endif
6887  switch (field_id) {
6888  case 1: {
6889  this->name = value.as_string();
6890  return true;
6891  }
6892  case 2: {
6893  this->value = value.as_string();
6894  return true;
6895  }
6896  default:
6897  return false;
6898  }
6899 }
6901  buffer.encode_string(1, this->name);
6902  buffer.encode_string(2, this->value);
6903 }
6904 #ifdef HAS_PROTO_MESSAGE_DUMP
6905 void VoiceAssistantEventData::dump_to(std::string &out) const {
6906  __attribute__((unused)) char buffer[64];
6907  out.append("VoiceAssistantEventData {\n");
6908  out.append(" name: ");
6909  out.append("'").append(this->name).append("'");
6910  out.append("\n");
6911 
6912  out.append(" value: ");
6913  out.append("'").append(this->value).append("'");
6914  out.append("\n");
6915  out.append("}");
6916 }
6917 #endif
6919  switch (field_id) {
6920  case 1: {
6921  this->event_type = value.as_enum<enums::VoiceAssistantEvent>();
6922  return true;
6923  }
6924  default:
6925  return false;
6926  }
6927 }
6929  switch (field_id) {
6930  case 2: {
6931  this->data.push_back(value.as_message<VoiceAssistantEventData>());
6932  return true;
6933  }
6934  default:
6935  return false;
6936  }
6937 }
6939  buffer.encode_enum<enums::VoiceAssistantEvent>(1, this->event_type);
6940  for (auto &it : this->data) {
6941  buffer.encode_message<VoiceAssistantEventData>(2, it, true);
6942  }
6943 }
6944 #ifdef HAS_PROTO_MESSAGE_DUMP
6945 void VoiceAssistantEventResponse::dump_to(std::string &out) const {
6946  __attribute__((unused)) char buffer[64];
6947  out.append("VoiceAssistantEventResponse {\n");
6948  out.append(" event_type: ");
6949  out.append(proto_enum_to_string<enums::VoiceAssistantEvent>(this->event_type));
6950  out.append("\n");
6951 
6952  for (const auto &it : this->data) {
6953  out.append(" data: ");
6954  it.dump_to(out);
6955  out.append("\n");
6956  }
6957  out.append("}");
6958 }
6959 #endif
6960 bool VoiceAssistantAudio::decode_varint(uint32_t field_id, ProtoVarInt value) {
6961  switch (field_id) {
6962  case 2: {
6963  this->end = value.as_bool();
6964  return true;
6965  }
6966  default:
6967  return false;
6968  }
6969 }
6971  switch (field_id) {
6972  case 1: {
6973  this->data = value.as_string();
6974  return true;
6975  }
6976  default:
6977  return false;
6978  }
6979 }
6981  buffer.encode_string(1, this->data);
6982  buffer.encode_bool(2, this->end);
6983 }
6984 #ifdef HAS_PROTO_MESSAGE_DUMP
6985 void VoiceAssistantAudio::dump_to(std::string &out) const {
6986  __attribute__((unused)) char buffer[64];
6987  out.append("VoiceAssistantAudio {\n");
6988  out.append(" data: ");
6989  out.append("'").append(this->data).append("'");
6990  out.append("\n");
6991 
6992  out.append(" end: ");
6993  out.append(YESNO(this->end));
6994  out.append("\n");
6995  out.append("}");
6996 }
6997 #endif
6999  switch (field_id) {
7000  case 1: {
7001  this->event_type = value.as_enum<enums::VoiceAssistantTimerEvent>();
7002  return true;
7003  }
7004  case 4: {
7005  this->total_seconds = value.as_uint32();
7006  return true;
7007  }
7008  case 5: {
7009  this->seconds_left = value.as_uint32();
7010  return true;
7011  }
7012  case 6: {
7013  this->is_active = value.as_bool();
7014  return true;
7015  }
7016  default:
7017  return false;
7018  }
7019 }
7021  switch (field_id) {
7022  case 2: {
7023  this->timer_id = value.as_string();
7024  return true;
7025  }
7026  case 3: {
7027  this->name = value.as_string();
7028  return true;
7029  }
7030  default:
7031  return false;
7032  }
7033 }
7035  buffer.encode_enum<enums::VoiceAssistantTimerEvent>(1, this->event_type);
7036  buffer.encode_string(2, this->timer_id);
7037  buffer.encode_string(3, this->name);
7038  buffer.encode_uint32(4, this->total_seconds);
7039  buffer.encode_uint32(5, this->seconds_left);
7040  buffer.encode_bool(6, this->is_active);
7041 }
7042 #ifdef HAS_PROTO_MESSAGE_DUMP
7043 void VoiceAssistantTimerEventResponse::dump_to(std::string &out) const {
7044  __attribute__((unused)) char buffer[64];
7045  out.append("VoiceAssistantTimerEventResponse {\n");
7046  out.append(" event_type: ");
7047  out.append(proto_enum_to_string<enums::VoiceAssistantTimerEvent>(this->event_type));
7048  out.append("\n");
7049 
7050  out.append(" timer_id: ");
7051  out.append("'").append(this->timer_id).append("'");
7052  out.append("\n");
7053 
7054  out.append(" name: ");
7055  out.append("'").append(this->name).append("'");
7056  out.append("\n");
7057 
7058  out.append(" total_seconds: ");
7059  sprintf(buffer, "%" PRIu32, this->total_seconds);
7060  out.append(buffer);
7061  out.append("\n");
7062 
7063  out.append(" seconds_left: ");
7064  sprintf(buffer, "%" PRIu32, this->seconds_left);
7065  out.append(buffer);
7066  out.append("\n");
7067 
7068  out.append(" is_active: ");
7069  out.append(YESNO(this->is_active));
7070  out.append("\n");
7071  out.append("}");
7072 }
7073 #endif
7075  switch (field_id) {
7076  case 1: {
7077  this->media_id = value.as_string();
7078  return true;
7079  }
7080  case 2: {
7081  this->text = value.as_string();
7082  return true;
7083  }
7084  default:
7085  return false;
7086  }
7087 }
7089  buffer.encode_string(1, this->media_id);
7090  buffer.encode_string(2, this->text);
7091 }
7092 #ifdef HAS_PROTO_MESSAGE_DUMP
7093 void VoiceAssistantAnnounceRequest::dump_to(std::string &out) const {
7094  __attribute__((unused)) char buffer[64];
7095  out.append("VoiceAssistantAnnounceRequest {\n");
7096  out.append(" media_id: ");
7097  out.append("'").append(this->media_id).append("'");
7098  out.append("\n");
7099 
7100  out.append(" text: ");
7101  out.append("'").append(this->text).append("'");
7102  out.append("\n");
7103  out.append("}");
7104 }
7105 #endif
7107  switch (field_id) {
7108  case 1: {
7109  this->success = value.as_bool();
7110  return true;
7111  }
7112  default:
7113  return false;
7114  }
7115 }
7116 void VoiceAssistantAnnounceFinished::encode(ProtoWriteBuffer buffer) const { buffer.encode_bool(1, this->success); }
7117 #ifdef HAS_PROTO_MESSAGE_DUMP
7118 void VoiceAssistantAnnounceFinished::dump_to(std::string &out) const {
7119  __attribute__((unused)) char buffer[64];
7120  out.append("VoiceAssistantAnnounceFinished {\n");
7121  out.append(" success: ");
7122  out.append(YESNO(this->success));
7123  out.append("\n");
7124  out.append("}");
7125 }
7126 #endif
7128  switch (field_id) {
7129  case 1: {
7130  this->id = value.as_string();
7131  return true;
7132  }
7133  case 2: {
7134  this->wake_word = value.as_string();
7135  return true;
7136  }
7137  case 3: {
7138  this->trained_languages.push_back(value.as_string());
7139  return true;
7140  }
7141  default:
7142  return false;
7143  }
7144 }
7146  buffer.encode_string(1, this->id);
7147  buffer.encode_string(2, this->wake_word);
7148  for (auto &it : this->trained_languages) {
7149  buffer.encode_string(3, it, true);
7150  }
7151 }
7152 #ifdef HAS_PROTO_MESSAGE_DUMP
7153 void VoiceAssistantWakeWord::dump_to(std::string &out) const {
7154  __attribute__((unused)) char buffer[64];
7155  out.append("VoiceAssistantWakeWord {\n");
7156  out.append(" id: ");
7157  out.append("'").append(this->id).append("'");
7158  out.append("\n");
7159 
7160  out.append(" wake_word: ");
7161  out.append("'").append(this->wake_word).append("'");
7162  out.append("\n");
7163 
7164  for (const auto &it : this->trained_languages) {
7165  out.append(" trained_languages: ");
7166  out.append("'").append(it).append("'");
7167  out.append("\n");
7168  }
7169  out.append("}");
7170 }
7171 #endif
7173 #ifdef HAS_PROTO_MESSAGE_DUMP
7174 void VoiceAssistantConfigurationRequest::dump_to(std::string &out) const {
7175  out.append("VoiceAssistantConfigurationRequest {}");
7176 }
7177 #endif
7179  switch (field_id) {
7180  case 3: {
7181  this->max_active_wake_words = value.as_uint32();
7182  return true;
7183  }
7184  default:
7185  return false;
7186  }
7187 }
7189  switch (field_id) {
7190  case 1: {
7191  this->available_wake_words.push_back(value.as_message<VoiceAssistantWakeWord>());
7192  return true;
7193  }
7194  case 2: {
7195  this->active_wake_words.push_back(value.as_string());
7196  return true;
7197  }
7198  default:
7199  return false;
7200  }
7201 }
7203  for (auto &it : this->available_wake_words) {
7204  buffer.encode_message<VoiceAssistantWakeWord>(1, it, true);
7205  }
7206  for (auto &it : this->active_wake_words) {
7207  buffer.encode_string(2, it, true);
7208  }
7209  buffer.encode_uint32(3, this->max_active_wake_words);
7210 }
7211 #ifdef HAS_PROTO_MESSAGE_DUMP
7212 void VoiceAssistantConfigurationResponse::dump_to(std::string &out) const {
7213  __attribute__((unused)) char buffer[64];
7214  out.append("VoiceAssistantConfigurationResponse {\n");
7215  for (const auto &it : this->available_wake_words) {
7216  out.append(" available_wake_words: ");
7217  it.dump_to(out);
7218  out.append("\n");
7219  }
7220 
7221  for (const auto &it : this->active_wake_words) {
7222  out.append(" active_wake_words: ");
7223  out.append("'").append(it).append("'");
7224  out.append("\n");
7225  }
7226 
7227  out.append(" max_active_wake_words: ");
7228  sprintf(buffer, "%" PRIu32, this->max_active_wake_words);
7229  out.append(buffer);
7230  out.append("\n");
7231  out.append("}");
7232 }
7233 #endif
7235  switch (field_id) {
7236  case 1: {
7237  this->active_wake_words.push_back(value.as_string());
7238  return true;
7239  }
7240  default:
7241  return false;
7242  }
7243 }
7245  for (auto &it : this->active_wake_words) {
7246  buffer.encode_string(1, it, true);
7247  }
7248 }
7249 #ifdef HAS_PROTO_MESSAGE_DUMP
7250 void VoiceAssistantSetConfiguration::dump_to(std::string &out) const {
7251  __attribute__((unused)) char buffer[64];
7252  out.append("VoiceAssistantSetConfiguration {\n");
7253  for (const auto &it : this->active_wake_words) {
7254  out.append(" active_wake_words: ");
7255  out.append("'").append(it).append("'");
7256  out.append("\n");
7257  }
7258  out.append("}");
7259 }
7260 #endif
7262  switch (field_id) {
7263  case 6: {
7264  this->disabled_by_default = value.as_bool();
7265  return true;
7266  }
7267  case 7: {
7268  this->entity_category = value.as_enum<enums::EntityCategory>();
7269  return true;
7270  }
7271  case 8: {
7272  this->supported_features = value.as_uint32();
7273  return true;
7274  }
7275  case 9: {
7276  this->requires_code = value.as_bool();
7277  return true;
7278  }
7279  case 10: {
7280  this->requires_code_to_arm = value.as_bool();
7281  return true;
7282  }
7283  default:
7284  return false;
7285  }
7286 }
7288  switch (field_id) {
7289  case 1: {
7290  this->object_id = value.as_string();
7291  return true;
7292  }
7293  case 3: {
7294  this->name = value.as_string();
7295  return true;
7296  }
7297  case 4: {
7298  this->unique_id = value.as_string();
7299  return true;
7300  }
7301  case 5: {
7302  this->icon = value.as_string();
7303  return true;
7304  }
7305  default:
7306  return false;
7307  }
7308 }
7310  switch (field_id) {
7311  case 2: {
7312  this->key = value.as_fixed32();
7313  return true;
7314  }
7315  default:
7316  return false;
7317  }
7318 }
7320  buffer.encode_string(1, this->object_id);
7321  buffer.encode_fixed32(2, this->key);
7322  buffer.encode_string(3, this->name);
7323  buffer.encode_string(4, this->unique_id);
7324  buffer.encode_string(5, this->icon);
7325  buffer.encode_bool(6, this->disabled_by_default);
7326  buffer.encode_enum<enums::EntityCategory>(7, this->entity_category);
7327  buffer.encode_uint32(8, this->supported_features);
7328  buffer.encode_bool(9, this->requires_code);
7329  buffer.encode_bool(10, this->requires_code_to_arm);
7330 }
7331 #ifdef HAS_PROTO_MESSAGE_DUMP
7333  __attribute__((unused)) char buffer[64];
7334  out.append("ListEntitiesAlarmControlPanelResponse {\n");
7335  out.append(" object_id: ");
7336  out.append("'").append(this->object_id).append("'");
7337  out.append("\n");
7338 
7339  out.append(" key: ");
7340  sprintf(buffer, "%" PRIu32, this->key);
7341  out.append(buffer);
7342  out.append("\n");
7343 
7344  out.append(" name: ");
7345  out.append("'").append(this->name).append("'");
7346  out.append("\n");
7347 
7348  out.append(" unique_id: ");
7349  out.append("'").append(this->unique_id).append("'");
7350  out.append("\n");
7351 
7352  out.append(" icon: ");
7353  out.append("'").append(this->icon).append("'");
7354  out.append("\n");
7355 
7356  out.append(" disabled_by_default: ");
7357  out.append(YESNO(this->disabled_by_default));
7358  out.append("\n");
7359 
7360  out.append(" entity_category: ");
7361  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
7362  out.append("\n");
7363 
7364  out.append(" supported_features: ");
7365  sprintf(buffer, "%" PRIu32, this->supported_features);
7366  out.append(buffer);
7367  out.append("\n");
7368 
7369  out.append(" requires_code: ");
7370  out.append(YESNO(this->requires_code));
7371  out.append("\n");
7372 
7373  out.append(" requires_code_to_arm: ");
7374  out.append(YESNO(this->requires_code_to_arm));
7375  out.append("\n");
7376  out.append("}");
7377 }
7378 #endif
7380  switch (field_id) {
7381  case 2: {
7382  this->state = value.as_enum<enums::AlarmControlPanelState>();
7383  return true;
7384  }
7385  default:
7386  return false;
7387  }
7388 }
7390  switch (field_id) {
7391  case 1: {
7392  this->key = value.as_fixed32();
7393  return true;
7394  }
7395  default:
7396  return false;
7397  }
7398 }
7400  buffer.encode_fixed32(1, this->key);
7402 }
7403 #ifdef HAS_PROTO_MESSAGE_DUMP
7404 void AlarmControlPanelStateResponse::dump_to(std::string &out) const {
7405  __attribute__((unused)) char buffer[64];
7406  out.append("AlarmControlPanelStateResponse {\n");
7407  out.append(" key: ");
7408  sprintf(buffer, "%" PRIu32, this->key);
7409  out.append(buffer);
7410  out.append("\n");
7411 
7412  out.append(" state: ");
7413  out.append(proto_enum_to_string<enums::AlarmControlPanelState>(this->state));
7414  out.append("\n");
7415  out.append("}");
7416 }
7417 #endif
7419  switch (field_id) {
7420  case 2: {
7421  this->command = value.as_enum<enums::AlarmControlPanelStateCommand>();
7422  return true;
7423  }
7424  default:
7425  return false;
7426  }
7427 }
7429  switch (field_id) {
7430  case 3: {
7431  this->code = value.as_string();
7432  return true;
7433  }
7434  default:
7435  return false;
7436  }
7437 }
7439  switch (field_id) {
7440  case 1: {
7441  this->key = value.as_fixed32();
7442  return true;
7443  }
7444  default:
7445  return false;
7446  }
7447 }
7449  buffer.encode_fixed32(1, this->key);
7450  buffer.encode_enum<enums::AlarmControlPanelStateCommand>(2, this->command);
7451  buffer.encode_string(3, this->code);
7452 }
7453 #ifdef HAS_PROTO_MESSAGE_DUMP
7454 void AlarmControlPanelCommandRequest::dump_to(std::string &out) const {
7455  __attribute__((unused)) char buffer[64];
7456  out.append("AlarmControlPanelCommandRequest {\n");
7457  out.append(" key: ");
7458  sprintf(buffer, "%" PRIu32, this->key);
7459  out.append(buffer);
7460  out.append("\n");
7461 
7462  out.append(" command: ");
7463  out.append(proto_enum_to_string<enums::AlarmControlPanelStateCommand>(this->command));
7464  out.append("\n");
7465 
7466  out.append(" code: ");
7467  out.append("'").append(this->code).append("'");
7468  out.append("\n");
7469  out.append("}");
7470 }
7471 #endif
7473  switch (field_id) {
7474  case 6: {
7475  this->disabled_by_default = value.as_bool();
7476  return true;
7477  }
7478  case 7: {
7479  this->entity_category = value.as_enum<enums::EntityCategory>();
7480  return true;
7481  }
7482  case 8: {
7483  this->min_length = value.as_uint32();
7484  return true;
7485  }
7486  case 9: {
7487  this->max_length = value.as_uint32();
7488  return true;
7489  }
7490  case 11: {
7491  this->mode = value.as_enum<enums::TextMode>();
7492  return true;
7493  }
7494  default:
7495  return false;
7496  }
7497 }
7499  switch (field_id) {
7500  case 1: {
7501  this->object_id = value.as_string();
7502  return true;
7503  }
7504  case 3: {
7505  this->name = value.as_string();
7506  return true;
7507  }
7508  case 4: {
7509  this->unique_id = value.as_string();
7510  return true;
7511  }
7512  case 5: {
7513  this->icon = value.as_string();
7514  return true;
7515  }
7516  case 10: {
7517  this->pattern = value.as_string();
7518  return true;
7519  }
7520  default:
7521  return false;
7522  }
7523 }
7524 bool ListEntitiesTextResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
7525  switch (field_id) {
7526  case 2: {
7527  this->key = value.as_fixed32();
7528  return true;
7529  }
7530  default:
7531  return false;
7532  }
7533 }
7535  buffer.encode_string(1, this->object_id);
7536  buffer.encode_fixed32(2, this->key);
7537  buffer.encode_string(3, this->name);
7538  buffer.encode_string(4, this->unique_id);
7539  buffer.encode_string(5, this->icon);
7540  buffer.encode_bool(6, this->disabled_by_default);
7541  buffer.encode_enum<enums::EntityCategory>(7, this->entity_category);
7542  buffer.encode_uint32(8, this->min_length);
7543  buffer.encode_uint32(9, this->max_length);
7544  buffer.encode_string(10, this->pattern);
7545  buffer.encode_enum<enums::TextMode>(11, this->mode);
7546 }
7547 #ifdef HAS_PROTO_MESSAGE_DUMP
7548 void ListEntitiesTextResponse::dump_to(std::string &out) const {
7549  __attribute__((unused)) char buffer[64];
7550  out.append("ListEntitiesTextResponse {\n");
7551  out.append(" object_id: ");
7552  out.append("'").append(this->object_id).append("'");
7553  out.append("\n");
7554 
7555  out.append(" key: ");
7556  sprintf(buffer, "%" PRIu32, this->key);
7557  out.append(buffer);
7558  out.append("\n");
7559 
7560  out.append(" name: ");
7561  out.append("'").append(this->name).append("'");
7562  out.append("\n");
7563 
7564  out.append(" unique_id: ");
7565  out.append("'").append(this->unique_id).append("'");
7566  out.append("\n");
7567 
7568  out.append(" icon: ");
7569  out.append("'").append(this->icon).append("'");
7570  out.append("\n");
7571 
7572  out.append(" disabled_by_default: ");
7573  out.append(YESNO(this->disabled_by_default));
7574  out.append("\n");
7575 
7576  out.append(" entity_category: ");
7577  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
7578  out.append("\n");
7579 
7580  out.append(" min_length: ");
7581  sprintf(buffer, "%" PRIu32, this->min_length);
7582  out.append(buffer);
7583  out.append("\n");
7584 
7585  out.append(" max_length: ");
7586  sprintf(buffer, "%" PRIu32, this->max_length);
7587  out.append(buffer);
7588  out.append("\n");
7589 
7590  out.append(" pattern: ");
7591  out.append("'").append(this->pattern).append("'");
7592  out.append("\n");
7593 
7594  out.append(" mode: ");
7595  out.append(proto_enum_to_string<enums::TextMode>(this->mode));
7596  out.append("\n");
7597  out.append("}");
7598 }
7599 #endif
7600 bool TextStateResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
7601  switch (field_id) {
7602  case 3: {
7603  this->missing_state = value.as_bool();
7604  return true;
7605  }
7606  default:
7607  return false;
7608  }
7609 }
7611  switch (field_id) {
7612  case 2: {
7613  this->state = value.as_string();
7614  return true;
7615  }
7616  default:
7617  return false;
7618  }
7619 }
7620 bool TextStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
7621  switch (field_id) {
7622  case 1: {
7623  this->key = value.as_fixed32();
7624  return true;
7625  }
7626  default:
7627  return false;
7628  }
7629 }
7631  buffer.encode_fixed32(1, this->key);
7632  buffer.encode_string(2, this->state);
7633  buffer.encode_bool(3, this->missing_state);
7634 }
7635 #ifdef HAS_PROTO_MESSAGE_DUMP
7636 void TextStateResponse::dump_to(std::string &out) const {
7637  __attribute__((unused)) char buffer[64];
7638  out.append("TextStateResponse {\n");
7639  out.append(" key: ");
7640  sprintf(buffer, "%" PRIu32, this->key);
7641  out.append(buffer);
7642  out.append("\n");
7643 
7644  out.append(" state: ");
7645  out.append("'").append(this->state).append("'");
7646  out.append("\n");
7647 
7648  out.append(" missing_state: ");
7649  out.append(YESNO(this->missing_state));
7650  out.append("\n");
7651  out.append("}");
7652 }
7653 #endif
7655  switch (field_id) {
7656  case 2: {
7657  this->state = value.as_string();
7658  return true;
7659  }
7660  default:
7661  return false;
7662  }
7663 }
7664 bool TextCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
7665  switch (field_id) {
7666  case 1: {
7667  this->key = value.as_fixed32();
7668  return true;
7669  }
7670  default:
7671  return false;
7672  }
7673 }
7675  buffer.encode_fixed32(1, this->key);
7676  buffer.encode_string(2, this->state);
7677 }
7678 #ifdef HAS_PROTO_MESSAGE_DUMP
7679 void TextCommandRequest::dump_to(std::string &out) const {
7680  __attribute__((unused)) char buffer[64];
7681  out.append("TextCommandRequest {\n");
7682  out.append(" key: ");
7683  sprintf(buffer, "%" PRIu32, this->key);
7684  out.append(buffer);
7685  out.append("\n");
7686 
7687  out.append(" state: ");
7688  out.append("'").append(this->state).append("'");
7689  out.append("\n");
7690  out.append("}");
7691 }
7692 #endif
7694  switch (field_id) {
7695  case 6: {
7696  this->disabled_by_default = value.as_bool();
7697  return true;
7698  }
7699  case 7: {
7700  this->entity_category = value.as_enum<enums::EntityCategory>();
7701  return true;
7702  }
7703  default:
7704  return false;
7705  }
7706 }
7708  switch (field_id) {
7709  case 1: {
7710  this->object_id = value.as_string();
7711  return true;
7712  }
7713  case 3: {
7714  this->name = value.as_string();
7715  return true;
7716  }
7717  case 4: {
7718  this->unique_id = value.as_string();
7719  return true;
7720  }
7721  case 5: {
7722  this->icon = value.as_string();
7723  return true;
7724  }
7725  default:
7726  return false;
7727  }
7728 }
7729 bool ListEntitiesDateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
7730  switch (field_id) {
7731  case 2: {
7732  this->key = value.as_fixed32();
7733  return true;
7734  }
7735  default:
7736  return false;
7737  }
7738 }
7740  buffer.encode_string(1, this->object_id);
7741  buffer.encode_fixed32(2, this->key);
7742  buffer.encode_string(3, this->name);
7743  buffer.encode_string(4, this->unique_id);
7744  buffer.encode_string(5, this->icon);
7745  buffer.encode_bool(6, this->disabled_by_default);
7746  buffer.encode_enum<enums::EntityCategory>(7, this->entity_category);
7747 }
7748 #ifdef HAS_PROTO_MESSAGE_DUMP
7749 void ListEntitiesDateResponse::dump_to(std::string &out) const {
7750  __attribute__((unused)) char buffer[64];
7751  out.append("ListEntitiesDateResponse {\n");
7752  out.append(" object_id: ");
7753  out.append("'").append(this->object_id).append("'");
7754  out.append("\n");
7755 
7756  out.append(" key: ");
7757  sprintf(buffer, "%" PRIu32, this->key);
7758  out.append(buffer);
7759  out.append("\n");
7760 
7761  out.append(" name: ");
7762  out.append("'").append(this->name).append("'");
7763  out.append("\n");
7764 
7765  out.append(" unique_id: ");
7766  out.append("'").append(this->unique_id).append("'");
7767  out.append("\n");
7768 
7769  out.append(" icon: ");
7770  out.append("'").append(this->icon).append("'");
7771  out.append("\n");
7772 
7773  out.append(" disabled_by_default: ");
7774  out.append(YESNO(this->disabled_by_default));
7775  out.append("\n");
7776 
7777  out.append(" entity_category: ");
7778  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
7779  out.append("\n");
7780  out.append("}");
7781 }
7782 #endif
7783 bool DateStateResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
7784  switch (field_id) {
7785  case 2: {
7786  this->missing_state = value.as_bool();
7787  return true;
7788  }
7789  case 3: {
7790  this->year = value.as_uint32();
7791  return true;
7792  }
7793  case 4: {
7794  this->month = value.as_uint32();
7795  return true;
7796  }
7797  case 5: {
7798  this->day = value.as_uint32();
7799  return true;
7800  }
7801  default:
7802  return false;
7803  }
7804 }
7805 bool DateStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
7806  switch (field_id) {
7807  case 1: {
7808  this->key = value.as_fixed32();
7809  return true;
7810  }
7811  default:
7812  return false;
7813  }
7814 }
7816  buffer.encode_fixed32(1, this->key);
7817  buffer.encode_bool(2, this->missing_state);
7818  buffer.encode_uint32(3, this->year);
7819  buffer.encode_uint32(4, this->month);
7820  buffer.encode_uint32(5, this->day);
7821 }
7822 #ifdef HAS_PROTO_MESSAGE_DUMP
7823 void DateStateResponse::dump_to(std::string &out) const {
7824  __attribute__((unused)) char buffer[64];
7825  out.append("DateStateResponse {\n");
7826  out.append(" key: ");
7827  sprintf(buffer, "%" PRIu32, this->key);
7828  out.append(buffer);
7829  out.append("\n");
7830 
7831  out.append(" missing_state: ");
7832  out.append(YESNO(this->missing_state));
7833  out.append("\n");
7834 
7835  out.append(" year: ");
7836  sprintf(buffer, "%" PRIu32, this->year);
7837  out.append(buffer);
7838  out.append("\n");
7839 
7840  out.append(" month: ");
7841  sprintf(buffer, "%" PRIu32, this->month);
7842  out.append(buffer);
7843  out.append("\n");
7844 
7845  out.append(" day: ");
7846  sprintf(buffer, "%" PRIu32, this->day);
7847  out.append(buffer);
7848  out.append("\n");
7849  out.append("}");
7850 }
7851 #endif
7852 bool DateCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
7853  switch (field_id) {
7854  case 2: {
7855  this->year = value.as_uint32();
7856  return true;
7857  }
7858  case 3: {
7859  this->month = value.as_uint32();
7860  return true;
7861  }
7862  case 4: {
7863  this->day = value.as_uint32();
7864  return true;
7865  }
7866  default:
7867  return false;
7868  }
7869 }
7870 bool DateCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
7871  switch (field_id) {
7872  case 1: {
7873  this->key = value.as_fixed32();
7874  return true;
7875  }
7876  default:
7877  return false;
7878  }
7879 }
7881  buffer.encode_fixed32(1, this->key);
7882  buffer.encode_uint32(2, this->year);
7883  buffer.encode_uint32(3, this->month);
7884  buffer.encode_uint32(4, this->day);
7885 }
7886 #ifdef HAS_PROTO_MESSAGE_DUMP
7887 void DateCommandRequest::dump_to(std::string &out) const {
7888  __attribute__((unused)) char buffer[64];
7889  out.append("DateCommandRequest {\n");
7890  out.append(" key: ");
7891  sprintf(buffer, "%" PRIu32, this->key);
7892  out.append(buffer);
7893  out.append("\n");
7894 
7895  out.append(" year: ");
7896  sprintf(buffer, "%" PRIu32, this->year);
7897  out.append(buffer);
7898  out.append("\n");
7899 
7900  out.append(" month: ");
7901  sprintf(buffer, "%" PRIu32, this->month);
7902  out.append(buffer);
7903  out.append("\n");
7904 
7905  out.append(" day: ");
7906  sprintf(buffer, "%" PRIu32, this->day);
7907  out.append(buffer);
7908  out.append("\n");
7909  out.append("}");
7910 }
7911 #endif
7913  switch (field_id) {
7914  case 6: {
7915  this->disabled_by_default = value.as_bool();
7916  return true;
7917  }
7918  case 7: {
7919  this->entity_category = value.as_enum<enums::EntityCategory>();
7920  return true;
7921  }
7922  default:
7923  return false;
7924  }
7925 }
7927  switch (field_id) {
7928  case 1: {
7929  this->object_id = value.as_string();
7930  return true;
7931  }
7932  case 3: {
7933  this->name = value.as_string();
7934  return true;
7935  }
7936  case 4: {
7937  this->unique_id = value.as_string();
7938  return true;
7939  }
7940  case 5: {
7941  this->icon = value.as_string();
7942  return true;
7943  }
7944  default:
7945  return false;
7946  }
7947 }
7948 bool ListEntitiesTimeResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
7949  switch (field_id) {
7950  case 2: {
7951  this->key = value.as_fixed32();
7952  return true;
7953  }
7954  default:
7955  return false;
7956  }
7957 }
7959  buffer.encode_string(1, this->object_id);
7960  buffer.encode_fixed32(2, this->key);
7961  buffer.encode_string(3, this->name);
7962  buffer.encode_string(4, this->unique_id);
7963  buffer.encode_string(5, this->icon);
7964  buffer.encode_bool(6, this->disabled_by_default);
7965  buffer.encode_enum<enums::EntityCategory>(7, this->entity_category);
7966 }
7967 #ifdef HAS_PROTO_MESSAGE_DUMP
7968 void ListEntitiesTimeResponse::dump_to(std::string &out) const {
7969  __attribute__((unused)) char buffer[64];
7970  out.append("ListEntitiesTimeResponse {\n");
7971  out.append(" object_id: ");
7972  out.append("'").append(this->object_id).append("'");
7973  out.append("\n");
7974 
7975  out.append(" key: ");
7976  sprintf(buffer, "%" PRIu32, this->key);
7977  out.append(buffer);
7978  out.append("\n");
7979 
7980  out.append(" name: ");
7981  out.append("'").append(this->name).append("'");
7982  out.append("\n");
7983 
7984  out.append(" unique_id: ");
7985  out.append("'").append(this->unique_id).append("'");
7986  out.append("\n");
7987 
7988  out.append(" icon: ");
7989  out.append("'").append(this->icon).append("'");
7990  out.append("\n");
7991 
7992  out.append(" disabled_by_default: ");
7993  out.append(YESNO(this->disabled_by_default));
7994  out.append("\n");
7995 
7996  out.append(" entity_category: ");
7997  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
7998  out.append("\n");
7999  out.append("}");
8000 }
8001 #endif
8002 bool TimeStateResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
8003  switch (field_id) {
8004  case 2: {
8005  this->missing_state = value.as_bool();
8006  return true;
8007  }
8008  case 3: {
8009  this->hour = value.as_uint32();
8010  return true;
8011  }
8012  case 4: {
8013  this->minute = value.as_uint32();
8014  return true;
8015  }
8016  case 5: {
8017  this->second = value.as_uint32();
8018  return true;
8019  }
8020  default:
8021  return false;
8022  }
8023 }
8024 bool TimeStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
8025  switch (field_id) {
8026  case 1: {
8027  this->key = value.as_fixed32();
8028  return true;
8029  }
8030  default:
8031  return false;
8032  }
8033 }
8035  buffer.encode_fixed32(1, this->key);
8036  buffer.encode_bool(2, this->missing_state);
8037  buffer.encode_uint32(3, this->hour);
8038  buffer.encode_uint32(4, this->minute);
8039  buffer.encode_uint32(5, this->second);
8040 }
8041 #ifdef HAS_PROTO_MESSAGE_DUMP
8042 void TimeStateResponse::dump_to(std::string &out) const {
8043  __attribute__((unused)) char buffer[64];
8044  out.append("TimeStateResponse {\n");
8045  out.append(" key: ");
8046  sprintf(buffer, "%" PRIu32, this->key);
8047  out.append(buffer);
8048  out.append("\n");
8049 
8050  out.append(" missing_state: ");
8051  out.append(YESNO(this->missing_state));
8052  out.append("\n");
8053 
8054  out.append(" hour: ");
8055  sprintf(buffer, "%" PRIu32, this->hour);
8056  out.append(buffer);
8057  out.append("\n");
8058 
8059  out.append(" minute: ");
8060  sprintf(buffer, "%" PRIu32, this->minute);
8061  out.append(buffer);
8062  out.append("\n");
8063 
8064  out.append(" second: ");
8065  sprintf(buffer, "%" PRIu32, this->second);
8066  out.append(buffer);
8067  out.append("\n");
8068  out.append("}");
8069 }
8070 #endif
8071 bool TimeCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
8072  switch (field_id) {
8073  case 2: {
8074  this->hour = value.as_uint32();
8075  return true;
8076  }
8077  case 3: {
8078  this->minute = value.as_uint32();
8079  return true;
8080  }
8081  case 4: {
8082  this->second = value.as_uint32();
8083  return true;
8084  }
8085  default:
8086  return false;
8087  }
8088 }
8089 bool TimeCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
8090  switch (field_id) {
8091  case 1: {
8092  this->key = value.as_fixed32();
8093  return true;
8094  }
8095  default:
8096  return false;
8097  }
8098 }
8100  buffer.encode_fixed32(1, this->key);
8101  buffer.encode_uint32(2, this->hour);
8102  buffer.encode_uint32(3, this->minute);
8103  buffer.encode_uint32(4, this->second);
8104 }
8105 #ifdef HAS_PROTO_MESSAGE_DUMP
8106 void TimeCommandRequest::dump_to(std::string &out) const {
8107  __attribute__((unused)) char buffer[64];
8108  out.append("TimeCommandRequest {\n");
8109  out.append(" key: ");
8110  sprintf(buffer, "%" PRIu32, this->key);
8111  out.append(buffer);
8112  out.append("\n");
8113 
8114  out.append(" hour: ");
8115  sprintf(buffer, "%" PRIu32, this->hour);
8116  out.append(buffer);
8117  out.append("\n");
8118 
8119  out.append(" minute: ");
8120  sprintf(buffer, "%" PRIu32, this->minute);
8121  out.append(buffer);
8122  out.append("\n");
8123 
8124  out.append(" second: ");
8125  sprintf(buffer, "%" PRIu32, this->second);
8126  out.append(buffer);
8127  out.append("\n");
8128  out.append("}");
8129 }
8130 #endif
8132  switch (field_id) {
8133  case 6: {
8134  this->disabled_by_default = value.as_bool();
8135  return true;
8136  }
8137  case 7: {
8138  this->entity_category = value.as_enum<enums::EntityCategory>();
8139  return true;
8140  }
8141  default:
8142  return false;
8143  }
8144 }
8146  switch (field_id) {
8147  case 1: {
8148  this->object_id = value.as_string();
8149  return true;
8150  }
8151  case 3: {
8152  this->name = value.as_string();
8153  return true;
8154  }
8155  case 4: {
8156  this->unique_id = value.as_string();
8157  return true;
8158  }
8159  case 5: {
8160  this->icon = value.as_string();
8161  return true;
8162  }
8163  case 8: {
8164  this->device_class = value.as_string();
8165  return true;
8166  }
8167  case 9: {
8168  this->event_types.push_back(value.as_string());
8169  return true;
8170  }
8171  default:
8172  return false;
8173  }
8174 }
8175 bool ListEntitiesEventResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
8176  switch (field_id) {
8177  case 2: {
8178  this->key = value.as_fixed32();
8179  return true;
8180  }
8181  default:
8182  return false;
8183  }
8184 }
8186  buffer.encode_string(1, this->object_id);
8187  buffer.encode_fixed32(2, this->key);
8188  buffer.encode_string(3, this->name);
8189  buffer.encode_string(4, this->unique_id);
8190  buffer.encode_string(5, this->icon);
8191  buffer.encode_bool(6, this->disabled_by_default);
8192  buffer.encode_enum<enums::EntityCategory>(7, this->entity_category);
8193  buffer.encode_string(8, this->device_class);
8194  for (auto &it : this->event_types) {
8195  buffer.encode_string(9, it, true);
8196  }
8197 }
8198 #ifdef HAS_PROTO_MESSAGE_DUMP
8199 void ListEntitiesEventResponse::dump_to(std::string &out) const {
8200  __attribute__((unused)) char buffer[64];
8201  out.append("ListEntitiesEventResponse {\n");
8202  out.append(" object_id: ");
8203  out.append("'").append(this->object_id).append("'");
8204  out.append("\n");
8205 
8206  out.append(" key: ");
8207  sprintf(buffer, "%" PRIu32, this->key);
8208  out.append(buffer);
8209  out.append("\n");
8210 
8211  out.append(" name: ");
8212  out.append("'").append(this->name).append("'");
8213  out.append("\n");
8214 
8215  out.append(" unique_id: ");
8216  out.append("'").append(this->unique_id).append("'");
8217  out.append("\n");
8218 
8219  out.append(" icon: ");
8220  out.append("'").append(this->icon).append("'");
8221  out.append("\n");
8222 
8223  out.append(" disabled_by_default: ");
8224  out.append(YESNO(this->disabled_by_default));
8225  out.append("\n");
8226 
8227  out.append(" entity_category: ");
8228  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
8229  out.append("\n");
8230 
8231  out.append(" device_class: ");
8232  out.append("'").append(this->device_class).append("'");
8233  out.append("\n");
8234 
8235  for (const auto &it : this->event_types) {
8236  out.append(" event_types: ");
8237  out.append("'").append(it).append("'");
8238  out.append("\n");
8239  }
8240  out.append("}");
8241 }
8242 #endif
8243 bool EventResponse::decode_length(uint32_t field_id, ProtoLengthDelimited value) {
8244  switch (field_id) {
8245  case 2: {
8246  this->event_type = value.as_string();
8247  return true;
8248  }
8249  default:
8250  return false;
8251  }
8252 }
8253 bool EventResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
8254  switch (field_id) {
8255  case 1: {
8256  this->key = value.as_fixed32();
8257  return true;
8258  }
8259  default:
8260  return false;
8261  }
8262 }
8264  buffer.encode_fixed32(1, this->key);
8265  buffer.encode_string(2, this->event_type);
8266 }
8267 #ifdef HAS_PROTO_MESSAGE_DUMP
8268 void EventResponse::dump_to(std::string &out) const {
8269  __attribute__((unused)) char buffer[64];
8270  out.append("EventResponse {\n");
8271  out.append(" key: ");
8272  sprintf(buffer, "%" PRIu32, this->key);
8273  out.append(buffer);
8274  out.append("\n");
8275 
8276  out.append(" event_type: ");
8277  out.append("'").append(this->event_type).append("'");
8278  out.append("\n");
8279  out.append("}");
8280 }
8281 #endif
8283  switch (field_id) {
8284  case 6: {
8285  this->disabled_by_default = value.as_bool();
8286  return true;
8287  }
8288  case 7: {
8289  this->entity_category = value.as_enum<enums::EntityCategory>();
8290  return true;
8291  }
8292  case 9: {
8293  this->assumed_state = value.as_bool();
8294  return true;
8295  }
8296  case 10: {
8297  this->supports_position = value.as_bool();
8298  return true;
8299  }
8300  case 11: {
8301  this->supports_stop = value.as_bool();
8302  return true;
8303  }
8304  default:
8305  return false;
8306  }
8307 }
8309  switch (field_id) {
8310  case 1: {
8311  this->object_id = value.as_string();
8312  return true;
8313  }
8314  case 3: {
8315  this->name = value.as_string();
8316  return true;
8317  }
8318  case 4: {
8319  this->unique_id = value.as_string();
8320  return true;
8321  }
8322  case 5: {
8323  this->icon = value.as_string();
8324  return true;
8325  }
8326  case 8: {
8327  this->device_class = value.as_string();
8328  return true;
8329  }
8330  default:
8331  return false;
8332  }
8333 }
8334 bool ListEntitiesValveResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
8335  switch (field_id) {
8336  case 2: {
8337  this->key = value.as_fixed32();
8338  return true;
8339  }
8340  default:
8341  return false;
8342  }
8343 }
8345  buffer.encode_string(1, this->object_id);
8346  buffer.encode_fixed32(2, this->key);
8347  buffer.encode_string(3, this->name);
8348  buffer.encode_string(4, this->unique_id);
8349  buffer.encode_string(5, this->icon);
8350  buffer.encode_bool(6, this->disabled_by_default);
8351  buffer.encode_enum<enums::EntityCategory>(7, this->entity_category);
8352  buffer.encode_string(8, this->device_class);
8353  buffer.encode_bool(9, this->assumed_state);
8354  buffer.encode_bool(10, this->supports_position);
8355  buffer.encode_bool(11, this->supports_stop);
8356 }
8357 #ifdef HAS_PROTO_MESSAGE_DUMP
8358 void ListEntitiesValveResponse::dump_to(std::string &out) const {
8359  __attribute__((unused)) char buffer[64];
8360  out.append("ListEntitiesValveResponse {\n");
8361  out.append(" object_id: ");
8362  out.append("'").append(this->object_id).append("'");
8363  out.append("\n");
8364 
8365  out.append(" key: ");
8366  sprintf(buffer, "%" PRIu32, this->key);
8367  out.append(buffer);
8368  out.append("\n");
8369 
8370  out.append(" name: ");
8371  out.append("'").append(this->name).append("'");
8372  out.append("\n");
8373 
8374  out.append(" unique_id: ");
8375  out.append("'").append(this->unique_id).append("'");
8376  out.append("\n");
8377 
8378  out.append(" icon: ");
8379  out.append("'").append(this->icon).append("'");
8380  out.append("\n");
8381 
8382  out.append(" disabled_by_default: ");
8383  out.append(YESNO(this->disabled_by_default));
8384  out.append("\n");
8385 
8386  out.append(" entity_category: ");
8387  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
8388  out.append("\n");
8389 
8390  out.append(" device_class: ");
8391  out.append("'").append(this->device_class).append("'");
8392  out.append("\n");
8393 
8394  out.append(" assumed_state: ");
8395  out.append(YESNO(this->assumed_state));
8396  out.append("\n");
8397 
8398  out.append(" supports_position: ");
8399  out.append(YESNO(this->supports_position));
8400  out.append("\n");
8401 
8402  out.append(" supports_stop: ");
8403  out.append(YESNO(this->supports_stop));
8404  out.append("\n");
8405  out.append("}");
8406 }
8407 #endif
8408 bool ValveStateResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
8409  switch (field_id) {
8410  case 3: {
8411  this->current_operation = value.as_enum<enums::ValveOperation>();
8412  return true;
8413  }
8414  default:
8415  return false;
8416  }
8417 }
8418 bool ValveStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
8419  switch (field_id) {
8420  case 1: {
8421  this->key = value.as_fixed32();
8422  return true;
8423  }
8424  case 2: {
8425  this->position = value.as_float();
8426  return true;
8427  }
8428  default:
8429  return false;
8430  }
8431 }
8433  buffer.encode_fixed32(1, this->key);
8434  buffer.encode_float(2, this->position);
8435  buffer.encode_enum<enums::ValveOperation>(3, this->current_operation);
8436 }
8437 #ifdef HAS_PROTO_MESSAGE_DUMP
8438 void ValveStateResponse::dump_to(std::string &out) const {
8439  __attribute__((unused)) char buffer[64];
8440  out.append("ValveStateResponse {\n");
8441  out.append(" key: ");
8442  sprintf(buffer, "%" PRIu32, this->key);
8443  out.append(buffer);
8444  out.append("\n");
8445 
8446  out.append(" position: ");
8447  sprintf(buffer, "%g", this->position);
8448  out.append(buffer);
8449  out.append("\n");
8450 
8451  out.append(" current_operation: ");
8452  out.append(proto_enum_to_string<enums::ValveOperation>(this->current_operation));
8453  out.append("\n");
8454  out.append("}");
8455 }
8456 #endif
8457 bool ValveCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
8458  switch (field_id) {
8459  case 2: {
8460  this->has_position = value.as_bool();
8461  return true;
8462  }
8463  case 4: {
8464  this->stop = value.as_bool();
8465  return true;
8466  }
8467  default:
8468  return false;
8469  }
8470 }
8471 bool ValveCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
8472  switch (field_id) {
8473  case 1: {
8474  this->key = value.as_fixed32();
8475  return true;
8476  }
8477  case 3: {
8478  this->position = value.as_float();
8479  return true;
8480  }
8481  default:
8482  return false;
8483  }
8484 }
8486  buffer.encode_fixed32(1, this->key);
8487  buffer.encode_bool(2, this->has_position);
8488  buffer.encode_float(3, this->position);
8489  buffer.encode_bool(4, this->stop);
8490 }
8491 #ifdef HAS_PROTO_MESSAGE_DUMP
8492 void ValveCommandRequest::dump_to(std::string &out) const {
8493  __attribute__((unused)) char buffer[64];
8494  out.append("ValveCommandRequest {\n");
8495  out.append(" key: ");
8496  sprintf(buffer, "%" PRIu32, this->key);
8497  out.append(buffer);
8498  out.append("\n");
8499 
8500  out.append(" has_position: ");
8501  out.append(YESNO(this->has_position));
8502  out.append("\n");
8503 
8504  out.append(" position: ");
8505  sprintf(buffer, "%g", this->position);
8506  out.append(buffer);
8507  out.append("\n");
8508 
8509  out.append(" stop: ");
8510  out.append(YESNO(this->stop));
8511  out.append("\n");
8512  out.append("}");
8513 }
8514 #endif
8516  switch (field_id) {
8517  case 6: {
8518  this->disabled_by_default = value.as_bool();
8519  return true;
8520  }
8521  case 7: {
8522  this->entity_category = value.as_enum<enums::EntityCategory>();
8523  return true;
8524  }
8525  default:
8526  return false;
8527  }
8528 }
8530  switch (field_id) {
8531  case 1: {
8532  this->object_id = value.as_string();
8533  return true;
8534  }
8535  case 3: {
8536  this->name = value.as_string();
8537  return true;
8538  }
8539  case 4: {
8540  this->unique_id = value.as_string();
8541  return true;
8542  }
8543  case 5: {
8544  this->icon = value.as_string();
8545  return true;
8546  }
8547  default:
8548  return false;
8549  }
8550 }
8552  switch (field_id) {
8553  case 2: {
8554  this->key = value.as_fixed32();
8555  return true;
8556  }
8557  default:
8558  return false;
8559  }
8560 }
8562  buffer.encode_string(1, this->object_id);
8563  buffer.encode_fixed32(2, this->key);
8564  buffer.encode_string(3, this->name);
8565  buffer.encode_string(4, this->unique_id);
8566  buffer.encode_string(5, this->icon);
8567  buffer.encode_bool(6, this->disabled_by_default);
8568  buffer.encode_enum<enums::EntityCategory>(7, this->entity_category);
8569 }
8570 #ifdef HAS_PROTO_MESSAGE_DUMP
8571 void ListEntitiesDateTimeResponse::dump_to(std::string &out) const {
8572  __attribute__((unused)) char buffer[64];
8573  out.append("ListEntitiesDateTimeResponse {\n");
8574  out.append(" object_id: ");
8575  out.append("'").append(this->object_id).append("'");
8576  out.append("\n");
8577 
8578  out.append(" key: ");
8579  sprintf(buffer, "%" PRIu32, this->key);
8580  out.append(buffer);
8581  out.append("\n");
8582 
8583  out.append(" name: ");
8584  out.append("'").append(this->name).append("'");
8585  out.append("\n");
8586 
8587  out.append(" unique_id: ");
8588  out.append("'").append(this->unique_id).append("'");
8589  out.append("\n");
8590 
8591  out.append(" icon: ");
8592  out.append("'").append(this->icon).append("'");
8593  out.append("\n");
8594 
8595  out.append(" disabled_by_default: ");
8596  out.append(YESNO(this->disabled_by_default));
8597  out.append("\n");
8598 
8599  out.append(" entity_category: ");
8600  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
8601  out.append("\n");
8602  out.append("}");
8603 }
8604 #endif
8605 bool DateTimeStateResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
8606  switch (field_id) {
8607  case 2: {
8608  this->missing_state = value.as_bool();
8609  return true;
8610  }
8611  default:
8612  return false;
8613  }
8614 }
8615 bool DateTimeStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
8616  switch (field_id) {
8617  case 1: {
8618  this->key = value.as_fixed32();
8619  return true;
8620  }
8621  case 3: {
8622  this->epoch_seconds = value.as_fixed32();
8623  return true;
8624  }
8625  default:
8626  return false;
8627  }
8628 }
8630  buffer.encode_fixed32(1, this->key);
8631  buffer.encode_bool(2, this->missing_state);
8632  buffer.encode_fixed32(3, this->epoch_seconds);
8633 }
8634 #ifdef HAS_PROTO_MESSAGE_DUMP
8635 void DateTimeStateResponse::dump_to(std::string &out) const {
8636  __attribute__((unused)) char buffer[64];
8637  out.append("DateTimeStateResponse {\n");
8638  out.append(" key: ");
8639  sprintf(buffer, "%" PRIu32, this->key);
8640  out.append(buffer);
8641  out.append("\n");
8642 
8643  out.append(" missing_state: ");
8644  out.append(YESNO(this->missing_state));
8645  out.append("\n");
8646 
8647  out.append(" epoch_seconds: ");
8648  sprintf(buffer, "%" PRIu32, this->epoch_seconds);
8649  out.append(buffer);
8650  out.append("\n");
8651  out.append("}");
8652 }
8653 #endif
8654 bool DateTimeCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
8655  switch (field_id) {
8656  case 1: {
8657  this->key = value.as_fixed32();
8658  return true;
8659  }
8660  case 2: {
8661  this->epoch_seconds = value.as_fixed32();
8662  return true;
8663  }
8664  default:
8665  return false;
8666  }
8667 }
8669  buffer.encode_fixed32(1, this->key);
8670  buffer.encode_fixed32(2, this->epoch_seconds);
8671 }
8672 #ifdef HAS_PROTO_MESSAGE_DUMP
8673 void DateTimeCommandRequest::dump_to(std::string &out) const {
8674  __attribute__((unused)) char buffer[64];
8675  out.append("DateTimeCommandRequest {\n");
8676  out.append(" key: ");
8677  sprintf(buffer, "%" PRIu32, this->key);
8678  out.append(buffer);
8679  out.append("\n");
8680 
8681  out.append(" epoch_seconds: ");
8682  sprintf(buffer, "%" PRIu32, this->epoch_seconds);
8683  out.append(buffer);
8684  out.append("\n");
8685  out.append("}");
8686 }
8687 #endif
8689  switch (field_id) {
8690  case 6: {
8691  this->disabled_by_default = value.as_bool();
8692  return true;
8693  }
8694  case 7: {
8695  this->entity_category = value.as_enum<enums::EntityCategory>();
8696  return true;
8697  }
8698  default:
8699  return false;
8700  }
8701 }
8703  switch (field_id) {
8704  case 1: {
8705  this->object_id = value.as_string();
8706  return true;
8707  }
8708  case 3: {
8709  this->name = value.as_string();
8710  return true;
8711  }
8712  case 4: {
8713  this->unique_id = value.as_string();
8714  return true;
8715  }
8716  case 5: {
8717  this->icon = value.as_string();
8718  return true;
8719  }
8720  case 8: {
8721  this->device_class = value.as_string();
8722  return true;
8723  }
8724  default:
8725  return false;
8726  }
8727 }
8729  switch (field_id) {
8730  case 2: {
8731  this->key = value.as_fixed32();
8732  return true;
8733  }
8734  default:
8735  return false;
8736  }
8737 }
8739  buffer.encode_string(1, this->object_id);
8740  buffer.encode_fixed32(2, this->key);
8741  buffer.encode_string(3, this->name);
8742  buffer.encode_string(4, this->unique_id);
8743  buffer.encode_string(5, this->icon);
8744  buffer.encode_bool(6, this->disabled_by_default);
8745  buffer.encode_enum<enums::EntityCategory>(7, this->entity_category);
8746  buffer.encode_string(8, this->device_class);
8747 }
8748 #ifdef HAS_PROTO_MESSAGE_DUMP
8749 void ListEntitiesUpdateResponse::dump_to(std::string &out) const {
8750  __attribute__((unused)) char buffer[64];
8751  out.append("ListEntitiesUpdateResponse {\n");
8752  out.append(" object_id: ");
8753  out.append("'").append(this->object_id).append("'");
8754  out.append("\n");
8755 
8756  out.append(" key: ");
8757  sprintf(buffer, "%" PRIu32, this->key);
8758  out.append(buffer);
8759  out.append("\n");
8760 
8761  out.append(" name: ");
8762  out.append("'").append(this->name).append("'");
8763  out.append("\n");
8764 
8765  out.append(" unique_id: ");
8766  out.append("'").append(this->unique_id).append("'");
8767  out.append("\n");
8768 
8769  out.append(" icon: ");
8770  out.append("'").append(this->icon).append("'");
8771  out.append("\n");
8772 
8773  out.append(" disabled_by_default: ");
8774  out.append(YESNO(this->disabled_by_default));
8775  out.append("\n");
8776 
8777  out.append(" entity_category: ");
8778  out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
8779  out.append("\n");
8780 
8781  out.append(" device_class: ");
8782  out.append("'").append(this->device_class).append("'");
8783  out.append("\n");
8784  out.append("}");
8785 }
8786 #endif
8787 bool UpdateStateResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
8788  switch (field_id) {
8789  case 2: {
8790  this->missing_state = value.as_bool();
8791  return true;
8792  }
8793  case 3: {
8794  this->in_progress = value.as_bool();
8795  return true;
8796  }
8797  case 4: {
8798  this->has_progress = value.as_bool();
8799  return true;
8800  }
8801  default:
8802  return false;
8803  }
8804 }
8806  switch (field_id) {
8807  case 6: {
8808  this->current_version = value.as_string();
8809  return true;
8810  }
8811  case 7: {
8812  this->latest_version = value.as_string();
8813  return true;
8814  }
8815  case 8: {
8816  this->title = value.as_string();
8817  return true;
8818  }
8819  case 9: {
8820  this->release_summary = value.as_string();
8821  return true;
8822  }
8823  case 10: {
8824  this->release_url = value.as_string();
8825  return true;
8826  }
8827  default:
8828  return false;
8829  }
8830 }
8831 bool UpdateStateResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
8832  switch (field_id) {
8833  case 1: {
8834  this->key = value.as_fixed32();
8835  return true;
8836  }
8837  case 5: {
8838  this->progress = value.as_float();
8839  return true;
8840  }
8841  default:
8842  return false;
8843  }
8844 }
8846  buffer.encode_fixed32(1, this->key);
8847  buffer.encode_bool(2, this->missing_state);
8848  buffer.encode_bool(3, this->in_progress);
8849  buffer.encode_bool(4, this->has_progress);
8850  buffer.encode_float(5, this->progress);
8851  buffer.encode_string(6, this->current_version);
8852  buffer.encode_string(7, this->latest_version);
8853  buffer.encode_string(8, this->title);
8854  buffer.encode_string(9, this->release_summary);
8855  buffer.encode_string(10, this->release_url);
8856 }
8857 #ifdef HAS_PROTO_MESSAGE_DUMP
8858 void UpdateStateResponse::dump_to(std::string &out) const {
8859  __attribute__((unused)) char buffer[64];
8860  out.append("UpdateStateResponse {\n");
8861  out.append(" key: ");
8862  sprintf(buffer, "%" PRIu32, this->key);
8863  out.append(buffer);
8864  out.append("\n");
8865 
8866  out.append(" missing_state: ");
8867  out.append(YESNO(this->missing_state));
8868  out.append("\n");
8869 
8870  out.append(" in_progress: ");
8871  out.append(YESNO(this->in_progress));
8872  out.append("\n");
8873 
8874  out.append(" has_progress: ");
8875  out.append(YESNO(this->has_progress));
8876  out.append("\n");
8877 
8878  out.append(" progress: ");
8879  sprintf(buffer, "%g", this->progress);
8880  out.append(buffer);
8881  out.append("\n");
8882 
8883  out.append(" current_version: ");
8884  out.append("'").append(this->current_version).append("'");
8885  out.append("\n");
8886 
8887  out.append(" latest_version: ");
8888  out.append("'").append(this->latest_version).append("'");
8889  out.append("\n");
8890 
8891  out.append(" title: ");
8892  out.append("'").append(this->title).append("'");
8893  out.append("\n");
8894 
8895  out.append(" release_summary: ");
8896  out.append("'").append(this->release_summary).append("'");
8897  out.append("\n");
8898 
8899  out.append(" release_url: ");
8900  out.append("'").append(this->release_url).append("'");
8901  out.append("\n");
8902  out.append("}");
8903 }
8904 #endif
8905 bool UpdateCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
8906  switch (field_id) {
8907  case 2: {
8908  this->command = value.as_enum<enums::UpdateCommand>();
8909  return true;
8910  }
8911  default:
8912  return false;
8913  }
8914 }
8915 bool UpdateCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
8916  switch (field_id) {
8917  case 1: {
8918  this->key = value.as_fixed32();
8919  return true;
8920  }
8921  default:
8922  return false;
8923  }
8924 }
8926  buffer.encode_fixed32(1, this->key);
8927  buffer.encode_enum<enums::UpdateCommand>(2, this->command);
8928 }
8929 #ifdef HAS_PROTO_MESSAGE_DUMP
8930 void UpdateCommandRequest::dump_to(std::string &out) const {
8931  __attribute__((unused)) char buffer[64];
8932  out.append("UpdateCommandRequest {\n");
8933  out.append(" key: ");
8934  sprintf(buffer, "%" PRIu32, this->key);
8935  out.append(buffer);
8936  out.append("\n");
8937 
8938  out.append(" command: ");
8939  out.append(proto_enum_to_string<enums::UpdateCommand>(this->command));
8940  out.append("\n");
8941  out.append("}");
8942 }
8943 #endif
8944 
8945 } // namespace api
8946 } // namespace esphome
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:1177
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:3120
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:5430
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:1358
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6655
void encode_fixed32(uint32_t field_id, uint32_t value, bool force=false)
Definition: proto.h:189
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:4607
float target_temperature_low
Definition: climate.h:140
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:4534
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:8925
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:4915
const char * name
Definition: stm32flash.h:78
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:2771
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:8002
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:7234
uint16_t year
Definition: date_entity.h:122
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:1077
int32_t as_sint32() const
Definition: proto.h:58
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6300
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7034
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6165
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:5353
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:7912
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6242
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6593
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:8915
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:1585
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:4732
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:5745
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:734
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7250
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:6044
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:1278
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:8199
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:7309
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:7805
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:5826
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:751
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:3987
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:7654
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:8358
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6135
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6011
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:8787
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6368
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:8605
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:6970
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:7379
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:1465
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:7610
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:7707
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:2703
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:4706
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:747
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:5057
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:1640
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:4578
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:5949
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:4433
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:5416
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:8106
Representation of a VarInt - in ProtoBuf should be 64bit but we only use 32bit.
Definition: proto.h:17
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:1314
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:8561
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7548
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7454
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7244
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:5928
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:4935
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7093
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:3354
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:7498
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:8728
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:2943
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:8145
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:2752
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:7729
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:1063
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:8418
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:8432
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:7389
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:5561
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:3599
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:7664
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:5250
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7823
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7145
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6520
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:4540
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:759
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7043
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:7020
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:947
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:2900
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:7870
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6767
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:3589
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:1167
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:1192
void encode_float(uint32_t field_id, float value, bool force=false)
Definition: proto.h:216
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6853
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:3555
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:6751
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:3545
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:4925
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:6382
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:8334
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:2190
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:4789
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:763
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7399
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:951
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6034
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:2110
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:4209
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6587
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:2236
std::string as_string() const
Definition: proto.h:98
int speed
Definition: fan.h:35
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:4643
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:7620
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:3041
void encode_uint64(uint32_t field_id, uint64_t value, bool force=false)
Definition: proto.h:177
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6054
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:2986
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:1021
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:7948
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:2585
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:8668
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:4775
float tilt
Definition: cover.h:15
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6261
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:8071
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7332
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6980
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:5017
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:3402
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:3729
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:4593
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6442
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:680
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:2603
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:1409
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7174
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6423
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:3466
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:5767
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:6202
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6787
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:4520
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:2811
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6325
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:1369
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:5067
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:7188
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:4865
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:3276
float target_temperature_high
Definition: climate.h:141
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:745
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:3290
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6061
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7815
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:5495
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6087
float as_float() const
Definition: proto.h:115
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:4510
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6985
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:1340
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:799
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7153
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:865
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:2880
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:610
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:6801
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:3619
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:3248
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6827
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:2870
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6554
float target_humidity
Definition: climate.h:589
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6501
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7319
uint8_t minute
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:4195
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6905
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6723
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:7418
ClimateSwingMode swing_mode
Definition: climate.h:581
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:5659
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:3793
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6212
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7118
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:5499
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:703
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6091
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:2477
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:5260
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:715
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:3643
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:3308
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6001
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:3124
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:2956
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6761
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6120
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:3228
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6867
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:761
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6918
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:3214
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:7178
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6657
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:5160
void encode_sint32(uint32_t field_id, int32_t value, bool force=false)
Definition: proto.h:238
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:1111
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:626
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:3171
int32_t as_int32() const
Definition: proto.h:50
uint32_t as_fixed32() const
Definition: proto.h:113
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6704
uint8_t day
Definition: date_entity.h:124
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:8492
FanDirection direction
Definition: fan.h:37
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6115
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7674
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:2757
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:4750
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:6149
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:2536
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:5224
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7116
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7679
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:3189
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:1690
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6535
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:4261
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:943
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:4770
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:757
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:4363
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:1475
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:1093
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7958
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:8282
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6101
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6349
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:4559
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:5116
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:5617
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:3134
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:3300
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:3154
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:2629
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:5485
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:8308
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7172
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:2742
uint64_t as_uint64() const
Definition: proto.h:47
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:4760
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:596
uint8_t custom_preset
Definition: climate.h:579
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6549
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:4968
void encode_bool(uint32_t field_id, bool value, bool force=false)
Definition: proto.h:183
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:3483
uint8_t hour
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7630
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:8175
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6457
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7739
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:3657
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:3118
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:4988
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:713
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:5677
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:3023
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:955
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:4656
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:3476
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:8858
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6960
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:5728
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:3609
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6630
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:3258
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6569
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:3382
BedjetMode mode
BedJet operating mode.
Definition: bedjet_codec.h:183
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:2451
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:953
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:5533
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:8688
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6872
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:7783
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:4633
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:7472
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:8831
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:2832
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:5893
uint8_t second
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:8845
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6417
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:8749
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:1141
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:4841
uint8_t type
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:8253
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:3005
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:845
void encode_uint32(uint32_t field_id, uint32_t value, bool force=false)
Definition: proto.h:171
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:7261
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:5178
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6938
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:8024
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:8629
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:1605
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:6928
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:5579
void encode_int32(uint32_t field_id, int32_t value, bool force=false)
Definition: proto.h:227
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:8654
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:8702
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:8635
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:673
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:7693
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:5318
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:5977
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:2890
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6679
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:1971
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:8089
enum esphome::EntityCategory __attribute__
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:1286
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:2651
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:3148
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:2566
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:1260
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:5850
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:5694
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:5519
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:2180
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:2718
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:5734
const uint32_t flags
Definition: stm32flash.h:85
uint8_t options
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:659
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6612
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:8738
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:5910
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:7428
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:3028
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:7524
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:7852
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6398
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:8099
ClimateFanMode fan_mode
Definition: climate.h:573
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:2391
bool as_bool() const
Definition: proto.h:48
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:4716
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:8485
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:1595
std::string client_info
Definition: api_pb2.h:244
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6945
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:4035
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:3087
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:8571
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:1087
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:4381
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:8905
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6718
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:753
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:1439
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:1981
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:8344
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7212
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:4573
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:3535
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:8034
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:4978
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6343
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:3009
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:4125
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:5126
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:1492
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:645
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:1819
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:3195
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:2639
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:5687
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:7926
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:949
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:5138
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6661
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:3216
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6737
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7887
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:5774
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7404
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:3513
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:4696
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:3003
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:2980
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:3759
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:3073
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6392
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:5797
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:5346
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:5274
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:4235
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:2560
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:3833
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:1246
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:5718
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:2027
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6475
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:5406
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:4995
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:1575
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:8042
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:8529
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:3625
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:5031
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:4411
bool oscillating
Definition: fan.h:36
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:3368
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:945
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:5860
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:5991
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:5862
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:2421
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6306
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6256
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:8268
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:2732
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:8185
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:8551
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:755
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6515
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:4726
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:8515
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:4954
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:4851
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:3212
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:5442
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:5819
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:3675
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:6290
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:5170
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:2924
uint8_t address
Definition: bl0906.h:211
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:2043
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:8408
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6900
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:3957
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:736
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:765
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:5206
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:8438
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:3051
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:7106
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:8615
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6685
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6481
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7088
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:5541
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:5938
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7968
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:5601
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6219
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:3238
uint8_t preset_mode
Definition: fan.h:38
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:3499
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:5886
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:6886
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:1549
float position
Definition: cover.h:14
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:3456
uint8_t end[39]
Definition: sun_gtil2.cpp:31
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:2266
void encode_string(uint32_t field_id, const char *string, size_t len, bool force=false)
Definition: proto.h:156
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:1863
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:8673
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6419
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:2906
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:2938
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:749
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:620
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:4001
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:7287
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:5078
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6998
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6159
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6184
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:5872
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7880
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:4449
uint32_t as_uint32() const
Definition: proto.h:46
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6437
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:1726
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:1785
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:1885
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6077
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7534
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7749
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:8457
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:5332
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:4053
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:2461
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7202
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:8805
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:999
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:1845
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:7074
uint8_t custom_fan_mode
Definition: climate.h:574
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:7448
float target_temperature
Definition: climate.h:138
void encode_enum(uint32_t field_id, T value, bool force=false)
Definition: proto.h:213
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:8243
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:5509
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:3328
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:1009
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:6819
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:4940
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:2970
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:6276
uint8_t month
Definition: date_entity.h:123
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:2546
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:2785
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:724
ClimatePreset preset
Definition: climate.h:578
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:2821
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:8930
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:8471
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:1957
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:3263
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:3226
void encode_message(uint32_t field_id, const C &value, bool force=false)
Definition: proto.h:256
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:4815
bool state
Definition: fan.h:34
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:2713
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:7600
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:7636
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:5128
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:1700
bool decode_32bit(uint32_t field_id, Proto32Bit value) override
Definition: api_pb2.cpp:7438
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:6636
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:5376
void encode(ProtoWriteBuffer buffer) const override
Definition: api_pb2.cpp:8263
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:7127
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:8131
void dump_to(std::string &out) const override
Definition: api_pb2.cpp:3662
bool decode_varint(uint32_t field_id, ProtoVarInt value) override
Definition: api_pb2.cpp:2693
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override
Definition: api_pb2.cpp:973