xref: /openbmc/telemetry/src/utils/tstring.hpp (revision 493e62eb2f2ff6cbf3282b9cb98ebe6e520b88fc)
1e2362796SWludzik, Jozef #pragma once
2e2362796SWludzik, Jozef 
3e2362796SWludzik, Jozef #include <array>
4e2362796SWludzik, Jozef #include <string>
5e2362796SWludzik, Jozef 
6e2362796SWludzik, Jozef namespace utils
7e2362796SWludzik, Jozef {
8e2362796SWludzik, Jozef namespace tstring
9e2362796SWludzik, Jozef {
10e2362796SWludzik, Jozef 
11d2238194SKrzysztof Grobelny struct Id
12d2238194SKrzysztof Grobelny {
strutils::tstring::Id13d2238194SKrzysztof Grobelny     static std::string str()
14d2238194SKrzysztof Grobelny     {
15d2238194SKrzysztof Grobelny         return "id";
16d2238194SKrzysztof Grobelny     }
17d2238194SKrzysztof Grobelny };
18d2238194SKrzysztof Grobelny 
19e8fc5751SKrzysztof Grobelny struct SensorPath
20d2238194SKrzysztof Grobelny {
strutils::tstring::SensorPath21d2238194SKrzysztof Grobelny     static std::string str()
22d2238194SKrzysztof Grobelny     {
23e8fc5751SKrzysztof Grobelny         return "sensorPath";
24d2238194SKrzysztof Grobelny     }
25d2238194SKrzysztof Grobelny };
26d2238194SKrzysztof Grobelny 
27b8cc78ddSKrzysztof Grobelny struct Metadata
28a4e67616SCezary Zwolak {
strutils::tstring::Metadata29a4e67616SCezary Zwolak     static std::string str()
30a4e67616SCezary Zwolak     {
31b8cc78ddSKrzysztof Grobelny         return "metadata";
32a4e67616SCezary Zwolak     }
33a4e67616SCezary Zwolak };
34a4e67616SCezary Zwolak 
35d2238194SKrzysztof Grobelny struct OperationType
36d2238194SKrzysztof Grobelny {
strutils::tstring::OperationType37d2238194SKrzysztof Grobelny     static std::string str()
38d2238194SKrzysztof Grobelny     {
39d2238194SKrzysztof Grobelny         return "operationType";
40d2238194SKrzysztof Grobelny     }
41d2238194SKrzysztof Grobelny };
42d2238194SKrzysztof Grobelny 
43d2238194SKrzysztof Grobelny struct Service
44d2238194SKrzysztof Grobelny {
strutils::tstring::Service45d2238194SKrzysztof Grobelny     static std::string str()
46d2238194SKrzysztof Grobelny     {
47d2238194SKrzysztof Grobelny         return "service";
48d2238194SKrzysztof Grobelny     }
49d2238194SKrzysztof Grobelny };
50d2238194SKrzysztof Grobelny 
51d2238194SKrzysztof Grobelny struct Path
52d2238194SKrzysztof Grobelny {
strutils::tstring::Path53d2238194SKrzysztof Grobelny     static std::string str()
54d2238194SKrzysztof Grobelny     {
55d2238194SKrzysztof Grobelny         return "path";
56d2238194SKrzysztof Grobelny     }
57d2238194SKrzysztof Grobelny };
58e2362796SWludzik, Jozef 
59a4e67616SCezary Zwolak struct Type
60a4e67616SCezary Zwolak {
strutils::tstring::Type61a4e67616SCezary Zwolak     static std::string str()
62a4e67616SCezary Zwolak     {
63a4e67616SCezary Zwolak         return "type";
64a4e67616SCezary Zwolak     }
65a4e67616SCezary Zwolak };
66a4e67616SCezary Zwolak 
67a4e67616SCezary Zwolak struct DwellTime
68a4e67616SCezary Zwolak {
strutils::tstring::DwellTime69a4e67616SCezary Zwolak     static std::string str()
70a4e67616SCezary Zwolak     {
71a4e67616SCezary Zwolak         return "dwellTime";
72a4e67616SCezary Zwolak     }
73a4e67616SCezary Zwolak };
74a4e67616SCezary Zwolak 
75a4e67616SCezary Zwolak struct Direction
76a4e67616SCezary Zwolak {
strutils::tstring::Direction77a4e67616SCezary Zwolak     static std::string str()
78a4e67616SCezary Zwolak     {
79a4e67616SCezary Zwolak         return "direction";
80a4e67616SCezary Zwolak     }
81a4e67616SCezary Zwolak };
82a4e67616SCezary Zwolak 
83a4e67616SCezary Zwolak struct ThresholdValue
84a4e67616SCezary Zwolak {
strutils::tstring::ThresholdValue85a4e67616SCezary Zwolak     static std::string str()
86a4e67616SCezary Zwolak     {
87a4e67616SCezary Zwolak         return "thresholdValue";
88a4e67616SCezary Zwolak     }
89a4e67616SCezary Zwolak };
90a4e67616SCezary Zwolak 
91a4e67616SCezary Zwolak struct UserId
92a4e67616SCezary Zwolak {
strutils::tstring::UserId93a4e67616SCezary Zwolak     static std::string str()
94a4e67616SCezary Zwolak     {
95a4e67616SCezary Zwolak         return "userId";
96a4e67616SCezary Zwolak     }
97a4e67616SCezary Zwolak };
98a4e67616SCezary Zwolak 
99a4e67616SCezary Zwolak struct Severity
100a4e67616SCezary Zwolak {
strutils::tstring::Severity101a4e67616SCezary Zwolak     static std::string str()
102a4e67616SCezary Zwolak     {
103a4e67616SCezary Zwolak         return "severity";
104a4e67616SCezary Zwolak     }
105a4e67616SCezary Zwolak };
106a4e67616SCezary Zwolak 
107dcc4e193SKrzysztof Grobelny struct CollectionTimeScope
108dcc4e193SKrzysztof Grobelny {
strutils::tstring::CollectionTimeScope109dcc4e193SKrzysztof Grobelny     static std::string str()
110dcc4e193SKrzysztof Grobelny     {
111dcc4e193SKrzysztof Grobelny         return "collectionTimeScope";
112dcc4e193SKrzysztof Grobelny     }
113dcc4e193SKrzysztof Grobelny };
114dcc4e193SKrzysztof Grobelny 
115dcc4e193SKrzysztof Grobelny struct CollectionDuration
116dcc4e193SKrzysztof Grobelny {
strutils::tstring::CollectionDuration117dcc4e193SKrzysztof Grobelny     static std::string str()
118dcc4e193SKrzysztof Grobelny     {
119dcc4e193SKrzysztof Grobelny         return "collectionDuration";
120dcc4e193SKrzysztof Grobelny     }
121dcc4e193SKrzysztof Grobelny };
122dcc4e193SKrzysztof Grobelny 
1233a617023SSzymon Dompke struct MetricProperties
1243a617023SSzymon Dompke {
strutils::tstring::MetricProperties1253a617023SSzymon Dompke     static std::string str()
1263a617023SSzymon Dompke     {
1273a617023SSzymon Dompke         return "MetricProperties";
1283a617023SSzymon Dompke     }
1293a617023SSzymon Dompke };
1303a617023SSzymon Dompke 
1313a617023SSzymon Dompke struct SensorDbusPath
1323a617023SSzymon Dompke {
strutils::tstring::SensorDbusPath1333a617023SSzymon Dompke     static std::string str()
1343a617023SSzymon Dompke     {
1353a617023SSzymon Dompke         return "SensorDbusPath";
1363a617023SSzymon Dompke     }
1373a617023SSzymon Dompke };
1383a617023SSzymon Dompke 
1393a617023SSzymon Dompke struct SensorRedfishUri
1403a617023SSzymon Dompke {
strutils::tstring::SensorRedfishUri1413a617023SSzymon Dompke     static std::string str()
1423a617023SSzymon Dompke     {
1433a617023SSzymon Dompke         return "SensorRedfishUri";
1443a617023SSzymon Dompke     }
1453a617023SSzymon Dompke };
1463a617023SSzymon Dompke 
147*493e62ebSKrzysztof Grobelny struct MetricId
148*493e62ebSKrzysztof Grobelny {
strutils::tstring::MetricId149*493e62ebSKrzysztof Grobelny     static std::string str()
150*493e62ebSKrzysztof Grobelny     {
151*493e62ebSKrzysztof Grobelny         return "MetricId";
152*493e62ebSKrzysztof Grobelny     }
153*493e62ebSKrzysztof Grobelny };
154*493e62ebSKrzysztof Grobelny 
155*493e62ebSKrzysztof Grobelny struct MetricProperty
156*493e62ebSKrzysztof Grobelny {
strutils::tstring::MetricProperty157*493e62ebSKrzysztof Grobelny     static std::string str()
158*493e62ebSKrzysztof Grobelny     {
159*493e62ebSKrzysztof Grobelny         return "MetricProperty";
160*493e62ebSKrzysztof Grobelny     }
161*493e62ebSKrzysztof Grobelny };
162*493e62ebSKrzysztof Grobelny 
163*493e62ebSKrzysztof Grobelny struct MetricValue
164*493e62ebSKrzysztof Grobelny {
strutils::tstring::MetricValue165*493e62ebSKrzysztof Grobelny     static std::string str()
166*493e62ebSKrzysztof Grobelny     {
167*493e62ebSKrzysztof Grobelny         return "MetricValue";
168*493e62ebSKrzysztof Grobelny     }
169*493e62ebSKrzysztof Grobelny };
170*493e62ebSKrzysztof Grobelny 
171*493e62ebSKrzysztof Grobelny struct Timestamp
172*493e62ebSKrzysztof Grobelny {
strutils::tstring::Timestamp173*493e62ebSKrzysztof Grobelny     static std::string str()
174*493e62ebSKrzysztof Grobelny     {
175*493e62ebSKrzysztof Grobelny         return "Timestamp";
176*493e62ebSKrzysztof Grobelny     }
177*493e62ebSKrzysztof Grobelny };
178*493e62ebSKrzysztof Grobelny 
179*493e62ebSKrzysztof Grobelny struct Readings
180*493e62ebSKrzysztof Grobelny {
strutils::tstring::Readings181*493e62ebSKrzysztof Grobelny     static std::string str()
182*493e62ebSKrzysztof Grobelny     {
183*493e62ebSKrzysztof Grobelny         return "Readings";
184*493e62ebSKrzysztof Grobelny     }
185*493e62ebSKrzysztof Grobelny };
186*493e62ebSKrzysztof Grobelny 
187e2362796SWludzik, Jozef } // namespace tstring
188e2362796SWludzik, Jozef } // namespace utils
189