xref: /openbmc/bmcweb/features/redfish/include/error_messages.hpp (revision 66ac2b8ca5bfc8d2a3529969ee17f7e2eef2e7ff)
1 /*
2 // Copyright (c) 2018 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //      http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
16 /****************************************************************
17  * This is an auto-generated header which contains definitions
18  * to use Redfish DMTF defined messages.
19  *
20  * This header contains preprocessor defines which wrap
21  * preparation functions for message with given id. The message
22  * ids can be retrieved from Base.__ver__.json file.
23  ***************************************************************/
24 #pragma once
25 #include <nlohmann/json.hpp>
26 
27 #include "crow/http_response.h"
28 
29 namespace redfish
30 {
31 
32 namespace messages
33 {
34 
35 constexpr const char* messageVersionPrefix = "Base.1.2.0.";
36 constexpr const char* messageAnnotation = "@Message.ExtendedInfo";
37 
38 /**
39  * @brief Formats ResourceInUse message into JSON
40  * Message body: "The change to the requested resource failed because the
41  * resource is in use or in transition."
42  *
43  *
44  * @returns Message ResourceInUse formatted to JSON */
45 void resourceInUse(crow::Response& res);
46 
47 /**
48  * @brief Formats MalformedJSON message into JSON
49  * Message body: "The request body submitted was malformed JSON and could not be
50  * parsed by the receiving service."
51  *
52  *
53  * @returns Message MalformedJSON formatted to JSON */
54 void malformedJSON(crow::Response& res);
55 
56 /**
57  * @brief Formats ResourceMissingAtURI message into JSON
58  * Message body: "The resource at the URI <arg1> was not found."
59  *
60  * @param[in] arg1 Parameter of message that will replace %1 in its body.
61  *
62  * @returns Message ResourceMissingAtURI formatted to JSON */
63 void resourceMissingAtURI(crow::Response& res, const std::string& arg1);
64 
65 /**
66  * @brief Formats ActionParameterValueFormatError message into JSON
67  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
68  * is of a different format than the parameter can accept."
69  *
70  * @param[in] arg1 Parameter of message that will replace %1 in its body.
71  * @param[in] arg2 Parameter of message that will replace %2 in its body.
72  * @param[in] arg3 Parameter of message that will replace %3 in its body.
73  *
74  * @returns Message ActionParameterValueFormatError formatted to JSON */
75 void actionParameterValueFormatError(crow::Response& res,
76                                      const std::string& arg1,
77                                      const std::string& arg2,
78                                      const std::string& arg3);
79 
80 /**
81  * @brief Formats InternalError message into JSON
82  * Message body: "The request failed due to an internal service error.  The
83  * service is still operational."
84  *
85  *
86  * @returns Message InternalError formatted to JSON */
87 void internalError(crow::Response& res);
88 
89 /**
90  * @brief Formats InternalError message into JSON for the specified field
91  * Message body: "The request failed due to an internal service error.  The
92  * service is still operational."
93  *
94  *
95  * @returns Message InternalError formatted to JSON */
96 void internalError(crow::Response& res, const std::string& fieldPath);
97 
98 /**
99  * @brief Formats UnrecognizedRequestBody message into JSON
100  * Message body: "The service detected a malformed request body that it was
101  * unable to interpret."
102  *
103  *
104  * @returns Message UnrecognizedRequestBody formatted to JSON */
105 void unrecognizedRequestBody(crow::Response& res);
106 
107 /**
108  * @brief Formats ResourceAtUriUnauthorized message into JSON
109  * Message body: "While accessing the resource at <arg1>, the service received
110  * an authorization error <arg2>."
111  *
112  * @param[in] arg1 Parameter of message that will replace %1 in its body.
113  * @param[in] arg2 Parameter of message that will replace %2 in its body.
114  *
115  * @returns Message ResourceAtUriUnauthorized formatted to JSON */
116 void resourceAtUriUnauthorized(crow::Response& res, const std::string& arg1,
117                                const std::string& arg2);
118 
119 /**
120  * @brief Formats ActionParameterUnknown message into JSON
121  * Message body: "The action <arg1> was submitted with the invalid parameter
122  * <arg2>."
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 ActionParameterUnknown formatted to JSON */
128 void actionParameterUnknown(crow::Response& res, const std::string& arg1,
129                             const std::string& arg2);
130 
131 /**
132  * @brief Formats ResourceCannotBeDeleted message into JSON
133  * Message body: "The delete request failed because the resource requested
134  * cannot be deleted."
135  *
136  *
137  * @returns Message ResourceCannotBeDeleted formatted to JSON */
138 void resourceCannotBeDeleted(crow::Response& res);
139 
140 /**
141  * @brief Formats PropertyDuplicate message into JSON
142  * Message body: "The property <arg1> was duplicated in the request."
143  *
144  * @param[in] arg1 Parameter of message that will replace %1 in its body.
145  *
146  * @returns Message PropertyDuplicate formatted to JSON */
147 void propertyDuplicate(crow::Response& res, const std::string& arg1);
148 
149 /**
150  * @brief Formats ServiceTemporarilyUnavailable message into JSON
151  * Message body: "The service is temporarily unavailable.  Retry in <arg1>
152  * seconds."
153  *
154  * @param[in] arg1 Parameter of message that will replace %1 in its body.
155  *
156  * @returns Message ServiceTemporarilyUnavailable formatted to JSON */
157 void serviceTemporarilyUnavailable(crow::Response& res,
158                                    const std::string& arg1);
159 
160 /**
161  * @brief Formats ResourceAlreadyExists message into JSON
162  * Message body: "The requested resource of type <arg1> with the property <arg2>
163  * with the value <arg3> already exists."
164  *
165  * @param[in] arg1 Parameter of message that will replace %1 in its body.
166  * @param[in] arg2 Parameter of message that will replace %2 in its body.
167  * @param[in] arg3 Parameter of message that will replace %3 in its body.
168  *
169  * @returns Message ResourceAlreadyExists formatted to JSON */
170 void resourceAlreadyExists(crow::Response& res, const std::string& arg1,
171                            const std::string& arg2, const std::string& arg3);
172 
173 /**
174  * @brief Formats AccountForSessionNoLongerExists message into JSON
175  * Message body: "The account for the current session has been removed, thus the
176  * current session has been removed as well."
177  *
178  *
179  * @returns Message AccountForSessionNoLongerExists formatted to JSON */
180 void accountForSessionNoLongerExists(crow::Response& res);
181 
182 /**
183  * @brief Formats CreateFailedMissingReqProperties message into JSON
184  * Message body: "The create operation failed because the required property
185  * <arg1> was missing from the request."
186  *
187  * @param[in] arg1 Parameter of message that will replace %1 in its body.
188  *
189  * @returns Message CreateFailedMissingReqProperties formatted to JSON */
190 void createFailedMissingReqProperties(crow::Response& res,
191                                       const std::string& arg1);
192 
193 /**
194  * @brief Formats PropertyValueFormatError message into JSON
195  * Message body: "The value <arg1> for the property <arg2> is of a different
196  * format than the property can accept."
197  *
198  * @param[in] arg1 Parameter of message that will replace %1 in its body.
199  * @param[in] arg2 Parameter of message that will replace %2 in its body.
200  *
201  * @returns Message PropertyValueFormatError formatted to JSON */
202 void propertyValueFormatError(crow::Response& res, const std::string& arg1,
203                               const std::string& arg2);
204 
205 /**
206  * @brief Formats PropertyValueFormatError message into JSON for the specified
207  * property
208  * Message body: "The value <arg1> for the property <arg2> is of a different
209  * format than the property can accept."
210  *
211  * @param[in] arg1 Parameter of message that will replace %1 in its body.
212  * @param[in] arg2 Parameter of message that will replace %2 in its body.
213  *
214  * @returns Message PropertyValueFormatError formatted to JSON */
215 void propertyValueFormatError(crow::Response& res, const std::string& arg1,
216                               const std::string& arg2,
217                               const std::string property);
218 
219 /**
220  * @brief Formats PropertyValueNotInList message into JSON
221  * Message body: "The value <arg1> for the property <arg2> is not in the list of
222  * acceptable values."
223  *
224  * @param[in] arg1 Parameter of message that will replace %1 in its body.
225  * @param[in] arg2 Parameter of message that will replace %2 in its body.
226  *
227  * @returns Message PropertyValueNotInList formatted to JSON */
228 void propertyValueNotInList(crow::Response& res, const std::string& arg1,
229                             const std::string& arg2);
230 
231 /**
232  * @brief Formats PropertyValueNotInList message into JSON for the specified
233  * property
234  * Message body: "The value <arg1> for the property <arg2> is not in
235  * the list of acceptable values."
236  *
237  * @param[in] arg1 Parameter of message that will replace %1 in its body.
238  * @param[in] arg2 Parameter of message that will replace %2 in its body.
239  *
240  * @returns Message PropertyValueNotInList formatted to JSON */
241 void propertyValueNotInList(crow::Response& res, const std::string& arg1,
242                             const std::string& arg2,
243                             const std::string property);
244 
245 /**
246  * @brief Formats ResourceAtUriInUnknownFormat message into JSON
247  * Message body: "The resource at <arg1> is in a format not recognized by the
248  * service."
249  *
250  * @param[in] arg1 Parameter of message that will replace %1 in its body.
251  *
252  * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */
253 void resourceAtUriInUnknownFormat(crow::Response& res, const std::string& arg1);
254 
255 /**
256  * @brief Formats ServiceInUnknownState message into JSON
257  * Message body: "The operation failed because the service is in an unknown
258  * state and can no longer take incoming requests."
259  *
260  *
261  * @returns Message ServiceInUnknownState formatted to JSON */
262 void serviceInUnknownState(crow::Response& res);
263 
264 /**
265  * @brief Formats EventSubscriptionLimitExceeded message into JSON
266  * Message body: "The event subscription failed due to the number of
267  * simultaneous subscriptions exceeding the limit of the implementation."
268  *
269  *
270  * @returns Message EventSubscriptionLimitExceeded formatted to JSON */
271 void eventSubscriptionLimitExceeded(crow::Response& res);
272 
273 /**
274  * @brief Formats ActionParameterMissing message into JSON
275  * Message body: "The action <arg1> requires the parameter <arg2> to be present
276  * in the request body."
277  *
278  * @param[in] arg1 Parameter of message that will replace %1 in its body.
279  * @param[in] arg2 Parameter of message that will replace %2 in its body.
280  *
281  * @returns Message ActionParameterMissing formatted to JSON */
282 void actionParameterMissing(crow::Response& res, const std::string& arg1,
283                             const std::string& arg2);
284 
285 /**
286  * @brief Formats StringValueTooLong message into JSON
287  * Message body: "The string <arg1> exceeds the length limit <arg2>."
288  *
289  * @param[in] arg1 Parameter of message that will replace %1 in its body.
290  * @param[in] arg2 Parameter of message that will replace %2 in its body.
291  *
292  * @returns Message StringValueTooLong formatted to JSON */
293 void stringValueTooLong(crow::Response& res, const std::string& arg1,
294                         const int& arg2);
295 
296 /**
297  * @brief Formats PropertyValueTypeError message into JSON
298  * Message body: "The value <arg1> for the property <arg2> is of a different
299  * type than the property can accept."
300  *
301  * @param[in] arg1 Parameter of message that will replace %1 in its body.
302  * @param[in] arg2 Parameter of message that will replace %2 in its body.
303  *
304  * @returns Message PropertyValueTypeError formatted to JSON */
305 void propertyValueTypeError(crow::Response& res, const std::string& arg1,
306                             const std::string& arg2);
307 
308 /**
309  * @brief Formats PropertyValueTypeError message into JSON for the specified
310  * property
311  * Message body: "The value <arg1> for the property <arg2> is of a
312  * different type than the property can accept."
313  *
314  * @param[in] arg1 Parameter of message that will replace %1 in its body.
315  * @param[in] arg2 Parameter of message that will replace %2 in its body.
316  *
317  * @returns Message PropertyValueTypeError formatted to JSON */
318 void propertyValueTypeError(crow::Response& res, const std::string& arg1,
319                             const std::string& arg2,
320                             const std::string& property);
321 
322 /**
323  * @brief Formats ResourceNotFound message into JSON
324  * Message body: "The requested resource of type <arg1> named <arg2> was not
325  * found."
326  *
327  * @param[in] arg1 Parameter of message that will replace %1 in its body.
328  * @param[in] arg2 Parameter of message that will replace %2 in its body.
329  *
330  * @returns Message ResourceNotFound formatted to JSON */
331 void resourceNotFound(crow::Response& res, const std::string& arg1,
332                       const std::string& arg2);
333 
334 /**
335  * @brief Formats CouldNotEstablishConnection message into JSON
336  * Message body: "The service failed to establish a Connection with the URI
337  * <arg1>."
338  *
339  * @param[in] arg1 Parameter of message that will replace %1 in its body.
340  *
341  * @returns Message CouldNotEstablishConnection formatted to JSON */
342 void couldNotEstablishConnection(crow::Response& res, const std::string& arg1);
343 
344 /**
345  * @brief Formats PropertyNotWritable message into JSON
346  * Message body: "The property <arg1> is a read only property and cannot be
347  * assigned a value."
348  *
349  * @param[in] arg1 Parameter of message that will replace %1 in its body.
350  *
351  * @returns Message PropertyNotWritable formatted to JSON */
352 void propertyNotWritable(crow::Response& res, const std::string& arg1);
353 
354 /**
355  * @brief Formats PropertyNotWritable message into JSON for the specified
356  * property
357  * Message body: "The property <arg1> is a read only property and
358  * cannot be assigned a value."
359  *
360  * @param[in] arg1 Parameter of message that will replace %1 in its body.
361  *
362  * @returns Message PropertyNotWritable formatted to JSON */
363 void propertyNotWritable(crow::Response& res, const std::string& arg1,
364                          const std::string& property);
365 
366 /**
367  * @brief Formats QueryParameterValueTypeError message into JSON
368  * Message body: "The value <arg1> for the query parameter <arg2> is of a
369  * different type than the parameter can accept."
370  *
371  * @param[in] arg1 Parameter of message that will replace %1 in its body.
372  * @param[in] arg2 Parameter of message that will replace %2 in its body.
373  *
374  * @returns Message QueryParameterValueTypeError formatted to JSON */
375 void queryParameterValueTypeError(crow::Response& res, const std::string& arg1,
376                                   const std::string& arg2);
377 
378 /**
379  * @brief Formats ServiceShuttingDown message into JSON
380  * Message body: "The operation failed because the service is shutting down and
381  * can no longer take incoming requests."
382  *
383  *
384  * @returns Message ServiceShuttingDown formatted to JSON */
385 void serviceShuttingDown(crow::Response& res);
386 
387 /**
388  * @brief Formats ActionParameterDuplicate message into JSON
389  * Message body: "The action <arg1> was submitted with more than one value for
390  * the parameter <arg2>."
391  *
392  * @param[in] arg1 Parameter of message that will replace %1 in its body.
393  * @param[in] arg2 Parameter of message that will replace %2 in its body.
394  *
395  * @returns Message ActionParameterDuplicate formatted to JSON */
396 void actionParameterDuplicate(crow::Response& res, const std::string& arg1,
397                               const std::string& arg2);
398 
399 /**
400  * @brief Formats ActionParameterNotSupported message into JSON
401  * Message body: "The parameter <arg1> for the action <arg2> is not supported on
402  * the target resource."
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 ActionParameterNotSupported formatted to JSON */
408 void actionParameterNotSupported(crow::Response& res, const std::string& arg1,
409                                  const std::string& arg2);
410 
411 /**
412  * @brief Formats SourceDoesNotSupportProtocol message into JSON
413  * Message body: "The other end of the Connection at <arg1> does not support the
414  * specified protocol <arg2>."
415  *
416  * @param[in] arg1 Parameter of message that will replace %1 in its body.
417  * @param[in] arg2 Parameter of message that will replace %2 in its body.
418  *
419  * @returns Message SourceDoesNotSupportProtocol formatted to JSON */
420 void sourceDoesNotSupportProtocol(crow::Response& res, const std::string& arg1,
421                                   const std::string& arg2);
422 
423 /**
424  * @brief Formats AccountRemoved message into JSON
425  * Message body: "The account was successfully removed."
426  *
427  *
428  * @returns Message AccountRemoved formatted to JSON */
429 void accountRemoved(crow::Response& res);
430 
431 /**
432  * @brief Formats AccessDenied message into JSON
433  * Message body: "While attempting to establish a Connection to <arg1>, the
434  * service denied access."
435  *
436  * @param[in] arg1 Parameter of message that will replace %1 in its body.
437  *
438  * @returns Message AccessDenied formatted to JSON */
439 void accessDenied(crow::Response& res, const std::string& arg1);
440 
441 /**
442  * @brief Formats QueryNotSupported message into JSON
443  * Message body: "Querying is not supported by the implementation."
444  *
445  *
446  * @returns Message QueryNotSupported formatted to JSON */
447 void queryNotSupported(crow::Response& res);
448 
449 /**
450  * @brief Formats CreateLimitReachedForResource message into JSON
451  * Message body: "The create operation failed because the resource has reached
452  * the limit of possible resources."
453  *
454  *
455  * @returns Message CreateLimitReachedForResource formatted to JSON */
456 void createLimitReachedForResource(crow::Response& res);
457 
458 /**
459  * @brief Formats GeneralError message into JSON
460  * Message body: "A general error has occurred. See ExtendedInfo for more
461  * information."
462  *
463  *
464  * @returns Message GeneralError formatted to JSON */
465 void generalError(crow::Response& res);
466 
467 /**
468  * @brief Formats Success message into JSON
469  * Message body: "Successfully Completed Request"
470  *
471  *
472  * @returns Message Success formatted to JSON */
473 void success(crow::Response& res);
474 
475 /**
476  * @brief Formats Success message into JSON for the specified field
477  * Message body: "Successfully Completed Request"
478  *
479  *
480  * @returns Message Success formatted to JSON */
481 void success(crow::Response& res, const std::string& fieldPath);
482 
483 /**
484  * @brief Formats Created message into JSON
485  * Message body: "The resource has been created successfully"
486  *
487  *
488  * @returns Message Created formatted to JSON */
489 void created(crow::Response& res);
490 
491 /**
492  * @brief Formats PropertyUnknown message into JSON
493  * Message body: "The property <arg1> is not in the list of valid properties for
494  * the resource."
495  *
496  * @param[in] arg1 Parameter of message that will replace %1 in its body.
497  *
498  * @returns Message PropertyUnknown formatted to JSON */
499 void propertyUnknown(crow::Response& res, const std::string& arg1);
500 
501 /**
502  * @brief Formats PropertyUnknown message into JSON for the specified property
503  * Message body: "The property <arg1> is not in the list of valid properties for
504  * the resource."
505  *
506  * @param[in] arg1 Parameter of message that will replace %1 in its body.
507  *
508  * @returns Message PropertyUnknown formatted to JSON */
509 void propertyUnknown(crow::Response& res, const std::string& arg1,
510                      const std::string& property);
511 
512 /**
513  * @brief Formats NoValidSession message into JSON
514  * Message body: "There is no valid session established with the
515  * implementation."
516  *
517  *
518  * @returns Message NoValidSession formatted to JSON */
519 void noValidSession(crow::Response& res);
520 
521 /**
522  * @brief Formats InvalidObject message into JSON
523  * Message body: "The object at <arg1> is invalid."
524  *
525  * @param[in] arg1 Parameter of message that will replace %1 in its body.
526  *
527  * @returns Message InvalidObject formatted to JSON */
528 void invalidObject(crow::Response& res, const std::string& arg1);
529 
530 /**
531  * @brief Formats ResourceInStandby message into JSON
532  * Message body: "The request could not be performed because the resource is in
533  * standby."
534  *
535  *
536  * @returns Message ResourceInStandby formatted to JSON */
537 void resourceInStandby(crow::Response& res);
538 
539 /**
540  * @brief Formats ActionParameterValueTypeError message into JSON
541  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
542  * is of a different type than the parameter can accept."
543  *
544  * @param[in] arg1 Parameter of message that will replace %1 in its body.
545  * @param[in] arg2 Parameter of message that will replace %2 in its body.
546  * @param[in] arg3 Parameter of message that will replace %3 in its body.
547  *
548  * @returns Message ActionParameterValueTypeError formatted to JSON */
549 void actionParameterValueTypeError(crow::Response& res, const std::string& arg1,
550                                    const std::string& arg2,
551                                    const std::string& arg3);
552 
553 /**
554  * @brief Formats SessionLimitExceeded message into JSON
555  * Message body: "The session establishment failed due to the number of
556  * simultaneous sessions exceeding the limit of the implementation."
557  *
558  *
559  * @returns Message SessionLimitExceeded formatted to JSON */
560 void sessionLimitExceeded(crow::Response& res);
561 
562 /**
563  * @brief Formats ActionNotSupported message into JSON
564  * Message body: "The action <arg1> is not supported by the resource."
565  *
566  * @param[in] arg1 Parameter of message that will replace %1 in its body.
567  *
568  * @returns Message ActionNotSupported formatted to JSON */
569 void actionNotSupported(crow::Response& res, const std::string& arg1);
570 
571 /**
572  * @brief Formats InvalidIndex message into JSON
573  * Message body: "The index <arg1> is not a valid offset into the array."
574  *
575  * @param[in] arg1 Parameter of message that will replace %1 in its body.
576  *
577  * @returns Message InvalidIndex formatted to JSON */
578 void invalidIndex(crow::Response& res, const int& arg1);
579 
580 /**
581  * @brief Formats EmptyJSON message into JSON
582  * Message body: "The request body submitted contained an empty JSON object and
583  * the service is unable to process it."
584  *
585  *
586  * @returns Message EmptyJSON formatted to JSON */
587 void emptyJSON(crow::Response& res);
588 
589 /**
590  * @brief Formats QueryNotSupportedOnResource message into JSON
591  * Message body: "Querying is not supported on the requested resource."
592  *
593  *
594  * @returns Message QueryNotSupportedOnResource formatted to JSON */
595 void queryNotSupportedOnResource(crow::Response& res);
596 
597 /**
598  * @brief Formats InsufficientPrivilege message into JSON
599  * Message body: "There are insufficient privileges for the account or
600  * credentials associated with the current session to perform the requested
601  * operation."
602  *
603  *
604  * @returns Message InsufficientPrivilege formatted to JSON */
605 void insufficientPrivilege(crow::Response& res);
606 
607 /**
608  * @brief Formats PropertyValueModified message into JSON
609  * Message body: "The property <arg1> was assigned the value <arg2> due to
610  * modification by the service."
611  *
612  * @param[in] arg1 Parameter of message that will replace %1 in its body.
613  * @param[in] arg2 Parameter of message that will replace %2 in its body.
614  *
615  * @returns Message PropertyValueModified formatted to JSON */
616 void propertyValueModified(crow::Response& res, const std::string& arg1,
617                            const std::string& arg2);
618 
619 /**
620  * @brief Formats AccountNotModified message into JSON
621  * Message body: "The account modification request failed."
622  *
623  *
624  * @returns Message AccountNotModified formatted to JSON */
625 void accountNotModified(crow::Response& res);
626 
627 /**
628  * @brief Formats QueryParameterValueFormatError message into JSON
629  * Message body: "The value <arg1> for the parameter <arg2> is of a different
630  * format than the parameter can accept."
631  *
632  * @param[in] arg1 Parameter of message that will replace %1 in its body.
633  * @param[in] arg2 Parameter of message that will replace %2 in its body.
634  *
635  * @returns Message QueryParameterValueFormatError formatted to JSON */
636 void queryParameterValueFormatError(crow::Response& res,
637                                     const std::string& arg1,
638                                     const std::string& arg2);
639 
640 /**
641  * @brief Formats PropertyMissing message into JSON
642  * Message body: "The property <arg1> is a required property and must be
643  * included in the request."
644  *
645  * @param[in] arg1 Parameter of message that will replace %1 in its body.
646  *
647  * @returns Message PropertyMissing formatted to JSON */
648 void propertyMissing(crow::Response& res, const std::string& arg1);
649 
650 /**
651  * @brief Formats PropertyMissing message into JSON for the specified property
652  * Message body: "The property <arg1> is a required property and must be
653  * included in the request."
654  *
655  * @param[in] arg1 Parameter of message that will replace %1 in its body.
656  *
657  * @returns Message PropertyMissing formatted to JSON */
658 void propertyMissing(crow::Response& res, const std::string& arg1,
659                      const std::string& property);
660 
661 /**
662  * @brief Formats ResourceExhaustion message into JSON
663  * Message body: "The resource <arg1> was unable to satisfy the request due to
664  * unavailability of resources."
665  *
666  * @param[in] arg1 Parameter of message that will replace %1 in its body.
667  *
668  * @returns Message ResourceExhaustion formatted to JSON */
669 void resourceExhaustion(crow::Response& res, const std::string& arg1);
670 
671 /**
672  * @brief Formats AccountModified message into JSON
673  * Message body: "The account was successfully modified."
674  *
675  *
676  * @returns Message AccountModified formatted to JSON */
677 void accountModified(crow::Response& res, const std::string& fieldPath);
678 
679 /**
680  * @brief Formats QueryParameterOutOfRange message into JSON
681  * Message body: "The value <arg1> for the query parameter <arg2> is out of
682  * range <arg3>."
683  *
684  * @param[in] arg1 Parameter of message that will replace %1 in its body.
685  * @param[in] arg2 Parameter of message that will replace %2 in its body.
686  * @param[in] arg3 Parameter of message that will replace %3 in its body.
687  *
688  * @returns Message QueryParameterOutOfRange formatted to JSON */
689 void queryParameterOutOfRange(crow::Response& res, const std::string& arg1,
690                               const std::string& arg2, const std::string& arg3);
691 
692 } // namespace messages
693 
694 } // namespace redfish
695