xref: /openbmc/bmcweb/redfish-core/include/registries/task_event_message_registry.hpp (revision 4a102cd48c588d32c0a4d6610b4a9ed616f255f3)
1 // SPDX-License-Identifier: Apache-2.0
2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3 #pragma once
4 /****************************************************************
5  *                 READ THIS WARNING FIRST
6  * This is an auto-generated header which contains definitions
7  * for Redfish DMTF defined messages.
8  * DO NOT modify this registry outside of running the
9  * parse_registries.py script.  The definitions contained within
10  * this file are owned by DMTF.  Any modifications to these files
11  * should be first pushed to the relevant registry in the DMTF
12  * github organization.
13  ***************************************************************/
14 #include "registries.hpp"
15 
16 #include <array>
17 
18 // clang-format off
19 
20 namespace redfish::registries
21 {
22 struct TaskEvent
23 {
24 static constexpr Header header = {
25     "Copyright 2014-2020 DMTF in cooperation with the Storage Networking Industry Association (SNIA). All rights reserved.",
26     "#MessageRegistry.v1_4_1.MessageRegistry",
27     1,
28     0,
29     3,
30     "Task Event Message Registry",
31     "en",
32     "This registry defines the messages for task related events.",
33     "TaskEvent",
34     "DMTF",
35 };
36 
37 static constexpr const char* url =
38     "https://redfish.dmtf.org/registries/TaskEvent.1.0.3.json";
39 
40 static constexpr std::array registry =
41 {
42     MessageEntry{
43         "TaskAborted",
44         {
45             "A task has completed with errors.",
46             "The task with Id '%1' has completed with errors.",
47             "Critical",
48             1,
49             {
50                 "string",
51             },
52             "None.",
53         }},
54     MessageEntry{
55         "TaskCancelled",
56         {
57             "A task has been cancelled.",
58             "Work on the task with Id '%1' has been halted prior to completion due to an explicit request.",
59             "Warning",
60             1,
61             {
62                 "string",
63             },
64             "None.",
65         }},
66     MessageEntry{
67         "TaskCompletedOK",
68         {
69             "A task has completed.",
70             "The task with Id '%1' has completed.",
71             "OK",
72             1,
73             {
74                 "string",
75             },
76             "None.",
77         }},
78     MessageEntry{
79         "TaskCompletedWarning",
80         {
81             "A task has completed with warnings.",
82             "The task with Id '%1' has completed with warnings.",
83             "Warning",
84             1,
85             {
86                 "string",
87             },
88             "None.",
89         }},
90     MessageEntry{
91         "TaskPaused",
92         {
93             "A task has been paused.",
94             "The task with Id '%1' has been paused.",
95             "Warning",
96             1,
97             {
98                 "string",
99             },
100             "None.",
101         }},
102     MessageEntry{
103         "TaskProgressChanged",
104         {
105             "A task has changed progress.",
106             "The task with Id '%1' has changed to progress %2 percent complete.",
107             "OK",
108             2,
109             {
110                 "string",
111                 "number",
112             },
113             "None.",
114         }},
115     MessageEntry{
116         "TaskRemoved",
117         {
118             "A task has been removed.",
119             "The task with Id '%1' has been removed.",
120             "Warning",
121             1,
122             {
123                 "string",
124             },
125             "None.",
126         }},
127     MessageEntry{
128         "TaskResumed",
129         {
130             "A task has been resumed.",
131             "The task with Id '%1' has been resumed.",
132             "OK",
133             1,
134             {
135                 "string",
136             },
137             "None.",
138         }},
139     MessageEntry{
140         "TaskStarted",
141         {
142             "A task has started.",
143             "The task with Id '%1' has started.",
144             "OK",
145             1,
146             {
147                 "string",
148             },
149             "None.",
150         }},
151 
152 };
153 
154 enum class Index
155 {
156     taskAborted = 0,
157     taskCancelled = 1,
158     taskCompletedOK = 2,
159     taskCompletedWarning = 3,
160     taskPaused = 4,
161     taskProgressChanged = 5,
162     taskRemoved = 6,
163     taskResumed = 7,
164     taskStarted = 8,
165 };
166 }; // struct task_event
167 
registerTaskEvent()168 [[gnu::constructor]] inline void registerTaskEvent()
169 { registerRegistry<TaskEvent>(); }
170 
171 } // namespace redfish::registries
172