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 JobEvent
23 {
24 static constexpr Header header = {
25 "Copyright 2014-2023 DMTF in cooperation with the Storage Networking Industry Association (SNIA). All rights reserved.",
26 "#MessageRegistry.v1_6_2.MessageRegistry",
27 1,
28 0,
29 1,
30 "Job Event Message Registry",
31 "en",
32 "This registry defines the messages for job related events.",
33 "JobEvent",
34 "DMTF",
35 };
36
37 static constexpr const char* url =
38 "https://redfish.dmtf.org/registries/JobEvent.1.0.1.json";
39
40 static constexpr std::array registry =
41 {
42 MessageEntry{
43 "JobCancelled",
44 {
45 "A job was cancelled.",
46 "The job with Id '%1' was cancelled.",
47 "Warning",
48 1,
49 {
50 "string",
51 },
52 "None.",
53 }},
54 MessageEntry{
55 "JobCompletedException",
56 {
57 "A job has completed with warnings or errors.",
58 "The job with Id '%1' has completed with warnings or errors.",
59 "Warning",
60 1,
61 {
62 "string",
63 },
64 "None.",
65 }},
66 MessageEntry{
67 "JobCompletedOK",
68 {
69 "A job has completed.",
70 "The job with Id '%1' has completed.",
71 "OK",
72 1,
73 {
74 "string",
75 },
76 "None.",
77 }},
78 MessageEntry{
79 "JobProgressChanged",
80 {
81 "A job has changed progress.",
82 "The job with Id '%1' has changed to progress %2 percent complete.",
83 "OK",
84 2,
85 {
86 "string",
87 "number",
88 },
89 "None.",
90 }},
91 MessageEntry{
92 "JobRemoved",
93 {
94 "A job was removed.",
95 "The job with Id '%1' was removed.",
96 "Warning",
97 1,
98 {
99 "string",
100 },
101 "None.",
102 }},
103 MessageEntry{
104 "JobResumed",
105 {
106 "A job has resumed.",
107 "The job with Id '%1' has resumed.",
108 "OK",
109 1,
110 {
111 "string",
112 },
113 "None.",
114 }},
115 MessageEntry{
116 "JobStarted",
117 {
118 "A job has started.",
119 "The job with Id '%1' has started.",
120 "OK",
121 1,
122 {
123 "string",
124 },
125 "None.",
126 }},
127 MessageEntry{
128 "JobSuspended",
129 {
130 "A job was suspended.",
131 "The job with Id '%1' was suspended.",
132 "Warning",
133 1,
134 {
135 "string",
136 },
137 "None.",
138 }},
139
140 };
141
142 enum class Index
143 {
144 jobCancelled = 0,
145 jobCompletedException = 1,
146 jobCompletedOK = 2,
147 jobProgressChanged = 3,
148 jobRemoved = 4,
149 jobResumed = 5,
150 jobStarted = 6,
151 jobSuspended = 7,
152 };
153 }; // struct job_event
154
registerJobEvent()155 [[gnu::constructor]] inline void registerJobEvent()
156 { registerRegistry<JobEvent>(); }
157
158 } // namespace redfish::registries
159