xref: /openbmc/bmcweb/features/redfish/include/error_messages.hpp (revision b4ad4c05eeb2104de3becaf704fa1055f72e8b61)
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 #pragma once
170442ef92SNan Zhou 
1804e438cbSEd Tanous #include "http_response.hpp"
190442ef92SNan Zhou #include "source_location.hpp"
20f12894f8SJason M. Bills 
2102fea7a7SEd Tanous #include <boost/url/url_view.hpp>
221214b7e7SGunnar Mills #include <nlohmann/json.hpp>
231214b7e7SGunnar Mills 
240442ef92SNan Zhou #include <cstdint>
259ea15c35SEd Tanous #include <string>
260442ef92SNan Zhou #include <string_view>
270442ef92SNan Zhou 
280442ef92SNan Zhou // IWYU pragma: no_include <cstdint.h>
290442ef92SNan Zhou // IWYU pragma: no_forward_declare crow::Response
309ea15c35SEd Tanous 
311abe55efSEd Tanous namespace redfish
321abe55efSEd Tanous {
33f4c4dcf4SKowalski, Kamil 
341abe55efSEd Tanous namespace messages
351abe55efSEd Tanous {
36f4c4dcf4SKowalski, Kamil 
3781856681SAsmitha Karunanithi constexpr const char* messageVersionPrefix = "Base.1.11.0.";
3855c7b7a2SEd Tanous constexpr const char* messageAnnotation = "@Message.ExtendedInfo";
39f4c4dcf4SKowalski, Kamil 
40f4c4dcf4SKowalski, Kamil /**
413590bd1dSNan Zhou  * @brief Moves all error messages from the |source| JSON to |target|
423590bd1dSNan Zhou  */
433590bd1dSNan Zhou void moveErrorsToErrorJson(nlohmann::json& target, nlohmann::json& source);
443590bd1dSNan Zhou 
453590bd1dSNan Zhou /**
46f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceInUse message into JSON
47f4c4dcf4SKowalski, Kamil  * Message body: "The change to the requested resource failed because the
48f4c4dcf4SKowalski, Kamil  * resource is in use or in transition."
49f4c4dcf4SKowalski, Kamil  *
50f4c4dcf4SKowalski, Kamil  *
51f4c4dcf4SKowalski, Kamil  * @returns Message ResourceInUse formatted to JSON */
5265176d39SEd Tanous nlohmann::json resourceInUse();
53b5c07418SJames Feist 
54f12894f8SJason M. Bills void resourceInUse(crow::Response& res);
55f4c4dcf4SKowalski, Kamil 
56f4c4dcf4SKowalski, Kamil /**
57f4c4dcf4SKowalski, Kamil  * @brief Formats MalformedJSON message into JSON
58f4c4dcf4SKowalski, Kamil  * Message body: "The request body submitted was malformed JSON and could not be
59f4c4dcf4SKowalski, Kamil  * parsed by the receiving service."
60f4c4dcf4SKowalski, Kamil  *
61f4c4dcf4SKowalski, Kamil  *
62f4c4dcf4SKowalski, Kamil  * @returns Message MalformedJSON formatted to JSON */
6365176d39SEd Tanous nlohmann::json malformedJSON();
64b5c07418SJames Feist 
65f12894f8SJason M. Bills void malformedJSON(crow::Response& res);
66f4c4dcf4SKowalski, Kamil 
67f4c4dcf4SKowalski, Kamil /**
68f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceMissingAtURI message into JSON
6966ac2b8cSJason M. Bills  * Message body: "The resource at the URI <arg1> was not found."
70f4c4dcf4SKowalski, Kamil  *
71f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
72f4c4dcf4SKowalski, Kamil  *
73f4c4dcf4SKowalski, Kamil  * @returns Message ResourceMissingAtURI formatted to JSON */
74ace85d60SEd Tanous nlohmann::json resourceMissingAtURI(const boost::urls::url_view& arg1);
75b5c07418SJames Feist 
76ace85d60SEd Tanous void resourceMissingAtURI(crow::Response& res,
77ace85d60SEd Tanous                           const boost::urls::url_view& arg1);
78f4c4dcf4SKowalski, Kamil 
79f4c4dcf4SKowalski, Kamil /**
80f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterValueFormatError message into JSON
8166ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
82f4c4dcf4SKowalski, Kamil  * is of a different format than the parameter can accept."
83f4c4dcf4SKowalski, Kamil  *
84f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
85f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
86f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
87f4c4dcf4SKowalski, Kamil  *
88f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterValueFormatError formatted to JSON */
891668ce6dSEd Tanous nlohmann::json actionParameterValueFormatError(std::string_view arg1,
901668ce6dSEd Tanous                                                std::string_view arg2,
911668ce6dSEd Tanous                                                std::string_view arg3);
92b5c07418SJames Feist 
931668ce6dSEd Tanous void actionParameterValueFormatError(crow::Response& res, std::string_view arg1,
941668ce6dSEd Tanous                                      std::string_view arg2,
951668ce6dSEd Tanous                                      std::string_view arg3);
96f4c4dcf4SKowalski, Kamil 
97f4c4dcf4SKowalski, Kamil /**
98f4c4dcf4SKowalski, Kamil  * @brief Formats InternalError message into JSON
99f4c4dcf4SKowalski, Kamil  * Message body: "The request failed due to an internal service error.  The
100f4c4dcf4SKowalski, Kamil  * service is still operational."
101f4c4dcf4SKowalski, Kamil  *
102f4c4dcf4SKowalski, Kamil  *
103f4c4dcf4SKowalski, Kamil  * @returns Message InternalError formatted to JSON */
10465176d39SEd Tanous nlohmann::json internalError();
105b5c07418SJames Feist 
1069eb808c1SEd Tanous void internalError(crow::Response& res, bmcweb::source_location location =
107df5415fcSEd Tanous                                             bmcweb::source_location::current());
108f12894f8SJason M. Bills 
109f12894f8SJason M. Bills /**
110f4c4dcf4SKowalski, Kamil  * @brief Formats UnrecognizedRequestBody message into JSON
111f4c4dcf4SKowalski, Kamil  * Message body: "The service detected a malformed request body that it was
112f4c4dcf4SKowalski, Kamil  * unable to interpret."
113f4c4dcf4SKowalski, Kamil  *
114f4c4dcf4SKowalski, Kamil  *
115f4c4dcf4SKowalski, Kamil  * @returns Message UnrecognizedRequestBody formatted to JSON */
11665176d39SEd Tanous nlohmann::json unrecognizedRequestBody();
117b5c07418SJames Feist 
118f12894f8SJason M. Bills void unrecognizedRequestBody(crow::Response& res);
119f4c4dcf4SKowalski, Kamil 
120f4c4dcf4SKowalski, Kamil /**
121f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceAtUriUnauthorized message into JSON
12266ac2b8cSJason M. Bills  * Message body: "While accessing the resource at <arg1>, the service received
12366ac2b8cSJason M. Bills  * an authorization error <arg2>."
124f4c4dcf4SKowalski, Kamil  *
125f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
126f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
127f4c4dcf4SKowalski, Kamil  *
128f4c4dcf4SKowalski, Kamil  * @returns Message ResourceAtUriUnauthorized formatted to JSON */
129ace85d60SEd Tanous nlohmann::json resourceAtUriUnauthorized(const boost::urls::url_view& arg1,
1301668ce6dSEd Tanous                                          std::string_view arg2);
131b5c07418SJames Feist 
132ace85d60SEd Tanous void resourceAtUriUnauthorized(crow::Response& res,
133ace85d60SEd Tanous                                const boost::urls::url_view& arg1,
1341668ce6dSEd Tanous                                std::string_view arg2);
135f4c4dcf4SKowalski, Kamil 
136f4c4dcf4SKowalski, Kamil /**
137f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterUnknown message into JSON
13866ac2b8cSJason M. Bills  * Message body: "The action <arg1> was submitted with the invalid parameter
13966ac2b8cSJason M. Bills  * <arg2>."
140f4c4dcf4SKowalski, Kamil  *
141f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
142f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
143f4c4dcf4SKowalski, Kamil  *
144f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterUnknown formatted to JSON */
1451668ce6dSEd Tanous nlohmann::json actionParameterUnknown(std::string_view arg1,
1461668ce6dSEd Tanous                                       std::string_view arg2);
147b5c07418SJames Feist 
1481668ce6dSEd Tanous void actionParameterUnknown(crow::Response& res, std::string_view arg1,
1491668ce6dSEd Tanous                             std::string_view arg2);
150f4c4dcf4SKowalski, Kamil 
151f4c4dcf4SKowalski, Kamil /**
152f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceCannotBeDeleted message into JSON
153f4c4dcf4SKowalski, Kamil  * Message body: "The delete request failed because the resource requested
154f4c4dcf4SKowalski, Kamil  * cannot be deleted."
155f4c4dcf4SKowalski, Kamil  *
156f4c4dcf4SKowalski, Kamil  *
157f4c4dcf4SKowalski, Kamil  * @returns Message ResourceCannotBeDeleted formatted to JSON */
15865176d39SEd Tanous nlohmann::json resourceCannotBeDeleted();
159b5c07418SJames Feist 
160f12894f8SJason M. Bills void resourceCannotBeDeleted(crow::Response& res);
161f4c4dcf4SKowalski, Kamil 
162f4c4dcf4SKowalski, Kamil /**
163f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyDuplicate message into JSON
16466ac2b8cSJason M. Bills  * Message body: "The property <arg1> was duplicated in the request."
165f4c4dcf4SKowalski, Kamil  *
166f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
167f4c4dcf4SKowalski, Kamil  *
168f4c4dcf4SKowalski, Kamil  * @returns Message PropertyDuplicate formatted to JSON */
1691668ce6dSEd Tanous nlohmann::json propertyDuplicate(std::string_view arg1);
170b5c07418SJames Feist 
1711668ce6dSEd Tanous void propertyDuplicate(crow::Response& res, std::string_view arg1);
172f4c4dcf4SKowalski, Kamil 
173f4c4dcf4SKowalski, Kamil /**
174f4c4dcf4SKowalski, Kamil  * @brief Formats ServiceTemporarilyUnavailable message into JSON
17566ac2b8cSJason M. Bills  * Message body: "The service is temporarily unavailable.  Retry in <arg1>
176f4c4dcf4SKowalski, Kamil  * seconds."
177f4c4dcf4SKowalski, Kamil  *
178f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
179f4c4dcf4SKowalski, Kamil  *
180f4c4dcf4SKowalski, Kamil  * @returns Message ServiceTemporarilyUnavailable formatted to JSON */
1811668ce6dSEd Tanous nlohmann::json serviceTemporarilyUnavailable(std::string_view arg1);
182b5c07418SJames Feist 
1831668ce6dSEd Tanous void serviceTemporarilyUnavailable(crow::Response& res, std::string_view arg1);
184f4c4dcf4SKowalski, Kamil 
185f4c4dcf4SKowalski, Kamil /**
186f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceAlreadyExists message into JSON
18766ac2b8cSJason M. Bills  * Message body: "The requested resource of type <arg1> with the property <arg2>
18866ac2b8cSJason M. Bills  * with the value <arg3> already exists."
189f4c4dcf4SKowalski, Kamil  *
190f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
191f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
192f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
193f4c4dcf4SKowalski, Kamil  *
194f4c4dcf4SKowalski, Kamil  * @returns Message ResourceAlreadyExists formatted to JSON */
1951668ce6dSEd Tanous nlohmann::json resourceAlreadyExists(std::string_view arg1,
1961668ce6dSEd Tanous                                      std::string_view arg2,
1971668ce6dSEd Tanous                                      std::string_view arg3);
198b5c07418SJames Feist 
1991668ce6dSEd Tanous void resourceAlreadyExists(crow::Response& res, std::string_view arg1,
2001668ce6dSEd Tanous                            std::string_view arg2, std::string_view arg3);
201f4c4dcf4SKowalski, Kamil 
202f4c4dcf4SKowalski, Kamil /**
203f4c4dcf4SKowalski, Kamil  * @brief Formats AccountForSessionNoLongerExists message into JSON
204f4c4dcf4SKowalski, Kamil  * Message body: "The account for the current session has been removed, thus the
205f4c4dcf4SKowalski, Kamil  * current session has been removed as well."
206f4c4dcf4SKowalski, Kamil  *
207f4c4dcf4SKowalski, Kamil  *
208f4c4dcf4SKowalski, Kamil  * @returns Message AccountForSessionNoLongerExists formatted to JSON */
20965176d39SEd Tanous nlohmann::json accountForSessionNoLongerExists();
210b5c07418SJames Feist 
211f12894f8SJason M. Bills void accountForSessionNoLongerExists(crow::Response& res);
212f4c4dcf4SKowalski, Kamil 
213f4c4dcf4SKowalski, Kamil /**
214f4c4dcf4SKowalski, Kamil  * @brief Formats CreateFailedMissingReqProperties message into JSON
215f4c4dcf4SKowalski, Kamil  * Message body: "The create operation failed because the required property
21666ac2b8cSJason M. Bills  * <arg1> was missing from the request."
217f4c4dcf4SKowalski, Kamil  *
218f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
219f4c4dcf4SKowalski, Kamil  *
220f4c4dcf4SKowalski, Kamil  * @returns Message CreateFailedMissingReqProperties formatted to JSON */
2211668ce6dSEd Tanous nlohmann::json createFailedMissingReqProperties(std::string_view arg1);
222b5c07418SJames Feist 
223f12894f8SJason M. Bills void createFailedMissingReqProperties(crow::Response& res,
2241668ce6dSEd Tanous                                       std::string_view arg1);
225f4c4dcf4SKowalski, Kamil 
226f4c4dcf4SKowalski, Kamil /**
227f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueFormatError message into JSON
22866ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the property <arg2> is of a different
229f4c4dcf4SKowalski, Kamil  * format than the property can accept."
230f4c4dcf4SKowalski, Kamil  *
231f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
232f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
233f4c4dcf4SKowalski, Kamil  *
234f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueFormatError formatted to JSON */
2351668ce6dSEd Tanous nlohmann::json propertyValueFormatError(std::string_view arg1,
2361668ce6dSEd Tanous                                         std::string_view arg2);
237b5c07418SJames Feist 
2381668ce6dSEd Tanous void propertyValueFormatError(crow::Response& res, std::string_view arg1,
2391668ce6dSEd Tanous                               std::string_view arg2);
240f4c4dcf4SKowalski, Kamil 
241f4c4dcf4SKowalski, Kamil /**
242f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueNotInList message into JSON
24366ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the property <arg2> is not in the list of
244f4c4dcf4SKowalski, Kamil  * acceptable values."
245f4c4dcf4SKowalski, Kamil  *
246f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
247f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
248f4c4dcf4SKowalski, Kamil  *
249f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueNotInList formatted to JSON */
2501668ce6dSEd Tanous nlohmann::json propertyValueNotInList(std::string_view arg1,
2511668ce6dSEd Tanous                                       std::string_view arg2);
252b5c07418SJames Feist 
2531668ce6dSEd Tanous void propertyValueNotInList(crow::Response& res, std::string_view arg1,
2541668ce6dSEd Tanous                             std::string_view arg2);
255f4c4dcf4SKowalski, Kamil 
256f4c4dcf4SKowalski, Kamil /**
257227a2b0aSJiaqing Zhao  * @brief Formats PropertyValueOutOfRange message into JSON
258227a2b0aSJiaqing Zhao  * Message body: "The value '%1' for the property %2 is not in the supported
259227a2b0aSJiaqing Zhao  * range of acceptable values."
260227a2b0aSJiaqing Zhao  *
261227a2b0aSJiaqing Zhao  * @param[in] arg1 Parameter of message that will replace %1 in its body.
262227a2b0aSJiaqing Zhao  * @param[in] arg2 Parameter of message that will replace %2 in its body.
263227a2b0aSJiaqing Zhao  *
264227a2b0aSJiaqing Zhao  * @returns Message PropertyValueExternalConflict formatted to JSON */
265227a2b0aSJiaqing Zhao nlohmann::json propertyValueOutOfRange(std::string_view arg1,
266227a2b0aSJiaqing Zhao                                        std::string_view arg2);
267227a2b0aSJiaqing Zhao 
268227a2b0aSJiaqing Zhao void propertyValueOutOfRange(crow::Response& res, std::string_view arg1,
269227a2b0aSJiaqing Zhao                              std::string_view arg2);
270227a2b0aSJiaqing Zhao 
271227a2b0aSJiaqing Zhao /**
272f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceAtUriInUnknownFormat message into JSON
27366ac2b8cSJason M. Bills  * Message body: "The resource at <arg1> is in a format not recognized by the
274f4c4dcf4SKowalski, Kamil  * service."
275f4c4dcf4SKowalski, Kamil  *
276f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
277f4c4dcf4SKowalski, Kamil  *
278f4c4dcf4SKowalski, Kamil  * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */
279ace85d60SEd Tanous nlohmann::json resourceAtUriInUnknownFormat(const boost::urls::url_view& arg1);
280b5c07418SJames Feist 
281ace85d60SEd Tanous void resourceAtUriInUnknownFormat(crow::Response& res,
282ace85d60SEd Tanous                                   const boost::urls::url_view& arg1);
283f4c4dcf4SKowalski, Kamil 
284f4c4dcf4SKowalski, Kamil /**
28581856681SAsmitha Karunanithi  * @brief Formats ServiceDisabled message into JSON
28681856681SAsmitha Karunanithi  * Message body: "The operation failed because the service at <arg1> is disabled
28781856681SAsmitha Karunanithi  * and " cannot accept requests."
28881856681SAsmitha Karunanithi  *
28981856681SAsmitha Karunanithi  * @param[in] arg1 Parameter of message that will replace %1 in its body.
29081856681SAsmitha Karunanithi  *
29181856681SAsmitha Karunanithi  * @returns Message ServiceDisabled formatted to JSON */
2921668ce6dSEd Tanous nlohmann::json serviceDisabled(std::string_view arg1);
29381856681SAsmitha Karunanithi 
2941668ce6dSEd Tanous void serviceDisabled(crow::Response& res, std::string_view arg1);
29581856681SAsmitha Karunanithi 
29681856681SAsmitha Karunanithi /**
297f4c4dcf4SKowalski, Kamil  * @brief Formats ServiceInUnknownState message into JSON
298f4c4dcf4SKowalski, Kamil  * Message body: "The operation failed because the service is in an unknown
299f4c4dcf4SKowalski, Kamil  * state and can no longer take incoming requests."
300f4c4dcf4SKowalski, Kamil  *
301f4c4dcf4SKowalski, Kamil  *
302f4c4dcf4SKowalski, Kamil  * @returns Message ServiceInUnknownState formatted to JSON */
30365176d39SEd Tanous nlohmann::json serviceInUnknownState();
304b5c07418SJames Feist 
305f12894f8SJason M. Bills void serviceInUnknownState(crow::Response& res);
306f4c4dcf4SKowalski, Kamil 
307f4c4dcf4SKowalski, Kamil /**
308f4c4dcf4SKowalski, Kamil  * @brief Formats EventSubscriptionLimitExceeded message into JSON
309f4c4dcf4SKowalski, Kamil  * Message body: "The event subscription failed due to the number of
310f4c4dcf4SKowalski, Kamil  * simultaneous subscriptions exceeding the limit of the implementation."
311f4c4dcf4SKowalski, Kamil  *
312f4c4dcf4SKowalski, Kamil  *
313f4c4dcf4SKowalski, Kamil  * @returns Message EventSubscriptionLimitExceeded formatted to JSON */
31465176d39SEd Tanous nlohmann::json eventSubscriptionLimitExceeded();
315b5c07418SJames Feist 
316f12894f8SJason M. Bills void eventSubscriptionLimitExceeded(crow::Response& res);
317f4c4dcf4SKowalski, Kamil 
318f4c4dcf4SKowalski, Kamil /**
319f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterMissing message into JSON
32066ac2b8cSJason M. Bills  * Message body: "The action <arg1> requires the parameter <arg2> to be present
321f4c4dcf4SKowalski, Kamil  * in the request body."
322f4c4dcf4SKowalski, Kamil  *
323f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
324f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
325f4c4dcf4SKowalski, Kamil  *
326f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterMissing formatted to JSON */
3271668ce6dSEd Tanous nlohmann::json actionParameterMissing(std::string_view arg1,
3281668ce6dSEd Tanous                                       std::string_view arg2);
329b5c07418SJames Feist 
3301668ce6dSEd Tanous void actionParameterMissing(crow::Response& res, std::string_view arg1,
3311668ce6dSEd Tanous                             std::string_view arg2);
332f4c4dcf4SKowalski, Kamil 
333f4c4dcf4SKowalski, Kamil /**
334f4c4dcf4SKowalski, Kamil  * @brief Formats StringValueTooLong message into JSON
33566ac2b8cSJason M. Bills  * Message body: "The string <arg1> exceeds the length limit <arg2>."
336f4c4dcf4SKowalski, Kamil  *
337f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
338f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
339f4c4dcf4SKowalski, Kamil  *
340f4c4dcf4SKowalski, Kamil  * @returns Message StringValueTooLong formatted to JSON */
3411668ce6dSEd Tanous nlohmann::json stringValueTooLong(std::string_view arg1, int arg2);
342b5c07418SJames Feist 
3431668ce6dSEd Tanous void stringValueTooLong(crow::Response& res, std::string_view arg1, int arg2);
344f4c4dcf4SKowalski, Kamil 
345f4c4dcf4SKowalski, Kamil /**
346cc9139ecSJason M. Bills  * @brief Formats SessionTerminated message into JSON
347cc9139ecSJason M. Bills  * Message body: "The session was successfully terminated."
348cc9139ecSJason M. Bills  *
349cc9139ecSJason M. Bills  *
350cc9139ecSJason M. Bills  * @returns Message SessionTerminated formatted to JSON */
35165176d39SEd Tanous nlohmann::json sessionTerminated();
352b5c07418SJames Feist 
353cc9139ecSJason M. Bills void sessionTerminated(crow::Response& res);
354cc9139ecSJason M. Bills 
355cc9139ecSJason M. Bills /**
356684bb4b8SJason M. Bills  * @brief Formats SubscriptionTerminated message into JSON
357684bb4b8SJason M. Bills  * Message body: "The event subscription has been terminated."
358684bb4b8SJason M. Bills  *
359684bb4b8SJason M. Bills  *
360684bb4b8SJason M. Bills  * @returns Message SubscriptionTerminated formatted to JSON */
36165176d39SEd Tanous nlohmann::json subscriptionTerminated();
362684bb4b8SJason M. Bills 
363684bb4b8SJason M. Bills void subscriptionTerminated(crow::Response& res);
364684bb4b8SJason M. Bills 
365684bb4b8SJason M. Bills /**
366cc9139ecSJason M. Bills  * @brief Formats ResourceTypeIncompatible message into JSON
367cc9139ecSJason M. Bills  * Message body: "The @odata.type of the request body <arg1> is incompatible
368cc9139ecSJason M. Bills  * with the @odata.type of the resource which is <arg2>."
369cc9139ecSJason M. Bills  *
370cc9139ecSJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
371cc9139ecSJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
372cc9139ecSJason M. Bills  *
373cc9139ecSJason M. Bills  * @returns Message ResourceTypeIncompatible formatted to JSON */
3741668ce6dSEd Tanous nlohmann::json resourceTypeIncompatible(std::string_view arg1,
3751668ce6dSEd Tanous                                         std::string_view arg2);
376b5c07418SJames Feist 
3771668ce6dSEd Tanous void resourceTypeIncompatible(crow::Response& res, std::string_view arg1,
3781668ce6dSEd Tanous                               std::string_view arg2);
379cc9139ecSJason M. Bills 
380cc9139ecSJason M. Bills /**
381684bb4b8SJason M. Bills  * @brief Formats ResetRequired message into JSON
382684bb4b8SJason M. Bills  * Message body: "In order to complete the operation, a component reset is
383684bb4b8SJason M. Bills  * required with the Reset action URI '<arg1>' and ResetType '<arg2>'."
384684bb4b8SJason M. Bills  *
385684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
386684bb4b8SJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
387684bb4b8SJason M. Bills  *
388684bb4b8SJason M. Bills  * @returns Message ResetRequired formatted to JSON */
389ace85d60SEd Tanous nlohmann::json resetRequired(const boost::urls::url_view& arg1,
3901668ce6dSEd Tanous                              std::string_view arg2);
391684bb4b8SJason M. Bills 
392ace85d60SEd Tanous void resetRequired(crow::Response& res, const boost::urls::url_view& arg1,
3931668ce6dSEd Tanous                    std::string_view arg2);
394684bb4b8SJason M. Bills 
395684bb4b8SJason M. Bills /**
396684bb4b8SJason M. Bills  * @brief Formats ChassisPowerStateOnRequired message into JSON
397684bb4b8SJason M. Bills  * Message body: "The Chassis with Id '<arg1>' requires to be powered on to
398684bb4b8SJason M. Bills  * perform this request."
399684bb4b8SJason M. Bills  *
400684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
401684bb4b8SJason M. Bills  *
402684bb4b8SJason M. Bills  * @returns Message ChassisPowerStateOnRequired formatted to JSON */
4031668ce6dSEd Tanous nlohmann::json chassisPowerStateOnRequired(std::string_view arg1);
404684bb4b8SJason M. Bills 
4051668ce6dSEd Tanous void chassisPowerStateOnRequired(crow::Response& res, std::string_view arg1);
406684bb4b8SJason M. Bills 
407684bb4b8SJason M. Bills /**
408684bb4b8SJason M. Bills  * @brief Formats ChassisPowerStateOffRequired message into JSON
409684bb4b8SJason M. Bills  * Message body: "The Chassis with Id '<arg1>' requires to be powered off to
410684bb4b8SJason M. Bills  * perform this request."
411684bb4b8SJason M. Bills  *
412684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
413684bb4b8SJason M. Bills  *
414684bb4b8SJason M. Bills  * @returns Message ChassisPowerStateOffRequired formatted to JSON */
4151668ce6dSEd Tanous nlohmann::json chassisPowerStateOffRequired(std::string_view arg1);
416684bb4b8SJason M. Bills 
4171668ce6dSEd Tanous void chassisPowerStateOffRequired(crow::Response& res, std::string_view arg1);
418684bb4b8SJason M. Bills 
419684bb4b8SJason M. Bills /**
420684bb4b8SJason M. Bills  * @brief Formats PropertyValueConflict message into JSON
421684bb4b8SJason M. Bills  * Message body: "The property '<arg1>' could not be written because its value
422684bb4b8SJason M. Bills  * would conflict with the value of the '<arg2>' property."
423684bb4b8SJason M. Bills  *
424684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
425684bb4b8SJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
426684bb4b8SJason M. Bills  *
427684bb4b8SJason M. Bills  * @returns Message PropertyValueConflict formatted to JSON */
4281668ce6dSEd Tanous nlohmann::json propertyValueConflict(std::string_view arg1,
4291668ce6dSEd Tanous                                      std::string_view arg2);
430684bb4b8SJason M. Bills 
4311668ce6dSEd Tanous void propertyValueConflict(crow::Response& res, std::string_view arg1,
4321668ce6dSEd Tanous                            std::string_view arg2);
433684bb4b8SJason M. Bills 
434684bb4b8SJason M. Bills /**
4352a6af81cSRamesh Iyyar  * @brief Formats PropertyValueResourceConflict message into JSON
4362a6af81cSRamesh Iyyar  * Message body: "The property '%1' with the requested value of '%2' could
4372a6af81cSRamesh Iyyar  * not be written because the value conflicts with the state or configuration
4382a6af81cSRamesh Iyyar  * of the resource at '%3'."
4392a6af81cSRamesh Iyyar  *
4402a6af81cSRamesh Iyyar  * @param[in] arg1 Parameter of message that will replace %1 in its body.
4412a6af81cSRamesh Iyyar  * @param[in] arg2 Parameter of message that will replace %2 in its body.
4422a6af81cSRamesh Iyyar  * @param[in] arg3 Parameter of message that will replace %3 in its body.
4432a6af81cSRamesh Iyyar  *
4442a6af81cSRamesh Iyyar  * @returns Message PropertyValueResourceConflict to JSON */
4452a6af81cSRamesh Iyyar nlohmann::json propertyValueResourceConflict(std::string_view arg1,
4462a6af81cSRamesh Iyyar                                              std::string_view arg2,
4472a6af81cSRamesh Iyyar                                              const boost::urls::url_view& arg3);
4482a6af81cSRamesh Iyyar 
4492a6af81cSRamesh Iyyar void propertyValueResourceConflict(crow::Response& res, std::string_view arg1,
4502a6af81cSRamesh Iyyar                                    std::string_view arg2,
4512a6af81cSRamesh Iyyar                                    const boost::urls::url_view& arg3);
4522a6af81cSRamesh Iyyar 
4532a6af81cSRamesh Iyyar /**
45424861a28SRamesh Iyyar  * @brief Formats PropertyValueExternalConflict message into JSON
45524861a28SRamesh Iyyar  * Message body: "The property '%1' with the requested value of '%2' could not
45624861a28SRamesh Iyyar  * be written because the value is not available due to a configuration
45724861a28SRamesh Iyyar  * conflict."
45824861a28SRamesh Iyyar  *
45924861a28SRamesh Iyyar  * @param[in] arg1 Parameter of message that will replace %1 in its body.
46024861a28SRamesh Iyyar  * @param[in] arg2 Parameter of message that will replace %2 in its body.
46124861a28SRamesh Iyyar  *
46224861a28SRamesh Iyyar  * @returns Message PropertyValueExternalConflict formatted to JSON */
46324861a28SRamesh Iyyar nlohmann::json propertyValueExternalConflict(std::string_view arg1,
46424861a28SRamesh Iyyar                                              std::string_view arg2);
46524861a28SRamesh Iyyar 
46624861a28SRamesh Iyyar void propertyValueExternalConflict(crow::Response& res, std::string_view arg1,
46724861a28SRamesh Iyyar                                    std::string_view arg2);
46824861a28SRamesh Iyyar 
46924861a28SRamesh Iyyar /**
470684bb4b8SJason M. Bills  * @brief Formats PropertyValueIncorrect message into JSON
471684bb4b8SJason M. Bills  * Message body: "The property '<arg1>' with the requested value of '<arg2>'
472684bb4b8SJason M. Bills  * could not be written because the value does not meet the constraints of the
473684bb4b8SJason M. Bills  * implementation."
474684bb4b8SJason M. Bills  *
475684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
476684bb4b8SJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
477684bb4b8SJason M. Bills  *
478684bb4b8SJason M. Bills  * @returns Message PropertyValueIncorrect formatted to JSON */
4791668ce6dSEd Tanous nlohmann::json propertyValueIncorrect(std::string_view arg1,
4801668ce6dSEd Tanous                                       std::string_view arg2);
481684bb4b8SJason M. Bills 
4821668ce6dSEd Tanous void propertyValueIncorrect(crow::Response& res, std::string_view arg1,
4831668ce6dSEd Tanous                             std::string_view arg2);
484684bb4b8SJason M. Bills 
485684bb4b8SJason M. Bills /**
486684bb4b8SJason M. Bills  * @brief Formats ResourceCreationConflict message into JSON
487684bb4b8SJason M. Bills  * Message body: "The resource could not be created.  The service has a resource
488684bb4b8SJason M. Bills  * at URI '<arg1>' that conflicts with the creation request."
489684bb4b8SJason M. Bills  *
490684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
491684bb4b8SJason M. Bills  *
492684bb4b8SJason M. Bills  * @returns Message ResourceCreationConflict formatted to JSON */
493f7725d79SEd Tanous nlohmann::json resourceCreationConflict(const boost::urls::url_view& arg1);
494684bb4b8SJason M. Bills 
495f7725d79SEd Tanous void resourceCreationConflict(crow::Response& res,
496f7725d79SEd Tanous                               const boost::urls::url_view& arg1);
497684bb4b8SJason M. Bills 
498684bb4b8SJason M. Bills /**
499684bb4b8SJason M. Bills  * @brief Formats MaximumErrorsExceeded message into JSON
500684bb4b8SJason M. Bills  * Message body: "Too many errors have occurred to report them all."
501684bb4b8SJason M. Bills  *
502684bb4b8SJason M. Bills  *
503684bb4b8SJason M. Bills  * @returns Message MaximumErrorsExceeded formatted to JSON */
50465176d39SEd Tanous nlohmann::json maximumErrorsExceeded();
505684bb4b8SJason M. Bills 
506684bb4b8SJason M. Bills void maximumErrorsExceeded(crow::Response& res);
507684bb4b8SJason M. Bills 
508684bb4b8SJason M. Bills /**
509684bb4b8SJason M. Bills  * @brief Formats PreconditionFailed message into JSON
510684bb4b8SJason M. Bills  * Message body: "The ETag supplied did not match the ETag required to change
511684bb4b8SJason M. Bills  * this resource."
512684bb4b8SJason M. Bills  *
513684bb4b8SJason M. Bills  *
514684bb4b8SJason M. Bills  * @returns Message PreconditionFailed formatted to JSON */
51565176d39SEd Tanous nlohmann::json preconditionFailed();
516684bb4b8SJason M. Bills 
517684bb4b8SJason M. Bills void preconditionFailed(crow::Response& res);
518684bb4b8SJason M. Bills 
519684bb4b8SJason M. Bills /**
520684bb4b8SJason M. Bills  * @brief Formats PreconditionRequired message into JSON
521684bb4b8SJason M. Bills  * Message body: "A precondition header or annotation is required to change this
522684bb4b8SJason M. Bills  * resource."
523684bb4b8SJason M. Bills  *
524684bb4b8SJason M. Bills  *
525684bb4b8SJason M. Bills  * @returns Message PreconditionRequired formatted to JSON */
52665176d39SEd Tanous nlohmann::json preconditionRequired();
527684bb4b8SJason M. Bills 
528684bb4b8SJason M. Bills void preconditionRequired(crow::Response& res);
529684bb4b8SJason M. Bills 
530684bb4b8SJason M. Bills /**
531684bb4b8SJason M. Bills  * @brief Formats OperationFailed message into JSON
532684bb4b8SJason M. Bills  * Message body: "An error occurred internal to the service as part of the
533684bb4b8SJason M. Bills  * overall request.  Partial results may have been returned."
534684bb4b8SJason M. Bills  *
535684bb4b8SJason M. Bills  *
536684bb4b8SJason M. Bills  * @returns Message OperationFailed formatted to JSON */
53765176d39SEd Tanous nlohmann::json operationFailed();
538684bb4b8SJason M. Bills 
539684bb4b8SJason M. Bills void operationFailed(crow::Response& res);
540684bb4b8SJason M. Bills 
541684bb4b8SJason M. Bills /**
542684bb4b8SJason M. Bills  * @brief Formats OperationTimeout message into JSON
543684bb4b8SJason M. Bills  * Message body: "A timeout internal to the service occured as part of the
544684bb4b8SJason M. Bills  * request.  Partial results may have been returned."
545684bb4b8SJason M. Bills  *
546684bb4b8SJason M. Bills  *
547684bb4b8SJason M. Bills  * @returns Message OperationTimeout formatted to JSON */
54865176d39SEd Tanous nlohmann::json operationTimeout();
549684bb4b8SJason M. Bills 
550684bb4b8SJason M. Bills void operationTimeout(crow::Response& res);
551684bb4b8SJason M. Bills 
552684bb4b8SJason M. Bills /**
553f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueTypeError message into JSON
55466ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the property <arg2> is of a different
555f4c4dcf4SKowalski, Kamil  * type than the property can accept."
556f4c4dcf4SKowalski, Kamil  *
557f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
558f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
559f4c4dcf4SKowalski, Kamil  *
560f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueTypeError formatted to JSON */
5611668ce6dSEd Tanous nlohmann::json propertyValueTypeError(std::string_view arg1,
5621668ce6dSEd Tanous                                       std::string_view arg2);
563b5c07418SJames Feist 
5641668ce6dSEd Tanous void propertyValueTypeError(crow::Response& res, std::string_view arg1,
5651668ce6dSEd Tanous                             std::string_view arg2);
566f4c4dcf4SKowalski, Kamil 
567f4c4dcf4SKowalski, Kamil /**
568f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceNotFound message into JSON
56966ac2b8cSJason M. Bills  * Message body: "The requested resource of type <arg1> named <arg2> was not
570f4c4dcf4SKowalski, Kamil  * found."
571f4c4dcf4SKowalski, Kamil  *
572f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
573f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
574f4c4dcf4SKowalski, Kamil  *
575f4c4dcf4SKowalski, Kamil  * @returns Message ResourceNotFound formatted to JSON */
5761668ce6dSEd Tanous nlohmann::json resourceNotFound(std::string_view arg1, std::string_view arg2);
577b5c07418SJames Feist 
5781668ce6dSEd Tanous void resourceNotFound(crow::Response& res, std::string_view arg1,
5791668ce6dSEd Tanous                       std::string_view arg2);
580f4c4dcf4SKowalski, Kamil 
581f4c4dcf4SKowalski, Kamil /**
582f4c4dcf4SKowalski, Kamil  * @brief Formats CouldNotEstablishConnection message into JSON
58355c7b7a2SEd Tanous  * Message body: "The service failed to establish a Connection with the URI
58466ac2b8cSJason M. Bills  * <arg1>."
585f4c4dcf4SKowalski, Kamil  *
586f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
587f4c4dcf4SKowalski, Kamil  *
588f4c4dcf4SKowalski, Kamil  * @returns Message CouldNotEstablishConnection formatted to JSON */
589ace85d60SEd Tanous nlohmann::json couldNotEstablishConnection(const boost::urls::url_view& arg1);
590b5c07418SJames Feist 
591ace85d60SEd Tanous void couldNotEstablishConnection(crow::Response& res,
592ace85d60SEd Tanous                                  const boost::urls::url_view& arg1);
593f4c4dcf4SKowalski, Kamil 
594f4c4dcf4SKowalski, Kamil /**
595f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyNotWritable message into JSON
59666ac2b8cSJason M. Bills  * Message body: "The property <arg1> is a read only property and cannot be
597f4c4dcf4SKowalski, Kamil  * assigned a value."
598f4c4dcf4SKowalski, Kamil  *
599f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
600f4c4dcf4SKowalski, Kamil  *
601f4c4dcf4SKowalski, Kamil  * @returns Message PropertyNotWritable formatted to JSON */
6021668ce6dSEd Tanous nlohmann::json propertyNotWritable(std::string_view arg1);
603b5c07418SJames Feist 
6041668ce6dSEd Tanous void propertyNotWritable(crow::Response& res, std::string_view arg1);
605f12894f8SJason M. Bills 
606f12894f8SJason M. Bills /**
607f4c4dcf4SKowalski, Kamil  * @brief Formats QueryParameterValueTypeError message into JSON
60866ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the query parameter <arg2> is of a
609f4c4dcf4SKowalski, Kamil  * different type than the parameter can accept."
610f4c4dcf4SKowalski, Kamil  *
611f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
612f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
613f4c4dcf4SKowalski, Kamil  *
614f4c4dcf4SKowalski, Kamil  * @returns Message QueryParameterValueTypeError formatted to JSON */
6151668ce6dSEd Tanous nlohmann::json queryParameterValueTypeError(std::string_view arg1,
6161668ce6dSEd Tanous                                             std::string_view arg2);
617b5c07418SJames Feist 
6181668ce6dSEd Tanous void queryParameterValueTypeError(crow::Response& res, std::string_view arg1,
6191668ce6dSEd Tanous                                   std::string_view arg2);
620f4c4dcf4SKowalski, Kamil 
621f4c4dcf4SKowalski, Kamil /**
622f4c4dcf4SKowalski, Kamil  * @brief Formats ServiceShuttingDown message into JSON
623f4c4dcf4SKowalski, Kamil  * Message body: "The operation failed because the service is shutting down and
624f4c4dcf4SKowalski, Kamil  * can no longer take incoming requests."
625f4c4dcf4SKowalski, Kamil  *
626f4c4dcf4SKowalski, Kamil  *
627f4c4dcf4SKowalski, Kamil  * @returns Message ServiceShuttingDown formatted to JSON */
62865176d39SEd Tanous nlohmann::json serviceShuttingDown();
629b5c07418SJames Feist 
630f12894f8SJason M. Bills void serviceShuttingDown(crow::Response& res);
631f4c4dcf4SKowalski, Kamil 
632f4c4dcf4SKowalski, Kamil /**
633f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterDuplicate message into JSON
63466ac2b8cSJason M. Bills  * Message body: "The action <arg1> was submitted with more than one value for
63566ac2b8cSJason M. Bills  * the parameter <arg2>."
636f4c4dcf4SKowalski, Kamil  *
637f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
638f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
639f4c4dcf4SKowalski, Kamil  *
640f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterDuplicate formatted to JSON */
6411668ce6dSEd Tanous nlohmann::json actionParameterDuplicate(std::string_view arg1,
6421668ce6dSEd Tanous                                         std::string_view arg2);
643b5c07418SJames Feist 
6441668ce6dSEd Tanous void actionParameterDuplicate(crow::Response& res, std::string_view arg1,
6451668ce6dSEd Tanous                               std::string_view arg2);
646f4c4dcf4SKowalski, Kamil 
647f4c4dcf4SKowalski, Kamil /**
648f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterNotSupported message into JSON
64966ac2b8cSJason M. Bills  * Message body: "The parameter <arg1> for the action <arg2> is not supported on
650f4c4dcf4SKowalski, Kamil  * the target resource."
651f4c4dcf4SKowalski, Kamil  *
652f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
653f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
654f4c4dcf4SKowalski, Kamil  *
655f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterNotSupported formatted to JSON */
6561668ce6dSEd Tanous nlohmann::json actionParameterNotSupported(std::string_view arg1,
6571668ce6dSEd Tanous                                            std::string_view arg2);
658b5c07418SJames Feist 
6591668ce6dSEd Tanous void actionParameterNotSupported(crow::Response& res, std::string_view arg1,
6601668ce6dSEd Tanous                                  std::string_view arg2);
661f4c4dcf4SKowalski, Kamil 
662f4c4dcf4SKowalski, Kamil /**
663f4c4dcf4SKowalski, Kamil  * @brief Formats SourceDoesNotSupportProtocol message into JSON
66466ac2b8cSJason M. Bills  * Message body: "The other end of the Connection at <arg1> does not support the
66566ac2b8cSJason M. Bills  * specified protocol <arg2>."
666f4c4dcf4SKowalski, Kamil  *
667f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
668f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
669f4c4dcf4SKowalski, Kamil  *
670f4c4dcf4SKowalski, Kamil  * @returns Message SourceDoesNotSupportProtocol formatted to JSON */
671ace85d60SEd Tanous nlohmann::json sourceDoesNotSupportProtocol(const boost::urls::url_view& arg1,
6721668ce6dSEd Tanous                                             std::string_view arg2);
673b5c07418SJames Feist 
674ace85d60SEd Tanous void sourceDoesNotSupportProtocol(crow::Response& res,
675ace85d60SEd Tanous                                   const boost::urls::url_view& arg1,
6761668ce6dSEd Tanous                                   std::string_view arg2);
677f4c4dcf4SKowalski, Kamil 
678f4c4dcf4SKowalski, Kamil /**
679*b4ad4c05SShantappa Teekappanavar  * @brief Formats StrictAccountTypes message into JSON
680*b4ad4c05SShantappa Teekappanavar  * Message body: Indicates the request failed because a set of `AccountTypes` or
681*b4ad4c05SShantappa Teekappanavar  * `OEMAccountTypes` was not accepted while `StrictAccountTypes` is set to `true
682*b4ad4c05SShantappa Teekappanavar  * @param[in] arg1 Parameter of message that will replace %1 in its body.
683*b4ad4c05SShantappa Teekappanavar  *
684*b4ad4c05SShantappa Teekappanavar  * @returns Message StrictAccountTypes formatted to JSON */
685*b4ad4c05SShantappa Teekappanavar nlohmann::json strictAccountTypes(std::string_view arg1);
686*b4ad4c05SShantappa Teekappanavar 
687*b4ad4c05SShantappa Teekappanavar void strictAccountTypes(crow::Response& res, std::string_view arg1);
688*b4ad4c05SShantappa Teekappanavar 
689*b4ad4c05SShantappa Teekappanavar /**
690f4c4dcf4SKowalski, Kamil  * @brief Formats AccountRemoved message into JSON
691f4c4dcf4SKowalski, Kamil  * Message body: "The account was successfully removed."
692f4c4dcf4SKowalski, Kamil  *
693f4c4dcf4SKowalski, Kamil  *
694f4c4dcf4SKowalski, Kamil  * @returns Message AccountRemoved formatted to JSON */
69565176d39SEd Tanous nlohmann::json accountRemoved();
696b5c07418SJames Feist 
697f12894f8SJason M. Bills void accountRemoved(crow::Response& res);
698f4c4dcf4SKowalski, Kamil 
699f4c4dcf4SKowalski, Kamil /**
700f4c4dcf4SKowalski, Kamil  * @brief Formats AccessDenied message into JSON
70166ac2b8cSJason M. Bills  * Message body: "While attempting to establish a Connection to <arg1>, the
702f4c4dcf4SKowalski, Kamil  * service denied access."
703f4c4dcf4SKowalski, Kamil  *
704f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
705f4c4dcf4SKowalski, Kamil  *
706f4c4dcf4SKowalski, Kamil  * @returns Message AccessDenied formatted to JSON */
707f7725d79SEd Tanous nlohmann::json accessDenied(const boost::urls::url_view& arg1);
708b5c07418SJames Feist 
709f7725d79SEd Tanous void accessDenied(crow::Response& res, const boost::urls::url_view& arg1);
710f4c4dcf4SKowalski, Kamil 
711f4c4dcf4SKowalski, Kamil /**
712f4c4dcf4SKowalski, Kamil  * @brief Formats QueryNotSupported message into JSON
713f4c4dcf4SKowalski, Kamil  * Message body: "Querying is not supported by the implementation."
714f4c4dcf4SKowalski, Kamil  *
715f4c4dcf4SKowalski, Kamil  *
716f4c4dcf4SKowalski, Kamil  * @returns Message QueryNotSupported formatted to JSON */
71765176d39SEd Tanous nlohmann::json queryNotSupported();
718b5c07418SJames Feist 
719f12894f8SJason M. Bills void queryNotSupported(crow::Response& res);
720f4c4dcf4SKowalski, Kamil 
721f4c4dcf4SKowalski, Kamil /**
722f4c4dcf4SKowalski, Kamil  * @brief Formats CreateLimitReachedForResource message into JSON
723f4c4dcf4SKowalski, Kamil  * Message body: "The create operation failed because the resource has reached
724f4c4dcf4SKowalski, Kamil  * the limit of possible resources."
725f4c4dcf4SKowalski, Kamil  *
726f4c4dcf4SKowalski, Kamil  *
727f4c4dcf4SKowalski, Kamil  * @returns Message CreateLimitReachedForResource formatted to JSON */
72865176d39SEd Tanous nlohmann::json createLimitReachedForResource();
729b5c07418SJames Feist 
730f12894f8SJason M. Bills void createLimitReachedForResource(crow::Response& res);
731f4c4dcf4SKowalski, Kamil 
732f4c4dcf4SKowalski, Kamil /**
733f4c4dcf4SKowalski, Kamil  * @brief Formats GeneralError message into JSON
734f4c4dcf4SKowalski, Kamil  * Message body: "A general error has occurred. See ExtendedInfo for more
735f4c4dcf4SKowalski, Kamil  * information."
736f4c4dcf4SKowalski, Kamil  *
737f4c4dcf4SKowalski, Kamil  *
738f4c4dcf4SKowalski, Kamil  * @returns Message GeneralError formatted to JSON */
73965176d39SEd Tanous nlohmann::json generalError();
740b5c07418SJames Feist 
741f12894f8SJason M. Bills void generalError(crow::Response& res);
742f4c4dcf4SKowalski, Kamil 
743f4c4dcf4SKowalski, Kamil /**
744f4c4dcf4SKowalski, Kamil  * @brief Formats Success message into JSON
745f4c4dcf4SKowalski, Kamil  * Message body: "Successfully Completed Request"
746f4c4dcf4SKowalski, Kamil  *
747f4c4dcf4SKowalski, Kamil  *
748f4c4dcf4SKowalski, Kamil  * @returns Message Success formatted to JSON */
74965176d39SEd Tanous nlohmann::json success();
750b5c07418SJames Feist 
751f12894f8SJason M. Bills void success(crow::Response& res);
752f12894f8SJason M. Bills 
753f12894f8SJason M. Bills /**
754f4c4dcf4SKowalski, Kamil  * @brief Formats Created message into JSON
755f4c4dcf4SKowalski, Kamil  * Message body: "The resource has been created successfully"
756f4c4dcf4SKowalski, Kamil  *
757f4c4dcf4SKowalski, Kamil  *
758f4c4dcf4SKowalski, Kamil  * @returns Message Created formatted to JSON */
75965176d39SEd Tanous nlohmann::json created();
760b5c07418SJames Feist 
761f12894f8SJason M. Bills void created(crow::Response& res);
762f4c4dcf4SKowalski, Kamil 
763f4c4dcf4SKowalski, Kamil /**
764cc9139ecSJason M. Bills  * @brief Formats NoOperation message into JSON
765cc9139ecSJason M. Bills  * Message body: "The request body submitted contain no data to act upon and
766cc9139ecSJason M. Bills  * no changes to the resource took place."
767cc9139ecSJason M. Bills  *
768cc9139ecSJason M. Bills  *
769cc9139ecSJason M. Bills  * @returns Message NoOperation formatted to JSON */
77065176d39SEd Tanous nlohmann::json noOperation();
771b5c07418SJames Feist 
772cc9139ecSJason M. Bills void noOperation(crow::Response& res);
773cc9139ecSJason M. Bills 
774cc9139ecSJason M. Bills /**
775f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyUnknown message into JSON
77666ac2b8cSJason M. Bills  * Message body: "The property <arg1> is not in the list of valid properties for
777f4c4dcf4SKowalski, Kamil  * the resource."
778f4c4dcf4SKowalski, Kamil  *
779f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
780f4c4dcf4SKowalski, Kamil  *
781f4c4dcf4SKowalski, Kamil  * @returns Message PropertyUnknown formatted to JSON */
7821668ce6dSEd Tanous nlohmann::json propertyUnknown(std::string_view arg1);
783b5c07418SJames Feist 
7841668ce6dSEd Tanous void propertyUnknown(crow::Response& res, std::string_view arg1);
785f12894f8SJason M. Bills 
786f12894f8SJason M. Bills /**
787f4c4dcf4SKowalski, Kamil  * @brief Formats NoValidSession message into JSON
788f4c4dcf4SKowalski, Kamil  * Message body: "There is no valid session established with the
789f4c4dcf4SKowalski, Kamil  * implementation."
790f4c4dcf4SKowalski, Kamil  *
791f4c4dcf4SKowalski, Kamil  *
792f4c4dcf4SKowalski, Kamil  * @returns Message NoValidSession formatted to JSON */
79365176d39SEd Tanous nlohmann::json noValidSession();
794b5c07418SJames Feist 
795f12894f8SJason M. Bills void noValidSession(crow::Response& res);
796f4c4dcf4SKowalski, Kamil 
797f4c4dcf4SKowalski, Kamil /**
798f4c4dcf4SKowalski, Kamil  * @brief Formats InvalidObject message into JSON
79966ac2b8cSJason M. Bills  * Message body: "The object at <arg1> is invalid."
800f4c4dcf4SKowalski, Kamil  *
801f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
802f4c4dcf4SKowalski, Kamil  *
803f4c4dcf4SKowalski, Kamil  * @returns Message InvalidObject formatted to JSON */
804ace85d60SEd Tanous nlohmann::json invalidObject(const boost::urls::url_view& arg1);
805b5c07418SJames Feist 
806ace85d60SEd Tanous void invalidObject(crow::Response& res, const boost::urls::url_view& arg1);
807f4c4dcf4SKowalski, Kamil 
808f4c4dcf4SKowalski, Kamil /**
809f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceInStandby message into JSON
810f4c4dcf4SKowalski, Kamil  * Message body: "The request could not be performed because the resource is in
811f4c4dcf4SKowalski, Kamil  * standby."
812f4c4dcf4SKowalski, Kamil  *
813f4c4dcf4SKowalski, Kamil  *
814f4c4dcf4SKowalski, Kamil  * @returns Message ResourceInStandby formatted to JSON */
81565176d39SEd Tanous nlohmann::json resourceInStandby();
816b5c07418SJames Feist 
817f12894f8SJason M. Bills void resourceInStandby(crow::Response& res);
818f4c4dcf4SKowalski, Kamil 
819f4c4dcf4SKowalski, Kamil /**
820f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterValueTypeError message into JSON
82166ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
822f4c4dcf4SKowalski, Kamil  * is of a different type than the parameter can accept."
823f4c4dcf4SKowalski, Kamil  *
824f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
825f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
826f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
827f4c4dcf4SKowalski, Kamil  *
828f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterValueTypeError formatted to JSON */
8291668ce6dSEd Tanous nlohmann::json actionParameterValueTypeError(std::string_view arg1,
8301668ce6dSEd Tanous                                              std::string_view arg2,
8311668ce6dSEd Tanous                                              std::string_view arg3);
832b5c07418SJames Feist 
8331668ce6dSEd Tanous void actionParameterValueTypeError(crow::Response& res, std::string_view arg1,
8341668ce6dSEd Tanous                                    std::string_view arg2,
8351668ce6dSEd Tanous                                    std::string_view arg3);
836f4c4dcf4SKowalski, Kamil 
837f4c4dcf4SKowalski, Kamil /**
838f4c4dcf4SKowalski, Kamil  * @brief Formats SessionLimitExceeded message into JSON
839f4c4dcf4SKowalski, Kamil  * Message body: "The session establishment failed due to the number of
840f4c4dcf4SKowalski, Kamil  * simultaneous sessions exceeding the limit of the implementation."
841f4c4dcf4SKowalski, Kamil  *
842f4c4dcf4SKowalski, Kamil  *
843f4c4dcf4SKowalski, Kamil  * @returns Message SessionLimitExceeded formatted to JSON */
84465176d39SEd Tanous nlohmann::json sessionLimitExceeded();
845b5c07418SJames Feist 
846f12894f8SJason M. Bills void sessionLimitExceeded(crow::Response& res);
847f4c4dcf4SKowalski, Kamil 
848f4c4dcf4SKowalski, Kamil /**
849f4c4dcf4SKowalski, Kamil  * @brief Formats ActionNotSupported message into JSON
85066ac2b8cSJason M. Bills  * Message body: "The action <arg1> is not supported by the resource."
851f4c4dcf4SKowalski, Kamil  *
852f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
853f4c4dcf4SKowalski, Kamil  *
854f4c4dcf4SKowalski, Kamil  * @returns Message ActionNotSupported formatted to JSON */
8551668ce6dSEd Tanous nlohmann::json actionNotSupported(std::string_view arg1);
856b5c07418SJames Feist 
8571668ce6dSEd Tanous void actionNotSupported(crow::Response& res, std::string_view arg1);
858f4c4dcf4SKowalski, Kamil 
859f4c4dcf4SKowalski, Kamil /**
860f4c4dcf4SKowalski, Kamil  * @brief Formats InvalidIndex message into JSON
86166ac2b8cSJason M. Bills  * Message body: "The index <arg1> is not a valid offset into the array."
862f4c4dcf4SKowalski, Kamil  *
863f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
864f4c4dcf4SKowalski, Kamil  *
865f4c4dcf4SKowalski, Kamil  * @returns Message InvalidIndex formatted to JSON */
8665187e09bSJosh Lehan nlohmann::json invalidIndex(int64_t arg1);
867b5c07418SJames Feist 
8685187e09bSJosh Lehan void invalidIndex(crow::Response& res, int64_t arg1);
869f4c4dcf4SKowalski, Kamil 
870f4c4dcf4SKowalski, Kamil /**
871f4c4dcf4SKowalski, Kamil  * @brief Formats EmptyJSON message into JSON
872f4c4dcf4SKowalski, Kamil  * Message body: "The request body submitted contained an empty JSON object and
873f4c4dcf4SKowalski, Kamil  * the service is unable to process it."
874f4c4dcf4SKowalski, Kamil  *
875f4c4dcf4SKowalski, Kamil  *
876f4c4dcf4SKowalski, Kamil  * @returns Message EmptyJSON formatted to JSON */
87765176d39SEd Tanous nlohmann::json emptyJSON();
878b5c07418SJames Feist 
879f12894f8SJason M. Bills void emptyJSON(crow::Response& res);
880f4c4dcf4SKowalski, Kamil 
881f4c4dcf4SKowalski, Kamil /**
882f4c4dcf4SKowalski, Kamil  * @brief Formats QueryNotSupportedOnResource message into JSON
883f4c4dcf4SKowalski, Kamil  * Message body: "Querying is not supported on the requested resource."
884f4c4dcf4SKowalski, Kamil  *
885f4c4dcf4SKowalski, Kamil  *
886f4c4dcf4SKowalski, Kamil  * @returns Message QueryNotSupportedOnResource formatted to JSON */
88765176d39SEd Tanous nlohmann::json queryNotSupportedOnResource();
888b5c07418SJames Feist 
889f12894f8SJason M. Bills void queryNotSupportedOnResource(crow::Response& res);
890f4c4dcf4SKowalski, Kamil 
891f4c4dcf4SKowalski, Kamil /**
892684bb4b8SJason M. Bills  * @brief Formats QueryNotSupportedOnOperation message into JSON
893684bb4b8SJason M. Bills  * Message body: "Querying is not supported with the requested operation."
894684bb4b8SJason M. Bills  *
895684bb4b8SJason M. Bills  *
896684bb4b8SJason M. Bills  * @returns Message QueryNotSupportedOnOperation formatted to JSON */
89765176d39SEd Tanous nlohmann::json queryNotSupportedOnOperation();
898684bb4b8SJason M. Bills 
899684bb4b8SJason M. Bills void queryNotSupportedOnOperation(crow::Response& res);
900684bb4b8SJason M. Bills 
901684bb4b8SJason M. Bills /**
902684bb4b8SJason M. Bills  * @brief Formats QueryCombinationInvalid message into JSON
903684bb4b8SJason M. Bills  * Message body: "Two or more query parameters in the request cannot be used
904684bb4b8SJason M. Bills  * together."
905684bb4b8SJason M. Bills  *
906684bb4b8SJason M. Bills  *
907684bb4b8SJason M. Bills  * @returns Message QueryCombinationInvalid formatted to JSON */
90865176d39SEd Tanous nlohmann::json queryCombinationInvalid();
909684bb4b8SJason M. Bills 
910684bb4b8SJason M. Bills void queryCombinationInvalid(crow::Response& res);
911684bb4b8SJason M. Bills 
912684bb4b8SJason M. Bills /**
913f4c4dcf4SKowalski, Kamil  * @brief Formats InsufficientPrivilege message into JSON
914f4c4dcf4SKowalski, Kamil  * Message body: "There are insufficient privileges for the account or
915f4c4dcf4SKowalski, Kamil  * credentials associated with the current session to perform the requested
916f4c4dcf4SKowalski, Kamil  * operation."
917f4c4dcf4SKowalski, Kamil  *
918f4c4dcf4SKowalski, Kamil  *
919f4c4dcf4SKowalski, Kamil  * @returns Message InsufficientPrivilege formatted to JSON */
92065176d39SEd Tanous nlohmann::json insufficientPrivilege();
921b5c07418SJames Feist 
922f12894f8SJason M. Bills void insufficientPrivilege(crow::Response& res);
923f4c4dcf4SKowalski, Kamil 
924f4c4dcf4SKowalski, Kamil /**
925f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueModified message into JSON
92666ac2b8cSJason M. Bills  * Message body: "The property <arg1> was assigned the value <arg2> due to
927f4c4dcf4SKowalski, Kamil  * modification by the service."
928f4c4dcf4SKowalski, Kamil  *
929f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
930f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
931f4c4dcf4SKowalski, Kamil  *
932f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueModified formatted to JSON */
9331668ce6dSEd Tanous nlohmann::json propertyValueModified(std::string_view arg1,
9341668ce6dSEd Tanous                                      std::string_view arg2);
935b5c07418SJames Feist 
9361668ce6dSEd Tanous void propertyValueModified(crow::Response& res, std::string_view arg1,
9371668ce6dSEd Tanous                            std::string_view arg2);
938f4c4dcf4SKowalski, Kamil 
939f4c4dcf4SKowalski, Kamil /**
940f4c4dcf4SKowalski, Kamil  * @brief Formats AccountNotModified message into JSON
941f4c4dcf4SKowalski, Kamil  * Message body: "The account modification request failed."
942f4c4dcf4SKowalski, Kamil  *
943f4c4dcf4SKowalski, Kamil  *
944f4c4dcf4SKowalski, Kamil  * @returns Message AccountNotModified formatted to JSON */
94565176d39SEd Tanous nlohmann::json accountNotModified();
946b5c07418SJames Feist 
947f12894f8SJason M. Bills void accountNotModified(crow::Response& res);
948f4c4dcf4SKowalski, Kamil 
949f4c4dcf4SKowalski, Kamil /**
950f4c4dcf4SKowalski, Kamil  * @brief Formats QueryParameterValueFormatError message into JSON
95166ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the parameter <arg2> is of a different
952f4c4dcf4SKowalski, Kamil  * format than the parameter can accept."
953f4c4dcf4SKowalski, Kamil  *
954f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
955f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
956f4c4dcf4SKowalski, Kamil  *
957f4c4dcf4SKowalski, Kamil  * @returns Message QueryParameterValueFormatError formatted to JSON */
958b5c07418SJames Feist 
9591668ce6dSEd Tanous nlohmann::json queryParameterValueFormatError(std::string_view arg1,
9601668ce6dSEd Tanous                                               std::string_view arg2);
961b5c07418SJames Feist 
9621668ce6dSEd Tanous void queryParameterValueFormatError(crow::Response& res, std::string_view arg1,
9631668ce6dSEd Tanous                                     std::string_view arg2);
964f4c4dcf4SKowalski, Kamil 
965f4c4dcf4SKowalski, Kamil /**
966f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyMissing message into JSON
96766ac2b8cSJason M. Bills  * Message body: "The property <arg1> is a required property and must be
968f4c4dcf4SKowalski, Kamil  * included in the request."
969f4c4dcf4SKowalski, Kamil  *
970f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
971f4c4dcf4SKowalski, Kamil  *
972f4c4dcf4SKowalski, Kamil  * @returns Message PropertyMissing formatted to JSON */
9731668ce6dSEd Tanous nlohmann::json propertyMissing(std::string_view arg1);
974b5c07418SJames Feist 
9751668ce6dSEd Tanous void propertyMissing(crow::Response& res, std::string_view arg1);
976f12894f8SJason M. Bills 
977f12894f8SJason M. Bills /**
978f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceExhaustion message into JSON
97966ac2b8cSJason M. Bills  * Message body: "The resource <arg1> was unable to satisfy the request due to
980f4c4dcf4SKowalski, Kamil  * unavailability of resources."
981f4c4dcf4SKowalski, Kamil  *
982f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
983f4c4dcf4SKowalski, Kamil  *
984f4c4dcf4SKowalski, Kamil  * @returns Message ResourceExhaustion formatted to JSON */
9851668ce6dSEd Tanous nlohmann::json resourceExhaustion(std::string_view arg1);
986b5c07418SJames Feist 
9871668ce6dSEd Tanous void resourceExhaustion(crow::Response& res, std::string_view arg1);
988f4c4dcf4SKowalski, Kamil 
989f4c4dcf4SKowalski, Kamil /**
990f4c4dcf4SKowalski, Kamil  * @brief Formats AccountModified message into JSON
991f4c4dcf4SKowalski, Kamil  * Message body: "The account was successfully modified."
992f4c4dcf4SKowalski, Kamil  *
993f4c4dcf4SKowalski, Kamil  *
994f4c4dcf4SKowalski, Kamil  * @returns Message AccountModified formatted to JSON */
99565176d39SEd Tanous nlohmann::json accountModified();
996b5c07418SJames Feist 
997a08b46ccSJason M. Bills void accountModified(crow::Response& res);
998f4c4dcf4SKowalski, Kamil 
999f4c4dcf4SKowalski, Kamil /**
1000f4c4dcf4SKowalski, Kamil  * @brief Formats QueryParameterOutOfRange message into JSON
100166ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the query parameter <arg2> is out of
100266ac2b8cSJason M. Bills  * range <arg3>."
1003f4c4dcf4SKowalski, Kamil  *
1004f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1005f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
1006f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
1007f4c4dcf4SKowalski, Kamil  *
1008f4c4dcf4SKowalski, Kamil  * @returns Message QueryParameterOutOfRange formatted to JSON */
10091668ce6dSEd Tanous nlohmann::json queryParameterOutOfRange(std::string_view arg1,
10101668ce6dSEd Tanous                                         std::string_view arg2,
10111668ce6dSEd Tanous                                         std::string_view arg3);
1012b5c07418SJames Feist 
10131668ce6dSEd Tanous void queryParameterOutOfRange(crow::Response& res, std::string_view arg1,
10141668ce6dSEd Tanous                               std::string_view arg2, std::string_view arg3);
1015f4c4dcf4SKowalski, Kamil 
10163bf4e632SJoseph Reynolds /**
10173bf4e632SJoseph Reynolds  * @brief Formats PasswordChangeRequired message into JSON
10183bf4e632SJoseph Reynolds  * Message body: The password provided for this account must be changed
10193bf4e632SJoseph Reynolds  * before access is granted.  PATCH the 'Password' property for this
10203bf4e632SJoseph Reynolds  * account located at the target URI '%1' to complete this process.
10213bf4e632SJoseph Reynolds  *
10223bf4e632SJoseph Reynolds  * @param[in] arg1 Parameter of message that will replace %1 in its body.
10233bf4e632SJoseph Reynolds  *
10243bf4e632SJoseph Reynolds  * @returns Message PasswordChangeRequired formatted to JSON */
1025ace85d60SEd Tanous 
1026ace85d60SEd Tanous nlohmann::json passwordChangeRequired(const boost::urls::url_view& arg1);
1027ace85d60SEd Tanous 
1028ace85d60SEd Tanous void passwordChangeRequired(crow::Response& res,
1029ace85d60SEd Tanous                             const boost::urls::url_view& arg1);
10303bf4e632SJoseph Reynolds 
10314cde5d90SJames Feist /**
10324cde5d90SJames Feist  * @brief Formats InvalidUpload message into JSON
10334cde5d90SJames Feist  * Message body: Invalid file uploaded to %1: %2.*
10344cde5d90SJames Feist  * @param[in] arg1 Parameter of message that will replace %1 in its body.
10354cde5d90SJames Feist  * @param[in] arg2 Parameter of message that will replace %2 in its body.
10364cde5d90SJames Feist  *
10374cde5d90SJames Feist  * @returns Message InvalidUpload formatted to JSON */
10381668ce6dSEd Tanous nlohmann::json invalidUpload(std::string_view arg1, std::string_view arg2);
10394cde5d90SJames Feist 
10401668ce6dSEd Tanous void invalidUpload(crow::Response& res, std::string_view arg1,
10411668ce6dSEd Tanous                    std::string_view arg2);
10424cde5d90SJames Feist 
1043ae688313SNan Zhou /**
1044ae688313SNan Zhou  * @brief Formats InsufficientStorage message into JSON
1045ae688313SNan Zhou  * Message body: "Insufficent storage or memory available to complete the
1046ae688313SNan Zhou  *  request."
1047ae688313SNan Zhou  * @returns Message InsufficientStorage formatted to JSON */
1048ae688313SNan Zhou nlohmann::json insufficientStorage();
1049ae688313SNan Zhou 
1050ae688313SNan Zhou void insufficientStorage(crow::Response& res);
1051ae688313SNan Zhou 
105244c70412SEd Tanous /**
105344c70412SEd Tanous  * @brief Formats OperationNotAllowed message into JSON
105444c70412SEd Tanous  * Message body: "he HTTP method is not allowed on this resource."
105544c70412SEd Tanous  * @returns Message OperationNotAllowed formatted to JSON */
105644c70412SEd Tanous nlohmann::json operationNotAllowed();
105744c70412SEd Tanous 
105844c70412SEd Tanous void operationNotAllowed(crow::Response& res);
105944c70412SEd Tanous 
1060f4c4dcf4SKowalski, Kamil } // namespace messages
1061f4c4dcf4SKowalski, Kamil 
1062f4c4dcf4SKowalski, Kamil } // namespace redfish
1063