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