xref: /openbmc/bmcweb/redfish-core/include/error_messages.hpp (revision 504af5a0568171b72caf13234cc81380b261fa21)
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 // These generated headers are a superset of what is needed.
13 // clang sees them as an error, so ignore
14 // NOLINTBEGIN(misc-include-cleaner)
15 #include "http_response.hpp"
16 
17 #include <boost/url/url_view_base.hpp>
18 #include <nlohmann/json.hpp>
19 
20 #include <cstdint>
21 #include <source_location>
22 #include <string_view>
23 // NOLINTEND(misc-include-cleaner)
24 
25 namespace redfish
26 {
27 
28 namespace messages
29 {
30 /**
31  * @brief Formats Success message into JSON
32  * Message body: "The request completed successfully."
33  *
34  *
35  * @returns Message Success formatted to JSON */
36 nlohmann::json success();
37 
38 void success(crow::Response& res);
39 
40 /**
41  * @brief Formats GeneralError message into JSON
42  * Message body: "A general error has occurred.  See Resolution for information
43  * on how to resolve the error, or @Message.ExtendedInfo if Resolution is not
44  * provided."
45  *
46  *
47  * @returns Message GeneralError formatted to JSON */
48 nlohmann::json generalError();
49 
50 void generalError(crow::Response& res);
51 
52 /**
53  * @brief Formats Created message into JSON
54  * Message body: "The resource was created successfully."
55  *
56  *
57  * @returns Message Created formatted to JSON */
58 nlohmann::json created();
59 
60 void created(crow::Response& res);
61 
62 /**
63  * @brief Formats NoOperation message into JSON
64  * Message body: "The request body submitted contain no data to act upon and no
65  * changes to the resource took place."
66  *
67  *
68  * @returns Message NoOperation formatted to JSON */
69 nlohmann::json noOperation();
70 
71 void noOperation(crow::Response& res);
72 
73 /**
74  * @brief Formats PropertyDuplicate message into JSON
75  * Message body: "The property <arg1> was duplicated in the request."
76  *
77  * @param[in] arg1 Parameter of message that will replace %1 in its body.
78  *
79  * @returns Message PropertyDuplicate formatted to JSON */
80 nlohmann::json propertyDuplicate(std::string_view arg1);
81 
82 void propertyDuplicate(crow::Response& res, std::string_view arg1);
83 
84 /**
85  * @brief Formats PropertyUnknown message into JSON
86  * Message body: "The property <arg1> is not in the list of valid properties for
87  * the resource."
88  *
89  * @param[in] arg1 Parameter of message that will replace %1 in its body.
90  *
91  * @returns Message PropertyUnknown formatted to JSON */
92 nlohmann::json propertyUnknown(std::string_view arg1);
93 
94 void propertyUnknown(crow::Response& res, std::string_view arg1);
95 
96 /**
97  * @brief Formats PropertyValueTypeError message into JSON
98  * Message body: "The value <arg1> for the property <arg2> is not a type that
99  * the property can accept."
100  *
101  * @param[in] arg1 Parameter of message that will replace %1 in its body.
102  * @param[in] arg2 Parameter of message that will replace %2 in its body.
103  *
104  * @returns Message PropertyValueTypeError formatted to JSON */
105 nlohmann::json propertyValueTypeError(const nlohmann::json& arg1,
106                                       std::string_view arg2);
107 
108 void propertyValueTypeError(crow::Response& res, const nlohmann::json& arg1,
109                             std::string_view arg2);
110 
111 /**
112  * @brief Formats PropertyValueFormatError message into JSON
113  * Message body: "The value <arg1> for the property <arg2> is not a format that
114  * the property can accept."
115  *
116  * @param[in] arg1 Parameter of message that will replace %1 in its body.
117  * @param[in] arg2 Parameter of message that will replace %2 in its body.
118  *
119  * @returns Message PropertyValueFormatError formatted to JSON */
120 nlohmann::json propertyValueFormatError(const nlohmann::json& arg1,
121                                         std::string_view arg2);
122 
123 void propertyValueFormatError(crow::Response& res, const nlohmann::json& arg1,
124                               std::string_view arg2);
125 
126 /**
127  * @brief Formats PropertyValueNotInList message into JSON
128  * Message body: "The value <arg1> for the property <arg2> is not in the list of
129  * acceptable values."
130  *
131  * @param[in] arg1 Parameter of message that will replace %1 in its body.
132  * @param[in] arg2 Parameter of message that will replace %2 in its body.
133  *
134  * @returns Message PropertyValueNotInList formatted to JSON */
135 nlohmann::json propertyValueNotInList(const nlohmann::json& arg1,
136                                       std::string_view arg2);
137 
138 void propertyValueNotInList(crow::Response& res, const nlohmann::json& arg1,
139                             std::string_view arg2);
140 
141 /**
142  * @brief Formats PropertyValueOutOfRange message into JSON
143  * Message body: "The value <arg1> for the property <arg2> is not in the
144  * supported range of acceptable values."
145  *
146  * @param[in] arg1 Parameter of message that will replace %1 in its body.
147  * @param[in] arg2 Parameter of message that will replace %2 in its body.
148  *
149  * @returns Message PropertyValueOutOfRange formatted to JSON */
150 nlohmann::json propertyValueOutOfRange(const nlohmann::json& arg1,
151                                        std::string_view arg2);
152 
153 void propertyValueOutOfRange(crow::Response& res, const nlohmann::json& arg1,
154                              std::string_view arg2);
155 
156 /**
157  * @brief Formats PropertyValueError message into JSON
158  * Message body: "The value provided for the property <arg1> is not valid."
159  *
160  * @param[in] arg1 Parameter of message that will replace %1 in its body.
161  *
162  * @returns Message PropertyValueError formatted to JSON */
163 nlohmann::json propertyValueError(std::string_view arg1);
164 
165 void propertyValueError(crow::Response& res, std::string_view arg1);
166 
167 /**
168  * @brief Formats PropertyNotWritable message into JSON
169  * Message body: "The property <arg1> is a read-only property and cannot be
170  * assigned a value."
171  *
172  * @param[in] arg1 Parameter of message that will replace %1 in its body.
173  *
174  * @returns Message PropertyNotWritable formatted to JSON */
175 nlohmann::json propertyNotWritable(std::string_view arg1);
176 
177 void propertyNotWritable(crow::Response& res, std::string_view arg1);
178 
179 /**
180  * @brief Formats PropertyNotUpdated message into JSON
181  * Message body: "The property <arg1> was not updated due to an internal service
182  * error.  The service is still operational."
183  *
184  * @param[in] arg1 Parameter of message that will replace %1 in its body.
185  *
186  * @returns Message PropertyNotUpdated formatted to JSON */
187 nlohmann::json propertyNotUpdated(std::string_view arg1);
188 
189 void propertyNotUpdated(crow::Response& res, std::string_view arg1);
190 
191 /**
192  * @brief Formats PropertyMissing message into JSON
193  * Message body: "The property <arg1> is a required property and must be
194  * included in the request."
195  *
196  * @param[in] arg1 Parameter of message that will replace %1 in its body.
197  *
198  * @returns Message PropertyMissing formatted to JSON */
199 nlohmann::json propertyMissing(std::string_view arg1);
200 
201 void propertyMissing(crow::Response& res, std::string_view arg1);
202 
203 /**
204  * @brief Formats MalformedJSON message into JSON
205  * Message body: "The request body submitted was malformed JSON and could not be
206  * parsed by the receiving service."
207  *
208  *
209  * @returns Message MalformedJSON formatted to JSON */
210 nlohmann::json malformedJSON();
211 
212 void malformedJSON(crow::Response& res);
213 
214 /**
215  * @brief Formats InvalidJSON message into JSON
216  * Message body: "The request body submitted is invalid JSON starting at line
217  * <arg1> and could not be parsed by the receiving service."
218  *
219  * @param[in] arg1 Parameter of message that will replace %1 in its body.
220  *
221  * @returns Message InvalidJSON formatted to JSON */
222 nlohmann::json invalidJSON(std::string_view arg1);
223 
224 void invalidJSON(crow::Response& res, std::string_view arg1);
225 
226 /**
227  * @brief Formats EmptyJSON message into JSON
228  * Message body: "The request body submitted contained an empty JSON object and
229  * the service is unable to process it."
230  *
231  *
232  * @returns Message EmptyJSON formatted to JSON */
233 nlohmann::json emptyJSON();
234 
235 void emptyJSON(crow::Response& res);
236 
237 /**
238  * @brief Formats ActionNotSupported message into JSON
239  * Message body: "The action <arg1> is not supported by the resource."
240  *
241  * @param[in] arg1 Parameter of message that will replace %1 in its body.
242  *
243  * @returns Message ActionNotSupported formatted to JSON */
244 nlohmann::json actionNotSupported(std::string_view arg1);
245 
246 void actionNotSupported(crow::Response& res, std::string_view arg1);
247 
248 /**
249  * @brief Formats ActionParameterMissing message into JSON
250  * Message body: "The action <arg1> requires the parameter <arg2> to be present
251  * in the request body."
252  *
253  * @param[in] arg1 Parameter of message that will replace %1 in its body.
254  * @param[in] arg2 Parameter of message that will replace %2 in its body.
255  *
256  * @returns Message ActionParameterMissing formatted to JSON */
257 nlohmann::json actionParameterMissing(std::string_view arg1,
258                                       std::string_view arg2);
259 
260 void actionParameterMissing(crow::Response& res, std::string_view arg1,
261                             std::string_view arg2);
262 
263 /**
264  * @brief Formats ActionParameterDuplicate message into JSON
265  * Message body: "The action <arg1> was submitted with more than one value for
266  * the parameter <arg2>."
267  *
268  * @param[in] arg1 Parameter of message that will replace %1 in its body.
269  * @param[in] arg2 Parameter of message that will replace %2 in its body.
270  *
271  * @returns Message ActionParameterDuplicate formatted to JSON */
272 nlohmann::json actionParameterDuplicate(std::string_view arg1,
273                                         std::string_view arg2);
274 
275 void actionParameterDuplicate(crow::Response& res, std::string_view arg1,
276                               std::string_view arg2);
277 
278 /**
279  * @brief Formats ActionParameterUnknown message into JSON
280  * Message body: "The action <arg1> was submitted with the invalid parameter
281  * <arg2>."
282  *
283  * @param[in] arg1 Parameter of message that will replace %1 in its body.
284  * @param[in] arg2 Parameter of message that will replace %2 in its body.
285  *
286  * @returns Message ActionParameterUnknown formatted to JSON */
287 nlohmann::json actionParameterUnknown(std::string_view arg1,
288                                       std::string_view arg2);
289 
290 void actionParameterUnknown(crow::Response& res, std::string_view arg1,
291                             std::string_view arg2);
292 
293 /**
294  * @brief Formats ActionParameterValueTypeError message into JSON
295  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
296  * is not a type that the parameter can accept."
297  *
298  * @param[in] arg1 Parameter of message that will replace %1 in its body.
299  * @param[in] arg2 Parameter of message that will replace %2 in its body.
300  * @param[in] arg3 Parameter of message that will replace %3 in its body.
301  *
302  * @returns Message ActionParameterValueTypeError formatted to JSON */
303 nlohmann::json actionParameterValueTypeError(
304     const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3);
305 
306 void actionParameterValueTypeError(
307     crow::Response& res, const nlohmann::json& arg1, std::string_view arg2,
308     std::string_view arg3);
309 
310 /**
311  * @brief Formats ActionParameterValueFormatError message into JSON
312  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
313  * is not a format that the parameter can accept."
314  *
315  * @param[in] arg1 Parameter of message that will replace %1 in its body.
316  * @param[in] arg2 Parameter of message that will replace %2 in its body.
317  * @param[in] arg3 Parameter of message that will replace %3 in its body.
318  *
319  * @returns Message ActionParameterValueFormatError formatted to JSON */
320 nlohmann::json actionParameterValueFormatError(
321     const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3);
322 
323 void actionParameterValueFormatError(
324     crow::Response& res, const nlohmann::json& arg1, std::string_view arg2,
325     std::string_view arg3);
326 
327 /**
328  * @brief Formats ActionParameterValueNotInList message into JSON
329  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
330  * is not in the list of acceptable values."
331  *
332  * @param[in] arg1 Parameter of message that will replace %1 in its body.
333  * @param[in] arg2 Parameter of message that will replace %2 in its body.
334  * @param[in] arg3 Parameter of message that will replace %3 in its body.
335  *
336  * @returns Message ActionParameterValueNotInList formatted to JSON */
337 nlohmann::json actionParameterValueNotInList(
338     std::string_view arg1, std::string_view arg2, std::string_view arg3);
339 
340 void actionParameterValueNotInList(crow::Response& res, std::string_view arg1,
341                                    std::string_view arg2,
342                                    std::string_view arg3);
343 
344 /**
345  * @brief Formats ActionParameterValueOutOfRange message into JSON
346  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
347  * is not in the supported range of acceptable values."
348  *
349  * @param[in] arg1 Parameter of message that will replace %1 in its body.
350  * @param[in] arg2 Parameter of message that will replace %2 in its body.
351  * @param[in] arg3 Parameter of message that will replace %3 in its body.
352  *
353  * @returns Message ActionParameterValueOutOfRange formatted to JSON */
354 nlohmann::json actionParameterValueOutOfRange(
355     std::string_view arg1, std::string_view arg2, std::string_view arg3);
356 
357 void actionParameterValueOutOfRange(crow::Response& res, std::string_view arg1,
358                                     std::string_view arg2,
359                                     std::string_view arg3);
360 
361 /**
362  * @brief Formats ActionParameterValueError message into JSON
363  * Message body: "The value for the parameter <arg1> in the action <arg2> is
364  * invalid."
365  *
366  * @param[in] arg1 Parameter of message that will replace %1 in its body.
367  * @param[in] arg2 Parameter of message that will replace %2 in its body.
368  *
369  * @returns Message ActionParameterValueError formatted to JSON */
370 nlohmann::json actionParameterValueError(const nlohmann::json& arg1,
371                                          std::string_view arg2);
372 
373 void actionParameterValueError(crow::Response& res, const nlohmann::json& arg1,
374                                std::string_view arg2);
375 
376 /**
377  * @brief Formats ActionParameterNotSupported message into JSON
378  * Message body: "The parameter <arg1> for the action <arg2> is not supported on
379  * the target resource."
380  *
381  * @param[in] arg1 Parameter of message that will replace %1 in its body.
382  * @param[in] arg2 Parameter of message that will replace %2 in its body.
383  *
384  * @returns Message ActionParameterNotSupported formatted to JSON */
385 nlohmann::json actionParameterNotSupported(std::string_view arg1,
386                                            std::string_view arg2);
387 
388 void actionParameterNotSupported(crow::Response& res, std::string_view arg1,
389                                  std::string_view arg2);
390 
391 /**
392  * @brief Formats ArraySizeTooLong message into JSON
393  * Message body: "The array provided for property <arg1> exceeds the size limit
394  * <arg2>."
395  *
396  * @param[in] arg1 Parameter of message that will replace %1 in its body.
397  * @param[in] arg2 Parameter of message that will replace %2 in its body.
398  *
399  * @returns Message ArraySizeTooLong formatted to JSON */
400 nlohmann::json arraySizeTooLong(std::string_view arg1, uint64_t arg2);
401 
402 void arraySizeTooLong(crow::Response& res, std::string_view arg1,
403                       uint64_t arg2);
404 
405 /**
406  * @brief Formats ArraySizeTooShort message into JSON
407  * Message body: "The array provided for property <arg1> is under the minimum
408  * size limit <arg2>."
409  *
410  * @param[in] arg1 Parameter of message that will replace %1 in its body.
411  * @param[in] arg2 Parameter of message that will replace %2 in its body.
412  *
413  * @returns Message ArraySizeTooShort formatted to JSON */
414 nlohmann::json arraySizeTooShort(std::string_view arg1, std::string_view arg2);
415 
416 void arraySizeTooShort(crow::Response& res, std::string_view arg1,
417                        std::string_view arg2);
418 
419 /**
420  * @brief Formats QueryParameterValueTypeError message into JSON
421  * Message body: "The value <arg1> for the query parameter <arg2> is not a type
422  * that the parameter can accept."
423  *
424  * @param[in] arg1 Parameter of message that will replace %1 in its body.
425  * @param[in] arg2 Parameter of message that will replace %2 in its body.
426  *
427  * @returns Message QueryParameterValueTypeError formatted to JSON */
428 nlohmann::json queryParameterValueTypeError(const nlohmann::json& arg1,
429                                             std::string_view arg2);
430 
431 void queryParameterValueTypeError(
432     crow::Response& res, const nlohmann::json& arg1, std::string_view arg2);
433 
434 /**
435  * @brief Formats QueryParameterValueFormatError message into JSON
436  * Message body: "The value <arg1> for the parameter <arg2> is not a format that
437  * the parameter can accept."
438  *
439  * @param[in] arg1 Parameter of message that will replace %1 in its body.
440  * @param[in] arg2 Parameter of message that will replace %2 in its body.
441  *
442  * @returns Message QueryParameterValueFormatError formatted to JSON */
443 nlohmann::json queryParameterValueFormatError(const nlohmann::json& arg1,
444                                               std::string_view arg2);
445 
446 void queryParameterValueFormatError(
447     crow::Response& res, const nlohmann::json& arg1, std::string_view arg2);
448 
449 /**
450  * @brief Formats QueryParameterValueError message into JSON
451  * Message body: "The value for the parameter <arg1> is invalid."
452  *
453  * @param[in] arg1 Parameter of message that will replace %1 in its body.
454  *
455  * @returns Message QueryParameterValueError formatted to JSON */
456 nlohmann::json queryParameterValueError(std::string_view arg1);
457 
458 void queryParameterValueError(crow::Response& res, std::string_view arg1);
459 
460 /**
461  * @brief Formats QueryParameterOutOfRange message into JSON
462  * Message body: "The value <arg1> for the query parameter <arg2> is out of
463  * range <arg3>."
464  *
465  * @param[in] arg1 Parameter of message that will replace %1 in its body.
466  * @param[in] arg2 Parameter of message that will replace %2 in its body.
467  * @param[in] arg3 Parameter of message that will replace %3 in its body.
468  *
469  * @returns Message QueryParameterOutOfRange formatted to JSON */
470 nlohmann::json queryParameterOutOfRange(
471     std::string_view arg1, std::string_view arg2, std::string_view arg3);
472 
473 void queryParameterOutOfRange(crow::Response& res, std::string_view arg1,
474                               std::string_view arg2, std::string_view arg3);
475 
476 /**
477  * @brief Formats QueryNotSupportedOnResource message into JSON
478  * Message body: "Querying is not supported on the requested resource."
479  *
480  *
481  * @returns Message QueryNotSupportedOnResource formatted to JSON */
482 nlohmann::json queryNotSupportedOnResource();
483 
484 void queryNotSupportedOnResource(crow::Response& res);
485 
486 /**
487  * @brief Formats QueryNotSupportedOnOperation message into JSON
488  * Message body: "Querying is not supported with the requested operation."
489  *
490  *
491  * @returns Message QueryNotSupportedOnOperation formatted to JSON */
492 nlohmann::json queryNotSupportedOnOperation();
493 
494 void queryNotSupportedOnOperation(crow::Response& res);
495 
496 /**
497  * @brief Formats QueryNotSupported message into JSON
498  * Message body: "Querying is not supported by the implementation."
499  *
500  *
501  * @returns Message QueryNotSupported formatted to JSON */
502 nlohmann::json queryNotSupported();
503 
504 void queryNotSupported(crow::Response& res);
505 
506 /**
507  * @brief Formats QueryCombinationInvalid message into JSON
508  * Message body: "Two or more query parameters in the request cannot be used
509  * together."
510  *
511  *
512  * @returns Message QueryCombinationInvalid formatted to JSON */
513 nlohmann::json queryCombinationInvalid();
514 
515 void queryCombinationInvalid(crow::Response& res);
516 
517 /**
518  * @brief Formats QueryParameterUnsupported message into JSON
519  * Message body: "Query parameter <arg1> is not supported."
520  *
521  * @param[in] arg1 Parameter of message that will replace %1 in its body.
522  *
523  * @returns Message QueryParameterUnsupported formatted to JSON */
524 nlohmann::json queryParameterUnsupported(std::string_view arg1);
525 
526 void queryParameterUnsupported(crow::Response& res, std::string_view arg1);
527 
528 /**
529  * @brief Formats SessionLimitExceeded message into JSON
530  * Message body: "The session establishment failed due to the number of
531  * simultaneous sessions exceeding the limit of the implementation."
532  *
533  *
534  * @returns Message SessionLimitExceeded formatted to JSON */
535 nlohmann::json sessionLimitExceeded();
536 
537 void sessionLimitExceeded(crow::Response& res);
538 
539 /**
540  * @brief Formats EventSubscriptionLimitExceeded message into JSON
541  * Message body: "The event subscription failed due to the number of
542  * simultaneous subscriptions exceeding the limit of the implementation."
543  *
544  *
545  * @returns Message EventSubscriptionLimitExceeded formatted to JSON */
546 nlohmann::json eventSubscriptionLimitExceeded();
547 
548 void eventSubscriptionLimitExceeded(crow::Response& res);
549 
550 /**
551  * @brief Formats ResourceCannotBeDeleted message into JSON
552  * Message body: "The delete request failed because the resource requested
553  * cannot be deleted."
554  *
555  *
556  * @returns Message ResourceCannotBeDeleted formatted to JSON */
557 nlohmann::json resourceCannotBeDeleted();
558 
559 void resourceCannotBeDeleted(crow::Response& res);
560 
561 /**
562  * @brief Formats ResourceInUse message into JSON
563  * Message body: "The change to the requested resource failed because the
564  * resource is in use or in transition."
565  *
566  *
567  * @returns Message ResourceInUse formatted to JSON */
568 nlohmann::json resourceInUse();
569 
570 void resourceInUse(crow::Response& res);
571 
572 /**
573  * @brief Formats ResourceAlreadyExists message into JSON
574  * Message body: "The requested resource of type <arg1> with the property <arg2>
575  * with the value <arg3> already exists."
576  *
577  * @param[in] arg1 Parameter of message that will replace %1 in its body.
578  * @param[in] arg2 Parameter of message that will replace %2 in its body.
579  * @param[in] arg3 Parameter of message that will replace %3 in its body.
580  *
581  * @returns Message ResourceAlreadyExists formatted to JSON */
582 nlohmann::json resourceAlreadyExists(
583     std::string_view arg1, std::string_view arg2, std::string_view arg3);
584 
585 void resourceAlreadyExists(crow::Response& res, std::string_view arg1,
586                            std::string_view arg2, std::string_view arg3);
587 
588 /**
589  * @brief Formats ResourceNotFound message into JSON
590  * Message body: "The requested resource of type <arg1> named <arg2> was not
591  * found."
592  *
593  * @param[in] arg1 Parameter of message that will replace %1 in its body.
594  * @param[in] arg2 Parameter of message that will replace %2 in its body.
595  *
596  * @returns Message ResourceNotFound formatted to JSON */
597 nlohmann::json resourceNotFound(std::string_view arg1, std::string_view arg2);
598 
599 void resourceNotFound(crow::Response& res, std::string_view arg1,
600                       std::string_view arg2);
601 
602 /**
603  * @brief Formats PayloadTooLarge message into JSON
604  * Message body: "The supplied payload exceeds the maximum size supported by the
605  * service."
606  *
607  *
608  * @returns Message PayloadTooLarge formatted to JSON */
609 nlohmann::json payloadTooLarge();
610 
611 void payloadTooLarge(crow::Response& res);
612 
613 /**
614  * @brief Formats InsufficientStorage message into JSON
615  * Message body: "Insufficient storage or memory available to complete the
616  * request."
617  *
618  *
619  * @returns Message InsufficientStorage formatted to JSON */
620 nlohmann::json insufficientStorage();
621 
622 void insufficientStorage(crow::Response& res);
623 
624 /**
625  * @brief Formats MissingOrMalformedPart message into JSON
626  * Message body: "The multipart request contains malformed parts or is missing
627  * required parts."
628  *
629  *
630  * @returns Message MissingOrMalformedPart formatted to JSON */
631 nlohmann::json missingOrMalformedPart();
632 
633 void missingOrMalformedPart(crow::Response& res);
634 
635 /**
636  * @brief Formats InvalidURI message into JSON
637  * Message body: "The URI <arg1> was not found."
638  *
639  * @param[in] arg1 Parameter of message that will replace %1 in its body.
640  *
641  * @returns Message InvalidURI formatted to JSON */
642 nlohmann::json invalidURI(std::string_view arg1);
643 
644 void invalidURI(crow::Response& res, std::string_view arg1);
645 
646 /**
647  * @brief Formats CreateFailedMissingReqProperties message into JSON
648  * Message body: "The create operation failed because the required property
649  * <arg1> was missing from the request."
650  *
651  * @param[in] arg1 Parameter of message that will replace %1 in its body.
652  *
653  * @returns Message CreateFailedMissingReqProperties formatted to JSON */
654 nlohmann::json createFailedMissingReqProperties(std::string_view arg1);
655 
656 void createFailedMissingReqProperties(crow::Response& res,
657                                       std::string_view arg1);
658 
659 /**
660  * @brief Formats CreateLimitReachedForResource message into JSON
661  * Message body: "The create operation failed because the resource has reached
662  * the limit of possible resources."
663  *
664  *
665  * @returns Message CreateLimitReachedForResource formatted to JSON */
666 nlohmann::json createLimitReachedForResource();
667 
668 void createLimitReachedForResource(crow::Response& res);
669 
670 /**
671  * @brief Formats ServiceShuttingDown message into JSON
672  * Message body: "The operation failed because the service is shutting down and
673  * can no longer take incoming requests."
674  *
675  *
676  * @returns Message ServiceShuttingDown formatted to JSON */
677 nlohmann::json serviceShuttingDown();
678 
679 void serviceShuttingDown(crow::Response& res);
680 
681 /**
682  * @brief Formats ServiceInUnknownState message into JSON
683  * Message body: "The operation failed because the service is in an unknown
684  * state and can no longer take incoming requests."
685  *
686  *
687  * @returns Message ServiceInUnknownState formatted to JSON */
688 nlohmann::json serviceInUnknownState();
689 
690 void serviceInUnknownState(crow::Response& res);
691 
692 /**
693  * @brief Formats NoValidSession message into JSON
694  * Message body: "There is no valid session established with the
695  * implementation."
696  *
697  *
698  * @returns Message NoValidSession formatted to JSON */
699 nlohmann::json noValidSession();
700 
701 void noValidSession(crow::Response& res);
702 
703 /**
704  * @brief Formats InsufficientPrivilege message into JSON
705  * Message body: "There are insufficient privileges for the account or
706  * credentials associated with the current session to perform the requested
707  * operation."
708  *
709  *
710  * @returns Message InsufficientPrivilege formatted to JSON */
711 nlohmann::json insufficientPrivilege();
712 
713 void insufficientPrivilege(crow::Response& res);
714 
715 /**
716  * @brief Formats AccountModified message into JSON
717  * Message body: "The account was successfully modified."
718  *
719  *
720  * @returns Message AccountModified formatted to JSON */
721 nlohmann::json accountModified();
722 
723 void accountModified(crow::Response& res);
724 
725 /**
726  * @brief Formats AccountNotModified message into JSON
727  * Message body: "The account modification request failed."
728  *
729  *
730  * @returns Message AccountNotModified formatted to JSON */
731 nlohmann::json accountNotModified();
732 
733 void accountNotModified(crow::Response& res);
734 
735 /**
736  * @brief Formats AccountRemoved message into JSON
737  * Message body: "The account was successfully removed."
738  *
739  *
740  * @returns Message AccountRemoved formatted to JSON */
741 nlohmann::json accountRemoved();
742 
743 void accountRemoved(crow::Response& res);
744 
745 /**
746  * @brief Formats AccountForSessionNoLongerExists message into JSON
747  * Message body: "The account for the current session was removed, and so the
748  * current session was removed as well."
749  *
750  *
751  * @returns Message AccountForSessionNoLongerExists formatted to JSON */
752 nlohmann::json accountForSessionNoLongerExists();
753 
754 void accountForSessionNoLongerExists(crow::Response& res);
755 
756 /**
757  * @brief Formats InvalidObject message into JSON
758  * Message body: "The object at <arg1> is invalid."
759  *
760  * @param[in] arg1 Parameter of message that will replace %1 in its body.
761  *
762  * @returns Message InvalidObject formatted to JSON */
763 nlohmann::json invalidObject(const boost::urls::url_view_base& arg1);
764 
765 void invalidObject(crow::Response& res, const boost::urls::url_view_base& arg1);
766 
767 /**
768  * @brief Formats InternalError message into JSON
769  * Message body: "The request failed due to an internal service error.  The
770  * service is still operational."
771  *
772  *
773  * @returns Message InternalError formatted to JSON */
774 nlohmann::json internalError();
775 
776 void internalError(crow::Response& res, std::source_location location =
777                                             std::source_location::current());
778 
779 /**
780  * @brief Formats UnrecognizedRequestBody message into JSON
781  * Message body: "The service detected a malformed request body that it was
782  * unable to interpret."
783  *
784  *
785  * @returns Message UnrecognizedRequestBody formatted to JSON */
786 nlohmann::json unrecognizedRequestBody();
787 
788 void unrecognizedRequestBody(crow::Response& res);
789 
790 /**
791  * @brief Formats ResourceMissingAtURI message into JSON
792  * Message body: "The resource at the URI <arg1> was not found."
793  *
794  * @param[in] arg1 Parameter of message that will replace %1 in its body.
795  *
796  * @returns Message ResourceMissingAtURI formatted to JSON */
797 nlohmann::json resourceMissingAtURI(const boost::urls::url_view_base& arg1);
798 
799 void resourceMissingAtURI(crow::Response& res,
800                           const boost::urls::url_view_base& arg1);
801 
802 /**
803  * @brief Formats ResourceAtUriInUnknownFormat message into JSON
804  * Message body: "The resource at <arg1> is in a format not recognized by the
805  * service."
806  *
807  * @param[in] arg1 Parameter of message that will replace %1 in its body.
808  *
809  * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */
810 nlohmann::json resourceAtUriInUnknownFormat(
811     const boost::urls::url_view_base& arg1);
812 
813 void resourceAtUriInUnknownFormat(crow::Response& res,
814                                   const boost::urls::url_view_base& arg1);
815 
816 /**
817  * @brief Formats ResourceAtUriUnauthorized message into JSON
818  * Message body: "While accessing the resource at <arg1>, the service received
819  * an authorization error <arg2>."
820  *
821  * @param[in] arg1 Parameter of message that will replace %1 in its body.
822  * @param[in] arg2 Parameter of message that will replace %2 in its body.
823  *
824  * @returns Message ResourceAtUriUnauthorized formatted to JSON */
825 nlohmann::json resourceAtUriUnauthorized(const boost::urls::url_view_base& arg1,
826                                          std::string_view arg2);
827 
828 void resourceAtUriUnauthorized(crow::Response& res,
829                                const boost::urls::url_view_base& arg1,
830                                std::string_view arg2);
831 
832 /**
833  * @brief Formats CouldNotEstablishConnection message into JSON
834  * Message body: "The service failed to establish a connection with the URI
835  * <arg1>."
836  *
837  * @param[in] arg1 Parameter of message that will replace %1 in its body.
838  *
839  * @returns Message CouldNotEstablishConnection formatted to JSON */
840 nlohmann::json couldNotEstablishConnection(
841     const boost::urls::url_view_base& arg1);
842 
843 void couldNotEstablishConnection(crow::Response& res,
844                                  const boost::urls::url_view_base& arg1);
845 
846 /**
847  * @brief Formats SourceDoesNotSupportProtocol message into JSON
848  * Message body: "The other end of the connection at <arg1> does not support the
849  * specified protocol <arg2>."
850  *
851  * @param[in] arg1 Parameter of message that will replace %1 in its body.
852  * @param[in] arg2 Parameter of message that will replace %2 in its body.
853  *
854  * @returns Message SourceDoesNotSupportProtocol formatted to JSON */
855 nlohmann::json sourceDoesNotSupportProtocol(
856     const boost::urls::url_view_base& arg1, std::string_view arg2);
857 
858 void sourceDoesNotSupportProtocol(crow::Response& res,
859                                   const boost::urls::url_view_base& arg1,
860                                   std::string_view arg2);
861 
862 /**
863  * @brief Formats AccessDenied message into JSON
864  * Message body: "While attempting to establish a connection to <arg1>, the
865  * service denied access."
866  *
867  * @param[in] arg1 Parameter of message that will replace %1 in its body.
868  *
869  * @returns Message AccessDenied formatted to JSON */
870 nlohmann::json accessDenied(const boost::urls::url_view_base& arg1);
871 
872 void accessDenied(crow::Response& res, const boost::urls::url_view_base& arg1);
873 
874 /**
875  * @brief Formats ServiceTemporarilyUnavailable message into JSON
876  * Message body: "The service is temporarily unavailable.  Retry in <arg1>
877  * seconds."
878  *
879  * @param[in] arg1 Parameter of message that will replace %1 in its body.
880  *
881  * @returns Message ServiceTemporarilyUnavailable formatted to JSON */
882 nlohmann::json serviceTemporarilyUnavailable(std::string_view arg1);
883 
884 void serviceTemporarilyUnavailable(crow::Response& res, std::string_view arg1);
885 
886 /**
887  * @brief Formats InvalidIndex message into JSON
888  * Message body: "The index <arg1> is not a valid offset into the array."
889  *
890  * @param[in] arg1 Parameter of message that will replace %1 in its body.
891  *
892  * @returns Message InvalidIndex formatted to JSON */
893 nlohmann::json invalidIndex(uint64_t arg1);
894 
895 void invalidIndex(crow::Response& res, uint64_t arg1);
896 
897 /**
898  * @brief Formats PropertyValueModified message into JSON
899  * Message body: "The property <arg1> was assigned the value <arg2> due to
900  * modification by the service."
901  *
902  * @param[in] arg1 Parameter of message that will replace %1 in its body.
903  * @param[in] arg2 Parameter of message that will replace %2 in its body.
904  *
905  * @returns Message PropertyValueModified formatted to JSON */
906 nlohmann::json propertyValueModified(std::string_view arg1,
907                                      const nlohmann::json& arg2);
908 
909 void propertyValueModified(crow::Response& res, std::string_view arg1,
910                            const nlohmann::json& arg2);
911 
912 /**
913  * @brief Formats ResourceInStandby message into JSON
914  * Message body: "The request could not be performed because the resource is in
915  * standby."
916  *
917  *
918  * @returns Message ResourceInStandby formatted to JSON */
919 nlohmann::json resourceInStandby();
920 
921 void resourceInStandby(crow::Response& res);
922 
923 /**
924  * @brief Formats ResourceExhaustion message into JSON
925  * Message body: "The resource <arg1> was unable to satisfy the request due to
926  * unavailability of resources."
927  *
928  * @param[in] arg1 Parameter of message that will replace %1 in its body.
929  *
930  * @returns Message ResourceExhaustion formatted to JSON */
931 nlohmann::json resourceExhaustion(std::string_view arg1);
932 
933 void resourceExhaustion(crow::Response& res, std::string_view arg1);
934 
935 /**
936  * @brief Formats StringValueTooLong message into JSON
937  * Message body: "The string <arg1> exceeds the length limit <arg2>."
938  *
939  * @param[in] arg1 Parameter of message that will replace %1 in its body.
940  * @param[in] arg2 Parameter of message that will replace %2 in its body.
941  *
942  * @returns Message StringValueTooLong formatted to JSON */
943 nlohmann::json stringValueTooLong(std::string_view arg1, uint64_t arg2);
944 
945 void stringValueTooLong(crow::Response& res, std::string_view arg1,
946                         uint64_t arg2);
947 
948 /**
949  * @brief Formats StringValueTooShort message into JSON
950  * Message body: "The string <arg1> was under the minimum required length
951  * <arg2>."
952  *
953  * @param[in] arg1 Parameter of message that will replace %1 in its body.
954  * @param[in] arg2 Parameter of message that will replace %2 in its body.
955  *
956  * @returns Message StringValueTooShort formatted to JSON */
957 nlohmann::json stringValueTooShort(std::string_view arg1,
958                                    std::string_view arg2);
959 
960 void stringValueTooShort(crow::Response& res, std::string_view arg1,
961                          std::string_view arg2);
962 
963 /**
964  * @brief Formats SessionTerminated message into JSON
965  * Message body: "The session was successfully terminated."
966  *
967  *
968  * @returns Message SessionTerminated formatted to JSON */
969 nlohmann::json sessionTerminated();
970 
971 void sessionTerminated(crow::Response& res);
972 
973 /**
974  * @brief Formats SubscriptionTerminated message into JSON
975  * Message body: "The event subscription was terminated."
976  *
977  *
978  * @returns Message SubscriptionTerminated formatted to JSON */
979 nlohmann::json subscriptionTerminated();
980 
981 void subscriptionTerminated(crow::Response& res);
982 
983 /**
984  * @brief Formats ResourceTypeIncompatible message into JSON
985  * Message body: "The @odata.type of the request body <arg1> is incompatible
986  * with the @odata.type of the resource, which is <arg2>."
987  *
988  * @param[in] arg1 Parameter of message that will replace %1 in its body.
989  * @param[in] arg2 Parameter of message that will replace %2 in its body.
990  *
991  * @returns Message ResourceTypeIncompatible formatted to JSON */
992 nlohmann::json resourceTypeIncompatible(std::string_view arg1,
993                                         std::string_view arg2);
994 
995 void resourceTypeIncompatible(crow::Response& res, std::string_view arg1,
996                               std::string_view arg2);
997 
998 /**
999  * @brief Formats PasswordChangeRequired message into JSON
1000  * Message body: "The password provided for this account must be changed before
1001  * access is granted.  PATCH the Password property for this account located at
1002  * the target URI <arg1> to complete this process."
1003  *
1004  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1005  *
1006  * @returns Message PasswordChangeRequired formatted to JSON */
1007 nlohmann::json passwordChangeRequired(const boost::urls::url_view_base& arg1);
1008 
1009 void passwordChangeRequired(crow::Response& res,
1010                             const boost::urls::url_view_base& arg1);
1011 
1012 /**
1013  * @brief Formats ResetRequired message into JSON
1014  * Message body: "In order to apply changes, recover from errors, or complete
1015  * the operation, a component reset is required with the Reset action URI <arg1>
1016  * and ResetType <arg2>."
1017  *
1018  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1019  * @param[in] arg2 Parameter of message that will replace %2 in its body.
1020  *
1021  * @returns Message ResetRequired formatted to JSON */
1022 nlohmann::json resetRequired(const boost::urls::url_view_base& arg1,
1023                              std::string_view arg2);
1024 
1025 void resetRequired(crow::Response& res, const boost::urls::url_view_base& arg1,
1026                    std::string_view arg2);
1027 
1028 /**
1029  * @brief Formats ResetRecommended message into JSON
1030  * Message body: "In order to recover from errors, a component reset is
1031  * recommended with the Reset action URI <arg1> and ResetType <arg2>."
1032  *
1033  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1034  * @param[in] arg2 Parameter of message that will replace %2 in its body.
1035  *
1036  * @returns Message ResetRecommended formatted to JSON */
1037 nlohmann::json resetRecommended(std::string_view arg1, std::string_view arg2);
1038 
1039 void resetRecommended(crow::Response& res, std::string_view arg1,
1040                       std::string_view arg2);
1041 
1042 /**
1043  * @brief Formats ChassisPowerStateOnRequired message into JSON
1044  * Message body: "The chassis with Id <arg1> is required to be powered on to
1045  * perform this request."
1046  *
1047  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1048  *
1049  * @returns Message ChassisPowerStateOnRequired formatted to JSON */
1050 nlohmann::json chassisPowerStateOnRequired(std::string_view arg1);
1051 
1052 void chassisPowerStateOnRequired(crow::Response& res, std::string_view arg1);
1053 
1054 /**
1055  * @brief Formats ChassisPowerStateOffRequired message into JSON
1056  * Message body: "The chassis with Id <arg1> is required to be powered off to
1057  * perform this request."
1058  *
1059  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1060  *
1061  * @returns Message ChassisPowerStateOffRequired formatted to JSON */
1062 nlohmann::json chassisPowerStateOffRequired(std::string_view arg1);
1063 
1064 void chassisPowerStateOffRequired(crow::Response& res, std::string_view arg1);
1065 
1066 /**
1067  * @brief Formats PropertyValueConflict message into JSON
1068  * Message body: "The property <arg1> could not be written because its value
1069  * would conflict with the value of the <arg2> property."
1070  *
1071  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1072  * @param[in] arg2 Parameter of message that will replace %2 in its body.
1073  *
1074  * @returns Message PropertyValueConflict formatted to JSON */
1075 nlohmann::json propertyValueConflict(std::string_view arg1,
1076                                      std::string_view arg2);
1077 
1078 void propertyValueConflict(crow::Response& res, std::string_view arg1,
1079                            std::string_view arg2);
1080 
1081 /**
1082  * @brief Formats PropertyValueResourceConflict message into JSON
1083  * Message body: "The property <arg1> with the requested value of <arg2> could
1084  * not be written because the value conflicts with the state or configuration of
1085  * the resource at <arg3>."
1086  *
1087  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1088  * @param[in] arg2 Parameter of message that will replace %2 in its body.
1089  * @param[in] arg3 Parameter of message that will replace %3 in its body.
1090  *
1091  * @returns Message PropertyValueResourceConflict formatted to JSON */
1092 nlohmann::json propertyValueResourceConflict(
1093     std::string_view arg1, const nlohmann::json& arg2,
1094     const boost::urls::url_view_base& arg3);
1095 
1096 void propertyValueResourceConflict(crow::Response& res, std::string_view arg1,
1097                                    const nlohmann::json& arg2,
1098                                    const boost::urls::url_view_base& arg3);
1099 
1100 /**
1101  * @brief Formats PropertyValueExternalConflict message into JSON
1102  * Message body: "The property <arg1> with the requested value of <arg2> could
1103  * not be written because the value is not available due to a configuration
1104  * conflict."
1105  *
1106  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1107  * @param[in] arg2 Parameter of message that will replace %2 in its body.
1108  *
1109  * @returns Message PropertyValueExternalConflict formatted to JSON */
1110 nlohmann::json propertyValueExternalConflict(std::string_view arg1,
1111                                              const nlohmann::json& arg2);
1112 
1113 void propertyValueExternalConflict(crow::Response& res, std::string_view arg1,
1114                                    const nlohmann::json& arg2);
1115 
1116 /**
1117  * @brief Formats PropertyValueIncorrect message into JSON
1118  * Message body: "The property <arg1> with the requested value of <arg2> could
1119  * not be written because the value does not meet the constraints of the
1120  * implementation."
1121  *
1122  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1123  * @param[in] arg2 Parameter of message that will replace %2 in its body.
1124  *
1125  * @returns Message PropertyValueIncorrect formatted to JSON */
1126 nlohmann::json propertyValueIncorrect(std::string_view arg1,
1127                                       const nlohmann::json& arg2);
1128 
1129 void propertyValueIncorrect(crow::Response& res, std::string_view arg1,
1130                             const nlohmann::json& arg2);
1131 
1132 /**
1133  * @brief Formats ResourceCreationConflict message into JSON
1134  * Message body: "The resource could not be created.  The service has a resource
1135  * at URI <arg1> that conflicts with the creation request."
1136  *
1137  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1138  *
1139  * @returns Message ResourceCreationConflict formatted to JSON */
1140 nlohmann::json resourceCreationConflict(const boost::urls::url_view_base& arg1);
1141 
1142 void resourceCreationConflict(crow::Response& res,
1143                               const boost::urls::url_view_base& arg1);
1144 
1145 /**
1146  * @brief Formats ActionParameterValueConflict message into JSON
1147  * Message body: "The parameter <arg1> with the requested value of <arg2> does
1148  * not meet the constraints of the implementation."
1149  *
1150  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1151  * @param[in] arg2 Parameter of message that will replace %2 in its body.
1152  *
1153  * @returns Message ActionParameterValueConflict formatted to JSON */
1154 nlohmann::json actionParameterValueConflict(std::string_view arg1,
1155                                             std::string_view arg2);
1156 
1157 void actionParameterValueConflict(crow::Response& res, std::string_view arg1,
1158                                   std::string_view arg2);
1159 
1160 /**
1161  * @brief Formats MaximumErrorsExceeded message into JSON
1162  * Message body: "Too many errors have occurred to report them all."
1163  *
1164  *
1165  * @returns Message MaximumErrorsExceeded formatted to JSON */
1166 nlohmann::json maximumErrorsExceeded();
1167 
1168 void maximumErrorsExceeded(crow::Response& res);
1169 
1170 /**
1171  * @brief Formats PreconditionFailed message into JSON
1172  * Message body: "The ETag supplied did not match the ETag required to change
1173  * this resource."
1174  *
1175  *
1176  * @returns Message PreconditionFailed formatted to JSON */
1177 nlohmann::json preconditionFailed();
1178 
1179 void preconditionFailed(crow::Response& res);
1180 
1181 /**
1182  * @brief Formats PreconditionRequired message into JSON
1183  * Message body: "A precondition header or annotation is required to change this
1184  * resource."
1185  *
1186  *
1187  * @returns Message PreconditionRequired formatted to JSON */
1188 nlohmann::json preconditionRequired();
1189 
1190 void preconditionRequired(crow::Response& res);
1191 
1192 /**
1193  * @brief Formats HeaderMissing message into JSON
1194  * Message body: "Required header <arg1> is missing in the request."
1195  *
1196  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1197  *
1198  * @returns Message HeaderMissing formatted to JSON */
1199 nlohmann::json headerMissing(std::string_view arg1);
1200 
1201 void headerMissing(crow::Response& res, std::string_view arg1);
1202 
1203 /**
1204  * @brief Formats HeaderInvalid message into JSON
1205  * Message body: "Header <arg1> is invalid."
1206  *
1207  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1208  *
1209  * @returns Message HeaderInvalid formatted to JSON */
1210 nlohmann::json headerInvalid(std::string_view arg1);
1211 
1212 void headerInvalid(crow::Response& res, std::string_view arg1);
1213 
1214 /**
1215  * @brief Formats OperationFailed message into JSON
1216  * Message body: "An error occurred internal to the service as part of the
1217  * overall request.  Partial results may have been returned."
1218  *
1219  *
1220  * @returns Message OperationFailed formatted to JSON */
1221 nlohmann::json operationFailed();
1222 
1223 void operationFailed(crow::Response& res);
1224 
1225 /**
1226  * @brief Formats OperationTimeout message into JSON
1227  * Message body: "A timeout internal to the service occurred as part of the
1228  * request.  Partial results may have been returned."
1229  *
1230  *
1231  * @returns Message OperationTimeout formatted to JSON */
1232 nlohmann::json operationTimeout();
1233 
1234 void operationTimeout(crow::Response& res);
1235 
1236 /**
1237  * @brief Formats OperationNotAllowed message into JSON
1238  * Message body: "The HTTP method is not allowed on this resource."
1239  *
1240  *
1241  * @returns Message OperationNotAllowed formatted to JSON */
1242 nlohmann::json operationNotAllowed();
1243 
1244 void operationNotAllowed(crow::Response& res);
1245 
1246 /**
1247  * @brief Formats UndeterminedFault message into JSON
1248  * Message body: "An undetermined fault condition was reported by <arg1>."
1249  *
1250  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1251  *
1252  * @returns Message UndeterminedFault formatted to JSON */
1253 nlohmann::json undeterminedFault(std::string_view arg1);
1254 
1255 void undeterminedFault(crow::Response& res, std::string_view arg1);
1256 
1257 /**
1258  * @brief Formats ConditionInRelatedResource message into JSON
1259  * Message body: "One or more conditions exist in a related resource.  See the
1260  * OriginOfCondition property."
1261  *
1262  *
1263  * @returns Message ConditionInRelatedResource formatted to JSON */
1264 nlohmann::json conditionInRelatedResource();
1265 
1266 void conditionInRelatedResource(crow::Response& res);
1267 
1268 /**
1269  * @brief Formats RestrictedRole message into JSON
1270  * Message body: "The operation was not successful because the role <arg1> is
1271  * restricted."
1272  *
1273  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1274  *
1275  * @returns Message RestrictedRole formatted to JSON */
1276 nlohmann::json restrictedRole(std::string_view arg1);
1277 
1278 void restrictedRole(crow::Response& res, std::string_view arg1);
1279 
1280 /**
1281  * @brief Formats RestrictedPrivilege message into JSON
1282  * Message body: "The operation was not successful because the privilege <arg1>
1283  * is restricted."
1284  *
1285  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1286  *
1287  * @returns Message RestrictedPrivilege formatted to JSON */
1288 nlohmann::json restrictedPrivilege(std::string_view arg1);
1289 
1290 void restrictedPrivilege(crow::Response& res, std::string_view arg1);
1291 
1292 /**
1293  * @brief Formats StrictAccountTypes message into JSON
1294  * Message body: "The request could not be fulfilled with the account types
1295  * included in property <arg1> because the property StrictAccountTypes is set to
1296  * true."
1297  *
1298  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1299  *
1300  * @returns Message StrictAccountTypes formatted to JSON */
1301 nlohmann::json strictAccountTypes(std::string_view arg1);
1302 
1303 void strictAccountTypes(crow::Response& res, std::string_view arg1);
1304 
1305 /**
1306  * @brief Formats PropertyDeprecated message into JSON
1307  * Message body: "The deprecated property <arg1> was included in the request
1308  * body."
1309  *
1310  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1311  *
1312  * @returns Message PropertyDeprecated formatted to JSON */
1313 nlohmann::json propertyDeprecated(std::string_view arg1);
1314 
1315 void propertyDeprecated(crow::Response& res, std::string_view arg1);
1316 
1317 /**
1318  * @brief Formats ResourceDeprecated message into JSON
1319  * Message body: "The operation was performed on a deprecated resource <arg1>."
1320  *
1321  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1322  *
1323  * @returns Message ResourceDeprecated formatted to JSON */
1324 nlohmann::json resourceDeprecated(std::string_view arg1);
1325 
1326 void resourceDeprecated(crow::Response& res, std::string_view arg1);
1327 
1328 /**
1329  * @brief Formats PropertyValueDeprecated message into JSON
1330  * Message body: "The value <arg1> for the property <arg2> is deprecated."
1331  *
1332  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1333  * @param[in] arg2 Parameter of message that will replace %2 in its body.
1334  *
1335  * @returns Message PropertyValueDeprecated formatted to JSON */
1336 nlohmann::json propertyValueDeprecated(std::string_view arg1,
1337                                        std::string_view arg2);
1338 
1339 void propertyValueDeprecated(crow::Response& res, std::string_view arg1,
1340                              std::string_view arg2);
1341 
1342 /**
1343  * @brief Formats ActionDeprecated message into JSON
1344  * Message body: "The action <arg1> is deprecated."
1345  *
1346  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1347  *
1348  * @returns Message ActionDeprecated formatted to JSON */
1349 nlohmann::json actionDeprecated(std::string_view arg1);
1350 
1351 void actionDeprecated(crow::Response& res, std::string_view arg1);
1352 
1353 /**
1354  * @brief Formats NetworkNameResolutionNotConfigured message into JSON
1355  * Message body: "Network name resolution is not configured on this service."
1356  *
1357  *
1358  * @returns Message NetworkNameResolutionNotConfigured formatted to JSON */
1359 nlohmann::json networkNameResolutionNotConfigured();
1360 
1361 void networkNameResolutionNotConfigured(crow::Response& res);
1362 
1363 /**
1364  * @brief Formats NetworkNameResolutionNotSupported message into JSON
1365  * Message body: "Resolution of network-based names is not supported by this
1366  * service."
1367  *
1368  *
1369  * @returns Message NetworkNameResolutionNotSupported formatted to JSON */
1370 nlohmann::json networkNameResolutionNotSupported();
1371 
1372 void networkNameResolutionNotSupported(crow::Response& res);
1373 
1374 /**
1375  * @brief Formats ServiceDisabled message into JSON
1376  * Message body: "The operation failed because the service at <arg1> is disabled
1377  * and cannot accept requests."
1378  *
1379  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1380  *
1381  * @returns Message ServiceDisabled formatted to JSON */
1382 nlohmann::json serviceDisabled(std::string_view arg1);
1383 
1384 void serviceDisabled(crow::Response& res, std::string_view arg1);
1385 
1386 /**
1387  * @brief Formats EventBufferExceeded message into JSON
1388  * Message body: "Undelivered events may have been lost due to exceeding the
1389  * event buffer."
1390  *
1391  *
1392  * @returns Message EventBufferExceeded formatted to JSON */
1393 nlohmann::json eventBufferExceeded();
1394 
1395 void eventBufferExceeded(crow::Response& res);
1396 
1397 /**
1398  * @brief Formats AuthenticationTokenRequired message into JSON
1399  * Message body: "The request could not be performed because an authentication
1400  * token was not provided."
1401  *
1402  *
1403  * @returns Message AuthenticationTokenRequired formatted to JSON */
1404 nlohmann::json authenticationTokenRequired();
1405 
1406 void authenticationTokenRequired(crow::Response& res);
1407 
1408 /**
1409  * @brief Formats OneTimePasscodeSent message into JSON
1410  * Message body: "A one-time passcode was sent to: <arg1>.  Supply the passcode
1411  * as the `Token` property in the request to create a session."
1412  *
1413  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1414  *
1415  * @returns Message OneTimePasscodeSent formatted to JSON */
1416 nlohmann::json oneTimePasscodeSent(std::string_view arg1);
1417 
1418 void oneTimePasscodeSent(crow::Response& res, std::string_view arg1);
1419 
1420 /**
1421  * @brief Formats LicenseRequired message into JSON
1422  * Message body: "A license is required for this operation: <arg1>."
1423  *
1424  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1425  *
1426  * @returns Message LicenseRequired formatted to JSON */
1427 nlohmann::json licenseRequired(std::string_view arg1);
1428 
1429 void licenseRequired(crow::Response& res, std::string_view arg1);
1430 
1431 /**
1432  * @brief Formats PropertyModified message into JSON
1433  * Message body: "One or more properties were successfully modified."
1434  *
1435  *
1436  * @returns Message PropertyModified formatted to JSON */
1437 nlohmann::json propertyModified();
1438 
1439 void propertyModified(crow::Response& res);
1440 
1441 /**
1442  * @brief Formats GenerateSecretKeyRequired message into JSON
1443  * Message body: "The Time-based One-Time Password (TOTP) secret key for this
1444  * account must be generated before access is granted.  Perform the
1445  * GenerateSecretKey action at URI <arg1> and retain the secret key from the
1446  * response."
1447  *
1448  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1449  *
1450  * @returns Message GenerateSecretKeyRequired formatted to JSON */
1451 nlohmann::json generateSecretKeyRequired(
1452     const boost::urls::url_view_base& arg1);
1453 
1454 void generateSecretKeyRequired(crow::Response& res,
1455                                const boost::urls::url_view_base& arg1);
1456 
1457 } // namespace messages
1458 } // namespace redfish
1459