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