xref: /openbmc/bmcweb/features/redfish/include/error_messages.hpp (revision cc9139ec3fe5e354d046d5e00f33a5e97426924e)
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 SessionTerminated message into JSON
298  * Message body: "The session was successfully terminated."
299  *
300  *
301  * @returns Message SessionTerminated formatted to JSON */
302 void sessionTerminated(crow::Response& res);
303 
304 /**
305  * @brief Formats ResourceTypeIncompatible message into JSON
306  * Message body: "The @odata.type of the request body <arg1> is incompatible
307  * with the @odata.type of the resource which is <arg2>."
308  *
309  * @param[in] arg1 Parameter of message that will replace %1 in its body.
310  * @param[in] arg2 Parameter of message that will replace %2 in its body.
311  *
312  * @returns Message ResourceTypeIncompatible formatted to JSON */
313 void resourceTypeIncompatible(crow::Response& res, const std::string& arg1,
314                               const std::string& arg2);
315 
316 /**
317  * @brief Formats PropertyValueTypeError message into JSON
318  * Message body: "The value <arg1> for the property <arg2> is of a different
319  * type than the property can accept."
320  *
321  * @param[in] arg1 Parameter of message that will replace %1 in its body.
322  * @param[in] arg2 Parameter of message that will replace %2 in its body.
323  *
324  * @returns Message PropertyValueTypeError formatted to JSON */
325 void propertyValueTypeError(crow::Response& res, const std::string& arg1,
326                             const std::string& arg2);
327 
328 /**
329  * @brief Formats PropertyValueTypeError message into JSON for the specified
330  * property
331  * Message body: "The value <arg1> for the property <arg2> is of a
332  * different type than the property can accept."
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 PropertyValueTypeError formatted to JSON */
338 void propertyValueTypeError(crow::Response& res, const std::string& arg1,
339                             const std::string& arg2,
340                             const std::string& property);
341 
342 /**
343  * @brief Formats ResourceNotFound message into JSON
344  * Message body: "The requested resource of type <arg1> named <arg2> was not
345  * found."
346  *
347  * @param[in] arg1 Parameter of message that will replace %1 in its body.
348  * @param[in] arg2 Parameter of message that will replace %2 in its body.
349  *
350  * @returns Message ResourceNotFound formatted to JSON */
351 void resourceNotFound(crow::Response& res, const std::string& arg1,
352                       const std::string& arg2);
353 
354 /**
355  * @brief Formats CouldNotEstablishConnection message into JSON
356  * Message body: "The service failed to establish a Connection with the URI
357  * <arg1>."
358  *
359  * @param[in] arg1 Parameter of message that will replace %1 in its body.
360  *
361  * @returns Message CouldNotEstablishConnection formatted to JSON */
362 void couldNotEstablishConnection(crow::Response& res, const std::string& arg1);
363 
364 /**
365  * @brief Formats PropertyNotWritable message into JSON
366  * Message body: "The property <arg1> is a read only property and cannot be
367  * assigned a value."
368  *
369  * @param[in] arg1 Parameter of message that will replace %1 in its body.
370  *
371  * @returns Message PropertyNotWritable formatted to JSON */
372 void propertyNotWritable(crow::Response& res, const std::string& arg1);
373 
374 /**
375  * @brief Formats PropertyNotWritable message into JSON for the specified
376  * property
377  * Message body: "The property <arg1> is a read only property and
378  * cannot be assigned a value."
379  *
380  * @param[in] arg1 Parameter of message that will replace %1 in its body.
381  *
382  * @returns Message PropertyNotWritable formatted to JSON */
383 void propertyNotWritable(crow::Response& res, const std::string& arg1,
384                          const std::string& property);
385 
386 /**
387  * @brief Formats QueryParameterValueTypeError message into JSON
388  * Message body: "The value <arg1> for the query parameter <arg2> is of a
389  * different type than the parameter can accept."
390  *
391  * @param[in] arg1 Parameter of message that will replace %1 in its body.
392  * @param[in] arg2 Parameter of message that will replace %2 in its body.
393  *
394  * @returns Message QueryParameterValueTypeError formatted to JSON */
395 void queryParameterValueTypeError(crow::Response& res, const std::string& arg1,
396                                   const std::string& arg2);
397 
398 /**
399  * @brief Formats ServiceShuttingDown message into JSON
400  * Message body: "The operation failed because the service is shutting down and
401  * can no longer take incoming requests."
402  *
403  *
404  * @returns Message ServiceShuttingDown formatted to JSON */
405 void serviceShuttingDown(crow::Response& res);
406 
407 /**
408  * @brief Formats ActionParameterDuplicate message into JSON
409  * Message body: "The action <arg1> was submitted with more than one value for
410  * the parameter <arg2>."
411  *
412  * @param[in] arg1 Parameter of message that will replace %1 in its body.
413  * @param[in] arg2 Parameter of message that will replace %2 in its body.
414  *
415  * @returns Message ActionParameterDuplicate formatted to JSON */
416 void actionParameterDuplicate(crow::Response& res, const std::string& arg1,
417                               const std::string& arg2);
418 
419 /**
420  * @brief Formats ActionParameterNotSupported message into JSON
421  * Message body: "The parameter <arg1> for the action <arg2> is not supported on
422  * the target resource."
423  *
424  * @param[in] arg1 Parameter of message that will replace %1 in its body.
425  * @param[in] arg2 Parameter of message that will replace %2 in its body.
426  *
427  * @returns Message ActionParameterNotSupported formatted to JSON */
428 void actionParameterNotSupported(crow::Response& res, const std::string& arg1,
429                                  const std::string& arg2);
430 
431 /**
432  * @brief Formats SourceDoesNotSupportProtocol message into JSON
433  * Message body: "The other end of the Connection at <arg1> does not support the
434  * specified protocol <arg2>."
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 SourceDoesNotSupportProtocol formatted to JSON */
440 void sourceDoesNotSupportProtocol(crow::Response& res, const std::string& arg1,
441                                   const std::string& arg2);
442 
443 /**
444  * @brief Formats AccountRemoved message into JSON
445  * Message body: "The account was successfully removed."
446  *
447  *
448  * @returns Message AccountRemoved formatted to JSON */
449 void accountRemoved(crow::Response& res);
450 
451 /**
452  * @brief Formats AccessDenied message into JSON
453  * Message body: "While attempting to establish a Connection to <arg1>, the
454  * service denied access."
455  *
456  * @param[in] arg1 Parameter of message that will replace %1 in its body.
457  *
458  * @returns Message AccessDenied formatted to JSON */
459 void accessDenied(crow::Response& res, const std::string& arg1);
460 
461 /**
462  * @brief Formats QueryNotSupported message into JSON
463  * Message body: "Querying is not supported by the implementation."
464  *
465  *
466  * @returns Message QueryNotSupported formatted to JSON */
467 void queryNotSupported(crow::Response& res);
468 
469 /**
470  * @brief Formats CreateLimitReachedForResource message into JSON
471  * Message body: "The create operation failed because the resource has reached
472  * the limit of possible resources."
473  *
474  *
475  * @returns Message CreateLimitReachedForResource formatted to JSON */
476 void createLimitReachedForResource(crow::Response& res);
477 
478 /**
479  * @brief Formats GeneralError message into JSON
480  * Message body: "A general error has occurred. See ExtendedInfo for more
481  * information."
482  *
483  *
484  * @returns Message GeneralError formatted to JSON */
485 void generalError(crow::Response& res);
486 
487 /**
488  * @brief Formats Success message into JSON
489  * Message body: "Successfully Completed Request"
490  *
491  *
492  * @returns Message Success formatted to JSON */
493 void success(crow::Response& res);
494 
495 /**
496  * @brief Formats Success message into JSON for the specified field
497  * Message body: "Successfully Completed Request"
498  *
499  *
500  * @returns Message Success formatted to JSON */
501 void success(crow::Response& res, const std::string& fieldPath);
502 
503 /**
504  * @brief Formats Created message into JSON
505  * Message body: "The resource has been created successfully"
506  *
507  *
508  * @returns Message Created formatted to JSON */
509 void created(crow::Response& res);
510 
511 /**
512  * @brief Formats NoOperation message into JSON
513  * Message body: "The request body submitted contain no data to act upon and
514  * no changes to the resource took place."
515  *
516  *
517  * @returns Message NoOperation formatted to JSON */
518 void noOperation(crow::Response& res);
519 
520 /**
521  * @brief Formats PropertyUnknown message into JSON
522  * Message body: "The property <arg1> is not in the list of valid properties for
523  * the resource."
524  *
525  * @param[in] arg1 Parameter of message that will replace %1 in its body.
526  *
527  * @returns Message PropertyUnknown formatted to JSON */
528 void propertyUnknown(crow::Response& res, const std::string& arg1);
529 
530 /**
531  * @brief Formats PropertyUnknown message into JSON for the specified property
532  * Message body: "The property <arg1> is not in the list of valid properties for
533  * the resource."
534  *
535  * @param[in] arg1 Parameter of message that will replace %1 in its body.
536  *
537  * @returns Message PropertyUnknown formatted to JSON */
538 void propertyUnknown(crow::Response& res, const std::string& arg1,
539                      const std::string& property);
540 
541 /**
542  * @brief Formats NoValidSession message into JSON
543  * Message body: "There is no valid session established with the
544  * implementation."
545  *
546  *
547  * @returns Message NoValidSession formatted to JSON */
548 void noValidSession(crow::Response& res);
549 
550 /**
551  * @brief Formats InvalidObject message into JSON
552  * Message body: "The object at <arg1> is invalid."
553  *
554  * @param[in] arg1 Parameter of message that will replace %1 in its body.
555  *
556  * @returns Message InvalidObject formatted to JSON */
557 void invalidObject(crow::Response& res, const std::string& arg1);
558 
559 /**
560  * @brief Formats ResourceInStandby message into JSON
561  * Message body: "The request could not be performed because the resource is in
562  * standby."
563  *
564  *
565  * @returns Message ResourceInStandby formatted to JSON */
566 void resourceInStandby(crow::Response& res);
567 
568 /**
569  * @brief Formats ActionParameterValueTypeError message into JSON
570  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
571  * is of a different type than the parameter can accept."
572  *
573  * @param[in] arg1 Parameter of message that will replace %1 in its body.
574  * @param[in] arg2 Parameter of message that will replace %2 in its body.
575  * @param[in] arg3 Parameter of message that will replace %3 in its body.
576  *
577  * @returns Message ActionParameterValueTypeError formatted to JSON */
578 void actionParameterValueTypeError(crow::Response& res, const std::string& arg1,
579                                    const std::string& arg2,
580                                    const std::string& arg3);
581 
582 /**
583  * @brief Formats SessionLimitExceeded message into JSON
584  * Message body: "The session establishment failed due to the number of
585  * simultaneous sessions exceeding the limit of the implementation."
586  *
587  *
588  * @returns Message SessionLimitExceeded formatted to JSON */
589 void sessionLimitExceeded(crow::Response& res);
590 
591 /**
592  * @brief Formats ActionNotSupported message into JSON
593  * Message body: "The action <arg1> is not supported by the resource."
594  *
595  * @param[in] arg1 Parameter of message that will replace %1 in its body.
596  *
597  * @returns Message ActionNotSupported formatted to JSON */
598 void actionNotSupported(crow::Response& res, const std::string& arg1);
599 
600 /**
601  * @brief Formats InvalidIndex message into JSON
602  * Message body: "The index <arg1> is not a valid offset into the array."
603  *
604  * @param[in] arg1 Parameter of message that will replace %1 in its body.
605  *
606  * @returns Message InvalidIndex formatted to JSON */
607 void invalidIndex(crow::Response& res, const int& arg1);
608 
609 /**
610  * @brief Formats EmptyJSON message into JSON
611  * Message body: "The request body submitted contained an empty JSON object and
612  * the service is unable to process it."
613  *
614  *
615  * @returns Message EmptyJSON formatted to JSON */
616 void emptyJSON(crow::Response& res);
617 
618 /**
619  * @brief Formats QueryNotSupportedOnResource message into JSON
620  * Message body: "Querying is not supported on the requested resource."
621  *
622  *
623  * @returns Message QueryNotSupportedOnResource formatted to JSON */
624 void queryNotSupportedOnResource(crow::Response& res);
625 
626 /**
627  * @brief Formats InsufficientPrivilege message into JSON
628  * Message body: "There are insufficient privileges for the account or
629  * credentials associated with the current session to perform the requested
630  * operation."
631  *
632  *
633  * @returns Message InsufficientPrivilege formatted to JSON */
634 void insufficientPrivilege(crow::Response& res);
635 
636 /**
637  * @brief Formats PropertyValueModified message into JSON
638  * Message body: "The property <arg1> was assigned the value <arg2> due to
639  * modification by the service."
640  *
641  * @param[in] arg1 Parameter of message that will replace %1 in its body.
642  * @param[in] arg2 Parameter of message that will replace %2 in its body.
643  *
644  * @returns Message PropertyValueModified formatted to JSON */
645 void propertyValueModified(crow::Response& res, const std::string& arg1,
646                            const std::string& arg2);
647 
648 /**
649  * @brief Formats AccountNotModified message into JSON
650  * Message body: "The account modification request failed."
651  *
652  *
653  * @returns Message AccountNotModified formatted to JSON */
654 void accountNotModified(crow::Response& res);
655 
656 /**
657  * @brief Formats QueryParameterValueFormatError message into JSON
658  * Message body: "The value <arg1> for the parameter <arg2> is of a different
659  * format than the parameter can accept."
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 QueryParameterValueFormatError formatted to JSON */
665 void queryParameterValueFormatError(crow::Response& res,
666                                     const std::string& arg1,
667                                     const std::string& arg2);
668 
669 /**
670  * @brief Formats PropertyMissing message into JSON
671  * Message body: "The property <arg1> is a required property and must be
672  * included in the request."
673  *
674  * @param[in] arg1 Parameter of message that will replace %1 in its body.
675  *
676  * @returns Message PropertyMissing formatted to JSON */
677 void propertyMissing(crow::Response& res, const std::string& arg1);
678 
679 /**
680  * @brief Formats PropertyMissing message into JSON for the specified property
681  * Message body: "The property <arg1> is a required property and must be
682  * included in the request."
683  *
684  * @param[in] arg1 Parameter of message that will replace %1 in its body.
685  *
686  * @returns Message PropertyMissing formatted to JSON */
687 void propertyMissing(crow::Response& res, const std::string& arg1,
688                      const std::string& property);
689 
690 /**
691  * @brief Formats ResourceExhaustion message into JSON
692  * Message body: "The resource <arg1> was unable to satisfy the request due to
693  * unavailability of resources."
694  *
695  * @param[in] arg1 Parameter of message that will replace %1 in its body.
696  *
697  * @returns Message ResourceExhaustion formatted to JSON */
698 void resourceExhaustion(crow::Response& res, const std::string& arg1);
699 
700 /**
701  * @brief Formats AccountModified message into JSON
702  * Message body: "The account was successfully modified."
703  *
704  *
705  * @returns Message AccountModified formatted to JSON */
706 void accountModified(crow::Response& res, const std::string& fieldPath);
707 
708 /**
709  * @brief Formats QueryParameterOutOfRange message into JSON
710  * Message body: "The value <arg1> for the query parameter <arg2> is out of
711  * range <arg3>."
712  *
713  * @param[in] arg1 Parameter of message that will replace %1 in its body.
714  * @param[in] arg2 Parameter of message that will replace %2 in its body.
715  * @param[in] arg3 Parameter of message that will replace %3 in its body.
716  *
717  * @returns Message QueryParameterOutOfRange formatted to JSON */
718 void queryParameterOutOfRange(crow::Response& res, const std::string& arg1,
719                               const std::string& arg2, const std::string& arg3);
720 
721 } // namespace messages
722 
723 } // namespace redfish
724