1 #pragma once
2 /****************************************************************
3  *                 READ THIS WARNING FIRST
4  * This is an auto-generated header which contains definitions
5  * for Redfish DMTF defined messages.
6  * DO NOT modify this registry outside of running the
7  * parse_registries.py script.  The definitions contained within
8  * this file are owned by DMTF.  Any modifications to these files
9  * should be first pushed to the relevant registry in the DMTF
10  * github organization.
11  ***************************************************************/
12 #include "registries.hpp"
13 
14 #include <array>
15 
16 // clang-format off
17 
18 namespace redfish::registries::resource_event
19 {
20 const Header header = {
21     "Copyright 2014-2023 DMTF in cooperation with the Storage Networking Industry Association (SNIA). All rights reserved.",
22     "#MessageRegistry.v1_6_0.MessageRegistry",
23     "ResourceEvent.1.3.0",
24     "Resource Event Message Registry",
25     "en",
26     "This registry defines the messages to use for resource events.",
27     "ResourceEvent",
28     "1.3.0",
29     "DMTF",
30 };
31 constexpr const char* url =
32     "https://redfish.dmtf.org/registries/ResourceEvent.1.3.0.json";
33 
34 constexpr std::array registry =
35 {
36     MessageEntry{
37         "AggregationSourceDiscovered",
38         {
39             "Indicates that a new aggregation source has been discovered.",
40             "A aggregation source of connection method `%1` located at `%2` has been discovered.",
41             "OK",
42             2,
43             {
44                 "string",
45                 "string",
46             },
47             "The aggregation source is available to the service and can be identified using the identified connection method.",
48         }},
49     MessageEntry{
50         "LicenseAdded",
51         {
52             "Indicates that a license has been added.",
53             "A license for '%1' has been added.  The following message was returned: '%2'.",
54             "OK",
55             2,
56             {
57                 "string",
58                 "string",
59             },
60             "See vendor specific instructions for specific actions.",
61         }},
62     MessageEntry{
63         "LicenseChanged",
64         {
65             "Indicates that a license has changed.",
66             "A license for '%1' has changed.  The following message was returned: '%2'.",
67             "Warning",
68             2,
69             {
70                 "string",
71                 "string",
72             },
73             "See vendor specific instructions for specific actions.",
74         }},
75     MessageEntry{
76         "LicenseExpired",
77         {
78             "Indicates that a license has expired.",
79             "A license for '%1' has expired.  The following message was returned: '%2'.",
80             "Warning",
81             2,
82             {
83                 "string",
84                 "string",
85             },
86             "See vendor specific instructions for specific actions.",
87         }},
88     MessageEntry{
89         "ResourceChanged",
90         {
91             "Indicates that one or more resource properties have changed.  This is not used whenever there is another event message for that specific change, such as only the state has changed.",
92             "One or more resource properties have changed.",
93             "OK",
94             0,
95             {},
96             "None.",
97         }},
98     MessageEntry{
99         "ResourceCreated",
100         {
101             "Indicates that all conditions of a successful creation operation have been met.",
102             "The resource has been created successfully.",
103             "OK",
104             0,
105             {},
106             "None",
107         }},
108     MessageEntry{
109         "ResourceErrorThresholdCleared",
110         {
111             "Indicates that a specified resource property has cleared its error threshold.  Examples would be drive I/O errors, or network link errors.",
112             "The resource property %1 has cleared the error threshold of value %2.",
113             "OK",
114             2,
115             {
116                 "string",
117                 "number",
118             },
119             "None.",
120         }},
121     MessageEntry{
122         "ResourceErrorThresholdExceeded",
123         {
124             "Indicates that a specified resource property has exceeded its error threshold.  Examples would be drive I/O errors, or network link errors.",
125             "The resource property %1 has exceeded error threshold of value %2.",
126             "Critical",
127             2,
128             {
129                 "string",
130                 "number",
131             },
132             "None.",
133         }},
134     MessageEntry{
135         "ResourceErrorsCorrected",
136         {
137             "Indicates that a specified resource property has corrected errors.  Examples would be drive I/O errors, or network link errors.",
138             "The resource property %1 has corrected errors of type '%2'.",
139             "OK",
140             2,
141             {
142                 "string",
143                 "string",
144             },
145             "None.",
146         }},
147     MessageEntry{
148         "ResourceErrorsDetected",
149         {
150             "Indicates that a specified resource property has detected errors.  Examples would be drive I/O errors, or network link errors.",
151             "The resource property %1 has detected errors of type '%2'.",
152             "Warning",
153             2,
154             {
155                 "string",
156                 "string",
157             },
158             "Resolution dependent upon error type.",
159         }},
160     MessageEntry{
161         "ResourcePaused",
162         {
163             "Indicates that the power state of a resource has changed to paused.",
164             "The resource `%1` has been paused.",
165             "OK",
166             1,
167             {
168                 "string",
169             },
170             "None.",
171         }},
172     MessageEntry{
173         "ResourcePoweredOff",
174         {
175             "Indicates that the power state of a resource has changed to powered off.",
176             "The resource `%1` has powered off.",
177             "OK",
178             1,
179             {
180                 "string",
181             },
182             "None.",
183         }},
184     MessageEntry{
185         "ResourcePoweredOn",
186         {
187             "Indicates that the power state of a resource has changed to powered on.",
188             "The resource `%1` has powered on.",
189             "OK",
190             1,
191             {
192                 "string",
193             },
194             "None.",
195         }},
196     MessageEntry{
197         "ResourcePoweringOff",
198         {
199             "Indicates that the power state of a resource has changed to powering off.",
200             "The resource `%1` is powering off.",
201             "OK",
202             1,
203             {
204                 "string",
205             },
206             "None.",
207         }},
208     MessageEntry{
209         "ResourcePoweringOn",
210         {
211             "Indicates that the power state of a resource has changed to powering on.",
212             "The resource `%1` is powering on.",
213             "OK",
214             1,
215             {
216                 "string",
217             },
218             "None.",
219         }},
220     MessageEntry{
221         "ResourceRemoved",
222         {
223             "Indicates that all conditions of a successful remove operation have been met.",
224             "The resource has been removed successfully.",
225             "OK",
226             0,
227             {},
228             "None",
229         }},
230     MessageEntry{
231         "ResourceSelfTestCompleted",
232         {
233             "Indicates that a self-test has completed.",
234             "A self-test has completed.",
235             "OK",
236             0,
237             {},
238             "None.",
239         }},
240     MessageEntry{
241         "ResourceSelfTestFailed",
242         {
243             "Indicates that a self-test has failed.  Suggested resolution may be provided as OEM data.",
244             "A self-test has failed.  The following message was returned: '%1'.",
245             "Critical",
246             1,
247             {
248                 "string",
249             },
250             "See vendor specific instructions for specific actions.",
251         }},
252     MessageEntry{
253         "ResourceStateChanged",
254         {
255             "Indicates that the state of a resource has changed.",
256             "The state of resource `%1` has changed to %2.",
257             "OK",
258             2,
259             {
260                 "string",
261                 "string",
262             },
263             "None.",
264         }},
265     MessageEntry{
266         "ResourceStatusChangedCritical",
267         {
268             "Indicates that the health of a resource has changed to Critical.",
269             "The health of resource `%1` has changed to %2.",
270             "Critical",
271             2,
272             {
273                 "string",
274                 "string",
275             },
276             "None.",
277         }},
278     MessageEntry{
279         "ResourceStatusChangedOK",
280         {
281             "Indicates that the health of a resource has changed to OK.",
282             "The health of resource '%1' has changed to %2.",
283             "OK",
284             2,
285             {
286                 "string",
287                 "string",
288             },
289             "None.",
290         }},
291     MessageEntry{
292         "ResourceStatusChangedWarning",
293         {
294             "Indicates that the health of a resource has changed to Warning.",
295             "The health of resource `%1` has changed to %2.",
296             "Warning",
297             2,
298             {
299                 "string",
300                 "string",
301             },
302             "None.",
303         }},
304     MessageEntry{
305         "ResourceVersionIncompatible",
306         {
307             "Indicates that an incompatible version of software has been detected.  Examples may be after a component or system level software update.",
308             "An incompatible version of software '%1' has been detected.",
309             "Warning",
310             1,
311             {
312                 "string",
313             },
314             "Compare the version of the resource with the compatible version of the software.",
315         }},
316     MessageEntry{
317         "ResourceWarningThresholdCleared",
318         {
319             "Indicates that a specified resource property has cleared its warning threshold.  Examples would be drive I/O errors, or network link errors.  Suggested resolution may be provided as OEM data.",
320             "The resource property %1 has cleared the warning threshold of value %2.",
321             "OK",
322             2,
323             {
324                 "string",
325                 "number",
326             },
327             "None.",
328         }},
329     MessageEntry{
330         "ResourceWarningThresholdExceeded",
331         {
332             "Indicates that a specified resource property has exceeded its warning threshold.  Examples would be drive I/O errors, or network link errors.  Suggested resolution may be provided as OEM data.",
333             "The resource property %1 has exceeded its warning threshold of value %2.",
334             "Warning",
335             2,
336             {
337                 "string",
338                 "number",
339             },
340             "None.",
341         }},
342     MessageEntry{
343         "TestMessage",
344         {
345             "A test message used to validate event delivery mechanisms.",
346             "Test message.",
347             "OK",
348             0,
349             {},
350             "None.",
351         }},
352     MessageEntry{
353         "URIForResourceChanged",
354         {
355             "Indicates that the URI for a resource has changed.  Examples for this would be physical component replacement or redistribution.",
356             "The URI for the resource has changed.",
357             "OK",
358             0,
359             {},
360             "None.",
361         }},
362 
363 };
364 
365 enum class Index
366 {
367     aggregationSourceDiscovered = 0,
368     licenseAdded = 1,
369     licenseChanged = 2,
370     licenseExpired = 3,
371     resourceChanged = 4,
372     resourceCreated = 5,
373     resourceErrorThresholdCleared = 6,
374     resourceErrorThresholdExceeded = 7,
375     resourceErrorsCorrected = 8,
376     resourceErrorsDetected = 9,
377     resourcePaused = 10,
378     resourcePoweredOff = 11,
379     resourcePoweredOn = 12,
380     resourcePoweringOff = 13,
381     resourcePoweringOn = 14,
382     resourceRemoved = 15,
383     resourceSelfTestCompleted = 16,
384     resourceSelfTestFailed = 17,
385     resourceStateChanged = 18,
386     resourceStatusChangedCritical = 19,
387     resourceStatusChangedOK = 20,
388     resourceStatusChangedWarning = 21,
389     resourceVersionIncompatible = 22,
390     resourceWarningThresholdCleared = 23,
391     resourceWarningThresholdExceeded = 24,
392     testMessage = 25,
393     uRIForResourceChanged = 26,
394 };
395 } // namespace redfish::registries::resource_event
396