1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: device_state.proto
3 
4 #include "device_state.pb.h"
5 
6 #include <algorithm>
7 
8 #include <google/protobuf/io/coded_stream.h>
9 #include <google/protobuf/extension_set.h>
10 #include <google/protobuf/wire_format_lite.h>
11 // @@protoc_insertion_point(includes)
12 #include <google/protobuf/port_def.inc>
13 
14 PROTOBUF_PRAGMA_INIT_SEG
15 
16 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
17 namespace _pbi = _pb::internal;
18 
19 namespace metrics {
20 }  // namespace metrics
21 namespace metrics {
ThermalState_IsValid(int value)22 bool ThermalState_IsValid(int value) {
23   switch (value) {
24     case 0:
25     case 1:
26     case 2:
27     case 3:
28     case 4:
29       return true;
30     default:
31       return false;
32   }
33 }
34 
35 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> ThermalState_strings[5] = {};
36 
37 static const char ThermalState_names[] =
38   "THERMAL_STATE_CRITICAL"
39   "THERMAL_STATE_FAIR"
40   "THERMAL_STATE_NOMINAL"
41   "THERMAL_STATE_SERIOUS"
42   "THERMAL_STATE_UNKNOWN";
43 
44 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ThermalState_entries[] = {
45   { {ThermalState_names + 0, 22}, 4 },
46   { {ThermalState_names + 22, 18}, 2 },
47   { {ThermalState_names + 40, 21}, 1 },
48   { {ThermalState_names + 61, 21}, 3 },
49   { {ThermalState_names + 82, 21}, 0 },
50 };
51 
52 static const int ThermalState_entries_by_number[] = {
53   4, // 0 -> THERMAL_STATE_UNKNOWN
54   2, // 1 -> THERMAL_STATE_NOMINAL
55   1, // 2 -> THERMAL_STATE_FAIR
56   3, // 3 -> THERMAL_STATE_SERIOUS
57   0, // 4 -> THERMAL_STATE_CRITICAL
58 };
59 
ThermalState_Name(ThermalState value)60 const std::string& ThermalState_Name(
61     ThermalState value) {
62   static const bool dummy =
63       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
64           ThermalState_entries,
65           ThermalState_entries_by_number,
66           5, ThermalState_strings);
67   (void) dummy;
68   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
69       ThermalState_entries,
70       ThermalState_entries_by_number,
71       5, value);
72   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
73                      ThermalState_strings[idx].get();
74 }
ThermalState_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,ThermalState * value)75 bool ThermalState_Parse(
76     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ThermalState* value) {
77   int int_value;
78   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
79       ThermalState_entries, 5, name, &int_value);
80   if (success) {
81     *value = static_cast<ThermalState>(int_value);
82   }
83   return success;
84 }
85 
86 // @@protoc_insertion_point(namespace_scope)
87 }  // namespace metrics
88 PROTOBUF_NAMESPACE_OPEN
89 PROTOBUF_NAMESPACE_CLOSE
90 
91 // @@protoc_insertion_point(global_scope)
92 #include <google/protobuf/port_undef.inc>
93