blob: 1cc6f4ab82e09239aca17024c6cb153c086accef [file] [log] [blame]
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -05001// This file was autogenerated. Do not edit!
2// See elog-gen.py for more details
3#pragma once
4
5#include <string>
6#include <tuple>
7#include <type_traits>
8#include <sdbusplus/exception.hpp>
9#include <phosphor-logging/log.hpp>
10#include <phosphor-logging/elog.hpp>
11
12namespace sdbusplus
13{
14namespace xyz
15{
16namespace openbmc_project
17{
18namespace Led
19{
20namespace Fru
21{
22namespace Monitor
23{
24namespace Error
25{
26 struct AssociationRetrieveError;
27} // namespace Error
28} // namespace Monitor
29} // namespace Fru
30} // namespace Led
31} // namespace openbmc_project
32} // namespace xyz
33} // namespace sdbusplus
34
35namespace sdbusplus
36{
37namespace xyz
38{
39namespace openbmc_project
40{
41namespace Led
42{
43namespace Fru
44{
45namespace Monitor
46{
47namespace Error
48{
49 struct InventoryPathError;
50} // namespace Error
51} // namespace Monitor
52} // namespace Fru
53} // namespace Led
54} // namespace openbmc_project
55} // namespace xyz
56} // namespace sdbusplus
57
58namespace sdbusplus
59{
60namespace xyz
61{
62namespace openbmc_project
63{
64namespace Led
65{
66namespace Mapper
67{
68namespace Error
69{
70 struct ObjectNotFoundError;
71} // namespace Error
72} // namespace Mapper
73} // namespace Led
74} // namespace openbmc_project
75} // namespace xyz
76} // namespace sdbusplus
77
78namespace sdbusplus
79{
80namespace xyz
81{
82namespace openbmc_project
83{
84namespace Led
85{
86namespace Mapper
87{
88namespace Error
89{
90 struct MethodError;
91} // namespace Error
92} // namespace Mapper
93} // namespace Led
94} // namespace openbmc_project
95} // namespace xyz
96} // namespace sdbusplus
97
98
99namespace phosphor
100{
101
102namespace logging
103{
104
105namespace xyz
106{
107namespace openbmc_project
108{
109namespace Led
110{
111namespace Fru
112{
113namespace Monitor
114{
115namespace _InventoryPathError
116{
117
118struct PATH
119{
120 static constexpr auto str = "PATH=%s";
121 static constexpr auto str_short = "PATH";
122 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
123 explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {};
124 type _entry;
125};
126
127} // namespace _InventoryPathError
128
129struct InventoryPathError : public sdbusplus::exception_t
130{
131 static constexpr auto errName = "xyz.openbmc_project.Led.Fru.Monitor.InventoryPathError";
132 static constexpr auto errDesc = "Invalid Inventory Path.";
133 static constexpr auto L = level::INFO;
134 using PATH = _InventoryPathError::PATH;
135 using metadata_types = std::tuple<PATH>;
136
137 const char* name() const noexcept
138 {
139 return errName;
140 }
141
142 const char* description() const noexcept
143 {
144 return errDesc;
145 }
146
147 const char* what() const noexcept
148 {
149 return errName;
150 }
151};
152
153} // namespace Monitor
154} // namespace Fru
155} // namespace Led
156} // namespace openbmc_project
157} // namespace xyz
158
159
160namespace details
161{
162
163template <>
164struct map_exception_type<sdbusplus::xyz::openbmc_project::Led::Fru::Monitor::Error::InventoryPathError>
165{
166 using type = xyz::openbmc_project::Led::Fru::Monitor::InventoryPathError;
167};
168
169}
170
171namespace xyz
172{
173namespace openbmc_project
174{
175namespace Led
176{
177namespace Fru
178{
179namespace Monitor
180{
181namespace _AssociationRetrieveError
182{
183
184struct ELOG_ENTRY_PATH
185{
186 static constexpr auto str = "ELOG_ENTRY_PATH=%s";
187 static constexpr auto str_short = "ELOG_ENTRY_PATH";
188 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
189 explicit constexpr ELOG_ENTRY_PATH(const char* a) : _entry(entry(str, a)) {};
190 type _entry;
191};
192
193} // namespace _AssociationRetrieveError
194
195struct AssociationRetrieveError : public sdbusplus::exception_t
196{
197 static constexpr auto errName = "xyz.openbmc_project.Led.Fru.Monitor.AssociationRetrieveError";
198 static constexpr auto errDesc = "Error in retrieving the associations from elog entry.";
199 static constexpr auto L = level::INFO;
200 using ELOG_ENTRY_PATH = _AssociationRetrieveError::ELOG_ENTRY_PATH;
201 using metadata_types = std::tuple<ELOG_ENTRY_PATH>;
202
203 const char* name() const noexcept
204 {
205 return errName;
206 }
207
208 const char* description() const noexcept
209 {
210 return errDesc;
211 }
212
213 const char* what() const noexcept
214 {
215 return errName;
216 }
217};
218
219} // namespace Monitor
220} // namespace Fru
221} // namespace Led
222} // namespace openbmc_project
223} // namespace xyz
224
225
226namespace details
227{
228
229template <>
230struct map_exception_type<sdbusplus::xyz::openbmc_project::Led::Fru::Monitor::Error::AssociationRetrieveError>
231{
232 using type = xyz::openbmc_project::Led::Fru::Monitor::AssociationRetrieveError;
233};
234
235}
236
237namespace xyz
238{
239namespace openbmc_project
240{
241namespace Led
242{
243namespace Mapper
244{
245namespace _MethodError
246{
247
248struct METHOD_NAME
249{
250 static constexpr auto str = "METHOD_NAME=%s";
251 static constexpr auto str_short = "METHOD_NAME";
252 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
253 explicit constexpr METHOD_NAME(const char* a) : _entry(entry(str, a)) {};
254 type _entry;
255};
256struct PATH
257{
258 static constexpr auto str = "PATH=%s";
259 static constexpr auto str_short = "PATH";
260 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
261 explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {};
262 type _entry;
263};
264struct INTERFACE
265{
266 static constexpr auto str = "INTERFACE=%s";
267 static constexpr auto str_short = "INTERFACE";
268 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
269 explicit constexpr INTERFACE(const char* a) : _entry(entry(str, a)) {};
270 type _entry;
271};
272
273} // namespace _MethodError
274
275struct MethodError : public sdbusplus::exception_t
276{
277 static constexpr auto errName = "xyz.openbmc_project.Led.Mapper.MethodError";
278 static constexpr auto errDesc = "Failed to invoke ObjectMapper method";
279 static constexpr auto L = level::INFO;
280 using METHOD_NAME = _MethodError::METHOD_NAME;
281 using PATH = _MethodError::PATH;
282 using INTERFACE = _MethodError::INTERFACE;
283 using metadata_types = std::tuple<METHOD_NAME, PATH, INTERFACE>;
284
285 const char* name() const noexcept
286 {
287 return errName;
288 }
289
290 const char* description() const noexcept
291 {
292 return errDesc;
293 }
294
295 const char* what() const noexcept
296 {
297 return errName;
298 }
299};
300
301} // namespace Mapper
302} // namespace Led
303} // namespace openbmc_project
304} // namespace xyz
305
306
307namespace details
308{
309
310template <>
311struct map_exception_type<sdbusplus::xyz::openbmc_project::Led::Mapper::Error::MethodError>
312{
313 using type = xyz::openbmc_project::Led::Mapper::MethodError;
314};
315
316}
317
318namespace xyz
319{
320namespace openbmc_project
321{
322namespace Led
323{
324namespace Mapper
325{
326namespace _ObjectNotFoundError
327{
328
329struct METHOD_NAME
330{
331 static constexpr auto str = "METHOD_NAME=%s";
332 static constexpr auto str_short = "METHOD_NAME";
333 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
334 explicit constexpr METHOD_NAME(const char* a) : _entry(entry(str, a)) {};
335 type _entry;
336};
337struct PATH
338{
339 static constexpr auto str = "PATH=%s";
340 static constexpr auto str_short = "PATH";
341 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
342 explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {};
343 type _entry;
344};
345struct INTERFACE
346{
347 static constexpr auto str = "INTERFACE=%s";
348 static constexpr auto str_short = "INTERFACE";
349 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
350 explicit constexpr INTERFACE(const char* a) : _entry(entry(str, a)) {};
351 type _entry;
352};
353
354} // namespace _ObjectNotFoundError
355
356struct ObjectNotFoundError : public sdbusplus::exception_t
357{
358 static constexpr auto errName = "xyz.openbmc_project.Led.Mapper.ObjectNotFoundError";
359 static constexpr auto errDesc = "Failed to get response from the method.";
360 static constexpr auto L = level::INFO;
361 using METHOD_NAME = _ObjectNotFoundError::METHOD_NAME;
362 using PATH = _ObjectNotFoundError::PATH;
363 using INTERFACE = _ObjectNotFoundError::INTERFACE;
364 using metadata_types = std::tuple<METHOD_NAME, PATH, INTERFACE>;
365
366 const char* name() const noexcept
367 {
368 return errName;
369 }
370
371 const char* description() const noexcept
372 {
373 return errDesc;
374 }
375
376 const char* what() const noexcept
377 {
378 return errName;
379 }
380};
381
382} // namespace Mapper
383} // namespace Led
384} // namespace openbmc_project
385} // namespace xyz
386
387
388namespace details
389{
390
391template <>
392struct map_exception_type<sdbusplus::xyz::openbmc_project::Led::Mapper::Error::ObjectNotFoundError>
393{
394 using type = xyz::openbmc_project::Led::Mapper::ObjectNotFoundError;
395};
396
397}
398
399
400} // namespace logging
401
402} // namespace phosphor