xref: /openbmc/bmcweb/features/redfish/include/error_messages.hpp (revision aaebeaaf53317dde7d40338c27f4c60ec303a7b8)
1f4c4dcf4SKowalski, Kamil /*
26be832e2SEd Tanous Copyright (c) 2018 Intel Corporation
36be832e2SEd Tanous 
46be832e2SEd Tanous Licensed under the Apache License, Version 2.0 (the "License");
56be832e2SEd Tanous you may not use this file except in compliance with the License.
66be832e2SEd Tanous You may obtain a copy of the License at
76be832e2SEd Tanous 
86be832e2SEd Tanous       http://www.apache.org/licenses/LICENSE-2.0
96be832e2SEd Tanous 
106be832e2SEd Tanous Unless required by applicable law or agreed to in writing, software
116be832e2SEd Tanous distributed under the License is distributed on an "AS IS" BASIS,
126be832e2SEd Tanous WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
136be832e2SEd Tanous See the License for the specific language governing permissions and
146be832e2SEd Tanous limitations under the License.
15f4c4dcf4SKowalski, Kamil */
16f4c4dcf4SKowalski, Kamil #pragma once
170442ef92SNan Zhou 
1804e438cbSEd Tanous #include "http_response.hpp"
19f12894f8SJason M. Bills 
204a7fbefdSEd Tanous #include <boost/url/url_view_base.hpp>
211214b7e7SGunnar Mills #include <nlohmann/json.hpp>
221214b7e7SGunnar Mills 
230442ef92SNan Zhou #include <cstdint>
24d85418e3SPatrick Williams #include <source_location>
259ea15c35SEd Tanous #include <string>
260442ef92SNan Zhou #include <string_view>
270442ef92SNan Zhou 
280442ef92SNan Zhou // IWYU pragma: no_forward_declare crow::Response
299ea15c35SEd Tanous 
301abe55efSEd Tanous namespace redfish
311abe55efSEd Tanous {
32f4c4dcf4SKowalski, Kamil 
331abe55efSEd Tanous namespace messages
341abe55efSEd Tanous {
35f4c4dcf4SKowalski, Kamil 
3681856681SAsmitha Karunanithi constexpr const char* messageVersionPrefix = "Base.1.11.0.";
3755c7b7a2SEd Tanous constexpr const char* messageAnnotation = "@Message.ExtendedInfo";
38f4c4dcf4SKowalski, Kamil 
39f4c4dcf4SKowalski, Kamil /**
403590bd1dSNan Zhou  * @brief Moves all error messages from the |source| JSON to |target|
413590bd1dSNan Zhou  */
423590bd1dSNan Zhou void moveErrorsToErrorJson(nlohmann::json& target, nlohmann::json& source);
433590bd1dSNan Zhou 
443590bd1dSNan Zhou /**
45f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceInUse message into JSON
46f4c4dcf4SKowalski, Kamil  * Message body: "The change to the requested resource failed because the
47f4c4dcf4SKowalski, Kamil  * resource is in use or in transition."
48f4c4dcf4SKowalski, Kamil  *
49f4c4dcf4SKowalski, Kamil  *
50f4c4dcf4SKowalski, Kamil  * @returns Message ResourceInUse formatted to JSON */
5165176d39SEd Tanous nlohmann::json resourceInUse();
52b5c07418SJames Feist 
53f12894f8SJason M. Bills void resourceInUse(crow::Response& res);
54f4c4dcf4SKowalski, Kamil 
55f4c4dcf4SKowalski, Kamil /**
56f4c4dcf4SKowalski, Kamil  * @brief Formats MalformedJSON message into JSON
57f4c4dcf4SKowalski, Kamil  * Message body: "The request body submitted was malformed JSON and could not be
58f4c4dcf4SKowalski, Kamil  * parsed by the receiving service."
59f4c4dcf4SKowalski, Kamil  *
60f4c4dcf4SKowalski, Kamil  *
61f4c4dcf4SKowalski, Kamil  * @returns Message MalformedJSON formatted to JSON */
6265176d39SEd Tanous nlohmann::json malformedJSON();
63b5c07418SJames Feist 
64f12894f8SJason M. Bills void malformedJSON(crow::Response& res);
65f4c4dcf4SKowalski, Kamil 
66f4c4dcf4SKowalski, Kamil /**
67f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceMissingAtURI message into JSON
6866ac2b8cSJason M. Bills  * Message body: "The resource at the URI <arg1> was not found."
69f4c4dcf4SKowalski, Kamil  *
70f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
71f4c4dcf4SKowalski, Kamil  *
72f4c4dcf4SKowalski, Kamil  * @returns Message ResourceMissingAtURI formatted to JSON */
734a7fbefdSEd Tanous nlohmann::json resourceMissingAtURI(const boost::urls::url_view_base& arg1);
74b5c07418SJames Feist 
754a7fbefdSEd Tanous void resourceMissingAtURI(crow::Response& res,
764a7fbefdSEd Tanous                           const boost::urls::url_view_base& arg1);
77f4c4dcf4SKowalski, Kamil 
78f4c4dcf4SKowalski, Kamil /**
79f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterValueFormatError message into JSON
8066ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
81f4c4dcf4SKowalski, Kamil  * is of a different format than the parameter can accept."
82f4c4dcf4SKowalski, Kamil  *
83f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
84f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
85f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
86f4c4dcf4SKowalski, Kamil  *
87f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterValueFormatError formatted to JSON */
88bd79bce8SPatrick Williams nlohmann::json actionParameterValueFormatError(
89bd79bce8SPatrick Williams     const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3);
90b5c07418SJames Feist 
91bd79bce8SPatrick Williams void actionParameterValueFormatError(
92bd79bce8SPatrick Williams     crow::Response& res, const nlohmann::json& arg1, std::string_view arg2,
931668ce6dSEd Tanous     std::string_view arg3);
94f4c4dcf4SKowalski, Kamil 
95f4c4dcf4SKowalski, Kamil /**
964ef82a15SAlex Schendel  * @brief Formats ActionParameterValueNotInList message into JSON
974ef82a15SAlex Schendel  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
984ef82a15SAlex Schendel  * is not in the list of acceptable values."
994ef82a15SAlex Schendel  *
1004ef82a15SAlex Schendel  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1014ef82a15SAlex Schendel  * @param[in] arg2 Parameter of message that will replace %2 in its body.
1024ef82a15SAlex Schendel  * @param[in] arg3 Parameter of message that will replace %3 in its body.
1034ef82a15SAlex Schendel  *
1044ef82a15SAlex Schendel  * @returns Message ActionParameterValueFormatError formatted to JSON */
105bd79bce8SPatrick Williams nlohmann::json actionParameterValueNotInList(
106bd79bce8SPatrick Williams     std::string_view arg1, std::string_view arg2, std::string_view arg3);
1074ef82a15SAlex Schendel 
1084ef82a15SAlex Schendel void actionParameterValueNotInList(crow::Response& res, std::string_view arg1,
1094ef82a15SAlex Schendel                                    std::string_view arg2,
1104ef82a15SAlex Schendel                                    std::string_view arg3);
1114ef82a15SAlex Schendel 
1124ef82a15SAlex Schendel /**
113f4c4dcf4SKowalski, Kamil  * @brief Formats InternalError message into JSON
114f4c4dcf4SKowalski, Kamil  * Message body: "The request failed due to an internal service error.  The
115f4c4dcf4SKowalski, Kamil  * service is still operational."
116f4c4dcf4SKowalski, Kamil  *
117f4c4dcf4SKowalski, Kamil  *
118f4c4dcf4SKowalski, Kamil  * @returns Message InternalError formatted to JSON */
11965176d39SEd Tanous nlohmann::json internalError();
120b5c07418SJames Feist 
121d85418e3SPatrick Williams void internalError(crow::Response& res, std::source_location location =
122d85418e3SPatrick Williams                                             std::source_location::current());
123f12894f8SJason M. Bills 
124f12894f8SJason M. Bills /**
125f4c4dcf4SKowalski, Kamil  * @brief Formats UnrecognizedRequestBody message into JSON
126f4c4dcf4SKowalski, Kamil  * Message body: "The service detected a malformed request body that it was
127f4c4dcf4SKowalski, Kamil  * unable to interpret."
128f4c4dcf4SKowalski, Kamil  *
129f4c4dcf4SKowalski, Kamil  *
130f4c4dcf4SKowalski, Kamil  * @returns Message UnrecognizedRequestBody formatted to JSON */
13165176d39SEd Tanous nlohmann::json unrecognizedRequestBody();
132b5c07418SJames Feist 
133f12894f8SJason M. Bills void unrecognizedRequestBody(crow::Response& res);
134f4c4dcf4SKowalski, Kamil 
135f4c4dcf4SKowalski, Kamil /**
136f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceAtUriUnauthorized message into JSON
13766ac2b8cSJason M. Bills  * Message body: "While accessing the resource at <arg1>, the service received
13866ac2b8cSJason M. Bills  * an authorization error <arg2>."
139f4c4dcf4SKowalski, Kamil  *
140f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
141f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
142f4c4dcf4SKowalski, Kamil  *
143f4c4dcf4SKowalski, Kamil  * @returns Message ResourceAtUriUnauthorized formatted to JSON */
1444a7fbefdSEd Tanous nlohmann::json resourceAtUriUnauthorized(const boost::urls::url_view_base& arg1,
1451668ce6dSEd Tanous                                          std::string_view arg2);
146b5c07418SJames Feist 
1474a7fbefdSEd Tanous void resourceAtUriUnauthorized(crow::Response& res,
1484a7fbefdSEd Tanous                                const boost::urls::url_view_base& arg1,
1491668ce6dSEd Tanous                                std::string_view arg2);
150f4c4dcf4SKowalski, Kamil 
151f4c4dcf4SKowalski, Kamil /**
152f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterUnknown message into JSON
15366ac2b8cSJason M. Bills  * Message body: "The action <arg1> was submitted with the invalid parameter
15466ac2b8cSJason M. Bills  * <arg2>."
155f4c4dcf4SKowalski, Kamil  *
156f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
157f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
158f4c4dcf4SKowalski, Kamil  *
159f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterUnknown formatted to JSON */
1601668ce6dSEd Tanous nlohmann::json actionParameterUnknown(std::string_view arg1,
1611668ce6dSEd Tanous                                       std::string_view arg2);
162b5c07418SJames Feist 
1631668ce6dSEd Tanous void actionParameterUnknown(crow::Response& res, std::string_view arg1,
1641668ce6dSEd Tanous                             std::string_view arg2);
165f4c4dcf4SKowalski, Kamil 
166f4c4dcf4SKowalski, Kamil /**
167f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceCannotBeDeleted message into JSON
168f4c4dcf4SKowalski, Kamil  * Message body: "The delete request failed because the resource requested
169f4c4dcf4SKowalski, Kamil  * cannot be deleted."
170f4c4dcf4SKowalski, Kamil  *
171f4c4dcf4SKowalski, Kamil  *
172f4c4dcf4SKowalski, Kamil  * @returns Message ResourceCannotBeDeleted formatted to JSON */
17365176d39SEd Tanous nlohmann::json resourceCannotBeDeleted();
174b5c07418SJames Feist 
175f12894f8SJason M. Bills void resourceCannotBeDeleted(crow::Response& res);
176f4c4dcf4SKowalski, Kamil 
177f4c4dcf4SKowalski, Kamil /**
178f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyDuplicate message into JSON
17966ac2b8cSJason M. Bills  * Message body: "The property <arg1> was duplicated in the request."
180f4c4dcf4SKowalski, Kamil  *
181f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
182f4c4dcf4SKowalski, Kamil  *
183f4c4dcf4SKowalski, Kamil  * @returns Message PropertyDuplicate formatted to JSON */
1841668ce6dSEd Tanous nlohmann::json propertyDuplicate(std::string_view arg1);
185b5c07418SJames Feist 
1861668ce6dSEd Tanous void propertyDuplicate(crow::Response& res, std::string_view arg1);
187f4c4dcf4SKowalski, Kamil 
188f4c4dcf4SKowalski, Kamil /**
189f4c4dcf4SKowalski, Kamil  * @brief Formats ServiceTemporarilyUnavailable message into JSON
19066ac2b8cSJason M. Bills  * Message body: "The service is temporarily unavailable.  Retry in <arg1>
191f4c4dcf4SKowalski, Kamil  * seconds."
192f4c4dcf4SKowalski, Kamil  *
193f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
194f4c4dcf4SKowalski, Kamil  *
195f4c4dcf4SKowalski, Kamil  * @returns Message ServiceTemporarilyUnavailable formatted to JSON */
1961668ce6dSEd Tanous nlohmann::json serviceTemporarilyUnavailable(std::string_view arg1);
197b5c07418SJames Feist 
1981668ce6dSEd Tanous void serviceTemporarilyUnavailable(crow::Response& res, std::string_view arg1);
199f4c4dcf4SKowalski, Kamil 
200f4c4dcf4SKowalski, Kamil /**
201f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceAlreadyExists message into JSON
20266ac2b8cSJason M. Bills  * Message body: "The requested resource of type <arg1> with the property <arg2>
20366ac2b8cSJason M. Bills  * with the value <arg3> already exists."
204f4c4dcf4SKowalski, Kamil  *
205f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
206f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
207f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
208f4c4dcf4SKowalski, Kamil  *
209f4c4dcf4SKowalski, Kamil  * @returns Message ResourceAlreadyExists formatted to JSON */
210bd79bce8SPatrick Williams nlohmann::json resourceAlreadyExists(
211bd79bce8SPatrick Williams     std::string_view arg1, std::string_view arg2, std::string_view arg3);
212b5c07418SJames Feist 
2131668ce6dSEd Tanous void resourceAlreadyExists(crow::Response& res, std::string_view arg1,
2141668ce6dSEd Tanous                            std::string_view arg2, std::string_view arg3);
215f4c4dcf4SKowalski, Kamil 
216f4c4dcf4SKowalski, Kamil /**
217f4c4dcf4SKowalski, Kamil  * @brief Formats AccountForSessionNoLongerExists message into JSON
218f4c4dcf4SKowalski, Kamil  * Message body: "The account for the current session has been removed, thus the
219f4c4dcf4SKowalski, Kamil  * current session has been removed as well."
220f4c4dcf4SKowalski, Kamil  *
221f4c4dcf4SKowalski, Kamil  *
222f4c4dcf4SKowalski, Kamil  * @returns Message AccountForSessionNoLongerExists formatted to JSON */
22365176d39SEd Tanous nlohmann::json accountForSessionNoLongerExists();
224b5c07418SJames Feist 
225f12894f8SJason M. Bills void accountForSessionNoLongerExists(crow::Response& res);
226f4c4dcf4SKowalski, Kamil 
227f4c4dcf4SKowalski, Kamil /**
228f4c4dcf4SKowalski, Kamil  * @brief Formats CreateFailedMissingReqProperties message into JSON
229f4c4dcf4SKowalski, Kamil  * Message body: "The create operation failed because the required property
23066ac2b8cSJason M. Bills  * <arg1> was missing from the request."
231f4c4dcf4SKowalski, Kamil  *
232f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
233f4c4dcf4SKowalski, Kamil  *
234f4c4dcf4SKowalski, Kamil  * @returns Message CreateFailedMissingReqProperties formatted to JSON */
2351668ce6dSEd Tanous nlohmann::json createFailedMissingReqProperties(std::string_view arg1);
236b5c07418SJames Feist 
237f12894f8SJason M. Bills void createFailedMissingReqProperties(crow::Response& res,
2381668ce6dSEd Tanous                                       std::string_view arg1);
239f4c4dcf4SKowalski, Kamil 
240f4c4dcf4SKowalski, Kamil /**
241f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueFormatError message into JSON
24266ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the property <arg2> is of a different
243f4c4dcf4SKowalski, Kamil  * format than the property can accept."
244f4c4dcf4SKowalski, Kamil  *
245f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
246f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
247f4c4dcf4SKowalski, Kamil  *
248f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueFormatError formatted to JSON */
249f818b04dSEd Tanous nlohmann::json propertyValueFormatError(const nlohmann::json& arg1,
2501668ce6dSEd Tanous                                         std::string_view arg2);
251b5c07418SJames Feist 
252f818b04dSEd Tanous void propertyValueFormatError(crow::Response& res, const nlohmann::json& arg1,
2531668ce6dSEd Tanous                               std::string_view arg2);
254f4c4dcf4SKowalski, Kamil 
255f4c4dcf4SKowalski, Kamil /**
256f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueNotInList message into JSON
25766ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the property <arg2> is not in the list of
258f4c4dcf4SKowalski, Kamil  * acceptable values."
259f4c4dcf4SKowalski, Kamil  *
260f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
261f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
262f4c4dcf4SKowalski, Kamil  *
263f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueNotInList formatted to JSON */
264e2616cc5SEd Tanous nlohmann::json propertyValueNotInList(const nlohmann::json& arg1,
2651668ce6dSEd Tanous                                       std::string_view arg2);
266b5c07418SJames Feist 
267e2616cc5SEd Tanous void propertyValueNotInList(crow::Response& res, const nlohmann::json& arg1,
2681668ce6dSEd Tanous                             std::string_view arg2);
269f4c4dcf4SKowalski, Kamil /**
270227a2b0aSJiaqing Zhao  * @brief Formats PropertyValueOutOfRange message into JSON
271227a2b0aSJiaqing Zhao  * Message body: "The value '%1' for the property %2 is not in the supported
272227a2b0aSJiaqing Zhao  * range of acceptable values."
273227a2b0aSJiaqing Zhao  *
274227a2b0aSJiaqing Zhao  * @param[in] arg1 Parameter of message that will replace %1 in its body.
275227a2b0aSJiaqing Zhao  * @param[in] arg2 Parameter of message that will replace %2 in its body.
276227a2b0aSJiaqing Zhao  *
277227a2b0aSJiaqing Zhao  * @returns Message PropertyValueExternalConflict formatted to JSON */
27895b3ad73SEd Tanous nlohmann::json propertyValueOutOfRange(const nlohmann::json& arg1,
279227a2b0aSJiaqing Zhao                                        std::string_view arg2);
280227a2b0aSJiaqing Zhao 
28195b3ad73SEd Tanous void propertyValueOutOfRange(crow::Response& res, const nlohmann::json& arg1,
282227a2b0aSJiaqing Zhao                              std::string_view arg2);
283227a2b0aSJiaqing Zhao 
284227a2b0aSJiaqing Zhao /**
285f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceAtUriInUnknownFormat message into JSON
28666ac2b8cSJason M. Bills  * Message body: "The resource at <arg1> is in a format not recognized by the
287f4c4dcf4SKowalski, Kamil  * service."
288f4c4dcf4SKowalski, Kamil  *
289f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
290f4c4dcf4SKowalski, Kamil  *
291f4c4dcf4SKowalski, Kamil  * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */
2924a7fbefdSEd Tanous nlohmann::json
2934a7fbefdSEd Tanous     resourceAtUriInUnknownFormat(const boost::urls::url_view_base& arg1);
294b5c07418SJames Feist 
295ace85d60SEd Tanous void resourceAtUriInUnknownFormat(crow::Response& res,
2964a7fbefdSEd Tanous                                   const boost::urls::url_view_base& arg1);
297f4c4dcf4SKowalski, Kamil 
298f4c4dcf4SKowalski, Kamil /**
29981856681SAsmitha Karunanithi  * @brief Formats ServiceDisabled message into JSON
30081856681SAsmitha Karunanithi  * Message body: "The operation failed because the service at <arg1> is disabled
30181856681SAsmitha Karunanithi  * and " cannot accept requests."
30281856681SAsmitha Karunanithi  *
30381856681SAsmitha Karunanithi  * @param[in] arg1 Parameter of message that will replace %1 in its body.
30481856681SAsmitha Karunanithi  *
30581856681SAsmitha Karunanithi  * @returns Message ServiceDisabled formatted to JSON */
3061668ce6dSEd Tanous nlohmann::json serviceDisabled(std::string_view arg1);
30781856681SAsmitha Karunanithi 
3081668ce6dSEd Tanous void serviceDisabled(crow::Response& res, std::string_view arg1);
30981856681SAsmitha Karunanithi 
31081856681SAsmitha Karunanithi /**
311f4c4dcf4SKowalski, Kamil  * @brief Formats ServiceInUnknownState message into JSON
312f4c4dcf4SKowalski, Kamil  * Message body: "The operation failed because the service is in an unknown
313f4c4dcf4SKowalski, Kamil  * state and can no longer take incoming requests."
314f4c4dcf4SKowalski, Kamil  *
315f4c4dcf4SKowalski, Kamil  *
316f4c4dcf4SKowalski, Kamil  * @returns Message ServiceInUnknownState formatted to JSON */
31765176d39SEd Tanous nlohmann::json serviceInUnknownState();
318b5c07418SJames Feist 
319f12894f8SJason M. Bills void serviceInUnknownState(crow::Response& res);
320f4c4dcf4SKowalski, Kamil 
321f4c4dcf4SKowalski, Kamil /**
322f4c4dcf4SKowalski, Kamil  * @brief Formats EventSubscriptionLimitExceeded message into JSON
323f4c4dcf4SKowalski, Kamil  * Message body: "The event subscription failed due to the number of
324f4c4dcf4SKowalski, Kamil  * simultaneous subscriptions exceeding the limit of the implementation."
325f4c4dcf4SKowalski, Kamil  *
326f4c4dcf4SKowalski, Kamil  *
327f4c4dcf4SKowalski, Kamil  * @returns Message EventSubscriptionLimitExceeded formatted to JSON */
32865176d39SEd Tanous nlohmann::json eventSubscriptionLimitExceeded();
329b5c07418SJames Feist 
330f12894f8SJason M. Bills void eventSubscriptionLimitExceeded(crow::Response& res);
331f4c4dcf4SKowalski, Kamil 
332f4c4dcf4SKowalski, Kamil /**
333f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterMissing message into JSON
33466ac2b8cSJason M. Bills  * Message body: "The action <arg1> requires the parameter <arg2> to be present
335f4c4dcf4SKowalski, Kamil  * in the request body."
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 ActionParameterMissing formatted to JSON */
3411668ce6dSEd Tanous nlohmann::json actionParameterMissing(std::string_view arg1,
3421668ce6dSEd Tanous                                       std::string_view arg2);
343b5c07418SJames Feist 
3441668ce6dSEd Tanous void actionParameterMissing(crow::Response& res, std::string_view arg1,
3451668ce6dSEd Tanous                             std::string_view arg2);
346f4c4dcf4SKowalski, Kamil 
347f4c4dcf4SKowalski, Kamil /**
348f4c4dcf4SKowalski, Kamil  * @brief Formats StringValueTooLong message into JSON
34966ac2b8cSJason M. Bills  * Message body: "The string <arg1> exceeds the length limit <arg2>."
350f4c4dcf4SKowalski, Kamil  *
351f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
352f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
353f4c4dcf4SKowalski, Kamil  *
354f4c4dcf4SKowalski, Kamil  * @returns Message StringValueTooLong formatted to JSON */
3551668ce6dSEd Tanous nlohmann::json stringValueTooLong(std::string_view arg1, int arg2);
356b5c07418SJames Feist 
3571668ce6dSEd Tanous void stringValueTooLong(crow::Response& res, std::string_view arg1, int arg2);
358f4c4dcf4SKowalski, Kamil 
359f4c4dcf4SKowalski, Kamil /**
360cc9139ecSJason M. Bills  * @brief Formats SessionTerminated message into JSON
361cc9139ecSJason M. Bills  * Message body: "The session was successfully terminated."
362cc9139ecSJason M. Bills  *
363cc9139ecSJason M. Bills  *
364cc9139ecSJason M. Bills  * @returns Message SessionTerminated formatted to JSON */
36565176d39SEd Tanous nlohmann::json sessionTerminated();
366b5c07418SJames Feist 
367cc9139ecSJason M. Bills void sessionTerminated(crow::Response& res);
368cc9139ecSJason M. Bills 
369cc9139ecSJason M. Bills /**
370684bb4b8SJason M. Bills  * @brief Formats SubscriptionTerminated message into JSON
371684bb4b8SJason M. Bills  * Message body: "The event subscription has been terminated."
372684bb4b8SJason M. Bills  *
373684bb4b8SJason M. Bills  *
374684bb4b8SJason M. Bills  * @returns Message SubscriptionTerminated formatted to JSON */
37565176d39SEd Tanous nlohmann::json subscriptionTerminated();
376684bb4b8SJason M. Bills 
377684bb4b8SJason M. Bills void subscriptionTerminated(crow::Response& res);
378684bb4b8SJason M. Bills 
379684bb4b8SJason M. Bills /**
380cc9139ecSJason M. Bills  * @brief Formats ResourceTypeIncompatible message into JSON
381cc9139ecSJason M. Bills  * Message body: "The @odata.type of the request body <arg1> is incompatible
382cc9139ecSJason M. Bills  * with the @odata.type of the resource which is <arg2>."
383cc9139ecSJason M. Bills  *
384cc9139ecSJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
385cc9139ecSJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
386cc9139ecSJason M. Bills  *
387cc9139ecSJason M. Bills  * @returns Message ResourceTypeIncompatible formatted to JSON */
3881668ce6dSEd Tanous nlohmann::json resourceTypeIncompatible(std::string_view arg1,
3891668ce6dSEd Tanous                                         std::string_view arg2);
390b5c07418SJames Feist 
3911668ce6dSEd Tanous void resourceTypeIncompatible(crow::Response& res, std::string_view arg1,
3921668ce6dSEd Tanous                               std::string_view arg2);
393cc9139ecSJason M. Bills 
394cc9139ecSJason M. Bills /**
395684bb4b8SJason M. Bills  * @brief Formats ResetRequired message into JSON
396684bb4b8SJason M. Bills  * Message body: "In order to complete the operation, a component reset is
397684bb4b8SJason M. Bills  * required with the Reset action URI '<arg1>' and ResetType '<arg2>'."
398684bb4b8SJason M. Bills  *
399684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
400684bb4b8SJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
401684bb4b8SJason M. Bills  *
402684bb4b8SJason M. Bills  * @returns Message ResetRequired formatted to JSON */
4034a7fbefdSEd Tanous nlohmann::json resetRequired(const boost::urls::url_view_base& arg1,
4044a7fbefdSEd Tanous                              std::string_view arg2);
405684bb4b8SJason M. Bills 
4064a7fbefdSEd Tanous void resetRequired(crow::Response& res, const boost::urls::url_view_base& arg1,
4071668ce6dSEd Tanous                    std::string_view arg2);
408684bb4b8SJason M. Bills 
409684bb4b8SJason M. Bills /**
410684bb4b8SJason M. Bills  * @brief Formats ChassisPowerStateOnRequired message into JSON
411684bb4b8SJason M. Bills  * Message body: "The Chassis with Id '<arg1>' requires to be powered on to
412684bb4b8SJason M. Bills  * perform this request."
413684bb4b8SJason M. Bills  *
414684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
415684bb4b8SJason M. Bills  *
416684bb4b8SJason M. Bills  * @returns Message ChassisPowerStateOnRequired formatted to JSON */
4171668ce6dSEd Tanous nlohmann::json chassisPowerStateOnRequired(std::string_view arg1);
418684bb4b8SJason M. Bills 
4191668ce6dSEd Tanous void chassisPowerStateOnRequired(crow::Response& res, std::string_view arg1);
420684bb4b8SJason M. Bills 
421684bb4b8SJason M. Bills /**
422684bb4b8SJason M. Bills  * @brief Formats ChassisPowerStateOffRequired message into JSON
423684bb4b8SJason M. Bills  * Message body: "The Chassis with Id '<arg1>' requires to be powered off to
424684bb4b8SJason M. Bills  * perform this request."
425684bb4b8SJason M. Bills  *
426684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
427684bb4b8SJason M. Bills  *
428684bb4b8SJason M. Bills  * @returns Message ChassisPowerStateOffRequired formatted to JSON */
4291668ce6dSEd Tanous nlohmann::json chassisPowerStateOffRequired(std::string_view arg1);
430684bb4b8SJason M. Bills 
4311668ce6dSEd Tanous void chassisPowerStateOffRequired(crow::Response& res, std::string_view arg1);
432684bb4b8SJason M. Bills 
433684bb4b8SJason M. Bills /**
434684bb4b8SJason M. Bills  * @brief Formats PropertyValueConflict message into JSON
435684bb4b8SJason M. Bills  * Message body: "The property '<arg1>' could not be written because its value
436684bb4b8SJason M. Bills  * would conflict with the value of the '<arg2>' property."
437684bb4b8SJason M. Bills  *
438684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
439684bb4b8SJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
440684bb4b8SJason M. Bills  *
441684bb4b8SJason M. Bills  * @returns Message PropertyValueConflict formatted to JSON */
4421668ce6dSEd Tanous nlohmann::json propertyValueConflict(std::string_view arg1,
4431668ce6dSEd Tanous                                      std::string_view arg2);
444684bb4b8SJason M. Bills 
4451668ce6dSEd Tanous void propertyValueConflict(crow::Response& res, std::string_view arg1,
4461668ce6dSEd Tanous                            std::string_view arg2);
447684bb4b8SJason M. Bills 
448684bb4b8SJason M. Bills /**
4492a6af81cSRamesh Iyyar  * @brief Formats PropertyValueResourceConflict message into JSON
4502a6af81cSRamesh Iyyar  * Message body: "The property '%1' with the requested value of '%2' could
4512a6af81cSRamesh Iyyar  * not be written because the value conflicts with the state or configuration
4522a6af81cSRamesh Iyyar  * of the resource at '%3'."
4532a6af81cSRamesh Iyyar  *
4542a6af81cSRamesh Iyyar  * @param[in] arg1 Parameter of message that will replace %1 in its body.
4552a6af81cSRamesh Iyyar  * @param[in] arg2 Parameter of message that will replace %2 in its body.
4562a6af81cSRamesh Iyyar  * @param[in] arg3 Parameter of message that will replace %3 in its body.
4572a6af81cSRamesh Iyyar  *
4582a6af81cSRamesh Iyyar  * @returns Message PropertyValueResourceConflict to JSON */
459bd79bce8SPatrick Williams nlohmann::json propertyValueResourceConflict(
460bd79bce8SPatrick Williams     std::string_view arg1, const nlohmann::json& arg2,
4614a7fbefdSEd Tanous     const boost::urls::url_view_base& arg3);
4622a6af81cSRamesh Iyyar 
4632a6af81cSRamesh Iyyar void propertyValueResourceConflict(crow::Response& res, std::string_view arg1,
46495b3ad73SEd Tanous                                    const nlohmann::json& arg2,
4654a7fbefdSEd Tanous                                    const boost::urls::url_view_base& arg3);
4662a6af81cSRamesh Iyyar 
4672a6af81cSRamesh Iyyar /**
46824861a28SRamesh Iyyar  * @brief Formats PropertyValueExternalConflict message into JSON
46924861a28SRamesh Iyyar  * Message body: "The property '%1' with the requested value of '%2' could not
47024861a28SRamesh Iyyar  * be written because the value is not available due to a configuration
47124861a28SRamesh Iyyar  * conflict."
47224861a28SRamesh Iyyar  *
47324861a28SRamesh Iyyar  * @param[in] arg1 Parameter of message that will replace %1 in its body.
47424861a28SRamesh Iyyar  * @param[in] arg2 Parameter of message that will replace %2 in its body.
47524861a28SRamesh Iyyar  *
47624861a28SRamesh Iyyar  * @returns Message PropertyValueExternalConflict formatted to JSON */
47724861a28SRamesh Iyyar nlohmann::json propertyValueExternalConflict(std::string_view arg1,
47895b3ad73SEd Tanous                                              const nlohmann::json& arg2);
47924861a28SRamesh Iyyar 
48024861a28SRamesh Iyyar void propertyValueExternalConflict(crow::Response& res, std::string_view arg1,
48195b3ad73SEd Tanous                                    const nlohmann::json& arg2);
48224861a28SRamesh Iyyar 
48324861a28SRamesh Iyyar /**
484684bb4b8SJason M. Bills  * @brief Formats PropertyValueIncorrect message into JSON
485684bb4b8SJason M. Bills  * Message body: "The property '<arg1>' with the requested value of '<arg2>'
486684bb4b8SJason M. Bills  * could not be written because the value does not meet the constraints of the
487684bb4b8SJason M. Bills  * implementation."
488684bb4b8SJason M. Bills  *
489684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
490684bb4b8SJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
491684bb4b8SJason M. Bills  *
492684bb4b8SJason M. Bills  * @returns Message PropertyValueIncorrect formatted to JSON */
493367b3dceSGinu George nlohmann::json propertyValueIncorrect(std::string_view arg1,
494367b3dceSGinu George                                       const nlohmann::json& arg2);
495684bb4b8SJason M. Bills 
496367b3dceSGinu George void propertyValueIncorrect(crow::Response& res, std::string_view arg1,
497367b3dceSGinu George                             const nlohmann::json& arg2);
498684bb4b8SJason M. Bills 
499684bb4b8SJason M. Bills /**
500684bb4b8SJason M. Bills  * @brief Formats ResourceCreationConflict message into JSON
501684bb4b8SJason M. Bills  * Message body: "The resource could not be created.  The service has a resource
502684bb4b8SJason M. Bills  * at URI '<arg1>' that conflicts with the creation request."
503684bb4b8SJason M. Bills  *
504684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
505684bb4b8SJason M. Bills  *
506684bb4b8SJason M. Bills  * @returns Message ResourceCreationConflict formatted to JSON */
5074a7fbefdSEd Tanous nlohmann::json resourceCreationConflict(const boost::urls::url_view_base& arg1);
508684bb4b8SJason M. Bills 
5094a7fbefdSEd Tanous void resourceCreationConflict(crow::Response& res,
5104a7fbefdSEd Tanous                               const boost::urls::url_view_base& arg1);
511684bb4b8SJason M. Bills 
512684bb4b8SJason M. Bills /**
513684bb4b8SJason M. Bills  * @brief Formats MaximumErrorsExceeded message into JSON
514684bb4b8SJason M. Bills  * Message body: "Too many errors have occurred to report them all."
515684bb4b8SJason M. Bills  *
516684bb4b8SJason M. Bills  *
517684bb4b8SJason M. Bills  * @returns Message MaximumErrorsExceeded formatted to JSON */
51865176d39SEd Tanous nlohmann::json maximumErrorsExceeded();
519684bb4b8SJason M. Bills 
520684bb4b8SJason M. Bills void maximumErrorsExceeded(crow::Response& res);
521684bb4b8SJason M. Bills 
522684bb4b8SJason M. Bills /**
523684bb4b8SJason M. Bills  * @brief Formats PreconditionFailed message into JSON
524684bb4b8SJason M. Bills  * Message body: "The ETag supplied did not match the ETag required to change
525684bb4b8SJason M. Bills  * this resource."
526684bb4b8SJason M. Bills  *
527684bb4b8SJason M. Bills  *
528684bb4b8SJason M. Bills  * @returns Message PreconditionFailed formatted to JSON */
52965176d39SEd Tanous nlohmann::json preconditionFailed();
530684bb4b8SJason M. Bills 
531684bb4b8SJason M. Bills void preconditionFailed(crow::Response& res);
532684bb4b8SJason M. Bills 
533684bb4b8SJason M. Bills /**
534684bb4b8SJason M. Bills  * @brief Formats PreconditionRequired message into JSON
535684bb4b8SJason M. Bills  * Message body: "A precondition header or annotation is required to change this
536684bb4b8SJason M. Bills  * resource."
537684bb4b8SJason M. Bills  *
538684bb4b8SJason M. Bills  *
539684bb4b8SJason M. Bills  * @returns Message PreconditionRequired formatted to JSON */
54065176d39SEd Tanous nlohmann::json preconditionRequired();
541684bb4b8SJason M. Bills 
542684bb4b8SJason M. Bills void preconditionRequired(crow::Response& res);
543684bb4b8SJason M. Bills 
544684bb4b8SJason M. Bills /**
545684bb4b8SJason M. Bills  * @brief Formats OperationFailed message into JSON
546684bb4b8SJason M. Bills  * Message body: "An error occurred internal to the service as part of the
547684bb4b8SJason M. Bills  * overall request.  Partial results may have been returned."
548684bb4b8SJason M. Bills  *
549684bb4b8SJason M. Bills  *
550684bb4b8SJason M. Bills  * @returns Message OperationFailed formatted to JSON */
55165176d39SEd Tanous nlohmann::json operationFailed();
552684bb4b8SJason M. Bills 
553684bb4b8SJason M. Bills void operationFailed(crow::Response& res);
554684bb4b8SJason M. Bills 
555684bb4b8SJason M. Bills /**
556684bb4b8SJason M. Bills  * @brief Formats OperationTimeout message into JSON
5578ece0e45SEd Tanous  * Message body: "A timeout internal to the service occurred as part of the
558684bb4b8SJason M. Bills  * request.  Partial results may have been returned."
559684bb4b8SJason M. Bills  *
560684bb4b8SJason M. Bills  *
561684bb4b8SJason M. Bills  * @returns Message OperationTimeout formatted to JSON */
56265176d39SEd Tanous nlohmann::json operationTimeout();
563684bb4b8SJason M. Bills 
564684bb4b8SJason M. Bills void operationTimeout(crow::Response& res);
565684bb4b8SJason M. Bills 
566684bb4b8SJason M. Bills /**
567f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueTypeError message into JSON
56866ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the property <arg2> is of a different
569f4c4dcf4SKowalski, Kamil  * type than the property can accept."
570f4c4dcf4SKowalski, Kamil  *
571f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
572f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
573f4c4dcf4SKowalski, Kamil  *
574f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueTypeError formatted to JSON */
5752e8c4bdaSEd Tanous nlohmann::json propertyValueTypeError(const nlohmann::json& arg1,
5761668ce6dSEd Tanous                                       std::string_view arg2);
577b5c07418SJames Feist 
5782e8c4bdaSEd Tanous void propertyValueTypeError(crow::Response& res, const nlohmann::json& arg1,
5791668ce6dSEd Tanous                             std::string_view arg2);
580f4c4dcf4SKowalski, Kamil 
581f4c4dcf4SKowalski, Kamil /**
582b54eb49fSEd Tanous  * @brief Formats PropertyValueError message into JSON
583b54eb49fSEd Tanous  * Message body: "The value provided for the property <arg1> is not valid."
584b54eb49fSEd Tanous  *
585b54eb49fSEd Tanous  * @param[in] arg1 Parameter of message that will replace %1 in its body.
586b54eb49fSEd Tanous  *
587b54eb49fSEd Tanous  * @returns Message PropertyValueTypeError formatted to JSON */
588b54eb49fSEd Tanous nlohmann::json propertyValueError(std::string_view arg1);
589b54eb49fSEd Tanous 
590b54eb49fSEd Tanous void propertyValueError(crow::Response& res, std::string_view arg1);
591b54eb49fSEd Tanous 
592b54eb49fSEd Tanous /**
593f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceNotFound message into JSON
59466ac2b8cSJason M. Bills  * Message body: "The requested resource of type <arg1> named <arg2> was not
595f4c4dcf4SKowalski, Kamil  * found."
596f4c4dcf4SKowalski, Kamil  *
597f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
598f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
599f4c4dcf4SKowalski, Kamil  *
600f4c4dcf4SKowalski, Kamil  * @returns Message ResourceNotFound formatted to JSON */
6011668ce6dSEd Tanous nlohmann::json resourceNotFound(std::string_view arg1, std::string_view arg2);
602b5c07418SJames Feist 
6031668ce6dSEd Tanous void resourceNotFound(crow::Response& res, std::string_view arg1,
6041668ce6dSEd Tanous                       std::string_view arg2);
605f4c4dcf4SKowalski, Kamil 
606f4c4dcf4SKowalski, Kamil /**
607f4c4dcf4SKowalski, Kamil  * @brief Formats CouldNotEstablishConnection message into JSON
60855c7b7a2SEd Tanous  * Message body: "The service failed to establish a Connection with the URI
60966ac2b8cSJason M. Bills  * <arg1>."
610f4c4dcf4SKowalski, Kamil  *
611f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
612f4c4dcf4SKowalski, Kamil  *
613f4c4dcf4SKowalski, Kamil  * @returns Message CouldNotEstablishConnection formatted to JSON */
6144a7fbefdSEd Tanous nlohmann::json
6154a7fbefdSEd Tanous     couldNotEstablishConnection(const boost::urls::url_view_base& arg1);
616b5c07418SJames Feist 
617ace85d60SEd Tanous void couldNotEstablishConnection(crow::Response& res,
6184a7fbefdSEd Tanous                                  const boost::urls::url_view_base& arg1);
619f4c4dcf4SKowalski, Kamil 
620f4c4dcf4SKowalski, Kamil /**
621f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyNotWritable message into JSON
62266ac2b8cSJason M. Bills  * Message body: "The property <arg1> is a read only property and cannot be
623f4c4dcf4SKowalski, Kamil  * assigned a value."
624f4c4dcf4SKowalski, Kamil  *
625f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
626f4c4dcf4SKowalski, Kamil  *
627f4c4dcf4SKowalski, Kamil  * @returns Message PropertyNotWritable formatted to JSON */
6281668ce6dSEd Tanous nlohmann::json propertyNotWritable(std::string_view arg1);
629b5c07418SJames Feist 
6301668ce6dSEd Tanous void propertyNotWritable(crow::Response& res, std::string_view arg1);
631f12894f8SJason M. Bills 
632f12894f8SJason M. Bills /**
633f4c4dcf4SKowalski, Kamil  * @brief Formats QueryParameterValueTypeError message into JSON
63466ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the query parameter <arg2> is of a
635f4c4dcf4SKowalski, Kamil  * different type than the parameter can accept."
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 QueryParameterValueTypeError formatted to JSON */
64195b3ad73SEd Tanous nlohmann::json queryParameterValueTypeError(const nlohmann::json& arg1,
6421668ce6dSEd Tanous                                             std::string_view arg2);
643b5c07418SJames Feist 
644bd79bce8SPatrick Williams void queryParameterValueTypeError(
645bd79bce8SPatrick Williams     crow::Response& res, const nlohmann::json& arg1, std::string_view arg2);
646f4c4dcf4SKowalski, Kamil 
647f4c4dcf4SKowalski, Kamil /**
648f4c4dcf4SKowalski, Kamil  * @brief Formats ServiceShuttingDown message into JSON
649f4c4dcf4SKowalski, Kamil  * Message body: "The operation failed because the service is shutting down and
650f4c4dcf4SKowalski, Kamil  * can no longer take incoming requests."
651f4c4dcf4SKowalski, Kamil  *
652f4c4dcf4SKowalski, Kamil  *
653f4c4dcf4SKowalski, Kamil  * @returns Message ServiceShuttingDown formatted to JSON */
65465176d39SEd Tanous nlohmann::json serviceShuttingDown();
655b5c07418SJames Feist 
656f12894f8SJason M. Bills void serviceShuttingDown(crow::Response& res);
657f4c4dcf4SKowalski, Kamil 
658f4c4dcf4SKowalski, Kamil /**
659f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterDuplicate message into JSON
66066ac2b8cSJason M. Bills  * Message body: "The action <arg1> was submitted with more than one value for
66166ac2b8cSJason M. Bills  * the parameter <arg2>."
662f4c4dcf4SKowalski, Kamil  *
663f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
664f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
665f4c4dcf4SKowalski, Kamil  *
666f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterDuplicate formatted to JSON */
6671668ce6dSEd Tanous nlohmann::json actionParameterDuplicate(std::string_view arg1,
6681668ce6dSEd Tanous                                         std::string_view arg2);
669b5c07418SJames Feist 
6701668ce6dSEd Tanous void actionParameterDuplicate(crow::Response& res, std::string_view arg1,
6711668ce6dSEd Tanous                               std::string_view arg2);
672f4c4dcf4SKowalski, Kamil 
673f4c4dcf4SKowalski, Kamil /**
674f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterNotSupported message into JSON
67566ac2b8cSJason M. Bills  * Message body: "The parameter <arg1> for the action <arg2> is not supported on
676f4c4dcf4SKowalski, Kamil  * the target resource."
677f4c4dcf4SKowalski, Kamil  *
678f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
679f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
680f4c4dcf4SKowalski, Kamil  *
681f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterNotSupported formatted to JSON */
6821668ce6dSEd Tanous nlohmann::json actionParameterNotSupported(std::string_view arg1,
6831668ce6dSEd Tanous                                            std::string_view arg2);
684b5c07418SJames Feist 
6851668ce6dSEd Tanous void actionParameterNotSupported(crow::Response& res, std::string_view arg1,
6861668ce6dSEd Tanous                                  std::string_view arg2);
687f4c4dcf4SKowalski, Kamil 
688f4c4dcf4SKowalski, Kamil /**
689f4c4dcf4SKowalski, Kamil  * @brief Formats SourceDoesNotSupportProtocol message into JSON
69066ac2b8cSJason M. Bills  * Message body: "The other end of the Connection at <arg1> does not support the
69166ac2b8cSJason M. Bills  * specified protocol <arg2>."
692f4c4dcf4SKowalski, Kamil  *
693f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
694f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
695f4c4dcf4SKowalski, Kamil  *
696f4c4dcf4SKowalski, Kamil  * @returns Message SourceDoesNotSupportProtocol formatted to JSON */
697bd79bce8SPatrick Williams nlohmann::json sourceDoesNotSupportProtocol(
698bd79bce8SPatrick Williams     const boost::urls::url_view_base& arg1, std::string_view arg2);
699b5c07418SJames Feist 
700ace85d60SEd Tanous void sourceDoesNotSupportProtocol(crow::Response& res,
7014a7fbefdSEd Tanous                                   const boost::urls::url_view_base& arg1,
7021668ce6dSEd Tanous                                   std::string_view arg2);
703f4c4dcf4SKowalski, Kamil 
704f4c4dcf4SKowalski, Kamil /**
705b4ad4c05SShantappa Teekappanavar  * @brief Formats StrictAccountTypes message into JSON
706b4ad4c05SShantappa Teekappanavar  * Message body: Indicates the request failed because a set of `AccountTypes` or
707b4ad4c05SShantappa Teekappanavar  * `OEMAccountTypes` was not accepted while `StrictAccountTypes` is set to `true
708b4ad4c05SShantappa Teekappanavar  * @param[in] arg1 Parameter of message that will replace %1 in its body.
709b4ad4c05SShantappa Teekappanavar  *
710b4ad4c05SShantappa Teekappanavar  * @returns Message StrictAccountTypes formatted to JSON */
711b4ad4c05SShantappa Teekappanavar nlohmann::json strictAccountTypes(std::string_view arg1);
712b4ad4c05SShantappa Teekappanavar 
713b4ad4c05SShantappa Teekappanavar void strictAccountTypes(crow::Response& res, std::string_view arg1);
714b4ad4c05SShantappa Teekappanavar 
715b4ad4c05SShantappa Teekappanavar /**
716f4c4dcf4SKowalski, Kamil  * @brief Formats AccountRemoved message into JSON
717f4c4dcf4SKowalski, Kamil  * Message body: "The account was successfully removed."
718f4c4dcf4SKowalski, Kamil  *
719f4c4dcf4SKowalski, Kamil  *
720f4c4dcf4SKowalski, Kamil  * @returns Message AccountRemoved formatted to JSON */
72165176d39SEd Tanous nlohmann::json accountRemoved();
722b5c07418SJames Feist 
723f12894f8SJason M. Bills void accountRemoved(crow::Response& res);
724f4c4dcf4SKowalski, Kamil 
725f4c4dcf4SKowalski, Kamil /**
726f4c4dcf4SKowalski, Kamil  * @brief Formats AccessDenied message into JSON
72766ac2b8cSJason M. Bills  * Message body: "While attempting to establish a Connection to <arg1>, the
728f4c4dcf4SKowalski, Kamil  * service denied access."
729f4c4dcf4SKowalski, Kamil  *
730f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
731f4c4dcf4SKowalski, Kamil  *
732f4c4dcf4SKowalski, Kamil  * @returns Message AccessDenied formatted to JSON */
7334a7fbefdSEd Tanous nlohmann::json accessDenied(const boost::urls::url_view_base& arg1);
734b5c07418SJames Feist 
7354a7fbefdSEd Tanous void accessDenied(crow::Response& res, const boost::urls::url_view_base& arg1);
736f4c4dcf4SKowalski, Kamil 
737f4c4dcf4SKowalski, Kamil /**
738f4c4dcf4SKowalski, Kamil  * @brief Formats QueryNotSupported message into JSON
739f4c4dcf4SKowalski, Kamil  * Message body: "Querying is not supported by the implementation."
740f4c4dcf4SKowalski, Kamil  *
741f4c4dcf4SKowalski, Kamil  *
742f4c4dcf4SKowalski, Kamil  * @returns Message QueryNotSupported formatted to JSON */
74365176d39SEd Tanous nlohmann::json queryNotSupported();
744b5c07418SJames Feist 
745f12894f8SJason M. Bills void queryNotSupported(crow::Response& res);
746f4c4dcf4SKowalski, Kamil 
747f4c4dcf4SKowalski, Kamil /**
748f4c4dcf4SKowalski, Kamil  * @brief Formats CreateLimitReachedForResource message into JSON
749f4c4dcf4SKowalski, Kamil  * Message body: "The create operation failed because the resource has reached
750f4c4dcf4SKowalski, Kamil  * the limit of possible resources."
751f4c4dcf4SKowalski, Kamil  *
752f4c4dcf4SKowalski, Kamil  *
753f4c4dcf4SKowalski, Kamil  * @returns Message CreateLimitReachedForResource formatted to JSON */
75465176d39SEd Tanous nlohmann::json createLimitReachedForResource();
755b5c07418SJames Feist 
756f12894f8SJason M. Bills void createLimitReachedForResource(crow::Response& res);
757f4c4dcf4SKowalski, Kamil 
758f4c4dcf4SKowalski, Kamil /**
759f4c4dcf4SKowalski, Kamil  * @brief Formats GeneralError message into JSON
760f4c4dcf4SKowalski, Kamil  * Message body: "A general error has occurred. See ExtendedInfo for more
761f4c4dcf4SKowalski, Kamil  * information."
762f4c4dcf4SKowalski, Kamil  *
763f4c4dcf4SKowalski, Kamil  *
764f4c4dcf4SKowalski, Kamil  * @returns Message GeneralError formatted to JSON */
76565176d39SEd Tanous nlohmann::json generalError();
766b5c07418SJames Feist 
767f12894f8SJason M. Bills void generalError(crow::Response& res);
768f4c4dcf4SKowalski, Kamil 
769f4c4dcf4SKowalski, Kamil /**
770f4c4dcf4SKowalski, Kamil  * @brief Formats Success message into JSON
771f4c4dcf4SKowalski, Kamil  * Message body: "Successfully Completed Request"
772f4c4dcf4SKowalski, Kamil  *
773f4c4dcf4SKowalski, Kamil  *
774f4c4dcf4SKowalski, Kamil  * @returns Message Success formatted to JSON */
77565176d39SEd Tanous nlohmann::json success();
776b5c07418SJames Feist 
777f12894f8SJason M. Bills void success(crow::Response& res);
778f12894f8SJason M. Bills 
779f12894f8SJason M. Bills /**
780f4c4dcf4SKowalski, Kamil  * @brief Formats Created message into JSON
781f4c4dcf4SKowalski, Kamil  * Message body: "The resource has been created successfully"
782f4c4dcf4SKowalski, Kamil  *
783f4c4dcf4SKowalski, Kamil  *
784f4c4dcf4SKowalski, Kamil  * @returns Message Created formatted to JSON */
78565176d39SEd Tanous nlohmann::json created();
786b5c07418SJames Feist 
787f12894f8SJason M. Bills void created(crow::Response& res);
788f4c4dcf4SKowalski, Kamil 
789f4c4dcf4SKowalski, Kamil /**
790cc9139ecSJason M. Bills  * @brief Formats NoOperation message into JSON
791cc9139ecSJason M. Bills  * Message body: "The request body submitted contain no data to act upon and
792cc9139ecSJason M. Bills  * no changes to the resource took place."
793cc9139ecSJason M. Bills  *
794cc9139ecSJason M. Bills  *
795cc9139ecSJason M. Bills  * @returns Message NoOperation formatted to JSON */
79665176d39SEd Tanous nlohmann::json noOperation();
797b5c07418SJames Feist 
798cc9139ecSJason M. Bills void noOperation(crow::Response& res);
799cc9139ecSJason M. Bills 
800cc9139ecSJason M. Bills /**
801f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyUnknown message into JSON
80266ac2b8cSJason M. Bills  * Message body: "The property <arg1> is not in the list of valid properties for
803f4c4dcf4SKowalski, Kamil  * the resource."
804f4c4dcf4SKowalski, Kamil  *
805f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
806f4c4dcf4SKowalski, Kamil  *
807f4c4dcf4SKowalski, Kamil  * @returns Message PropertyUnknown formatted to JSON */
8081668ce6dSEd Tanous nlohmann::json propertyUnknown(std::string_view arg1);
809b5c07418SJames Feist 
8101668ce6dSEd Tanous void propertyUnknown(crow::Response& res, std::string_view arg1);
811f12894f8SJason M. Bills 
812f12894f8SJason M. Bills /**
813f4c4dcf4SKowalski, Kamil  * @brief Formats NoValidSession message into JSON
814f4c4dcf4SKowalski, Kamil  * Message body: "There is no valid session established with the
815f4c4dcf4SKowalski, Kamil  * implementation."
816f4c4dcf4SKowalski, Kamil  *
817f4c4dcf4SKowalski, Kamil  *
818f4c4dcf4SKowalski, Kamil  * @returns Message NoValidSession formatted to JSON */
81965176d39SEd Tanous nlohmann::json noValidSession();
820b5c07418SJames Feist 
821f12894f8SJason M. Bills void noValidSession(crow::Response& res);
822f4c4dcf4SKowalski, Kamil 
823f4c4dcf4SKowalski, Kamil /**
824f4c4dcf4SKowalski, Kamil  * @brief Formats InvalidObject message into JSON
82566ac2b8cSJason M. Bills  * Message body: "The object at <arg1> is invalid."
826f4c4dcf4SKowalski, Kamil  *
827f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
828f4c4dcf4SKowalski, Kamil  *
829f4c4dcf4SKowalski, Kamil  * @returns Message InvalidObject formatted to JSON */
8304a7fbefdSEd Tanous nlohmann::json invalidObject(const boost::urls::url_view_base& arg1);
831b5c07418SJames Feist 
8324a7fbefdSEd Tanous void invalidObject(crow::Response& res, const boost::urls::url_view_base& arg1);
833f4c4dcf4SKowalski, Kamil 
834f4c4dcf4SKowalski, Kamil /**
835f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceInStandby message into JSON
836f4c4dcf4SKowalski, Kamil  * Message body: "The request could not be performed because the resource is in
837f4c4dcf4SKowalski, Kamil  * standby."
838f4c4dcf4SKowalski, Kamil  *
839f4c4dcf4SKowalski, Kamil  *
840f4c4dcf4SKowalski, Kamil  * @returns Message ResourceInStandby formatted to JSON */
84165176d39SEd Tanous nlohmann::json resourceInStandby();
842b5c07418SJames Feist 
843f12894f8SJason M. Bills void resourceInStandby(crow::Response& res);
844f4c4dcf4SKowalski, Kamil 
845f4c4dcf4SKowalski, Kamil /**
846f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterValueTypeError message into JSON
84766ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
848f4c4dcf4SKowalski, Kamil  * is of a different type than the parameter can accept."
849f4c4dcf4SKowalski, Kamil  *
850f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
851f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
852f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
853f4c4dcf4SKowalski, Kamil  *
854f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterValueTypeError formatted to JSON */
855bd79bce8SPatrick Williams nlohmann::json actionParameterValueTypeError(
856bd79bce8SPatrick Williams     const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3);
857b5c07418SJames Feist 
858bd79bce8SPatrick Williams void actionParameterValueTypeError(
859bd79bce8SPatrick Williams     crow::Response& res, const nlohmann::json& arg1, std::string_view arg2,
8601668ce6dSEd Tanous     std::string_view arg3);
861f4c4dcf4SKowalski, Kamil 
862f4c4dcf4SKowalski, Kamil /**
8631827b4f1SAsmitha Karunanithi  * @brief Formats ActionParameterValueError message into JSON
8641827b4f1SAsmitha Karunanithi  * Message body: "Indicates that a parameter was given an invalid value."
8651827b4f1SAsmitha Karunanithi  *  The value for the parameter %1 in the action %2 is invalid.
8661827b4f1SAsmitha Karunanithi  *
8671827b4f1SAsmitha Karunanithi  * @param[in] arg1 Parameter of message that will replace %1 in its body.
8681827b4f1SAsmitha Karunanithi  * @param[in] arg2 Parameter of message that will replace %2 in its body.
8691827b4f1SAsmitha Karunanithi  *
8701827b4f1SAsmitha Karunanithi  * @returns Message ActionParameterValueError formatted to JSON */
8711827b4f1SAsmitha Karunanithi nlohmann::json actionParameterValueError(const nlohmann::json& arg1,
8721827b4f1SAsmitha Karunanithi                                          std::string_view arg2);
8731827b4f1SAsmitha Karunanithi 
8741827b4f1SAsmitha Karunanithi void actionParameterValueError(crow::Response& res, const nlohmann::json& arg1,
8751827b4f1SAsmitha Karunanithi                                std::string_view arg2);
8761827b4f1SAsmitha Karunanithi 
8771827b4f1SAsmitha Karunanithi /**
878f4c4dcf4SKowalski, Kamil  * @brief Formats SessionLimitExceeded message into JSON
879f4c4dcf4SKowalski, Kamil  * Message body: "The session establishment failed due to the number of
880f4c4dcf4SKowalski, Kamil  * simultaneous sessions exceeding the limit of the implementation."
881f4c4dcf4SKowalski, Kamil  *
882f4c4dcf4SKowalski, Kamil  *
883f4c4dcf4SKowalski, Kamil  * @returns Message SessionLimitExceeded formatted to JSON */
88465176d39SEd Tanous nlohmann::json sessionLimitExceeded();
885b5c07418SJames Feist 
886f12894f8SJason M. Bills void sessionLimitExceeded(crow::Response& res);
887f4c4dcf4SKowalski, Kamil 
888f4c4dcf4SKowalski, Kamil /**
889f4c4dcf4SKowalski, Kamil  * @brief Formats ActionNotSupported message into JSON
89066ac2b8cSJason M. Bills  * Message body: "The action <arg1> is not supported by the resource."
891f4c4dcf4SKowalski, Kamil  *
892f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
893f4c4dcf4SKowalski, Kamil  *
894f4c4dcf4SKowalski, Kamil  * @returns Message ActionNotSupported formatted to JSON */
8951668ce6dSEd Tanous nlohmann::json actionNotSupported(std::string_view arg1);
896b5c07418SJames Feist 
8971668ce6dSEd Tanous void actionNotSupported(crow::Response& res, std::string_view arg1);
898f4c4dcf4SKowalski, Kamil 
899f4c4dcf4SKowalski, Kamil /**
900f4c4dcf4SKowalski, Kamil  * @brief Formats InvalidIndex message into JSON
90166ac2b8cSJason M. Bills  * Message body: "The index <arg1> is not a valid offset into the array."
902f4c4dcf4SKowalski, Kamil  *
903f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
904f4c4dcf4SKowalski, Kamil  *
905f4c4dcf4SKowalski, Kamil  * @returns Message InvalidIndex formatted to JSON */
9065187e09bSJosh Lehan nlohmann::json invalidIndex(int64_t arg1);
907b5c07418SJames Feist 
9085187e09bSJosh Lehan void invalidIndex(crow::Response& res, int64_t arg1);
909f4c4dcf4SKowalski, Kamil 
910f4c4dcf4SKowalski, Kamil /**
911f4c4dcf4SKowalski, Kamil  * @brief Formats EmptyJSON message into JSON
912f4c4dcf4SKowalski, Kamil  * Message body: "The request body submitted contained an empty JSON object and
913f4c4dcf4SKowalski, Kamil  * the service is unable to process it."
914f4c4dcf4SKowalski, Kamil  *
915f4c4dcf4SKowalski, Kamil  *
916f4c4dcf4SKowalski, Kamil  * @returns Message EmptyJSON formatted to JSON */
91765176d39SEd Tanous nlohmann::json emptyJSON();
918b5c07418SJames Feist 
919f12894f8SJason M. Bills void emptyJSON(crow::Response& res);
920f4c4dcf4SKowalski, Kamil 
921f4c4dcf4SKowalski, Kamil /**
922f4c4dcf4SKowalski, Kamil  * @brief Formats QueryNotSupportedOnResource message into JSON
923f4c4dcf4SKowalski, Kamil  * Message body: "Querying is not supported on the requested resource."
924f4c4dcf4SKowalski, Kamil  *
925f4c4dcf4SKowalski, Kamil  *
926f4c4dcf4SKowalski, Kamil  * @returns Message QueryNotSupportedOnResource formatted to JSON */
92765176d39SEd Tanous nlohmann::json queryNotSupportedOnResource();
928b5c07418SJames Feist 
929f12894f8SJason M. Bills void queryNotSupportedOnResource(crow::Response& res);
930f4c4dcf4SKowalski, Kamil 
931f4c4dcf4SKowalski, Kamil /**
932684bb4b8SJason M. Bills  * @brief Formats QueryNotSupportedOnOperation message into JSON
933684bb4b8SJason M. Bills  * Message body: "Querying is not supported with the requested operation."
934684bb4b8SJason M. Bills  *
935684bb4b8SJason M. Bills  *
936684bb4b8SJason M. Bills  * @returns Message QueryNotSupportedOnOperation formatted to JSON */
93765176d39SEd Tanous nlohmann::json queryNotSupportedOnOperation();
938684bb4b8SJason M. Bills 
939684bb4b8SJason M. Bills void queryNotSupportedOnOperation(crow::Response& res);
940684bb4b8SJason M. Bills 
941684bb4b8SJason M. Bills /**
942684bb4b8SJason M. Bills  * @brief Formats QueryCombinationInvalid message into JSON
943684bb4b8SJason M. Bills  * Message body: "Two or more query parameters in the request cannot be used
944684bb4b8SJason M. Bills  * together."
945684bb4b8SJason M. Bills  *
946684bb4b8SJason M. Bills  *
947684bb4b8SJason M. Bills  * @returns Message QueryCombinationInvalid formatted to JSON */
94865176d39SEd Tanous nlohmann::json queryCombinationInvalid();
949684bb4b8SJason M. Bills 
950684bb4b8SJason M. Bills void queryCombinationInvalid(crow::Response& res);
951684bb4b8SJason M. Bills 
952684bb4b8SJason M. Bills /**
953fa345c78SEd Tanous  * @brief Formats EventBufferExceeded message into JSON
954fa345c78SEd Tanous  * Message body: "Indicates undelivered events may have been lost due to a lack
955fa345c78SEd Tanous  * of buffer space in the service."
956fa345c78SEd Tanous  *
957fa345c78SEd Tanous  *
958fa345c78SEd Tanous  * @returns Message QueryCombinationInvalid formatted to JSON */
959fa345c78SEd Tanous nlohmann::json eventBufferExceeded();
960fa345c78SEd Tanous 
961fa345c78SEd Tanous void eventBufferExceeded(crow::Response& res);
962fa345c78SEd Tanous 
963fa345c78SEd Tanous /**
964f4c4dcf4SKowalski, Kamil  * @brief Formats InsufficientPrivilege message into JSON
965f4c4dcf4SKowalski, Kamil  * Message body: "There are insufficient privileges for the account or
966f4c4dcf4SKowalski, Kamil  * credentials associated with the current session to perform the requested
967f4c4dcf4SKowalski, Kamil  * operation."
968f4c4dcf4SKowalski, Kamil  *
969f4c4dcf4SKowalski, Kamil  *
970f4c4dcf4SKowalski, Kamil  * @returns Message InsufficientPrivilege formatted to JSON */
97165176d39SEd Tanous nlohmann::json insufficientPrivilege();
972b5c07418SJames Feist 
973f12894f8SJason M. Bills void insufficientPrivilege(crow::Response& res);
974f4c4dcf4SKowalski, Kamil 
975f4c4dcf4SKowalski, Kamil /**
976f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueModified message into JSON
97766ac2b8cSJason M. Bills  * Message body: "The property <arg1> was assigned the value <arg2> due to
978f4c4dcf4SKowalski, Kamil  * modification by the service."
979f4c4dcf4SKowalski, Kamil  *
980f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
981f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
982f4c4dcf4SKowalski, Kamil  *
983f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueModified formatted to JSON */
9841668ce6dSEd Tanous nlohmann::json propertyValueModified(std::string_view arg1,
98595b3ad73SEd Tanous                                      const nlohmann::json& arg2);
986b5c07418SJames Feist 
9871668ce6dSEd Tanous void propertyValueModified(crow::Response& res, std::string_view arg1,
98895b3ad73SEd Tanous                            const nlohmann::json& arg2);
989f4c4dcf4SKowalski, Kamil 
990f4c4dcf4SKowalski, Kamil /**
991f4c4dcf4SKowalski, Kamil  * @brief Formats AccountNotModified message into JSON
992f4c4dcf4SKowalski, Kamil  * Message body: "The account modification request failed."
993f4c4dcf4SKowalski, Kamil  *
994f4c4dcf4SKowalski, Kamil  *
995f4c4dcf4SKowalski, Kamil  * @returns Message AccountNotModified formatted to JSON */
99665176d39SEd Tanous nlohmann::json accountNotModified();
997b5c07418SJames Feist 
998f12894f8SJason M. Bills void accountNotModified(crow::Response& res);
999f4c4dcf4SKowalski, Kamil 
1000f4c4dcf4SKowalski, Kamil /**
1001f4c4dcf4SKowalski, Kamil  * @brief Formats QueryParameterValueFormatError message into JSON
100266ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the parameter <arg2> is of a different
1003f4c4dcf4SKowalski, Kamil  * format than the parameter can accept."
1004f4c4dcf4SKowalski, Kamil  *
1005f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1006f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
1007f4c4dcf4SKowalski, Kamil  *
1008f4c4dcf4SKowalski, Kamil  * @returns Message QueryParameterValueFormatError formatted to JSON */
1009b5c07418SJames Feist 
101095b3ad73SEd Tanous nlohmann::json queryParameterValueFormatError(const nlohmann::json& arg1,
10111668ce6dSEd Tanous                                               std::string_view arg2);
1012b5c07418SJames Feist 
1013bd79bce8SPatrick Williams void queryParameterValueFormatError(
1014bd79bce8SPatrick Williams     crow::Response& res, const nlohmann::json& arg1, std::string_view arg2);
1015f4c4dcf4SKowalski, Kamil 
1016f4c4dcf4SKowalski, Kamil /**
1017f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyMissing message into JSON
101866ac2b8cSJason M. Bills  * Message body: "The property <arg1> is a required property and must be
1019f4c4dcf4SKowalski, Kamil  * included in the request."
1020f4c4dcf4SKowalski, Kamil  *
1021f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1022f4c4dcf4SKowalski, Kamil  *
1023f4c4dcf4SKowalski, Kamil  * @returns Message PropertyMissing formatted to JSON */
10241668ce6dSEd Tanous nlohmann::json propertyMissing(std::string_view arg1);
1025b5c07418SJames Feist 
10261668ce6dSEd Tanous void propertyMissing(crow::Response& res, std::string_view arg1);
1027f12894f8SJason M. Bills 
1028f12894f8SJason M. Bills /**
1029f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceExhaustion message into JSON
103066ac2b8cSJason M. Bills  * Message body: "The resource <arg1> was unable to satisfy the request due to
1031f4c4dcf4SKowalski, Kamil  * unavailability of resources."
1032f4c4dcf4SKowalski, Kamil  *
1033f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1034f4c4dcf4SKowalski, Kamil  *
1035f4c4dcf4SKowalski, Kamil  * @returns Message ResourceExhaustion formatted to JSON */
10361668ce6dSEd Tanous nlohmann::json resourceExhaustion(std::string_view arg1);
1037b5c07418SJames Feist 
10381668ce6dSEd Tanous void resourceExhaustion(crow::Response& res, std::string_view arg1);
1039f4c4dcf4SKowalski, Kamil 
1040f4c4dcf4SKowalski, Kamil /**
1041f4c4dcf4SKowalski, Kamil  * @brief Formats AccountModified message into JSON
1042f4c4dcf4SKowalski, Kamil  * Message body: "The account was successfully modified."
1043f4c4dcf4SKowalski, Kamil  *
1044f4c4dcf4SKowalski, Kamil  *
1045f4c4dcf4SKowalski, Kamil  * @returns Message AccountModified formatted to JSON */
104665176d39SEd Tanous nlohmann::json accountModified();
1047b5c07418SJames Feist 
1048a08b46ccSJason M. Bills void accountModified(crow::Response& res);
1049f4c4dcf4SKowalski, Kamil 
1050f4c4dcf4SKowalski, Kamil /**
1051f4c4dcf4SKowalski, Kamil  * @brief Formats QueryParameterOutOfRange message into JSON
105266ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the query parameter <arg2> is out of
105366ac2b8cSJason M. Bills  * range <arg3>."
1054f4c4dcf4SKowalski, Kamil  *
1055f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1056f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
1057f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
1058f4c4dcf4SKowalski, Kamil  *
1059f4c4dcf4SKowalski, Kamil  * @returns Message QueryParameterOutOfRange formatted to JSON */
1060bd79bce8SPatrick Williams nlohmann::json queryParameterOutOfRange(
1061bd79bce8SPatrick Williams     std::string_view arg1, std::string_view arg2, std::string_view arg3);
1062b5c07418SJames Feist 
10631668ce6dSEd Tanous void queryParameterOutOfRange(crow::Response& res, std::string_view arg1,
10641668ce6dSEd Tanous                               std::string_view arg2, std::string_view arg3);
1065f4c4dcf4SKowalski, Kamil 
10663bf4e632SJoseph Reynolds /**
10673bf4e632SJoseph Reynolds  * @brief Formats PasswordChangeRequired message into JSON
10683bf4e632SJoseph Reynolds  * Message body: The password provided for this account must be changed
10693bf4e632SJoseph Reynolds  * before access is granted.  PATCH the 'Password' property for this
10703bf4e632SJoseph Reynolds  * account located at the target URI '%1' to complete this process.
10713bf4e632SJoseph Reynolds  *
10723bf4e632SJoseph Reynolds  * @param[in] arg1 Parameter of message that will replace %1 in its body.
10733bf4e632SJoseph Reynolds  *
10743bf4e632SJoseph Reynolds  * @returns Message PasswordChangeRequired formatted to JSON */
1075ace85d60SEd Tanous 
10764a7fbefdSEd Tanous nlohmann::json passwordChangeRequired(const boost::urls::url_view_base& arg1);
1077ace85d60SEd Tanous 
10784a7fbefdSEd Tanous void passwordChangeRequired(crow::Response& res,
10794a7fbefdSEd Tanous                             const boost::urls::url_view_base& arg1);
10803bf4e632SJoseph Reynolds 
10814cde5d90SJames Feist /**
10824cde5d90SJames Feist  * @brief Formats InvalidUpload message into JSON
10834cde5d90SJames Feist  * Message body: Invalid file uploaded to %1: %2.*
10844cde5d90SJames Feist  * @param[in] arg1 Parameter of message that will replace %1 in its body.
10854cde5d90SJames Feist  * @param[in] arg2 Parameter of message that will replace %2 in its body.
10864cde5d90SJames Feist  *
10874cde5d90SJames Feist  * @returns Message InvalidUpload formatted to JSON */
10881668ce6dSEd Tanous nlohmann::json invalidUpload(std::string_view arg1, std::string_view arg2);
10894cde5d90SJames Feist 
10901668ce6dSEd Tanous void invalidUpload(crow::Response& res, std::string_view arg1,
10911668ce6dSEd Tanous                    std::string_view arg2);
10924cde5d90SJames Feist 
1093ae688313SNan Zhou /**
1094ae688313SNan Zhou  * @brief Formats InsufficientStorage message into JSON
10958ece0e45SEd Tanous  * Message body: "Insufficient storage or memory available to complete the
1096ae688313SNan Zhou  *  request."
1097ae688313SNan Zhou  * @returns Message InsufficientStorage formatted to JSON */
1098ae688313SNan Zhou nlohmann::json insufficientStorage();
1099ae688313SNan Zhou 
1100ae688313SNan Zhou void insufficientStorage(crow::Response& res);
1101ae688313SNan Zhou 
110244c70412SEd Tanous /**
110344c70412SEd Tanous  * @brief Formats OperationNotAllowed message into JSON
110444c70412SEd Tanous  * Message body: "he HTTP method is not allowed on this resource."
110544c70412SEd Tanous  * @returns Message OperationNotAllowed formatted to JSON */
110644c70412SEd Tanous nlohmann::json operationNotAllowed();
110744c70412SEd Tanous 
110844c70412SEd Tanous void operationNotAllowed(crow::Response& res);
110944c70412SEd Tanous 
1110600af5f1SAppaRao Puli /**
1111600af5f1SAppaRao Puli  * @brief Formats ArraySizeTooLong message into JSON
1112600af5f1SAppaRao Puli  * Message body: "Indicates that a string value passed to the given resource
1113600af5f1SAppaRao Puli  * exceeded its length limit."
1114600af5f1SAppaRao Puli  * @returns Message ArraySizeTooLong formatted to JSON */
1115*aaebeaafSEd Tanous nlohmann::json arraySizeTooLong(std::string_view arg1, uint64_t arg2);
1116600af5f1SAppaRao Puli 
1117*aaebeaafSEd Tanous void arraySizeTooLong(crow::Response& res, std::string_view arg1,
1118*aaebeaafSEd Tanous                       uint64_t arg2);
1119600af5f1SAppaRao Puli 
11207585b760SJishnu CM /**
11217585b760SJishnu CM  * @brief Formats GenerateSecretKeyRequired message into JSON
11227585b760SJishnu CM  * Message body: Secret key needs to be generated for the account before
11237585b760SJishnu CM  * accessing the service. Account has to provide a time based OTP from the
11247585b760SJishnu CM  * device configured with the secret key before access is granted. The secret
11257585b760SJishnu CM  * key can be generated with a `POST` to the `GenerateSecretKey` action for
11267585b760SJishnu CM  * the account located at the target URI '%1'.
11277585b760SJishnu CM  *
11287585b760SJishnu CM  * @param[in] arg1 Parameter of message that will replace %1 in its body.
11297585b760SJishnu CM  *
11307585b760SJishnu CM  * @returns Message GenerateSecretKeyRequired formatted to JSON */
11317585b760SJishnu CM 
11327585b760SJishnu CM nlohmann::json
11337585b760SJishnu CM     generateSecretKeyRequired(const boost::urls::url_view_base& arg1);
11347585b760SJishnu CM 
11357585b760SJishnu CM void generateSecretKeyRequired(crow::Response& res,
11367585b760SJishnu CM                                const boost::urls::url_view_base& arg1);
1137f4c4dcf4SKowalski, Kamil } // namespace messages
1138f4c4dcf4SKowalski, Kamil 
1139f4c4dcf4SKowalski, Kamil } // namespace redfish
1140