xref: /openbmc/bmcweb/features/redfish/include/error_messages.hpp (revision 2a6af81c81101a5ade887d7119a48fa6818255fb)
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
1704e438cbSEd Tanous #include "http_response.hpp"
18f12894f8SJason M. Bills 
19ace85d60SEd Tanous #include <boost/url/urls.hpp>
201214b7e7SGunnar Mills #include <nlohmann/json.hpp>
21df5415fcSEd Tanous #include <source_location.hpp>
221214b7e7SGunnar Mills 
239ea15c35SEd Tanous #include <string>
249ea15c35SEd Tanous 
251abe55efSEd Tanous namespace redfish
261abe55efSEd Tanous {
27f4c4dcf4SKowalski, Kamil 
281abe55efSEd Tanous namespace messages
291abe55efSEd Tanous {
30f4c4dcf4SKowalski, Kamil 
3181856681SAsmitha Karunanithi constexpr const char* messageVersionPrefix = "Base.1.11.0.";
3255c7b7a2SEd Tanous constexpr const char* messageAnnotation = "@Message.ExtendedInfo";
33f4c4dcf4SKowalski, Kamil 
34f4c4dcf4SKowalski, Kamil /**
35f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceInUse message into JSON
36f4c4dcf4SKowalski, Kamil  * Message body: "The change to the requested resource failed because the
37f4c4dcf4SKowalski, Kamil  * resource is in use or in transition."
38f4c4dcf4SKowalski, Kamil  *
39f4c4dcf4SKowalski, Kamil  *
40f4c4dcf4SKowalski, Kamil  * @returns Message ResourceInUse formatted to JSON */
4165176d39SEd Tanous nlohmann::json resourceInUse();
42b5c07418SJames Feist 
43f12894f8SJason M. Bills void resourceInUse(crow::Response& res);
44f4c4dcf4SKowalski, Kamil 
45f4c4dcf4SKowalski, Kamil /**
46f4c4dcf4SKowalski, Kamil  * @brief Formats MalformedJSON message into JSON
47f4c4dcf4SKowalski, Kamil  * Message body: "The request body submitted was malformed JSON and could not be
48f4c4dcf4SKowalski, Kamil  * parsed by the receiving service."
49f4c4dcf4SKowalski, Kamil  *
50f4c4dcf4SKowalski, Kamil  *
51f4c4dcf4SKowalski, Kamil  * @returns Message MalformedJSON formatted to JSON */
5265176d39SEd Tanous nlohmann::json malformedJSON();
53b5c07418SJames Feist 
54f12894f8SJason M. Bills void malformedJSON(crow::Response& res);
55f4c4dcf4SKowalski, Kamil 
56f4c4dcf4SKowalski, Kamil /**
57f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceMissingAtURI message into JSON
5866ac2b8cSJason M. Bills  * Message body: "The resource at the URI <arg1> was not found."
59f4c4dcf4SKowalski, Kamil  *
60f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
61f4c4dcf4SKowalski, Kamil  *
62f4c4dcf4SKowalski, Kamil  * @returns Message ResourceMissingAtURI formatted to JSON */
63ace85d60SEd Tanous nlohmann::json resourceMissingAtURI(const boost::urls::url_view& arg1);
64b5c07418SJames Feist 
65ace85d60SEd Tanous void resourceMissingAtURI(crow::Response& res,
66ace85d60SEd Tanous                           const boost::urls::url_view& arg1);
67f4c4dcf4SKowalski, Kamil 
68f4c4dcf4SKowalski, Kamil /**
69f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterValueFormatError message into JSON
7066ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
71f4c4dcf4SKowalski, Kamil  * is of a different format than the parameter can accept."
72f4c4dcf4SKowalski, Kamil  *
73f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
74f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
75f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
76f4c4dcf4SKowalski, Kamil  *
77f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterValueFormatError formatted to JSON */
781668ce6dSEd Tanous nlohmann::json actionParameterValueFormatError(std::string_view arg1,
791668ce6dSEd Tanous                                                std::string_view arg2,
801668ce6dSEd Tanous                                                std::string_view arg3);
81b5c07418SJames Feist 
821668ce6dSEd Tanous void actionParameterValueFormatError(crow::Response& res, std::string_view arg1,
831668ce6dSEd Tanous                                      std::string_view arg2,
841668ce6dSEd Tanous                                      std::string_view arg3);
85f4c4dcf4SKowalski, Kamil 
86f4c4dcf4SKowalski, Kamil /**
87f4c4dcf4SKowalski, Kamil  * @brief Formats InternalError message into JSON
88f4c4dcf4SKowalski, Kamil  * Message body: "The request failed due to an internal service error.  The
89f4c4dcf4SKowalski, Kamil  * service is still operational."
90f4c4dcf4SKowalski, Kamil  *
91f4c4dcf4SKowalski, Kamil  *
92f4c4dcf4SKowalski, Kamil  * @returns Message InternalError formatted to JSON */
9365176d39SEd Tanous nlohmann::json internalError();
94b5c07418SJames Feist 
959eb808c1SEd Tanous void internalError(crow::Response& res, bmcweb::source_location location =
96df5415fcSEd Tanous                                             bmcweb::source_location::current());
97f12894f8SJason M. Bills 
98f12894f8SJason M. Bills /**
99f4c4dcf4SKowalski, Kamil  * @brief Formats UnrecognizedRequestBody message into JSON
100f4c4dcf4SKowalski, Kamil  * Message body: "The service detected a malformed request body that it was
101f4c4dcf4SKowalski, Kamil  * unable to interpret."
102f4c4dcf4SKowalski, Kamil  *
103f4c4dcf4SKowalski, Kamil  *
104f4c4dcf4SKowalski, Kamil  * @returns Message UnrecognizedRequestBody formatted to JSON */
10565176d39SEd Tanous nlohmann::json unrecognizedRequestBody();
106b5c07418SJames Feist 
107f12894f8SJason M. Bills void unrecognizedRequestBody(crow::Response& res);
108f4c4dcf4SKowalski, Kamil 
109f4c4dcf4SKowalski, Kamil /**
110f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceAtUriUnauthorized message into JSON
11166ac2b8cSJason M. Bills  * Message body: "While accessing the resource at <arg1>, the service received
11266ac2b8cSJason M. Bills  * an authorization error <arg2>."
113f4c4dcf4SKowalski, Kamil  *
114f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
115f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
116f4c4dcf4SKowalski, Kamil  *
117f4c4dcf4SKowalski, Kamil  * @returns Message ResourceAtUriUnauthorized formatted to JSON */
118ace85d60SEd Tanous nlohmann::json resourceAtUriUnauthorized(const boost::urls::url_view& arg1,
1191668ce6dSEd Tanous                                          std::string_view arg2);
120b5c07418SJames Feist 
121ace85d60SEd Tanous void resourceAtUriUnauthorized(crow::Response& res,
122ace85d60SEd Tanous                                const boost::urls::url_view& arg1,
1231668ce6dSEd Tanous                                std::string_view arg2);
124f4c4dcf4SKowalski, Kamil 
125f4c4dcf4SKowalski, Kamil /**
126f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterUnknown message into JSON
12766ac2b8cSJason M. Bills  * Message body: "The action <arg1> was submitted with the invalid parameter
12866ac2b8cSJason M. Bills  * <arg2>."
129f4c4dcf4SKowalski, Kamil  *
130f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
131f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
132f4c4dcf4SKowalski, Kamil  *
133f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterUnknown formatted to JSON */
1341668ce6dSEd Tanous nlohmann::json actionParameterUnknown(std::string_view arg1,
1351668ce6dSEd Tanous                                       std::string_view arg2);
136b5c07418SJames Feist 
1371668ce6dSEd Tanous void actionParameterUnknown(crow::Response& res, std::string_view arg1,
1381668ce6dSEd Tanous                             std::string_view arg2);
139f4c4dcf4SKowalski, Kamil 
140f4c4dcf4SKowalski, Kamil /**
141f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceCannotBeDeleted message into JSON
142f4c4dcf4SKowalski, Kamil  * Message body: "The delete request failed because the resource requested
143f4c4dcf4SKowalski, Kamil  * cannot be deleted."
144f4c4dcf4SKowalski, Kamil  *
145f4c4dcf4SKowalski, Kamil  *
146f4c4dcf4SKowalski, Kamil  * @returns Message ResourceCannotBeDeleted formatted to JSON */
14765176d39SEd Tanous nlohmann::json resourceCannotBeDeleted();
148b5c07418SJames Feist 
149f12894f8SJason M. Bills void resourceCannotBeDeleted(crow::Response& res);
150f4c4dcf4SKowalski, Kamil 
151f4c4dcf4SKowalski, Kamil /**
152f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyDuplicate message into JSON
15366ac2b8cSJason M. Bills  * Message body: "The property <arg1> was duplicated in the request."
154f4c4dcf4SKowalski, Kamil  *
155f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
156f4c4dcf4SKowalski, Kamil  *
157f4c4dcf4SKowalski, Kamil  * @returns Message PropertyDuplicate formatted to JSON */
1581668ce6dSEd Tanous nlohmann::json propertyDuplicate(std::string_view arg1);
159b5c07418SJames Feist 
1601668ce6dSEd Tanous void propertyDuplicate(crow::Response& res, std::string_view arg1);
161f4c4dcf4SKowalski, Kamil 
162f4c4dcf4SKowalski, Kamil /**
163f4c4dcf4SKowalski, Kamil  * @brief Formats ServiceTemporarilyUnavailable message into JSON
16466ac2b8cSJason M. Bills  * Message body: "The service is temporarily unavailable.  Retry in <arg1>
165f4c4dcf4SKowalski, Kamil  * seconds."
166f4c4dcf4SKowalski, Kamil  *
167f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
168f4c4dcf4SKowalski, Kamil  *
169f4c4dcf4SKowalski, Kamil  * @returns Message ServiceTemporarilyUnavailable formatted to JSON */
1701668ce6dSEd Tanous nlohmann::json serviceTemporarilyUnavailable(std::string_view arg1);
171b5c07418SJames Feist 
1721668ce6dSEd Tanous void serviceTemporarilyUnavailable(crow::Response& res, std::string_view arg1);
173f4c4dcf4SKowalski, Kamil 
174f4c4dcf4SKowalski, Kamil /**
175f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceAlreadyExists message into JSON
17666ac2b8cSJason M. Bills  * Message body: "The requested resource of type <arg1> with the property <arg2>
17766ac2b8cSJason M. Bills  * with the value <arg3> already exists."
178f4c4dcf4SKowalski, Kamil  *
179f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
180f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
181f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
182f4c4dcf4SKowalski, Kamil  *
183f4c4dcf4SKowalski, Kamil  * @returns Message ResourceAlreadyExists formatted to JSON */
1841668ce6dSEd Tanous nlohmann::json resourceAlreadyExists(std::string_view arg1,
1851668ce6dSEd Tanous                                      std::string_view arg2,
1861668ce6dSEd Tanous                                      std::string_view arg3);
187b5c07418SJames Feist 
1881668ce6dSEd Tanous void resourceAlreadyExists(crow::Response& res, std::string_view arg1,
1891668ce6dSEd Tanous                            std::string_view arg2, std::string_view arg3);
190f4c4dcf4SKowalski, Kamil 
191f4c4dcf4SKowalski, Kamil /**
192f4c4dcf4SKowalski, Kamil  * @brief Formats AccountForSessionNoLongerExists message into JSON
193f4c4dcf4SKowalski, Kamil  * Message body: "The account for the current session has been removed, thus the
194f4c4dcf4SKowalski, Kamil  * current session has been removed as well."
195f4c4dcf4SKowalski, Kamil  *
196f4c4dcf4SKowalski, Kamil  *
197f4c4dcf4SKowalski, Kamil  * @returns Message AccountForSessionNoLongerExists formatted to JSON */
19865176d39SEd Tanous nlohmann::json accountForSessionNoLongerExists();
199b5c07418SJames Feist 
200f12894f8SJason M. Bills void accountForSessionNoLongerExists(crow::Response& res);
201f4c4dcf4SKowalski, Kamil 
202f4c4dcf4SKowalski, Kamil /**
203f4c4dcf4SKowalski, Kamil  * @brief Formats CreateFailedMissingReqProperties message into JSON
204f4c4dcf4SKowalski, Kamil  * Message body: "The create operation failed because the required property
20566ac2b8cSJason M. Bills  * <arg1> was missing from the request."
206f4c4dcf4SKowalski, Kamil  *
207f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
208f4c4dcf4SKowalski, Kamil  *
209f4c4dcf4SKowalski, Kamil  * @returns Message CreateFailedMissingReqProperties formatted to JSON */
2101668ce6dSEd Tanous nlohmann::json createFailedMissingReqProperties(std::string_view arg1);
211b5c07418SJames Feist 
212f12894f8SJason M. Bills void createFailedMissingReqProperties(crow::Response& res,
2131668ce6dSEd Tanous                                       std::string_view arg1);
214f4c4dcf4SKowalski, Kamil 
215f4c4dcf4SKowalski, Kamil /**
216f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueFormatError message into JSON
21766ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the property <arg2> is of a different
218f4c4dcf4SKowalski, Kamil  * format than the property can accept."
219f4c4dcf4SKowalski, Kamil  *
220f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
221f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
222f4c4dcf4SKowalski, Kamil  *
223f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueFormatError formatted to JSON */
2241668ce6dSEd Tanous nlohmann::json propertyValueFormatError(std::string_view arg1,
2251668ce6dSEd Tanous                                         std::string_view arg2);
226b5c07418SJames Feist 
2271668ce6dSEd Tanous void propertyValueFormatError(crow::Response& res, std::string_view arg1,
2281668ce6dSEd Tanous                               std::string_view arg2);
229f4c4dcf4SKowalski, Kamil 
230f4c4dcf4SKowalski, Kamil /**
231f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueNotInList message into JSON
23266ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the property <arg2> is not in the list of
233f4c4dcf4SKowalski, Kamil  * acceptable values."
234f4c4dcf4SKowalski, Kamil  *
235f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
236f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
237f4c4dcf4SKowalski, Kamil  *
238f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueNotInList formatted to JSON */
2391668ce6dSEd Tanous nlohmann::json propertyValueNotInList(std::string_view arg1,
2401668ce6dSEd Tanous                                       std::string_view arg2);
241b5c07418SJames Feist 
2421668ce6dSEd Tanous void propertyValueNotInList(crow::Response& res, std::string_view arg1,
2431668ce6dSEd Tanous                             std::string_view arg2);
244f4c4dcf4SKowalski, Kamil 
245f4c4dcf4SKowalski, Kamil /**
246f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceAtUriInUnknownFormat message into JSON
24766ac2b8cSJason M. Bills  * Message body: "The resource at <arg1> is in a format not recognized by the
248f4c4dcf4SKowalski, Kamil  * service."
249f4c4dcf4SKowalski, Kamil  *
250f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
251f4c4dcf4SKowalski, Kamil  *
252f4c4dcf4SKowalski, Kamil  * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */
253ace85d60SEd Tanous nlohmann::json resourceAtUriInUnknownFormat(const boost::urls::url_view& arg1);
254b5c07418SJames Feist 
255ace85d60SEd Tanous void resourceAtUriInUnknownFormat(crow::Response& res,
256ace85d60SEd Tanous                                   const boost::urls::url_view& arg1);
257f4c4dcf4SKowalski, Kamil 
258f4c4dcf4SKowalski, Kamil /**
25981856681SAsmitha Karunanithi  * @brief Formats ServiceDisabled message into JSON
26081856681SAsmitha Karunanithi  * Message body: "The operation failed because the service at <arg1> is disabled
26181856681SAsmitha Karunanithi  * and " cannot accept requests."
26281856681SAsmitha Karunanithi  *
26381856681SAsmitha Karunanithi  * @param[in] arg1 Parameter of message that will replace %1 in its body.
26481856681SAsmitha Karunanithi  *
26581856681SAsmitha Karunanithi  * @returns Message ServiceDisabled formatted to JSON */
2661668ce6dSEd Tanous nlohmann::json serviceDisabled(std::string_view arg1);
26781856681SAsmitha Karunanithi 
2681668ce6dSEd Tanous void serviceDisabled(crow::Response& res, std::string_view arg1);
26981856681SAsmitha Karunanithi 
27081856681SAsmitha Karunanithi /**
271f4c4dcf4SKowalski, Kamil  * @brief Formats ServiceInUnknownState message into JSON
272f4c4dcf4SKowalski, Kamil  * Message body: "The operation failed because the service is in an unknown
273f4c4dcf4SKowalski, Kamil  * state and can no longer take incoming requests."
274f4c4dcf4SKowalski, Kamil  *
275f4c4dcf4SKowalski, Kamil  *
276f4c4dcf4SKowalski, Kamil  * @returns Message ServiceInUnknownState formatted to JSON */
27765176d39SEd Tanous nlohmann::json serviceInUnknownState();
278b5c07418SJames Feist 
279f12894f8SJason M. Bills void serviceInUnknownState(crow::Response& res);
280f4c4dcf4SKowalski, Kamil 
281f4c4dcf4SKowalski, Kamil /**
282f4c4dcf4SKowalski, Kamil  * @brief Formats EventSubscriptionLimitExceeded message into JSON
283f4c4dcf4SKowalski, Kamil  * Message body: "The event subscription failed due to the number of
284f4c4dcf4SKowalski, Kamil  * simultaneous subscriptions exceeding the limit of the implementation."
285f4c4dcf4SKowalski, Kamil  *
286f4c4dcf4SKowalski, Kamil  *
287f4c4dcf4SKowalski, Kamil  * @returns Message EventSubscriptionLimitExceeded formatted to JSON */
28865176d39SEd Tanous nlohmann::json eventSubscriptionLimitExceeded();
289b5c07418SJames Feist 
290f12894f8SJason M. Bills void eventSubscriptionLimitExceeded(crow::Response& res);
291f4c4dcf4SKowalski, Kamil 
292f4c4dcf4SKowalski, Kamil /**
293f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterMissing message into JSON
29466ac2b8cSJason M. Bills  * Message body: "The action <arg1> requires the parameter <arg2> to be present
295f4c4dcf4SKowalski, Kamil  * in the request body."
296f4c4dcf4SKowalski, Kamil  *
297f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
298f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
299f4c4dcf4SKowalski, Kamil  *
300f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterMissing formatted to JSON */
3011668ce6dSEd Tanous nlohmann::json actionParameterMissing(std::string_view arg1,
3021668ce6dSEd Tanous                                       std::string_view arg2);
303b5c07418SJames Feist 
3041668ce6dSEd Tanous void actionParameterMissing(crow::Response& res, std::string_view arg1,
3051668ce6dSEd Tanous                             std::string_view arg2);
306f4c4dcf4SKowalski, Kamil 
307f4c4dcf4SKowalski, Kamil /**
308f4c4dcf4SKowalski, Kamil  * @brief Formats StringValueTooLong message into JSON
30966ac2b8cSJason M. Bills  * Message body: "The string <arg1> exceeds the length limit <arg2>."
310f4c4dcf4SKowalski, Kamil  *
311f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
312f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
313f4c4dcf4SKowalski, Kamil  *
314f4c4dcf4SKowalski, Kamil  * @returns Message StringValueTooLong formatted to JSON */
3151668ce6dSEd Tanous nlohmann::json stringValueTooLong(std::string_view arg1, int arg2);
316b5c07418SJames Feist 
3171668ce6dSEd Tanous void stringValueTooLong(crow::Response& res, std::string_view arg1, int arg2);
318f4c4dcf4SKowalski, Kamil 
319f4c4dcf4SKowalski, Kamil /**
320cc9139ecSJason M. Bills  * @brief Formats SessionTerminated message into JSON
321cc9139ecSJason M. Bills  * Message body: "The session was successfully terminated."
322cc9139ecSJason M. Bills  *
323cc9139ecSJason M. Bills  *
324cc9139ecSJason M. Bills  * @returns Message SessionTerminated formatted to JSON */
32565176d39SEd Tanous nlohmann::json sessionTerminated();
326b5c07418SJames Feist 
327cc9139ecSJason M. Bills void sessionTerminated(crow::Response& res);
328cc9139ecSJason M. Bills 
329cc9139ecSJason M. Bills /**
330684bb4b8SJason M. Bills  * @brief Formats SubscriptionTerminated message into JSON
331684bb4b8SJason M. Bills  * Message body: "The event subscription has been terminated."
332684bb4b8SJason M. Bills  *
333684bb4b8SJason M. Bills  *
334684bb4b8SJason M. Bills  * @returns Message SubscriptionTerminated formatted to JSON */
33565176d39SEd Tanous nlohmann::json subscriptionTerminated();
336684bb4b8SJason M. Bills 
337684bb4b8SJason M. Bills void subscriptionTerminated(crow::Response& res);
338684bb4b8SJason M. Bills 
339684bb4b8SJason M. Bills /**
340cc9139ecSJason M. Bills  * @brief Formats ResourceTypeIncompatible message into JSON
341cc9139ecSJason M. Bills  * Message body: "The @odata.type of the request body <arg1> is incompatible
342cc9139ecSJason M. Bills  * with the @odata.type of the resource which is <arg2>."
343cc9139ecSJason M. Bills  *
344cc9139ecSJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
345cc9139ecSJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
346cc9139ecSJason M. Bills  *
347cc9139ecSJason M. Bills  * @returns Message ResourceTypeIncompatible formatted to JSON */
3481668ce6dSEd Tanous nlohmann::json resourceTypeIncompatible(std::string_view arg1,
3491668ce6dSEd Tanous                                         std::string_view arg2);
350b5c07418SJames Feist 
3511668ce6dSEd Tanous void resourceTypeIncompatible(crow::Response& res, std::string_view arg1,
3521668ce6dSEd Tanous                               std::string_view arg2);
353cc9139ecSJason M. Bills 
354cc9139ecSJason M. Bills /**
355684bb4b8SJason M. Bills  * @brief Formats ResetRequired message into JSON
356684bb4b8SJason M. Bills  * Message body: "In order to complete the operation, a component reset is
357684bb4b8SJason M. Bills  * required with the Reset action URI '<arg1>' and ResetType '<arg2>'."
358684bb4b8SJason M. Bills  *
359684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
360684bb4b8SJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
361684bb4b8SJason M. Bills  *
362684bb4b8SJason M. Bills  * @returns Message ResetRequired formatted to JSON */
363ace85d60SEd Tanous nlohmann::json resetRequired(const boost::urls::url_view& arg1,
3641668ce6dSEd Tanous                              std::string_view arg2);
365684bb4b8SJason M. Bills 
366ace85d60SEd Tanous void resetRequired(crow::Response& res, const boost::urls::url_view& arg1,
3671668ce6dSEd Tanous                    std::string_view arg2);
368684bb4b8SJason M. Bills 
369684bb4b8SJason M. Bills /**
370684bb4b8SJason M. Bills  * @brief Formats ChassisPowerStateOnRequired message into JSON
371684bb4b8SJason M. Bills  * Message body: "The Chassis with Id '<arg1>' requires to be powered on to
372684bb4b8SJason M. Bills  * perform this request."
373684bb4b8SJason M. Bills  *
374684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
375684bb4b8SJason M. Bills  *
376684bb4b8SJason M. Bills  * @returns Message ChassisPowerStateOnRequired formatted to JSON */
3771668ce6dSEd Tanous nlohmann::json chassisPowerStateOnRequired(std::string_view arg1);
378684bb4b8SJason M. Bills 
3791668ce6dSEd Tanous void chassisPowerStateOnRequired(crow::Response& res, std::string_view arg1);
380684bb4b8SJason M. Bills 
381684bb4b8SJason M. Bills /**
382684bb4b8SJason M. Bills  * @brief Formats ChassisPowerStateOffRequired message into JSON
383684bb4b8SJason M. Bills  * Message body: "The Chassis with Id '<arg1>' requires to be powered off to
384684bb4b8SJason M. Bills  * perform this request."
385684bb4b8SJason M. Bills  *
386684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
387684bb4b8SJason M. Bills  *
388684bb4b8SJason M. Bills  * @returns Message ChassisPowerStateOffRequired formatted to JSON */
3891668ce6dSEd Tanous nlohmann::json chassisPowerStateOffRequired(std::string_view arg1);
390684bb4b8SJason M. Bills 
3911668ce6dSEd Tanous void chassisPowerStateOffRequired(crow::Response& res, std::string_view arg1);
392684bb4b8SJason M. Bills 
393684bb4b8SJason M. Bills /**
394684bb4b8SJason M. Bills  * @brief Formats PropertyValueConflict message into JSON
395684bb4b8SJason M. Bills  * Message body: "The property '<arg1>' could not be written because its value
396684bb4b8SJason M. Bills  * would conflict with the value of the '<arg2>' property."
397684bb4b8SJason M. Bills  *
398684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
399684bb4b8SJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
400684bb4b8SJason M. Bills  *
401684bb4b8SJason M. Bills  * @returns Message PropertyValueConflict formatted to JSON */
4021668ce6dSEd Tanous nlohmann::json propertyValueConflict(std::string_view arg1,
4031668ce6dSEd Tanous                                      std::string_view arg2);
404684bb4b8SJason M. Bills 
4051668ce6dSEd Tanous void propertyValueConflict(crow::Response& res, std::string_view arg1,
4061668ce6dSEd Tanous                            std::string_view arg2);
407684bb4b8SJason M. Bills 
408684bb4b8SJason M. Bills /**
409*2a6af81cSRamesh Iyyar  * @brief Formats PropertyValueResourceConflict message into JSON
410*2a6af81cSRamesh Iyyar  * Message body: "The property '%1' with the requested value of '%2' could
411*2a6af81cSRamesh Iyyar  * not be written because the value conflicts with the state or configuration
412*2a6af81cSRamesh Iyyar  * of the resource at '%3'."
413*2a6af81cSRamesh Iyyar  *
414*2a6af81cSRamesh Iyyar  * @param[in] arg1 Parameter of message that will replace %1 in its body.
415*2a6af81cSRamesh Iyyar  * @param[in] arg2 Parameter of message that will replace %2 in its body.
416*2a6af81cSRamesh Iyyar  * @param[in] arg3 Parameter of message that will replace %3 in its body.
417*2a6af81cSRamesh Iyyar  *
418*2a6af81cSRamesh Iyyar  * @returns Message PropertyValueResourceConflict to JSON */
419*2a6af81cSRamesh Iyyar nlohmann::json propertyValueResourceConflict(std::string_view arg1,
420*2a6af81cSRamesh Iyyar                                              std::string_view arg2,
421*2a6af81cSRamesh Iyyar                                              const boost::urls::url_view& arg3);
422*2a6af81cSRamesh Iyyar 
423*2a6af81cSRamesh Iyyar void propertyValueResourceConflict(crow::Response& res, std::string_view arg1,
424*2a6af81cSRamesh Iyyar                                    std::string_view arg2,
425*2a6af81cSRamesh Iyyar                                    const boost::urls::url_view& arg3);
426*2a6af81cSRamesh Iyyar 
427*2a6af81cSRamesh Iyyar /**
428684bb4b8SJason M. Bills  * @brief Formats PropertyValueIncorrect message into JSON
429684bb4b8SJason M. Bills  * Message body: "The property '<arg1>' with the requested value of '<arg2>'
430684bb4b8SJason M. Bills  * could not be written because the value does not meet the constraints of the
431684bb4b8SJason M. Bills  * implementation."
432684bb4b8SJason M. Bills  *
433684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
434684bb4b8SJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
435684bb4b8SJason M. Bills  *
436684bb4b8SJason M. Bills  * @returns Message PropertyValueIncorrect formatted to JSON */
4371668ce6dSEd Tanous nlohmann::json propertyValueIncorrect(std::string_view arg1,
4381668ce6dSEd Tanous                                       std::string_view arg2);
439684bb4b8SJason M. Bills 
4401668ce6dSEd Tanous void propertyValueIncorrect(crow::Response& res, std::string_view arg1,
4411668ce6dSEd Tanous                             std::string_view arg2);
442684bb4b8SJason M. Bills 
443684bb4b8SJason M. Bills /**
444684bb4b8SJason M. Bills  * @brief Formats ResourceCreationConflict message into JSON
445684bb4b8SJason M. Bills  * Message body: "The resource could not be created.  The service has a resource
446684bb4b8SJason M. Bills  * at URI '<arg1>' that conflicts with the creation request."
447684bb4b8SJason M. Bills  *
448684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
449684bb4b8SJason M. Bills  *
450684bb4b8SJason M. Bills  * @returns Message ResourceCreationConflict formatted to JSON */
451f7725d79SEd Tanous nlohmann::json resourceCreationConflict(const boost::urls::url_view& arg1);
452684bb4b8SJason M. Bills 
453f7725d79SEd Tanous void resourceCreationConflict(crow::Response& res,
454f7725d79SEd Tanous                               const boost::urls::url_view& arg1);
455684bb4b8SJason M. Bills 
456684bb4b8SJason M. Bills /**
457684bb4b8SJason M. Bills  * @brief Formats MaximumErrorsExceeded message into JSON
458684bb4b8SJason M. Bills  * Message body: "Too many errors have occurred to report them all."
459684bb4b8SJason M. Bills  *
460684bb4b8SJason M. Bills  *
461684bb4b8SJason M. Bills  * @returns Message MaximumErrorsExceeded formatted to JSON */
46265176d39SEd Tanous nlohmann::json maximumErrorsExceeded();
463684bb4b8SJason M. Bills 
464684bb4b8SJason M. Bills void maximumErrorsExceeded(crow::Response& res);
465684bb4b8SJason M. Bills 
466684bb4b8SJason M. Bills /**
467684bb4b8SJason M. Bills  * @brief Formats PreconditionFailed message into JSON
468684bb4b8SJason M. Bills  * Message body: "The ETag supplied did not match the ETag required to change
469684bb4b8SJason M. Bills  * this resource."
470684bb4b8SJason M. Bills  *
471684bb4b8SJason M. Bills  *
472684bb4b8SJason M. Bills  * @returns Message PreconditionFailed formatted to JSON */
47365176d39SEd Tanous nlohmann::json preconditionFailed();
474684bb4b8SJason M. Bills 
475684bb4b8SJason M. Bills void preconditionFailed(crow::Response& res);
476684bb4b8SJason M. Bills 
477684bb4b8SJason M. Bills /**
478684bb4b8SJason M. Bills  * @brief Formats PreconditionRequired message into JSON
479684bb4b8SJason M. Bills  * Message body: "A precondition header or annotation is required to change this
480684bb4b8SJason M. Bills  * resource."
481684bb4b8SJason M. Bills  *
482684bb4b8SJason M. Bills  *
483684bb4b8SJason M. Bills  * @returns Message PreconditionRequired formatted to JSON */
48465176d39SEd Tanous nlohmann::json preconditionRequired();
485684bb4b8SJason M. Bills 
486684bb4b8SJason M. Bills void preconditionRequired(crow::Response& res);
487684bb4b8SJason M. Bills 
488684bb4b8SJason M. Bills /**
489684bb4b8SJason M. Bills  * @brief Formats OperationFailed message into JSON
490684bb4b8SJason M. Bills  * Message body: "An error occurred internal to the service as part of the
491684bb4b8SJason M. Bills  * overall request.  Partial results may have been returned."
492684bb4b8SJason M. Bills  *
493684bb4b8SJason M. Bills  *
494684bb4b8SJason M. Bills  * @returns Message OperationFailed formatted to JSON */
49565176d39SEd Tanous nlohmann::json operationFailed();
496684bb4b8SJason M. Bills 
497684bb4b8SJason M. Bills void operationFailed(crow::Response& res);
498684bb4b8SJason M. Bills 
499684bb4b8SJason M. Bills /**
500684bb4b8SJason M. Bills  * @brief Formats OperationTimeout message into JSON
501684bb4b8SJason M. Bills  * Message body: "A timeout internal to the service occured as part of the
502684bb4b8SJason M. Bills  * request.  Partial results may have been returned."
503684bb4b8SJason M. Bills  *
504684bb4b8SJason M. Bills  *
505684bb4b8SJason M. Bills  * @returns Message OperationTimeout formatted to JSON */
50665176d39SEd Tanous nlohmann::json operationTimeout();
507684bb4b8SJason M. Bills 
508684bb4b8SJason M. Bills void operationTimeout(crow::Response& res);
509684bb4b8SJason M. Bills 
510684bb4b8SJason M. Bills /**
511f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueTypeError message into JSON
51266ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the property <arg2> is of a different
513f4c4dcf4SKowalski, Kamil  * type than the property can accept."
514f4c4dcf4SKowalski, Kamil  *
515f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
516f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
517f4c4dcf4SKowalski, Kamil  *
518f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueTypeError formatted to JSON */
5191668ce6dSEd Tanous nlohmann::json propertyValueTypeError(std::string_view arg1,
5201668ce6dSEd Tanous                                       std::string_view arg2);
521b5c07418SJames Feist 
5221668ce6dSEd Tanous void propertyValueTypeError(crow::Response& res, std::string_view arg1,
5231668ce6dSEd Tanous                             std::string_view arg2);
524f4c4dcf4SKowalski, Kamil 
525f4c4dcf4SKowalski, Kamil /**
526f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceNotFound message into JSON
52766ac2b8cSJason M. Bills  * Message body: "The requested resource of type <arg1> named <arg2> was not
528f4c4dcf4SKowalski, Kamil  * found."
529f4c4dcf4SKowalski, Kamil  *
530f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
531f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
532f4c4dcf4SKowalski, Kamil  *
533f4c4dcf4SKowalski, Kamil  * @returns Message ResourceNotFound formatted to JSON */
5341668ce6dSEd Tanous nlohmann::json resourceNotFound(std::string_view arg1, std::string_view arg2);
535b5c07418SJames Feist 
5361668ce6dSEd Tanous void resourceNotFound(crow::Response& res, std::string_view arg1,
5371668ce6dSEd Tanous                       std::string_view arg2);
538f4c4dcf4SKowalski, Kamil 
539f4c4dcf4SKowalski, Kamil /**
540f4c4dcf4SKowalski, Kamil  * @brief Formats CouldNotEstablishConnection message into JSON
54155c7b7a2SEd Tanous  * Message body: "The service failed to establish a Connection with the URI
54266ac2b8cSJason M. Bills  * <arg1>."
543f4c4dcf4SKowalski, Kamil  *
544f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
545f4c4dcf4SKowalski, Kamil  *
546f4c4dcf4SKowalski, Kamil  * @returns Message CouldNotEstablishConnection formatted to JSON */
547ace85d60SEd Tanous nlohmann::json couldNotEstablishConnection(const boost::urls::url_view& arg1);
548b5c07418SJames Feist 
549ace85d60SEd Tanous void couldNotEstablishConnection(crow::Response& res,
550ace85d60SEd Tanous                                  const boost::urls::url_view& arg1);
551f4c4dcf4SKowalski, Kamil 
552f4c4dcf4SKowalski, Kamil /**
553f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyNotWritable message into JSON
55466ac2b8cSJason M. Bills  * Message body: "The property <arg1> is a read only property and cannot be
555f4c4dcf4SKowalski, Kamil  * assigned a value."
556f4c4dcf4SKowalski, Kamil  *
557f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
558f4c4dcf4SKowalski, Kamil  *
559f4c4dcf4SKowalski, Kamil  * @returns Message PropertyNotWritable formatted to JSON */
5601668ce6dSEd Tanous nlohmann::json propertyNotWritable(std::string_view arg1);
561b5c07418SJames Feist 
5621668ce6dSEd Tanous void propertyNotWritable(crow::Response& res, std::string_view arg1);
563f12894f8SJason M. Bills 
564f12894f8SJason M. Bills /**
565f4c4dcf4SKowalski, Kamil  * @brief Formats QueryParameterValueTypeError message into JSON
56666ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the query parameter <arg2> is of a
567f4c4dcf4SKowalski, Kamil  * different type than the parameter can accept."
568f4c4dcf4SKowalski, Kamil  *
569f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
570f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
571f4c4dcf4SKowalski, Kamil  *
572f4c4dcf4SKowalski, Kamil  * @returns Message QueryParameterValueTypeError formatted to JSON */
5731668ce6dSEd Tanous nlohmann::json queryParameterValueTypeError(std::string_view arg1,
5741668ce6dSEd Tanous                                             std::string_view arg2);
575b5c07418SJames Feist 
5761668ce6dSEd Tanous void queryParameterValueTypeError(crow::Response& res, std::string_view arg1,
5771668ce6dSEd Tanous                                   std::string_view arg2);
578f4c4dcf4SKowalski, Kamil 
579f4c4dcf4SKowalski, Kamil /**
580f4c4dcf4SKowalski, Kamil  * @brief Formats ServiceShuttingDown message into JSON
581f4c4dcf4SKowalski, Kamil  * Message body: "The operation failed because the service is shutting down and
582f4c4dcf4SKowalski, Kamil  * can no longer take incoming requests."
583f4c4dcf4SKowalski, Kamil  *
584f4c4dcf4SKowalski, Kamil  *
585f4c4dcf4SKowalski, Kamil  * @returns Message ServiceShuttingDown formatted to JSON */
58665176d39SEd Tanous nlohmann::json serviceShuttingDown();
587b5c07418SJames Feist 
588f12894f8SJason M. Bills void serviceShuttingDown(crow::Response& res);
589f4c4dcf4SKowalski, Kamil 
590f4c4dcf4SKowalski, Kamil /**
591f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterDuplicate message into JSON
59266ac2b8cSJason M. Bills  * Message body: "The action <arg1> was submitted with more than one value for
59366ac2b8cSJason M. Bills  * the parameter <arg2>."
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  *
598f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterDuplicate formatted to JSON */
5991668ce6dSEd Tanous nlohmann::json actionParameterDuplicate(std::string_view arg1,
6001668ce6dSEd Tanous                                         std::string_view arg2);
601b5c07418SJames Feist 
6021668ce6dSEd Tanous void actionParameterDuplicate(crow::Response& res, std::string_view arg1,
6031668ce6dSEd Tanous                               std::string_view arg2);
604f4c4dcf4SKowalski, Kamil 
605f4c4dcf4SKowalski, Kamil /**
606f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterNotSupported message into JSON
60766ac2b8cSJason M. Bills  * Message body: "The parameter <arg1> for the action <arg2> is not supported on
608f4c4dcf4SKowalski, Kamil  * the target resource."
609f4c4dcf4SKowalski, Kamil  *
610f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
611f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
612f4c4dcf4SKowalski, Kamil  *
613f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterNotSupported formatted to JSON */
6141668ce6dSEd Tanous nlohmann::json actionParameterNotSupported(std::string_view arg1,
6151668ce6dSEd Tanous                                            std::string_view arg2);
616b5c07418SJames Feist 
6171668ce6dSEd Tanous void actionParameterNotSupported(crow::Response& res, std::string_view arg1,
6181668ce6dSEd Tanous                                  std::string_view arg2);
619f4c4dcf4SKowalski, Kamil 
620f4c4dcf4SKowalski, Kamil /**
621f4c4dcf4SKowalski, Kamil  * @brief Formats SourceDoesNotSupportProtocol message into JSON
62266ac2b8cSJason M. Bills  * Message body: "The other end of the Connection at <arg1> does not support the
62366ac2b8cSJason M. Bills  * specified protocol <arg2>."
624f4c4dcf4SKowalski, Kamil  *
625f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
626f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
627f4c4dcf4SKowalski, Kamil  *
628f4c4dcf4SKowalski, Kamil  * @returns Message SourceDoesNotSupportProtocol formatted to JSON */
629ace85d60SEd Tanous nlohmann::json sourceDoesNotSupportProtocol(const boost::urls::url_view& arg1,
6301668ce6dSEd Tanous                                             std::string_view arg2);
631b5c07418SJames Feist 
632ace85d60SEd Tanous void sourceDoesNotSupportProtocol(crow::Response& res,
633ace85d60SEd Tanous                                   const boost::urls::url_view& arg1,
6341668ce6dSEd Tanous                                   std::string_view arg2);
635f4c4dcf4SKowalski, Kamil 
636f4c4dcf4SKowalski, Kamil /**
637f4c4dcf4SKowalski, Kamil  * @brief Formats AccountRemoved message into JSON
638f4c4dcf4SKowalski, Kamil  * Message body: "The account was successfully removed."
639f4c4dcf4SKowalski, Kamil  *
640f4c4dcf4SKowalski, Kamil  *
641f4c4dcf4SKowalski, Kamil  * @returns Message AccountRemoved formatted to JSON */
64265176d39SEd Tanous nlohmann::json accountRemoved();
643b5c07418SJames Feist 
644f12894f8SJason M. Bills void accountRemoved(crow::Response& res);
645f4c4dcf4SKowalski, Kamil 
646f4c4dcf4SKowalski, Kamil /**
647f4c4dcf4SKowalski, Kamil  * @brief Formats AccessDenied message into JSON
64866ac2b8cSJason M. Bills  * Message body: "While attempting to establish a Connection to <arg1>, the
649f4c4dcf4SKowalski, Kamil  * service denied access."
650f4c4dcf4SKowalski, Kamil  *
651f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
652f4c4dcf4SKowalski, Kamil  *
653f4c4dcf4SKowalski, Kamil  * @returns Message AccessDenied formatted to JSON */
654f7725d79SEd Tanous nlohmann::json accessDenied(const boost::urls::url_view& arg1);
655b5c07418SJames Feist 
656f7725d79SEd Tanous void accessDenied(crow::Response& res, const boost::urls::url_view& arg1);
657f4c4dcf4SKowalski, Kamil 
658f4c4dcf4SKowalski, Kamil /**
659f4c4dcf4SKowalski, Kamil  * @brief Formats QueryNotSupported message into JSON
660f4c4dcf4SKowalski, Kamil  * Message body: "Querying is not supported by the implementation."
661f4c4dcf4SKowalski, Kamil  *
662f4c4dcf4SKowalski, Kamil  *
663f4c4dcf4SKowalski, Kamil  * @returns Message QueryNotSupported formatted to JSON */
66465176d39SEd Tanous nlohmann::json queryNotSupported();
665b5c07418SJames Feist 
666f12894f8SJason M. Bills void queryNotSupported(crow::Response& res);
667f4c4dcf4SKowalski, Kamil 
668f4c4dcf4SKowalski, Kamil /**
669f4c4dcf4SKowalski, Kamil  * @brief Formats CreateLimitReachedForResource message into JSON
670f4c4dcf4SKowalski, Kamil  * Message body: "The create operation failed because the resource has reached
671f4c4dcf4SKowalski, Kamil  * the limit of possible resources."
672f4c4dcf4SKowalski, Kamil  *
673f4c4dcf4SKowalski, Kamil  *
674f4c4dcf4SKowalski, Kamil  * @returns Message CreateLimitReachedForResource formatted to JSON */
67565176d39SEd Tanous nlohmann::json createLimitReachedForResource();
676b5c07418SJames Feist 
677f12894f8SJason M. Bills void createLimitReachedForResource(crow::Response& res);
678f4c4dcf4SKowalski, Kamil 
679f4c4dcf4SKowalski, Kamil /**
680f4c4dcf4SKowalski, Kamil  * @brief Formats GeneralError message into JSON
681f4c4dcf4SKowalski, Kamil  * Message body: "A general error has occurred. See ExtendedInfo for more
682f4c4dcf4SKowalski, Kamil  * information."
683f4c4dcf4SKowalski, Kamil  *
684f4c4dcf4SKowalski, Kamil  *
685f4c4dcf4SKowalski, Kamil  * @returns Message GeneralError formatted to JSON */
68665176d39SEd Tanous nlohmann::json generalError();
687b5c07418SJames Feist 
688f12894f8SJason M. Bills void generalError(crow::Response& res);
689f4c4dcf4SKowalski, Kamil 
690f4c4dcf4SKowalski, Kamil /**
691f4c4dcf4SKowalski, Kamil  * @brief Formats Success message into JSON
692f4c4dcf4SKowalski, Kamil  * Message body: "Successfully Completed Request"
693f4c4dcf4SKowalski, Kamil  *
694f4c4dcf4SKowalski, Kamil  *
695f4c4dcf4SKowalski, Kamil  * @returns Message Success formatted to JSON */
69665176d39SEd Tanous nlohmann::json success();
697b5c07418SJames Feist 
698f12894f8SJason M. Bills void success(crow::Response& res);
699f12894f8SJason M. Bills 
700f12894f8SJason M. Bills /**
701f4c4dcf4SKowalski, Kamil  * @brief Formats Created message into JSON
702f4c4dcf4SKowalski, Kamil  * Message body: "The resource has been created successfully"
703f4c4dcf4SKowalski, Kamil  *
704f4c4dcf4SKowalski, Kamil  *
705f4c4dcf4SKowalski, Kamil  * @returns Message Created formatted to JSON */
70665176d39SEd Tanous nlohmann::json created();
707b5c07418SJames Feist 
708f12894f8SJason M. Bills void created(crow::Response& res);
709f4c4dcf4SKowalski, Kamil 
710f4c4dcf4SKowalski, Kamil /**
711cc9139ecSJason M. Bills  * @brief Formats NoOperation message into JSON
712cc9139ecSJason M. Bills  * Message body: "The request body submitted contain no data to act upon and
713cc9139ecSJason M. Bills  * no changes to the resource took place."
714cc9139ecSJason M. Bills  *
715cc9139ecSJason M. Bills  *
716cc9139ecSJason M. Bills  * @returns Message NoOperation formatted to JSON */
71765176d39SEd Tanous nlohmann::json noOperation();
718b5c07418SJames Feist 
719cc9139ecSJason M. Bills void noOperation(crow::Response& res);
720cc9139ecSJason M. Bills 
721cc9139ecSJason M. Bills /**
722f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyUnknown message into JSON
72366ac2b8cSJason M. Bills  * Message body: "The property <arg1> is not in the list of valid properties for
724f4c4dcf4SKowalski, Kamil  * the resource."
725f4c4dcf4SKowalski, Kamil  *
726f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
727f4c4dcf4SKowalski, Kamil  *
728f4c4dcf4SKowalski, Kamil  * @returns Message PropertyUnknown formatted to JSON */
7291668ce6dSEd Tanous nlohmann::json propertyUnknown(std::string_view arg1);
730b5c07418SJames Feist 
7311668ce6dSEd Tanous void propertyUnknown(crow::Response& res, std::string_view arg1);
732f12894f8SJason M. Bills 
733f12894f8SJason M. Bills /**
734f4c4dcf4SKowalski, Kamil  * @brief Formats NoValidSession message into JSON
735f4c4dcf4SKowalski, Kamil  * Message body: "There is no valid session established with the
736f4c4dcf4SKowalski, Kamil  * implementation."
737f4c4dcf4SKowalski, Kamil  *
738f4c4dcf4SKowalski, Kamil  *
739f4c4dcf4SKowalski, Kamil  * @returns Message NoValidSession formatted to JSON */
74065176d39SEd Tanous nlohmann::json noValidSession();
741b5c07418SJames Feist 
742f12894f8SJason M. Bills void noValidSession(crow::Response& res);
743f4c4dcf4SKowalski, Kamil 
744f4c4dcf4SKowalski, Kamil /**
745f4c4dcf4SKowalski, Kamil  * @brief Formats InvalidObject message into JSON
74666ac2b8cSJason M. Bills  * Message body: "The object at <arg1> is invalid."
747f4c4dcf4SKowalski, Kamil  *
748f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
749f4c4dcf4SKowalski, Kamil  *
750f4c4dcf4SKowalski, Kamil  * @returns Message InvalidObject formatted to JSON */
751ace85d60SEd Tanous nlohmann::json invalidObject(const boost::urls::url_view& arg1);
752b5c07418SJames Feist 
753ace85d60SEd Tanous void invalidObject(crow::Response& res, const boost::urls::url_view& arg1);
754f4c4dcf4SKowalski, Kamil 
755f4c4dcf4SKowalski, Kamil /**
756f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceInStandby message into JSON
757f4c4dcf4SKowalski, Kamil  * Message body: "The request could not be performed because the resource is in
758f4c4dcf4SKowalski, Kamil  * standby."
759f4c4dcf4SKowalski, Kamil  *
760f4c4dcf4SKowalski, Kamil  *
761f4c4dcf4SKowalski, Kamil  * @returns Message ResourceInStandby formatted to JSON */
76265176d39SEd Tanous nlohmann::json resourceInStandby();
763b5c07418SJames Feist 
764f12894f8SJason M. Bills void resourceInStandby(crow::Response& res);
765f4c4dcf4SKowalski, Kamil 
766f4c4dcf4SKowalski, Kamil /**
767f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterValueTypeError message into JSON
76866ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
769f4c4dcf4SKowalski, Kamil  * is of a different type than the parameter can accept."
770f4c4dcf4SKowalski, Kamil  *
771f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
772f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
773f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
774f4c4dcf4SKowalski, Kamil  *
775f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterValueTypeError formatted to JSON */
7761668ce6dSEd Tanous nlohmann::json actionParameterValueTypeError(std::string_view arg1,
7771668ce6dSEd Tanous                                              std::string_view arg2,
7781668ce6dSEd Tanous                                              std::string_view arg3);
779b5c07418SJames Feist 
7801668ce6dSEd Tanous void actionParameterValueTypeError(crow::Response& res, std::string_view arg1,
7811668ce6dSEd Tanous                                    std::string_view arg2,
7821668ce6dSEd Tanous                                    std::string_view arg3);
783f4c4dcf4SKowalski, Kamil 
784f4c4dcf4SKowalski, Kamil /**
785f4c4dcf4SKowalski, Kamil  * @brief Formats SessionLimitExceeded message into JSON
786f4c4dcf4SKowalski, Kamil  * Message body: "The session establishment failed due to the number of
787f4c4dcf4SKowalski, Kamil  * simultaneous sessions exceeding the limit of the implementation."
788f4c4dcf4SKowalski, Kamil  *
789f4c4dcf4SKowalski, Kamil  *
790f4c4dcf4SKowalski, Kamil  * @returns Message SessionLimitExceeded formatted to JSON */
79165176d39SEd Tanous nlohmann::json sessionLimitExceeded();
792b5c07418SJames Feist 
793f12894f8SJason M. Bills void sessionLimitExceeded(crow::Response& res);
794f4c4dcf4SKowalski, Kamil 
795f4c4dcf4SKowalski, Kamil /**
796f4c4dcf4SKowalski, Kamil  * @brief Formats ActionNotSupported message into JSON
79766ac2b8cSJason M. Bills  * Message body: "The action <arg1> is not supported by the resource."
798f4c4dcf4SKowalski, Kamil  *
799f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
800f4c4dcf4SKowalski, Kamil  *
801f4c4dcf4SKowalski, Kamil  * @returns Message ActionNotSupported formatted to JSON */
8021668ce6dSEd Tanous nlohmann::json actionNotSupported(std::string_view arg1);
803b5c07418SJames Feist 
8041668ce6dSEd Tanous void actionNotSupported(crow::Response& res, std::string_view arg1);
805f4c4dcf4SKowalski, Kamil 
806f4c4dcf4SKowalski, Kamil /**
807f4c4dcf4SKowalski, Kamil  * @brief Formats InvalidIndex message into JSON
80866ac2b8cSJason M. Bills  * Message body: "The index <arg1> is not a valid offset into the array."
809f4c4dcf4SKowalski, Kamil  *
810f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
811f4c4dcf4SKowalski, Kamil  *
812f4c4dcf4SKowalski, Kamil  * @returns Message InvalidIndex formatted to JSON */
8135187e09bSJosh Lehan nlohmann::json invalidIndex(int64_t arg1);
814b5c07418SJames Feist 
8155187e09bSJosh Lehan void invalidIndex(crow::Response& res, int64_t arg1);
816f4c4dcf4SKowalski, Kamil 
817f4c4dcf4SKowalski, Kamil /**
818f4c4dcf4SKowalski, Kamil  * @brief Formats EmptyJSON message into JSON
819f4c4dcf4SKowalski, Kamil  * Message body: "The request body submitted contained an empty JSON object and
820f4c4dcf4SKowalski, Kamil  * the service is unable to process it."
821f4c4dcf4SKowalski, Kamil  *
822f4c4dcf4SKowalski, Kamil  *
823f4c4dcf4SKowalski, Kamil  * @returns Message EmptyJSON formatted to JSON */
82465176d39SEd Tanous nlohmann::json emptyJSON();
825b5c07418SJames Feist 
826f12894f8SJason M. Bills void emptyJSON(crow::Response& res);
827f4c4dcf4SKowalski, Kamil 
828f4c4dcf4SKowalski, Kamil /**
829f4c4dcf4SKowalski, Kamil  * @brief Formats QueryNotSupportedOnResource message into JSON
830f4c4dcf4SKowalski, Kamil  * Message body: "Querying is not supported on the requested resource."
831f4c4dcf4SKowalski, Kamil  *
832f4c4dcf4SKowalski, Kamil  *
833f4c4dcf4SKowalski, Kamil  * @returns Message QueryNotSupportedOnResource formatted to JSON */
83465176d39SEd Tanous nlohmann::json queryNotSupportedOnResource();
835b5c07418SJames Feist 
836f12894f8SJason M. Bills void queryNotSupportedOnResource(crow::Response& res);
837f4c4dcf4SKowalski, Kamil 
838f4c4dcf4SKowalski, Kamil /**
839684bb4b8SJason M. Bills  * @brief Formats QueryNotSupportedOnOperation message into JSON
840684bb4b8SJason M. Bills  * Message body: "Querying is not supported with the requested operation."
841684bb4b8SJason M. Bills  *
842684bb4b8SJason M. Bills  *
843684bb4b8SJason M. Bills  * @returns Message QueryNotSupportedOnOperation formatted to JSON */
84465176d39SEd Tanous nlohmann::json queryNotSupportedOnOperation();
845684bb4b8SJason M. Bills 
846684bb4b8SJason M. Bills void queryNotSupportedOnOperation(crow::Response& res);
847684bb4b8SJason M. Bills 
848684bb4b8SJason M. Bills /**
849684bb4b8SJason M. Bills  * @brief Formats QueryCombinationInvalid message into JSON
850684bb4b8SJason M. Bills  * Message body: "Two or more query parameters in the request cannot be used
851684bb4b8SJason M. Bills  * together."
852684bb4b8SJason M. Bills  *
853684bb4b8SJason M. Bills  *
854684bb4b8SJason M. Bills  * @returns Message QueryCombinationInvalid formatted to JSON */
85565176d39SEd Tanous nlohmann::json queryCombinationInvalid();
856684bb4b8SJason M. Bills 
857684bb4b8SJason M. Bills void queryCombinationInvalid(crow::Response& res);
858684bb4b8SJason M. Bills 
859684bb4b8SJason M. Bills /**
860f4c4dcf4SKowalski, Kamil  * @brief Formats InsufficientPrivilege message into JSON
861f4c4dcf4SKowalski, Kamil  * Message body: "There are insufficient privileges for the account or
862f4c4dcf4SKowalski, Kamil  * credentials associated with the current session to perform the requested
863f4c4dcf4SKowalski, Kamil  * operation."
864f4c4dcf4SKowalski, Kamil  *
865f4c4dcf4SKowalski, Kamil  *
866f4c4dcf4SKowalski, Kamil  * @returns Message InsufficientPrivilege formatted to JSON */
86765176d39SEd Tanous nlohmann::json insufficientPrivilege();
868b5c07418SJames Feist 
869f12894f8SJason M. Bills void insufficientPrivilege(crow::Response& res);
870f4c4dcf4SKowalski, Kamil 
871f4c4dcf4SKowalski, Kamil /**
872f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueModified message into JSON
87366ac2b8cSJason M. Bills  * Message body: "The property <arg1> was assigned the value <arg2> due to
874f4c4dcf4SKowalski, Kamil  * modification by the service."
875f4c4dcf4SKowalski, Kamil  *
876f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
877f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
878f4c4dcf4SKowalski, Kamil  *
879f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueModified formatted to JSON */
8801668ce6dSEd Tanous nlohmann::json propertyValueModified(std::string_view arg1,
8811668ce6dSEd Tanous                                      std::string_view arg2);
882b5c07418SJames Feist 
8831668ce6dSEd Tanous void propertyValueModified(crow::Response& res, std::string_view arg1,
8841668ce6dSEd Tanous                            std::string_view arg2);
885f4c4dcf4SKowalski, Kamil 
886f4c4dcf4SKowalski, Kamil /**
887f4c4dcf4SKowalski, Kamil  * @brief Formats AccountNotModified message into JSON
888f4c4dcf4SKowalski, Kamil  * Message body: "The account modification request failed."
889f4c4dcf4SKowalski, Kamil  *
890f4c4dcf4SKowalski, Kamil  *
891f4c4dcf4SKowalski, Kamil  * @returns Message AccountNotModified formatted to JSON */
89265176d39SEd Tanous nlohmann::json accountNotModified();
893b5c07418SJames Feist 
894f12894f8SJason M. Bills void accountNotModified(crow::Response& res);
895f4c4dcf4SKowalski, Kamil 
896f4c4dcf4SKowalski, Kamil /**
897f4c4dcf4SKowalski, Kamil  * @brief Formats QueryParameterValueFormatError message into JSON
89866ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the parameter <arg2> is of a different
899f4c4dcf4SKowalski, Kamil  * format than the parameter can accept."
900f4c4dcf4SKowalski, Kamil  *
901f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
902f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
903f4c4dcf4SKowalski, Kamil  *
904f4c4dcf4SKowalski, Kamil  * @returns Message QueryParameterValueFormatError formatted to JSON */
905b5c07418SJames Feist 
9061668ce6dSEd Tanous nlohmann::json queryParameterValueFormatError(std::string_view arg1,
9071668ce6dSEd Tanous                                               std::string_view arg2);
908b5c07418SJames Feist 
9091668ce6dSEd Tanous void queryParameterValueFormatError(crow::Response& res, std::string_view arg1,
9101668ce6dSEd Tanous                                     std::string_view arg2);
911f4c4dcf4SKowalski, Kamil 
912f4c4dcf4SKowalski, Kamil /**
913f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyMissing message into JSON
91466ac2b8cSJason M. Bills  * Message body: "The property <arg1> is a required property and must be
915f4c4dcf4SKowalski, Kamil  * included in the request."
916f4c4dcf4SKowalski, Kamil  *
917f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
918f4c4dcf4SKowalski, Kamil  *
919f4c4dcf4SKowalski, Kamil  * @returns Message PropertyMissing formatted to JSON */
9201668ce6dSEd Tanous nlohmann::json propertyMissing(std::string_view arg1);
921b5c07418SJames Feist 
9221668ce6dSEd Tanous void propertyMissing(crow::Response& res, std::string_view arg1);
923f12894f8SJason M. Bills 
924f12894f8SJason M. Bills /**
925f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceExhaustion message into JSON
92666ac2b8cSJason M. Bills  * Message body: "The resource <arg1> was unable to satisfy the request due to
927f4c4dcf4SKowalski, Kamil  * unavailability of resources."
928f4c4dcf4SKowalski, Kamil  *
929f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
930f4c4dcf4SKowalski, Kamil  *
931f4c4dcf4SKowalski, Kamil  * @returns Message ResourceExhaustion formatted to JSON */
9321668ce6dSEd Tanous nlohmann::json resourceExhaustion(std::string_view arg1);
933b5c07418SJames Feist 
9341668ce6dSEd Tanous void resourceExhaustion(crow::Response& res, std::string_view arg1);
935f4c4dcf4SKowalski, Kamil 
936f4c4dcf4SKowalski, Kamil /**
937f4c4dcf4SKowalski, Kamil  * @brief Formats AccountModified message into JSON
938f4c4dcf4SKowalski, Kamil  * Message body: "The account was successfully modified."
939f4c4dcf4SKowalski, Kamil  *
940f4c4dcf4SKowalski, Kamil  *
941f4c4dcf4SKowalski, Kamil  * @returns Message AccountModified formatted to JSON */
94265176d39SEd Tanous nlohmann::json accountModified();
943b5c07418SJames Feist 
944a08b46ccSJason M. Bills void accountModified(crow::Response& res);
945f4c4dcf4SKowalski, Kamil 
946f4c4dcf4SKowalski, Kamil /**
947f4c4dcf4SKowalski, Kamil  * @brief Formats QueryParameterOutOfRange message into JSON
94866ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the query parameter <arg2> is out of
94966ac2b8cSJason M. Bills  * range <arg3>."
950f4c4dcf4SKowalski, Kamil  *
951f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
952f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
953f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
954f4c4dcf4SKowalski, Kamil  *
955f4c4dcf4SKowalski, Kamil  * @returns Message QueryParameterOutOfRange formatted to JSON */
9561668ce6dSEd Tanous nlohmann::json queryParameterOutOfRange(std::string_view arg1,
9571668ce6dSEd Tanous                                         std::string_view arg2,
9581668ce6dSEd Tanous                                         std::string_view arg3);
959b5c07418SJames Feist 
9601668ce6dSEd Tanous void queryParameterOutOfRange(crow::Response& res, std::string_view arg1,
9611668ce6dSEd Tanous                               std::string_view arg2, std::string_view arg3);
962f4c4dcf4SKowalski, Kamil 
9633bf4e632SJoseph Reynolds /**
9643bf4e632SJoseph Reynolds  * @brief Formats PasswordChangeRequired message into JSON
9653bf4e632SJoseph Reynolds  * Message body: The password provided for this account must be changed
9663bf4e632SJoseph Reynolds  * before access is granted.  PATCH the 'Password' property for this
9673bf4e632SJoseph Reynolds  * account located at the target URI '%1' to complete this process.
9683bf4e632SJoseph Reynolds  *
9693bf4e632SJoseph Reynolds  * @param[in] arg1 Parameter of message that will replace %1 in its body.
9703bf4e632SJoseph Reynolds  *
9713bf4e632SJoseph Reynolds  * @returns Message PasswordChangeRequired formatted to JSON */
972ace85d60SEd Tanous 
973ace85d60SEd Tanous nlohmann::json passwordChangeRequired(const boost::urls::url_view& arg1);
974ace85d60SEd Tanous 
975ace85d60SEd Tanous void passwordChangeRequired(crow::Response& res,
976ace85d60SEd Tanous                             const boost::urls::url_view& arg1);
9773bf4e632SJoseph Reynolds 
9784cde5d90SJames Feist /**
9794cde5d90SJames Feist  * @brief Formats InvalidUpload message into JSON
9804cde5d90SJames Feist  * Message body: Invalid file uploaded to %1: %2.*
9814cde5d90SJames Feist  * @param[in] arg1 Parameter of message that will replace %1 in its body.
9824cde5d90SJames Feist  * @param[in] arg2 Parameter of message that will replace %2 in its body.
9834cde5d90SJames Feist  *
9844cde5d90SJames Feist  * @returns Message InvalidUpload formatted to JSON */
9851668ce6dSEd Tanous nlohmann::json invalidUpload(std::string_view arg1, std::string_view arg2);
9864cde5d90SJames Feist 
9871668ce6dSEd Tanous void invalidUpload(crow::Response& res, std::string_view arg1,
9881668ce6dSEd Tanous                    std::string_view arg2);
9894cde5d90SJames Feist 
990f4c4dcf4SKowalski, Kamil } // namespace messages
991f4c4dcf4SKowalski, Kamil 
992f4c4dcf4SKowalski, Kamil } // namespace redfish
993