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 constexpr const char* messageVersionPrefix = "Base.1.19.0.";
31 constexpr const char* messageAnnotation = "@Message.ExtendedInfo";
32 
33 /**
34  * @brief Moves all error messages from the |source| JSON to |target|
35  */
36 void moveErrorsToErrorJson(nlohmann::json& target, nlohmann::json& source);
37 
38 /**
39  * @brief Formats Success message into JSON
40  * Message body: "The request completed successfully."
41  *
42  *
43  * @returns Message Success formatted to JSON */
44 nlohmann::json success();
45 
46 void success(crow::Response& res);
47 
48 /**
49  * @brief Formats GeneralError message into JSON
50  * Message body: "A general error has occurred.  See Resolution for information
51  * on how to resolve the error, or @Message.ExtendedInfo if Resolution is not
52  * provided."
53  *
54  *
55  * @returns Message GeneralError formatted to JSON */
56 nlohmann::json generalError();
57 
58 void generalError(crow::Response& res);
59 
60 /**
61  * @brief Formats Created message into JSON
62  * Message body: "The resource was created successfully."
63  *
64  *
65  * @returns Message Created formatted to JSON */
66 nlohmann::json created();
67 
68 void created(crow::Response& res);
69 
70 /**
71  * @brief Formats NoOperation message into JSON
72  * Message body: "The request body submitted contain no data to act upon and no
73  * changes to the resource took place."
74  *
75  *
76  * @returns Message NoOperation formatted to JSON */
77 nlohmann::json noOperation();
78 
79 void noOperation(crow::Response& res);
80 
81 /**
82  * @brief Formats PropertyDuplicate message into JSON
83  * Message body: "The property <arg1> was duplicated in the request."
84  *
85  * @param[in] arg1 Parameter of message that will replace %1 in its body.
86  *
87  * @returns Message PropertyDuplicate formatted to JSON */
88 nlohmann::json propertyDuplicate(std::string_view arg1);
89 
90 void propertyDuplicate(crow::Response& res, std::string_view arg1);
91 
92 /**
93  * @brief Formats PropertyUnknown message into JSON
94  * Message body: "The property <arg1> is not in the list of valid properties for
95  * the resource."
96  *
97  * @param[in] arg1 Parameter of message that will replace %1 in its body.
98  *
99  * @returns Message PropertyUnknown formatted to JSON */
100 nlohmann::json propertyUnknown(std::string_view arg1);
101 
102 void propertyUnknown(crow::Response& res, std::string_view arg1);
103 
104 /**
105  * @brief Formats PropertyValueTypeError message into JSON
106  * Message body: "The value <arg1> for the property <arg2> is not a type that
107  * the property can accept."
108  *
109  * @param[in] arg1 Parameter of message that will replace %1 in its body.
110  * @param[in] arg2 Parameter of message that will replace %2 in its body.
111  *
112  * @returns Message PropertyValueTypeError formatted to JSON */
113 nlohmann::json propertyValueTypeError(const nlohmann::json& arg1,
114                                       std::string_view arg2);
115 
116 void propertyValueTypeError(crow::Response& res, const nlohmann::json& arg1,
117                             std::string_view arg2);
118 
119 /**
120  * @brief Formats PropertyValueFormatError message into JSON
121  * Message body: "The value <arg1> for the property <arg2> is not a format that
122  * the property can accept."
123  *
124  * @param[in] arg1 Parameter of message that will replace %1 in its body.
125  * @param[in] arg2 Parameter of message that will replace %2 in its body.
126  *
127  * @returns Message PropertyValueFormatError formatted to JSON */
128 nlohmann::json propertyValueFormatError(const nlohmann::json& arg1,
129                                         std::string_view arg2);
130 
131 void propertyValueFormatError(crow::Response& res, const nlohmann::json& arg1,
132                               std::string_view arg2);
133 
134 /**
135  * @brief Formats PropertyValueNotInList message into JSON
136  * Message body: "The value <arg1> for the property <arg2> is not in the list of
137  * acceptable values."
138  *
139  * @param[in] arg1 Parameter of message that will replace %1 in its body.
140  * @param[in] arg2 Parameter of message that will replace %2 in its body.
141  *
142  * @returns Message PropertyValueNotInList formatted to JSON */
143 nlohmann::json propertyValueNotInList(const nlohmann::json& arg1,
144                                       std::string_view arg2);
145 
146 void propertyValueNotInList(crow::Response& res, const nlohmann::json& arg1,
147                             std::string_view arg2);
148 
149 /**
150  * @brief Formats PropertyValueOutOfRange message into JSON
151  * Message body: "The value <arg1> for the property <arg2> is not in the
152  * supported range of acceptable values."
153  *
154  * @param[in] arg1 Parameter of message that will replace %1 in its body.
155  * @param[in] arg2 Parameter of message that will replace %2 in its body.
156  *
157  * @returns Message PropertyValueOutOfRange formatted to JSON */
158 nlohmann::json propertyValueOutOfRange(const nlohmann::json& arg1,
159                                        std::string_view arg2);
160 
161 void propertyValueOutOfRange(crow::Response& res, const nlohmann::json& arg1,
162                              std::string_view arg2);
163 
164 /**
165  * @brief Formats PropertyValueError message into JSON
166  * Message body: "The value provided for the property <arg1> is not valid."
167  *
168  * @param[in] arg1 Parameter of message that will replace %1 in its body.
169  *
170  * @returns Message PropertyValueError formatted to JSON */
171 nlohmann::json propertyValueError(std::string_view arg1);
172 
173 void propertyValueError(crow::Response& res, std::string_view arg1);
174 
175 /**
176  * @brief Formats PropertyNotWritable message into JSON
177  * Message body: "The property <arg1> is a read-only property and cannot be
178  * assigned a value."
179  *
180  * @param[in] arg1 Parameter of message that will replace %1 in its body.
181  *
182  * @returns Message PropertyNotWritable formatted to JSON */
183 nlohmann::json propertyNotWritable(std::string_view arg1);
184 
185 void propertyNotWritable(crow::Response& res, std::string_view arg1);
186 
187 /**
188  * @brief Formats PropertyNotUpdated message into JSON
189  * Message body: "The property <arg1> was not updated due to an internal service
190  * error.  The service is still operational."
191  *
192  * @param[in] arg1 Parameter of message that will replace %1 in its body.
193  *
194  * @returns Message PropertyNotUpdated formatted to JSON */
195 nlohmann::json propertyNotUpdated(std::string_view arg1);
196 
197 void propertyNotUpdated(crow::Response& res, std::string_view arg1);
198 
199 /**
200  * @brief Formats PropertyMissing message into JSON
201  * Message body: "The property <arg1> is a required property and must be
202  * included in the request."
203  *
204  * @param[in] arg1 Parameter of message that will replace %1 in its body.
205  *
206  * @returns Message PropertyMissing formatted to JSON */
207 nlohmann::json propertyMissing(std::string_view arg1);
208 
209 void propertyMissing(crow::Response& res, std::string_view arg1);
210 
211 /**
212  * @brief Formats MalformedJSON message into JSON
213  * Message body: "The request body submitted was malformed JSON and could not be
214  * parsed by the receiving service."
215  *
216  *
217  * @returns Message MalformedJSON formatted to JSON */
218 nlohmann::json malformedJSON();
219 
220 void malformedJSON(crow::Response& res);
221 
222 /**
223  * @brief Formats InvalidJSON message into JSON
224  * Message body: "The request body submitted is invalid JSON starting at line
225  * <arg1> and could not be parsed by the receiving service."
226  *
227  * @param[in] arg1 Parameter of message that will replace %1 in its body.
228  *
229  * @returns Message InvalidJSON formatted to JSON */
230 nlohmann::json invalidJSON(std::string_view arg1);
231 
232 void invalidJSON(crow::Response& res, std::string_view arg1);
233 
234 /**
235  * @brief Formats EmptyJSON message into JSON
236  * Message body: "The request body submitted contained an empty JSON object and
237  * the service is unable to process it."
238  *
239  *
240  * @returns Message EmptyJSON formatted to JSON */
241 nlohmann::json emptyJSON();
242 
243 void emptyJSON(crow::Response& res);
244 
245 /**
246  * @brief Formats ActionNotSupported message into JSON
247  * Message body: "The action <arg1> is not supported by the resource."
248  *
249  * @param[in] arg1 Parameter of message that will replace %1 in its body.
250  *
251  * @returns Message ActionNotSupported formatted to JSON */
252 nlohmann::json actionNotSupported(std::string_view arg1);
253 
254 void actionNotSupported(crow::Response& res, std::string_view arg1);
255 
256 /**
257  * @brief Formats ActionParameterMissing message into JSON
258  * Message body: "The action <arg1> requires the parameter <arg2> to be present
259  * in the request body."
260  *
261  * @param[in] arg1 Parameter of message that will replace %1 in its body.
262  * @param[in] arg2 Parameter of message that will replace %2 in its body.
263  *
264  * @returns Message ActionParameterMissing formatted to JSON */
265 nlohmann::json actionParameterMissing(std::string_view arg1,
266                                       std::string_view arg2);
267 
268 void actionParameterMissing(crow::Response& res, std::string_view arg1,
269                             std::string_view arg2);
270 
271 /**
272  * @brief Formats ActionParameterDuplicate message into JSON
273  * Message body: "The action <arg1> was submitted with more than one value for
274  * the parameter <arg2>."
275  *
276  * @param[in] arg1 Parameter of message that will replace %1 in its body.
277  * @param[in] arg2 Parameter of message that will replace %2 in its body.
278  *
279  * @returns Message ActionParameterDuplicate formatted to JSON */
280 nlohmann::json actionParameterDuplicate(std::string_view arg1,
281                                         std::string_view arg2);
282 
283 void actionParameterDuplicate(crow::Response& res, std::string_view arg1,
284                               std::string_view arg2);
285 
286 /**
287  * @brief Formats ActionParameterUnknown message into JSON
288  * Message body: "The action <arg1> was submitted with the invalid parameter
289  * <arg2>."
290  *
291  * @param[in] arg1 Parameter of message that will replace %1 in its body.
292  * @param[in] arg2 Parameter of message that will replace %2 in its body.
293  *
294  * @returns Message ActionParameterUnknown formatted to JSON */
295 nlohmann::json actionParameterUnknown(std::string_view arg1,
296                                       std::string_view arg2);
297 
298 void actionParameterUnknown(crow::Response& res, std::string_view arg1,
299                             std::string_view arg2);
300 
301 /**
302  * @brief Formats ActionParameterValueTypeError message into JSON
303  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
304  * is not a type that the parameter can accept."
305  *
306  * @param[in] arg1 Parameter of message that will replace %1 in its body.
307  * @param[in] arg2 Parameter of message that will replace %2 in its body.
308  * @param[in] arg3 Parameter of message that will replace %3 in its body.
309  *
310  * @returns Message ActionParameterValueTypeError formatted to JSON */
311 nlohmann::json actionParameterValueTypeError(
312     const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3);
313 
314 void actionParameterValueTypeError(
315     crow::Response& res, const nlohmann::json& arg1, std::string_view arg2,
316     std::string_view arg3);
317 
318 /**
319  * @brief Formats ActionParameterValueFormatError message into JSON
320  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
321  * is not a format that the parameter can accept."
322  *
323  * @param[in] arg1 Parameter of message that will replace %1 in its body.
324  * @param[in] arg2 Parameter of message that will replace %2 in its body.
325  * @param[in] arg3 Parameter of message that will replace %3 in its body.
326  *
327  * @returns Message ActionParameterValueFormatError formatted to JSON */
328 nlohmann::json actionParameterValueFormatError(
329     const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3);
330 
331 void actionParameterValueFormatError(
332     crow::Response& res, const nlohmann::json& arg1, std::string_view arg2,
333     std::string_view arg3);
334 
335 /**
336  * @brief Formats ActionParameterValueNotInList message into JSON
337  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
338  * is not in the list of acceptable values."
339  *
340  * @param[in] arg1 Parameter of message that will replace %1 in its body.
341  * @param[in] arg2 Parameter of message that will replace %2 in its body.
342  * @param[in] arg3 Parameter of message that will replace %3 in its body.
343  *
344  * @returns Message ActionParameterValueNotInList formatted to JSON */
345 nlohmann::json actionParameterValueNotInList(
346     std::string_view arg1, std::string_view arg2, std::string_view arg3);
347 
348 void actionParameterValueNotInList(crow::Response& res, std::string_view arg1,
349                                    std::string_view arg2,
350                                    std::string_view arg3);
351 
352 /**
353  * @brief Formats ActionParameterValueOutOfRange message into JSON
354  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
355  * is not in the supported range of acceptable values."
356  *
357  * @param[in] arg1 Parameter of message that will replace %1 in its body.
358  * @param[in] arg2 Parameter of message that will replace %2 in its body.
359  * @param[in] arg3 Parameter of message that will replace %3 in its body.
360  *
361  * @returns Message ActionParameterValueOutOfRange formatted to JSON */
362 nlohmann::json actionParameterValueOutOfRange(
363     std::string_view arg1, std::string_view arg2, std::string_view arg3);
364 
365 void actionParameterValueOutOfRange(crow::Response& res, std::string_view arg1,
366                                     std::string_view arg2,
367                                     std::string_view arg3);
368 
369 /**
370  * @brief Formats ActionParameterValueError message into JSON
371  * Message body: "The value for the parameter <arg1> in the action <arg2> is
372  * invalid."
373  *
374  * @param[in] arg1 Parameter of message that will replace %1 in its body.
375  * @param[in] arg2 Parameter of message that will replace %2 in its body.
376  *
377  * @returns Message ActionParameterValueError formatted to JSON */
378 nlohmann::json actionParameterValueError(const nlohmann::json& arg1,
379                                          std::string_view arg2);
380 
381 void actionParameterValueError(crow::Response& res, const nlohmann::json& arg1,
382                                std::string_view arg2);
383 
384 /**
385  * @brief Formats ActionParameterNotSupported message into JSON
386  * Message body: "The parameter <arg1> for the action <arg2> is not supported on
387  * the target resource."
388  *
389  * @param[in] arg1 Parameter of message that will replace %1 in its body.
390  * @param[in] arg2 Parameter of message that will replace %2 in its body.
391  *
392  * @returns Message ActionParameterNotSupported formatted to JSON */
393 nlohmann::json actionParameterNotSupported(std::string_view arg1,
394                                            std::string_view arg2);
395 
396 void actionParameterNotSupported(crow::Response& res, std::string_view arg1,
397                                  std::string_view arg2);
398 
399 /**
400  * @brief Formats ArraySizeTooLong message into JSON
401  * Message body: "The array provided for property <arg1> exceeds the size limit
402  * <arg2>."
403  *
404  * @param[in] arg1 Parameter of message that will replace %1 in its body.
405  * @param[in] arg2 Parameter of message that will replace %2 in its body.
406  *
407  * @returns Message ArraySizeTooLong formatted to JSON */
408 nlohmann::json arraySizeTooLong(std::string_view arg1, uint64_t arg2);
409 
410 void arraySizeTooLong(crow::Response& res, std::string_view arg1,
411                       uint64_t arg2);
412 
413 /**
414  * @brief Formats ArraySizeTooShort message into JSON
415  * Message body: "The array provided for property <arg1> is under the minimum
416  * size limit <arg2>."
417  *
418  * @param[in] arg1 Parameter of message that will replace %1 in its body.
419  * @param[in] arg2 Parameter of message that will replace %2 in its body.
420  *
421  * @returns Message ArraySizeTooShort formatted to JSON */
422 nlohmann::json arraySizeTooShort(std::string_view arg1, std::string_view arg2);
423 
424 void arraySizeTooShort(crow::Response& res, std::string_view arg1,
425                        std::string_view arg2);
426 
427 /**
428  * @brief Formats QueryParameterValueTypeError message into JSON
429  * Message body: "The value <arg1> for the query parameter <arg2> is not a type
430  * that the parameter can accept."
431  *
432  * @param[in] arg1 Parameter of message that will replace %1 in its body.
433  * @param[in] arg2 Parameter of message that will replace %2 in its body.
434  *
435  * @returns Message QueryParameterValueTypeError formatted to JSON */
436 nlohmann::json queryParameterValueTypeError(const nlohmann::json& arg1,
437                                             std::string_view arg2);
438 
439 void queryParameterValueTypeError(
440     crow::Response& res, const nlohmann::json& arg1, std::string_view arg2);
441 
442 /**
443  * @brief Formats QueryParameterValueFormatError message into JSON
444  * Message body: "The value <arg1> for the parameter <arg2> is not a format that
445  * the parameter can accept."
446  *
447  * @param[in] arg1 Parameter of message that will replace %1 in its body.
448  * @param[in] arg2 Parameter of message that will replace %2 in its body.
449  *
450  * @returns Message QueryParameterValueFormatError formatted to JSON */
451 nlohmann::json queryParameterValueFormatError(const nlohmann::json& arg1,
452                                               std::string_view arg2);
453 
454 void queryParameterValueFormatError(
455     crow::Response& res, const nlohmann::json& arg1, std::string_view arg2);
456 
457 /**
458  * @brief Formats QueryParameterValueError message into JSON
459  * Message body: "The value for the parameter <arg1> is invalid."
460  *
461  * @param[in] arg1 Parameter of message that will replace %1 in its body.
462  *
463  * @returns Message QueryParameterValueError formatted to JSON */
464 nlohmann::json queryParameterValueError(std::string_view arg1);
465 
466 void queryParameterValueError(crow::Response& res, std::string_view arg1);
467 
468 /**
469  * @brief Formats QueryParameterOutOfRange message into JSON
470  * Message body: "The value <arg1> for the query parameter <arg2> is out of
471  * range <arg3>."
472  *
473  * @param[in] arg1 Parameter of message that will replace %1 in its body.
474  * @param[in] arg2 Parameter of message that will replace %2 in its body.
475  * @param[in] arg3 Parameter of message that will replace %3 in its body.
476  *
477  * @returns Message QueryParameterOutOfRange formatted to JSON */
478 nlohmann::json queryParameterOutOfRange(
479     std::string_view arg1, std::string_view arg2, std::string_view arg3);
480 
481 void queryParameterOutOfRange(crow::Response& res, std::string_view arg1,
482                               std::string_view arg2, std::string_view arg3);
483 
484 /**
485  * @brief Formats QueryNotSupportedOnResource message into JSON
486  * Message body: "Querying is not supported on the requested resource."
487  *
488  *
489  * @returns Message QueryNotSupportedOnResource formatted to JSON */
490 nlohmann::json queryNotSupportedOnResource();
491 
492 void queryNotSupportedOnResource(crow::Response& res);
493 
494 /**
495  * @brief Formats QueryNotSupportedOnOperation message into JSON
496  * Message body: "Querying is not supported with the requested operation."
497  *
498  *
499  * @returns Message QueryNotSupportedOnOperation formatted to JSON */
500 nlohmann::json queryNotSupportedOnOperation();
501 
502 void queryNotSupportedOnOperation(crow::Response& res);
503 
504 /**
505  * @brief Formats QueryNotSupported message into JSON
506  * Message body: "Querying is not supported by the implementation."
507  *
508  *
509  * @returns Message QueryNotSupported formatted to JSON */
510 nlohmann::json queryNotSupported();
511 
512 void queryNotSupported(crow::Response& res);
513 
514 /**
515  * @brief Formats QueryCombinationInvalid message into JSON
516  * Message body: "Two or more query parameters in the request cannot be used
517  * together."
518  *
519  *
520  * @returns Message QueryCombinationInvalid formatted to JSON */
521 nlohmann::json queryCombinationInvalid();
522 
523 void queryCombinationInvalid(crow::Response& res);
524 
525 /**
526  * @brief Formats QueryParameterUnsupported message into JSON
527  * Message body: "Query parameter <arg1> is not supported."
528  *
529  * @param[in] arg1 Parameter of message that will replace %1 in its body.
530  *
531  * @returns Message QueryParameterUnsupported formatted to JSON */
532 nlohmann::json queryParameterUnsupported(std::string_view arg1);
533 
534 void queryParameterUnsupported(crow::Response& res, std::string_view arg1);
535 
536 /**
537  * @brief Formats SessionLimitExceeded message into JSON
538  * Message body: "The session establishment failed due to the number of
539  * simultaneous sessions exceeding the limit of the implementation."
540  *
541  *
542  * @returns Message SessionLimitExceeded formatted to JSON */
543 nlohmann::json sessionLimitExceeded();
544 
545 void sessionLimitExceeded(crow::Response& res);
546 
547 /**
548  * @brief Formats EventSubscriptionLimitExceeded message into JSON
549  * Message body: "The event subscription failed due to the number of
550  * simultaneous subscriptions exceeding the limit of the implementation."
551  *
552  *
553  * @returns Message EventSubscriptionLimitExceeded formatted to JSON */
554 nlohmann::json eventSubscriptionLimitExceeded();
555 
556 void eventSubscriptionLimitExceeded(crow::Response& res);
557 
558 /**
559  * @brief Formats ResourceCannotBeDeleted message into JSON
560  * Message body: "The delete request failed because the resource requested
561  * cannot be deleted."
562  *
563  *
564  * @returns Message ResourceCannotBeDeleted formatted to JSON */
565 nlohmann::json resourceCannotBeDeleted();
566 
567 void resourceCannotBeDeleted(crow::Response& res);
568 
569 /**
570  * @brief Formats ResourceInUse message into JSON
571  * Message body: "The change to the requested resource failed because the
572  * resource is in use or in transition."
573  *
574  *
575  * @returns Message ResourceInUse formatted to JSON */
576 nlohmann::json resourceInUse();
577 
578 void resourceInUse(crow::Response& res);
579 
580 /**
581  * @brief Formats ResourceAlreadyExists message into JSON
582  * Message body: "The requested resource of type <arg1> with the property <arg2>
583  * with the value <arg3> already exists."
584  *
585  * @param[in] arg1 Parameter of message that will replace %1 in its body.
586  * @param[in] arg2 Parameter of message that will replace %2 in its body.
587  * @param[in] arg3 Parameter of message that will replace %3 in its body.
588  *
589  * @returns Message ResourceAlreadyExists formatted to JSON */
590 nlohmann::json resourceAlreadyExists(
591     std::string_view arg1, std::string_view arg2, std::string_view arg3);
592 
593 void resourceAlreadyExists(crow::Response& res, std::string_view arg1,
594                            std::string_view arg2, std::string_view arg3);
595 
596 /**
597  * @brief Formats ResourceNotFound message into JSON
598  * Message body: "The requested resource of type <arg1> named <arg2> was not
599  * found."
600  *
601  * @param[in] arg1 Parameter of message that will replace %1 in its body.
602  * @param[in] arg2 Parameter of message that will replace %2 in its body.
603  *
604  * @returns Message ResourceNotFound formatted to JSON */
605 nlohmann::json resourceNotFound(std::string_view arg1, std::string_view arg2);
606 
607 void resourceNotFound(crow::Response& res, std::string_view arg1,
608                       std::string_view arg2);
609 
610 /**
611  * @brief Formats PayloadTooLarge message into JSON
612  * Message body: "The supplied payload exceeds the maximum size supported by the
613  * service."
614  *
615  *
616  * @returns Message PayloadTooLarge formatted to JSON */
617 nlohmann::json payloadTooLarge();
618 
619 void payloadTooLarge(crow::Response& res);
620 
621 /**
622  * @brief Formats InsufficientStorage message into JSON
623  * Message body: "Insufficient storage or memory available to complete the
624  * request."
625  *
626  *
627  * @returns Message InsufficientStorage formatted to JSON */
628 nlohmann::json insufficientStorage();
629 
630 void insufficientStorage(crow::Response& res);
631 
632 /**
633  * @brief Formats MissingOrMalformedPart message into JSON
634  * Message body: "The multipart request contains malformed parts or is missing
635  * required parts."
636  *
637  *
638  * @returns Message MissingOrMalformedPart formatted to JSON */
639 nlohmann::json missingOrMalformedPart();
640 
641 void missingOrMalformedPart(crow::Response& res);
642 
643 /**
644  * @brief Formats InvalidURI message into JSON
645  * Message body: "The URI <arg1> was not found."
646  *
647  * @param[in] arg1 Parameter of message that will replace %1 in its body.
648  *
649  * @returns Message InvalidURI formatted to JSON */
650 nlohmann::json invalidURI(std::string_view arg1);
651 
652 void invalidURI(crow::Response& res, std::string_view arg1);
653 
654 /**
655  * @brief Formats CreateFailedMissingReqProperties message into JSON
656  * Message body: "The create operation failed because the required property
657  * <arg1> was missing from the request."
658  *
659  * @param[in] arg1 Parameter of message that will replace %1 in its body.
660  *
661  * @returns Message CreateFailedMissingReqProperties formatted to JSON */
662 nlohmann::json createFailedMissingReqProperties(std::string_view arg1);
663 
664 void createFailedMissingReqProperties(crow::Response& res,
665                                       std::string_view arg1);
666 
667 /**
668  * @brief Formats CreateLimitReachedForResource message into JSON
669  * Message body: "The create operation failed because the resource has reached
670  * the limit of possible resources."
671  *
672  *
673  * @returns Message CreateLimitReachedForResource formatted to JSON */
674 nlohmann::json createLimitReachedForResource();
675 
676 void createLimitReachedForResource(crow::Response& res);
677 
678 /**
679  * @brief Formats ServiceShuttingDown message into JSON
680  * Message body: "The operation failed because the service is shutting down and
681  * can no longer take incoming requests."
682  *
683  *
684  * @returns Message ServiceShuttingDown formatted to JSON */
685 nlohmann::json serviceShuttingDown();
686 
687 void serviceShuttingDown(crow::Response& res);
688 
689 /**
690  * @brief Formats ServiceInUnknownState message into JSON
691  * Message body: "The operation failed because the service is in an unknown
692  * state and can no longer take incoming requests."
693  *
694  *
695  * @returns Message ServiceInUnknownState formatted to JSON */
696 nlohmann::json serviceInUnknownState();
697 
698 void serviceInUnknownState(crow::Response& res);
699 
700 /**
701  * @brief Formats NoValidSession message into JSON
702  * Message body: "There is no valid session established with the
703  * implementation."
704  *
705  *
706  * @returns Message NoValidSession formatted to JSON */
707 nlohmann::json noValidSession();
708 
709 void noValidSession(crow::Response& res);
710 
711 /**
712  * @brief Formats InsufficientPrivilege message into JSON
713  * Message body: "There are insufficient privileges for the account or
714  * credentials associated with the current session to perform the requested
715  * operation."
716  *
717  *
718  * @returns Message InsufficientPrivilege formatted to JSON */
719 nlohmann::json insufficientPrivilege();
720 
721 void insufficientPrivilege(crow::Response& res);
722 
723 /**
724  * @brief Formats AccountModified message into JSON
725  * Message body: "The account was successfully modified."
726  *
727  *
728  * @returns Message AccountModified formatted to JSON */
729 nlohmann::json accountModified();
730 
731 void accountModified(crow::Response& res);
732 
733 /**
734  * @brief Formats AccountNotModified message into JSON
735  * Message body: "The account modification request failed."
736  *
737  *
738  * @returns Message AccountNotModified formatted to JSON */
739 nlohmann::json accountNotModified();
740 
741 void accountNotModified(crow::Response& res);
742 
743 /**
744  * @brief Formats AccountRemoved message into JSON
745  * Message body: "The account was successfully removed."
746  *
747  *
748  * @returns Message AccountRemoved formatted to JSON */
749 nlohmann::json accountRemoved();
750 
751 void accountRemoved(crow::Response& res);
752 
753 /**
754  * @brief Formats AccountForSessionNoLongerExists message into JSON
755  * Message body: "The account for the current session was removed, and so the
756  * current session was removed as well."
757  *
758  *
759  * @returns Message AccountForSessionNoLongerExists formatted to JSON */
760 nlohmann::json accountForSessionNoLongerExists();
761 
762 void accountForSessionNoLongerExists(crow::Response& res);
763 
764 /**
765  * @brief Formats InvalidObject message into JSON
766  * Message body: "The object at <arg1> is invalid."
767  *
768  * @param[in] arg1 Parameter of message that will replace %1 in its body.
769  *
770  * @returns Message InvalidObject formatted to JSON */
771 nlohmann::json invalidObject(const boost::urls::url_view_base& arg1);
772 
773 void invalidObject(crow::Response& res, const boost::urls::url_view_base& arg1);
774 
775 /**
776  * @brief Formats InternalError message into JSON
777  * Message body: "The request failed due to an internal service error.  The
778  * service is still operational."
779  *
780  *
781  * @returns Message InternalError formatted to JSON */
782 nlohmann::json internalError();
783 
784 void internalError(crow::Response& res, std::source_location location =
785                                             std::source_location::current());
786 
787 /**
788  * @brief Formats UnrecognizedRequestBody message into JSON
789  * Message body: "The service detected a malformed request body that it was
790  * unable to interpret."
791  *
792  *
793  * @returns Message UnrecognizedRequestBody formatted to JSON */
794 nlohmann::json unrecognizedRequestBody();
795 
796 void unrecognizedRequestBody(crow::Response& res);
797 
798 /**
799  * @brief Formats ResourceMissingAtURI message into JSON
800  * Message body: "The resource at the URI <arg1> was not found."
801  *
802  * @param[in] arg1 Parameter of message that will replace %1 in its body.
803  *
804  * @returns Message ResourceMissingAtURI formatted to JSON */
805 nlohmann::json resourceMissingAtURI(const boost::urls::url_view_base& arg1);
806 
807 void resourceMissingAtURI(crow::Response& res,
808                           const boost::urls::url_view_base& arg1);
809 
810 /**
811  * @brief Formats ResourceAtUriInUnknownFormat message into JSON
812  * Message body: "The resource at <arg1> is in a format not recognized by the
813  * service."
814  *
815  * @param[in] arg1 Parameter of message that will replace %1 in its body.
816  *
817  * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */
818 nlohmann::json
819     resourceAtUriInUnknownFormat(const boost::urls::url_view_base& arg1);
820 
821 void resourceAtUriInUnknownFormat(crow::Response& res,
822                                   const boost::urls::url_view_base& arg1);
823 
824 /**
825  * @brief Formats ResourceAtUriUnauthorized message into JSON
826  * Message body: "While accessing the resource at <arg1>, the service received
827  * an authorization error <arg2>."
828  *
829  * @param[in] arg1 Parameter of message that will replace %1 in its body.
830  * @param[in] arg2 Parameter of message that will replace %2 in its body.
831  *
832  * @returns Message ResourceAtUriUnauthorized formatted to JSON */
833 nlohmann::json resourceAtUriUnauthorized(const boost::urls::url_view_base& arg1,
834                                          std::string_view arg2);
835 
836 void resourceAtUriUnauthorized(crow::Response& res,
837                                const boost::urls::url_view_base& arg1,
838                                std::string_view arg2);
839 
840 /**
841  * @brief Formats CouldNotEstablishConnection message into JSON
842  * Message body: "The service failed to establish a connection with the URI
843  * <arg1>."
844  *
845  * @param[in] arg1 Parameter of message that will replace %1 in its body.
846  *
847  * @returns Message CouldNotEstablishConnection formatted to JSON */
848 nlohmann::json
849     couldNotEstablishConnection(const boost::urls::url_view_base& arg1);
850 
851 void couldNotEstablishConnection(crow::Response& res,
852                                  const boost::urls::url_view_base& arg1);
853 
854 /**
855  * @brief Formats SourceDoesNotSupportProtocol message into JSON
856  * Message body: "The other end of the connection at <arg1> does not support the
857  * specified protocol <arg2>."
858  *
859  * @param[in] arg1 Parameter of message that will replace %1 in its body.
860  * @param[in] arg2 Parameter of message that will replace %2 in its body.
861  *
862  * @returns Message SourceDoesNotSupportProtocol formatted to JSON */
863 nlohmann::json sourceDoesNotSupportProtocol(
864     const boost::urls::url_view_base& arg1, std::string_view arg2);
865 
866 void sourceDoesNotSupportProtocol(crow::Response& res,
867                                   const boost::urls::url_view_base& arg1,
868                                   std::string_view arg2);
869 
870 /**
871  * @brief Formats AccessDenied message into JSON
872  * Message body: "While attempting to establish a connection to <arg1>, the
873  * service denied access."
874  *
875  * @param[in] arg1 Parameter of message that will replace %1 in its body.
876  *
877  * @returns Message AccessDenied formatted to JSON */
878 nlohmann::json accessDenied(const boost::urls::url_view_base& arg1);
879 
880 void accessDenied(crow::Response& res, const boost::urls::url_view_base& arg1);
881 
882 /**
883  * @brief Formats ServiceTemporarilyUnavailable message into JSON
884  * Message body: "The service is temporarily unavailable.  Retry in <arg1>
885  * seconds."
886  *
887  * @param[in] arg1 Parameter of message that will replace %1 in its body.
888  *
889  * @returns Message ServiceTemporarilyUnavailable formatted to JSON */
890 nlohmann::json serviceTemporarilyUnavailable(std::string_view arg1);
891 
892 void serviceTemporarilyUnavailable(crow::Response& res, std::string_view arg1);
893 
894 /**
895  * @brief Formats InvalidIndex message into JSON
896  * Message body: "The index <arg1> is not a valid offset into the array."
897  *
898  * @param[in] arg1 Parameter of message that will replace %1 in its body.
899  *
900  * @returns Message InvalidIndex formatted to JSON */
901 nlohmann::json invalidIndex(uint64_t arg1);
902 
903 void invalidIndex(crow::Response& res, uint64_t arg1);
904 
905 /**
906  * @brief Formats PropertyValueModified message into JSON
907  * Message body: "The property <arg1> was assigned the value <arg2> due to
908  * modification by the service."
909  *
910  * @param[in] arg1 Parameter of message that will replace %1 in its body.
911  * @param[in] arg2 Parameter of message that will replace %2 in its body.
912  *
913  * @returns Message PropertyValueModified formatted to JSON */
914 nlohmann::json propertyValueModified(std::string_view arg1,
915                                      const nlohmann::json& arg2);
916 
917 void propertyValueModified(crow::Response& res, std::string_view arg1,
918                            const nlohmann::json& arg2);
919 
920 /**
921  * @brief Formats ResourceInStandby message into JSON
922  * Message body: "The request could not be performed because the resource is in
923  * standby."
924  *
925  *
926  * @returns Message ResourceInStandby formatted to JSON */
927 nlohmann::json resourceInStandby();
928 
929 void resourceInStandby(crow::Response& res);
930 
931 /**
932  * @brief Formats ResourceExhaustion message into JSON
933  * Message body: "The resource <arg1> was unable to satisfy the request due to
934  * unavailability of resources."
935  *
936  * @param[in] arg1 Parameter of message that will replace %1 in its body.
937  *
938  * @returns Message ResourceExhaustion formatted to JSON */
939 nlohmann::json resourceExhaustion(std::string_view arg1);
940 
941 void resourceExhaustion(crow::Response& res, std::string_view arg1);
942 
943 /**
944  * @brief Formats StringValueTooLong message into JSON
945  * Message body: "The string <arg1> exceeds the length limit <arg2>."
946  *
947  * @param[in] arg1 Parameter of message that will replace %1 in its body.
948  * @param[in] arg2 Parameter of message that will replace %2 in its body.
949  *
950  * @returns Message StringValueTooLong formatted to JSON */
951 nlohmann::json stringValueTooLong(std::string_view arg1, uint64_t arg2);
952 
953 void stringValueTooLong(crow::Response& res, std::string_view arg1,
954                         uint64_t 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