blob: a2ad7c7cbbcea6ee229eedf3522804dd7d9695be [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
Patrick Venture91ac8d32018-11-01 17:03:22 -07005#include <phosphor-logging/elog.hpp>
6#include <phosphor-logging/log.hpp>
7#include <sdbusplus/exception.hpp>
George Liua6c18f82020-06-22 10:50:04 +08008
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -05009#include <string>
10#include <tuple>
11#include <type_traits>
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -050012
13namespace sdbusplus
14{
15namespace xyz
16{
17namespace openbmc_project
18{
19namespace Led
20{
21namespace Fru
22{
23namespace Monitor
24{
25namespace Error
26{
Patrick Venture91ac8d32018-11-01 17:03:22 -070027struct InventoryPathError;
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -050028} // namespace Error
29} // namespace Monitor
30} // namespace Fru
31} // namespace Led
32} // namespace openbmc_project
33} // namespace xyz
34} // namespace sdbusplus
35
36namespace sdbusplus
37{
38namespace xyz
39{
40namespace openbmc_project
41{
42namespace Led
43{
44namespace Mapper
45{
46namespace Error
47{
Patrick Venture91ac8d32018-11-01 17:03:22 -070048struct ObjectNotFoundError;
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -050049} // namespace Error
50} // namespace Mapper
51} // namespace Led
52} // namespace openbmc_project
53} // namespace xyz
54} // namespace sdbusplus
55
56namespace sdbusplus
57{
58namespace xyz
59{
60namespace openbmc_project
61{
62namespace Led
63{
64namespace Mapper
65{
66namespace Error
67{
Patrick Venture91ac8d32018-11-01 17:03:22 -070068struct MethodError;
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -050069} // namespace Error
70} // namespace Mapper
71} // namespace Led
72} // namespace openbmc_project
73} // namespace xyz
74} // namespace sdbusplus
75
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -050076namespace phosphor
77{
78
79namespace logging
80{
81
82namespace xyz
83{
84namespace openbmc_project
85{
86namespace Led
87{
88namespace Fru
89{
90namespace Monitor
91{
92namespace _InventoryPathError
93{
94
95struct PATH
96{
97 static constexpr auto str = "PATH=%s";
98 static constexpr auto str_short = "PATH";
Patrick Venture91ac8d32018-11-01 17:03:22 -070099 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
100 explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500101 type _entry;
102};
103
Patrick Venture91ac8d32018-11-01 17:03:22 -0700104} // namespace _InventoryPathError
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500105
106struct InventoryPathError : public sdbusplus::exception_t
107{
Patrick Venture91ac8d32018-11-01 17:03:22 -0700108 static constexpr auto errName =
109 "xyz.openbmc_project.Led.Fru.Monitor.InventoryPathError";
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500110 static constexpr auto errDesc = "Invalid Inventory Path.";
111 static constexpr auto L = level::INFO;
112 using PATH = _InventoryPathError::PATH;
113 using metadata_types = std::tuple<PATH>;
114
115 const char* name() const noexcept
116 {
117 return errName;
118 }
119
120 const char* description() const noexcept
121 {
122 return errDesc;
123 }
124
125 const char* what() const noexcept
126 {
127 return errName;
128 }
129};
130
131} // namespace Monitor
132} // namespace Fru
133} // namespace Led
134} // namespace openbmc_project
135} // namespace xyz
136
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500137namespace details
138{
139
140template <>
Patrick Venture91ac8d32018-11-01 17:03:22 -0700141struct map_exception_type<sdbusplus::xyz::openbmc_project::Led::Fru::Monitor::
142 Error::InventoryPathError>
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500143{
144 using type = xyz::openbmc_project::Led::Fru::Monitor::InventoryPathError;
145};
146
Patrick Venture91ac8d32018-11-01 17:03:22 -0700147} // namespace details
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500148
149namespace xyz
150{
151namespace openbmc_project
152{
153namespace Led
154{
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500155namespace Mapper
156{
157namespace _MethodError
158{
159
160struct METHOD_NAME
161{
162 static constexpr auto str = "METHOD_NAME=%s";
163 static constexpr auto str_short = "METHOD_NAME";
Patrick Venture91ac8d32018-11-01 17:03:22 -0700164 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
165 explicit constexpr METHOD_NAME(const char* a) : _entry(entry(str, a)){};
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500166 type _entry;
167};
168struct PATH
169{
170 static constexpr auto str = "PATH=%s";
171 static constexpr auto str_short = "PATH";
Patrick Venture91ac8d32018-11-01 17:03:22 -0700172 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
173 explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500174 type _entry;
175};
176struct INTERFACE
177{
178 static constexpr auto str = "INTERFACE=%s";
179 static constexpr auto str_short = "INTERFACE";
Patrick Venture91ac8d32018-11-01 17:03:22 -0700180 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
181 explicit constexpr INTERFACE(const char* a) : _entry(entry(str, a)){};
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500182 type _entry;
183};
184
Patrick Venture91ac8d32018-11-01 17:03:22 -0700185} // namespace _MethodError
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500186
187struct MethodError : public sdbusplus::exception_t
188{
Patrick Venture91ac8d32018-11-01 17:03:22 -0700189 static constexpr auto errName =
190 "xyz.openbmc_project.Led.Mapper.MethodError";
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500191 static constexpr auto errDesc = "Failed to invoke ObjectMapper method";
192 static constexpr auto L = level::INFO;
193 using METHOD_NAME = _MethodError::METHOD_NAME;
194 using PATH = _MethodError::PATH;
195 using INTERFACE = _MethodError::INTERFACE;
196 using metadata_types = std::tuple<METHOD_NAME, PATH, INTERFACE>;
197
198 const char* name() const noexcept
199 {
200 return errName;
201 }
202
203 const char* description() const noexcept
204 {
205 return errDesc;
206 }
207
208 const char* what() const noexcept
209 {
210 return errName;
211 }
212};
213
214} // namespace Mapper
215} // namespace Led
216} // namespace openbmc_project
217} // namespace xyz
218
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500219namespace details
220{
221
222template <>
Patrick Venture91ac8d32018-11-01 17:03:22 -0700223struct map_exception_type<
224 sdbusplus::xyz::openbmc_project::Led::Mapper::Error::MethodError>
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500225{
226 using type = xyz::openbmc_project::Led::Mapper::MethodError;
227};
228
Patrick Venture91ac8d32018-11-01 17:03:22 -0700229} // namespace details
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500230
231namespace xyz
232{
233namespace openbmc_project
234{
235namespace Led
236{
237namespace Mapper
238{
239namespace _ObjectNotFoundError
240{
241
242struct METHOD_NAME
243{
244 static constexpr auto str = "METHOD_NAME=%s";
245 static constexpr auto str_short = "METHOD_NAME";
Patrick Venture91ac8d32018-11-01 17:03:22 -0700246 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
247 explicit constexpr METHOD_NAME(const char* a) : _entry(entry(str, a)){};
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500248 type _entry;
249};
250struct PATH
251{
252 static constexpr auto str = "PATH=%s";
253 static constexpr auto str_short = "PATH";
Patrick Venture91ac8d32018-11-01 17:03:22 -0700254 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
255 explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500256 type _entry;
257};
258struct INTERFACE
259{
260 static constexpr auto str = "INTERFACE=%s";
261 static constexpr auto str_short = "INTERFACE";
Patrick Venture91ac8d32018-11-01 17:03:22 -0700262 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
263 explicit constexpr INTERFACE(const char* a) : _entry(entry(str, a)){};
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500264 type _entry;
265};
266
Patrick Venture91ac8d32018-11-01 17:03:22 -0700267} // namespace _ObjectNotFoundError
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500268
269struct ObjectNotFoundError : public sdbusplus::exception_t
270{
Patrick Venture91ac8d32018-11-01 17:03:22 -0700271 static constexpr auto errName =
272 "xyz.openbmc_project.Led.Mapper.ObjectNotFoundError";
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500273 static constexpr auto errDesc = "Failed to get response from the method.";
274 static constexpr auto L = level::INFO;
275 using METHOD_NAME = _ObjectNotFoundError::METHOD_NAME;
276 using PATH = _ObjectNotFoundError::PATH;
277 using INTERFACE = _ObjectNotFoundError::INTERFACE;
278 using metadata_types = std::tuple<METHOD_NAME, PATH, INTERFACE>;
279
280 const char* name() const noexcept
281 {
282 return errName;
283 }
284
285 const char* description() const noexcept
286 {
287 return errDesc;
288 }
289
290 const char* what() const noexcept
291 {
292 return errName;
293 }
294};
295
296} // namespace Mapper
297} // namespace Led
298} // namespace openbmc_project
299} // namespace xyz
300
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500301namespace details
302{
303
304template <>
Patrick Venture91ac8d32018-11-01 17:03:22 -0700305struct map_exception_type<
306 sdbusplus::xyz::openbmc_project::Led::Mapper::Error::ObjectNotFoundError>
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500307{
308 using type = xyz::openbmc_project::Led::Mapper::ObjectNotFoundError;
309};
310
Patrick Venture91ac8d32018-11-01 17:03:22 -0700311} // namespace details
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -0500312
313} // namespace logging
314
315} // namespace phosphor