xref: /openbmc/bmcweb/features/redfish/include/error_messages.hpp (revision dd28ba829972906cbe2d372cf4ec00fdf82fbb83)
1f4c4dcf4SKowalski, Kamil /*
2f4c4dcf4SKowalski, Kamil // Copyright (c) 2018 Intel Corporation
3f4c4dcf4SKowalski, Kamil //
4f4c4dcf4SKowalski, Kamil // Licensed under the Apache License, Version 2.0 (the "License");
5f4c4dcf4SKowalski, Kamil // you may not use this file except in compliance with the License.
6f4c4dcf4SKowalski, Kamil // You may obtain a copy of the License at
7f4c4dcf4SKowalski, Kamil //
8f4c4dcf4SKowalski, Kamil //      http://www.apache.org/licenses/LICENSE-2.0
9f4c4dcf4SKowalski, Kamil //
10f4c4dcf4SKowalski, Kamil // Unless required by applicable law or agreed to in writing, software
11f4c4dcf4SKowalski, Kamil // distributed under the License is distributed on an "AS IS" BASIS,
12f4c4dcf4SKowalski, Kamil // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13f4c4dcf4SKowalski, Kamil // See the License for the specific language governing permissions and
14f4c4dcf4SKowalski, Kamil // limitations under the License.
15f4c4dcf4SKowalski, Kamil */
16f4c4dcf4SKowalski, Kamil /****************************************************************
17f4c4dcf4SKowalski, Kamil  * This is an auto-generated header which contains definitions
18f4c4dcf4SKowalski, Kamil  * to use Redfish DMTF defined messages.
19f4c4dcf4SKowalski, Kamil  *
20f4c4dcf4SKowalski, Kamil  * This header contains preprocessor defines which wrap
21f4c4dcf4SKowalski, Kamil  * preparation functions for message with given id. The message
22f4c4dcf4SKowalski, Kamil  * ids can be retrieved from Base.__ver__.json file.
23f4c4dcf4SKowalski, Kamil  ***************************************************************/
24f4c4dcf4SKowalski, Kamil #pragma once
25c94ad49bSEd Tanous #include "http_response.h"
26f12894f8SJason M. Bills 
271214b7e7SGunnar Mills #include <nlohmann/json.hpp>
281214b7e7SGunnar Mills 
291abe55efSEd Tanous namespace redfish
301abe55efSEd Tanous {
31f4c4dcf4SKowalski, Kamil 
321abe55efSEd Tanous namespace messages
331abe55efSEd Tanous {
34f4c4dcf4SKowalski, Kamil 
3555c7b7a2SEd Tanous constexpr const char* messageVersionPrefix = "Base.1.2.0.";
3655c7b7a2SEd Tanous constexpr const char* messageAnnotation = "@Message.ExtendedInfo";
37f4c4dcf4SKowalski, Kamil 
38f4c4dcf4SKowalski, Kamil /**
39f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceInUse message into JSON
40f4c4dcf4SKowalski, Kamil  * Message body: "The change to the requested resource failed because the
41f4c4dcf4SKowalski, Kamil  * resource is in use or in transition."
42f4c4dcf4SKowalski, Kamil  *
43f4c4dcf4SKowalski, Kamil  *
44f4c4dcf4SKowalski, Kamil  * @returns Message ResourceInUse formatted to JSON */
45b5c07418SJames Feist nlohmann::json resourceInUse(void);
46b5c07418SJames Feist 
47f12894f8SJason M. Bills void resourceInUse(crow::Response& res);
48f4c4dcf4SKowalski, Kamil 
49f4c4dcf4SKowalski, Kamil /**
50f4c4dcf4SKowalski, Kamil  * @brief Formats MalformedJSON message into JSON
51f4c4dcf4SKowalski, Kamil  * Message body: "The request body submitted was malformed JSON and could not be
52f4c4dcf4SKowalski, Kamil  * parsed by the receiving service."
53f4c4dcf4SKowalski, Kamil  *
54f4c4dcf4SKowalski, Kamil  *
55f4c4dcf4SKowalski, Kamil  * @returns Message MalformedJSON formatted to JSON */
56b5c07418SJames Feist nlohmann::json malformedJSON(void);
57b5c07418SJames Feist 
58f12894f8SJason M. Bills void malformedJSON(crow::Response& res);
59f4c4dcf4SKowalski, Kamil 
60f4c4dcf4SKowalski, Kamil /**
61f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceMissingAtURI message into JSON
6266ac2b8cSJason M. Bills  * Message body: "The resource at the URI <arg1> was not found."
63f4c4dcf4SKowalski, Kamil  *
64f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
65f4c4dcf4SKowalski, Kamil  *
66f4c4dcf4SKowalski, Kamil  * @returns Message ResourceMissingAtURI formatted to JSON */
67b5c07418SJames Feist nlohmann::json resourceMissingAtURI(const std::string& arg1);
68b5c07418SJames Feist 
69f12894f8SJason M. Bills void resourceMissingAtURI(crow::Response& res, const std::string& arg1);
70f4c4dcf4SKowalski, Kamil 
71f4c4dcf4SKowalski, Kamil /**
72f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterValueFormatError message into JSON
7366ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
74f4c4dcf4SKowalski, Kamil  * is of a different format than the parameter can accept."
75f4c4dcf4SKowalski, Kamil  *
76f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
77f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
78f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
79f4c4dcf4SKowalski, Kamil  *
80f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterValueFormatError formatted to JSON */
81b5c07418SJames Feist nlohmann::json actionParameterValueFormatError(const std::string& arg1,
82b5c07418SJames Feist                                                const std::string& arg2,
83b5c07418SJames Feist                                                const std::string& arg3);
84b5c07418SJames Feist 
85f12894f8SJason M. Bills void actionParameterValueFormatError(crow::Response& res,
86f12894f8SJason M. Bills                                      const std::string& arg1,
87f4c4dcf4SKowalski, Kamil                                      const std::string& arg2,
88f4c4dcf4SKowalski, Kamil                                      const std::string& arg3);
89f4c4dcf4SKowalski, Kamil 
90f4c4dcf4SKowalski, Kamil /**
91f4c4dcf4SKowalski, Kamil  * @brief Formats InternalError message into JSON
92f4c4dcf4SKowalski, Kamil  * Message body: "The request failed due to an internal service error.  The
93f4c4dcf4SKowalski, Kamil  * service is still operational."
94f4c4dcf4SKowalski, Kamil  *
95f4c4dcf4SKowalski, Kamil  *
96f4c4dcf4SKowalski, Kamil  * @returns Message InternalError formatted to JSON */
97b5c07418SJames Feist nlohmann::json internalError(void);
98b5c07418SJames Feist 
99f12894f8SJason M. Bills void internalError(crow::Response& res);
100f12894f8SJason M. Bills 
101f12894f8SJason M. Bills /**
102f4c4dcf4SKowalski, Kamil  * @brief Formats UnrecognizedRequestBody message into JSON
103f4c4dcf4SKowalski, Kamil  * Message body: "The service detected a malformed request body that it was
104f4c4dcf4SKowalski, Kamil  * unable to interpret."
105f4c4dcf4SKowalski, Kamil  *
106f4c4dcf4SKowalski, Kamil  *
107f4c4dcf4SKowalski, Kamil  * @returns Message UnrecognizedRequestBody formatted to JSON */
108b5c07418SJames Feist nlohmann::json unrecognizedRequestBody(void);
109b5c07418SJames Feist 
110f12894f8SJason M. Bills void unrecognizedRequestBody(crow::Response& res);
111f4c4dcf4SKowalski, Kamil 
112f4c4dcf4SKowalski, Kamil /**
113f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceAtUriUnauthorized message into JSON
11466ac2b8cSJason M. Bills  * Message body: "While accessing the resource at <arg1>, the service received
11566ac2b8cSJason M. Bills  * an authorization error <arg2>."
116f4c4dcf4SKowalski, Kamil  *
117f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
118f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
119f4c4dcf4SKowalski, Kamil  *
120f4c4dcf4SKowalski, Kamil  * @returns Message ResourceAtUriUnauthorized formatted to JSON */
121b5c07418SJames Feist nlohmann::json resourceAtUriUnauthorized(const std::string& arg1,
122b5c07418SJames Feist                                          const std::string& arg2);
123b5c07418SJames Feist 
124f12894f8SJason M. Bills void resourceAtUriUnauthorized(crow::Response& res, const std::string& arg1,
125f4c4dcf4SKowalski, Kamil                                const std::string& arg2);
126f4c4dcf4SKowalski, Kamil 
127f4c4dcf4SKowalski, Kamil /**
128f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterUnknown message into JSON
12966ac2b8cSJason M. Bills  * Message body: "The action <arg1> was submitted with the invalid parameter
13066ac2b8cSJason M. Bills  * <arg2>."
131f4c4dcf4SKowalski, Kamil  *
132f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
133f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
134f4c4dcf4SKowalski, Kamil  *
135f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterUnknown formatted to JSON */
136b5c07418SJames Feist nlohmann::json actionParameterUnknown(const std::string& arg1,
137b5c07418SJames Feist                                       const std::string& arg2);
138b5c07418SJames Feist 
139f12894f8SJason M. Bills void actionParameterUnknown(crow::Response& res, const std::string& arg1,
140f4c4dcf4SKowalski, Kamil                             const std::string& arg2);
141f4c4dcf4SKowalski, Kamil 
142f4c4dcf4SKowalski, Kamil /**
143f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceCannotBeDeleted message into JSON
144f4c4dcf4SKowalski, Kamil  * Message body: "The delete request failed because the resource requested
145f4c4dcf4SKowalski, Kamil  * cannot be deleted."
146f4c4dcf4SKowalski, Kamil  *
147f4c4dcf4SKowalski, Kamil  *
148f4c4dcf4SKowalski, Kamil  * @returns Message ResourceCannotBeDeleted formatted to JSON */
149b5c07418SJames Feist nlohmann::json resourceCannotBeDeleted(void);
150b5c07418SJames Feist 
151f12894f8SJason M. Bills void resourceCannotBeDeleted(crow::Response& res);
152f4c4dcf4SKowalski, Kamil 
153f4c4dcf4SKowalski, Kamil /**
154f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyDuplicate message into JSON
15566ac2b8cSJason M. Bills  * Message body: "The property <arg1> was duplicated in the request."
156f4c4dcf4SKowalski, Kamil  *
157f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
158f4c4dcf4SKowalski, Kamil  *
159f4c4dcf4SKowalski, Kamil  * @returns Message PropertyDuplicate formatted to JSON */
160b5c07418SJames Feist nlohmann::json propertyDuplicate(const std::string& arg1);
161b5c07418SJames Feist 
162f12894f8SJason M. Bills void propertyDuplicate(crow::Response& res, const std::string& arg1);
163f4c4dcf4SKowalski, Kamil 
164f4c4dcf4SKowalski, Kamil /**
165f4c4dcf4SKowalski, Kamil  * @brief Formats ServiceTemporarilyUnavailable message into JSON
16666ac2b8cSJason M. Bills  * Message body: "The service is temporarily unavailable.  Retry in <arg1>
167f4c4dcf4SKowalski, Kamil  * seconds."
168f4c4dcf4SKowalski, Kamil  *
169f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
170f4c4dcf4SKowalski, Kamil  *
171f4c4dcf4SKowalski, Kamil  * @returns Message ServiceTemporarilyUnavailable formatted to JSON */
172b5c07418SJames Feist nlohmann::json serviceTemporarilyUnavailable(const std::string& arg1);
173b5c07418SJames Feist 
174f12894f8SJason M. Bills void serviceTemporarilyUnavailable(crow::Response& res,
175f12894f8SJason M. Bills                                    const std::string& arg1);
176f4c4dcf4SKowalski, Kamil 
177f4c4dcf4SKowalski, Kamil /**
178f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceAlreadyExists message into JSON
17966ac2b8cSJason M. Bills  * Message body: "The requested resource of type <arg1> with the property <arg2>
18066ac2b8cSJason M. Bills  * with the value <arg3> already exists."
181f4c4dcf4SKowalski, Kamil  *
182f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
183f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
184f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
185f4c4dcf4SKowalski, Kamil  *
186f4c4dcf4SKowalski, Kamil  * @returns Message ResourceAlreadyExists formatted to JSON */
187b5c07418SJames Feist nlohmann::json resourceAlreadyExists(const std::string& arg1,
188b5c07418SJames Feist                                      const std::string& arg2,
189b5c07418SJames Feist                                      const std::string& arg3);
190b5c07418SJames Feist 
191f12894f8SJason M. Bills void resourceAlreadyExists(crow::Response& res, const std::string& arg1,
192f12894f8SJason M. Bills                            const std::string& arg2, const std::string& arg3);
193f4c4dcf4SKowalski, Kamil 
194f4c4dcf4SKowalski, Kamil /**
195f4c4dcf4SKowalski, Kamil  * @brief Formats AccountForSessionNoLongerExists message into JSON
196f4c4dcf4SKowalski, Kamil  * Message body: "The account for the current session has been removed, thus the
197f4c4dcf4SKowalski, Kamil  * current session has been removed as well."
198f4c4dcf4SKowalski, Kamil  *
199f4c4dcf4SKowalski, Kamil  *
200f4c4dcf4SKowalski, Kamil  * @returns Message AccountForSessionNoLongerExists formatted to JSON */
201b5c07418SJames Feist nlohmann::json accountForSessionNoLongerExists(void);
202b5c07418SJames Feist 
203f12894f8SJason M. Bills void accountForSessionNoLongerExists(crow::Response& res);
204f4c4dcf4SKowalski, Kamil 
205f4c4dcf4SKowalski, Kamil /**
206f4c4dcf4SKowalski, Kamil  * @brief Formats CreateFailedMissingReqProperties message into JSON
207f4c4dcf4SKowalski, Kamil  * Message body: "The create operation failed because the required property
20866ac2b8cSJason M. Bills  * <arg1> was missing from the request."
209f4c4dcf4SKowalski, Kamil  *
210f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
211f4c4dcf4SKowalski, Kamil  *
212f4c4dcf4SKowalski, Kamil  * @returns Message CreateFailedMissingReqProperties formatted to JSON */
213b5c07418SJames Feist nlohmann::json createFailedMissingReqProperties(const std::string& arg1);
214b5c07418SJames Feist 
215f12894f8SJason M. Bills void createFailedMissingReqProperties(crow::Response& res,
216f12894f8SJason M. Bills                                       const std::string& arg1);
217f4c4dcf4SKowalski, Kamil 
218f4c4dcf4SKowalski, Kamil /**
219f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueFormatError message into JSON
22066ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the property <arg2> is of a different
221f4c4dcf4SKowalski, Kamil  * format than the property can accept."
222f4c4dcf4SKowalski, Kamil  *
223f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
224f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
225f4c4dcf4SKowalski, Kamil  *
226f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueFormatError formatted to JSON */
227b5c07418SJames Feist nlohmann::json propertyValueFormatError(const std::string& arg1,
228b5c07418SJames Feist                                         const std::string& arg2);
229b5c07418SJames Feist 
230f12894f8SJason M. Bills void propertyValueFormatError(crow::Response& res, const std::string& arg1,
231f4c4dcf4SKowalski, Kamil                               const std::string& arg2);
232f4c4dcf4SKowalski, Kamil 
233f4c4dcf4SKowalski, Kamil /**
234f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueNotInList message into JSON
23566ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the property <arg2> is not in the list of
236f4c4dcf4SKowalski, Kamil  * acceptable values."
237f4c4dcf4SKowalski, Kamil  *
238f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
239f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
240f4c4dcf4SKowalski, Kamil  *
241f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueNotInList formatted to JSON */
242b5c07418SJames Feist nlohmann::json propertyValueNotInList(const std::string& arg1,
243b5c07418SJames Feist                                       const std::string& arg2);
244b5c07418SJames Feist 
245f12894f8SJason M. Bills void propertyValueNotInList(crow::Response& res, const std::string& arg1,
246f4c4dcf4SKowalski, Kamil                             const std::string& arg2);
247f4c4dcf4SKowalski, Kamil 
248f4c4dcf4SKowalski, Kamil /**
249f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceAtUriInUnknownFormat message into JSON
25066ac2b8cSJason M. Bills  * Message body: "The resource at <arg1> is in a format not recognized by the
251f4c4dcf4SKowalski, Kamil  * service."
252f4c4dcf4SKowalski, Kamil  *
253f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
254f4c4dcf4SKowalski, Kamil  *
255f4c4dcf4SKowalski, Kamil  * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */
256b5c07418SJames Feist nlohmann::json resourceAtUriInUnknownFormat(const std::string& arg1);
257b5c07418SJames Feist 
258f12894f8SJason M. Bills void resourceAtUriInUnknownFormat(crow::Response& res, const std::string& arg1);
259f4c4dcf4SKowalski, Kamil 
260f4c4dcf4SKowalski, Kamil /**
261f4c4dcf4SKowalski, Kamil  * @brief Formats ServiceInUnknownState message into JSON
262f4c4dcf4SKowalski, Kamil  * Message body: "The operation failed because the service is in an unknown
263f4c4dcf4SKowalski, Kamil  * state and can no longer take incoming requests."
264f4c4dcf4SKowalski, Kamil  *
265f4c4dcf4SKowalski, Kamil  *
266f4c4dcf4SKowalski, Kamil  * @returns Message ServiceInUnknownState formatted to JSON */
267b5c07418SJames Feist nlohmann::json serviceInUnknownState(void);
268b5c07418SJames Feist 
269f12894f8SJason M. Bills void serviceInUnknownState(crow::Response& res);
270f4c4dcf4SKowalski, Kamil 
271f4c4dcf4SKowalski, Kamil /**
272f4c4dcf4SKowalski, Kamil  * @brief Formats EventSubscriptionLimitExceeded message into JSON
273f4c4dcf4SKowalski, Kamil  * Message body: "The event subscription failed due to the number of
274f4c4dcf4SKowalski, Kamil  * simultaneous subscriptions exceeding the limit of the implementation."
275f4c4dcf4SKowalski, Kamil  *
276f4c4dcf4SKowalski, Kamil  *
277f4c4dcf4SKowalski, Kamil  * @returns Message EventSubscriptionLimitExceeded formatted to JSON */
278b5c07418SJames Feist nlohmann::json eventSubscriptionLimitExceeded(void);
279b5c07418SJames Feist 
280f12894f8SJason M. Bills void eventSubscriptionLimitExceeded(crow::Response& res);
281f4c4dcf4SKowalski, Kamil 
282f4c4dcf4SKowalski, Kamil /**
283f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterMissing message into JSON
28466ac2b8cSJason M. Bills  * Message body: "The action <arg1> requires the parameter <arg2> to be present
285f4c4dcf4SKowalski, Kamil  * in the request body."
286f4c4dcf4SKowalski, Kamil  *
287f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
288f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
289f4c4dcf4SKowalski, Kamil  *
290f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterMissing formatted to JSON */
291b5c07418SJames Feist nlohmann::json actionParameterMissing(const std::string& arg1,
292b5c07418SJames Feist                                       const std::string& arg2);
293b5c07418SJames Feist 
294f12894f8SJason M. Bills void actionParameterMissing(crow::Response& res, const std::string& arg1,
295f4c4dcf4SKowalski, Kamil                             const std::string& arg2);
296f4c4dcf4SKowalski, Kamil 
297f4c4dcf4SKowalski, Kamil /**
298f4c4dcf4SKowalski, Kamil  * @brief Formats StringValueTooLong message into JSON
29966ac2b8cSJason M. Bills  * Message body: "The string <arg1> exceeds the length limit <arg2>."
300f4c4dcf4SKowalski, Kamil  *
301f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
302f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
303f4c4dcf4SKowalski, Kamil  *
304f4c4dcf4SKowalski, Kamil  * @returns Message StringValueTooLong formatted to JSON */
305b5c07418SJames Feist nlohmann::json stringValueTooLong(const std::string& arg1, const int& arg2);
306b5c07418SJames Feist 
307f12894f8SJason M. Bills void stringValueTooLong(crow::Response& res, const std::string& arg1,
308f12894f8SJason M. Bills                         const int& arg2);
309f4c4dcf4SKowalski, Kamil 
310f4c4dcf4SKowalski, Kamil /**
311cc9139ecSJason M. Bills  * @brief Formats SessionTerminated message into JSON
312cc9139ecSJason M. Bills  * Message body: "The session was successfully terminated."
313cc9139ecSJason M. Bills  *
314cc9139ecSJason M. Bills  *
315cc9139ecSJason M. Bills  * @returns Message SessionTerminated formatted to JSON */
316b5c07418SJames Feist nlohmann::json sessionTerminated(void);
317b5c07418SJames Feist 
318cc9139ecSJason M. Bills void sessionTerminated(crow::Response& res);
319cc9139ecSJason M. Bills 
320cc9139ecSJason M. Bills /**
321cc9139ecSJason M. Bills  * @brief Formats ResourceTypeIncompatible message into JSON
322cc9139ecSJason M. Bills  * Message body: "The @odata.type of the request body <arg1> is incompatible
323cc9139ecSJason M. Bills  * with the @odata.type of the resource which is <arg2>."
324cc9139ecSJason M. Bills  *
325cc9139ecSJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
326cc9139ecSJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
327cc9139ecSJason M. Bills  *
328cc9139ecSJason M. Bills  * @returns Message ResourceTypeIncompatible formatted to JSON */
329b5c07418SJames Feist nlohmann::json resourceTypeIncompatible(const std::string& arg1,
330b5c07418SJames Feist                                         const std::string& arg2);
331b5c07418SJames Feist 
332cc9139ecSJason M. Bills void resourceTypeIncompatible(crow::Response& res, const std::string& arg1,
333cc9139ecSJason M. Bills                               const std::string& arg2);
334cc9139ecSJason M. Bills 
335cc9139ecSJason M. Bills /**
336f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueTypeError message into JSON
33766ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the property <arg2> is of a different
338f4c4dcf4SKowalski, Kamil  * type than the property can accept."
339f4c4dcf4SKowalski, Kamil  *
340f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
341f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
342f4c4dcf4SKowalski, Kamil  *
343f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueTypeError formatted to JSON */
344b5c07418SJames Feist nlohmann::json propertyValueTypeError(const std::string& arg1,
345b5c07418SJames Feist                                       const std::string& arg2);
346b5c07418SJames Feist 
347f12894f8SJason M. Bills void propertyValueTypeError(crow::Response& res, const std::string& arg1,
348f4c4dcf4SKowalski, Kamil                             const std::string& arg2);
349f4c4dcf4SKowalski, Kamil 
350f4c4dcf4SKowalski, Kamil /**
351f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceNotFound message into JSON
35266ac2b8cSJason M. Bills  * Message body: "The requested resource of type <arg1> named <arg2> was not
353f4c4dcf4SKowalski, Kamil  * found."
354f4c4dcf4SKowalski, Kamil  *
355f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
356f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
357f4c4dcf4SKowalski, Kamil  *
358f4c4dcf4SKowalski, Kamil  * @returns Message ResourceNotFound formatted to JSON */
359b5c07418SJames Feist nlohmann::json resourceNotFound(const std::string& arg1,
360b5c07418SJames Feist                                 const std::string& arg2);
361b5c07418SJames Feist 
362f12894f8SJason M. Bills void resourceNotFound(crow::Response& res, const std::string& arg1,
363f4c4dcf4SKowalski, Kamil                       const std::string& arg2);
364f4c4dcf4SKowalski, Kamil 
365f4c4dcf4SKowalski, Kamil /**
366f4c4dcf4SKowalski, Kamil  * @brief Formats CouldNotEstablishConnection message into JSON
36755c7b7a2SEd Tanous  * Message body: "The service failed to establish a Connection with the URI
36866ac2b8cSJason M. Bills  * <arg1>."
369f4c4dcf4SKowalski, Kamil  *
370f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
371f4c4dcf4SKowalski, Kamil  *
372f4c4dcf4SKowalski, Kamil  * @returns Message CouldNotEstablishConnection formatted to JSON */
373b5c07418SJames Feist nlohmann::json couldNotEstablishConnection(const std::string& arg1);
374b5c07418SJames Feist 
375f12894f8SJason M. Bills void couldNotEstablishConnection(crow::Response& res, const std::string& arg1);
376f4c4dcf4SKowalski, Kamil 
377f4c4dcf4SKowalski, Kamil /**
378f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyNotWritable message into JSON
37966ac2b8cSJason M. Bills  * Message body: "The property <arg1> is a read only property and cannot be
380f4c4dcf4SKowalski, Kamil  * assigned a value."
381f4c4dcf4SKowalski, Kamil  *
382f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
383f4c4dcf4SKowalski, Kamil  *
384f4c4dcf4SKowalski, Kamil  * @returns Message PropertyNotWritable formatted to JSON */
385b5c07418SJames Feist nlohmann::json propertyNotWritable(const std::string& arg1);
386b5c07418SJames Feist 
387f12894f8SJason M. Bills void propertyNotWritable(crow::Response& res, const std::string& arg1);
388f12894f8SJason M. Bills 
389f12894f8SJason M. Bills /**
390f4c4dcf4SKowalski, Kamil  * @brief Formats QueryParameterValueTypeError message into JSON
39166ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the query parameter <arg2> is of a
392f4c4dcf4SKowalski, Kamil  * different type than the parameter can accept."
393f4c4dcf4SKowalski, Kamil  *
394f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
395f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
396f4c4dcf4SKowalski, Kamil  *
397f4c4dcf4SKowalski, Kamil  * @returns Message QueryParameterValueTypeError formatted to JSON */
398b5c07418SJames Feist nlohmann::json queryParameterValueTypeError(const std::string& arg1,
399b5c07418SJames Feist                                             const std::string& arg2);
400b5c07418SJames Feist 
401f12894f8SJason M. Bills void queryParameterValueTypeError(crow::Response& res, const std::string& arg1,
402f4c4dcf4SKowalski, Kamil                                   const std::string& arg2);
403f4c4dcf4SKowalski, Kamil 
404f4c4dcf4SKowalski, Kamil /**
405f4c4dcf4SKowalski, Kamil  * @brief Formats ServiceShuttingDown message into JSON
406f4c4dcf4SKowalski, Kamil  * Message body: "The operation failed because the service is shutting down and
407f4c4dcf4SKowalski, Kamil  * can no longer take incoming requests."
408f4c4dcf4SKowalski, Kamil  *
409f4c4dcf4SKowalski, Kamil  *
410f4c4dcf4SKowalski, Kamil  * @returns Message ServiceShuttingDown formatted to JSON */
411b5c07418SJames Feist nlohmann::json serviceShuttingDown(void);
412b5c07418SJames Feist 
413f12894f8SJason M. Bills void serviceShuttingDown(crow::Response& res);
414f4c4dcf4SKowalski, Kamil 
415f4c4dcf4SKowalski, Kamil /**
416f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterDuplicate message into JSON
41766ac2b8cSJason M. Bills  * Message body: "The action <arg1> was submitted with more than one value for
41866ac2b8cSJason M. Bills  * the parameter <arg2>."
419f4c4dcf4SKowalski, Kamil  *
420f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
421f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
422f4c4dcf4SKowalski, Kamil  *
423f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterDuplicate formatted to JSON */
424b5c07418SJames Feist nlohmann::json actionParameterDuplicate(const std::string& arg1,
425b5c07418SJames Feist                                         const std::string& arg2);
426b5c07418SJames Feist 
427f12894f8SJason M. Bills void actionParameterDuplicate(crow::Response& res, const std::string& arg1,
428f4c4dcf4SKowalski, Kamil                               const std::string& arg2);
429f4c4dcf4SKowalski, Kamil 
430f4c4dcf4SKowalski, Kamil /**
431f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterNotSupported message into JSON
43266ac2b8cSJason M. Bills  * Message body: "The parameter <arg1> for the action <arg2> is not supported on
433f4c4dcf4SKowalski, Kamil  * the target resource."
434f4c4dcf4SKowalski, Kamil  *
435f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
436f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
437f4c4dcf4SKowalski, Kamil  *
438f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterNotSupported formatted to JSON */
439b5c07418SJames Feist nlohmann::json actionParameterNotSupported(const std::string& arg1,
440b5c07418SJames Feist                                            const std::string& arg2);
441b5c07418SJames Feist 
442f12894f8SJason M. Bills void actionParameterNotSupported(crow::Response& res, const std::string& arg1,
443f4c4dcf4SKowalski, Kamil                                  const std::string& arg2);
444f4c4dcf4SKowalski, Kamil 
445f4c4dcf4SKowalski, Kamil /**
446f4c4dcf4SKowalski, Kamil  * @brief Formats SourceDoesNotSupportProtocol message into JSON
44766ac2b8cSJason M. Bills  * Message body: "The other end of the Connection at <arg1> does not support the
44866ac2b8cSJason M. Bills  * specified protocol <arg2>."
449f4c4dcf4SKowalski, Kamil  *
450f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
451f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
452f4c4dcf4SKowalski, Kamil  *
453f4c4dcf4SKowalski, Kamil  * @returns Message SourceDoesNotSupportProtocol formatted to JSON */
454b5c07418SJames Feist nlohmann::json sourceDoesNotSupportProtocol(const std::string& arg1,
455b5c07418SJames Feist                                             const std::string& arg2);
456b5c07418SJames Feist 
457f12894f8SJason M. Bills void sourceDoesNotSupportProtocol(crow::Response& res, const std::string& arg1,
458f4c4dcf4SKowalski, Kamil                                   const std::string& arg2);
459f4c4dcf4SKowalski, Kamil 
460f4c4dcf4SKowalski, Kamil /**
461f4c4dcf4SKowalski, Kamil  * @brief Formats AccountRemoved message into JSON
462f4c4dcf4SKowalski, Kamil  * Message body: "The account was successfully removed."
463f4c4dcf4SKowalski, Kamil  *
464f4c4dcf4SKowalski, Kamil  *
465f4c4dcf4SKowalski, Kamil  * @returns Message AccountRemoved formatted to JSON */
466b5c07418SJames Feist nlohmann::json accountRemoved(void);
467b5c07418SJames Feist 
468f12894f8SJason M. Bills void accountRemoved(crow::Response& res);
469f4c4dcf4SKowalski, Kamil 
470f4c4dcf4SKowalski, Kamil /**
471f4c4dcf4SKowalski, Kamil  * @brief Formats AccessDenied message into JSON
47266ac2b8cSJason M. Bills  * Message body: "While attempting to establish a Connection to <arg1>, the
473f4c4dcf4SKowalski, Kamil  * service denied access."
474f4c4dcf4SKowalski, Kamil  *
475f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
476f4c4dcf4SKowalski, Kamil  *
477f4c4dcf4SKowalski, Kamil  * @returns Message AccessDenied formatted to JSON */
478b5c07418SJames Feist nlohmann::json accessDenied(const std::string& arg1);
479b5c07418SJames Feist 
480f12894f8SJason M. Bills void accessDenied(crow::Response& res, const std::string& arg1);
481f4c4dcf4SKowalski, Kamil 
482f4c4dcf4SKowalski, Kamil /**
483f4c4dcf4SKowalski, Kamil  * @brief Formats QueryNotSupported message into JSON
484f4c4dcf4SKowalski, Kamil  * Message body: "Querying is not supported by the implementation."
485f4c4dcf4SKowalski, Kamil  *
486f4c4dcf4SKowalski, Kamil  *
487f4c4dcf4SKowalski, Kamil  * @returns Message QueryNotSupported formatted to JSON */
488b5c07418SJames Feist nlohmann::json queryNotSupported(void);
489b5c07418SJames Feist 
490f12894f8SJason M. Bills void queryNotSupported(crow::Response& res);
491f4c4dcf4SKowalski, Kamil 
492f4c4dcf4SKowalski, Kamil /**
493f4c4dcf4SKowalski, Kamil  * @brief Formats CreateLimitReachedForResource message into JSON
494f4c4dcf4SKowalski, Kamil  * Message body: "The create operation failed because the resource has reached
495f4c4dcf4SKowalski, Kamil  * the limit of possible resources."
496f4c4dcf4SKowalski, Kamil  *
497f4c4dcf4SKowalski, Kamil  *
498f4c4dcf4SKowalski, Kamil  * @returns Message CreateLimitReachedForResource formatted to JSON */
499b5c07418SJames Feist nlohmann::json createLimitReachedForResource(void);
500b5c07418SJames Feist 
501f12894f8SJason M. Bills void createLimitReachedForResource(crow::Response& res);
502f4c4dcf4SKowalski, Kamil 
503f4c4dcf4SKowalski, Kamil /**
504f4c4dcf4SKowalski, Kamil  * @brief Formats GeneralError message into JSON
505f4c4dcf4SKowalski, Kamil  * Message body: "A general error has occurred. See ExtendedInfo for more
506f4c4dcf4SKowalski, Kamil  * information."
507f4c4dcf4SKowalski, Kamil  *
508f4c4dcf4SKowalski, Kamil  *
509f4c4dcf4SKowalski, Kamil  * @returns Message GeneralError formatted to JSON */
510b5c07418SJames Feist nlohmann::json generalError(void);
511b5c07418SJames Feist 
512f12894f8SJason M. Bills void generalError(crow::Response& res);
513f4c4dcf4SKowalski, Kamil 
514f4c4dcf4SKowalski, Kamil /**
515f4c4dcf4SKowalski, Kamil  * @brief Formats Success message into JSON
516f4c4dcf4SKowalski, Kamil  * Message body: "Successfully Completed Request"
517f4c4dcf4SKowalski, Kamil  *
518f4c4dcf4SKowalski, Kamil  *
519f4c4dcf4SKowalski, Kamil  * @returns Message Success formatted to JSON */
520b5c07418SJames Feist nlohmann::json success(void);
521b5c07418SJames Feist 
522f12894f8SJason M. Bills void success(crow::Response& res);
523f12894f8SJason M. Bills 
524f12894f8SJason M. Bills /**
525f4c4dcf4SKowalski, Kamil  * @brief Formats Created message into JSON
526f4c4dcf4SKowalski, Kamil  * Message body: "The resource has been created successfully"
527f4c4dcf4SKowalski, Kamil  *
528f4c4dcf4SKowalski, Kamil  *
529f4c4dcf4SKowalski, Kamil  * @returns Message Created formatted to JSON */
530b5c07418SJames Feist nlohmann::json created(void);
531b5c07418SJames Feist 
532f12894f8SJason M. Bills void created(crow::Response& res);
533f4c4dcf4SKowalski, Kamil 
534f4c4dcf4SKowalski, Kamil /**
535cc9139ecSJason M. Bills  * @brief Formats NoOperation message into JSON
536cc9139ecSJason M. Bills  * Message body: "The request body submitted contain no data to act upon and
537cc9139ecSJason M. Bills  * no changes to the resource took place."
538cc9139ecSJason M. Bills  *
539cc9139ecSJason M. Bills  *
540cc9139ecSJason M. Bills  * @returns Message NoOperation formatted to JSON */
541b5c07418SJames Feist nlohmann::json noOperation(void);
542b5c07418SJames Feist 
543cc9139ecSJason M. Bills void noOperation(crow::Response& res);
544cc9139ecSJason M. Bills 
545cc9139ecSJason M. Bills /**
546f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyUnknown message into JSON
54766ac2b8cSJason M. Bills  * Message body: "The property <arg1> is not in the list of valid properties for
548f4c4dcf4SKowalski, Kamil  * the resource."
549f4c4dcf4SKowalski, Kamil  *
550f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
551f4c4dcf4SKowalski, Kamil  *
552f4c4dcf4SKowalski, Kamil  * @returns Message PropertyUnknown formatted to JSON */
553b5c07418SJames Feist nlohmann::json propertyUnknown(const std::string& arg1);
554b5c07418SJames Feist 
555f12894f8SJason M. Bills void propertyUnknown(crow::Response& res, const std::string& arg1);
556f12894f8SJason M. Bills 
557f12894f8SJason M. Bills /**
558f4c4dcf4SKowalski, Kamil  * @brief Formats NoValidSession message into JSON
559f4c4dcf4SKowalski, Kamil  * Message body: "There is no valid session established with the
560f4c4dcf4SKowalski, Kamil  * implementation."
561f4c4dcf4SKowalski, Kamil  *
562f4c4dcf4SKowalski, Kamil  *
563f4c4dcf4SKowalski, Kamil  * @returns Message NoValidSession formatted to JSON */
564b5c07418SJames Feist nlohmann::json noValidSession(void);
565b5c07418SJames Feist 
566f12894f8SJason M. Bills void noValidSession(crow::Response& res);
567f4c4dcf4SKowalski, Kamil 
568f4c4dcf4SKowalski, Kamil /**
569f4c4dcf4SKowalski, Kamil  * @brief Formats InvalidObject message into JSON
57066ac2b8cSJason M. Bills  * Message body: "The object at <arg1> is invalid."
571f4c4dcf4SKowalski, Kamil  *
572f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
573f4c4dcf4SKowalski, Kamil  *
574f4c4dcf4SKowalski, Kamil  * @returns Message InvalidObject formatted to JSON */
575b5c07418SJames Feist nlohmann::json invalidObject(const std::string& arg1);
576b5c07418SJames Feist 
577f12894f8SJason M. Bills void invalidObject(crow::Response& res, const std::string& arg1);
578f4c4dcf4SKowalski, Kamil 
579f4c4dcf4SKowalski, Kamil /**
580f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceInStandby message into JSON
581f4c4dcf4SKowalski, Kamil  * Message body: "The request could not be performed because the resource is in
582f4c4dcf4SKowalski, Kamil  * standby."
583f4c4dcf4SKowalski, Kamil  *
584f4c4dcf4SKowalski, Kamil  *
585f4c4dcf4SKowalski, Kamil  * @returns Message ResourceInStandby formatted to JSON */
586b5c07418SJames Feist nlohmann::json resourceInStandby(void);
587b5c07418SJames Feist 
588f12894f8SJason M. Bills void resourceInStandby(crow::Response& res);
589f4c4dcf4SKowalski, Kamil 
590f4c4dcf4SKowalski, Kamil /**
591f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterValueTypeError message into JSON
59266ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
593f4c4dcf4SKowalski, Kamil  * is of a different type than the parameter can accept."
594f4c4dcf4SKowalski, Kamil  *
595f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
596f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
597f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
598f4c4dcf4SKowalski, Kamil  *
599f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterValueTypeError formatted to JSON */
600b5c07418SJames Feist nlohmann::json actionParameterValueTypeError(const std::string& arg1,
601b5c07418SJames Feist                                              const std::string& arg2,
602b5c07418SJames Feist                                              const std::string& arg3);
603b5c07418SJames Feist 
604f12894f8SJason M. Bills void actionParameterValueTypeError(crow::Response& res, const std::string& arg1,
605f4c4dcf4SKowalski, Kamil                                    const std::string& arg2,
606f4c4dcf4SKowalski, Kamil                                    const std::string& arg3);
607f4c4dcf4SKowalski, Kamil 
608f4c4dcf4SKowalski, Kamil /**
609f4c4dcf4SKowalski, Kamil  * @brief Formats SessionLimitExceeded message into JSON
610f4c4dcf4SKowalski, Kamil  * Message body: "The session establishment failed due to the number of
611f4c4dcf4SKowalski, Kamil  * simultaneous sessions exceeding the limit of the implementation."
612f4c4dcf4SKowalski, Kamil  *
613f4c4dcf4SKowalski, Kamil  *
614f4c4dcf4SKowalski, Kamil  * @returns Message SessionLimitExceeded formatted to JSON */
615b5c07418SJames Feist nlohmann::json sessionLimitExceeded(void);
616b5c07418SJames Feist 
617f12894f8SJason M. Bills void sessionLimitExceeded(crow::Response& res);
618f4c4dcf4SKowalski, Kamil 
619f4c4dcf4SKowalski, Kamil /**
620f4c4dcf4SKowalski, Kamil  * @brief Formats ActionNotSupported message into JSON
62166ac2b8cSJason M. Bills  * Message body: "The action <arg1> is not supported by the resource."
622f4c4dcf4SKowalski, Kamil  *
623f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
624f4c4dcf4SKowalski, Kamil  *
625f4c4dcf4SKowalski, Kamil  * @returns Message ActionNotSupported formatted to JSON */
626b5c07418SJames Feist nlohmann::json actionNotSupported(const std::string& arg1);
627b5c07418SJames Feist 
628f12894f8SJason M. Bills void actionNotSupported(crow::Response& res, const std::string& arg1);
629f4c4dcf4SKowalski, Kamil 
630f4c4dcf4SKowalski, Kamil /**
631f4c4dcf4SKowalski, Kamil  * @brief Formats InvalidIndex message into JSON
63266ac2b8cSJason M. Bills  * Message body: "The index <arg1> is not a valid offset into the array."
633f4c4dcf4SKowalski, Kamil  *
634f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
635f4c4dcf4SKowalski, Kamil  *
636f4c4dcf4SKowalski, Kamil  * @returns Message InvalidIndex formatted to JSON */
637b5c07418SJames Feist nlohmann::json invalidIndex(const int& arg1);
638b5c07418SJames Feist 
639f12894f8SJason M. Bills void invalidIndex(crow::Response& res, const int& arg1);
640f4c4dcf4SKowalski, Kamil 
641f4c4dcf4SKowalski, Kamil /**
642f4c4dcf4SKowalski, Kamil  * @brief Formats EmptyJSON message into JSON
643f4c4dcf4SKowalski, Kamil  * Message body: "The request body submitted contained an empty JSON object and
644f4c4dcf4SKowalski, Kamil  * the service is unable to process it."
645f4c4dcf4SKowalski, Kamil  *
646f4c4dcf4SKowalski, Kamil  *
647f4c4dcf4SKowalski, Kamil  * @returns Message EmptyJSON formatted to JSON */
648b5c07418SJames Feist nlohmann::json emptyJSON(void);
649b5c07418SJames Feist 
650f12894f8SJason M. Bills void emptyJSON(crow::Response& res);
651f4c4dcf4SKowalski, Kamil 
652f4c4dcf4SKowalski, Kamil /**
653f4c4dcf4SKowalski, Kamil  * @brief Formats QueryNotSupportedOnResource message into JSON
654f4c4dcf4SKowalski, Kamil  * Message body: "Querying is not supported on the requested resource."
655f4c4dcf4SKowalski, Kamil  *
656f4c4dcf4SKowalski, Kamil  *
657f4c4dcf4SKowalski, Kamil  * @returns Message QueryNotSupportedOnResource formatted to JSON */
658b5c07418SJames Feist nlohmann::json queryNotSupportedOnResource(void);
659b5c07418SJames Feist 
660f12894f8SJason M. Bills void queryNotSupportedOnResource(crow::Response& res);
661f4c4dcf4SKowalski, Kamil 
662f4c4dcf4SKowalski, Kamil /**
663f4c4dcf4SKowalski, Kamil  * @brief Formats InsufficientPrivilege message into JSON
664f4c4dcf4SKowalski, Kamil  * Message body: "There are insufficient privileges for the account or
665f4c4dcf4SKowalski, Kamil  * credentials associated with the current session to perform the requested
666f4c4dcf4SKowalski, Kamil  * operation."
667f4c4dcf4SKowalski, Kamil  *
668f4c4dcf4SKowalski, Kamil  *
669f4c4dcf4SKowalski, Kamil  * @returns Message InsufficientPrivilege formatted to JSON */
670b5c07418SJames Feist nlohmann::json insufficientPrivilege(void);
671b5c07418SJames Feist 
672f12894f8SJason M. Bills void insufficientPrivilege(crow::Response& res);
673f4c4dcf4SKowalski, Kamil 
674f4c4dcf4SKowalski, Kamil /**
675f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueModified message into JSON
67666ac2b8cSJason M. Bills  * Message body: "The property <arg1> was assigned the value <arg2> due to
677f4c4dcf4SKowalski, Kamil  * modification by the service."
678f4c4dcf4SKowalski, Kamil  *
679f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
680f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
681f4c4dcf4SKowalski, Kamil  *
682f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueModified formatted to JSON */
683b5c07418SJames Feist nlohmann::json propertyValueModified(const std::string& arg1,
684b5c07418SJames Feist                                      const std::string& arg2);
685b5c07418SJames Feist 
686f12894f8SJason M. Bills void propertyValueModified(crow::Response& res, const std::string& arg1,
687f4c4dcf4SKowalski, Kamil                            const std::string& arg2);
688f4c4dcf4SKowalski, Kamil 
689f4c4dcf4SKowalski, Kamil /**
690f4c4dcf4SKowalski, Kamil  * @brief Formats AccountNotModified message into JSON
691f4c4dcf4SKowalski, Kamil  * Message body: "The account modification request failed."
692f4c4dcf4SKowalski, Kamil  *
693f4c4dcf4SKowalski, Kamil  *
694f4c4dcf4SKowalski, Kamil  * @returns Message AccountNotModified formatted to JSON */
695b5c07418SJames Feist nlohmann::json accountNotModified(void);
696b5c07418SJames Feist 
697f12894f8SJason M. Bills void accountNotModified(crow::Response& res);
698f4c4dcf4SKowalski, Kamil 
699f4c4dcf4SKowalski, Kamil /**
700f4c4dcf4SKowalski, Kamil  * @brief Formats QueryParameterValueFormatError message into JSON
70166ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the parameter <arg2> is of a different
702f4c4dcf4SKowalski, Kamil  * format than the parameter can accept."
703f4c4dcf4SKowalski, Kamil  *
704f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
705f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
706f4c4dcf4SKowalski, Kamil  *
707f4c4dcf4SKowalski, Kamil  * @returns Message QueryParameterValueFormatError formatted to JSON */
708b5c07418SJames Feist 
709b5c07418SJames Feist nlohmann::json queryParameterValueFormatError(const std::string& arg1,
710b5c07418SJames Feist                                               const std::string& arg2);
711b5c07418SJames Feist 
712f12894f8SJason M. Bills void queryParameterValueFormatError(crow::Response& res,
713f12894f8SJason M. Bills                                     const std::string& arg1,
714f4c4dcf4SKowalski, Kamil                                     const std::string& arg2);
715f4c4dcf4SKowalski, Kamil 
716f4c4dcf4SKowalski, Kamil /**
717f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyMissing message into JSON
71866ac2b8cSJason M. Bills  * Message body: "The property <arg1> is a required property and must be
719f4c4dcf4SKowalski, Kamil  * included in the request."
720f4c4dcf4SKowalski, Kamil  *
721f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
722f4c4dcf4SKowalski, Kamil  *
723f4c4dcf4SKowalski, Kamil  * @returns Message PropertyMissing formatted to JSON */
724b5c07418SJames Feist nlohmann::json propertyMissing(const std::string& arg1);
725b5c07418SJames Feist 
726f12894f8SJason M. Bills void propertyMissing(crow::Response& res, const std::string& arg1);
727f12894f8SJason M. Bills 
728f12894f8SJason M. Bills /**
729f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceExhaustion message into JSON
73066ac2b8cSJason M. Bills  * Message body: "The resource <arg1> was unable to satisfy the request due to
731f4c4dcf4SKowalski, Kamil  * unavailability of resources."
732f4c4dcf4SKowalski, Kamil  *
733f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
734f4c4dcf4SKowalski, Kamil  *
735f4c4dcf4SKowalski, Kamil  * @returns Message ResourceExhaustion formatted to JSON */
736b5c07418SJames Feist nlohmann::json resourceExhaustion(const std::string& arg1);
737b5c07418SJames Feist 
738f12894f8SJason M. Bills void resourceExhaustion(crow::Response& res, const std::string& arg1);
739f4c4dcf4SKowalski, Kamil 
740f4c4dcf4SKowalski, Kamil /**
741f4c4dcf4SKowalski, Kamil  * @brief Formats AccountModified message into JSON
742f4c4dcf4SKowalski, Kamil  * Message body: "The account was successfully modified."
743f4c4dcf4SKowalski, Kamil  *
744f4c4dcf4SKowalski, Kamil  *
745f4c4dcf4SKowalski, Kamil  * @returns Message AccountModified formatted to JSON */
746b5c07418SJames Feist nlohmann::json accountModified(void);
747b5c07418SJames Feist 
748a08b46ccSJason M. Bills void accountModified(crow::Response& res);
749f4c4dcf4SKowalski, Kamil 
750f4c4dcf4SKowalski, Kamil /**
751f4c4dcf4SKowalski, Kamil  * @brief Formats QueryParameterOutOfRange message into JSON
75266ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the query parameter <arg2> is out of
75366ac2b8cSJason M. Bills  * range <arg3>."
754f4c4dcf4SKowalski, Kamil  *
755f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
756f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
757f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
758f4c4dcf4SKowalski, Kamil  *
759f4c4dcf4SKowalski, Kamil  * @returns Message QueryParameterOutOfRange formatted to JSON */
760b5c07418SJames Feist nlohmann::json queryParameterOutOfRange(const std::string& arg1,
761b5c07418SJames Feist                                         const std::string& arg2,
762b5c07418SJames Feist                                         const std::string& arg3);
763b5c07418SJames Feist 
764f12894f8SJason M. Bills void queryParameterOutOfRange(crow::Response& res, const std::string& arg1,
765f12894f8SJason M. Bills                               const std::string& arg2, const std::string& arg3);
766f4c4dcf4SKowalski, Kamil 
7673bf4e632SJoseph Reynolds /**
7683bf4e632SJoseph Reynolds  * @brief Formats PasswordChangeRequired message into JSON
7693bf4e632SJoseph Reynolds  * Message body: The password provided for this account must be changed
7703bf4e632SJoseph Reynolds  * before access is granted.  PATCH the 'Password' property for this
7713bf4e632SJoseph Reynolds  * account located at the target URI '%1' to complete this process.
7723bf4e632SJoseph Reynolds  *
7733bf4e632SJoseph Reynolds  * @param[in] arg1 Parameter of message that will replace %1 in its body.
7743bf4e632SJoseph Reynolds  *
7753bf4e632SJoseph Reynolds  * @returns Message PasswordChangeRequired formatted to JSON */
7763bf4e632SJoseph Reynolds void passwordChangeRequired(crow::Response& res, const std::string& arg1);
7773bf4e632SJoseph Reynolds 
7784cde5d90SJames Feist /**
7794cde5d90SJames Feist  * @brief Formats InvalidUpload message into JSON
7804cde5d90SJames Feist  * Message body: Invalid file uploaded to %1: %2.*
7814cde5d90SJames Feist  * @param[in] arg1 Parameter of message that will replace %1 in its body.
7824cde5d90SJames Feist  * @param[in] arg2 Parameter of message that will replace %2 in its body.
7834cde5d90SJames Feist  *
7844cde5d90SJames Feist  * @returns Message InvalidUpload formatted to JSON */
7854cde5d90SJames Feist nlohmann::json invalidUpload(const std::string& arg1, const std::string& arg2);
7864cde5d90SJames Feist 
7874cde5d90SJames Feist void invalidUpload(crow::Response& res, const std::string& arg1,
7884cde5d90SJames Feist                    const std::string& arg2);
7894cde5d90SJames Feist 
790*dd28ba82SAppaRao Puli /**
791*dd28ba82SAppaRao Puli  * @brief Formats MutualExclusiveProperties message into JSON
792*dd28ba82SAppaRao Puli  * Message body: "The properties <arg1> and <arg2> are mutually exclusive."
793*dd28ba82SAppaRao Puli  *
794*dd28ba82SAppaRao Puli  * @param[in] arg1 Parameter of message that will replace %1 in its body.
795*dd28ba82SAppaRao Puli  * @param[in] arg2 Parameter of message that will replace %2 in its body.
796*dd28ba82SAppaRao Puli  *
797*dd28ba82SAppaRao Puli  * @returns Message MutualExclusiveProperties formatted to JSON */
798*dd28ba82SAppaRao Puli nlohmann::json mutualExclusiveProperties(const std::string& arg1,
799*dd28ba82SAppaRao Puli                                          const std::string& arg2);
800*dd28ba82SAppaRao Puli 
801*dd28ba82SAppaRao Puli void mutualExclusiveProperties(crow::Response& res, const std::string& arg1,
802*dd28ba82SAppaRao Puli                                const std::string& arg2);
803*dd28ba82SAppaRao Puli 
804f4c4dcf4SKowalski, Kamil } // namespace messages
805f4c4dcf4SKowalski, Kamil 
806f4c4dcf4SKowalski, Kamil } // namespace redfish
807