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